CMS 3D CMS Logo

TrackAssociatorByPositionImpl.h
Go to the documentation of this file.
1 #ifndef TrackAssociatorByPositionImpl_h
2 #define TrackAssociatorByPositionImpl_h
3 
17 
20 
22 
24 
25 #include<map>
26 
27 //Note that the Association Map is filled with -ch2 and not chi2 because it is ordered using std::greater:
28 //the track with the lowest association chi2 will be the first in the output map.
29 
31 
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 Propagator* prop,
39  const SimHitTPAssociationList* assocList,
40  double qMinCut,
41  double qCut,
43  Method method,
44  bool minIfNoMatch,
45  bool considerAllSimHits):
46  theGeometry(geo),
47  thePropagator(prop),
48  theSimHitsTPAssoc(assocList),
49  theQminCut(qMinCut),
50  theQCut(qCut),
51  thePositionMinimumDistance(positionMinimumDistance),
52  theMethod(method),
53  theMinIfNoMatch(minIfNoMatch),
54  theConsiderAllSimHits(considerAllSimHits) {}
55 
56 
58 
60  const edm::RefVector<TrackingParticleCollection>& ) const override;
61 
63 
65  const edm::RefVector<TrackingParticleCollection>&) const override;
66 
67 
68  private:
69  double quality(const TrajectoryStateOnSurface&, const TrajectoryStateOnSurface &)const;
70 
73  const SimHitTPAssociationList* theSimHitsTPAssoc;
74  double theQminCut;
75  double theQCut;
80 
82  TrajectoryStateOnSurface getState(const TrackingParticleRef&, const SimHitTPAssociationList& simHitsTPAssoc)const;
83  //edm::InputTag _simHitTpMapTag;
84 };
85 
86 #endif
double quality(const TrajectoryStateOnSurface &, const TrajectoryStateOnSurface &) const
FreeTrajectoryState getState(const reco::Track &) const
const SimHitTPAssociationList * theSimHitsTPAssoc
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
std::pair< TrackingParticleRef, TrackPSimHitRef > SimHitTPPair
TrackAssociatorByPositionImpl(const TrackingGeometry *geo, const Propagator *prop, const SimHitTPAssociationList *assocList, double qMinCut, double qCut, double positionMinimumDistance, Method method, bool minIfNoMatch, bool considerAllSimHits)
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