Skip to content

Commit

Permalink
Merge pull request #9297 from aehart/status_104_r-hadrons
Browse files Browse the repository at this point in the history
Status 104 R-hadrons
  • Loading branch information
cmsbuild committed May 28, 2015
2 parents a72c4c0 + 87f8d1b commit 204a5d4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion SimG4Core/Generators/src/Generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ void Generator::HepMC2G4(const HepMC::GenEvent * evt_orig, G4Event * g4evt)
// The selection is made considering if the partcile with status = 2
// have the end_vertex with a radius greater than the radius of beampipe
// cilinder (no requirement on the Z of the vertex is applyed).
else if (2 == (*pitr)->status()) {
// Status 104 (metastable R-hadrons in Pythia8) is treated the same way.
else if (2 == (*pitr)->status() || 104 == (*pitr)->status()) {

if ( (*pitr)->end_vertex() != 0 ) {
double xx = (*pitr)->end_vertex()->position().x();
Expand Down Expand Up @@ -210,6 +211,10 @@ void Generator::HepMC2G4(const HepMC::GenEvent * evt_orig, G4Event * g4evt)
double decay_length = 0.0;
int status = (*pitr)->status();

// treat status 104 (metastable R-hadrons in Pythia8) the same as status 2
if (104 == status)
status = 2;

// check the status, 2 has end point with decay defined by generator
if (1 == status || 2 == status) {

Expand Down

0 comments on commit 204a5d4

Please sign in to comment.