CbmRoot
Loading...
Searching...
No Matches
CbmTaskTofHitFinder.cxx
Go to the documentation of this file.
1/* Copyright (C) 2022 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Dominik Smith [committer], Pierre-Alain Loizeau, Norbert Herrmann */
4
6
7// TOF Classes and includes
8#include "CbmTofAddress.h" // in cbmdata/tof
9#include "CbmTofCell.h" // in tof/TofData
10#include "CbmTofCreateDigiPar.h"
11#include "CbmTofDetectorId_v14a.h" // in cbmdata/tof
12#include "CbmTofDetectorId_v21a.h" // in cbmdata/tof
13#include "CbmTofDigi.h" // in cbmdata/tof
14#include "CbmTofDigiBdfPar.h" // in tof/TofParam
15#include "CbmTofDigiPar.h" // in tof/TofParam
16#include "CbmTofGeoHandler.h" // in tof/TofTools
17#include "CbmTofHit.h" // in cbmdata/tof
18
19// CBMroot classes and includes
20#include "CbmDigiManager.h"
21#include "CbmEvent.h"
22#include "CbmMatch.h"
23
24// FAIR classes and includes
25#include "FairEventHeader.h" // from CbmStsDigitize, for GetEventInfo
26#include "FairMCEventHeader.h" // from CbmStsDigitize, for GetEventInfo
27#include "FairRootManager.h"
28#include "FairRunAna.h"
29#include "FairRunSim.h" // from CbmStsDigitize, for GetEventInfo
30#include "FairRuntimeDb.h"
31
32#include <Logger.h>
33
34// ROOT Classes and includes
35#include "TClonesArray.h"
36
37// C++ Classes and includes
38#include <iomanip>
39#include <iostream>
40
41using std::fixed;
42using std::left;
43using std::pair;
44using std::right;
45using std::setprecision;
46using std::setw;
47using std::stringstream;
48
52
53const int32_t numClWalkBinX = 20;
54// const double TTotMean = 2.E4;
55
56/************************************************************************************/
57CbmTaskTofHitFinder::CbmTaskTofHitFinder() : FairTask("CbmTaskTofHitFinder"), fGeoHandler(new CbmTofGeoHandler()) {}
58
59CbmTaskTofHitFinder::CbmTaskTofHitFinder(const char* name, int32_t verbose)
60 : FairTask(TString(name), verbose)
61 , fGeoHandler(new CbmTofGeoHandler())
62{
63}
64
69
71{
73 if (false == RegisterInputs()) return kFATAL;
74 if (false == RegisterOutputs()) return kFATAL;
75 if (false == InitParameters()) return kFATAL;
76 if (false == InitCalibParameter()) return kFATAL;
77 if (false == InitAlgos()) return kFATAL;
78 return kSUCCESS;
79}
80
82{
83 LOG(info) << " CbmTaskTofHitFinder => Get the digi parameters for tof";
84
85 // Get Base Container
86 FairRunAna* ana = FairRunAna::Instance();
87 FairRuntimeDb* rtdb = ana->GetRuntimeDb();
88
89 fDigiPar = (CbmTofDigiPar*) (rtdb->getContainer("CbmTofDigiPar"));
90 LOG(info) << " CbmTaskTofHitFinder::SetParContainers found " << fDigiPar->GetNrOfModules() << " cells ";
91
92 fDigiBdfPar = (CbmTofDigiBdfPar*) (rtdb->getContainer("CbmTofDigiBdfPar"));
93}
94
95void CbmTaskTofHitFinder::Exec(Option_t* /*option*/)
96{
97 // Start timer counter
98 fTimer.Start();
99
100 fTofHitsColl->Clear("C");
101 fTofDigiMatchColl->Delete();
102
103 fStart.Set();
104
105 // --- Local variables
107 int32_t nEvents = 0;
108 int32_t nDigis = 0;
109 int32_t nHits = 0;
110 CbmEvent* event = nullptr;
111 pair<int32_t, int32_t> result;
112
113 // --- Time-slice mode: process entire digi array
114 if (!fEvents) {
115 result = BuildClusters(nullptr);
116 nDigis = result.first;
117 nHits = result.second;
118 }
119
120 // --- Event-based mode: read and process event after event
121 else {
122 nEvents = fEvents->GetEntriesFast();
123 for (int32_t iEvent = 0; iEvent < nEvents; iEvent++) {
124 event = dynamic_cast<CbmEvent*>(fEvents->At(iEvent));
125 assert(event);
126 result = BuildClusters(event);
127 nDigis += result.first;
128 nHits += result.second;
129 } //# events
130 } //? event mode
131
132 fStop.Set();
133 fTimer.Stop();
134
135 // --- Timeslice log
136 stringstream logOut;
137 logOut << setw(20) << left << GetName() << " [";
138 logOut << fixed << setw(8) << setprecision(1) << right << fTimer.RealTime() * 1000. << " ms] ";
139 logOut << "TS " << fiNofTs;
140 if (fEvents) logOut << ", events " << nEvents;
141 logOut << ", digis " << nDigis << " / " << nDigisAll;
142 logOut << ", hits " << nHits;
143 LOG(info) << logOut.str();
144
145 // --- Update Counters
146 fiNofTs++;
147 fiNofEvents += nEvents;
148 fNofDigisAll += nDigisAll;
149 fNofDigisUsed += nDigis;
150 fdNofHitsTot += nHits;
151 fdTimeTot += fTimer.RealTime();
152}
153
155{
156 // Screen log
157 std::cout << std::endl;
158 LOG(info) << "=====================================";
159 LOG(info) << GetName() << ": Run summary";
160 LOG(info) << "Time slices : " << fiNofTs;
161 LOG(info) << "Digis / TS : " << fixed << setprecision(2) << fNofDigisAll / double(fiNofTs);
162 LOG(info) << "Hits / TS : " << fixed << setprecision(2) << fdNofHitsTot / double(fiNofTs);
163 LOG(info) << "Time / TS : " << fixed << setprecision(2) << 1000. * fdTimeTot / double(fiNofTs) << " ms";
164 if (fEvents) {
165 double unusedFrac = 100. * (1. - fNofDigisUsed / fNofDigisAll);
166 LOG(info) << "Digis outside events : " << fNofDigisAll - fNofDigisUsed << " = " << unusedFrac << " %";
167 LOG(info) << "Events : " << fiNofEvents;
168 LOG(info) << "Events / TS : " << fixed << setprecision(2) << double(fiNofEvents) / double(fiNofTs);
169 LOG(info) << "Digis / event : " << fixed << setprecision(2) << fNofDigisUsed / double(fiNofEvents);
170 LOG(info) << "Hits / event : " << fixed << setprecision(2) << fdNofHitsTot / double(fiNofEvents);
171 }
172 LOG(info) << "=====================================\n";
173}
174
175/************************************************************************************/
176// Functions common for all clusters approximations
178{
179 FairRootManager* fManager = FairRootManager::Instance();
180
181 // --- Check input branch (TofDigiExp). If not present, set task inactive.
183 LOG(error) << GetName() << ": No TofDigi input array present; "
184 << "task will be inactive.";
185 return kERROR;
186 }
187
188 // --- Look for event branch
189 fEvents = dynamic_cast<TClonesArray*>(fManager->GetObject("Event"));
190 if (fEvents)
191 LOG(info) << GetName() << ": Found Event branch; run event-based";
192 else {
193 fEvents = dynamic_cast<TClonesArray*>(fManager->GetObject("CbmEvent"));
194 if (fEvents)
195 LOG(info) << GetName() << ": Found CbmEvent branch; run event-based";
196 else
197 LOG(info) << GetName() << ": No event branch found; run time-based";
198 }
199 return true;
200}
201
203{
204 FairRootManager* rootMgr = FairRootManager::Instance();
205 fTofHitsColl = new TClonesArray("CbmTofHit");
206
207 // Flag check to control whether digis are written in output root file
208 rootMgr->Register("TofHit", "Tof", fTofHitsColl, IsOutputBranchPersistent("TofHit"));
209
210 fTofDigiMatchColl = new TClonesArray("CbmMatch", 100);
211 rootMgr->Register("TofHitDigiMatch", "Tof", fTofDigiMatchColl, IsOutputBranchPersistent("TofHitDigiMatch"));
212
213 return true;
214}
215
217{
218 if (fDigiBdfPar->UseExpandedDigi() == false) {
219 LOG(fatal) << " Compressed Digis not implemented ... ";
220 return false;
221 }
222
223 // Initialize the TOF GeoHandler
224 bool isSimulation = false;
225 int32_t iGeoVersion = fGeoHandler->Init(isSimulation);
226 LOG(info) << "CbmTaskTofHitFinder::InitParameters with GeoVersion " << iGeoVersion;
227
228 if (k14a > iGeoVersion) {
229 LOG(error) << "CbmTaskTofHitFinder::InitParameters => Only compatible "
230 "with geometries after v12b !!!";
231 return false;
232 }
233
234 if (nullptr != fTofId)
235 LOG(info) << "CbmTaskTofHitFinder::InitParameters with GeoVersion " << fGeoHandler->GetGeoVersion();
236 else {
237 switch (iGeoVersion) {
238 case k14a: fTofId = new CbmTofDetectorId_v14a(); break;
239 case k21a: fTofId = new CbmTofDetectorId_v21a(); break;
240 default: LOG(error) << "CbmTaskTofHitFinder::InitParameters => Invalid geometry!!!" << iGeoVersion; return false;
241 }
242 }
243
244 LOG(info) << "=> Get the digi parameters for tof";
245 FairRunAna* ana = FairRunAna::Instance();
246 FairRuntimeDb* rtdb = ana->GetRuntimeDb();
247
248 // create digitization parameters from geometry file
249 CbmTofCreateDigiPar* tofDigiPar = new CbmTofCreateDigiPar("TOF Digi Producer", "TOF task");
250 LOG(info) << "Create DigiPar ";
251 tofDigiPar->Init();
252
253 fDigiPar = (CbmTofDigiPar*) (rtdb->getContainer("CbmTofDigiPar"));
254 if (0 == fDigiPar) {
255 LOG(error) << "CbmTofSimpleClusterizer::InitParameters => Could not obtain "
256 "the CbmTofDigiPar ";
257 return false;
258 }
259 return true;
260}
261
262/************************************************************************************/
264{
265 // dimension and initialize calib parameter
266 int32_t iNbSmTypes = fDigiBdfPar->GetNbSmTypes();
267
268 fvCPSigPropSpeed.resize(iNbSmTypes);
269 for (int32_t iT = 0; iT < iNbSmTypes; iT++) {
270 int32_t iNbRpc = fDigiBdfPar->GetNbRpc(iT);
271 fvCPSigPropSpeed[iT].resize(iNbRpc);
272 for (int32_t iRpc = 0; iRpc < iNbRpc; iRpc++)
273 if (0.0 < fDigiBdfPar->GetSigVel(iT, 0, iRpc))
274 fvCPSigPropSpeed[iT][iRpc] = fDigiBdfPar->GetSigVel(iT, 0, iRpc);
275 else
277 }
278
279 // Other calibration constants can be set here. Currently set to default values
280 fvCPTOff.resize(iNbSmTypes);
281 fvCPTotGain.resize(iNbSmTypes);
282 fvCPWalk.resize(iNbSmTypes);
283 for (int32_t iSmType = 0; iSmType < iNbSmTypes; iSmType++) {
284 int32_t iNbSm = fDigiBdfPar->GetNbSm(iSmType);
285 int32_t iNbRpc = fDigiBdfPar->GetNbRpc(iSmType);
286 fvCPTOff[iSmType].resize(iNbSm * iNbRpc);
287 fvCPTotGain[iSmType].resize(iNbSm * iNbRpc);
288 fvCPWalk[iSmType].resize(iNbSm * iNbRpc);
289 for (int32_t iSm = 0; iSm < iNbSm; iSm++) {
290 for (int32_t iRpc = 0; iRpc < iNbRpc; iRpc++) {
291 int32_t iNbChan = fDigiBdfPar->GetNbChan(iSmType, iRpc);
292 fvCPTOff[iSmType][iSm * iNbRpc + iRpc].resize(iNbChan);
293 fvCPTotGain[iSmType][iSm * iNbRpc + iRpc].resize(iNbChan);
294 fvCPWalk[iSmType][iSm * iNbRpc + iRpc].resize(iNbChan);
295 int32_t nbSide = 2 - fDigiBdfPar->GetChanType(iSmType, iRpc);
296 for (int32_t iCh = 0; iCh < iNbChan; iCh++) {
297 fvCPTOff[iSmType][iSm * iNbRpc + iRpc][iCh].resize(nbSide);
298 fvCPTotGain[iSmType][iSm * iNbRpc + iRpc][iCh].resize(nbSide);
299 fvCPWalk[iSmType][iSm * iNbRpc + iRpc][iCh].resize(nbSide);
300 for (int32_t iSide = 0; iSide < nbSide; iSide++) {
301 fvCPTOff[iSmType][iSm * iNbRpc + iRpc][iCh][iSide] = 0.;
302 fvCPTotGain[iSmType][iSm * iNbRpc + iRpc][iCh][iSide] = 1.;
303 fvCPWalk[iSmType][iSm * iNbRpc + iRpc][iCh][iSide].resize(numClWalkBinX);
304 for (int32_t iWx = 0; iWx < numClWalkBinX; iWx++) {
305 fvCPWalk[iSmType][iSm * iNbRpc + iRpc][iCh][iSide][iWx] = 0.;
306 }
307 }
308 }
309 }
310 }
311 }
312 LOG(info) << "CbmTaskTofHitFinder::InitCalibParameter: defaults set";
313 LOG(info) << "CbmTaskTofHitFinder::InitCalibParameter: initialization done";
314 return true;
315}
316
318{
320 gGeoManager->CdTop();
321
322 //Prepare storage vectors
323 int32_t iNbSmTypes = fDigiBdfPar->GetNbSmTypes();
324 fStorDigiExp.resize(iNbSmTypes);
325 fStorDigiInd.resize(iNbSmTypes);
326
327 for (int32_t iSmType = 0; iSmType < iNbSmTypes; iSmType++) {
328 int32_t iNbSm = fDigiBdfPar->GetNbSm(iSmType);
329 int32_t iNbRpc = fDigiBdfPar->GetNbRpc(iSmType);
330 fStorDigiExp[iSmType].resize(iNbSm * iNbRpc);
331 fStorDigiInd[iSmType].resize(iNbSm * iNbRpc);
332 }
333
334 // Create one algorithm per RPC and configure it with parameters
335 for (int32_t iSmType = 0; iSmType < iNbSmTypes; iSmType++) {
336 int32_t iNbSm = fDigiBdfPar->GetNbSm(iSmType);
337 int32_t iNbRpc = fDigiBdfPar->GetNbRpc(iSmType);
338 for (int32_t iSm = 0; iSm < iNbSm; iSm++) {
339 for (int32_t iRpc = 0; iRpc < iNbRpc; iRpc++) {
340 std::unique_ptr<HitFinderRpcPar> par(new HitFinderRpcPar());
341 par->FeeTimeRes = fDigiBdfPar->GetFeeTimeRes();
342 par->SysTimeRes = 0.080;
343 par->CPSigPropSpeed = fvCPSigPropSpeed[iSmType][iRpc];
344 par->outTimeFactor = 1.0;
345 par->numClWalkBinX = numClWalkBinX;
346 par->TOTMax = 5.E4;
347 par->TOTMin = 2.E4;
348 par->maxTimeDist = fDigiBdfPar->GetMaxTimeDist();
349 par->maxSpaceDist = fDigiBdfPar->GetMaxDistAlongCh();
350 par->numGaps = fDigiBdfPar->GetNbGaps(iSmType, iRpc);
351 par->gapSize = fDigiBdfPar->GetGapSize(iSmType, iRpc);
352 int32_t iNbChan = fDigiBdfPar->GetNbChan(iSmType, iRpc);
353 par->fChanPar.resize(iNbChan);
354 for (int32_t iCh = 0; iCh < iNbChan; iCh++) {
355
356 //get channel info from iSmType, iSm, iRpc, iCh
357 CbmTofDetectorInfo xDetInfo(ECbmModuleId::kTof, iSmType, iSm, iRpc, 0, iCh);
358 const int32_t iChId = fTofId->SetDetectorInfo(xDetInfo);
359 CbmTofCell* channelInfo = fDigiPar->GetCell(iChId);
360
361 //init Tof cell
362 Cell& cell = par->fChanPar[iCh].cell;
363 cell.pos.SetX(channelInfo->GetX());
364 cell.pos.SetY(channelInfo->GetY());
365 cell.pos.SetZ(channelInfo->GetZ());
366 cell.sizeX = channelInfo->GetSizex();
367 cell.sizeY = channelInfo->GetSizey();
368
369 // prepare local->global trafo
370 gGeoManager->FindNode(channelInfo->GetX(), channelInfo->GetY(), channelInfo->GetZ());
371 double* rot_ptr = gGeoManager->GetCurrentMatrix()->GetRotationMatrix();
372 cell.rotation = ROOT::Math::Rotation3D(&rot_ptr[0], &rot_ptr[9]);
373
374 par->fChanPar[iCh].fvCPTOff = std::move(fvCPTOff[iSmType][iSm * iNbRpc + iRpc][iCh]);
375 par->fChanPar[iCh].fvCPTotGain = std::move(fvCPTotGain[iSmType][iSm * iNbRpc + iRpc][iCh]);
376 par->fChanPar[iCh].fvCPWalk = std::move(fvCPWalk[iSmType][iSm * iNbRpc + iRpc][iCh]);
377 par->fChanPar[iCh].address = CbmTofAddress::GetUniqueAddress(iSm, iRpc, iCh, 0, iSmType);
378 }
379 fAlgo[iSmType][iSm * iNbRpc + iRpc].SetParams(std::move(par));
380 }
381 }
382 }
383 return true;
384}
385
386pair<int32_t, int32_t> CbmTaskTofHitFinder::BuildClusters(CbmEvent* event)
387{
388 // --- MC Event info (input file, entry number, start time)
389 int32_t iInputNr = 0;
390 int32_t iEventNr = 0;
391 double dEventTime = 0.;
392 GetEventInfo(iInputNr, iEventNr, dEventTime);
393
394 // Local variables
395 int32_t nDigis = 0;
396 int32_t nHits = 0;
397
398 nDigis = (event ? event->GetNofData(ECbmDataType::kTofDigi) : fDigiMan->GetNofDigis(ECbmModuleId::kTof));
399 LOG(debug) << "Number of TOF digis: " << nDigis;
400
401 // Loop over the digis array and store the Digis in separate vectors for each RPC modules
402 for (int32_t iDigi = 0; iDigi < nDigis; iDigi++) {
403 const uint32_t digiIndex = (event ? event->GetIndex(ECbmDataType::kTofDigi, iDigi) : iDigi);
404 const CbmTofDigi* pDigi = fDigiMan->Get<CbmTofDigi>(digiIndex);
405 assert(pDigi);
406
407 // These are doubles in the digi class
408 const int32_t smType = CbmTofAddress::GetSmType(pDigi->GetAddress());
409 const int32_t smId = CbmTofAddress::GetSmId(pDigi->GetAddress());
410 const int32_t rpcId = CbmTofAddress::GetRpcId(pDigi->GetAddress());
411 const int32_t numRpc = fDigiBdfPar->GetNbRpc(smType);
412 fStorDigiExp[smType][smId * numRpc + rpcId].push_back(*pDigi);
413 fStorDigiInd[smType][smId * numRpc + rpcId].push_back(digiIndex);
414 }
415
416 const uint32_t iNbSmTypes = fDigiBdfPar->GetNbSmTypes();
417
418 for (uint32_t iSmType = 0; iSmType < iNbSmTypes; iSmType++) {
419 const uint32_t iNbSm = fDigiBdfPar->GetNbSm(iSmType);
420 const uint32_t iNbRpc = fDigiBdfPar->GetNbRpc(iSmType);
421 for (uint32_t iSm = 0; iSm < iNbSm; iSm++) {
422 for (uint32_t iRpc = 0; iRpc < iNbRpc; iRpc++) {
423 //read digis
424 const uint32_t rpcIdx = iSm * iNbRpc + iRpc;
425 std::vector<CbmTofDigi>& digiExp = fStorDigiExp[iSmType][rpcIdx];
426 std::vector<int32_t>& digiInd = fStorDigiInd[iSmType][rpcIdx];
427
428 //call cluster finder
429 std::vector<Cluster> clusters = fAlgo[iSmType][rpcIdx](digiExp, digiInd);
430
431 //Store hits and match
432 for (auto const& cluster : clusters) {
433 const int32_t hitIndex = fTofHitsColl->GetEntriesFast();
434 TVector3 hitpos = TVector3(cluster.globalPos.X(), cluster.globalPos.Y(), cluster.globalPos.Z());
435 TVector3 hiterr = TVector3(cluster.globalErr.X(), cluster.globalErr.Y(), cluster.globalErr.Z());
436 new ((*fTofHitsColl)[hitIndex])
437 CbmTofHit(cluster.detId, hitpos, hiterr, nHits, cluster.weightedTime, cluster.weightedTimeErr, 0, 0);
438 nHits++;
439 if (event) event->AddData(ECbmDataType::kTofHit, hitIndex);
440
441 CbmMatch* digiMatch = new ((*fTofDigiMatchColl)[hitIndex]) CbmMatch();
442 for (uint32_t i = 0; i < cluster.vDigiIndRef.size(); i++) {
443 digiMatch->AddLink(CbmLink(0., cluster.vDigiIndRef.at(i), iEventNr, iInputNr));
444 }
445 }
446 digiExp.clear();
447 digiInd.clear();
448 }
449 }
450 }
451
452 return std::make_pair(nDigis, nHits);
453}
454
455void CbmTaskTofHitFinder::GetEventInfo(int32_t& inputNr, int32_t& eventNr, double& eventTime)
456{
457 // --- In a FairRunAna, take the information from FairEventHeader
458 if (FairRunAna::Instance()) {
459 FairEventHeader* event = FairRunAna::Instance()->GetEventHeader();
460 inputNr = event->GetInputFileId();
461 eventNr = event->GetMCEntryNumber();
462 eventTime = event->GetEventTime();
463 }
464
465 // --- In a FairRunSim, the input number and event time are always zero;
466 // --- only the event number is retrieved.
467 else {
468 if (!FairRunSim::Instance()) LOG(fatal) << GetName() << ": neither SIM nor ANA run.";
469 FairMCEventHeader* event = FairRunSim::Instance()->GetMCEventHeader();
470 inputNr = 0;
471 eventNr = event->GetEventID();
472 eventTime = 0.;
473 }
474}
475
ClassImp(CbmConverterManager)
@ kTof
Time-of-flight Detector.
static FairRootManager * rootMgr
const int32_t numClWalkBinX
@ k21a
@ k14a
static Int_t GetNofDigis(ECbmModuleId systemId)
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,...
Definition CbmEvent.h:34
void AddLink(const CbmLink &newLink)
Definition CbmMatch.cxx:47
Simple Cluster building and hit producing for CBM ToF using Digis as input.
bool InitCalibParameter()
Initialize other parameters not included in parameter classes.
CbmTofDigiBdfPar * fDigiBdfPar
bool InitAlgos()
Create one algo object for each RPC.
std::vector< std::vector< std::vector< std::vector< double > > > > fvCPTotGain
std::vector< std::vector< std::vector< CbmTofDigi > > > fStorDigiExp
CbmDigiManager * fDigiMan
double fNofDigisAll
Total number of TOF digis in input.
TStopwatch fTimer
ROOT timer.
bool RegisterInputs()
Recover pointer on input TClonesArray: TofPoints, TofDigis...
bool RegisterOutputs()
Create and register output TClonesArray of Tof Hits.
std::vector< std::vector< std::vector< int32_t > > > fStorDigiInd
double fdNofHitsTot
Total number of hits produced.
virtual void Finish()
Inherited from FairTask.
bool InitParameters()
Initialize other parameters not included in parameter classes.
std::vector< std::vector< std::vector< std::vector< std::vector< double > > > > > fvCPWalk
double fNofDigisUsed
Total number of Tof Digis processed.
void GetEventInfo(int32_t &inputNr, int32_t &eventNr, double &eventTime)
Retrieve event info from run manager to properly fill the CbmLink objects.
int32_t fiNofTs
Number of processed timeslices.
int32_t fiNofEvents
Total number of events processed.
CbmTaskTofHitFinder()
Constructor.
virtual InitStatus Init()
Inherited from FairTask.
std::map< uint32_t, std::map< uint32_t, cbm::algo::tof::HitFinder > > fAlgo
TClonesArray * fTofDigiMatchColl
std::vector< std::vector< double > > fvCPSigPropSpeed
std::vector< std::vector< std::vector< std::vector< double > > > > fvCPTOff
double fdTimeTot
Total execution time.
virtual void SetParContainers()
Inherited from FairTask.
std::pair< int32_t, int32_t > BuildClusters(CbmEvent *event)
Build clusters out of ToF Digis and store the resulting info in a TofHit.
virtual ~CbmTaskTofHitFinder()
Destructor.
virtual void Exec(Option_t *option)
Inherited from FairTask.
CbmTofDetectorId * fTofId
CbmTofGeoHandler * fGeoHandler
static uint32_t GetUniqueAddress(uint32_t Sm, uint32_t Rpc, uint32_t Channel, uint32_t Side=0, uint32_t SmType=0, uint32_t RpcType=0)
static int32_t GetSmId(uint32_t address)
static int32_t GetRpcId(uint32_t address)
static int32_t GetSmType(uint32_t address)
Double_t GetSizey() const
Definition CbmTofCell.h:40
Double_t GetY() const
Definition CbmTofCell.h:36
Double_t GetSizex() const
Definition CbmTofCell.h:39
Double_t GetX() const
Definition CbmTofCell.h:35
Double_t GetZ() const
Definition CbmTofCell.h:37
virtual InitStatus Init()
virtual int32_t SetDetectorInfo(const CbmTofDetectorInfo detectorInfo)=0
Parameters class for the CBM ToF digitizer using beam data distributions.
Double_t GetFeeTimeRes() const
Int_t GetNbSmTypes() const
Double_t GetGapSize(Int_t iSmType, Int_t iRpc) const
Int_t GetNbSm(Int_t iSmType) const
Double_t GetMaxDistAlongCh() const
Int_t GetNbChan(Int_t iSmType, Int_t iRpc) const
Int_t GetNbGaps(Int_t iSmType, Int_t iRpc) const
Int_t GetChanType(Int_t iSmType, Int_t iRpc) const
Int_t GetNbRpc(Int_t iSmType) const
Bool_t UseExpandedDigi() const
Double_t GetMaxTimeDist() const
Double_t GetSignalSpeed() const
Double_t GetSigVel(Int_t iSmType, Int_t iSm, Int_t iRpc) const
CbmTofCell * GetCell(Int_t i)
Int_t GetNrOfModules()
Data class for expanded digital TOF information.
Definition CbmTofDigi.h:47
int32_t GetAddress() const
Inherited from CbmDigi.
Definition CbmTofDigi.h:112
Int_t Init(Bool_t isSimulation=kFALSE)
ROOT::Math::Rotation3D rotation
ROOT::Math::XYZVector pos