47 const double safeCut = 0.00005;
48 double totalE = track->GetTotalEnergy();
49 if(
isGamma(track) && totalE < safeCut) {
54 G4Event*
ev = G4EventManager::GetEventManager()->GetNonconstCurrentEvent();
59 bool rouletted =
false;
63 track->GetWeight() <
m_config.russianRouletteNeutronWeight &&
64 track->GetKineticEnergy() <
m_config.russianRouletteNeutronThreshold) {
82 mutableTrack->SetWeight(
m_config.russianRouletteNeutronWeight);
87 if (
m_config.russianRoulettePhotonThreshold > 0 &&
isGamma(track) && track->GetOriginTouchable() &&
88 track->GetOriginTouchable()->GetVolume()->GetName().substr(0, 3) ==
"LAr" &&
89 track->GetWeight() <
m_config.russianRoulettePhotonWeight &&
90 track->GetKineticEnergy() <
m_config.russianRoulettePhotonThreshold) {
108 mutableTrack->SetWeight(
m_config.russianRoulettePhotonWeight);
113 if(track->GetParentID() == 0) {
117 if(primaryPartInfo) {
123 std::unique_ptr<TrackInformation> ti = std::make_unique<TrackInformation>(part);
124 ti->SetRegenerationNr(0);
130 track->SetUserInformation(ti.release());
139 track->SetUserInformation(bi.release());