CbmRoot
Loading...
Searching...
No Matches
CbmLitFindGlobalTracks.cxx
Go to the documentation of this file.
1/* Copyright (C) 2009-2021 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer], Volker Friese */
4
12
13#include "CbmGlobalTrack.h"
14#include "CbmHit.h"
16#include "CbmMuchTrack.h"
17#include "CbmPixelHit.h"
18#include "CbmStripHit.h"
19#include "CbmStsHit.h"
20#include "CbmStsTrack.h"
21#include "CbmTofTrack.h"
22#include "CbmTrdTrack.h"
23#include "FairRootManager.h"
24#include "TClonesArray.h"
27#include "data/CbmLitHit.h"
28#include "data/CbmLitPixelHit.h"
29#include "data/CbmLitStripHit.h"
30#include "data/CbmLitTrack.h"
34
35#include <cmath>
36#include <iomanip>
37#include <iostream>
38
39using std::cout;
40using std::endl;
41using std::fixed;
42using std::left;
43using std::pair;
44using std::right;
45using std::setprecision;
46using std::setw;
47using std::stringstream;
48
50 : FairTask("LitFindGlobalTracks")
51 , fDet()
52 ,
53
54 fStsTracks(NULL)
55 , fMvdHits(NULL)
56 , fStsHits(NULL)
57 , fMuchPixelHits(NULL)
58 , fMuchTracks(NULL)
59 , fTrdHits(NULL)
60 , fTrdTracks(NULL)
61 , fTofHits(NULL)
62 , fEvents(NULL)
63 , fTofTracks(NULL)
64 , fGlobalTracks(NULL)
65 , fPrimVertex(NULL)
66 ,
67
68 fLitStsTracks()
69 , fLitHits()
70 , fLitTofHits()
71 , fLitOutputTracks()
72 , fLitOutputTofTracks()
73 ,
74
75 fFinder()
76 , fMerger()
77 , fFitter()
78 , fPropagator()
79 ,
80
81 fTrackingType("branch")
82 , fMergerType("nearest_hit")
83 , fFitterType("lit_kalman")
84 ,
85
86 fTrackingWatch()
87 , fMergerWatch()
88 ,
89
90 fEventNo(0)
91{
92}
93
95
97{
98 std::cout << std::endl;
99 LOG(info) << "=========================================";
100 LOG(info) << GetName() << ": Initializing ";
102 LOG(info) << fDet.ToString();
103
106
108
109 fTrackingWatch.Reset();
110 fMergerWatch.Reset();
111
112 LOG(info) << "=========================================";
113 std::cout << std::endl;
114 return kSUCCESS;
115}
116
118{
119
120 UInt_t nEvents = 0;
121 UInt_t nStsTracks = 0;
122 UInt_t nMuchHits = 0;
123 UInt_t nTrdHits = 0;
124 UInt_t nTofHits = 0;
125 UInt_t nGlbTracks = 0;
126
127 if (fStsTracks) nStsTracks = fStsTracks->GetEntriesFast();
128 if (fMuchPixelHits) nMuchHits = fMuchPixelHits->GetEntriesFast();
129 if (fTrdHits) nTrdHits = fTrdHits->GetEntriesFast();
130 if (fTofHits) nTofHits = fTofHits->GetEntriesFast();
131
132 TStopwatch timer;
133 timer.Start();
134
135 if (fTrdTracks != NULL) fTrdTracks->Delete();
136 if (fMuchTracks != NULL) fMuchTracks->Delete();
137 if (fTofTracks != NULL) fTofTracks->Delete();
138 fGlobalTracks->Clear();
139
140 if (fEvents) {
141 nEvents = fEvents->GetEntriesFast();
142 LOG(debug) << GetName() << ": reading time slice with " << nEvents << " events ";
143
144 for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
145 CbmEvent* event = static_cast<CbmEvent*>(fEvents->At(iEvent));
146 ConvertInputData(event);
148 ConvertOutputData(event);
149 CalculateLength(event);
151 ClearArrays();
152 LOG(debug) << "CbmLitFindGlobalTracks::Exec event: " << event->GetNumber();
153 } //# events
154 } //? event branch present
155 else { // Old event-by-event simulation without event branch
161 ClearArrays();
162 LOG(debug) << "CbmLitFindGlobalTracks::Exec timeslice: " << fEventNo++;
163 }
164
165 // --- Timeslice log and statistics
166 timer.Stop();
167 nGlbTracks = fGlobalTracks->GetEntriesFast();
168 timer.Stop();
169 stringstream logOut;
170 logOut << setw(20) << left << GetName() << " [";
171 logOut << fixed << setw(8) << setprecision(1) << right << timer.RealTime() * 1000. << " ms] ";
172 logOut << "TS " << fNofTs;
173 if (fEvents) logOut << ", events " << nEvents;
174 logOut << ", STS tracks " << nStsTracks << ", Hits MUCH " << nMuchHits << " TRD " << nTrdHits;
175 logOut << " TOF " << nTofHits << ", global tracks " << nGlbTracks;
176 LOG(info) << logOut.str();
177 fNofTs++;
178 fNofEvents += nEvents;
179 fNofStsTracks += nStsTracks;
180 fNofMuchHits += nMuchHits;
181 fNofTrdHits += nTrdHits;
183 fNofGlbTracks += nGlbTracks;
184 fTime += timer.RealTime();
185}
186
187
189
191{
192
193 std::cout << std::endl;
194 LOG(info) << "=====================================";
195 LOG(info) << GetName() << ": Run summary";
196 LOG(info) << "Time slices : " << fNofTs;
197 LOG(info) << "STS tracks / TS : " << fixed << setprecision(2) << Double_t(fNofStsTracks) / Double_t(fNofTs);
198 LOG(info) << "MUCH hits / TS : " << fixed << setprecision(2) << Double_t(fNofMuchHits) / Double_t(fNofTs);
199 LOG(info) << "TRD hits / TS : " << fixed << setprecision(2) << Double_t(fNofTrdHits) / Double_t(fNofTs);
200 LOG(info) << "TOF hits / TS : " << fixed << setprecision(2) << Double_t(fNofTofHits) / Double_t(fNofTs);
201 LOG(info) << "Global tracks / TS : " << fixed << setprecision(2) << Double_t(fNofGlbTracks) / Double_t(fNofTs);
202 ;
203 LOG(info) << "Time per TS : " << 1000. * fTime / Double_t(fNofTs) << " ms ";
204 if (fEvents) {
205 LOG(info) << "Events processed : " << fNofEvents;
206 LOG(info) << "Global tracks / evt : " << Double_t(fNofGlbTracks) / Double_t(fNofEvents);
207 }
209 LOG(info) << "=====================================";
210}
211
212
214{
215 FairRootManager* ioman = FairRootManager::Instance();
216 assert(ioman);
217
218 // --- MVD hits
220 fMvdHits = dynamic_cast<TClonesArray*>(ioman->GetObject("MvdHit"));
221 if (!fMvdHits) {
222 LOG(warn) << GetName() << ": No MvdHit branch!";
224 }
225 else
226 LOG(info) << GetName() << ": Found MvdHit branch";
227 } //? MVD in geometry
228
229 // --- STS hits
230 fStsHits = dynamic_cast<TClonesArray*>(ioman->GetObject("StsHit"));
231 if (!fStsHits) {
232 LOG(fatal) << GetName() << ": No StsHit branch!";
234 }
235 else
236 LOG(info) << GetName() << ": Found StsHit branch";
237
238 // --- STS tracks
239 fStsTracks = dynamic_cast<TClonesArray*>(ioman->GetObject("StsTrack"));
240 if (!fStsTracks) {
241 LOG(fatal) << GetName() << ": No StsTrack branch!";
243 }
244 else
245 LOG(info) << GetName() << ": Found StsTrack branch";
246
247 // --- MUCH hits
249 fMuchPixelHits = dynamic_cast<TClonesArray*>(ioman->GetObject("MuchPixelHit"));
250 if (!fMuchPixelHits) {
251 LOG(warning) << GetName() << "No MuchPixelHit branch!";
253 }
254 else {
255 if (fMuchPixelHits) LOG(info) << GetName() << ": Found MuchPixelHit branch";
256 }
257 } //? MUCH in geometry
258
259 // --- TRD hits
261 fTrdHits = dynamic_cast<TClonesArray*>(ioman->GetObject("TrdHit"));
262 if (NULL == fTrdHits) {
263 LOG(warning) << GetName() << ": No TrdHit branch!";
265 }
266 LOG(info) << GetName() << ": Found TrdHit branch";
267 } //? TRD in geometry
268
269 // --- TOF hits
271 fTofHits = dynamic_cast<TClonesArray*>(ioman->GetObject("TofHit"));
272 if (NULL == fTofHits) {
273 LOG(warning) << GetName() << ": No TofHit branch!";
275 }
276 else
277 LOG(info) << GetName() << ": Found TofHit branch";
278 } //? TOF in geometry
279
280 // --- Events
281 fEvents = dynamic_cast<TClonesArray*>(ioman->GetObject("CbmEvent"));
282 if (fEvents)
283 LOG(info) << GetName() << ": Found Event branch";
284 else
285 LOG(info) << GetName() << ": No Event branch; run in time-based mode";
286
287 // --- Primary vertex
288 fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex."));
289 if (nullptr == fPrimVertex) {
290 fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex"));
291 }
292 if (nullptr == fPrimVertex)
293 LOG(warning) << GetName() << ": No PrimaryVertex branch!";
294 else
295 LOG(info) << GetName() << ": Found PrimaryVertex branch";
296}
297
299{
300 FairRootManager* ioman = FairRootManager::Instance();
301 assert(ioman);
302
303 // --- MuchTrack
305 fMuchTracks = new TClonesArray("CbmMuchTrack", 100);
306 ioman->Register("MuchTrack", "Much", fMuchTracks, IsOutputBranchPersistent("MuchTrack"));
307 LOG(info) << GetName() << ": Register MuchTrack branch";
308 }
309
310 // --- TrdTrack
312 fTrdTracks = new TClonesArray("CbmTrdTrack", 100);
313 ioman->Register("TrdTrack", "Trd", fTrdTracks, IsOutputBranchPersistent("TrdTrack"));
314 LOG(info) << GetName() << ": Register TrdTrack branch";
315 }
316
317 // --- TofTrack
319 fTofTracks = new TClonesArray("CbmTofTrack", 100);
320 ioman->Register("TofTrack", "Tof", fTofTracks, IsOutputBranchPersistent("TofTrack"));
321 LOG(info) << GetName() << ": Register TofTrack branch";
322 }
323
324 // --- GlobalTrack
325 fGlobalTracks = new TClonesArray("CbmGlobalTrack", 100);
326 ioman->Register("GlobalTrack", "Global", fGlobalTracks, IsOutputBranchPersistent("GlobalTrack"));
327 LOG(info) << GetName() << ": Register GlobalTrack branch";
328}
329
331{
332 if (fDet.GetElectronSetup()) {
333 if (fTrackingType == "branch" || fTrackingType == "nn" || fTrackingType == "nn_parallel") {
334 std::string st("e_");
335 st += fTrackingType;
337 }
338 else {
339 LOG(fatal) << GetName() << "::InitTrackReconstruction: Tracking type not found";
340 }
341 }
342 else {
343 if (fTrackingType == "branch" || fTrackingType == "nn" || fTrackingType == "nn_parallel") {
344 std::string st("mu_");
345 st += fTrackingType;
347 }
348 else {
349 LOG(fatal) << GetName() << "::InitTrackReconstruction: Tracking type not found";
350 }
351 }
352
354 if (fMergerType == "nearest_hit" || fMergerType == "all_hits") {
356 }
357 else {
358 LOG(fatal) << GetName() << "::InitTrackReconstruction: Merger type not found";
359 }
360 }
361
362 if (fFitterType == "lit_kalman") {
364 }
365 else {
366 LOG(fatal) << GetName() << "::InitTrackReconstruction: Fitter type not found";
367 }
368
370}
371
373{
375 LOG(debug2) << "-I- CbmLitFindGlobalTracks: Number of STS tracks: " << fLitStsTracks.size();
376
377 if (fMuchPixelHits) {
379 }
380 if (fTrdHits) {
382 //If MUCH-TRD setup, than shift plane id for the TRD hits
385 for (Int_t i = 0; i < fLitHits.size(); i++) {
386 CbmLitHit* hit = fLitHits[i];
387 if (hit->GetSystem() == kLITTRD) {
388 hit->SetDetectorId(kLITTRD, hit->GetStation() + nofStations);
389 }
390 }
391 }
392 }
393 LOG(debug2) << "-I- CbmLitFindGlobalTracks: Number of hits: " << fLitHits.size();
394
395 if (fTofHits) {
397 LOG(debug2) << "-I- CbmLitFindGlobalTracks: Number of TOF hits: " << fLitTofHits.size();
398 }
399}
400
406
408{
409 if (fTofTracks == NULL || fGlobalTracks == NULL) return;
410
411 CbmVertex* primVertex = event ? event->GetVertex() : fPrimVertex;
412
413 /* Calculate the length of the global track
414 * starting with (0, 0, 0) and adding all
415 * distances between hits
416 */
417 Int_t nofTofTracks = event ? event->GetNofData(ECbmDataType::kTofTrack) : fTofTracks->GetEntriesFast();
418 for (Int_t i = 0; i < nofTofTracks; ++i) {
419 Int_t itt = event ? event->GetIndex(ECbmDataType::kTofTrack, i) : i;
420 CbmTofTrack* tofTrack = static_cast<CbmTofTrack*>(fTofTracks->At(itt));
421 CbmGlobalTrack* globalTrack = static_cast<CbmGlobalTrack*>(fGlobalTracks->At(tofTrack->GetTrackIndex()));
422 if (globalTrack == NULL) {
423 continue;
424 }
425
426 std::vector<Double_t> X, Y, Z;
427 if (primVertex == NULL) {
428 X.push_back(0.);
429 Y.push_back(0.);
430 Z.push_back(0.);
431 }
432 else {
433 X.push_back(primVertex->GetX());
434 Y.push_back(primVertex->GetY());
435 Z.push_back(primVertex->GetZ());
436 }
437
438 // get track segments indices
439 Int_t stsId = globalTrack->GetStsTrackIndex();
440 Int_t trdId = globalTrack->GetTrdTrackIndex();
441 Int_t muchId = globalTrack->GetMuchTrackIndex();
442 Int_t tofId = tofTrack->GetTofHitIndex(); //globalTrack->GetTofHitIndex();
443
444 if (stsId > -1) {
445 const CbmStsTrack* stsTrack = static_cast<const CbmStsTrack*>(fStsTracks->At(stsId));
446 Int_t nofStsHits = stsTrack->GetNofStsHits();
447 for (Int_t ih = 0; ih < nofStsHits; ih++) {
448 CbmStsHit* hit = (CbmStsHit*) fStsHits->At(stsTrack->GetStsHitIndex(ih));
449 X.push_back(hit->GetX());
450 Y.push_back(hit->GetY());
451 Z.push_back(hit->GetZ());
452 }
453 }
454
455 if (muchId > -1) {
456 const CbmTrack* muchTrack = static_cast<const CbmTrack*>(fMuchTracks->At(muchId));
457 Int_t nofMuchHits = muchTrack->GetNofHits();
458 for (Int_t ih = 0; ih < nofMuchHits; ih++) {
459 HitType hitType = muchTrack->GetHitType(ih);
461 CbmPixelHit* hit = (CbmPixelHit*) fMuchPixelHits->At(muchTrack->GetHitIndex(ih));
462 X.push_back(hit->GetX());
463 Y.push_back(hit->GetY());
464 Z.push_back(hit->GetZ());
465 }
466 }
467 }
468
469 if (trdId > -1) {
470 const CbmTrack* trdTrack = static_cast<const CbmTrack*>(fTrdTracks->At(trdId));
471 Int_t nofTrdHits = trdTrack->GetNofHits();
472 for (Int_t ih = 0; ih < nofTrdHits; ih++) {
473 CbmPixelHit* hit = (CbmPixelHit*) fTrdHits->At(trdTrack->GetHitIndex(ih));
474 X.push_back(hit->GetX());
475 Y.push_back(hit->GetY());
476 Z.push_back(hit->GetZ());
477 }
478 }
479
480 if (tofId > -1) {
481 const CbmPixelHit* hit = static_cast<const CbmPixelHit*>(fTofHits->At(tofId));
482 X.push_back(hit->GetX());
483 Y.push_back(hit->GetY());
484 Z.push_back(hit->GetZ());
485 }
486
487 // Calculate distances between hits
488 Double_t length = 0.;
489 for (Int_t j = 0; j < X.size() - 1; ++j) {
490 Double_t dX = X[j] - X[j + 1];
491 Double_t dY = Y[j] - Y[j + 1];
492 Double_t dZ = Z[j] - Z[j + 1];
493 length += std::sqrt(dX * dX + dY * dY + dZ * dZ);
494 }
495
496 if (globalTrack->GetTofHitIndex() == tofTrack->GetTofHitIndex()) globalTrack->SetLength(length);
497 tofTrack->SetTrackLength(length);
498 }
499}
500
501//void CbmLitFindGlobalTracks::CalculateLength()
502//{
503// /* Calculate the length of the global track
504// * starting with (0, 0, 0) and adding all
505// * distances between hits
506// */
507//
508// // Reduce step to calculate track length more accurately
509// CbmLitTGeoTrackPropagator::MAXIMUM_PROPAGATION_STEP_SIZE = 1.0;
510//
511// TrackPtrVector litTracks;
512// CbmLitConverter::GlobalTrackArrayToLitTrackVector(fGlobalTracks, fStsTracks, fTrdTracks, fMuchTracks, fMvdHits, fStsHits, fTrdHits, fMuchPixelHits, fTofHits, litTracks);
513// Int_t nofTracks = litTracks.size();
514// for (UInt_t iTrack = 0; iTrack < nofTracks; iTrack++) {
515// CbmGlobalTrack* globalTrack = static_cast<CbmGlobalTrack*>(fGlobalTracks->At(iTrack));
516// if (globalTrack->GetStsTrackIndex() >= 0 && globalTrack->GetTofHitIndex() >= 0) {
517// CbmLitTrack* track = litTracks[iTrack];
518// CbmLitTrackParam par = *track->GetParamFirst();
519// LitStatus propStatus = fPropagator->Propagate(&par, 0.0, 211, NULL);
520// track->SetParamFirst(&par);
521// fFitter->Fit(track);
522// globalTrack->SetLength(track->GetLength());
523// } else {
524// globalTrack->SetLength(-1.);
525// }
526// }
527//
528// CbmLitTGeoTrackPropagator::MAXIMUM_PROPAGATION_STEP_SIZE = 10.;
529//
530// // free memory
531// for (UInt_t iTrack = 0; iTrack < nofTracks; iTrack++) {
532// CbmLitTrack* track = litTracks[iTrack];
533// Int_t nofHits = track->GetNofHits();
534// for (Int_t iHit = 0; iHit < nofHits; iHit++) {
535// delete track->GetHit(iHit);
536// }
537// track->ClearHits();
538// }
539// for_each(litTracks.begin(), litTracks.end(), DeleteObject());
540//}
541
543{
544 if (0 == fGlobalTracks) return;
545
546 CbmVertex* primVertex = event ? event->GetVertex() : fPrimVertex;
547
548 if (0 == primVertex) return;
549
550 Int_t nofGlobalTracks = event ? event->GetNofData(ECbmDataType::kGlobalTrack) : fGlobalTracks->GetEntriesFast();
551
552 for (Int_t i0 = 0; i0 < nofGlobalTracks; ++i0) {
553 Int_t i = event ? event->GetIndex(ECbmDataType::kGlobalTrack, i0) : i0;
554 CbmGlobalTrack* globalTrack = static_cast<CbmGlobalTrack*>(fGlobalTracks->At(i));
555 Int_t stsId = globalTrack->GetStsTrackIndex();
556 CbmStsTrack* stsTrack = static_cast<CbmStsTrack*>(fStsTracks->At(stsId));
557 FairTrackParam vtxTrackParam;
558 float chiSqPrimary = 0.f;
559 CbmKFParticleInterface::ExtrapolateTrackToPV(stsTrack, primVertex, &vtxTrackParam, chiSqPrimary);
560 globalTrack->SetParamPrimaryVertex(&vtxTrackParam);
561 }
562}
563
565{
566 // Free memory
567 for_each(fLitStsTracks.begin(), fLitStsTracks.end(), DeleteObject());
568 for_each(fLitOutputTracks.begin(), fLitOutputTracks.end(), DeleteObject());
569 for_each(fLitHits.begin(), fLitHits.end(), DeleteObject());
570 for_each(fLitTofHits.begin(), fLitTofHits.end(), DeleteObject());
571 for_each(fLitOutputTofTracks.begin(), fLitOutputTofTracks.end(), DeleteObject());
572 fLitStsTracks.clear();
573 fLitOutputTracks.clear();
574 fLitHits.clear();
575 fLitTofHits.clear();
576 fLitOutputTofTracks.clear();
577}
578
580{
581 // Track finding in TRD or MUCH
583 fTrackingWatch.Start(kFALSE);
585 fTrackingWatch.Stop();
586 }
587 // Merging of TOF hits to global tracks
589 // If there are no TRD or MUCH than merge STS tracks with TOF
591 for (TrackPtrIterator it = fLitStsTracks.begin(); it != fLitStsTracks.end(); it++) {
592 CbmLitTrack* track = new CbmLitTrack(*(*it));
593 fLitOutputTracks.push_back(track);
594 }
595 }
596
597 // Selection of tracks to be merged with TOF
600 }
601 else {
602 for (TrackPtrIterator it = fLitOutputTracks.begin(); it != fLitOutputTracks.end(); it++) {
603 (*it)->SetQuality(kLITGOODMERGE);
604 }
605 }
606
607 fMergerWatch.Start(kFALSE);
609 fMergerWatch.Stop();
610 }
611
612 // Refit found tracks
613 for (TrackPtrIterator it = fLitOutputTracks.begin(); it != fLitOutputTracks.end(); it++) {
614 CbmLitTrack* track = *it;
615 fFitter->Fit(track);
616 }
617}
618
620{
621 // Select tracks for merging with TOF.
622 // Currently all tracks are selected, no matter if they have hits in TRD / MUCH or not.
623 // The only requirement is the numerical quality of the covariance matrix. -- Sergey Gorbunov
624
625 for (TrackPtrIterator it = fLitOutputTracks.begin(); it != fLitOutputTracks.end(); it++) {
626 CbmLitTrack* track = *it;
627 if (track->GetQuality() == kLITBAD) {
628 continue;
629 }
631 }
632}
633
635{
636 std::cout << "Stopwatch: " << std::endl;
637 std::cout << "tracking: counts=" << fTrackingWatch.Counter()
638 << ", real=" << fTrackingWatch.RealTime() / fTrackingWatch.Counter() << "/" << fTrackingWatch.RealTime()
639 << " s, cpu=" << fTrackingWatch.CpuTime() / fTrackingWatch.Counter() << "/" << fTrackingWatch.CpuTime()
640 << std::endl;
641 std::cout << "fitter: real=" << fMergerWatch.Counter()
642 << ", real=" << fMergerWatch.RealTime() / fMergerWatch.Counter() << "/" << fMergerWatch.RealTime()
643 << " s, cpu=" << fMergerWatch.CpuTime() / fMergerWatch.Counter() << "/" << fMergerWatch.CpuTime()
644 << std::endl;
645}
646
XPU_D constexpr auto ToIntegralType(T enumerator) -> typename std::underlying_type< T >::type
Definition CbmDefs.h:29
@ kMvd
Micro-Vertex Detector.
@ kTrd
Transition Radiation Detector.
@ kTof
Time-of-flight Detector.
@ kSts
Silicon Tracking System.
@ kMuch
Muon detection system.
Int_t nTofHits
TClonesArray * fTofTracks
HitType
Definition CbmHit.h:21
@ kLITBAD
Definition CbmLitEnums.h:40
@ kLITGOODMERGE
Definition CbmLitEnums.h:41
@ kLITTRD
Definition CbmLitEnums.h:50
ClassImp(CbmLitFindGlobalTracks)
CBM task for global track reconstruction.
Base data class for hits.
Base data class for pixel hits.
Base data class for strip hits.
Tool factory for creation of littrack algorithms.
Base data class for track.
Tracking geometry constructor.
Data class for a reconstructed hit in the STS.
Data class for STS tracks.
std::vector< CbmTofTrack * >::iterator TrackPtrIterator
Definition CbmTofTypes.h:25
Class characterising one event by a collection of links (indices) to data objects,...
Definition CbmEvent.h:34
void SetParamPrimaryVertex(const FairTrackParam *parPV)
int32_t GetStsTrackIndex() const
int32_t GetTofHitIndex() const
int32_t GetMuchTrackIndex() const
void SetLength(double length)
int32_t GetTrdTrackIndex() const
double GetZ() const
Definition CbmHit.h:71
static void ExtrapolateTrackToPV(const CbmStsTrack *track, CbmVertex *pv, FairTrackParam *paramAtPV, float &chiPrim)
static void LitTrackVectorToGlobalTrackArray(CbmEvent *event, const TrackPtrVector &litTracks, const TofTrackPtrVector &litTofTracks, TClonesArray *globalTracks, TClonesArray *stsTracks, TClonesArray *trdTracks, TClonesArray *muchTracks, TClonesArray *tofTracks)
static void HitArrayToHitVector(CbmEvent *event, ECbmDataType hitDataType, const TClonesArray *hits, HitPtrVector &litHits)
static void StsTrackArrayToTrackVector(CbmEvent *event, const TClonesArray *tracks, TrackPtrVector &litTracks)
void SetDet(ECbmModuleId detId, bool isDet)
Set detector presence manually.
void DetermineSetup()
Determines detector presence using TGeoManager.
bool GetElectronSetup() const
Return true if electron setup is detected.
string ToString() const
Return string representation of class.
bool GetDet(ECbmModuleId detId) const
Return detector presence in setup.
virtual void Finish()
Inherited from FairTask.
void ConvertOutputData(CbmEvent *event)
Convert output data LIT data classes to CBMROOT data classes.
TofTrackPtrVector fLitOutputTofTracks
void ConvertInputData(CbmEvent *event)
Convert input data from CBMROOT data classes to LIT data classes.
void RegisterOutputBranches()
Register output data branches (tracks) to the tree.
virtual ~CbmLitFindGlobalTracks()
Destructor.
void ClearArrays()
Clear arrays and frees the memory.
void PrintStopwatchStatistics()
Print output stopwatch statistics for track-finder and hit-to-track merger.
void CalculateLength(CbmEvent *event)
void InitTrackReconstruction()
Create and initialize track finder and track merger objects.
void RunTrackReconstruction()
Run the track reconstruction.
void SelectTracksForTofMerging()
Select tracks for further merging with TOF.
virtual void SetParContainers()
Inherited from FairTask.
virtual void Exec(Option_t *opt)
Inherited from FairTask.
void ReadInputBranches()
Accesses input data branches (hits, tracks, events) from the tree.
virtual InitStatus Init()
Inherited from FairTask.
void CalculatePrimaryVertexParameters(CbmEvent *event)
Base data class for hits.
Definition CbmLitHit.h:29
LitSystemId GetSystem() const
Definition CbmLitHit.h:48
Int_t GetStation() const
Definition CbmLitHit.h:49
void SetDetectorId(LitSystemId sysId, Int_t station)
Definition CbmLitHit.h:58
static TrackFinderPtr CreateTrackFinder(const string &name)
Create track selection tool by name.
static HitToTrackMergerPtr CreateHitToTrackMerger(const string &name)
Create hot to track merge tool by name.
static TrackPropagatorPtr CreateTrackPropagator(const string &name)
Create track propagation tool by name.
static TrackFitterPtr CreateTrackFitter(const string &name)
Create track fit tool by name.
Base data class for track.
Definition CbmLitTrack.h:34
LitTrackQa GetQuality() const
Definition CbmLitTrack.h:63
void SetQuality(LitTrackQa quality)
Definition CbmLitTrack.h:80
static CbmLitTrackingGeometryConstructor * Instance()
Return pointer to singleton object.
Int_t GetNofMuchStations()
Return number of stations in MUCH.
double GetY() const
Definition CbmPixelHit.h:74
double GetX() const
Definition CbmPixelHit.h:73
data class for a reconstructed 3-d hit in the STS
Definition CbmStsHit.h:35
int32_t GetStsHitIndex(int32_t iHit) const
int32_t GetNofStsHits() const
Definition CbmStsTrack.h:93
int32_t GetTofHitIndex() const
Definition CbmTofTrack.h:55
void SetTrackLength(double trackLength)
Definition CbmTofTrack.h:96
int32_t GetTrackIndex() const
Definition CbmTofTrack.h:64
virtual int32_t GetNofHits() const
Definition CbmTrack.h:58
int32_t GetHitIndex(int32_t iHit) const
Definition CbmTrack.h:59
HitType GetHitType(int32_t iHit) const
Definition CbmTrack.h:60
double GetZ() const
Definition CbmVertex.h:69
double GetY() const
Definition CbmVertex.h:68
double GetX() const
Definition CbmVertex.h:67