CbmRoot
CbmLitFindGlobalTracks.h
Go to the documentation of this file.
1 
17 #ifndef CBMLITFINDGLOBALTRACKS_H_
18 #define CBMLITFINDGLOBALTRACKS_H_
19 
20 #include "FairTask.h"
21 
22 #include "CbmVertex.h"
24 #include "base/CbmLitPtrTypes.h"
25 #include "base/CbmLitTypes.h"
26 #include "data/CbmLitHit.h"
27 
28 #include "TStopwatch.h"
29 
30 #include <string>
31 #include <vector>
32 
33 class TClonesArray;
34 class CbmEvent;
35 
36 using std::string;
37 using std::vector;
38 
39 class CbmLitFindGlobalTracks : public FairTask {
40 public:
45 
49  virtual ~CbmLitFindGlobalTracks();
50 
54  virtual InitStatus Init();
55 
59  virtual void Exec(Option_t* opt);
60 
64  virtual void Finish();
65 
69  virtual void SetParContainers();
70 
71  /* Setters */
72  void SetTrackingType(const string& trackingType) {
73  fTrackingType = trackingType;
74  }
75  void SetMergerType(const string& mergerType) { fMergerType = mergerType; }
76  void SetFitterType(const string& fitterType) { fFitterType = fitterType; }
77 
78 private:
83 
87  void ConvertInputData(CbmEvent* event);
88 
92  void ConvertOutputData(CbmEvent* event);
93 
94  /*
95  * \brief Calculate length of the global track
96  */
97  void CalculateLength(CbmEvent* event);
98 
99  /*
100  * \brief Calculate and set the parameter set in the primary vertex of the global track
101  */
103 
107  void ClearArrays();
108 
112  void ReadInputBranches();
113 
117  void RegisterOutputBranches();
118 
122  void RunTrackReconstruction();
123 
128 
133 
135 
136  // Pointers to data arrays
137  // Input
138  TClonesArray* fMvdHits; // CbmMvdHit array
139  TClonesArray* fStsTracks; // CbmStsTrack array
140  TClonesArray* fStsHits; // CbmStsHit
141  TClonesArray* fMuchPixelHits; // CbmMuchPixelHit array
142  TClonesArray* fTrdHits; // CbmTrdHit array
143  TClonesArray* fTofHits; // CbmTofHit array
144  TClonesArray* fEvents;
145  // Output
146  TClonesArray* fMuchTracks; // output CbmMuchTrack array
147  TClonesArray* fTrdTracks; // output CbmTrdTrack array
148  TClonesArray* fTofTracks; // output CbmTofTrack array
149  TClonesArray* fGlobalTracks; //output CbmGlobalTrack array
150 
151  CbmVertex* fPrimVertex; // Pointer to the primary vertex
152 
153  // LIT data arrays
155  HitPtrVector fLitHits; // MUCH+TRD hits
157  TrackPtrVector fLitOutputTracks; // output Lit tracks
158  TofTrackPtrVector fLitOutputTofTracks; // output Lit TOF tracks
159 
160  // Tools
161  TrackFinderPtr fFinder; // track finder
162  HitToTrackMergerPtr fMerger; // hit-to-track merger
163  TrackFitterPtr fFitter; // track fitter
164  // track propagator
165  // Used to propagate STS track to the last STS station!!!
166  // Since this cannot be done in parallel mode!!!
168 
169  // Settings
170  // Tracking method to be used
171  // "branch" - branching method
172  // "nn" - nearest neighbor method
174 
175  // Merger method to be used
176  // "nearest_hit" - assigns nearest hit to the track
177  string fMergerType;
178 
179  // Track fitter to be used for the final track fit
180  // "lit_kalman" - forward Kalman track fit with LIT propagation and TGeo navigation
181  string fFitterType;
182 
183  // stopwatches
184  TStopwatch fTrackingWatch; // stopwatch for tracking
185  TStopwatch fMergerWatch; // stopwatch for merger
186 
187  Int_t fEventNo; // event counter
188 
191 
193 };
194 
195 #endif /* CBMLITFINDGLOBALTRACKS_H_ */
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
CbmLitFindGlobalTracks::fLitTofHits
HitPtrVector fLitTofHits
Definition: CbmLitFindGlobalTracks.h:156
CbmVertex.h
CbmLitFindGlobalTracks::InitTrackReconstruction
void InitTrackReconstruction()
Create and initialize track finder and track merger objects.
Definition: CbmLitFindGlobalTracks.cxx:257
TofTrackPtrVector
vector< CbmLitTofTrack * > TofTrackPtrVector
Definition: CbmLitTypes.h:32
CbmLitFindGlobalTracks::fMerger
HitToTrackMergerPtr fMerger
Definition: CbmLitFindGlobalTracks.h:162
CbmLitFindGlobalTracks::Init
virtual InitStatus Init()
Inherited from FairTask.
Definition: CbmLitFindGlobalTracks.cxx:80
TrackPropagatorPtr
boost::shared_ptr< CbmLitTrackPropagator > TrackPropagatorPtr
Definition: CbmTofPtrTypes.h:23
CbmLitFindGlobalTracks::fTrdHits
TClonesArray * fTrdHits
Definition: CbmLitFindGlobalTracks.h:142
CbmLitFindGlobalTracks::fMuchPixelHits
TClonesArray * fMuchPixelHits
Definition: CbmLitFindGlobalTracks.h:141
CbmLitFindGlobalTracks::fStsHits
TClonesArray * fStsHits
Definition: CbmLitFindGlobalTracks.h:140
CbmLitFindGlobalTracks::fLitHits
HitPtrVector fLitHits
Definition: CbmLitFindGlobalTracks.h:155
CbmLitFindGlobalTracks
Definition: CbmLitFindGlobalTracks.h:39
CbmLitFindGlobalTracks::fMergerWatch
TStopwatch fMergerWatch
Definition: CbmLitFindGlobalTracks.h:185
CbmLitDetectorSetup
Helper class to access detector presence.
Definition: CbmLitDetectorSetup.h:22
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
CbmLitFindGlobalTracks::ClassDef
ClassDef(CbmLitFindGlobalTracks, 1)
CbmLitFindGlobalTracks::fPropagator
TrackPropagatorPtr fPropagator
Definition: CbmLitFindGlobalTracks.h:167
CbmLitFindGlobalTracks::fTofTracks
TClonesArray * fTofTracks
Definition: CbmLitFindGlobalTracks.h:148
CbmLitFindGlobalTracks::ConvertOutputData
void ConvertOutputData(CbmEvent *event)
Convert output data LIT data classes to CBMROOT data classes.
Definition: CbmLitFindGlobalTracks.cxx:330
CbmLitFindGlobalTracks::SetMergerType
void SetMergerType(const string &mergerType)
Definition: CbmLitFindGlobalTracks.h:75
CbmLitFindGlobalTracks::fFinder
TrackFinderPtr fFinder
Definition: CbmLitFindGlobalTracks.h:161
CbmLitFindGlobalTracks::fTrackingType
string fTrackingType
Definition: CbmLitFindGlobalTracks.h:173
CbmLitFindGlobalTracks::SetParContainers
virtual void SetParContainers()
Inherited from FairTask.
Definition: CbmLitFindGlobalTracks.cxx:135
CbmLitFindGlobalTracks::fTrdTracks
TClonesArray * fTrdTracks
Definition: CbmLitFindGlobalTracks.h:147
CbmLitFindGlobalTracks::fTrackingWatch
TStopwatch fTrackingWatch
Definition: CbmLitFindGlobalTracks.h:184
CbmLitFindGlobalTracks::fDet
CbmLitDetectorSetup fDet
Definition: CbmLitFindGlobalTracks.h:134
CbmLitFindGlobalTracks::CbmLitFindGlobalTracks
CbmLitFindGlobalTracks(const CbmLitFindGlobalTracks &)
TrackPtrVector
std::vector< CbmTofTrack * > TrackPtrVector
Definition: CbmTofTypes.h:22
CbmLitFindGlobalTracks::SetFitterType
void SetFitterType(const string &fitterType)
Definition: CbmLitFindGlobalTracks.h:76
CbmLitFindGlobalTracks::RunTrackReconstruction
void RunTrackReconstruction()
Run the track reconstruction.
Definition: CbmLitFindGlobalTracks.cxx:520
CbmLitFindGlobalTracks::CalculatePrimaryVertexParameters
void CalculatePrimaryVertexParameters(CbmEvent *event)
Definition: CbmLitFindGlobalTracks.cxx:481
CbmVertex
Definition: CbmVertex.h:26
CbmLitFindGlobalTracks::fEventNo
Int_t fEventNo
Definition: CbmLitFindGlobalTracks.h:187
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
TrackFitterPtr
boost::shared_ptr< CbmLitTrackFitter > TrackFitterPtr
Definition: CbmTofPtrTypes.h:24
CbmLitFindGlobalTracks::Exec
virtual void Exec(Option_t *opt)
Inherited from FairTask.
Definition: CbmLitFindGlobalTracks.cxx:100
CbmLitFindGlobalTracks::fEvents
TClonesArray * fEvents
Definition: CbmLitFindGlobalTracks.h:144
CbmLitFindGlobalTracks::SetTrackingType
void SetTrackingType(const string &trackingType)
Definition: CbmLitFindGlobalTracks.h:72
CbmLitFindGlobalTracks::fLitStsTracks
TrackPtrVector fLitStsTracks
Definition: CbmLitFindGlobalTracks.h:154
CbmLitFindGlobalTracks::PrintStopwatchStatistics
void PrintStopwatchStatistics()
Print output stopwatch statistics for track-finder and hit-to-track merger.
Definition: CbmLitFindGlobalTracks.cxx:591
CbmLitFindGlobalTracks::operator=
CbmLitFindGlobalTracks & operator=(const CbmLitFindGlobalTracks &)
CbmLitFindGlobalTracks::ConvertInputData
void ConvertInputData(CbmEvent *event)
Convert input data from CBMROOT data classes to LIT data classes.
Definition: CbmLitFindGlobalTracks.cxx:295
CbmLitFindGlobalTracks::fTofHits
TClonesArray * fTofHits
Definition: CbmLitFindGlobalTracks.h:143
CbmLitFindGlobalTracks::fGlobalTracks
TClonesArray * fGlobalTracks
Definition: CbmLitFindGlobalTracks.h:149
CbmLitFindGlobalTracks::fPrimVertex
CbmVertex * fPrimVertex
Definition: CbmLitFindGlobalTracks.h:151
CbmLitTypes.h
Typedefs for data structures used in littrack.
HitToTrackMergerPtr
boost::shared_ptr< CbmLitHitToTrackMerger > HitToTrackMergerPtr
Definition: CbmTofPtrTypes.h:30
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
CbmLitFindGlobalTracks::ReadInputBranches
void ReadInputBranches()
Accesses input data branches (hits, tracks, events) from the tree.
Definition: CbmLitFindGlobalTracks.cxx:139
CbmLitPtrTypes.h
Typedefs for algorithm interfaces.
CbmLitFindGlobalTracks::fMvdHits
TClonesArray * fMvdHits
Definition: CbmLitFindGlobalTracks.h:138
CbmLitFindGlobalTracks::fMuchTracks
TClonesArray * fMuchTracks
Definition: CbmLitFindGlobalTracks.h:146
TrackFinderPtr
boost::shared_ptr< CbmLitTrackFinder > TrackFinderPtr
Definition: CbmTofPtrTypes.h:29
CbmLitHit.h
Base data class for hits.
CbmLitDetectorSetup.h
Helper class to access detector presence.
HitPtrVector
std::vector< CbmTofHit * > HitPtrVector
Definition: CbmTofTypes.h:14
CbmLitFindGlobalTracks::SelectTracksForTofMerging
void SelectTracksForTofMerging()
Select tracks for further merging with TOF.
Definition: CbmLitFindGlobalTracks.cxx:565
CbmLitFindGlobalTracks::fLitOutputTracks
TrackPtrVector fLitOutputTracks
Definition: CbmLitFindGlobalTracks.h:157