2 #ifndef HEPMC_TempParticleMap_H
3 #define HEPMC_TempParticleMap_H
26 typedef std::map<HepMC::GenParticle*,int> TempMap;
27 typedef std::map<int,HepMC::GenParticle*> TempOrderMap;
28 typedef TempMap::iterator TempMapIterator;
29 typedef TempOrderMap::iterator orderIterator;
32 : m_particle_to_end_vertex(), m_particle_order() {}
36 TempMapIterator begin() {
return m_particle_to_end_vertex.begin(); }
37 TempMapIterator end() {
return m_particle_to_end_vertex.end(); }
38 orderIterator order_begin() {
return m_particle_order.begin(); }
39 orderIterator order_end() {
return m_particle_order.end(); }
46 TempMap m_particle_to_end_vertex;
47 TempOrderMap m_particle_order;
50 inline int TempParticleMap::end_vertex(
GenParticle* p )
53 TempMapIterator it = m_particle_to_end_vertex.find(p);
54 if( it == end() )
return 0;
55 return m_particle_to_end_vertex[p];
58 inline void TempParticleMap::addEndParticle( GenParticle* p,
int& end_vtx_code )
60 m_particle_order[p->barcode()] = p;
61 m_particle_to_end_vertex[p] = end_vtx_code;
66 #endif // HEPMC_TempParticleMap_H
TempParticleMap is a temporary GenParticle* container used during input.
The GenParticle class contains information about generated particles.