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:
39 #ifndef __GCCXML__
40  TrackToGenParticleAssociator( std::unique_ptr<reco::TrackToGenParticleAssociatorBaseImpl>);
41 #endif
43 
47  return m_impl->associateRecoToGen(tracks ,gens);
48  }
52  return m_impl->associateGenToReco(tracks,gens);
53  }
54 
56  reco::RecoToGenCollection associateRecoToGen(const edm::Handle<edm::View<reco::Track> >& tCH,
57  const edm::Handle<reco::GenParticleCollection>& tPCH) const {
58  return m_impl->associateRecoToGen(tCH, tPCH);
59  }
60 
62  reco::GenToRecoCollection associateGenToReco(const edm::Handle<edm::View<reco::Track> >& tCH,
63  const edm::Handle<reco::GenParticleCollection>& tPCH) const {
64  return m_impl->associateGenToReco(tCH,tPCH);
65  }
66 
68  std::swap(m_impl, iOther.m_impl);
69  }
70 
71 
72  private:
73  TrackToGenParticleAssociator(const TrackToGenParticleAssociator&) = delete; // stop default
74 
75  const TrackToGenParticleAssociator& operator=(const TrackToGenParticleAssociator&) = delete; // stop default
76 
78 
79 
80  };
81 }
82 
83 #endif
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
virtual reco::RecoToGenCollection associateRecoToGen(const edm::RefToBaseVector< reco::Track > &tracks, const edm::RefVector< reco::GenParticleCollection > &gens) const =0
Association Sim To Reco with Collections (Gen Particle version)
const TrackToGenParticleAssociator & operator=(const TrackToGenParticleAssociator &)=delete
edm::AssociationMap< edm::OneToManyWithQualityGeneric< reco::GenParticleCollection, edm::View< reco::Track >, double > > GenToRecoCollection
void swap(TrackToGenParticleAssociator &iOther)
TrackToGenParticleAssociatorBaseImpl * m_impl
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)
virtual reco::GenToRecoCollection associateGenToReco(const edm::RefToBaseVector< reco::Track > &tracks, const edm::RefVector< reco::GenParticleCollection > &gens) const =0
Association Sim To Reco with Collections (Gen Particle version)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
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