Skip to content
Snippets Groups Projects

HepMC3 nigtly branch fixes, 02122020 part 2

2 files
+ 10
17
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -612,12 +612,10 @@ namespace MyAnalysis {
@@ -612,12 +612,10 @@ namespace MyAnalysis {
McEventCollection::const_iterator itr;
McEventCollection::const_iterator itr;
for (itr = mcCollptr->begin(); itr!=mcCollptr->end(); ++itr)
for (itr = mcCollptr->begin(); itr!=mcCollptr->end(); ++itr)
{
{
HepMC::GenEvent::particle_const_iterator itrPart;
for (auto part: *(*itr))
for (itrPart = (*itr)->particles_begin(); itrPart!=(*itr)->particles_end(); ++itrPart )
{
{
HepMC::GenParticle *part=*itrPart;
if( (std::abs(part->pdg_id())==11 || part->pdg_id()==22 || part->pdg_id()==13
if( (abs(part->pdg_id())==11 || part->pdg_id()==22 || part->pdg_id()==13
|| (std::abs(part->pdg_id())==211) )
|| (abs(part->pdg_id())==211) )
&& part->momentum().e()> 5000.)
&& part->momentum().e()> 5000.)
{
{
nn++;
nn++;
@@ -627,7 +625,7 @@ namespace MyAnalysis {
@@ -627,7 +625,7 @@ namespace MyAnalysis {
phi_true = part->momentum().phi();
phi_true = part->momentum().phi();
ATH_MSG_INFO( " true particle found " << part->pdg_id() << " " <<
ATH_MSG_INFO( " true particle found " << part->pdg_id() << " " <<
e_true << " " << eta_true << " " << phi_true );
e_true << " " << eta_true << " " << phi_true );
HepMC::GenVertex* vertex = part->end_vertex();
auto vertex = part->end_vertex();
if (vertex) {
if (vertex) {
m_xconv = vertex->position().x();
m_xconv = vertex->position().x();
m_yconv = vertex->position().y();
m_yconv = vertex->position().y();
Loading