CMS 3D CMS Logo

TrackProducerAlgorithm.h
Go to the documentation of this file.
1 #ifndef TrackProducerAlgorithm_h
2 #define TrackProducerAlgorithm_h
3 
11 #include "AlgoProductTraits.h"
12 
24 
25 
26 class MagneticField;
27 class TrackingGeometry;
28 class Propagator;
29 class Trajectory;
31 
32 struct FitterCloner {
33  std::unique_ptr<TrajectoryFitter> fitter;
35 
37  fitter(theFitter->clone()),
38  hitCloner(static_cast<TkTransientTrackingRecHitBuilder const *>(builder)->cloner()){
39  fitter->setHitCloner(&hitCloner);
40  }
41 };
42 
43 
44 template <class T>
46 public:
49  using TrackView = typename Base::TrackView;
51 
54 
55 public:
56 
59  algo_(reco::TrackBase::algoByName(conf.getParameter<std::string>("AlgorithmName"))),
60  originalAlgo_(reco::TrackBase::undefAlgorithm),
61  stopReason_(0),
62  reMatchSplitHits_(false),
63  usePropagatorForPCA_(false)
64  {
65  geometricInnerState_ = (conf.exists("GeometricInnerState") ?
66  conf.getParameter<bool>( "GeometricInnerState" ) : true);
67  if (conf.exists("reMatchSplitHits"))
68  reMatchSplitHits_=conf.getParameter<bool>("reMatchSplitHits");
69  if (conf.exists("usePropagatorForPCA"))
70  usePropagatorForPCA_ = conf.getParameter<bool>("usePropagatorForPCA");
71  }
72 
75 
77  void runWithCandidate(const TrackingGeometry *,
78  const MagneticField *,
80  const TrajectoryFitter *,
81  const Propagator *,
83  const reco::BeamSpot&,
85 
87  void runWithTrack(const TrackingGeometry *,
88  const MagneticField *,
89  const TrackView&,
90  const TrajectoryFitter *,
91  const Propagator *,
93  const reco::BeamSpot&,
95 
97  void runWithMomentum(const TrackingGeometry *,
98  const MagneticField *,
100  const TrajectoryFitter *,
101  const Propagator *,
103  const reco::BeamSpot&,
105 
108  void runWithVertex(const TrackingGeometry *,
109  const MagneticField *,
111  const TrajectoryFitter *,
112  const Propagator *,
114  const reco::BeamSpot&,
116 
119  void runWithTrackParameters(const TrackingGeometry *,
120  const MagneticField *,
122  const TrajectoryFitter *,
123  const Propagator *,
125  const reco::BeamSpot&,
127 
129  bool buildTrack(const TrajectoryFitter *,
130  const Propagator *,
134  const TrajectorySeed&,
135  float,
136  const reco::BeamSpot&,
137  SeedRef seedRef = SeedRef(),
138  int qualityMask=0,
139  signed char nLoops=0);
140 
141 
142  private:
146  uint8_t stopReason_;
147 
151 
152  TrajectoryStateOnSurface getInitialState(const T * theT,
154  const TrackingGeometry * theG,
155  const MagneticField * theMF);
156 
157 };
158 
159 #include "RecoTracker/TrackProducer/interface/TrackProducerAlgorithm.icc"
160 
161 template <> bool
163  const Propagator *,
167  const TrajectorySeed&,
168  float,
169  const reco::BeamSpot&,
170  SeedRef seedRef,
171  int qualityMask,
172  signed char nLoops);
173 
174 
175 template <> bool
177  const Propagator *,
181  const TrajectorySeed&,
182  float,
183  const reco::BeamSpot&,
184  SeedRef seedRef,
185  int qualityMask,
186  signed char nLoops);
187 
188 #endif
T getParameter(std::string const &) const
FitterCloner(const TrajectoryFitter *theFitter, const TransientTrackingRecHitBuilder *builder)
reco::TrackBase::AlgoMask algoMask_
reco::TrackBase::TrackAlgorithm originalAlgo_
std::vector< TrackCandidate > TrackCandidateCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::vector< ConstRecHitPointer > RecHitContainer
TrackProducerAlgorithm(const edm::ParameterSet &conf)
Constructor.
bool buildTrack(const TrajectoryFitter *, const Propagator *, AlgoProductCollection &, TransientTrackingRecHit::RecHitContainer &, TrajectoryStateOnSurface &, const TrajectorySeed &, float, const reco::BeamSpot &, SeedRef seedRef=SeedRef(), int qualityMask=0, signed char nLoops=0)
Construct Tracks to be put in the event.
TrackAlgorithm
track algorithm
Definition: TrackBase.h:99
std::vector< reco::GsfTrack > TrackCollection
std::unique_ptr< TrajectoryFitter > fitter
std::bitset< algoSize > AlgoMask
algo mask
Definition: TrackBase.h:146
reco::TrackBase::TrackAlgorithm algo_
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
std::vector< AlgoProduct > AlgoProductCollection
fixed size matrix
TkClonerImpl hitCloner
long double T