CbmRoot
Loading...
Searching...
No Matches
CbmLitFindGlobalTracks.h
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
21#ifndef CBMLITFINDGLOBALTRACKS_H_
22#define CBMLITFINDGLOBALTRACKS_H_
23
24#include "CbmVertex.h"
25#include "FairTask.h"
26#include "TStopwatch.h"
28#include "base/CbmLitPtrTypes.h"
29#include "base/CbmLitTypes.h"
30#include "data/CbmLitHit.h"
31
32#include <string>
33#include <vector>
34
35class TClonesArray;
36class CbmEvent;
37
38using std::string;
39using std::vector;
40
41class CbmLitFindGlobalTracks : public FairTask {
42 public:
47
52
56 virtual InitStatus Init();
57
61 virtual void Exec(Option_t* opt);
62
66 virtual void Finish();
67
71 virtual void SetParContainers();
72
73 /* Setters */
74 void SetTrackingType(const string& trackingType) { fTrackingType = trackingType; }
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
118
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
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
182
183 // stopwatches
184 TStopwatch fTrackingWatch; // stopwatch for tracking
185 TStopwatch fMergerWatch; // stopwatch for merger
186
187 // counters
188 Long64_t fNofTs = 0; // timeslice counter
189 Long64_t fNofEvents = 0; // event counter
190 Long64_t fNofStsTracks = 0; // STS tracks
191 Long64_t fNofMuchHits = 0; // MUCH hits
192 Long64_t fNofTrdHits = 0; // TRD hits
193 Long64_t fNofTofHits = 0; // TOF hits
194 Long64_t fNofGlbTracks = 0; // Global tracks
195 Double_t fTime = 0.; // Processing time
196 Long64_t fEventNo; // event counter (old)
197
200
202};
203
204#endif /* CBMLITFINDGLOBALTRACKS_H_ */
Helper class to access detector presence.
Base data class for hits.
Typedefs for algorithm interfaces.
Typedefs for data structures used in littrack.
vector< CbmLitTofTrack * > TofTrackPtrVector
Definition CbmLitTypes.h:37
boost::shared_ptr< CbmLitTrackFitter > TrackFitterPtr
boost::shared_ptr< CbmLitTrackFinder > TrackFinderPtr
boost::shared_ptr< CbmLitTrackPropagator > TrackPropagatorPtr
boost::shared_ptr< CbmLitHitToTrackMerger > HitToTrackMergerPtr
std::vector< CbmTofTrack * > TrackPtrVector
Definition CbmTofTypes.h:26
std::vector< CbmTofHit * > HitPtrVector
Definition CbmTofTypes.h:20
Class characterising one event by a collection of links (indices) to data objects,...
Definition CbmEvent.h:34
Helper class to access detector presence.
virtual void Finish()
Inherited from FairTask.
void ConvertOutputData(CbmEvent *event)
Convert output data LIT data classes to CBMROOT data classes.
void SetFitterType(const string &fitterType)
void SetMergerType(const string &mergerType)
TofTrackPtrVector fLitOutputTofTracks
CbmLitFindGlobalTracks & operator=(const CbmLitFindGlobalTracks &)
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.
CbmLitFindGlobalTracks(const CbmLitFindGlobalTracks &)
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)
ClassDef(CbmLitFindGlobalTracks, 1)
void SetTrackingType(const string &trackingType)