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  conf_(conf),
55  algoName_(conf_.getParameter<std::string>( "AlgorithmName" )),
56  algo_(reco::TrackBase::algoByName(algoName_)),
58  {
59  geometricInnerState_ = (conf_.exists("GeometricInnerState") ?
60  conf_.getParameter<bool>( "GeometricInnerState" ) : true);
61  if (conf_.exists("reMatchSplitHits"))
62  reMatchSplitHits_=conf_.getParameter<bool>("reMatchSplitHits");
63  }
64 
67 
69  void runWithCandidate(const TrackingGeometry *,
70  const MagneticField *,
72  const TrajectoryFitter *,
73  const Propagator *,
75  const reco::BeamSpot&,
77 
79  void runWithTrack(const TrackingGeometry *,
80  const MagneticField *,
81  const TrackCollection&,
82  const TrajectoryFitter *,
83  const Propagator *,
85  const reco::BeamSpot&,
87 
89  void runWithMomentum(const TrackingGeometry *,
90  const MagneticField *,
92  const TrajectoryFitter *,
93  const Propagator *,
95  const reco::BeamSpot&,
97 
100  void runWithVertex(const TrackingGeometry *,
101  const MagneticField *,
103  const TrajectoryFitter *,
104  const Propagator *,
106  const reco::BeamSpot&,
108 
112  const MagneticField *,
114  const TrajectoryFitter *,
115  const Propagator *,
117  const reco::BeamSpot&,
119 
121  bool buildTrack(const TrajectoryFitter *,
122  const Propagator *,
126  const TrajectorySeed&,
127  float,
128  const reco::BeamSpot&,
129  SeedRef seedRef = SeedRef(),
130  int qualityMask=0,
131  signed char nLoops=0);
132 
133  private:
139 
142  const TrackingGeometry * theG,
143  const MagneticField * theMF);
144 
145 };
146 
147 #include "RecoTracker/TrackProducer/interface/TrackProducerAlgorithm.icc"
148 
149 template <> bool
151  const Propagator *,
152  AlgoProductCollection& ,
155  const TrajectorySeed&,
156  float,
157  const reco::BeamSpot&,
158  SeedRef seedRef,
159  int qualityMask,
160  signed char nLoops);
161 
162 
163 template <> bool
165  const Propagator *,
166  AlgoProductCollection& ,
169  const TrajectorySeed&,
170  float,
171  const reco::BeamSpot&,
172  SeedRef seedRef,
173  int qualityMask,
174  signed char nLoops);
175 
176 #endif
T getParameter(std::string const &) const
FitterCloner(const TrajectoryFitter *theFitter, const TransientTrackingRecHitBuilder *builder)
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:80
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 &)
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)