|
[Rivet-svn] r3065 - in trunk: . src/Projectionsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgMon Apr 25 11:28:26 BST 2011
Author: buckley Date: Mon Apr 25 11:28:25 2011 New Revision: 3065 Log: Re-adding an explicit attempt to get the beam particles, since HepMC's IO_HERWIG seems to not always set them even though it's meant to (found when running on LEP1 Z pole with IPROC=100). Modified: trunk/ChangeLog trunk/src/Projections/Beam.cc Modified: trunk/ChangeLog ============================================================================== --- trunk/ChangeLog Thu Apr 21 16:12:42 2011 (r3064) +++ trunk/ChangeLog Mon Apr 25 11:28:25 2011 (r3065) @@ -1,3 +1,9 @@ +2011-04-25 Andy Buckley <andy at insectnation.org> + + * Re-adding an explicit attempt to get the beam particles, since + HepMC's IO_HERWIG seems to not always set them even though it's + meant to. + 2011-04-19 Hendrik Hoeth <hendrik.hoeth at cern.ch> * Added ATLAS_2011_S9002537 W asymmetry analysis Modified: trunk/src/Projections/Beam.cc ============================================================================== --- trunk/src/Projections/Beam.cc Thu Apr 21 16:12:42 2011 (r3064) +++ trunk/src/Projections/Beam.cc Mon Apr 25 11:28:25 2011 (r3065) @@ -49,10 +49,15 @@ void Beam::project(const Event& e) { assert(e.genEvent().particles_size() >= 2); - pair<HepMC::GenParticle*, HepMC::GenParticle*> beams = e.genEvent().beam_particles(); - assert(beams.first && beams.second); - _theBeams.first = *(beams.first); - _theBeams.second = *(beams.second); + if (e.genEvent().valid_beam_particles()) { + pair<HepMC::GenParticle*, HepMC::GenParticle*> beams = e.genEvent().beam_particles(); + assert(beams.first && beams.second); + _theBeams.first = *(beams.first); + _theBeams.second = *(beams.second); + } else { + _theBeams.first = *(e.genEvent().barcode_to_particle(1)); + _theBeams.second = *(e.genEvent().barcode_to_particle(2)); + } //getLog() << Log::DEBUG << "Beam particle IDs = " << beamIds() << endl; } @@ -62,7 +67,7 @@ //getLog() << Log::DEBUG << "sqrt(s) = " << sqrts/GeV << " GeV" << endl; return sqrts; } - + }
More information about the Rivet-svn mailing list |