/*
$Log$
+Revision 1.6 2002/10/14 14:57:43 hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
+Revision 1.4.10.1 2002/08/28 15:06:52 alibrary
+Updating to v3-09-01
+
+Revision 1.5 2002/08/25 15:54:29 kowal2
+Protection against overflows in TMath::Nint.
+
+Revision 1.4 2001/01/10 09:35:27 kowal2
+Changes to obey the coding rules.
+
+Revision 1.3 2000/11/02 10:22:50 kowal2
+Logs added
+
*/
///////////////////////////////////////////////////////////////////////////////
// //
#include "AliTPCTrackHits.h"
#include "AliTPC.h"
-#include <iostream.h>
+#include <Riostream.h>
fTempInfo =0;
fTrackHitsInfo = new AliObjectArray("AliTrackHitsInfo");
fTrackHitsParam = new AliObjectArray("AliTrackHitsParam");
- fHitsPosAndQ = new TArrayOfArray_vStack("AliHitInfo");
+ fHitsPosAndQ = new TArrayOfArrayVStack("AliHitInfo");
fCurrentHit = new AliTPCCurrentHit;
fgCounter1++;
fgCounter2++;
{
//
//clear object
- // fTrackHitsInfo->Clear();
- //fTrackHitsParam->Clear();
-
- fTrackHitsInfo->Resize(0);
- fTrackHitsParam->Resize(0);
+ fTrackHitsInfo->Clear();
+ fTrackHitsParam->Clear();
+ //fTrackHitsInfo->Resize(0);
+ //fTrackHitsParam->Resize(0);
fHitsPosAndQ->Clear();
if (fTempInfo){
ddz2*=ddz2;
ratio = TMath::Sqrt(1.+ dfi2+ ddz2);
}
- dl = fStep * Short_t(TMath::Nint(drhit*ratio/fStep));
+ //
+
+
+ dl = (TMath::Abs(drhit*ratio/fStep)<32000) ? fStep * Short_t(TMath::Nint(drhit*ratio/fStep)):0;
ddl = dl - drhit*ratio;
fTempInfo->fOldR += dl/ratio;
ratio = TMath::Sqrt(1.+ dfi2+ ddz2);
}
- Double_t dl = fStep*(Short_t)TMath::Nint(dr*ratio/fStep);
+ Double_t dl = (TMath::Abs(dr*ratio/fStep)<32000) ? fStep*(Short_t)TMath::Nint(dr*ratio/fStep):0;
dr = dl/ratio;
oldr+=dr;
//calculate precission
}
info = (AliHitInfo*)(fHitsPosAndQ->At(fTempInfo->fParamIndex,i));
- info->fHitDistance = Short_t(TMath::Nint(dl/fStep));
+ info->fHitDistance = (TMath::Abs(dl/fStep)<32000) ?Short_t(TMath::Nint(dl/fStep)):0;
info->fCharge = Short_t(fTempInfo->fQStack[i]);
/*
cout<<"C2";