1 #include "ERNeuRadHitFinderWBT.h" 8 #include "TGeoMatrix.h" 10 #include "FairRootManager.h" 11 #include "FairRunAna.h" 12 #include "FairRuntimeDb.h" 14 #include "ERDetectorList.h" 15 #include "ERNeuRadPixelSignal.h" 16 #include "ERNeuRadSetup.h" 18 Int_t ERNeuRadHitFinderWBT::fEvent = 0;
22 : FairTask(
"ER NeuRad hit producing scheme")
29 : FairTask(
"ER NeuRad hit producing scheme ", verbose)
41 void ERNeuRadHitFinderWBT::SetParContainers()
44 FairRunAna* run = FairRunAna::Instance();
45 if ( ! run ) Fatal(
"SetParContainers",
"No analysis run");
47 FairRuntimeDb* rtdb = run->GetRuntimeDb();
48 if ( ! rtdb ) Fatal(
"SetParContainers",
"No runtime database");
51 (rtdb->getContainer(
"ERNeuRadDigiPar"));
59 FairRootManager* ioman = FairRootManager::Instance();
60 if ( ! ioman ) Fatal(
"Init",
"No FairRootManager");
66 fNeuRadHits =
new TClonesArray(
"ERNeuRadHitWBT",1000);
68 ioman->Register(
"NeuRadHit",
"NeuRad hits", fNeuRadHits, kTRUE);
80 std::cout << std::endl;
81 std::cout <<
"####### EVENT " << fEvent++ <<
" #####" << std::endl;
82 std::cout << std::endl;
83 std::cout <<
"ERNeuRadHitFinderWBT: "<< std::endl;
85 Float_t fOnePEInteg = 4.8;
91 if (signal->Side() == 0){
93 Float_t qInteg = signal->AmplitudesSum();
94 TVector3 pos(setup->FiberX(signal->ModuleNb(), signal->PixelNb()),
95 setup->FiberY(signal->ModuleNb(), signal->PixelNb()),
96 setup->Z()-setup->FiberLength());
98 AddHit(kNEURAD,pos, dpos,signal->ModuleNb(),signal->PixelNb(), -1, qInteg);
101 std::cout <<
"Hits count: " << fNeuRadHits->GetEntriesFast() << std::endl;
109 fNeuRadHits->Delete();
121 ERNeuRadHitWBT* ERNeuRadHitFinderWBT::AddHit(Int_t detID, TVector3& pos, TVector3& dpos,
122 Int_t ModuleNb, Int_t PixelNb, Float_t time,
125 ERNeuRadHitWBT *hit =
new((*fNeuRadHits)[fNeuRadHits->GetEntriesFast()])
126 ERNeuRadHitWBT(fNeuRadHits->GetEntriesFast(),detID, pos, dpos,-1, ModuleNb, PixelNb, time,
virtual void Exec(Option_t *opt)
TClonesArray * fNeuRadPMTSignals
virtual InitStatus Init()