CbmRoot
CbmLitFindGlobalTracks.cxx
Go to the documentation of this file.
1 
10 #include "data/CbmLitHit.h"
11 #include "data/CbmLitPixelHit.h"
12 #include "data/CbmLitStripHit.h"
13 #include "data/CbmLitTrack.h"
15 #include "utils/CbmLitConverter.h"
17 
18 #include "CbmGlobalTrack.h"
19 #include "CbmHit.h"
20 #include "CbmKFParticleInterface.h"
21 #include "CbmMuchTrack.h"
22 #include "CbmPixelHit.h"
23 #include "CbmStripHit.h"
24 #include "CbmStsHit.h"
25 #include "CbmStsTrack.h"
26 #include "CbmTofTrack.h"
27 #include "CbmTrdTrack.h"
28 #include "FairRootManager.h"
29 
30 #include "TClonesArray.h"
31 
32 #include <cmath>
33 #include <iostream>
34 
36  : FairTask("CbmLitFindGlobalTracks")
37  , fDet()
38  ,
39 
40  fStsTracks(NULL)
41  , fMvdHits(NULL)
42  , fStsHits(NULL)
43  , fMuchPixelHits(NULL)
44  , fMuchTracks(NULL)
45  , fTrdHits(NULL)
46  , fTrdTracks(NULL)
47  , fTofHits(NULL)
48  , fEvents(NULL)
49  , fTofTracks(NULL)
50  , fGlobalTracks(NULL)
51  , fPrimVertex(NULL)
52  ,
53 
54  fLitStsTracks()
55  , fLitHits()
56  , fLitTofHits()
57  , fLitOutputTracks()
58  , fLitOutputTofTracks()
59  ,
60 
61  fFinder()
62  , fMerger()
63  , fFitter()
64  , fPropagator()
65  ,
66 
67  fTrackingType("branch")
68  , fMergerType("nearest_hit")
69  , fFitterType("lit_kalman")
70  ,
71 
72  fTrackingWatch()
73  , fMergerWatch()
74  ,
75 
76  fEventNo(0) {}
77 
79 
81  std::cout << std::endl;
82  LOG(info) << "=========================================";
83  LOG(info) << GetName() << ": Initializing ";
85  LOG(info) << fDet.ToString();
86 
89 
91 
92  fTrackingWatch.Reset();
93  fMergerWatch.Reset();
94 
95  LOG(info) << "=========================================";
96  std::cout << std::endl;
97  return kSUCCESS;
98 }
99 
100 void CbmLitFindGlobalTracks::Exec(Option_t* opt) {
101  if (fTrdTracks != NULL) fTrdTracks->Delete();
102  if (fMuchTracks != NULL) fMuchTracks->Delete();
103  if (fTofTracks != NULL) fTofTracks->Delete();
104  fGlobalTracks->Clear();
105 
106  if (fEvents) {
107  Int_t nEvents = fEvents->GetEntriesFast();
108  LOG(debug) << GetName() << ": reading time slice with " << nEvents
109  << " events ";
110 
111  for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
112  CbmEvent* event = static_cast<CbmEvent*>(fEvents->At(iEvent));
113  ConvertInputData(event);
115  ConvertOutputData(event);
116  CalculateLength(event);
118  ClearArrays();
119  std::cout << "CbmLitFindGlobalTracks::Exec event: " << event->GetNumber()
120  << std::endl;
121  } //# events
122  } //? event branch present
123  else { // Old event-by-event simulation without event branch
124  ConvertInputData(0);
127  CalculateLength(0);
129  ClearArrays();
130  std::cout << "CbmLitFindGlobalTracks::Exec event: " << fEventNo++
131  << std::endl;
132  }
133 }
134 
136 
138 
140  FairRootManager* ioman = FairRootManager::Instance();
141  assert(ioman);
142 
143  // --- MVD hits
145  fMvdHits = dynamic_cast<TClonesArray*>(ioman->GetObject("MvdHit"));
146  if (!fMvdHits) {
147  LOG(warn) << GetName() << ": No MvdHit branch!";
149  } else
150  LOG(info) << GetName() << ": Found MvdHit branch";
151  } //? MVD in geometry
152 
153  // --- STS hits
154  fStsHits = dynamic_cast<TClonesArray*>(ioman->GetObject("StsHit"));
155  if (!fStsHits) {
156  LOG(FATAL) << GetName() << ": No StsHit branch!";
158  } else
159  LOG(INFO) << GetName() << ": Found StsHit branch";
160 
161  // --- STS tracks
162  fStsTracks = dynamic_cast<TClonesArray*>(ioman->GetObject("StsTrack"));
163  if (!fStsTracks) {
164  LOG(FATAL) << GetName() << ": No StsTrack branch!";
166  } else
167  LOG(INFO) << GetName() << ": Found StsTrack branch";
168 
169  // --- MUCH hits
172  dynamic_cast<TClonesArray*>(ioman->GetObject("MuchPixelHit"));
173  if (!fMuchPixelHits) {
174  LOG(WARNING) << GetName() << "No MuchPixelHit branch!";
176  } else {
177  if (fMuchPixelHits)
178  LOG(INFO) << GetName() << ": Found MuchPixelHit branch";
179  }
180  } //? MUCH in geometry
181 
182  // --- TRD hits
184  fTrdHits = dynamic_cast<TClonesArray*>(ioman->GetObject("TrdHit"));
185  if (NULL == fTrdHits) {
186  LOG(WARNING) << GetName() << ": No TrdHit branch!";
188  }
189  LOG(INFO) << GetName() << ": Found TrdHit branch";
190  } //? TRD in geometry
191 
192  // --- TOF hits
194  fTofHits = dynamic_cast<TClonesArray*>(ioman->GetObject("TofHit"));
195  if (NULL == fTofHits) {
196  LOG(WARNING) << GetName() << ": No TofHit branch!";
198  } else
199  LOG(INFO) << GetName() << ": Found TofHit branch";
200  } //? TOF in geometry
201 
202  // --- Events
203  fEvents = dynamic_cast<TClonesArray*>(ioman->GetObject("Event"));
204  if (fEvents)
205  LOG(INFO) << GetName() << ": Found Event branch";
206  else
207  LOG(INFO) << GetName() << ": No Event branch; run in time-based mode";
208 
209  // --- Primary vertex
210  fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex."));
211  if (nullptr == fPrimVertex) {
212  fPrimVertex = dynamic_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex"));
213  }
214  if (nullptr == fPrimVertex)
215  LOG(WARNING) << GetName() << ": No PrimaryVertex branch!";
216  else
217  LOG(INFO) << GetName() << ": Found PrimaryVertex branch";
218 }
219 
221  FairRootManager* ioman = FairRootManager::Instance();
222  assert(ioman);
223 
224  // --- MuchTrack
226  fMuchTracks = new TClonesArray("CbmMuchTrack", 100);
227  ioman->Register(
228  "MuchTrack", "Much", fMuchTracks, IsOutputBranchPersistent("MuchTrack"));
229  LOG(INFO) << GetName() << ": Register MuchTrack branch";
230  }
231 
232  // --- TrdTrack
234  fTrdTracks = new TClonesArray("CbmTrdTrack", 100);
235  ioman->Register(
236  "TrdTrack", "Trd", fTrdTracks, IsOutputBranchPersistent("TrdTrack"));
237  LOG(INFO) << GetName() << ": Register TrdTrack branch";
238  }
239 
240  // --- TofTrack
242  fTofTracks = new TClonesArray("CbmTofTrack", 100);
243  ioman->Register(
244  "TofTrack", "Tof", fTofTracks, IsOutputBranchPersistent("TofTrack"));
245  LOG(INFO) << GetName() << ": Register TofTrack branch";
246  }
247 
248  // --- GlobalTrack
249  fGlobalTracks = new TClonesArray("CbmGlobalTrack", 100);
250  ioman->Register("GlobalTrack",
251  "Global",
253  IsOutputBranchPersistent("GlobalTrack"));
254  LOG(INFO) << GetName() << ": Register GlobalTrack branch";
255 }
256 
258  if (fDet.GetElectronSetup()) {
259  if (fTrackingType == "branch" || fTrackingType == "nn"
260  || fTrackingType == "nn_parallel") {
261  std::string st("e_");
262  st += fTrackingType;
264  } else {
265  TObject::Fatal("CbmLitFindGlobalTracks", "Tracking type not found");
266  }
267  } else {
268  if (fTrackingType == "branch" || fTrackingType == "nn"
269  || fTrackingType == "nn_parallel") {
270  std::string st("mu_");
271  st += fTrackingType;
273  } else {
274  TObject::Fatal("CbmLitFindGlobalTracks", "Tracking type not found");
275  }
276  }
277 
279  if (fMergerType == "nearest_hit" || fMergerType == "all_hits") {
281  } else {
282  TObject::Fatal("CbmLitFindGlobalTracks", "Merger type not found");
283  }
284  }
285 
286  if (fFitterType == "lit_kalman") {
288  } else {
289  TObject::Fatal("CbmLitFindGlobalTracks", "Fitter type not found");
290  }
291 
293 }
294 
297  std::cout << "-I- CbmLitFindGlobalTracks: Number of STS tracks: "
298  << fLitStsTracks.size() << std::endl;
299 
300  if (fMuchPixelHits) {
303  }
304  if (fTrdHits) {
307  //If MUCH-TRD setup, than shift plane id for the TRD hits
309  Int_t nofStations =
311  for (Int_t i = 0; i < fLitHits.size(); i++) {
312  CbmLitHit* hit = fLitHits[i];
313  if (hit->GetSystem() == kLITTRD) {
314  hit->SetDetectorId(kLITTRD, hit->GetStation() + nofStations);
315  }
316  }
317  }
318  }
319  std::cout << "-I- CbmLitFindGlobalTracks: Number of hits: " << fLitHits.size()
320  << std::endl;
321 
322  if (fTofHits) {
325  std::cout << "-I- CbmLitFindGlobalTracks: Number of TOF hits: "
326  << fLitTofHits.size() << std::endl;
327  }
328 }
329 
335  fStsTracks,
336  fTrdTracks,
337  fMuchTracks,
338  fTofTracks);
339 }
340 
342  if (fTofTracks == NULL || fGlobalTracks == NULL) return;
343 
344  CbmVertex* primVertex = event ? event->GetVertex() : fPrimVertex;
345 
346  /* Calculate the length of the global track
347  * starting with (0, 0, 0) and adding all
348  * distances between hits
349  */
350  Int_t nofTofTracks = event ? event->GetNofData(ECbmDataType::kTofTrack)
351  : fTofTracks->GetEntriesFast();
352  for (Int_t i = 0; i < nofTofTracks; ++i) {
353  Int_t itt = event ? event->GetIndex(ECbmDataType::kTofTrack, i) : i;
354  CbmTofTrack* tofTrack = static_cast<CbmTofTrack*>(fTofTracks->At(itt));
355  CbmGlobalTrack* globalTrack = static_cast<CbmGlobalTrack*>(
356  fGlobalTracks->At(tofTrack->GetTrackIndex()));
357  if (globalTrack == NULL) { continue; }
358 
359  std::vector<Double_t> X, Y, Z;
360  if (primVertex == NULL) {
361  X.push_back(0.);
362  Y.push_back(0.);
363  Z.push_back(0.);
364  } else {
365  X.push_back(primVertex->GetX());
366  Y.push_back(primVertex->GetY());
367  Z.push_back(primVertex->GetZ());
368  }
369 
370  // get track segments indices
371  Int_t stsId = globalTrack->GetStsTrackIndex();
372  Int_t trdId = globalTrack->GetTrdTrackIndex();
373  Int_t muchId = globalTrack->GetMuchTrackIndex();
374  Int_t tofId = tofTrack->GetTofHitIndex(); //globalTrack->GetTofHitIndex();
375 
376  if (stsId > -1) {
377  const CbmStsTrack* stsTrack =
378  static_cast<const CbmStsTrack*>(fStsTracks->At(stsId));
379  Int_t nofStsHits = stsTrack->GetNofStsHits();
380  for (Int_t ih = 0; ih < nofStsHits; ih++) {
381  CbmStsHit* hit = (CbmStsHit*) fStsHits->At(stsTrack->GetHitIndex(ih));
382  X.push_back(hit->GetX());
383  Y.push_back(hit->GetY());
384  Z.push_back(hit->GetZ());
385  }
386  }
387 
388  if (muchId > -1) {
389  const CbmTrack* muchTrack =
390  static_cast<const CbmTrack*>(fMuchTracks->At(muchId));
391  Int_t nofMuchHits = muchTrack->GetNofHits();
392  for (Int_t ih = 0; ih < nofMuchHits; ih++) {
393  HitType hitType = muchTrack->GetHitType(ih);
395  CbmPixelHit* hit =
396  (CbmPixelHit*) fMuchPixelHits->At(muchTrack->GetHitIndex(ih));
397  X.push_back(hit->GetX());
398  Y.push_back(hit->GetY());
399  Z.push_back(hit->GetZ());
400  }
401  }
402  }
403 
404  if (trdId > -1) {
405  const CbmTrack* trdTrack =
406  static_cast<const CbmTrack*>(fTrdTracks->At(trdId));
407  Int_t nofTrdHits = trdTrack->GetNofHits();
408  for (Int_t ih = 0; ih < nofTrdHits; ih++) {
409  CbmPixelHit* hit =
410  (CbmPixelHit*) fTrdHits->At(trdTrack->GetHitIndex(ih));
411  X.push_back(hit->GetX());
412  Y.push_back(hit->GetY());
413  Z.push_back(hit->GetZ());
414  }
415  }
416 
417  if (tofId > -1) {
418  const CbmPixelHit* hit =
419  static_cast<const CbmPixelHit*>(fTofHits->At(tofId));
420  X.push_back(hit->GetX());
421  Y.push_back(hit->GetY());
422  Z.push_back(hit->GetZ());
423  }
424 
425  // Calculate distances between hits
426  Double_t length = 0.;
427  for (Int_t j = 0; j < X.size() - 1; ++j) {
428  Double_t dX = X[j] - X[j + 1];
429  Double_t dY = Y[j] - Y[j + 1];
430  Double_t dZ = Z[j] - Z[j + 1];
431  length += std::sqrt(dX * dX + dY * dY + dZ * dZ);
432  }
433 
434  if (globalTrack->GetTofHitIndex() == tofTrack->GetTofHitIndex())
435  globalTrack->SetLength(length);
436  tofTrack->SetTrackLength(length);
437  }
438 }
439 
440 //void CbmLitFindGlobalTracks::CalculateLength()
441 //{
442 // /* Calculate the length of the global track
443 // * starting with (0, 0, 0) and adding all
444 // * distances between hits
445 // */
446 //
447 // // Reduce step to calculate track length more accurately
448 // CbmLitTGeoTrackPropagator::MAXIMUM_PROPAGATION_STEP_SIZE = 1.0;
449 //
450 // TrackPtrVector litTracks;
451 // CbmLitConverter::GlobalTrackArrayToLitTrackVector(fGlobalTracks, fStsTracks, fTrdTracks, fMuchTracks, fMvdHits, fStsHits, fTrdHits, fMuchPixelHits, fTofHits, litTracks);
452 // Int_t nofTracks = litTracks.size();
453 // for (UInt_t iTrack = 0; iTrack < nofTracks; iTrack++) {
454 // CbmGlobalTrack* globalTrack = static_cast<CbmGlobalTrack*>(fGlobalTracks->At(iTrack));
455 // if (globalTrack->GetStsTrackIndex() >= 0 && globalTrack->GetTofHitIndex() >= 0) {
456 // CbmLitTrack* track = litTracks[iTrack];
457 // CbmLitTrackParam par = *track->GetParamFirst();
458 // LitStatus propStatus = fPropagator->Propagate(&par, 0.0, 211, NULL);
459 // track->SetParamFirst(&par);
460 // fFitter->Fit(track);
461 // globalTrack->SetLength(track->GetLength());
462 // } else {
463 // globalTrack->SetLength(-1.);
464 // }
465 // }
466 //
467 // CbmLitTGeoTrackPropagator::MAXIMUM_PROPAGATION_STEP_SIZE = 10.;
468 //
469 // // free memory
470 // for (UInt_t iTrack = 0; iTrack < nofTracks; iTrack++) {
471 // CbmLitTrack* track = litTracks[iTrack];
472 // Int_t nofHits = track->GetNofHits();
473 // for (Int_t iHit = 0; iHit < nofHits; iHit++) {
474 // delete track->GetHit(iHit);
475 // }
476 // track->ClearHits();
477 // }
478 // for_each(litTracks.begin(), litTracks.end(), DeleteObject());
479 //}
480 
482  if (0 == fGlobalTracks) return;
483 
484  CbmVertex* primVertex = event ? event->GetVertex() : fPrimVertex;
485 
486  if (0 == primVertex) return;
487 
488  Int_t nofGlobalTracks = event ? event->GetNofData(ECbmDataType::kGlobalTrack)
489  : fGlobalTracks->GetEntriesFast();
490 
491  for (Int_t i0 = 0; i0 < nofGlobalTracks; ++i0) {
492  Int_t i = event ? event->GetIndex(ECbmDataType::kGlobalTrack, i0) : i0;
493  CbmGlobalTrack* globalTrack =
494  static_cast<CbmGlobalTrack*>(fGlobalTracks->At(i));
495  Int_t stsId = globalTrack->GetStsTrackIndex();
496  CbmStsTrack* stsTrack = static_cast<CbmStsTrack*>(fStsTracks->At(stsId));
497  FairTrackParam vtxTrackParam;
498  float chiSqPrimary = 0.f;
500  stsTrack, primVertex, &vtxTrackParam, chiSqPrimary);
501  globalTrack->SetParamPrimaryVertex(&vtxTrackParam);
502  }
503 }
504 
506  // Free memory
507  for_each(fLitStsTracks.begin(), fLitStsTracks.end(), DeleteObject());
508  for_each(fLitOutputTracks.begin(), fLitOutputTracks.end(), DeleteObject());
509  for_each(fLitHits.begin(), fLitHits.end(), DeleteObject());
510  for_each(fLitTofHits.begin(), fLitTofHits.end(), DeleteObject());
511  for_each(
513  fLitStsTracks.clear();
514  fLitOutputTracks.clear();
515  fLitHits.clear();
516  fLitTofHits.clear();
517  fLitOutputTofTracks.clear();
518 }
519 
521  // Track finding in TRD or MUCH
523  fTrackingWatch.Start(kFALSE);
525  fTrackingWatch.Stop();
526  }
527  // Merging of TOF hits to global tracks
529  // If there are no TRD or MUCH than merge STS tracks with TOF
532  for (TrackPtrIterator it = fLitStsTracks.begin();
533  it != fLitStsTracks.end();
534  it++) {
535  CbmLitTrack* track = new CbmLitTrack(*(*it));
536  fLitOutputTracks.push_back(track);
537  }
538  }
539 
540  // Selection of tracks to be merged with TOF
543  } else {
544  for (TrackPtrIterator it = fLitOutputTracks.begin();
545  it != fLitOutputTracks.end();
546  it++) {
547  (*it)->SetQuality(kLITGOODMERGE);
548  }
549  }
550 
551  fMergerWatch.Start(kFALSE);
553  fMergerWatch.Stop();
554  }
555 
556  // Refit found tracks
557  for (TrackPtrIterator it = fLitOutputTracks.begin();
558  it != fLitOutputTracks.end();
559  it++) {
560  CbmLitTrack* track = *it;
561  fFitter->Fit(track);
562  }
563 }
564 
566  // The aim of this procedure is to select only those tracks
567  // which have at least one hit in the last station group.
568  // Only those tracks will be propagated further and merged
569  // with TOF hits.
570 
571  Int_t nofStations =
573  // Int_t stationCut = nofStations - 4;
574  // TODO: Fix this issue in a better way. This is done only as an ugly fix
575  // FU 19.09.13
576  Int_t stationCut = nofStations - 3;
577 
578  for (TrackPtrIterator it = fLitOutputTracks.begin();
579  it != fLitOutputTracks.end();
580  it++) {
581  CbmLitTrack* track = *it;
582  if (track->GetQuality() == kLITBAD) { continue; }
583  const CbmLitHit* hit = track->GetHit(track->GetNofHits() - 1);
584  if (hit->GetStation() >= stationCut) {
585  // OK select this track for further merging with TOF
586  track->SetQuality(kLITGOODMERGE);
587  }
588  }
589 }
590 
592  std::cout << "Stopwatch: " << std::endl;
593  std::cout << "tracking: counts=" << fTrackingWatch.Counter()
594  << ", real=" << fTrackingWatch.RealTime() / fTrackingWatch.Counter()
595  << "/" << fTrackingWatch.RealTime()
596  << " s, cpu=" << fTrackingWatch.CpuTime() / fTrackingWatch.Counter()
597  << "/" << fTrackingWatch.CpuTime() << std::endl;
598  std::cout << "fitter: real=" << fMergerWatch.Counter()
599  << ", real=" << fMergerWatch.RealTime() / fMergerWatch.Counter()
600  << "/" << fMergerWatch.RealTime()
601  << " s, cpu=" << fMergerWatch.CpuTime() / fMergerWatch.Counter()
602  << "/" << fMergerWatch.CpuTime() << std::endl;
603 }
604 
CbmLitToolFactory::CreateTrackPropagator
static TrackPropagatorPtr CreateTrackPropagator(const string &name)
Create track propagation tool by name.
Definition: CbmLitToolFactory.cxx:58
CbmHit::GetZ
Double_t GetZ() const
Definition: CbmHit.h:70
CbmLitFindGlobalTracks::CalculateLength
void CalculateLength(CbmEvent *event)
Definition: CbmLitFindGlobalTracks.cxx:341
CbmLitFindGlobalTracks::~CbmLitFindGlobalTracks
virtual ~CbmLitFindGlobalTracks()
Destructor.
Definition: CbmLitFindGlobalTracks.cxx:78
CbmLitFindGlobalTracks::fFitterType
string fFitterType
Definition: CbmLitFindGlobalTracks.h:181
ECbmDataType::kTrdHit
@ kTrdHit
CbmLitFindGlobalTracks::fLitTofHits
HitPtrVector fLitTofHits
Definition: CbmLitFindGlobalTracks.h:156
fPropagator
TrackPropagatorPtr fPropagator
Definition: CbmGlobalTrackingTof.cxx:19
CbmLitFindGlobalTracks::InitTrackReconstruction
void InitTrackReconstruction()
Create and initialize track finder and track merger objects.
Definition: CbmLitFindGlobalTracks.cxx:257
CbmLitMemoryManagment.h
CbmLitStripHit.h
Base data class for strip hits.
CbmPixelHit::GetX
Double_t GetX() const
Definition: CbmPixelHit.h:83
CbmGlobalTrack::GetMuchTrackIndex
Int_t GetMuchTrackIndex() const
Definition: CbmGlobalTrack.h:40
CbmLitFindGlobalTracks::fMerger
HitToTrackMergerPtr fMerger
Definition: CbmLitFindGlobalTracks.h:162
CbmTofTrack.h
CbmLitFindGlobalTracks::Init
virtual InitStatus Init()
Inherited from FairTask.
Definition: CbmLitFindGlobalTracks.cxx:80
CbmTrack::GetNofHits
virtual Int_t GetNofHits() const
Definition: CbmTrack.h:53
CbmPixelHit::GetY
Double_t GetY() const
Definition: CbmPixelHit.h:84
sqrt
friend F32vec4 sqrt(const F32vec4 &a)
Definition: L1/vectors/P4_F32vec4.h:41
CbmLitFindGlobalTracks::fTrdHits
TClonesArray * fTrdHits
Definition: CbmLitFindGlobalTracks.h:142
CbmLitFindGlobalTracks::fMuchPixelHits
TClonesArray * fMuchPixelHits
Definition: CbmLitFindGlobalTracks.h:141
ECbmDataType::kMuchPixelHit
@ kMuchPixelHit
CbmLitFindGlobalTracks::fStsHits
TClonesArray * fStsHits
Definition: CbmLitFindGlobalTracks.h:140
CbmLitFindGlobalTracks::fLitHits
HitPtrVector fLitHits
Definition: CbmLitFindGlobalTracks.h:155
CbmLitTrackingGeometryConstructor.h
Tracking geometry constructor.
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmLitFindGlobalTracks
Definition: CbmLitFindGlobalTracks.h:39
CbmLitToolFactory.h
Tool factory for creation of littrack algorithms.
CbmGlobalTrack.h
ECbmModuleId::kMvd
@ kMvd
Micro-Vertex Detector.
CbmLitFindGlobalTracks::fMergerWatch
TStopwatch fMergerWatch
Definition: CbmLitFindGlobalTracks.h:185
CbmLitTrackingGeometryConstructor::GetNofMuchStations
Int_t GetNofMuchStations()
Return number of stations in MUCH.
Definition: CbmLitTrackingGeometryConstructor.cxx:337
CbmLitPixelHit.h
Base data class for pixel hits.
ECbmDataType::kTofHit
@ kTofHit
CbmLitFindGlobalTracks::CbmLitFindGlobalTracks
CbmLitFindGlobalTracks()
Constructor.
Definition: CbmLitFindGlobalTracks.cxx:35
CbmLitFindGlobalTracks::ClearArrays
void ClearArrays()
Clear arrays and frees the memory.
Definition: CbmLitFindGlobalTracks.cxx:505
CbmLitFindGlobalTracks::fStsTracks
TClonesArray * fStsTracks
Definition: CbmLitFindGlobalTracks.h:139
CbmLitConverter::HitArrayToHitVector
static void HitArrayToHitVector(CbmEvent *event, ECbmDataType hitDataType, const TClonesArray *hits, HitPtrVector &litHits)
Definition: CbmLitConverter.h:315
ECbmModuleId::kTof
@ kTof
Time-of-flight Detector.
CbmLitHit::SetDetectorId
void SetDetectorId(LitSystemId sysId, Int_t station)
Definition: CbmLitHit.h:66
CbmLitFindGlobalTracks::fPropagator
TrackPropagatorPtr fPropagator
Definition: CbmLitFindGlobalTracks.h:167
CbmVertex::GetX
Double_t GetX() const
Definition: CbmVertex.h:68
CbmLitFindGlobalTracks::fTofTracks
TClonesArray * fTofTracks
Definition: CbmLitFindGlobalTracks.h:148
CbmLitConverter::LitTrackVectorToGlobalTrackArray
static void LitTrackVectorToGlobalTrackArray(CbmEvent *event, const TrackPtrVector &litTracks, const TofTrackPtrVector &litTofTracks, TClonesArray *globalTracks, TClonesArray *stsTracks, TClonesArray *trdTracks, TClonesArray *muchTracks, TClonesArray *tofTracks)
Definition: CbmLitConverter.h:215
DeleteObject
Definition: CbmLitMemoryManagment.h:5
CbmLitFindGlobalTracks::ConvertOutputData
void ConvertOutputData(CbmEvent *event)
Convert output data LIT data classes to CBMROOT data classes.
Definition: CbmLitFindGlobalTracks.cxx:330
CbmLitFindGlobalTracks::fFinder
TrackFinderPtr fFinder
Definition: CbmLitFindGlobalTracks.h:161
CbmLitFindGlobalTracks::fTrackingType
string fTrackingType
Definition: CbmLitFindGlobalTracks.h:173
fTofTracks
TClonesArray * fTofTracks
Definition: CbmHadronAnalysis.cxx:51
CbmLitFindGlobalTracks::SetParContainers
virtual void SetParContainers()
Inherited from FairTask.
Definition: CbmLitFindGlobalTracks.cxx:135
CbmLitFindGlobalTracks::fTrdTracks
TClonesArray * fTrdTracks
Definition: CbmLitFindGlobalTracks.h:147
ECbmDataType::kTofTrack
@ kTofTrack
CbmStsHit
data class for a reconstructed 3-d hit in the STS
Definition: CbmStsHit.h:31
CbmLitFindGlobalTracks::fTrackingWatch
TStopwatch fTrackingWatch
Definition: CbmLitFindGlobalTracks.h:184
CbmLitToolFactory::CreateTrackFitter
static TrackFitterPtr CreateTrackFitter(const string &name)
Create track fit tool by name.
Definition: CbmLitToolFactory.cxx:79
kLITGOODMERGE
@ kLITGOODMERGE
Definition: CbmLitEnums.h:34
TrackPtrIterator
std::vector< CbmTofTrack * >::iterator TrackPtrIterator
Definition: CbmTofTypes.h:21
CbmTrack
Definition: CbmTrack.h:32
CbmLitFindGlobalTracks.h
CBM task for global track reconstruction.
CbmStsTrack.h
Data class for STS tracks.
CbmGlobalTrack::GetStsTrackIndex
Int_t GetStsTrackIndex() const
Definition: CbmGlobalTrack.h:38
CbmHit.h
CbmLitFindGlobalTracks::fDet
CbmLitDetectorSetup fDet
Definition: CbmLitFindGlobalTracks.h:134
CbmGlobalTrack::SetLength
void SetLength(Double_t length)
Definition: CbmGlobalTrack.h:70
CbmMuchTrack.h
CbmLitHit
Base data class for hits.
Definition: CbmLitHit.h:26
CbmLitFindGlobalTracks::RunTrackReconstruction
void RunTrackReconstruction()
Run the track reconstruction.
Definition: CbmLitFindGlobalTracks.cxx:520
CbmLitToolFactory::CreateTrackFinder
static TrackFinderPtr CreateTrackFinder(const string &name)
Create track selection tool by name.
Definition: CbmLitToolFactory.cxx:121
HitType
HitType
Definition: CbmHit.h:16
CbmStripHit.h
CbmLitTrackingGeometryConstructor::GetNofMuchTrdStations
Int_t GetNofMuchTrdStations()
Return number of stations in MUCH + TRD.
Definition: CbmLitTrackingGeometryConstructor.cxx:415
CbmLitFindGlobalTracks::CalculatePrimaryVertexParameters
void CalculatePrimaryVertexParameters(CbmEvent *event)
Definition: CbmLitFindGlobalTracks.cxx:481
CbmTrack::GetHitIndex
Int_t GetHitIndex(Int_t iHit) const
Definition: CbmTrack.h:54
CbmGlobalTrack::GetTrdTrackIndex
Int_t GetTrdTrackIndex() const
Definition: CbmGlobalTrack.h:39
CbmVertex
Definition: CbmVertex.h:26
CbmLitFindGlobalTracks::fEventNo
Int_t fEventNo
Definition: CbmLitFindGlobalTracks.h:187
CbmLitDetectorSetup::GetDet
bool GetDet(ECbmModuleId detId) const
Return detector presence in setup.
Definition: CbmLitDetectorSetup.cxx:27
CbmLitFindGlobalTracks::RegisterOutputBranches
void RegisterOutputBranches()
Register output data branches (tracks) to the tree.
Definition: CbmLitFindGlobalTracks.cxx:220
CbmLitFindGlobalTracks::fLitOutputTofTracks
TofTrackPtrVector fLitOutputTofTracks
Definition: CbmLitFindGlobalTracks.h:158
CbmLitFindGlobalTracks::Finish
virtual void Finish()
Inherited from FairTask.
Definition: CbmLitFindGlobalTracks.cxx:137
CbmLitFindGlobalTracks::fFitter
TrackFitterPtr fFitter
Definition: CbmLitFindGlobalTracks.h:163
CbmLitTrack
Base data class for track.
Definition: CbmLitTrack.h:30
CbmVertex::GetZ
Double_t GetZ() const
Definition: CbmVertex.h:70
CbmGlobalTrack::SetParamPrimaryVertex
void SetParamPrimaryVertex(const FairTrackParam *parPV)
Definition: CbmGlobalTrack.h:63
CbmLitFindGlobalTracks::Exec
virtual void Exec(Option_t *opt)
Inherited from FairTask.
Definition: CbmLitFindGlobalTracks.cxx:100
CbmLitFindGlobalTracks::fEvents
TClonesArray * fEvents
Definition: CbmLitFindGlobalTracks.h:144
CbmKFParticleInterface.h
CbmTofTrack::GetTrackIndex
Int_t GetTrackIndex() const
Definition: CbmTofTrack.h:74
kLITBAD
@ kLITBAD
Definition: CbmLitEnums.h:33
CbmLitFindGlobalTracks::fLitStsTracks
TrackPtrVector fLitStsTracks
Definition: CbmLitFindGlobalTracks.h:154
CbmPixelHit.h
CbmTrack::GetHitType
HitType GetHitType(Int_t iHit) const
Definition: CbmTrack.h:55
CbmTofTrack::GetTofHitIndex
Int_t GetTofHitIndex() const
Definition: CbmTofTrack.h:61
CbmLitFindGlobalTracks::PrintStopwatchStatistics
void PrintStopwatchStatistics()
Print output stopwatch statistics for track-finder and hit-to-track merger.
Definition: CbmLitFindGlobalTracks.cxx:591
CbmLitTGeoTrackPropagator.h
CbmLitFindGlobalTracks::ConvertInputData
void ConvertInputData(CbmEvent *event)
Convert input data from CBMROOT data classes to LIT data classes.
Definition: CbmLitFindGlobalTracks.cxx:295
CbmLitHit::GetStation
Int_t GetStation() const
Definition: CbmLitHit.h:55
ECbmModuleId::kTrd
@ kTrd
Transition Radiation Detector.
CbmLitFindGlobalTracks::fTofHits
TClonesArray * fTofHits
Definition: CbmLitFindGlobalTracks.h:143
CbmGlobalTrack
Definition: CbmGlobalTrack.h:26
CbmLitTrack::SetQuality
void SetQuality(LitTrackQa quality)
Definition: CbmLitTrack.h:76
CbmKFParticleInterface::ExtrapolateTrackToPV
static void ExtrapolateTrackToPV(const CbmStsTrack *track, CbmVertex *pv, FairTrackParam *paramAtPV, float &chiPrim)
Definition: CbmKFParticleInterface.cxx:153
CbmLitFindGlobalTracks::fGlobalTracks
TClonesArray * fGlobalTracks
Definition: CbmLitFindGlobalTracks.h:149
ClassImp
ClassImp(CbmLitFindGlobalTracks)
CbmVertex::GetY
Double_t GetY() const
Definition: CbmVertex.h:69
CbmLitFindGlobalTracks::fPrimVertex
CbmVertex * fPrimVertex
Definition: CbmLitFindGlobalTracks.h:151
ToIntegralType
constexpr auto ToIntegralType(T enumerator) -> typename std::underlying_type< T >::type
Definition: CbmDefs.h:24
ECbmDataType::kGlobalTrack
@ kGlobalTrack
CbmLitConverter::StsTrackArrayToTrackVector
static void StsTrackArrayToTrackVector(CbmEvent *event, const TClonesArray *tracks, TrackPtrVector &litTracks)
Definition: CbmLitConverter.h:344
CbmLitConverter.h
CbmLitTrack.h
Base data class for track.
CbmEvent
Class characterising one event by a collection of links (indices) to data objects,...
Definition: CbmEvent.h:30
CbmLitFindGlobalTracks::fMergerType
string fMergerType
Definition: CbmLitFindGlobalTracks.h:177
CbmPixelHit
Definition: CbmPixelHit.h:21
ECbmModuleId::kMuch
@ kMuch
Muon detection system.
CbmLitFindGlobalTracks::ReadInputBranches
void ReadInputBranches()
Accesses input data branches (hits, tracks, events) from the tree.
Definition: CbmLitFindGlobalTracks.cxx:139
CbmGlobalTrack::GetTofHitIndex
Int_t GetTofHitIndex() const
Definition: CbmGlobalTrack.h:42
kLITTRD
@ kLITTRD
Definition: CbmLitEnums.h:42
CbmTrdTrack.h
CbmLitFindGlobalTracks::fMvdHits
TClonesArray * fMvdHits
Definition: CbmLitFindGlobalTracks.h:138
CbmLitHit::GetSystem
LitSystemId GetSystem() const
Definition: CbmLitHit.h:52
CbmLitDetectorSetup::GetElectronSetup
bool GetElectronSetup() const
Return true if electron setup is detected.
Definition: CbmLitDetectorSetup.h:60
CbmLitFindGlobalTracks::fMuchTracks
TClonesArray * fMuchTracks
Definition: CbmLitFindGlobalTracks.h:146
CbmStsTrack
Definition: CbmStsTrack.h:37
CbmTofTrack::SetTrackLength
void SetTrackLength(Double32_t trackLength)
Definition: CbmTofTrack.h:101
CbmLitTrack::GetQuality
LitTrackQa GetQuality() const
Definition: CbmLitTrack.h:57
CbmLitDetectorSetup::ToString
string ToString() const
Return string representation of class.
Definition: CbmLitDetectorSetup.cxx:99
CbmLitToolFactory::CreateHitToTrackMerger
static HitToTrackMergerPtr CreateHitToTrackMerger(const string &name)
Create hot to track merge tool by name.
Definition: CbmLitToolFactory.cxx:204
ECbmModuleId::kSts
@ kSts
Silicon Tracking System.
CbmLitTrackingGeometryConstructor::Instance
static CbmLitTrackingGeometryConstructor * Instance()
Return pointer to singleton object.
Definition: CbmLitTrackingGeometryConstructor.cxx:55
CbmLitTrack::GetHit
const CbmLitHit * GetHit(Int_t index) const
Definition: CbmLitTrack.h:65
CbmLitDetectorSetup::SetDet
void SetDet(ECbmModuleId detId, bool isDet)
Set detector presence manually.
Definition: CbmLitDetectorSetup.cxx:23
CbmLitHit.h
Base data class for hits.
CbmLitTrack::GetNofHits
Int_t GetNofHits() const
Definition: CbmLitTrack.h:56
CbmTofTrack
Provides information on attaching a TofHit to a GlobalTrack.
Definition: CbmTofTrack.h:20
CbmStsHit.h
Data class for a reconstructed hit in the STS.
CbmLitFindGlobalTracks::SelectTracksForTofMerging
void SelectTracksForTofMerging()
Select tracks for further merging with TOF.
Definition: CbmLitFindGlobalTracks.cxx:565
CbmLitDetectorSetup::DetermineSetup
void DetermineSetup()
Determines detector presence using TGeoManager.
Definition: CbmLitDetectorSetup.cxx:79
CbmStsTrack::GetNofStsHits
Int_t GetNofStsHits() const
Definition: CbmStsTrack.h:90
CbmLitFindGlobalTracks::fLitOutputTracks
TrackPtrVector fLitOutputTracks
Definition: CbmLitFindGlobalTracks.h:157