20#include "FairModule.h"
21#include "FairRootManager.h"
25#include "TClonesArray.h"
26#include "TGeoManager.h"
37using std::setprecision;
46 : FairTask(name, iVerbose)
48 , fShowDebugHistos(kFALSE)
52 , fEventDigis(nullptr)
55 , fBranchName(
"MvdDigi")
80 Int_t nEvents =
fEvents->GetEntriesFast();
81 for (Int_t iEv = 0; iEv < nEvents; ++iEv) {
82 LOG(debug) <<
"Getting data from CbmEvent";
86 for (Int_t nDigi = 0; nDigi < nrOfDigis; ++nDigi) {
91 LOG(debug) <<
"//----------------------------------------//";
92 LOG(debug) << endl <<
"Send Input";
96 LOG(debug) <<
"End Chain";
97 LOG(debug) <<
"Start writing Cluster";
99 LOG(debug) <<
"Total of " <<
fCluster->GetEntriesFast() <<
" Cluster in this Event";
100 LOG(debug) <<
"//----------------------------------------//";
101 LOG(info) <<
"+ " << setw(20) << GetName() <<
": Created: " <<
fCluster->GetEntriesFast() <<
" cluster in " << fixed
102 << setprecision(6) <<
fTimer.RealTime() <<
" s";
111 LOG(info) << GetName() <<
": Initialisation...";
114 FairRootManager* ioman = FairRootManager::Instance();
116 LOG(error) << GetName() <<
"::Init: No FairRootManager!";
121 fEvents =
dynamic_cast<TClonesArray*
>(ioman->GetObject(
"CbmEvent"));
126 fEventDigis =
new TClonesArray(
"CbmMvdDigi", 10000);
128 LOG(error) <<
"No MvdDigi branch found. There was no MVD in the "
129 "simulation. Switch this task off";
134 fCluster =
new TClonesArray(
"CbmMvdCluster", 10000);
135 ioman->Register(
"MvdCluster",
"Mvd Clusters",
fCluster, IsOutputBranchPersistent(
"MvdCluster"));
140 LOG(debug) <<
"-I- succesfully loaded Geometry from file -I-";
143 LOG(fatal) <<
"Geometry couldn't be loaded from file. No MVD digitizer available.";
150 for (
auto itr = sensorMap.begin(); itr != sensorMap.end(); itr++) {
153 itr->second->AddPlugin(clusterTask);
154 itr->second->SetClusterPlugin(plugincount);
164 LOG(info) << GetName() <<
" initialised";
197 std::stringstream ss;
198 ss <<
"============================================================" << endl;
199 ss <<
"============== Parameters Clusterfinder ====================" << endl;
200 ss <<
"============================================================" << endl;
201 ss <<
"=============== End Task ===================================" << endl;
@ kMvd
Micro-Vertex Detector.
ClassImp(CbmMvdClusterfinderTB)
Helper class to extract information from the GeoManager. Addapted from TrdGeoHandler byFlorian Uhlig ...
CbmDigiManager * fDigiMan
static Bool_t IsPresent(ECbmModuleId systemId)
Presence of a digi branch.
InitStatus Init()
Initialisation.
const Digi * Get(Int_t index) const
Get a digi object.
static CbmDigiManager * Instance()
Static instance.
Class characterising one event by a collection of links (indices) to data objects,...
size_t GetNofData() const
void PrintParameters() const
CbmMvdDetector * fDetector
virtual InitStatus ReInit()
TClonesArray * fEventDigis
virtual InitStatus Init()
TStopwatch fTimer
ROOT timer.
std::string ParametersToString() const
CbmDigiManager * fDigiMan
std::map< int, CbmMvdSensor * > & GetSensorMap()
Int_t GetPluginArraySize()
static CbmMvdDetector * Instance()
void SetSensorArrayFilled(Bool_t value=kTRUE)
void SetPluginCount(UInt_t count)
Int_t GetSensorArraySize()