13 #include "FairField.h"
14 #include "FairRootManager.h"
15 #include "FairRunAna.h"
16 #include "FairRuntimeDb.h"
19 #include "TClonesArray.h"
30 using std::setprecision;
35 : FairTask(
"STSFindTracks")
61 : FairTask(name, iVerbose)
109 LOG(info) <<
"+ " << setw(20) << GetName() <<
": Event " << setw(6) << right
110 <<
fNEvents <<
", real time " << fixed << setprecision(6)
111 <<
fTimer.RealTime() <<
" s, hits: " <<
fStsHits->GetEntriesFast()
112 <<
", tracks: " << nTracks;
126 FairRunAna* run = FairRunAna::Instance();
127 if (!run) Fatal(
"SetParContainers",
"No analysis run");
129 FairRuntimeDb* db = run->GetRuntimeDb();
130 if (!db) Fatal(
"SetParContainers",
"No runtime database");
133 fGeoPar = (CbmGeoStsPar*) db->getContainer(
"CbmGeoStsPar");
136 fDigiPar = (CbmStsDigiPar*) db->getContainer(
"CbmStsDigiPar");
145 cout <<
"---------------------------------------------" << endl;
146 cout <<
"-I- Initialising " << GetName() <<
" ...." << endl;
149 FairRootManager* ioman = FairRootManager::Instance();
150 if (!ioman) Fatal(
"Init",
"No FairRootManager");
151 fStsHits = (TClonesArray*) ioman->GetObject(
"StsHit");
153 cout <<
"-E- " << GetName() <<
"::Init: No StsHit array!" << endl;
157 fMvdHits = (TClonesArray*) ioman->GetObject(
"MvdHit");
159 cout <<
"-W- " << GetName() <<
"::Init: No MVD hits available!" << endl;
160 cout <<
" Running track finding without MVD hits" << endl;
165 fTracks =
new TClonesArray(
"CbmStsTrack", 100);
167 "StsTrack",
"STS",
fTracks, IsOutputBranchPersistent(
"StsTrack"));
184 cout <<
"-E- " << GetName() <<
"::Init: No track finder selected!" << endl;
187 cout <<
"-I- Track finder engine " <<
fFinder->GetName() <<
" selected"
201 cout <<
"-I- " << GetName() <<
" intialised " << endl;
202 cout <<
"---------------------------------------------" << endl;
215 cout <<
"============================================================"
217 cout <<
"===== " << GetName() <<
": Run summary " << endl;
218 cout <<
"===== " << endl;
219 cout <<
"===== Good events : " << setw(6) <<
fNEvents << endl;
220 cout <<
"===== Failed events : " << setw(6) <<
fNEventsFailed << endl;
221 cout <<
"===== Average time : " << setprecision(4) << setw(8) << right
223 cout <<
"===== " << endl;
224 cout <<
"===== Found tracks per event : " << fixed << setprecision(0)
226 cout <<
"============================================================"