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  TrackToGenParticleAssociator(const TrackToGenParticleAssociator &) = delete; // stop default
45  const TrackToGenParticleAssociator &operator=(const TrackToGenParticleAssociator &) = delete; // stop default
46 
50  return m_impl->associateRecoToGen(tracks, gens);
51  }
55  return m_impl->associateGenToReco(tracks, gens);
56  }
57 
60  const edm::Handle<reco::GenParticleCollection> &tPCH) const {
61  return m_impl->associateRecoToGen(tCH, tPCH);
62  }
63 
66  const edm::Handle<reco::GenParticleCollection> &tPCH) const {
67  return m_impl->associateGenToReco(tCH, tPCH);
68  }
69 
70  private:
71  std::unique_ptr<TrackToGenParticleAssociatorBaseImpl> m_impl;
72  };
73 } // namespace reco
74 
75 #endif
TrackToGenParticleAssociator()=default
Constructor.
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
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
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)
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
std::unique_ptr< TrackToGenParticleAssociatorBaseImpl > m_impl
TrackToGenParticleAssociator & operator=(TrackToGenParticleAssociator &&)=default
fixed size matrix
edm::AssociationMap< edm::OneToManyWithQualityGeneric< edm::View< reco::Track >, reco::GenParticleCollection, double > > RecoToGenCollection
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)