17 edm::LogInfo(
"KillSecondaries") <<
"KillSecondariesTrackAction:: Killing"
18 <<
" Flag " <<
killHeavy <<
" protons below "
19 << kmaxProton <<
" MeV, neutrons below "
20 << kmaxNeutron <<
" MeV and ions below "
21 << kmaxIon <<
" MeV\n";
29 G4Track* theTrack = (G4Track*)((*trk)());
32 int pdg = theTrack->GetDefinition()->GetPDGEncoding();
34 double ke = theTrack->GetKineticEnergy()/MeV;
35 if ((((pdg/1000000000 == 1 && ((pdg/10000)%100) > 0 &&
36 ((pdg/10)%100) > 0)) && (ke<
kmaxIon)) ||
39 theTrack->SetTrackStatus(fStopAndKill);
40 edm::LogInfo(
"KillSecondaries") <<
"Kill Track " << theTrack->GetTrackID()
41 <<
" Type " << theTrack->GetDefinition()->GetParticleName()
42 <<
" Kinetic Energy " << ke <<
" MeV";
T getParameter(std::string const &) const
KillSecondariesTrackAction(edm::ParameterSet const &p)
void update(const BeginOfTrack *trk)
This routine will be called when the appropriate signal arrives.
~KillSecondariesTrackAction()