test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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:
50 
53 
54 public:
55 
58  algo_(reco::TrackBase::algoByName(conf.getParameter<std::string>("AlgorithmName"))),
59  originalAlgo_(reco::TrackBase::undefAlgorithm),
60  stopReason_(0),
63  {
64  geometricInnerState_ = (conf.exists("GeometricInnerState") ?
65  conf.getParameter<bool>( "GeometricInnerState" ) : true);
66  if (conf.exists("reMatchSplitHits"))
67  reMatchSplitHits_=conf.getParameter<bool>("reMatchSplitHits");
68  if (conf.exists("usePropagatorForPCA"))
69  usePropagatorForPCA_ = conf.getParameter<bool>("usePropagatorForPCA");
70  }
71 
74 
76  void runWithCandidate(const TrackingGeometry *,
77  const MagneticField *,
79  const TrajectoryFitter *,
80  const Propagator *,
82  const reco::BeamSpot&,
84 
86  void runWithTrack(const TrackingGeometry *,
87  const MagneticField *,
88  const TrackCollection&,
89  const TrajectoryFitter *,
90  const Propagator *,
92  const reco::BeamSpot&,
94 
96  void runWithMomentum(const TrackingGeometry *,
97  const MagneticField *,
99  const TrajectoryFitter *,
100  const Propagator *,
102  const reco::BeamSpot&,
104 
107  void runWithVertex(const TrackingGeometry *,
108  const MagneticField *,
110  const TrajectoryFitter *,
111  const Propagator *,
113  const reco::BeamSpot&,
115 
119  const MagneticField *,
121  const TrajectoryFitter *,
122  const Propagator *,
124  const reco::BeamSpot&,
126 
128  bool buildTrack(const TrajectoryFitter *,
129  const Propagator *,
133  const TrajectorySeed&,
134  float,
135  const reco::BeamSpot&,
136  SeedRef seedRef = SeedRef(),
137  int qualityMask=0,
138  signed char nLoops=0);
139 
140 
141  private:
145  uint8_t stopReason_;
146 
150 
153  const TrackingGeometry * theG,
154  const MagneticField * theMF);
155 
156 };
157 
158 #include "RecoTracker/TrackProducer/interface/TrackProducerAlgorithm.icc"
159 
160 template <> bool
162  const Propagator *,
163  AlgoProductCollection& ,
166  const TrajectorySeed&,
167  float,
168  const reco::BeamSpot&,
169  SeedRef seedRef,
170  int qualityMask,
171  signed char nLoops);
172 
173 
174 template <> bool
176  const Propagator *,
177  AlgoProductCollection& ,
180  const TrajectorySeed&,
181  float,
182  const reco::BeamSpot&,
183  SeedRef seedRef,
184  int qualityMask,
185  signed char nLoops);
186 
187 #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
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::vector< ConstRecHitPointer > RecHitContainer
TrackProducerAlgorithm(const edm::ParameterSet &conf)
Constructor.
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:99
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)
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:146
void runWithTrackParameters(const TrackingGeometry *, const MagneticField *, const TrackParamConstraintAssociationCollection &, const TrajectoryFitter *, const Propagator *, const TransientTrackingRecHitBuilder *, const reco::BeamSpot &, AlgoProductCollection &)
reco::TrackBase::TrackAlgorithm algo_
string const
Definition: compareJSON.py:14
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
std::vector< AlgoProduct > AlgoProductCollection
typename Base::TrackCollection TrackCollection
TkClonerImpl hitCloner
edm::AssociationMap< edm::OneToOne< std::vector< T >, std::vector< VertexConstraint > > > VtxConstraintAssociationCollection
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.
volatile std::atomic< bool > shutdown_flag false
long double T
void runWithTrack(const TrackingGeometry *, const MagneticField *, const TrackCollection &, const TrajectoryFitter *, const Propagator *, const TransientTrackingRecHitBuilder *, const reco::BeamSpot &, AlgoProductCollection &)
Run the Final Fit taking Tracks as input (for Refitter)