CbmRoot
CbmLitConverter.h
Go to the documentation of this file.
1 #ifndef CBMLITCONVERTER_H_
2 #define CBMLITCONVERTER_H_
3 
4 #include "base/CbmLitEnums.h"
5 #include "base/CbmLitTypes.h"
6 
7 #include "data/CbmLitFitNode.h"
8 #include "data/CbmLitHit.h"
9 #include "data/CbmLitPixelHit.h"
10 #include "data/CbmLitStripHit.h"
11 #include "data/CbmLitTofTrack.h"
12 #include "data/CbmLitTrack.h"
13 #include "data/CbmLitTrackParam.h"
14 
16 
17 #include "CbmEvent.h"
18 #include "CbmHit.h"
19 #include "CbmMuchGeoScheme.h"
20 #include "CbmMuchTrack.h"
21 #include "CbmMvdHit.h"
22 #include "CbmPixelHit.h"
23 #include "CbmStripHit.h"
24 #include "CbmStsTrack.h"
25 #include "CbmTofTrack.h"
26 #include "CbmTrack.h"
27 #include "CbmTrdTrack.h"
28 #include "FairTrackParam.h"
29 
30 #include "CbmGlobalTrack.h"
31 #include "CbmTrdAddress.h"
32 #include "CbmVertex.h"
33 
34 #include "TClonesArray.h"
35 
36 #include "FairRootManager.h"
37 
38 #include <cassert>
39 #include <cmath>
40 #include <iostream>
41 #include <set>
42 
43 
45 public:
46  static void CbmPixelHitToCbmLitPixelHit(const CbmPixelHit* hit,
47  Int_t index,
48  CbmLitPixelHit* litHit) {
49  assert(hit->GetType() == kTRDHIT || hit->GetType() == kMUCHPIXELHIT
50  || hit->GetType() == kTOFHIT || hit->GetType() == kMVDHIT
51  || hit->GetType() == kSTSHIT || hit->GetType() == kPIXELHIT);
52 
53  litHit->SetX(hit->GetX());
54  litHit->SetY(hit->GetY());
55  litHit->SetZ(hit->GetZ());
56 
57  litHit->SetT(
58  hit
59  ->GetTime());
60 
61  litHit->SetDx(hit->GetDx());
62  litHit->SetDy(hit->GetDy());
63  litHit->SetDz(hit->GetDz());
64  litHit->SetDxy(hit->GetDxy());
65 
66  if (hit->GetTimeError() > 0)
67  litHit->SetDt(hit->GetTimeError());
68  else
69  litHit->SetDt(100);
70 
71  litHit->SetRefId(index);
72 
73  if (hit->GetType() == kTRDHIT) {
74  litHit->SetDetectorId(kLITTRD, hit->GetPlaneId());
75  } else if (hit->GetType() == kMUCHPIXELHIT) {
76  litHit->SetDetectorId(kLITMUCH, (hit->GetPlaneId() - 1) / 2);
77  } else if (hit->GetType() == kTOFHIT) {
78  litHit->SetDetectorId(kLITTOF, 0);
79  }
80  }
81 
82  static void CbmMvdHitToCbmLitPixelHit(const CbmMvdHit* hit,
83  Int_t index,
84  CbmLitPixelHit* litHit) {
85  litHit->SetX(hit->GetX());
86  litHit->SetY(hit->GetY());
87  litHit->SetZ(hit->GetZ());
88  litHit->SetT(hit->GetTime());
89  litHit->SetDx(hit->GetDx());
90  litHit->SetDy(hit->GetDy());
91  litHit->SetDz(hit->GetDz());
92  litHit->SetDt(hit->GetTimeError());
93  litHit->SetDxy(0.);
94  litHit->SetRefId(index);
95 
96  litHit->SetDetectorId(kLITMVD, hit->GetStationNr());
97  }
98 
99  static void CbmStsTrackToCbmLitTrack(const CbmStsTrack* stsTrack,
100  CbmLitTrack* litTrack) {
101  // TODO note that hits are not copied now
102 
103  litTrack->SetQuality(kLITGOOD);
104  litTrack->SetChi2(stsTrack->GetChiSq());
105  litTrack->SetNDF(stsTrack->GetNDF());
106  litTrack->SetPreviousTrackId(-1);
107  CbmLitTrackParam paramFirst, paramLast;
108  //TODO remove this const typecasting
109  CbmTrackParam cbmParamFirst;
110  cbmParamFirst.Set(*stsTrack->GetParamFirst(),
111  stsTrack->GetTime(),
112  stsTrack->GetTimeError());
114  &cbmParamFirst, &paramFirst);
115  CbmTrackParam cbmParamLast;
116  cbmParamLast.Set(
117  *stsTrack->GetParamLast(), stsTrack->GetTime(), stsTrack->GetTimeError());
119  &cbmParamLast, &paramLast);
120  Double_t firstTime;
121  Double_t lastTime;
122  GetStsTrackTimes(stsTrack, firstTime, lastTime);
123  paramFirst.SetTime(firstTime);
124  paramLast.SetTime(lastTime);
125  litTrack->SetParamFirst(&paramFirst);
126  litTrack->SetParamLast(&paramLast);
127  }
128 
129  static void CbmTrackToCbmLitTrack(const CbmTrack* track,
130  const HitPtrVector& lhits,
131  CbmLitTrack* ltrack) {
132  for (Int_t iHit = 0; iHit < track->GetNofHits(); iHit++) {
133  // Now we convert only pixel hits
134  if (track->GetHitType(iHit) != kPIXELHIT
135  && track->GetHitType(iHit) != kTRDHIT
136  && track->GetHitType(iHit) != kMUCHPIXELHIT)
137  continue;
138  Int_t hitId = track->GetHitIndex(iHit);
139  ltrack->AddHit(lhits[hitId]);
140  }
141 
142  ltrack->SetQuality(kLITGOOD);
143  ltrack->SetChi2(track->GetChiSq());
144  ltrack->SetNDF(track->GetNDF());
145  ltrack->SetPreviousTrackId(track->GetPreviousTrackId());
146  ltrack->SetLastStationId(track->GetFlag());
147  ltrack->SetPDG(track->GetPidHypo());
148  CbmLitTrackParam paramFirst, paramLast;
149  CbmTrackParam cbmParamFirst;
150  cbmParamFirst.Set(
151  *track->GetParamFirst(), track->GetTime(), track->GetTimeError());
153  &cbmParamFirst, &paramFirst);
154  CbmTrackParam cbmParamLast;
155  cbmParamLast.Set(
156  *track->GetParamLast(), track->GetTime(), track->GetTimeError());
158  &cbmParamLast, &paramLast);
159  ltrack->SetParamFirst(&paramFirst);
160  ltrack->SetParamLast(&paramLast);
161  }
162 
163  static void CbmTrackArrayToCbmLitTrackArray(const TClonesArray* tracks,
164  const HitPtrVector& lhits,
165  TrackPtrVector& ltracks) {
166  Int_t nofTracks = tracks->GetEntriesFast();
167  for (Int_t iTrack = 0; iTrack < nofTracks; iTrack++) {
168  const CbmTrack* track = static_cast<const CbmTrack*>(tracks->At(iTrack));
169  CbmLitTrack* ltrack = new CbmLitTrack();
170  CbmTrackToCbmLitTrack(track, lhits, ltrack);
171  ltracks.push_back(ltrack);
172  }
173  }
174 
175  static void CbmLitTrackToCbmTrack(const CbmLitTrack* litTrack,
176  CbmTrack* track,
177  LitSystemId systemId) {
178  Double_t chiSq = 0.;
179  Int_t ndf = 0;
180  Int_t firstHit = -1;
181  Int_t lastHit = -1;
182  for (Int_t iHit = 0; iHit < litTrack->GetNofHits(); iHit++) {
183  const CbmLitHit* hit = litTrack->GetHit(iHit);
184  LitHitType type = hit->GetType();
185  LitSystemId det = hit->GetSystem();
186  if (det != systemId) continue;
187  if (firstHit < 0) firstHit = iHit;
188  lastHit = iHit;
189  if (det == kLITMUCH && type == kLITPIXELHIT) {
190  ndf += 2;
191  track->AddHit(hit->GetRefId(), kMUCHPIXELHIT);
192  } else if (det == kLITTRD) {
193  ndf += 2;
194  track->AddHit(hit->GetRefId(), kTRDHIT);
195  }
196  chiSq += litTrack->GetFitNode(iHit)->GetChiSqFiltered();
197  }
198  ndf -= 5;
199  if (ndf <= 0) ndf = 1;
200 
201  track->SetChiSq(chiSq);
202  track->SetNDF(ndf);
203  track->SetPreviousTrackId(litTrack->GetPreviousTrackId());
204  track->SetFlag(litTrack->GetQuality());
205  FairTrackParam parLast, parFirst;
207  litTrack->GetFitNode(lastHit)->GetUpdatedParam(), &parLast);
209  litTrack->GetFitNode(firstHit)->GetUpdatedParam(), &parFirst);
210  track->SetParamLast(&parLast);
211  track->SetParamFirst(&parFirst);
212  }
213 
214  static void
216  const TrackPtrVector& litTracks,
217  const TofTrackPtrVector& litTofTracks,
218  TClonesArray* globalTracks,
219  TClonesArray* stsTracks,
220  TClonesArray* trdTracks,
221  TClonesArray* muchTracks,
222  TClonesArray* tofTracks) {
223  // Loop over STS tracks and create GlobalTrack for each StsTrack
224  Int_t globalTrackNo = globalTracks->GetEntriesFast();
225  Int_t nofStsTracks = event ? event->GetNofData(ECbmDataType::kStsTrack)
226  : stsTracks->GetEntriesFast();
227  for (Int_t i = 0; i < nofStsTracks; i++) {
228  Int_t iTrack = event ? event->GetIndex(ECbmDataType::kStsTrack, i) : i;
229  CbmGlobalTrack* globalTrack =
230  new ((*globalTracks)[globalTrackNo++]) CbmGlobalTrack();
231  globalTrack->SetStsTrackIndex(i);
232 
233  if (event) event->AddData(ECbmDataType::kGlobalTrack, iTrack);
234  }
235 
236  Int_t trdTrackNo = (trdTracks != NULL) ? trdTracks->GetEntriesFast() : 0;
237  Int_t muchTrackNo = (muchTracks != NULL) ? muchTracks->GetEntriesFast() : 0;
238  Int_t tofTrackNo = (tofTracks != NULL) ? tofTracks->GetEntriesFast() : 0;
239 
240  for (size_t iTrack = 0; iTrack < litTracks.size(); iTrack++) {
241  const CbmLitTrack* litTrack = litTracks[iTrack];
242 
243  if (litTrack->GetQuality() == kLITBAD) { continue; }
244  if (litTrack->GetNofHits() < 1) { continue; }
245  if (static_cast<size_t>(litTrack->GetNofHits())
246  != litTrack->GetFitNodes().size()) {
247  LOG(ERROR) << "CbmLitConverter::LitTrackVectorToGlobalTrackArray: "
248  "unequal number of hits and fit nodes"
249  << std::endl
250  << litTrack->ToString();
251  continue;
252  }
253 
254  CbmGlobalTrack* globalTrack = static_cast<CbmGlobalTrack*>(
255  globalTracks->At(litTrack->GetPreviousTrackId()));
256 
257  // Set last parameter of the CbmGlobal track to be last parameter of CbmLitTrack
258  FairTrackParam parLast;
260  litTrack->GetParamLast(), &parLast);
261  globalTrack->SetParamLast(&parLast);
262 
263  Bool_t isCreateMuchTrack = false, isCreateTrdTrack = false;
264  for (Int_t iHit = 0; iHit < litTrack->GetNofHits(); iHit++) {
265  const CbmLitHit* thisHit = litTrack->GetHit(iHit);
266  LitSystemId thisDetId = thisHit->GetSystem();
267  if (thisDetId == kLITMUCH && muchTracks != NULL) {
268  isCreateMuchTrack = true;
269  }
270  if (thisDetId == kLITTRD && trdTracks != NULL) {
271  isCreateTrdTrack = true;
272  }
273  }
274  if (isCreateTrdTrack) {
275  CbmTrdTrack* track = new ((*trdTracks)[trdTrackNo]) CbmTrdTrack();
276  CbmLitTrackToCbmTrack(litTrack, track, kLITTRD);
277  globalTrack->SetTrdTrackIndex(trdTrackNo);
278 
279  if (event) event->AddData(ECbmDataType::kTrdTrack, trdTrackNo);
280 
281  ++trdTrackNo;
282  }
283  if (isCreateMuchTrack) {
284  CbmMuchTrack* track = new ((*muchTracks)[muchTrackNo]) CbmMuchTrack();
285  CbmLitTrackToCbmTrack(litTrack, track, kLITMUCH);
286  globalTrack->SetMuchTrackIndex(muchTrackNo);
287 
288  if (event) event->AddData(ECbmDataType::kMuchTrack, muchTrackNo);
289 
290  ++muchTrackNo;
291  }
292  }
293 
294  for (size_t iTrack = 0; iTrack < litTofTracks.size(); iTrack++) {
295  const CbmLitTofTrack* litTofTrack = litTofTracks[iTrack];
296  CbmTofTrack* track = new ((*tofTracks)[tofTrackNo++]) CbmTofTrack();
297  Int_t globalTrackId = litTofTrack->GetTrack()->GetPreviousTrackId();
298  Int_t tofHitId = litTofTrack->GetHit()->GetRefId();
299  track->SetTofHitIndex(tofHitId);
300  track->SetTrackIndex(globalTrackId);
301  track->SetDistance(litTofTrack->GetDistance());
302  FairTrackParam par;
304  litTofTrack->GetTrackParam(), &par);
305  track->SetTrackParameter(&par);
306 
307  CbmGlobalTrack* globalTrack =
308  static_cast<CbmGlobalTrack*>(globalTracks->At(globalTrackId));
309  globalTrack->SetTofHitIndex(tofHitId);
310 
311  if (event) event->AddData(ECbmDataType::kTofHit, tofHitId);
312  }
313  }
314 
315  static void HitArrayToHitVector(CbmEvent* event,
316  ECbmDataType hitDataType,
317  const TClonesArray* hits,
318  HitPtrVector& litHits) {
319  Int_t nofHits =
320  event ? event->GetNofData(hitDataType) : hits->GetEntriesFast();
321  for (Int_t i = 0; i < nofHits; ++i) {
322  Int_t iHit = event ? event->GetIndex(hitDataType, i) : i;
323  CbmHit* hit = (CbmHit*) hits->At(iHit);
324  if (NULL == hit) { continue; }
325  CbmLitPixelHit* litHit = new CbmLitPixelHit();
326  CbmPixelHit* pixelHit = static_cast<CbmPixelHit*>(hit);
327  CbmPixelHitToCbmLitPixelHit(pixelHit, iHit, litHit);
328  litHits.push_back(litHit);
329  }
330  }
331 
332  static void MvdHitArrayToHitVector(const TClonesArray* hits,
333  HitPtrVector& litHits) {
334  Int_t nofHits = hits->GetEntriesFast();
335  for (Int_t iHit = 0; iHit < nofHits; iHit++) {
336  CbmMvdHit* hit = static_cast<CbmMvdHit*>(hits->At(iHit));
337  if (NULL == hit) { continue; }
338  CbmLitPixelHit* litHit = new CbmLitPixelHit();
339  CbmMvdHitToCbmLitPixelHit(hit, iHit, litHit);
340  litHits.push_back(litHit);
341  }
342  }
343 
345  const TClonesArray* tracks,
346  TrackPtrVector& litTracks) {
347  Int_t nofTracks = event ? event->GetNofData(ECbmDataType::kStsTrack)
348  : tracks->GetEntriesFast();
349  for (Int_t i = 0; i < nofTracks; ++i) {
350  Int_t iTrack = event ? event->GetIndex(ECbmDataType::kStsTrack, i) : i;
351  CbmStsTrack* track = (CbmStsTrack*) tracks->At(iTrack);
352  if (track == NULL) { continue; }
353  if (track->GetParamLast()->GetQp() == 0) { continue; }
354  CbmLitTrack* litTrack = new CbmLitTrack;
355  CbmStsTrackToCbmLitTrack(track, litTrack);
356  litTrack->SetPreviousTrackId(iTrack);
357  litTrack->SetRefId(iTrack);
358  litTracks.push_back(litTrack);
359  }
360  }
361 
362  static void GetStsTrackTimes(const CbmStsTrack* track,
363  Double_t& firstTime,
364  Double_t& lastTime) {
365  static FairRootManager* ioman = 0;
366  static CbmVertex* primVertex = 0;
367  static TClonesArray* stsHits = 0;
368  static TClonesArray* mvdHits = 0;
369  static TrackPropagatorPtr propagator;
370  static TrackUpdatePtr filter;
371  static bool init = false;
372  static Int_t pdg = 211;
373 
374  if (!init) {
375  init = true;
376  ioman = FairRootManager::Instance();
377 
378  if (0 != ioman) {
379  primVertex = static_cast<CbmVertex*>(ioman->GetObject("PrimaryVertex"));
380  stsHits = static_cast<TClonesArray*>(ioman->GetObject("StsHit"));
381  mvdHits = static_cast<TClonesArray*>(ioman->GetObject("MvdHit"));
382  }
383 
384  propagator = CbmLitToolFactory::CreateTrackPropagator("lit");
385  filter = CbmLitToolFactory::CreateTrackUpdate("kalman");
386  }
387 
388  Double_t xVert = primVertex ? primVertex->GetX() : 0;
389  Double_t yVert = primVertex ? primVertex->GetY() : 0;
390  Double_t zVert = primVertex ? primVertex->GetZ() : 0;
391  CbmLitTrackParam paramFirst;
392  CbmLitTrackParam paramLast;
393  CbmTrackParam cbmParamFirst;
394  cbmParamFirst.Set(
395  *track->GetParamFirst(), track->GetTime(), track->GetTimeError());
397  &cbmParamFirst, &paramFirst);
398  CbmTrackParam cbmParamLast;
399  cbmParamLast.Set(
400  *track->GetParamLast(), track->GetTime(), track->GetTimeError());
402  &cbmParamLast, &paramLast);
403 
404  Double_t x = paramFirst.GetX();
405  Double_t y = paramFirst.GetY();
406  Double_t z = paramFirst.GetZ();
407  //Double_t p = paramFirst.GetQp() ? TMath::Abs(1 / paramFirst.GetQp()) : 1; (VF) unused
408  CbmLitTrackParam par = paramFirst;
409  Double_t deltaTFirst = 0;
410 
411  if (propagator->Propagate(&par, zVert, pdg) == kLITERROR)
412  deltaTFirst =
413  -TMath::Sqrt(TMath::Power(x - xVert, 2) + TMath::Power(y - yVert, 2)
414  + TMath::Power(z - zVert, 2))
416  else
417  deltaTFirst = par.GetTime() - paramFirst.GetTime();
418 
419  if (deltaTFirst > 0) deltaTFirst = -deltaTFirst;
420 
421  paramFirst.SetTime(paramFirst.GetTime() - deltaTFirst);
422  firstTime = paramFirst.GetTime();
423  par = paramFirst;
424  //int nofHits = track->GetNofHits();
425  int nofMvdHits = track->GetNofMvdHits();
426  int nofStsHits = track->GetNofStsHits();
427  int nofHits = nofMvdHits + nofStsHits;
428  Double_t deltaTLast = 0;
429 
430  for (int i = 1; i < nofHits; ++i) {
431  //HitType hitType = track->GetHitType(i);
432  HitType hitType = (i < nofMvdHits) ? kMVDHIT : kSTSHIT;
433  //Int_t hitInd = track->GetHitIndex(i);
434  Int_t hitInd = (i < nofMvdHits) ? track->GetMvdHitIndex(i)
435  : track->GetStsHitIndex(i - nofMvdHits);
436  CbmPixelHit* hit = static_cast<CbmPixelHit*>(
437  kMVDHIT == hitType ? mvdHits->At(hitInd) : stsHits->At(hitInd));
438 
439  if (i == nofHits - 1)
440  z = paramLast.GetZ();
441  else
442  z = hit->GetZ();
443 
444  if (propagator->Propagate(&par, z, pdg) == kLITERROR) {
445  deltaTLast =
446  TMath::Sqrt(TMath::Power(paramLast.GetX() - paramFirst.GetX(), 2)
447  + TMath::Power(paramLast.GetY() - paramFirst.GetY(), 2)
448  + TMath::Power(paramLast.GetZ() - paramFirst.GetZ(), 2))
450  break;
451  }
452 
453  CbmLitPixelHit litHit;
454  CbmPixelHitToCbmLitPixelHit(hit, hitInd, &litHit);
455  litfloat chi = 0;
456  filter->Update(&par, &litHit, chi);
457  }
458 
459  if (0 == deltaTLast)
460  lastTime = par.GetTime();
461  else
462  lastTime = firstTime + deltaTLast;
463  }
464 };
465 
466 #endif /*CBMLITCONVERTER_H_*/
CbmLitTrackParam.h
Data class for track parameters.
CbmLitToolFactory::CreateTrackPropagator
static TrackPropagatorPtr CreateTrackPropagator(const string &name)
Create track propagation tool by name.
Definition: CbmLitToolFactory.cxx:58
CbmLitHit::SetZ
void SetZ(litfloat z)
Definition: CbmLitHit.h:62
CbmHit::GetZ
Double_t GetZ() const
Definition: CbmHit.h:70
CbmTrack::GetChiSq
Double_t GetChiSq() const
Definition: CbmTrack.h:58
litfloat
double litfloat
Definition: CbmLitFloat.h:15
CbmVertex.h
CbmTrack::GetParamLast
const FairTrackParam * GetParamLast() const
Definition: CbmTrack.h:62
CbmLitTrack::GetFitNode
const CbmLitFitNode * GetFitNode(Int_t index) const
Definition: CbmLitTrack.h:67
kLITGOOD
@ kLITGOOD
Definition: CbmLitEnums.h:32
CbmPixelHit::GetDxy
Double_t GetDxy() const
Definition: CbmPixelHit.h:87
CbmLitStripHit.h
Base data class for strip hits.
CbmTrdAddress.h
Helper class to convert unique channel ID back and forth.
CbmPixelHit::GetX
Double_t GetX() const
Definition: CbmPixelHit.h:83
TofTrackPtrVector
vector< CbmLitTofTrack * > TofTrackPtrVector
Definition: CbmLitTypes.h:32
CbmTofTrack.h
CbmTrack::GetNofHits
virtual Int_t GetNofHits() const
Definition: CbmTrack.h:53
CbmLitTrackParam::GetX
litfloat GetX() const
Definition: CbmLitTrackParam.h:53
kMVDHIT
@ kMVDHIT
Definition: CbmHit.h:21
CbmPixelHit::GetY
Double_t GetY() const
Definition: CbmPixelHit.h:84
CbmTrack::GetFlag
Int_t GetFlag() const
Definition: CbmTrack.h:57
CbmLitPixelHit::SetY
void SetY(litfloat y)
Definition: CbmLitPixelHit.h:45
CbmPixelHit::GetDx
Double_t GetDx() const
Definition: CbmPixelHit.h:85
CbmLitFitNode::GetUpdatedParam
const CbmLitTrackParam * GetUpdatedParam() const
Definition: CbmLitFitNode.h:42
TrackPropagatorPtr
boost::shared_ptr< CbmLitTrackPropagator > TrackPropagatorPtr
Definition: CbmTofPtrTypes.h:23
CbmGlobalTrack::SetParamLast
void SetParamLast(const FairTrackParam *parLast)
Definition: CbmGlobalTrack.h:62
CbmGlobalTrack::SetTrdTrackIndex
void SetTrdTrackIndex(Int_t iTrd)
Definition: CbmGlobalTrack.h:55
CbmLitTrackParam
Data class for track parameters.
Definition: CbmLitTrackParam.h:29
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
kTOFHIT
@ kTOFHIT
Definition: CbmHit.h:26
CbmLitConverter::CbmTrackToCbmLitTrack
static void CbmTrackToCbmLitTrack(const CbmTrack *track, const HitPtrVector &lhits, CbmLitTrack *ltrack)
Definition: CbmLitConverter.h:129
TrackUpdatePtr
boost::shared_ptr< CbmLitTrackUpdate > TrackUpdatePtr
Definition: CbmTofPtrTypes.h:26
CbmLitTrackParam::GetY
litfloat GetY() const
Definition: CbmLitTrackParam.h:54
kLITTOF
@ kLITTOF
Definition: CbmLitEnums.h:43
CbmMvdHit::GetStationNr
virtual Int_t GetStationNr() const
Definition: CbmMvdHit.h:61
CbmTofTrack::SetTrackIndex
void SetTrackIndex(Int_t trackIndex)
Definition: CbmTofTrack.h:92
CbmLitTrack::SetParamFirst
void SetParamFirst(const CbmLitTrackParam *par)
Definition: CbmLitTrack.h:81
CbmLitFitNode.h
Data class for storage of fitted track parameters, transport matrix and chi-square on each detector s...
CbmGlobalTrack.h
CbmTrack::SetPreviousTrackId
void SetPreviousTrackId(Int_t previousTrackId)
Definition: CbmTrack.h:72
CbmLitTrack::SetPreviousTrackId
void SetPreviousTrackId(Int_t id)
Definition: CbmLitTrack.h:79
CbmLitHit::GetRefId
Int_t GetRefId() const
Definition: CbmLitHit.h:46
CbmLitTofTrack::GetHit
const CbmLitHit * GetHit() const
Definition: CbmLitTofTrack.h:37
CbmLitPixelHit.h
Base data class for pixel hits.
ECbmDataType::kTofHit
@ kTofHit
CbmLitConverter::HitArrayToHitVector
static void HitArrayToHitVector(CbmEvent *event, ECbmDataType hitDataType, const TClonesArray *hits, HitPtrVector &litHits)
Definition: CbmLitConverter.h:315
CbmTrack::SetParamLast
void SetParamLast(const FairTrackParam *par)
Definition: CbmTrack.h:76
CbmLitTofTrack::GetDistance
litfloat GetDistance() const
Definition: CbmLitTofTrack.h:39
CbmTrack::SetNDF
void SetNDF(Int_t ndf)
Definition: CbmTrack.h:71
CbmLitHit::SetDetectorId
void SetDetectorId(LitSystemId sysId, Int_t station)
Definition: CbmLitHit.h:66
CbmTrackParam::Set
void Set(const FairTrackParam &ftp, Double_t time=0., Double_t timeError=0.)
Definition: CbmTrackParam.cxx:12
CbmLitTrack::SetParamLast
void SetParamLast(const CbmLitTrackParam *par)
Definition: CbmLitTrack.h:82
CbmPixelHit::GetDy
Double_t GetDy() const
Definition: CbmPixelHit.h:86
CbmVertex::GetX
Double_t GetX() const
Definition: CbmVertex.h:68
CbmHit::GetTimeError
Double_t GetTimeError() const
Definition: CbmHit.h:76
CbmLitConverterFairTrackParam::CbmLitTrackParamToFairTrackParam
static void CbmLitTrackParamToFairTrackParam(const CbmLitTrackParam *litPar, FairTrackParam *par)
Definition: CbmLitConverterFairTrackParam.h:110
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
CbmLitHit::SetDt
void SetDt(litfloat dt)
Definition: CbmLitHit.h:65
CbmMuchTrack
Definition: CbmMuchTrack.h:16
CbmHit::GetPlaneId
virtual Int_t GetPlaneId() const
Definition: CbmHit.h:97
CbmMvdHit
Definition: CbmMvdHit.h:29
CbmTrack::SetFlag
void SetFlag(Int_t flag)
Definition: CbmTrack.h:69
CbmLitTrack::SetPDG
void SetPDG(Int_t pdg)
Definition: CbmLitTrack.h:80
CbmLitTrack::SetNDF
void SetNDF(Int_t ndf)
Definition: CbmLitTrack.h:78
CbmLitEnums.h
Define enumerations used in littrack.
CbmLitTrackParam::SetTime
void SetTime(litfloat t)
Definition: CbmLitTrackParam.h:70
CbmStsTrack::GetNofMvdHits
Int_t GetNofMvdHits() const
Definition: CbmStsTrack.h:84
CbmLitTrack::SetLastStationId
void SetLastStationId(Int_t lastPlaneId)
Definition: CbmLitTrack.h:85
CbmEvent.h
ECbmDataType::kStsTrack
@ kStsTrack
CbmLitTrack::GetFitNodes
const vector< CbmLitFitNode > & GetFitNodes() const
Definition: CbmLitTrack.h:70
CbmTofTrack::SetTrackParameter
void SetTrackParameter(const FairTrackParam *par)
Definition: CbmTofTrack.h:98
CbmTrack
Definition: CbmTrack.h:32
CbmStsTrack.h
Data class for STS tracks.
CbmHit.h
CbmGlobalTrack::SetStsTrackIndex
void SetStsTrackIndex(Int_t iSts)
Definition: CbmGlobalTrack.h:54
CbmLitHit::SetRefId
void SetRefId(Int_t refId)
Definition: CbmLitHit.h:60
kLITMUCH
@ kLITMUCH
Definition: CbmLitEnums.h:41
CbmLitTrack::GetPreviousTrackId
Int_t GetPreviousTrackId() const
Definition: CbmLitTrack.h:60
CbmMuchTrack.h
TrackPtrVector
std::vector< CbmTofTrack * > TrackPtrVector
Definition: CbmTofTypes.h:22
CbmLitTofTrack::GetTrack
const CbmLitTrack * GetTrack() const
Definition: CbmLitTofTrack.h:36
CbmLitHit
Base data class for hits.
Definition: CbmLitHit.h:26
tracks
TClonesArray * tracks
Definition: Analyze_matching.h:17
CbmLitTrackParam::GetZ
litfloat GetZ() const
Definition: CbmLitTrackParam.h:55
CbmTrack.h
ECbmDataType
ECbmDataType
Definition: CbmDefs.h:76
HitType
HitType
Definition: CbmHit.h:16
CbmLitConverter::MvdHitArrayToHitVector
static void MvdHitArrayToHitVector(const TClonesArray *hits, HitPtrVector &litHits)
Definition: CbmLitConverter.h:332
CbmStripHit.h
CbmLitTofTrack
Definition: CbmLitTofTrack.h:21
CbmHit::GetTime
Double_t GetTime() const
Definition: CbmHit.h:75
CbmLitConverterFairTrackParam.h
CbmTrack::GetHitIndex
Int_t GetHitIndex(Int_t iHit) const
Definition: CbmTrack.h:54
CbmLitHit::SetT
void SetT(litfloat t)
Definition: CbmLitHit.h:64
CbmVertex
Definition: CbmVertex.h:26
kLITERROR
@ kLITERROR
Definition: CbmLitEnums.h:25
CbmLitTrack
Base data class for track.
Definition: CbmLitTrack.h:30
CbmLitPixelHit
Base data class for pixel hits.
Definition: CbmLitPixelHit.h:22
CbmTrack::SetChiSq
void SetChiSq(Double_t chiSq)
Definition: CbmTrack.h:70
kLITPIXELHIT
@ kLITPIXELHIT
Definition: CbmLitEnums.h:16
CbmTrack::GetNDF
Int_t GetNDF() const
Definition: CbmTrack.h:59
CbmVertex::GetZ
Double_t GetZ() const
Definition: CbmVertex.h:70
CbmLitConverter
Definition: CbmLitConverter.h:44
CbmTrack::GetPreviousTrackId
Int_t GetPreviousTrackId() const
Definition: CbmTrack.h:60
kLITBAD
@ kLITBAD
Definition: CbmLitEnums.h:33
CbmPixelHit.h
kPIXELHIT
@ kPIXELHIT
Definition: CbmHit.h:18
CbmTrack::GetHitType
HitType GetHitType(Int_t iHit) const
Definition: CbmTrack.h:55
CbmLitTrack::ToString
string ToString() const
Return string representation of class.
Definition: CbmLitTrack.h:143
CbmLitConverter::CbmStsTrackToCbmLitTrack
static void CbmStsTrackToCbmLitTrack(const CbmStsTrack *stsTrack, CbmLitTrack *litTrack)
Definition: CbmLitConverter.h:99
ECbmDataType::kMuchTrack
@ kMuchTrack
CbmTrack::GetParamFirst
const FairTrackParam * GetParamFirst() const
Definition: CbmTrack.h:61
CbmLitTrack::GetParamLast
const CbmLitTrackParam * GetParamLast() const
Definition: CbmLitTrack.h:63
CbmLitTrack::SetRefId
void SetRefId(Int_t refId)
Definition: CbmLitTrack.h:90
kTRDHIT
@ kTRDHIT
Definition: CbmHit.h:25
CbmTrdTrack
Definition: CbmTrdTrack.h:22
CbmGlobalTrack
Definition: CbmGlobalTrack.h:26
CbmLitTofTrack::GetTrackParam
const CbmLitTrackParam * GetTrackParam() const
Definition: CbmLitTofTrack.h:38
CbmTofTrack::SetTofHitIndex
void SetTofHitIndex(Int_t tofHitIndex)
Definition: CbmTofTrack.h:95
CbmLitTrack::SetQuality
void SetQuality(LitTrackQa quality)
Definition: CbmLitTrack.h:76
CbmLitPixelHit::SetDx
void SetDx(litfloat dx)
Definition: CbmLitPixelHit.h:46
LitHitType
LitHitType
Definition: CbmLitEnums.h:14
CbmTofTrack::SetDistance
void SetDistance(Double_t distance)
Definition: CbmTofTrack.h:110
CbmLitTofTrack.h
ECbmDataType::kTrdTrack
@ kTrdTrack
CbmVertex::GetY
Double_t GetY() const
Definition: CbmVertex.h:69
CbmLitHit::SetDz
void SetDz(litfloat dz)
Definition: CbmLitHit.h:63
CbmLitToolFactory::CreateTrackUpdate
static TrackUpdatePtr CreateTrackUpdate(const string &name)
Create track update tool by name.
Definition: CbmLitToolFactory.cxx:73
kSTSHIT
@ kSTSHIT
Definition: CbmHit.h:20
CbmHit
Definition: CbmHit.h:38
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
LitSystemId
LitSystemId
Definition: CbmLitEnums.h:40
CbmMvdHit.h
CbmLitPixelHit::SetDy
void SetDy(litfloat dy)
Definition: CbmLitPixelHit.h:47
CbmTrackParam
Definition: CbmTrackParam.h:22
ECbmDataType::kGlobalTrack
@ kGlobalTrack
CbmLitTypes.h
Typedefs for data structures used in littrack.
CbmLitFitNode::GetChiSqFiltered
litfloat GetChiSqFiltered() const
Definition: CbmLitFitNode.h:44
CbmLitPixelHit::SetDxy
void SetDxy(litfloat dxy)
Definition: CbmLitPixelHit.h:48
CbmLitConverter::StsTrackArrayToTrackVector
static void StsTrackArrayToTrackVector(CbmEvent *event, const TClonesArray *tracks, TrackPtrVector &litTracks)
Definition: CbmLitConverter.h:344
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmLitTrack.h
Base data class for track.
CbmGlobalTrack::SetMuchTrackIndex
void SetMuchTrackIndex(Int_t iMuch)
Definition: CbmGlobalTrack.h:56
CbmTrack::SetParamFirst
void SetParamFirst(const FairTrackParam *par)
Definition: CbmTrack.h:75
hits
static vector< vector< QAHit > > hits
Definition: CbmTofHitFinderTBQA.cxx:114
CbmEvent
Class characterising one event by a collection of links (indices) to data objects,...
Definition: CbmEvent.h:30
CbmStsTrack::GetMvdHitIndex
Int_t GetMvdHitIndex(Int_t iHit) const
Definition: CbmStsTrack.h:70
CbmPixelHit
Definition: CbmPixelHit.h:21
kMUCHPIXELHIT
@ kMUCHPIXELHIT
Definition: CbmHit.h:23
CbmTrack::GetPidHypo
Int_t GetPidHypo() const
Definition: CbmTrack.h:56
CbmTrack::GetTime
Double_t GetTime() const
Definition: CbmTrack.h:64
CbmGlobalTrack::SetTofHitIndex
void SetTofHitIndex(Int_t iTofHit)
Definition: CbmGlobalTrack.h:58
kLITMVD
@ kLITMVD
Definition: CbmLitEnums.h:44
kLITTRD
@ kLITTRD
Definition: CbmLitEnums.h:42
CbmLitPixelHit::SetX
void SetX(litfloat x)
Definition: CbmLitPixelHit.h:44
CbmMuchGeoScheme.h
CbmTrdTrack.h
CbmStsTrack::GetStsHitIndex
Int_t GetStsHitIndex(Int_t iHit) const
Definition: CbmStsTrack.h:98
CbmLitHit::GetSystem
LitSystemId GetSystem() const
Definition: CbmLitHit.h:52
CbmStsTrack
Definition: CbmStsTrack.h:37
CbmLitTrackParam::GetTime
litfloat GetTime() const
Definition: CbmLitTrackParam.h:59
CbmLitConverter::CbmMvdHitToCbmLitPixelHit
static void CbmMvdHitToCbmLitPixelHit(const CbmMvdHit *hit, Int_t index, CbmLitPixelHit *litHit)
Definition: CbmLitConverter.h:82
CbmLitTrack::GetQuality
LitTrackQa GetQuality() const
Definition: CbmLitTrack.h:57
CbmTrack::GetTimeError
Double_t GetTimeError() const
Definition: CbmTrack.h:65
CbmLitTrack::GetHit
const CbmLitHit * GetHit(Int_t index) const
Definition: CbmLitTrack.h:65
CbmTrack::AddHit
void AddHit(Int_t index, HitType type)
Definition: CbmTrack.cxx:75
CbmLitConverter::CbmPixelHitToCbmLitPixelHit
static void CbmPixelHitToCbmLitPixelHit(const CbmPixelHit *hit, Int_t index, CbmLitPixelHit *litHit)
Definition: CbmLitConverter.h:46
CbmLitHit::GetType
LitHitType GetType() const
Definition: CbmLitHit.h:47
CbmHit::GetType
HitType GetType() const
Definition: CbmHit.h:69
CbmLitTrack::AddHit
void AddHit(const CbmLitHit *hit)
Add hit to track. No additional memory is allocated for hit.
Definition: CbmLitTrack.h:96
CbmLitHit.h
Base data class for hits.
CbmLitTrack::SetChi2
void SetChi2(litfloat chi2)
Definition: CbmLitTrack.h:77
CbmLitTrack::GetNofHits
Int_t GetNofHits() const
Definition: CbmLitTrack.h:56
CbmLitConverterFairTrackParam::FairTrackParamToCbmLitTrackParam
static void FairTrackParamToCbmLitTrackParam(const FairTrackParam *par, CbmLitTrackParam *litPar)
Definition: CbmLitConverterFairTrackParam.h:40
CbmHit::GetDz
Double_t GetDz() const
Definition: CbmHit.h:71
CbmLitConverter::GetStsTrackTimes
static void GetStsTrackTimes(const CbmStsTrack *track, Double_t &firstTime, Double_t &lastTime)
Definition: CbmLitConverter.h:362
CbmTofTrack
Provides information on attaching a TofHit to a GlobalTrack.
Definition: CbmTofTrack.h:20
CbmLitTrackParam::fSpeedOfLight
static litfloat fSpeedOfLight
Definition: CbmLitTrackParam.h:31
HitPtrVector
std::vector< CbmTofHit * > HitPtrVector
Definition: CbmTofTypes.h:14
CbmLitConverter::CbmLitTrackToCbmTrack
static void CbmLitTrackToCbmTrack(const CbmLitTrack *litTrack, CbmTrack *track, LitSystemId systemId)
Definition: CbmLitConverter.h:175
CbmStsTrack::GetNofStsHits
Int_t GetNofStsHits() const
Definition: CbmStsTrack.h:90
CbmLitConverter::CbmTrackArrayToCbmLitTrackArray
static void CbmTrackArrayToCbmLitTrackArray(const TClonesArray *tracks, const HitPtrVector &lhits, TrackPtrVector &ltracks)
Definition: CbmLitConverter.h:163