Skip to content

Commit

Permalink
Merge pull request #5533 from jhgoh/AvoidCrashRivetAODSIM
Browse files Browse the repository at this point in the history
 Avoid crash of GenParticles2HepMCConverter
  • Loading branch information
davidlange6 committed Sep 25, 2014
2 parents 78534b0 + 41daaa3 commit 833fc9c
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -127,7 +127,9 @@ void GenParticles2HepMCConverter::produce(edm::Event& event, const edm::EventSet
hepmc_particle->suggest_barcode(i+1);

// Assign particle's generated mass from the standard particle data table
double particleMass = pTable_->particle(p->pdgId())->mass();
double particleMass;
if ( pTable_->particle(p->pdgId()) ) particleMass = pTable_->particle(p->pdgId())->mass();
else particleMass = p->mass();
// // Re-assign generated mass from LHE, find particle among the LHE
// for ( unsigned int j=0, m=lhe_meIndex.size(); j<m; ++j )
// {
Expand Down

0 comments on commit 833fc9c

Please sign in to comment.