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_)),
59  {
60  geometricInnerState_ = (conf_.exists("GeometricInnerState") ?
61  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 
72  void runWithCandidate(const TrackingGeometry *,
73  const MagneticField *,
75  const TrajectoryFitter *,
76  const Propagator *,
78  const reco::BeamSpot&,
80 
82  void runWithTrack(const TrackingGeometry *,
83  const MagneticField *,
84  const TrackCollection&,
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:
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)
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 &)
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)