Skip to content

Commit

Permalink
Merge pull request #4290 from civanch/fix_infloop_in_neutbgr
Browse files Browse the repository at this point in the history
Fix infloop in neutbgr
  • Loading branch information
cmsbuild committed Jun 19, 2014
2 parents c1c55be + 44dd131 commit 0c5279d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SimG4Core/Application/python/NeutronBGforMuonsHP_cff.py
Expand Up @@ -22,6 +22,10 @@ def customise(process):
process.g4SimHits.StackingAction.MaxTrackTime = cms.double(100000000.0)
process.g4SimHits.StackingAction.MaxTimeNames = cms.vstring('ZDCRegion')
process.g4SimHits.StackingAction.MaxTrackTimes = cms.vdouble(2000)
process.g4SimHits.StackingAction.KillHeavy = cms.bool(True)
process.g4SimHits.StackingAction.IonThreshold = cms.double(0.001)
process.g4SimHits.StackingAction.ProtonThreshold = cms.double(0.001)
process.g4SimHits.StackingAction.NeutronThreshold = cms.double(0.0)
# stepping action
process.g4SimHits.SteppingAction.MaxTrackTime = cms.double(100000000.0)
process.g4SimHits.SteppingAction.MaxTimeNames = cms.vstring('ZDCRegion')
Expand Down
4 changes: 4 additions & 0 deletions SimG4Core/Application/python/NeutronBGforMuonsXS_cff.py
Expand Up @@ -22,6 +22,10 @@ def customise(process):
process.g4SimHits.StackingAction.MaxTrackTime = cms.double(100000000.0)
process.g4SimHits.StackingAction.MaxTimeNames = cms.vstring('ZDCRegion')
process.g4SimHits.StackingAction.MaxTrackTimes = cms.vdouble(2000)
process.g4SimHits.StackingAction.KillHeavy = cms.bool(True)
process.g4SimHits.StackingAction.IonThreshold = cms.double(0.001)
process.g4SimHits.StackingAction.ProtonThreshold = cms.double(0.001)
process.g4SimHits.StackingAction.NeutronThreshold = cms.double(0.0)
# stepping action
process.g4SimHits.SteppingAction.MaxTrackTime = cms.double(100000000.0)
process.g4SimHits.SteppingAction.MaxTimeNames = cms.vstring('ZDCRegion')
Expand Down
11 changes: 11 additions & 0 deletions SimG4Core/Application/src/StackingAction.cc
Expand Up @@ -195,6 +195,17 @@ G4ClassificationOfNewTrack StackingAction::ClassifyNewTrack(const G4Track * aTra
classification = fKill;
}
if (isItLongLived(aTrack)) classification = fKill;

if (classification != fKill && pdg == 22 &&
aTrack->GetKineticEnergy() < 0.5*keV)
{
classification = fKill;
//std::cout << "### next gamma killed E(MeV)= " << ke
// << " " << aTrack->GetCreatorProcess()->GetProcessName()
// << std::endl;
}


if (killDeltaRay) {
if (aTrack->GetCreatorProcess()->GetProcessType() == fElectromagnetic &&
aTrack->GetCreatorProcess()->GetProcessSubType() == fIonisation)
Expand Down

0 comments on commit 0c5279d

Please sign in to comment.