diff --git a/Generators/EvtGen_i/share/inclusiveP8DsDPlus.pdt b/Generators/EvtGen_i/share/inclusiveP8DsDPlus.pdt index 137c615388bbdd86b6d0f4a310cd7291172a7037..ad7f249b3fdaee5817c051a0d13680fb611909e0 100644 --- a/Generators/EvtGen_i/share/inclusiveP8DsDPlus.pdt +++ b/Generators/EvtGen_i/share/inclusiveP8DsDPlus.pdt @@ -290,7 +290,7 @@ add p Particle tritium 1000010030 2.8092500e+00 0.0000000e add p Particle Lambda(1670)0 33122 1.6700000e+00 3.5000000e-02 1.8000000e-01 0 1 0.0000000e+00 0 add p Particle anti-cc_1 -4403 3.2753100e+00 0.0000000e+00 0.0000000e+00 -4 2 0.0000000e+00 -4403 add p Particle anti-Sigma(1670)0 -13214 1.6700000e+00 6.0000000e-02 3.0000000e-01 0 3 0.0000000e+00 0 -add p Particle B_s0 531 5.3663000e+00 0.0000000e+00 0.0000000e+00 0 0 4.4151442e-01 531 +add p Particle B_s0 531 5.3667700e+00 0.0000000e+00 0.0000000e+00 0 0 4.4151442e-01 531 add p Particle A0 36 3.0000000e+02 3.3752000e+00 0.0000000e+00 0 0 0.0000000e+00 36 add p Particle anti-Lambda_c(2625)- -4124 2.6281000e+00 0.0000000e+00 2.8500000e-02 -3 3 0.0000000e+00 0 add p Particle THRUaxis 96 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 96 @@ -320,9 +320,9 @@ add p Particle anti-sd_1 -3103 9.2953000e-01 0.0000000e add p Particle W'+ 34 5.0000000e+02 0.0000000e+00 0.0000000e+00 3 2 0.0000000e+00 34 add p Particle Sigma(1670)0 13214 1.6700000e+00 6.0000000e-02 3.0000000e-01 0 3 0.0000000e+00 0 add p Particle bd_1 5103 5.4014500e+00 0.0000000e+00 0.0000000e+00 -2 2 0.0000000e+00 5103 -add p Particle anti-B0 -511 5.2795000e+00 0.0000000e+00 0.0000000e+00 0 0 4.5547414e-01 -511 +add p Particle anti-B0 -511 5.2795800e+00 0.0000000e+00 0.0000000e+00 0 0 4.5547414e-01 -511 add p Particle phi 333 1.0194550e+00 4.2600000e-03 3.2000000e-02 0 2 0.0000000e+00 333 -add p Particle B0 511 5.2795000e+00 0.0000000e+00 0.0000000e+00 0 0 4.5547414e-01 511 +add p Particle B0 511 5.2795800e+00 0.0000000e+00 0.0000000e+00 0 0 4.5547414e-01 511 add p Particle system 90 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 90 add p Particle Xi_c*0 4314 2.6459000e+00 0.0000000e+00 0.0000000e+00 0 3 0.0000000e+00 4314 add p Particle anti-Xi_c*- -4324 2.6459000e+00 0.0000000e+00 0.0000000e+00 -3 3 0.0000000e+00 -4324 @@ -434,7 +434,7 @@ add p Particle ss_1 3303 1.0936100e+00 0.0000000e add p Particle anti-d -1 9.9000000e-03 0.0000000e+00 0.0000000e+00 1 1 0.0000000e+00 -1 add p Particle anti-Xi_b*+ -5314 5.9700000e+00 0.0000000e+00 0.0000000e+00 3 3 0.0000000e+00 -5314 add p Particle anti-K*0 -313 8.9594000e-01 4.8700000e-02 2.3000000e-01 0 2 0.0000000e+00 -313 -add p Particle anti-B_s0 -531 5.3663000e+00 0.0000000e+00 0.0000000e+00 0 0 4.4151442e-01 -531 +add p Particle anti-B_s0 -531 5.3667700e+00 0.0000000e+00 0.0000000e+00 0 0 4.4151442e-01 -531 add p Particle Delta- 1114 1.2320000e+00 1.1800000e-01 1.4000000e-01 -3 3 0.0000000e+00 1114 add p Particle anti-n0 -2112 9.3956535e-01 0.0000000e+00 0.0000000e+00 0 1 2.6430554e+14 -2112 add p Particle W'- -34 5.0000000e+02 0.0000000e+00 0.0000000e+00 -3 2 0.0000000e+00 -34 diff --git a/Generators/EvtGen_i/src/EvtInclusiveDecay.cxx b/Generators/EvtGen_i/src/EvtInclusiveDecay.cxx index 8bac016644bd010a7140d8e0627a5a6693fd763c..2c0ead3c98d5913fa9c775744749c54f0f766306 100644 --- a/Generators/EvtGen_i/src/EvtInclusiveDecay.cxx +++ b/Generators/EvtGen_i/src/EvtInclusiveDecay.cxx @@ -188,34 +188,26 @@ StatusCode EvtInclusiveDecay::execute() { std::string key = m_inputKeyName; // retrieve event from Transient Store (Storegate) + + const McEventCollection* oldmcEvtColl=0; if(m_readExisting) { - - - m_mcEvtColl = new McEventCollection(); + CHECK(evtStore()->retrieve(oldmcEvtColl, key)); // Fill the new McEventCollection with a copy of the initial HepMC::GenEvent - for (McEventCollection::const_iterator evt = events_const()->begin(); evt != events_const()->end(); ++evt) { - m_mcEvtColl->push_back(new HepMC::GenEvent(*(*evt))); - } + m_mcEvtColl = new McEventCollection(*oldmcEvtColl); } else {CHECK(evtStore()->retrieve(m_mcEvtColl, key));} if(m_readExisting) { - if(m_outputKeyName==key) { - const bool ALLOWMODS(true); - const bool NORESET(false); - CHECK(evtStore()->overwrite(m_mcEvtColl,m_outputKeyName, ALLOWMODS,NORESET)); - - } - else { + if(m_outputKeyName!=key) { CHECK(evtStore()->record( m_mcEvtColl,m_outputKeyName)); } } - + McEventCollection::iterator mcItr; for( mcItr = m_mcEvtColl->begin(); mcItr != m_mcEvtColl->end(); mcItr++ ) { HepMC::GenEvent* hepMC = *mcItr; - + // Search HepMC record for particles to be decayed by EvtGen // NOTE: In order to ensure repeatability, we use a std::set of barcodes to obtain // an ordered list of particles to be decayed by EvtGen. @@ -275,6 +267,15 @@ StatusCode EvtInclusiveDecay::execute() { printHepMC(hepMC); } } + + if(m_readExisting && m_outputKeyName==key) { + McEventCollection* newmcEvtColl=0; + newmcEvtColl = const_cast<McEventCollection*> (oldmcEvtColl); + newmcEvtColl->clear(); + for (McEventCollection::const_iterator evt = m_mcEvtColl->begin(); evt != m_mcEvtColl->end(); ++evt) { + newmcEvtColl->push_back(new HepMC::GenEvent(*(*evt))); + } + } return StatusCode::SUCCESS; } @@ -473,6 +474,8 @@ bool EvtInclusiveDecay::isToBeDecayed(const HepMC::GenParticle* p, bool doCrossC // Ignore documentation lines if (stat == 3) return false; + // And any particles that aren't stable or decayed + if(stat>2) return false; // Particularly for Herwig, try to ignore particles that really should // be flagged as documentation lines