test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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{
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 
57  const edm::Handle<reco::GenParticleCollection>& tPCH) const {
58  return m_impl->associateRecoToGen(tCH, tPCH);
59  }
60 
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:
74 
76 
78 
79 
80  };
81 }
82 
83 #endif
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
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)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
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)
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)
tuple tracks
Definition: testEve_cfg.py:39
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
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)
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
const TrackToGenParticleAssociator & operator=(const TrackToGenParticleAssociator &)
edm::AssociationMap< edm::OneToManyWithQualityGeneric< edm::View< reco::Track >, reco::GenParticleCollection, double > > RecoToGenCollection