#include "AliLog.h"
#include "AliDetector.h"
#include "AliLoader.h"
+#include "AliMC.h"
#include "AliRun.h"
#include "AliRunLoader.h"
+
#include "AliTOF.h"
#include "AliTOFGeometry.h"
#include "AliTOFHitMap.h"
#include "AliTOFSDigitizer.h"
#include "AliTOFhit.h"
#include "AliTOFhitT0.h"
-#include "AliMC.h"
ClassImp(AliTOFSDigitizer)
ftail = 0;
fSelectedSector = -1;
fSelectedPlate = -1;
+
+ fTOFGeometry = new AliTOFGeometry();
+
}
//____________________________________________________________________________
return;
}
+ fRunLoader->CdGAFile();
+ TDirectory *savedir=gDirectory;
+ TFile *in=(TFile*)gFile;
+
+ if (!in->IsOpen()) {
+ AliWarning("Geometry file is not open default TOF geometry will be used");
+ fTOFGeometry = new AliTOFGeometry();
+ }
+ else {
+ in->cd();
+ fTOFGeometry = (AliTOFGeometry*)in->Get("TOFgeometry");
+ }
+
+ savedir->cd();
+
if (fRunLoader->TreeE() == 0x0) fRunLoader->LoadHeader();
if (evNumber1>=0) fEvent1 = evNumber1;
{
// dtor
fTOFLoader->CleanSDigitizer();
+
+ delete fTOFGeometry;
+
}
//____________________________________________________________________________
return f;
}
-
//____________________________________________________________________________
void AliTOFSDigitizer::Exec(Option_t *verboseOption) {
TClonesArray *tofHitArray = tof->Hits();
// create hit map
- AliTOFHitMap *hitMap = new AliTOFHitMap(tof->SDigits());
+ AliTOFHitMap *hitMap = new AliTOFHitMap(tof->SDigits(), fTOFGeometry);
TBranch * tofHitsBranch = hitTree->GetBranch("TOF");
// fp: really sorry for this, it is a temporary trick to have
// track length too
- if(version!=6){
+ if(version!=6 && version!=7){
AliTOFhit *tofHit = (AliTOFhit *) tofHitArray->UncheckedAt(hit);
tracknum = tofHit->GetTrack();
vol[0] = tofHit->GetSector();
if(timediff>=0.2) nlargeTofDiff++;
- digit[0] = (Int_t) ((tofAfterSimul[indexOfPad]*1.e+03)/AliTOFGeometry::TdcBinWidth()); // TDC bin number (each bin -> 50. ps)
+ digit[0] = (Int_t) ((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)
cout << " Time walk (ps) at the boundary of the pad : "<< fTimeWalkBoundary<< endl;
cout << " Slope (ps/K) for neighbouring pad : "<< fTimeWalkSlope<<endl;
cout << " Pulse Heigth Simulation Parameters " << endl;
- cout << " Flag for delay due to the PulseHeightEffect: "<< fTimeDelayFlag <<endl;
+ cout << " Flag for delay due to the PulseHeightEffect : "<< fTimeDelayFlag <<endl;
cout << " Pulse Height Slope : "<< fPulseHeightSlope<<endl;
cout << " Time Delay Slope : "<< fTimeDelaySlope<<endl;
cout << " Minimum charge amount which could be induced : "<< fMinimumCharge<<endl;