14 #include "FairModule.h"
15 #include "FairRootManager.h"
19 #include "TClonesArray.h"
20 #include "TGeoManager.h"
33 using std::setprecision;
45 : FairTask(name, iVerbose)
47 , fShowDebugHistos(kFALSE)
54 , fBranchName(
"MvdDigi")
75 Int_t nEvents =
fEvents->GetEntriesFast();
76 for (Int_t iEv = 0; iEv < nEvents; ++iEv) {
77 LOG(debug) <<
"Getting data from CbmEvent";
81 for (Int_t nDigi = 0; nDigi < nrOfDigis; ++nDigi) {
85 LOG(debug) <<
"//----------------------------------------//";
86 LOG(debug) << endl <<
"Send Input";
90 LOG(debug) <<
"End Chain";
91 LOG(debug) <<
"Start writing Hit";
95 LOG(debug) <<
"Total of " <<
fCluster->GetEntriesFast()
96 <<
" Hit in this Event";
97 LOG(debug) <<
"//----------------------------------------//";
98 LOG(info) <<
"+ " << setw(20) << GetName()
99 <<
": Created: " <<
fCluster->GetEntriesFast() <<
" hit in "
100 << fixed << setprecision(6) <<
fTimer.RealTime() <<
" s";
108 cout <<
"-I- " << GetName() <<
": Initialisation..." << endl;
110 cout <<
"---------------------------------------------" << endl;
111 cout <<
"-I- Initialising " << GetName() <<
" ...." << endl;
114 FairRootManager* ioman = FairRootManager::Instance();
116 cout <<
"-E- " << GetName() <<
"::Init: No FairRootManager!" << endl;
121 fEvents = (TClonesArray*) ioman->GetObject(
"Event");
123 fInputDigis = (TClonesArray*) ioman->GetObject(
"MvdDigi");
124 fEventDigis =
new TClonesArray(
"CbmMvdDigi", 10000);
126 LOG(error) <<
"No MvdDigi branch found. There was no MVD in the "
127 "simulation. Switch this task off";
132 fCluster =
new TClonesArray(
"CbmMvdHit", 10000);
134 "MvdHit",
"Mvd Hits",
fCluster, IsOutputBranchPersistent(
"MvdHit"));
139 LOG(debug) <<
"-I- succesfully loaded Geometry from file -I-";
142 <<
"Geometry couldn't be loaded from file. No MVD digitizer available.";
154 LOG(info) << GetName() <<
" initialised";
184 cout <<
"============================================================"
186 cout <<
"============== Parameters DigiToHit ====================" << endl;
187 cout <<
"============================================================"
189 cout <<
"=============== End Task ==================================="