CMS 3D CMS Logo

TrackProducerAlgorithm.h
Go to the documentation of this file.
1 #ifndef TrackProducerAlgorithm_h
2 #define TrackProducerAlgorithm_h
3 
10 #include "AlgoProductTraits.h"
11 
23 
24 class MagneticField;
25 class TrackingGeometry;
26 class Propagator;
27 class Trajectory;
29 
30 struct FitterCloner {
31  std::unique_ptr<TrajectoryFitter> fitter;
33 
35  : fitter(theFitter->clone()),
36  hitCloner(static_cast<TkTransientTrackingRecHitBuilder const *>(builder)->cloner()) {
37  fitter->setHitCloner(&hitCloner);
38  }
39 };
40 
41 template <class T>
43 public:
46  using TrackView = typename Base::TrackView;
48 
51  edm::AssociationMap<edm::OneToOne<std::vector<T>, std::vector<VertexConstraint> > >;
52 
53 public:
56  : algo_(reco::TrackBase::algoByName(conf.getParameter<std::string>("AlgorithmName"))),
57  originalAlgo_(reco::TrackBase::undefAlgorithm),
58  stopReason_(0),
61  geometricInnerState_ = (conf.exists("GeometricInnerState") ? conf.getParameter<bool>("GeometricInnerState") : true);
62  if (conf.exists("reMatchSplitHits"))
63  reMatchSplitHits_ = conf.getParameter<bool>("reMatchSplitHits");
64  if (conf.exists("usePropagatorForPCA"))
65  usePropagatorForPCA_ = conf.getParameter<bool>("usePropagatorForPCA");
66  }
67 
70 
73  const MagneticField *,
75  const TrajectoryFitter *,
76  const Propagator *,
78  const reco::BeamSpot &,
80 
82  void runWithTrack(const TrackingGeometry *,
83  const MagneticField *,
84  const TrackView &,
85  const TrajectoryFitter *,
86  const Propagator *,
88  const reco::BeamSpot &,
90 
92  void runWithMomentum(const TrackingGeometry *,
93  const MagneticField *,
95  const TrajectoryFitter *,
96  const Propagator *,
98  const reco::BeamSpot &,
100 
103  void runWithVertex(const TrackingGeometry *,
104  const MagneticField *,
106  const TrajectoryFitter *,
107  const Propagator *,
109  const reco::BeamSpot &,
111 
115  const MagneticField *,
117  const TrajectoryFitter *,
118  const Propagator *,
120  const reco::BeamSpot &,
122 
124  bool buildTrack(const TrajectoryFitter *,
125  const Propagator *,
129  const TrajectorySeed &,
130  float,
131  const reco::BeamSpot &,
132  SeedRef seedRef = SeedRef(),
133  int qualityMask = 0,
134  signed char nLoops = 0);
135 
136 private:
140  uint8_t stopReason_;
141 
145 
148  const TrackingGeometry *theG,
149  const MagneticField *theMF);
150 };
151 
152 #include "RecoTracker/TrackProducer/interface/TrackProducerAlgorithm.icc"
153 
154 template <>
156  const Propagator *,
157  AlgoProductCollection &,
160  const TrajectorySeed &,
161  float,
162  const reco::BeamSpot &,
163  SeedRef seedRef,
164  int qualityMask,
165  signed char nLoops);
166 
167 template <>
169  const Propagator *,
170  AlgoProductCollection &,
173  const TrajectorySeed &,
174  float,
175  const reco::BeamSpot &,
176  SeedRef seedRef,
177  int qualityMask,
178  signed char nLoops);
179 
180 #endif
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
FitterCloner(const TrajectoryFitter *theFitter, const TransientTrackingRecHitBuilder *builder)
reco::TrackBase::AlgoMask algoMask_
reco::TrackBase::TrackAlgorithm originalAlgo_
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::vector< TrackCandidate > TrackCandidateCollection
std::vector< ConstRecHitPointer > RecHitContainer
TrackProducerAlgorithm(const edm::ParameterSet &conf)
Constructor.
edm::AssociationMap< edm::OneToOne< std::vector< T >, std::vector< VertexConstraint > > > VtxConstraintAssociationCollection
typename Base::AlgoProductCollection AlgoProductCollection
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:89
edm::RefToBase< TrajectorySeed > SeedRef
std::vector< reco::GsfTrack > TrackCollection
void runWithMomentum(const TrackingGeometry *, const MagneticField *, const TrackMomConstraintAssociationCollection &, const TrajectoryFitter *, const Propagator *, const TransientTrackingRecHitBuilder *, const reco::BeamSpot &, AlgoProductCollection &)
Run the Final Fit taking TrackMomConstraintAssociation as input (Refitter with momentum constraint) ...
TrajectoryStateOnSurface getInitialState(const T *theT, TransientTrackingRecHit::RecHitContainer &hits, const TrackingGeometry *theG, const MagneticField *theMF)
void runWithTrack(const TrackingGeometry *, const MagneticField *, const TrackView &, const TrajectoryFitter *, const Propagator *, const TransientTrackingRecHitBuilder *, const reco::BeamSpot &, AlgoProductCollection &)
Run the Final Fit taking Tracks as input (for Refitter)
std::unique_ptr< TrajectoryFitter > fitter
void runWithVertex(const TrackingGeometry *, const MagneticField *, const VtxConstraintAssociationCollection &, const TrajectoryFitter *, const Propagator *, const TransientTrackingRecHitBuilder *, const reco::BeamSpot &, AlgoProductCollection &)
std::bitset< algoSize > AlgoMask
algo mask
Definition: TrackBase.h:145
std::vector< AlgoProduct > AlgoProductCollection
void runWithTrackParameters(const TrackingGeometry *, const MagneticField *, const TrackParamConstraintAssociationCollection &, const TrajectoryFitter *, const Propagator *, const TransientTrackingRecHitBuilder *, const reco::BeamSpot &, AlgoProductCollection &)
reco::TrackBase::TrackAlgorithm algo_
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
edm::View< T > TrackView
typename Base::TrackView TrackView
fixed size matrix
TkClonerImpl hitCloner
void runWithCandidate(const TrackingGeometry *, const MagneticField *, const TrackCandidateCollection &, const TrajectoryFitter *, const Propagator *, const TransientTrackingRecHitBuilder *, const reco::BeamSpot &, AlgoProductCollection &)
Run the Final Fit taking TrackCandidates as input.
long double T