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
TrackToGenParticleAssociator()=default
Constructor.
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
edm::AssociationMap< edm::OneToManyWithQualityGeneric< reco::GenParticleCollection, edm::View< reco::Track >, double > > GenToRecoCollection
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)
std::unique_ptr< TrackToGenParticleAssociatorBaseImpl > m_impl
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
TrackToGenParticleAssociator & operator=(TrackToGenParticleAssociator &&)=default
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)
fixed size matrix
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
edm::AssociationMap< edm::OneToManyWithQualityGeneric< edm::View< reco::Track >, reco::GenParticleCollection, double > > RecoToGenCollection