9#include <FairRootManager.h>
10#include <FairRunAna.h>
11#include <FairRuntimeDb.h>
18#include <TStopwatch.h>
28using std::setprecision;
30using std::stringstream;
60 fClusters =
new std::vector<CbmTrdCluster>();
61 FairRootManager* ioman = FairRootManager::Instance();
62 ioman->RegisterAny(
"TrdCluster",
fClusters,
true);
64 fHits =
new std::vector<CbmTrdHit>();
65 ioman->RegisterAny(
"TrdHit",
fHits,
true);
68 fAlgo = std::make_unique<cbm::algo::trd::Hitfind>(
84 std::vector<CbmTrdDigi> digiVec;
91 auto [
hits, monitor] = (*fAlgo)(digiVec);
98 logOut << setw(20) << left << GetName() <<
" [";
99 logOut << fixed << setw(8) << setprecision(1) << right << timerTs.RealTime() * 1000. <<
" ms] ";
100 logOut <<
"TS " <<
fNrTs;
101 LOG(info) << logOut.str();
108 for (
auto& hit :
hits) {
109 TVector3
pos(hit.X(), hit.Y(), hit.Z());
110 TVector3
dpos(hit.Dx(), hit.Dy(), hit.Dz());
113 fHits->emplace_back(hit.Address(),
pos,
dpos, hit.Dxy(), hit.GetRefId(), hit.GetELoss(), hit.Time(),
126 std::cout << std::endl;
127 LOG(info) <<
"=====================================";
128 LOG(info) << GetName() <<
": Finish run";
129 LOG(info) << GetName() <<
": Run summary ";
130 LOG(info) << GetName() <<
": Processing time : " << std::fixed << std::setprecision(3) <<
fProcessTime;
131 LOG(info) << GetName() <<
": Nr of events : " <<
fNrEvents;
132 LOG(info) << GetName() <<
": Nr of input digis : " <<
fNrDigis;
133 LOG(info) << GetName() <<
": Nr of produced clusters : " <<
fNrClusters;
134 LOG(info) << GetName() <<
": Nr of clusters / event : " << std::fixed << std::setprecision(2)
136 LOG(info) << GetName() <<
": Nr of digis / cluster : " << std::fixed << std::setprecision(2)
138 LOG(info) <<
"=====================================";
140 LOG(info) << GetName() <<
": Nr of events : " <<
fNrEvents;
141 LOG(info) << GetName() <<
": Nr of input clusters : " <<
fNrClusters;
142 LOG(info) << GetName() <<
": Nr of produced hits : " <<
fNrHits;
143 LOG(info) << GetName() <<
": Nr of hits / event : " << std::fixed << std::setprecision(2)
145 LOG(info) << GetName() <<
": Nr of hits / clusters: " << std::fixed << std::setprecision(2)
147 LOG(info) <<
"=====================================";
148 std::cout << std::endl;
ClassImp(CbmConverterManager)
@ kTrd
Transition Radiation Detector.
static vector< vector< QAHit > > hits
static Int_t GetNofDigis(ECbmModuleId systemId)
InitStatus Init()
Initialisation.
const Digi * Get(Int_t index) const
Get a digi object.
static CbmDigiManager * Instance()
Static instance.
UInt_t fNrClusters
Number of produced clusters.
virtual void SetParContainers()
std::vector< CbmTrdHit > * fHits
Output array of CbmTrdHit.
~CbmTaskTrdHitFinder()
Default destructor.
std::unique_ptr< cbm::algo::trd::Hitfind > fAlgo
Hit finding algorithm.
virtual InitStatus Init()
std::vector< CbmTrdCluster > * fClusters
void AddHits(gsl::span< cbm::algo::trd::Hit > hits)
CbmTaskTrdHitFinder()
Default constructor.
Float_t fProcessTime
Total processing time [RealTime].
virtual void Exec(Option_t *option)
Executed task.
UInt_t fNrHits
Number of produced hits.
UInt_t fNrEvents
Number of processed events (without CbmEvent corresponds to nr of exec calls)
UInt_t fNrTs
Number of processed time slices.
UInt_t fNrDigis
Number of digis as input for the hit production.
data class for a reconstructed Energy-4D measurement in the TRD
void SetClassType(bool set=true)
Type of pad layout used in reconstruction R[0], T[1].
void SetOverFlow(bool set=true)
Mark overflow in one or more digits which define the hit.
void SetMaxType(bool set=true)
Extra bool definition for the hit (e.g. the type of maximum for triangular pads).
void SetRowCross(bool set=true)
Mark hit reconstructed between pad rows.
T ReadFromFile(fs::path path)