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 ordered using std::greater:
23 //the track with the lowest association chi2 will be the first in the output map.
24 
25 namespace reco{
30  <edm::View<reco::Track>, reco::GenParticleCollection, double> >
32 
33 
35 
36  public:
38  TrackToGenParticleAssociator() = default;
39 #ifndef __GCCXML__
40  TrackToGenParticleAssociator( std::unique_ptr<reco::TrackToGenParticleAssociatorBaseImpl>);
41 #endif
45 
49  return m_impl->associateRecoToGen(tracks ,gens);
50  }
54  return m_impl->associateGenToReco(tracks,gens);
55  }
56 
58  reco::RecoToGenCollection associateRecoToGen(const edm::Handle<edm::View<reco::Track> >& tCH,
59  const edm::Handle<reco::GenParticleCollection>& tPCH) const {
60  return m_impl->associateRecoToGen(tCH, tPCH);
61  }
62 
64  reco::GenToRecoCollection associateGenToReco(const edm::Handle<edm::View<reco::Track> >& tCH,
65  const edm::Handle<reco::GenParticleCollection>& tPCH) const {
66  return m_impl->associateGenToReco(tCH,tPCH);
67  }
68 
69 
70  private:
71  TrackToGenParticleAssociator(const TrackToGenParticleAssociator&) = delete; // stop default
72 
73  const TrackToGenParticleAssociator& operator=(const TrackToGenParticleAssociator&) = delete; // stop default
74 
75  std::unique_ptr<TrackToGenParticleAssociatorBaseImpl> m_impl;
76 
77 
78  };
79 }
80 
81 #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
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)
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
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
fixed size matrix
edm::AssociationMap< edm::OneToManyWithQualityGeneric< edm::View< reco::Track >, reco::GenParticleCollection, double > > RecoToGenCollection