Skip to content
Snippets Groups Projects
Commit 7f914918 authored by Andrii Verbytskyi's avatar Andrii Verbytskyi Committed by Frank Winklmeier
Browse files

Migration of GenzModuleEvent to HepMC3

parent 48f16bae
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#ifndef KINEHEPMCMAP_H
......@@ -17,10 +17,7 @@ public:
HepMC::GenParticlePtr givekine_getParticle ( const int ikine ) const;
private:
const HepMC::GenEvent* m_evt;
//const int m_vertex_offset;
const int m_kine_offset;
//const int m_mbias_int_kine_offset;
//const int m_mbias_noint_kine_offset;
};
......
......@@ -27,22 +27,12 @@ KineHepMcmap::giveParticle_getkine (HepMC::GenParticlePtr p ) const
HepMC::GenParticlePtr
KineHepMcmap::givekine_getParticle ( const int kine ) const
{
if (kine <= 0) return 0;
HepMC::GenParticlePtr part = nullptr;
bool not_found = true;
HepMC::GenEvent::particle_const_iterator p = m_evt->particles_begin();
do
if (kine <= 0) return nullptr;
for (HepMC::GenParticlePtr part: *m_evt)
{
int pkine = giveParticle_getkine(*p);
if (pkine == kine)
{
not_found = false;
part = *p;
}
++p;
} while (p != m_evt->particles_end() && not_found);
return part;
if (giveParticle_getkine(part) == kine ) return part;
}
return nullptr;
}
......@@ -57,7 +47,7 @@ KineHepMcmap::givekine_getParticle ( const int kine ) const
// int kine = 120;
// HepMC::KineHepMcmap kinm(evt ) ;
// HepMC::GenParticle* myparticle = kinm.givekine_getParticle( kine);
// HepMC::GenParticlePtr myparticle = kinm.givekine_getParticle( kine);
// int mykine = kinm.giveParticle_getkine( myparticle);
// cout << "KineHepMcmap geant particle 120 = " << mykine << endl;
// if (myparticle) myparticle->print();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment