//__________________________________________________________//
// //
-// 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 //
#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),
//------------------------------------------------------------------------
AliTOFSDigitizer::AliTOFSDigitizer(const AliTOFSDigitizer &source):
- TTask(source),
+ TNamed(source),
fEvent1(-1),
fEvent2(-1),
ftail(0x0),
//____________________________________________________________________________
AliTOFSDigitizer::AliTOFSDigitizer(const char* HeaderFile, Int_t evNumber1, Int_t nEvents):
- TTask("TOFSDigitizer",""),
+ TNamed("TOFSDigitizer",""),
fEvent1(-1),
fEvent2(-1),
ftail(0x0),
AliFatal("Can not find TOF loader in event. Exiting.");
return;
}
- fTOFLoader->PostSDigitizer(this);
-
}
//____________________________________________________________________________
AliTOFSDigitizer::~AliTOFSDigitizer()
{
// dtor
- fTOFLoader->CleanSDigitizer();
-
if (fCalib) delete fCalib;
}
}
//____________________________________________________________________________
-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");
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){