CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
25  public:
26 
28 
29  typedef std::vector<std::pair<OmniClusterRef, TrackingParticleRef> > ClusterTPAssociationList;
30  typedef std::pair<TrackingParticleRef, TrackPSimHitRef> SimHitTPPair;
31  typedef std::vector<SimHitTPPair> SimHitTPAssociationList;
32 
33 
35  std::unique_ptr<TrackerHitAssociator> iAssociate,
36  TrackerTopology const* iTopo,
37  SimHitTPAssociationList const* iSimHitsTPAssoc,
38  SimToRecoDenomType iSimToRecoDenominator,
39  double iQuality_SimToReco,
40  double iPurity_SimToReco,
41  double iCut_RecoToSim,
42  bool iUsePixels,
43  bool iUseGrouped,
44  bool iUseSplitting,
47 
48 
49  /* Associate SimTracks to RecoTracks By Hits */
50 
52  virtual
54  const edm::RefVector<TrackingParticleCollection>&) const override;
56  virtual
58  const edm::RefVector<TrackingParticleCollection>&) const override;
59 
61  virtual
63  const edm::Handle<TrackingParticleCollection>& tPCH) const override {
64  return TrackToTrackingParticleAssociatorBaseImpl::associateRecoToSim(tCH,tPCH);
65  }
66 
68  virtual
70  const edm::Handle<TrackingParticleCollection>& tPCH) const override {
71  return TrackToTrackingParticleAssociatorBaseImpl::associateSimToReco(tCH,tPCH);
72  }
73 
74  //seed
75  virtual
77  const edm::Handle<TrackingParticleCollection>&) const override;
78 
79  virtual
81  const edm::Handle<TrackingParticleCollection>& ) const override;
82 
83  private:
84  template<typename iter>
85  void getMatchedIds(std::vector<SimHitIdpr>&,
86  std::vector<SimHitIdpr>&,
87  int&,
88  iter,
89  iter,
90  TrackerHitAssociator*) const;
91 
92  int getShared(std::vector<SimHitIdpr>&,
93  std::vector<SimHitIdpr>&,
94  TrackingParticle const&) const;
95 
96  template<typename iter>
97  int getDoubleCount(iter,iter,TrackerHitAssociator*,TrackingParticle const&) const;
98 
99 
100  // ----- member data
102  std::unique_ptr<TrackerHitAssociator> associate;
105 
107  const double quality_SimToReco;
108  const double purity_SimToReco;
109  const double cut_RecoToSim;
110  const bool UsePixels;
111  const bool UseGrouped;
112  const bool UseSplitting;
115 
117  const TrackingRecHit* getHitPtr(trackingRecHit_iterator iter) const {return &**iter;}
118 
119  //edm::InputTag _simHitTpMapTag;
120 };
121 
122 #endif
edm::EDProductGetter const * productGetter_
std::unique_ptr< TrackerHitAssociator > associate
EDProductGetter const * productGetter(std::atomic< void const * > const &iCache)
SimHitTPAssociationList const * simHitsTPAssoc
int getShared(std::vector< SimHitIdpr > &, std::vector< SimHitIdpr > &, TrackingParticle const &) const
void getMatchedIds(std::vector< SimHitIdpr > &, std::vector< SimHitIdpr > &, int &, iter, iter, TrackerHitAssociator *) const
int getDoubleCount(iter, iter, TrackerHitAssociator *, TrackingParticle const &) const
std::pair< TrackingParticleRef, TrackPSimHitRef > SimHitTPPair
virtual reco::SimToRecoCollection associateSimToReco(const edm::RefToBaseVector< reco::Track > &, const edm::RefVector< TrackingParticleCollection > &) const override
Association Sim To Reco with Collections.
std::vector< SimHitTPPair > SimHitTPAssociationList
virtual 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
const TrackingRecHit * getHitPtr(edm::OwnVector< TrackingRecHit >::const_iterator iter) const
virtual 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
virtual reco::RecoToSimCollection associateRecoToSim(const edm::RefToBaseVector< reco::Track > &, const edm::RefVector< TrackingParticleCollection > &) const override
Association Reco To Sim with Collections.
TrackAssociatorByHitsImpl(edm::EDProductGetter const &productGetter, std::unique_ptr< TrackerHitAssociator > iAssociate, TrackerTopology const *iTopo, SimHitTPAssociationList const *iSimHitsTPAssoc, SimToRecoDenomType iSimToRecoDenominator, double iQuality_SimToReco, double iPurity_SimToReco, double iCut_RecoToSim, bool iUsePixels, bool iUseGrouped, bool iUseSplitting, bool ThreeHitTracksAreSpecial, bool AbsoluteNumberOfHits)
std::vector< std::pair< OmniClusterRef, TrackingParticleRef > > ClusterTPAssociationList
Monte Carlo truth information used for tracking validation.
const TrackingRecHit * getHitPtr(trackingRecHit_iterator iter) const
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection