X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TOF%2FAliTOFSDigitizer.cxx;h=9898ff04e434f209c3afbfaf7b9649036dff33ab;hb=825d120f4d4ed6bec271dee5326915eefa4225f8;hp=943530a5c7763cc50879b883e8fa9512868a10bd;hpb=fa2ad9483ab68f4b676e738bd1de226ed72d0c82;p=u%2Fmrichter%2FAliRoot.git diff --git a/TOF/AliTOFSDigitizer.cxx b/TOF/AliTOFSDigitizer.cxx index 943530a5c77..9898ff04e43 100644 --- a/TOF/AliTOFSDigitizer.cxx +++ b/TOF/AliTOFSDigitizer.cxx @@ -17,7 +17,7 @@ //__________________________________________________________// // // -// This is a TTask that constructs SDigits out of Hits // +// This is a class that constructs SDigits out of Hits // // A Summable Digits is the "sum" of all hits in a pad // // Detector response has been simulated via the method // // SimulateDetectorResponse // @@ -51,13 +51,13 @@ #include "AliTOFSDigit.h" #include "AliTOF.h" -extern TROOT *gROOT; +//extern TROOT *gROOT; ClassImp(AliTOFSDigitizer) //____________________________________________________________________________ AliTOFSDigitizer::AliTOFSDigitizer(): - TTask("TOFSDigitizer",""), + TNamed("TOFSDigitizer",""), fEvent1(-1), fEvent2(-1), ftail(0x0), @@ -104,7 +104,7 @@ AliTOFSDigitizer::AliTOFSDigitizer(): //------------------------------------------------------------------------ AliTOFSDigitizer::AliTOFSDigitizer(const AliTOFSDigitizer &source): - TTask(source), + TNamed(source), fEvent1(-1), fEvent2(-1), ftail(0x0), @@ -160,7 +160,7 @@ AliTOFSDigitizer& AliTOFSDigitizer::operator=(const AliTOFSDigitizer &/*source*/ //____________________________________________________________________________ AliTOFSDigitizer::AliTOFSDigitizer(const char* HeaderFile, Int_t evNumber1, Int_t nEvents): - TTask("TOFSDigitizer",""), + TNamed("TOFSDigitizer",""), fEvent1(-1), fEvent2(-1), ftail(0x0), @@ -265,16 +265,12 @@ AliTOFSDigitizer::AliTOFSDigitizer(const char* HeaderFile, Int_t evNumber1, Int_ AliFatal("Can not find TOF loader in event. Exiting."); return; } - fTOFLoader->PostSDigitizer(this); - } //____________________________________________________________________________ AliTOFSDigitizer::~AliTOFSDigitizer() { // dtor - fTOFLoader->CleanSDigitizer(); - if (fCalib) delete fCalib; } @@ -350,7 +346,7 @@ Double_t TimeWithTail(const Double_t * const x, const Double_t * const par) } //____________________________________________________________________________ -void AliTOFSDigitizer::Exec(Option_t *verboseOption) { +void AliTOFSDigitizer::Digitize(Option_t *verboseOption) { //execute TOF sdigitization if (strstr(verboseOption,"tim") || strstr(verboseOption,"all")) gBenchmark->Start("TOFSDigitizer"); @@ -543,10 +539,10 @@ void AliTOFSDigitizer::Exec(Option_t *verboseOption) { if(timediff>=0.2) nlargeTofDiff++; // greater than 200ps - digit[0] = (Int_t) ((tofAfterSimul[indexOfPad]*1.e+03)/AliTOFGeometry::TdcBinWidth()); // TDC bin number (each bin -> 24.4 ps) + digit[0] = TMath::Nint((tofAfterSimul[indexOfPad]*1.e+03)/AliTOFGeometry::TdcBinWidth()); // TDC bin number (each bin -> 24.4 ps) Float_t landauFactor = gRandom->Landau(fAdcMean, fAdcRms); - digit[1] = (Int_t) (qInduced[indexOfPad] * landauFactor); // ADC bins (each bin -> 0.25 (or 0.03) pC) + digit[1] = TMath::Nint(qInduced[indexOfPad] * landauFactor); // ADC bins (each bin -> 0.25 (or 0.03) pC) // recalculate the volume only for neighbouring pads if(indexOfPad){