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:
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;
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
Handle.h
TrackAssociatorByHitsImpl::productGetter_
edm::EDProductGetter const * productGetter_
Definition: TrackAssociatorByHitsImpl.h:87
TrackToTrackingParticleAssociatorBaseImpl.h
TrackAssociatorByHitsImpl::associateRecoToSim
reco::RecoToSimCollection associateRecoToSim(const edm::RefToBaseVector< reco::Track > &, const edm::RefVector< TrackingParticleCollection > &) const override
Association Reco To Sim with Collections.
Definition: TrackAssociatorByHitsImpl.cc:92
TrackAssociatorByHitsImpl::AbsoluteNumberOfHits
const bool AbsoluteNumberOfHits
Definition: TrackAssociatorByHitsImpl.h:100
TrackAssociatorByHitsImpl::associateSimToReco
reco::SimToRecoCollection associateSimToReco(const edm::RefToBaseVector< reco::Track > &, const edm::RefVector< TrackingParticleCollection > &) const override
Association Sim To Reco with Collections.
Definition: TrackAssociatorByHitsImpl.cc:169
TrackAssociatorByHitsImpl::SimHitTPAssociationList
std::vector< SimHitTPPair > SimHitTPAssociationList
Definition: TrackAssociatorByHitsImpl.h:28
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackerTopology
Definition: TrackerTopology.h:16
TrackerHitAssociator.h
TrackAssociatorByHitsImpl::getMatchedIds
void getMatchedIds(std::vector< SimHitIdpr > &, std::vector< SimHitIdpr > &, int &, iter, iter, TrackerHitAssociator *) const
Definition: TrackAssociatorByHitsImpl.cc:459
TrackAssociatorByHitsImpl::UsePixels
const bool UsePixels
Definition: TrackAssociatorByHitsImpl.h:96
edm::RefVector< TrackingParticleCollection >
TrackAssociatorByHitsImpl::associate
std::unique_ptr< TrackerHitAssociator > associate
Definition: TrackAssociatorByHitsImpl.h:88
edm::Handle
Definition: AssociativeIterator.h:50
TrackAssociatorByHitsImpl::denomnone
Definition: TrackAssociatorByHitsImpl.h:25
TrackAssociatorByHitsImpl::getHitPtr
const TrackingRecHit * getHitPtr(trackingRecHit_iterator iter) const
Definition: TrackAssociatorByHitsImpl.h:103
TrackAssociatorByHitsImpl::associateSimToReco
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
Definition: TrackAssociatorByHitsImpl.h:64
edm::EDProductGetter
Definition: EDProductGetter.h:41
TrackingRecHit.h
Track.h
TrackFwd.h
reco::TrackToTrackingParticleAssociatorBaseImpl
Definition: TrackToTrackingParticleAssociatorBaseImpl.h:33
TrackAssociatorByHitsImpl::SimToRecoDenominator
SimToRecoDenomType SimToRecoDenominator
Definition: TrackAssociatorByHitsImpl.h:92
TrackingParticle
Monte Carlo truth information used for tracking validation.
Definition: TrackingParticle.h:29
TrackAssociatorByHitsImpl::denomsim
Definition: TrackAssociatorByHitsImpl.h:25
TrackAssociatorByHitsImpl::denomreco
Definition: TrackAssociatorByHitsImpl.h:25
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
TrackAssociatorByHitsImpl::UseGrouped
const bool UseGrouped
Definition: TrackAssociatorByHitsImpl.h:97
TrackAssociatorByHitsImpl::SimHitTPPair
std::pair< TrackingParticleRef, TrackPSimHitRef > SimHitTPPair
Definition: TrackAssociatorByHitsImpl.h:27
edm::View
Definition: CaloClusterFwd.h:14
TrackAssociatorByHitsImpl::associateRecoToSim
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
Definition: TrackAssociatorByHitsImpl.h:57
EDProductGetter
TrackAssociatorByHitsImpl::getShared
int getShared(std::vector< SimHitIdpr > &, std::vector< SimHitIdpr > &, TrackingParticle const &) const
Definition: TrackAssociatorByHitsImpl.cc:505
edm::AssociationMap< edm::OneToManyWithQualityGeneric< edm::View< reco::Track >, TrackingParticleCollection, double > >
TrackAssociatorByHitsImpl::UseSplitting
const bool UseSplitting
Definition: TrackAssociatorByHitsImpl.h:98
edm::refcoreimpl::productGetter
EDProductGetter const * productGetter(std::atomic< void const * > const &iCache)
Definition: refcore_implementation.h:72
TrackAssociatorByHitsImpl
Definition: TrackAssociatorByHitsImpl.h:23
edm::RefToBaseVector< reco::Track >
TrackAssociatorByHitsImpl::getDoubleCount
int getDoubleCount(iter, iter, TrackerHitAssociator *, TrackingParticle const &) const
Definition: TrackAssociatorByHitsImpl.cc:540
TrackAssociatorByHitsImpl::simHitsTPAssoc
SimHitTPAssociationList const * simHitsTPAssoc
Definition: TrackAssociatorByHitsImpl.h:90
TrackingRecHit
Definition: TrackingRecHit.h:21
TrackAssociatorByHitsImpl::ThreeHitTracksAreSpecial
const bool ThreeHitTracksAreSpecial
Definition: TrackAssociatorByHitsImpl.h:99
TrackingParticle.h
TrackerHitAssociator
Definition: TrackerHitAssociator.h:55
Ref.h
TrackAssociatorByHitsImpl::quality_SimToReco
const double quality_SimToReco
Definition: TrackAssociatorByHitsImpl.h:93
TrackAssociatorByHitsImpl::getHitPtr
const TrackingRecHit * getHitPtr(edm::OwnVector< TrackingRecHit >::const_iterator iter) const
Definition: TrackAssociatorByHitsImpl.h:102
TrackAssociatorByHitsImpl::SimToRecoDenomType
SimToRecoDenomType
Definition: TrackAssociatorByHitsImpl.h:25
TrackAssociatorByHitsImpl::purity_SimToReco
const double purity_SimToReco
Definition: TrackAssociatorByHitsImpl.h:94
TrackAssociatorByHitsImpl::tTopo
TrackerTopology const * tTopo
Definition: TrackAssociatorByHitsImpl.h:89
TrackAssociatorByHitsImpl::cut_RecoToSim
const double cut_RecoToSim
Definition: TrackAssociatorByHitsImpl.h:95
TrackAssociatorByHitsImpl::TrackAssociatorByHitsImpl
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)
Definition: TrackAssociatorByHitsImpl.cc:33
EncodedEventId.h