CMS 3D CMS Logo

Make3Dtracks.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTMTT_Make3Dtracks_h
2 #define L1Trigger_TrackFindingTMTT_Make3Dtracks_h
3 
6 
7 #include <vector>
8 #include <list>
9 #include <utility>
10 #include <memory>
11 
12 //=== This reconstructs 3D tracks from the 2D tracks found by the Hough transform.
13 //=== It can do this by simply estimating the r-z helix parameters from the centre of the eta sector
14 //=== and/or by running an r-z filter (e.g. Seed Filter), which also cleans up the tracks by
15 //=== checking their stubs consistency with a straight line in the r-z plane.
16 //===
17 //=== To create 3D tracks, call run() and then get tracks via trackCands3D().
18 
19 namespace tmtt {
20 
21  class Settings;
22  class Stub;
23  class TP;
24 
25  class Make3Dtracks {
26  public:
27  // Initialize
28  Make3Dtracks(const Settings* settings,
29  unsigned int iPhiSec,
30  unsigned int iEtaReg,
31  float etaMinSector,
32  float etaMaxSector,
33  float phiCentreSector);
34 
35  //=== Main routines to make 3D tracks.
36 
37  // Make 3D track collections.
38  void run(const std::list<L1track2D>& vecTracksRphi) {
39  this->makeUnfilteredTrks(vecTracksRphi);
40  if (runRZfilter_)
41  this->makeRZfilteredTrks(vecTracksRphi);
42  }
43 
44  //=== Get 3D tracks.
45 
46  // Get 3D tracks (either r-z filtered or unfiltered, depending on the boolean).
47  // (Each L1track3D object gives access to stubs on each track and helix parameters
48  // & also to the associated truth tracking particle).
49  const std::list<L1track3D>& trackCands3D(bool rzFiltered) const {
50  if (rzFiltered) {
52  } else {
54  }
55  }
56 
57  // Get all 3D track candidates (either r-z filtered on unfiltered, depending on the boolean),
58  // that are associated to the given tracking particle.
59  // (If the std::vector is empty, then the tracking particle was not reconstructed in this sector).
60  std::vector<const L1track3D*> assocTrackCands3D(const TP& tp, bool rzFiltered) const;
61 
62  //=== Access to track r-z filter in case internal info from it required.
63 
64  bool ranRZfilter() const { return runRZfilter_; } // Was r-z filter required/run?
65 
66  const TrkRZfilter* rzFilter() const { return rzFilter_.get(); }
67 
68  private:
69  // Convert 2D HT tracks within the current sector to 3D tracks,
70  // by adding a rough estimate of their r-z helix parameters, without running any r-z track filter.
71  void makeUnfilteredTrks(const std::list<L1track2D>& vecTracksRphi);
72 
73  // Make 3D tracks from the 2D HT tracks within the current sector, by running the r-z track filter.
74  // The r-z filter also adds an estimate of the r-z helix parameters to each track.
75  // (Not filled if no track fitter needs the r-z filter).
76  void makeRZfilteredTrks(const std::list<L1track2D>& vecTracksRphi);
77 
78  private:
79  // Configuration parameters
81  unsigned int iPhiSec_; // Sector number.
82  unsigned int iEtaReg_;
83  float etaMinSector_; // Range of eta sector
84  float etaMaxSector_; // Range of eta sector
85  float phiCentreSector_; // Phi angle of centre of this (eta,phi) sector.
86 
87  bool runRZfilter_; // Does r-z track filter need to be run.
88 
89  // Track filter(s), such as r-z filters, run after the r-phi Hough transform.
90  std::unique_ptr<TrkRZfilter> rzFilter_;
91 
92  // List of all found 3D track candidates and their associated properties.
93  std::list<L1track3D> vecTracks3D_rzFiltered_; // After r-z filter run
94  std::list<L1track3D> vecTracks3D_unfiltered_; // Before r-z filter run.
95  };
96 
97 } // namespace tmtt
98 #endif
const Settings * settings_
Definition: Make3Dtracks.h:80
std::unique_ptr< TrkRZfilter > rzFilter_
Definition: Make3Dtracks.h:90
bool ranRZfilter() const
Definition: Make3Dtracks.h:64
const TrkRZfilter * rzFilter() const
Definition: Make3Dtracks.h:66
Make3Dtracks(const Settings *settings, unsigned int iPhiSec, unsigned int iEtaReg, float etaMinSector, float etaMaxSector, float phiCentreSector)
Definition: Make3Dtracks.cc:16
const std::list< L1track3D > & trackCands3D(bool rzFiltered) const
Definition: Make3Dtracks.h:49
std::vector< const L1track3D * > assocTrackCands3D(const TP &tp, bool rzFiltered) const
Definition: TP.h:23
unsigned int iPhiSec_
Definition: Make3Dtracks.h:81
unsigned int iEtaReg_
Definition: Make3Dtracks.h:82
=== This is the base class for the linearised chi-squared track fit algorithms.
Definition: Array2D.h:16
void run(const std::list< L1track2D > &vecTracksRphi)
Definition: Make3Dtracks.h:38
void makeUnfilteredTrks(const std::list< L1track2D > &vecTracksRphi)
Definition: Make3Dtracks.cc:41
void makeRZfilteredTrks(const std::list< L1track2D > &vecTracksRphi)
Definition: Make3Dtracks.cc:92
std::list< L1track3D > vecTracks3D_rzFiltered_
Definition: Make3Dtracks.h:93
std::list< L1track3D > vecTracks3D_unfiltered_
Definition: Make3Dtracks.h:94