CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TrackAssociatorByPositionImpl.h
Go to the documentation of this file.
1 #ifndef TrackAssociatorByPositionImpl_h
2 #define TrackAssociatorByPositionImpl_h
3 
17 
20 
22 
25 
26 #include <map>
27 
28 //Note that the Association Map is filled with -ch2 and not chi2 because it is ordered using std::greater:
29 //the track with the lowest association chi2 will be the first in the output map.
30 
32 public:
33  typedef std::pair<TrackingParticleRef, TrackPSimHitRef> SimHitTPPair;
34  typedef std::vector<SimHitTPPair> SimHitTPAssociationList;
35  enum class Method { chi2, dist, momdr, posdr };
36 
38  const TrackingGeometry* geo,
39  const Propagator* prop,
40  const SimHitTPAssociationList* assocList,
41  double qMinCut,
42  double qCut,
43  double positionMinimumDistance,
44  Method method,
45  bool minIfNoMatch,
46  bool considerAllSimHits)
47  : productGetter_(&productGetter),
48  theGeometry(geo),
49  thePropagator(prop),
50  theSimHitsTPAssoc(assocList),
51  theQminCut(qMinCut),
52  theQCut(qCut),
53  thePositionMinimumDistance(positionMinimumDistance),
54  theMethod(method),
55  theMinIfNoMatch(minIfNoMatch),
56  theConsiderAllSimHits(considerAllSimHits) {}
57 
59 
61  const edm::RefVector<TrackingParticleCollection>&) const override;
62 
64 
66  const edm::RefVector<TrackingParticleCollection>&) const override;
67 
68 private:
69  double quality(const TrajectoryStateOnSurface&, const TrajectoryStateOnSurface&) const;
70 
75  double theQminCut;
76  double theQCut;
81 
84  //edm::InputTag _simHitTpMapTag;
85 };
86 
87 #endif
TrackAssociatorByPositionImpl(edm::EDProductGetter const &productGetter, const TrackingGeometry *geo, const Propagator *prop, const SimHitTPAssociationList *assocList, double qMinCut, double qCut, double positionMinimumDistance, Method method, bool minIfNoMatch, bool considerAllSimHits)
double quality(const TrajectoryStateOnSurface &, const TrajectoryStateOnSurface &) const
EDProductGetter const * productGetter(std::atomic< void const * > const &iCache)
FreeTrajectoryState getState(const reco::Track &) const
const SimHitTPAssociationList * theSimHitsTPAssoc
std::pair< TrackingParticleRef, TrackPSimHitRef > SimHitTPPair
reco::RecoToSimCollection associateRecoToSim(const edm::RefToBaseVector< reco::Track > &, const edm::RefVector< TrackingParticleCollection > &) const override
compare reco to sim the handle of reco::Track and TrackingParticle collections
reco::SimToRecoCollection associateSimToReco(const edm::RefToBaseVector< reco::Track > &, const edm::RefVector< TrackingParticleCollection > &) const override
compare reco to sim the handle of reco::Track and TrackingParticle collections
std::vector< SimHitTPPair > SimHitTPAssociationList
edm::EDProductGetter const * productGetter_