CMS 3D CMS Logo

TrackAssociatorByHitsImpl.h
Go to the documentation of this file.
1 #ifndef SimTracker_TrackAssociatorProducers_TrackAssociatorByHitsImpl_h
2 #define SimTracker_TrackAssociatorProducers_TrackAssociatorByHitsImpl_h
3 
7 
8 //reco track
12 //TrackingParticle
16 
17 class TrackerTopology;
18 
19 namespace edm {
20  class EDProductGetter;
21 }
22 
24 public:
25  enum SimToRecoDenomType { denomnone, denomsim, denomreco };
26 
27  typedef std::pair<TrackingParticleRef, TrackPSimHitRef> SimHitTPPair;
28  typedef std::vector<SimHitTPPair> SimHitTPAssociationList;
29 
31  std::unique_ptr<TrackerHitAssociator> iAssociate,
32  TrackerTopology const* iTopo,
33  SimHitTPAssociationList const* iSimHitsTPAssoc,
34  SimToRecoDenomType iSimToRecoDenominator,
35  double iQuality_SimToReco,
36  double iPurity_SimToReco,
37  double iCut_RecoToSim,
38  bool iUsePixels,
39  bool iUseGrouped,
40  bool iUseSplitting,
43 
44  /* Associate SimTracks to RecoTracks By Hits */
45 
47 
49  const edm::RefVector<TrackingParticleCollection>&) const override;
51 
53  const edm::RefVector<TrackingParticleCollection>&) const override;
54 
56 
58  const edm::Handle<TrackingParticleCollection>& tPCH) const override {
59  return TrackToTrackingParticleAssociatorBaseImpl::associateRecoToSim(tCH, tPCH);
60  }
61 
63 
65  const edm::Handle<TrackingParticleCollection>& tPCH) const override {
66  return TrackToTrackingParticleAssociatorBaseImpl::associateSimToReco(tCH, tPCH);
67  }
68 
69  //seed
70 
72  const edm::Handle<TrackingParticleCollection>&) const override;
73 
75  const edm::Handle<TrackingParticleCollection>&) const override;
76 
77 private:
78  template <typename iter>
79  void getMatchedIds(std::vector<SimHitIdpr>&, std::vector<SimHitIdpr>&, int&, iter, iter, TrackerHitAssociator*) const;
80 
81  int getShared(std::vector<SimHitIdpr>&, std::vector<SimHitIdpr>&, TrackingParticle const&) const;
82 
83  template <typename iter>
84  int getDoubleCount(iter, iter, TrackerHitAssociator*, TrackingParticle const&) const;
85 
86  // ----- member data
88  std::unique_ptr<TrackerHitAssociator> associate;
90  SimHitTPAssociationList const* simHitsTPAssoc;
91 
93  const double quality_SimToReco;
94  const double purity_SimToReco;
95  const double cut_RecoToSim;
96  const bool UsePixels;
97  const bool UseGrouped;
98  const bool UseSplitting;
101 
103  const TrackingRecHit* getHitPtr(trackingRecHit_iterator iter) const { return &**iter; }
104 
105  //edm::InputTag _simHitTpMapTag;
106 };
107 
108 #endif
edm::EDProductGetter const * productGetter_
std::unique_ptr< TrackerHitAssociator > associate
EDProductGetter const * productGetter(std::atomic< void const * > const &iCache)
SimHitTPAssociationList const * simHitsTPAssoc
std::pair< TrackingParticleRef, TrackPSimHitRef > SimHitTPPair
reco::RecoToSimCollection associateRecoToSim(const edm::Handle< edm::View< reco::Track > > &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const override
compare reco to sim the handle of reco::Track and TrackingParticle collections
reco::SimToRecoCollection associateSimToReco(const edm::Handle< edm::View< reco::Track > > &tCH, const edm::Handle< TrackingParticleCollection > &tPCH) const override
compare reco to sim the handle of reco::Track and TrackingParticle collections
std::vector< SimHitTPPair > SimHitTPAssociationList
const TrackingRecHit * getHitPtr(edm::OwnVector< TrackingRecHit >::const_iterator iter) const
HLT enums.
Monte Carlo truth information used for tracking validation.
const TrackingRecHit * getHitPtr(trackingRecHit_iterator iter) const