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 
21 
22 
23 class MagneticField;
24 class TrackingGeometry;
25 class Propagator;
26 class Trajectory;
28 
29 struct FitterCloner {
30  std::unique_ptr<TrajectoryFitter> fitter;
32 
34  fitter(theFitter->clone()),
35  hitCloner(static_cast<TkTransientTrackingRecHitBuilder const *>(builder)->cloner()){
36  fitter->setHitCloner(&hitCloner);
37  }
38 };
39 
40 
41 template <class T>
43 public:
44  typedef std::vector<T> TrackCollection;
45  typedef std::pair<Trajectory*, std::pair<T*,PropagationDirection> > AlgoProduct;
46  typedef std::vector< AlgoProduct > AlgoProductCollection;
48  typedef edm::AssociationMap<edm::OneToOne<std::vector<T>,std::vector<VertexConstraint> > >
50  public:
51 
54  algo_(reco::TrackBase::algoByName(conf.getParameter<std::string>("AlgorithmName"))),
55  originalAlgo_(reco::TrackBase::undefAlgorithm),
58  {
59  geometricInnerState_ = (conf.exists("GeometricInnerState") ?
60  conf.getParameter<bool>( "GeometricInnerState" ) : true);
61  if (conf.exists("reMatchSplitHits"))
62  reMatchSplitHits_=conf.getParameter<bool>("reMatchSplitHits");
63  if (conf.exists("usePropagatorForPCA"))
64  usePropagatorForPCA_ = conf.getParameter<bool>("usePropagatorForPCA");
65  }
66 
69 
71  void runWithCandidate(const TrackingGeometry *,
72  const MagneticField *,
74  const TrajectoryFitter *,
75  const Propagator *,
77  const reco::BeamSpot&,
79 
81  void runWithTrack(const TrackingGeometry *,
82  const MagneticField *,
83  const TrackCollection&,
84  const TrajectoryFitter *,
85  const Propagator *,
87  const reco::BeamSpot&,
89 
91  void runWithMomentum(const TrackingGeometry *,
92  const MagneticField *,
94  const TrajectoryFitter *,
95  const Propagator *,
97  const reco::BeamSpot&,
99 
102  void runWithVertex(const TrackingGeometry *,
103  const MagneticField *,
105  const TrajectoryFitter *,
106  const Propagator *,
108  const reco::BeamSpot&,
110 
114  const MagneticField *,
116  const TrajectoryFitter *,
117  const Propagator *,
119  const reco::BeamSpot&,
121 
123  bool buildTrack(const TrajectoryFitter *,
124  const Propagator *,
128  const TrajectorySeed&,
129  float,
130  const reco::BeamSpot&,
131  SeedRef seedRef = SeedRef(),
132  int qualityMask=0,
133  signed char nLoops=0);
134 
135 
136  private:
143 
146  const TrackingGeometry * theG,
147  const MagneticField * theMF);
148 
149 };
150 
151 #include "RecoTracker/TrackProducer/interface/TrackProducerAlgorithm.icc"
152 
153 template <> bool
155  const Propagator *,
156  AlgoProductCollection& ,
159  const TrajectorySeed&,
160  float,
161  const reco::BeamSpot&,
162  SeedRef seedRef,
163  int qualityMask,
164  signed char nLoops);
165 
166 
167 template <> bool
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
FitterCloner(const TrajectoryFitter *theFitter, const TransientTrackingRecHitBuilder *builder)
reco::TrackBase::AlgoMask algoMask_
reco::TrackBase::TrackAlgorithm originalAlgo_
std::vector< TrackCandidate > TrackCandidateCollection
edm::AssociationMap< edm::OneToOne< std::vector< T >, std::vector< VertexConstraint > > > VtxConstraintAssociationCollection
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::vector< ConstRecHitPointer > RecHitContainer
TrackProducerAlgorithm(const edm::ParameterSet &conf)
Constructor.
std::vector< AlgoProduct > 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
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::pair< Trajectory *, std::pair< T *, PropagationDirection > > AlgoProduct
std::unique_ptr< TrajectoryFitter > fitter
tuple conf
Definition: dbtoconf.py:185
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:143
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
edm::RefToBase< TrajectorySeed > SeedRef
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.
volatile std::atomic< bool > shutdown_flag false
long double T
std::vector< T > TrackCollection
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)