19 #include "FairField.h"
20 #include "FairRootManager.h"
21 #include "FairRunAna.h"
22 #include "FairRuntimeDb.h"
25 #include "TClonesArray.h"
36 using std::setprecision;
42 : FairTask(
"StsFindTracksEvents")
75 Int_t nEvents =
fEvents->GetEntriesFast();
76 LOG(debug) << GetName() <<
": reading time slice with " << nEvents
78 for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
93 LOG(info) <<
"=====================================";
94 LOG(info) << GetName() <<
": initialising";
97 FairRootManager* ioman = FairRootManager::Instance();
101 fEvents =
dynamic_cast<TClonesArray*
>(ioman->GetObject(
"Event"));
103 LOG(warn) << GetName() <<
": No event array! Will process entire tree.";
107 fStsHits = (TClonesArray*) ioman->GetObject(
"StsHit");
112 LOG(info) << GetName() <<
": including MVD hits in tracking";
113 fMvdHits = (TClonesArray*) ioman->GetObject(
"MvdHit");
118 fTracks =
new TClonesArray(
"CbmStsTrack", 100);
120 "StsTrack",
"STS",
fTracks, IsOutputBranchPersistent(
"StsTrack"));
124 LOG(fatal) << GetName() <<
": no track finding engine selected!";
127 LOG(info) << GetName() <<
": Use track finder " <<
fFinder->GetName();
136 LOG(info) << GetName() <<
": successfully initialised.";
137 LOG(info) <<
"=====================================\n";
146 std::cout << std::endl;
147 LOG(info) <<
"=====================================";
148 LOG(info) << GetName() <<
": Run summary";
149 LOG(info) <<
"Events processed : " <<
fNofEvents;
153 LOG(info) <<
"Time per event : " <<
fTime / Double_t(
fNofEvents) <<
" s ";
154 LOG(info) <<
"=====================================";
171 LOG(info) <<
"+ " << setw(20) << GetName() <<
": Event " << setw(6) << right
172 <<
eventNumber <<
", real time " << fixed << setprecision(6)
173 <<
fTimer.RealTime() <<
" s, hits: " << nHits
174 <<
", tracks: " << nTracks;