19#include "FairModule.h"
20#include "FairRootManager.h"
23#include "TClonesArray.h"
33using std::setprecision;
38 : FairTask(
"MVDHitfinder")
40 , fInputDigis(nullptr)
41 , fInputCluster(nullptr)
43 , fHitfinderPluginNr(0)
44 , useClusterfinder(kFALSE)
45 , fShowDebugHistos(kFALSE)
54 : FairTask(name, iVerbose)
56 , fInputDigis(nullptr)
57 , fInputCluster(nullptr)
59 , fHitfinderPluginNr(0)
60 , useClusterfinder(kFALSE)
61 , fShowDebugHistos(kFALSE)
70 : FairTask(name, iVerbose)
72 , fInputDigis(nullptr)
73 , fInputCluster(nullptr)
75 , fHitfinderPluginNr(0)
76 , useClusterfinder(kFALSE)
77 , fShowDebugHistos(kFALSE)
105 LOG(debug) << endl <<
"//----------------------------------------//";
109 LOG(debug) <<
"End Chain";
110 LOG(debug) <<
"Start writing Hits";
112 LOG(debug) <<
"Total of " <<
fHits->GetEntriesFast() <<
" hits found";
113 LOG(debug) <<
"Finished writing Hits";
114 LOG(debug) <<
"//----------------------------------------//";
115 LOG(info) <<
"+ " << setw(20) << GetName() <<
": Created: " <<
fHits->GetEntriesFast() <<
" hits in " << fixed
116 << setprecision(6) <<
fTimer.RealTime() <<
" s";
127 LOG(info) << GetName() <<
": Initialisation...";
130 FairRootManager* ioman = FairRootManager::Instance();
132 LOG(error) << GetName() <<
"::Init: No FairRootManager!";
138 fInputCluster = (TClonesArray*) ioman->GetObject(
"MvdCluster");
140 LOG(error) <<
"No MvdCluster branch found. There was no MVD in the "
141 "simulation. Switch this task off";
146 fHits =
new TClonesArray(
"CbmMvdHit", 10000);
147 ioman->Register(
"MvdHit",
"Mvd Hits",
fHits, IsOutputBranchPersistent(
"MvdHit"));
156 for (
auto itr = sensorMap.begin(); itr != sensorMap.end(); itr++) {
159 itr->second->AddPlugin(hitfinderTask);
160 itr->second->SetHitPlugin(plugincount);
170 LOG(info) << GetName() <<
" initialised with parameters: ";
201 std::stringstream ss;
202 ss.setf(std::ios_base::fixed, std::ios_base::floatfield);
203 ss <<
"============================================================" << endl;
204 ss <<
"============== Parameters MvdHitfinder =====================" << endl;
205 ss <<
"============================================================" << endl;
206 ss <<
"=============== End Task ===================================" << endl;
Helper class to extract information from the GeoManager. Addapted from TrdGeoHandler byFlorian Uhlig ...
ClassImp(CbmMvdHitfinderTB)
std::map< int, CbmMvdSensor * > & GetSensorMap()
Int_t GetPluginArraySize()
static CbmMvdDetector * Instance()
void SetSensorArrayFilled(Bool_t value=kTRUE)
void SetPluginCount(UInt_t count)
UInt_t fHitfinderPluginNr
TStopwatch fTimer
ROOT timer.
virtual ~CbmMvdHitfinderTB()
CbmMvdDetector * fDetector
std::string ParametersToString() const
TClonesArray * fInputCluster
virtual InitStatus Init()
void PrintParameters() const
virtual InitStatus ReInit()