CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
TrackExtra.h
TrackProducerAlgorithm::reMatchSplitHits_
bool reMatchSplitHits_
Definition: TrackProducerAlgorithm.h:142
funct::false
false
Definition: Factorize.h:29
TrackingGeometry
Definition: TrackingGeometry.h:26
TrackProducerAlgorithm::~TrackProducerAlgorithm
~TrackProducerAlgorithm()
Destructor.
Definition: TrackProducerAlgorithm.h:69
TrackCandidateCollection.h
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
AlgoProductTraits
Definition: AlgoProductTraits.h:10
TrackProducerAlgorithm::runWithVertex
void runWithVertex(const TrackingGeometry *, const MagneticField *, const VtxConstraintAssociationCollection &, const TrajectoryFitter *, const Propagator *, const TransientTrackingRecHitBuilder *, const reco::BeamSpot &, AlgoProductCollection &)
AlgoProductTraits::TrackView
edm::View< T > TrackView
Definition: AlgoProductTraits.h:13
TrackProducerAlgorithm::runWithTrackParameters
void runWithTrackParameters(const TrackingGeometry *, const MagneticField *, const TrackParamConstraintAssociationCollection &, const TrajectoryFitter *, const Propagator *, const TransientTrackingRecHitBuilder *, const reco::BeamSpot &, AlgoProductCollection &)
reco::TrackBase::TrackAlgorithm
TrackAlgorithm
track algorithm
Definition: TrackBase.h:89
FitterCloner::hitCloner
TkClonerImpl hitCloner
Definition: TrackProducerAlgorithm.h:32
TransientTrackingRecHit.h
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
watchdog.const
const
Definition: watchdog.py:83
AlgoProductTraits< reco::GsfTrack >::AlgoProductCollection
std::vector< AlgoProduct > AlgoProductCollection
Definition: AlgoProductTraits.h:20
FitterCloner::FitterCloner
FitterCloner(const TrajectoryFitter *theFitter, const TransientTrackingRecHitBuilder *builder)
Definition: TrackProducerAlgorithm.h:34
TrackProducerAlgorithm::algo_
reco::TrackBase::TrackAlgorithm algo_
Definition: TrackProducerAlgorithm.h:137
TkTransientTrackingRecHitBuilder.h
TkTransientTrackingRecHitBuilder
Definition: TkTransientTrackingRecHitBuilder.h:15
TrackProducerAlgorithm::TrackView
typename Base::TrackView TrackView
Definition: TrackProducerAlgorithm.h:46
Propagator
Definition: Propagator.h:44
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
FitterCloner::fitter
std::unique_ptr< TrajectoryFitter > fitter
Definition: TrackProducerAlgorithm.h:31
Track.h
BeamSpot.h
TrackingRecHit::RecHitContainer
std::vector< ConstRecHitPointer > RecHitContainer
Definition: TrackingRecHit.h:31
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
TrackProducerAlgorithm::usePropagatorForPCA_
bool usePropagatorForPCA_
Definition: TrackProducerAlgorithm.h:144
TrackProducerAlgorithm::runWithCandidate
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.
reco::BeamSpot
Definition: BeamSpot.h:21
TrajectoryFitter.h
ntupleEnum.undefAlgorithm
undefAlgorithm
Definition: ntupleEnum.py:27
TrackProducerAlgorithm::geometricInnerState_
bool geometricInnerState_
Definition: TrackProducerAlgorithm.h:143
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:681
edm::View
Definition: CaloClusterFwd.h:14
edm::ParameterSet
Definition: ParameterSet.h:47
TrackCandidateCollection
std::vector< TrackCandidate > TrackCandidateCollection
Definition: TrackCandidateCollection.h:7
Event.h
edm::AssociationMap
Definition: AssociationMap.h:48
TrackProducerAlgorithm
Definition: TrackProducerAlgorithm.h:42
GsfTrack.h
TrackProducerAlgorithm::algoMask_
reco::TrackBase::AlgoMask algoMask_
Definition: TrackProducerAlgorithm.h:139
TrackProducerAlgorithm::originalAlgo_
reco::TrackBase::TrackAlgorithm originalAlgo_
Definition: TrackProducerAlgorithm.h:138
TrackProducerAlgorithm::VtxConstraintAssociationCollection
edm::AssociationMap< edm::OneToOne< std::vector< T >, std::vector< VertexConstraint > > > VtxConstraintAssociationCollection
Definition: TrackProducerAlgorithm.h:51
TrajectoryFitter
Definition: TrajectoryFitter.h:19
TrackProducerAlgorithm::AlgoProductCollection
typename Base::AlgoProductCollection AlgoProductCollection
Definition: TrackProducerAlgorithm.h:47
std
Definition: JetResolutionObject.h:76
TkClonerImpl
Definition: TkClonerImpl.h:12
FitterCloner
Definition: TrackProducerAlgorithm.h:30
Trajectory
Definition: Trajectory.h:38
T
long double T
Definition: Basic3DVectorLD.h:48
AlgoProductTraits.h
AlgoProductTraits< reco::GsfTrack >::TrackCollection
std::vector< reco::GsfTrack > TrackCollection
Definition: AlgoProductTraits.h:12
TrackProducerAlgorithm::TrackProducerAlgorithm
TrackProducerAlgorithm(const edm::ParameterSet &conf)
Constructor.
Definition: TrackProducerAlgorithm.h:55
reco::TrackBase::AlgoMask
std::bitset< algoSize > AlgoMask
algo mask
Definition: TrackBase.h:145
TrajectorySeed
Definition: TrajectorySeed.h:18
TrackProducerAlgorithm::stopReason_
uint8_t stopReason_
Definition: TrackProducerAlgorithm.h:140
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::RefToBase< TrajectorySeed >
TrackProducerAlgorithm::runWithMomentum
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)
TrackProducerAlgorithm::buildTrack
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.
ParameterSet.h
TrackProducerAlgorithm::SeedRef
edm::RefToBase< TrajectorySeed > SeedRef
Definition: TrackProducerAlgorithm.h:49
TrackProducerAlgorithm::runWithTrack
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)
TrackConstraintAssociation.h
MagneticField
Definition: MagneticField.h:19
TransientTrackingRecHitBuilder
Definition: TransientTrackingRecHitBuilder.h:6
TrackProducerAlgorithm::getInitialState
TrajectoryStateOnSurface getInitialState(const T *theT, TransientTrackingRecHit::RecHitContainer &hits, const TrackingGeometry *theG, const MagneticField *theMF)