CMS 3D CMS Logo

TrackToGenParticleAssociator.h
Go to the documentation of this file.
1 #ifndef SimDataFormats_Associations_TrackToGenParticleAssociator_h
2 #define SimDataFormats_Associations_TrackToGenParticleAssociator_h
3 
17 
19 
20 #include <memory>
21 
22 // Note that the Association Map is filled with -ch2 and not chi2 because it is
23 // ordered using std::greater: the track with the lowest association chi2 will
24 // be the first in the output map.
25 
26 namespace reco {
27  typedef edm::AssociationMap<
30  typedef edm::AssociationMap<
33 
35  public:
37  TrackToGenParticleAssociator() = default;
38 #ifndef __GCCXML__
39  TrackToGenParticleAssociator(std::unique_ptr<reco::TrackToGenParticleAssociatorBaseImpl>);
40 #endif
44 
48  return m_impl->associateRecoToGen(tracks, gens);
49  }
53  return m_impl->associateGenToReco(tracks, gens);
54  }
55 
58  const edm::Handle<reco::GenParticleCollection> &tPCH) const {
59  return m_impl->associateRecoToGen(tCH, tPCH);
60  }
61 
64  const edm::Handle<reco::GenParticleCollection> &tPCH) const {
65  return m_impl->associateGenToReco(tCH, tPCH);
66  }
67 
68  private:
69  TrackToGenParticleAssociator(const TrackToGenParticleAssociator &) = delete; // stop default
70 
71  const TrackToGenParticleAssociator &operator=(const TrackToGenParticleAssociator &) = delete; // stop default
72 
73  std::unique_ptr<TrackToGenParticleAssociatorBaseImpl> m_impl;
74  };
75 } // namespace reco
76 
77 #endif
Handle.h
reco::TrackToGenParticleAssociator::associateGenToReco
reco::GenToRecoCollection associateGenToReco(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< reco::GenParticleCollection > &tPCH) const
compare reco to sim the handle of reco::Track and GenParticle collections
Definition: TrackToGenParticleAssociator.h:63
TrackAssociation.h
reco::GenParticleCollection
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
Definition: GenParticleFwd.h:13
edm::RefVector
Definition: EDProductfwd.h:27
reco::TrackToGenParticleAssociator
Definition: TrackToGenParticleAssociator.h:34
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Handle
Definition: AssociativeIterator.h:50
GenParticle.h
reco::TrackToGenParticleAssociator::~TrackToGenParticleAssociator
~TrackToGenParticleAssociator()=default
GenParticleFwd.h
reco::TrackToGenParticleAssociator::m_impl
std::unique_ptr< TrackToGenParticleAssociatorBaseImpl > m_impl
Definition: TrackToGenParticleAssociator.h:73
edm::View
Definition: CaloClusterFwd.h:14
reco::TrackToGenParticleAssociator::operator=
TrackToGenParticleAssociator & operator=(TrackToGenParticleAssociator &&)=default
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:159
reco::TrackToGenParticleAssociator::associateRecoToGen
reco::RecoToGenCollection associateRecoToGen(const edm::RefToBaseVector< reco::Track > &tracks, const edm::RefVector< reco::GenParticleCollection > &gens) const
Association Sim To Reco with Collections (Gen Particle version)
Definition: TrackToGenParticleAssociator.h:46
edm::AssociationMap
Definition: AssociationMap.h:48
LorentzVector.h
TrackToGenParticleAssociatorBaseImpl.h
edm::RefToBaseVector< reco::Track >
edm::OneToManyWithQualityGeneric
Definition: OneToManyWithQualityGeneric.h:21
reco::TrackToGenParticleAssociator::associateRecoToGen
reco::RecoToGenCollection associateRecoToGen(const edm::Handle< edm::View< reco::Track >> &tCH, const edm::Handle< reco::GenParticleCollection > &tPCH) const
compare reco to sim the handle of reco::Track and GenParticle collections
Definition: TrackToGenParticleAssociator.h:57
reco::GenToRecoCollection
edm::AssociationMap< edm::OneToManyWithQualityGeneric< reco::GenParticleCollection, edm::View< reco::Track >, double > > GenToRecoCollection
Definition: TrackToGenParticleAssociator.h:29
reco::RecoToGenCollection
edm::AssociationMap< edm::OneToManyWithQualityGeneric< edm::View< reco::Track >, reco::GenParticleCollection, double > > RecoToGenCollection
Definition: TrackToGenParticleAssociator.h:32
reco::TrackToGenParticleAssociator::associateGenToReco
reco::GenToRecoCollection associateGenToReco(const edm::RefToBaseVector< reco::Track > &tracks, const edm::RefVector< reco::GenParticleCollection > &gens) const
Association Sim To Reco with Collections (Gen Particle version)
Definition: TrackToGenParticleAssociator.h:51
reco::TrackToGenParticleAssociator::TrackToGenParticleAssociator
TrackToGenParticleAssociator()=default
Constructor.
SimTrackContainer.h
SimVertexContainer.h