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 
20 
21  public:
22 
24 
25  typedef std::vector<std::pair<OmniClusterRef, TrackingParticleRef> > ClusterTPAssociationList;
26  typedef std::pair<TrackingParticleRef, TrackPSimHitRef> SimHitTPPair;
27  typedef std::vector<SimHitTPPair> SimHitTPAssociationList;
28 
29 
30  TrackAssociatorByHitsImpl( std::unique_ptr<TrackerHitAssociator> iAssociate,
31  TrackerTopology const* iTopo,
32  SimHitTPAssociationList const* iSimHitsTPAssoc,
33  SimToRecoDenomType iSimToRecoDenominator,
34  double iQuality_SimToReco,
35  double iPurity_SimToReco,
36  double iCut_RecoToSim,
37  bool iUsePixels,
38  bool iUseGrouped,
39  bool iUseSplitting,
42 
43 
44  /* Associate SimTracks to RecoTracks By Hits */
45 
47  virtual
49  const edm::RefVector<TrackingParticleCollection>&) const override;
51  virtual
53  const edm::RefVector<TrackingParticleCollection>&) const override;
54 
56  virtual
58  const edm::Handle<TrackingParticleCollection>& tPCH) const override {
59  return TrackToTrackingParticleAssociatorBaseImpl::associateRecoToSim(tCH,tPCH);
60  }
61 
63  virtual
65  const edm::Handle<TrackingParticleCollection>& tPCH) const override {
66  return TrackToTrackingParticleAssociatorBaseImpl::associateSimToReco(tCH,tPCH);
67  }
68 
69  //seed
70  virtual
72  const edm::Handle<TrackingParticleCollection>&) const override;
73 
74  virtual
76  const edm::Handle<TrackingParticleCollection>& ) const override;
77 
78  private:
79  template<typename iter>
80  void getMatchedIds(std::vector<SimHitIdpr>&,
81  std::vector<SimHitIdpr>&,
82  int&,
83  iter,
84  iter,
85  TrackerHitAssociator*) const;
86 
87  int getShared(std::vector<SimHitIdpr>&,
88  std::vector<SimHitIdpr>&,
89  TrackingParticle const&) const;
90 
91  template<typename iter>
93 
94 
95  // ----- member data
96  std::unique_ptr<TrackerHitAssociator> associate;
99 
101  const double quality_SimToReco;
102  const double purity_SimToReco;
103  const double cut_RecoToSim;
104  const bool UsePixels;
105  const bool UseGrouped;
106  const bool UseSplitting;
109 
112 
113  //edm::InputTag _simHitTpMapTag;
114 };
115 
116 #endif
TrackAssociatorByHitsImpl(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::unique_ptr< TrackerHitAssociator > associate
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.
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