CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
Phase2SteppingAction Class Reference

#include <Phase2SteppingAction.h>

Inheritance diagram for Phase2SteppingAction:

Public Member Functions

 Phase2SteppingAction (const CMSSteppingVerbose *, const edm::ParameterSet &, bool, bool)
 
void UserSteppingAction (const G4Step *aStep) final
 
 ~Phase2SteppingAction () override=default
 

Public Attributes

SimActivityRegistry::G4StepSignal m_g4StepSignal
 

Private Member Functions

bool initPointer ()
 
bool isInsideDeadRegion (const G4Region *reg) const
 
bool isLowEnergy (const G4LogicalVolume *, const G4Track *) const
 
bool isOutOfTimeWindow (const G4Region *reg, const double &time) const
 
void PrintKilledTrack (const G4Track *, const TrackStatus &) const
 

Private Attributes

const G4VPhysicalVolume * btl {nullptr}
 
G4String btlName_
 
const G4VPhysicalVolume * calo {nullptr}
 
G4String caloName_
 
G4String cms2ZDCName_
 
const G4VPhysicalVolume * cmse {nullptr}
 
G4String cmseName_
 
bool dd4hep_
 
std::vector< std::string > deadRegionNames
 
std::vector< const G4Region * > deadRegions
 
std::vector< double > ekinMins
 
std::vector< std::string > ekinNames
 
std::vector< std::string > ekinParticles
 
std::vector< int > ekinPDG
 
std::vector< G4LogicalVolume * > ekinVolumes
 
bool hasWatcher
 
bool initialized {false}
 
bool killBeamPipe {false}
 
G4int maxNumberOfSteps
 
std::vector< std::string > maxTimeNames
 
std::vector< const G4Region * > maxTimeRegions
 
double maxTrackTime
 
double maxTrackTimeForward
 
std::vector< double > maxTrackTimes
 
double maxZCentralCMS
 
unsigned int ndeadRegions
 
unsigned int numberEkins
 
unsigned int numberPart
 
unsigned int numberTimes
 
unsigned int nWarnings {0}
 
const CMSSteppingVerbosesteppingVerbose
 
double theCriticalDensity
 
double theCriticalEnergyForVacuum
 
const G4VPhysicalVolume * tracker {nullptr}
 
G4String trackerName_
 

Detailed Description

Definition at line 20 of file Phase2SteppingAction.h.

Constructor & Destructor Documentation

◆ Phase2SteppingAction()

Phase2SteppingAction::Phase2SteppingAction ( const CMSSteppingVerbose sv,
const edm::ParameterSet p,
bool  hasW,
bool  dd4hep 
)
explicit

Definition at line 16 of file Phase2SteppingAction.cc.

References btlName_, caloName_, cms2ZDCName_, cmseName_, deadRegionNames, ekinMins, ekinNames, ekinParticles, g, mps_fire::i, killBeamPipe, visualization-live-secondInstance_cfg::m, maxNumberOfSteps, maxTimeNames, maxTrackTime, maxTrackTimeForward, maxTrackTimes, maxZCentralCMS, ndeadRegions, numberEkins, numberPart, numberTimes, AlCaHLTBitMon_ParallelJobs::p, AlCaHLTBitMon_QueryRunRegistry::string, theCriticalDensity, theCriticalEnergyForVacuum, and trackerName_.

21  theCriticalEnergyForVacuum = (p.getParameter<double>("CriticalEnergyForVacuum") * CLHEP::MeV);
22  if (0.0 < theCriticalEnergyForVacuum) {
23  killBeamPipe = true;
24  }
25  theCriticalDensity = (p.getParameter<double>("CriticalDensity") * CLHEP::g / CLHEP::cm3);
26  maxZCentralCMS = p.getParameter<double>("MaxZCentralCMS") * CLHEP::m;
27  maxTrackTime = p.getParameter<double>("MaxTrackTime") * CLHEP::ns;
28  maxTrackTimeForward = p.getParameter<double>("MaxTrackTimeForward") * CLHEP::ns;
29  maxTrackTimes = p.getParameter<std::vector<double> >("MaxTrackTimes");
30  maxTimeNames = p.getParameter<std::vector<std::string> >("MaxTimeNames");
31  deadRegionNames = p.getParameter<std::vector<std::string> >("DeadRegions");
32  maxNumberOfSteps = p.getParameter<int>("MaxNumberOfSteps");
33  ekinMins = p.getParameter<std::vector<double> >("EkinThresholds");
34  ekinNames = p.getParameter<std::vector<std::string> >("EkinNames");
35  ekinParticles = p.getParameter<std::vector<std::string> >("EkinParticles");
36  cmseName_ = (G4String)(p.getParameter<std::string>("CMSName"));
37  trackerName_ = (G4String)(p.getParameter<std::string>("TrackerName"));
38  caloName_ = (G4String)(p.getParameter<std::string>("CaloName"));
39  btlName_ = (G4String)(p.getParameter<std::string>("BTLName"));
40  cms2ZDCName_ = p.getParameter<std::string>("CMS2ZDCName");
41 
42  edm::LogVerbatim("SimG4CoreApplication")
43  << "Phase2SteppingAction:: KillBeamPipe = " << killBeamPipe
44  << " CriticalDensity = " << theCriticalDensity * CLHEP::cm3 / CLHEP::g << " g/cm3\n"
45  << " CriticalEnergyForVacuum = " << theCriticalEnergyForVacuum / CLHEP::MeV << " Mev;"
46  << " MaxTrackTime = " << maxTrackTime / CLHEP::ns << " ns;"
47  << " MaxZCentralCMS = " << maxZCentralCMS / CLHEP::m << " m"
48  << " MaxTrackTimeForward = " << maxTrackTimeForward / CLHEP::ns << " ns"
49  << " MaxNumberOfSteps = " << maxNumberOfSteps << "\n"
50  << " Names of special volumes: " << cmseName_ << " " << trackerName_ << " " << caloName_ << " "
51  << btlName_;
52 
53  numberTimes = maxTrackTimes.size();
54  if (numberTimes > 0) {
55  for (unsigned int i = 0; i < numberTimes; i++) {
56  edm::LogVerbatim("SimG4CoreApplication")
57  << "Phase2SteppingAction::MaxTrackTime for " << maxTimeNames[i] << " is " << maxTrackTimes[i] << " ns ";
58  maxTrackTimes[i] *= CLHEP::ns;
59  }
60  }
61 
63  if (ndeadRegions > 0) {
64  edm::LogVerbatim("SimG4CoreApplication")
65  << "Phase2SteppingAction: Number of DeadRegions where all trackes are killed " << ndeadRegions;
66  for (unsigned int i = 0; i < ndeadRegions; ++i) {
67  edm::LogVerbatim("SimG4CoreApplication")
68  << "Phase2SteppingAction: DeadRegion " << i << ". " << deadRegionNames[i];
69  }
70  }
71  numberEkins = ekinNames.size();
72  numberPart = ekinParticles.size();
73  if (0 == numberPart) {
74  numberEkins = 0;
75  }
76 
77  if (numberEkins > 0) {
78  edm::LogVerbatim("SimG4CoreApplication")
79  << "Phase2SteppingAction::Kill following " << numberPart << " particles in " << numberEkins << " volumes";
80  for (unsigned int i = 0; i < numberPart; ++i) {
81  edm::LogVerbatim("SimG4CoreApplication") << "Phase2SteppingAction::Particle " << i << " " << ekinParticles[i]
82  << " Threshold = " << ekinMins[i] << " MeV";
83  ekinMins[i] *= CLHEP::MeV;
84  }
85  for (unsigned int i = 0; i < numberEkins; ++i) {
86  edm::LogVerbatim("SimG4CoreApplication") << "Phase2SteppingAction::LogVolume[" << i << "] = " << ekinNames[i];
87  }
88  }
89 }
Log< level::Info, true > LogVerbatim
const CMSSteppingVerbose * steppingVerbose
std::vector< std::string > maxTimeNames
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
std::vector< std::string > ekinNames
std::vector< std::string > ekinParticles
std::vector< double > ekinMins
std::vector< std::string > deadRegionNames
std::vector< double > maxTrackTimes

◆ ~Phase2SteppingAction()

Phase2SteppingAction::~Phase2SteppingAction ( )
overridedefault

Member Function Documentation

◆ initPointer()

bool Phase2SteppingAction::initPointer ( )
private

Definition at line 244 of file Phase2SteppingAction.cc.

References btl, btlName_, caloName_, cmse, cmseName_, dd4hep_, deadRegionNames, deadRegions, ekinMins, ekinNames, ekinParticles, ekinPDG, ekinVolumes, mps_fire::i, maxTimeNames, maxTimeRegions, DD4hep2DDDName::nameMatterLV(), DD4hep2DDDName::namePV(), ndeadRegions, numberEkins, numberPart, numberTimes, FSQDQM_cfi::pvs, rname, AlCaHLTBitMon_QueryRunRegistry::string, tracker, and trackerName_.

Referenced by UserSteppingAction().

244  {
245  const G4PhysicalVolumeStore* pvs = G4PhysicalVolumeStore::GetInstance();
246  for (auto const& pvcite : *pvs) {
247  const std::string& pvname = (std::string)(DD4hep2DDDName::namePV(pvcite->GetName(), dd4hep_));
248  if (pvname == trackerName_) {
249  tracker = pvcite;
250  } else if (pvname == caloName_) {
251  calo = pvcite;
252  } else if (pvname == btlName_) {
253  btl = pvcite;
254  } else if (pvname == cmseName_) {
255  cmse = pvcite;
256  }
257  if (tracker && calo && btl && cmse)
258  break;
259  }
260  edm::LogVerbatim("SimG4CoreApplication")
261  << "Phase2SteppingAction: pointer for Tracker " << tracker << " and for Calo " << calo << " and for BTL " << btl;
262 
263  const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
264  if (numberEkins > 0) {
265  ekinVolumes.resize(numberEkins, nullptr);
266  for (auto const& lvcite : *lvs) {
267  std::string lvname = (std::string)(DD4hep2DDDName::nameMatterLV(lvcite->GetName(), dd4hep_));
268  for (unsigned int i = 0; i < numberEkins; ++i) {
269  if (lvname == ekinNames[i]) {
270  ekinVolumes[i] = lvcite;
271  break;
272  }
273  }
274  }
275  for (unsigned int i = 0; i < numberEkins; ++i) {
276  edm::LogVerbatim("SimG4CoreApplication") << ekinVolumes[i]->GetName() << " with pointer " << ekinVolumes[i];
277  }
278  }
279 
280  if (numberPart > 0) {
281  G4ParticleTable* theParticleTable = G4ParticleTable::GetParticleTable();
282  ekinPDG.resize(numberPart, 0);
283  for (unsigned int i = 0; i < numberPart; ++i) {
284  const G4ParticleDefinition* part = theParticleTable->FindParticle(ekinParticles[i]);
285  if (nullptr != part)
286  ekinPDG[i] = part->GetPDGEncoding();
287  edm::LogVerbatim("SimG4CoreApplication") << "Particle " << ekinParticles[i] << " with PDG code " << ekinPDG[i]
288  << " and KE cut off " << ekinMins[i] / CLHEP::MeV << " MeV";
289  }
290  }
291 
292  const G4RegionStore* rs = G4RegionStore::GetInstance();
293  if (numberTimes > 0) {
294  maxTimeRegions.resize(numberTimes, nullptr);
295  for (auto const& rcite : *rs) {
296  const G4String& rname = rcite->GetName();
297  for (unsigned int i = 0; i < numberTimes; ++i) {
298  if (rname == (G4String)(maxTimeNames[i])) {
299  maxTimeRegions[i] = rcite;
300  break;
301  }
302  }
303  }
304  }
305  if (ndeadRegions > 0) {
306  deadRegions.resize(ndeadRegions, nullptr);
307  for (auto const& rcite : *rs) {
308  const G4String& rname = rcite->GetName();
309  for (unsigned int i = 0; i < ndeadRegions; ++i) {
310  if (rname == (G4String)(deadRegionNames[i])) {
311  deadRegions[i] = rcite;
312  break;
313  }
314  }
315  }
316  }
317  return true;
318 }
Log< level::Info, true > LogVerbatim
std::vector< std::string > maxTimeNames
std::vector< std::string > ekinNames
const G4VPhysicalVolume * tracker
std::vector< int > ekinPDG
std::vector< G4LogicalVolume * > ekinVolumes
const G4VPhysicalVolume * btl
std::vector< std::string > ekinParticles
part
Definition: HCALResponse.h:20
std::string namePV(const std::string &name, bool dd4hep)
std::vector< double > ekinMins
const G4String rname[NREG]
std::vector< std::string > deadRegionNames
std::vector< const G4Region * > maxTimeRegions
std::vector< const G4Region * > deadRegions
std::string nameMatterLV(const std::string &name, bool dd4hep)
Definition: Common.h:9
const G4VPhysicalVolume * cmse

◆ isInsideDeadRegion()

bool Phase2SteppingAction::isInsideDeadRegion ( const G4Region *  reg) const
inlineprivate

Definition at line 71 of file Phase2SteppingAction.h.

References deadRegions, and nano_mu_digi_cff::region.

Referenced by UserSteppingAction().

71  {
72  bool res = false;
73  for (auto& region : deadRegions) {
74  if (reg == region) {
75  res = true;
76  break;
77  }
78  }
79  return res;
80 }
Definition: Electron.h:6
std::vector< const G4Region * > deadRegions

◆ isLowEnergy()

bool Phase2SteppingAction::isLowEnergy ( const G4LogicalVolume *  lv,
const G4Track *  theTrack 
) const
private

Definition at line 227 of file Phase2SteppingAction.cc.

References ekinMins, ekinPDG, ekinVolumes, mps_fire::i, and numberPart.

Referenced by UserSteppingAction().

227  {
228  const double ekin = theTrack->GetKineticEnergy();
229  int pCode = theTrack->GetDefinition()->GetPDGEncoding();
230 
231  for (auto& vol : ekinVolumes) {
232  if (lv == vol) {
233  for (unsigned int i = 0; i < numberPart; ++i) {
234  if (pCode == ekinPDG[i]) {
235  return (ekin <= ekinMins[i]);
236  }
237  }
238  break;
239  }
240  }
241  return false;
242 }
std::vector< int > ekinPDG
std::vector< G4LogicalVolume * > ekinVolumes
std::vector< double > ekinMins

◆ isOutOfTimeWindow()

bool Phase2SteppingAction::isOutOfTimeWindow ( const G4Region *  reg,
const double &  time 
) const
inlineprivate

Definition at line 82 of file Phase2SteppingAction.h.

References mps_fire::i, maxTimeRegions, maxTrackTime, maxTrackTimes, numberTimes, and hcalRecHitTable_cff::time.

Referenced by UserSteppingAction().

82  {
83  double tofM = maxTrackTime;
84  for (unsigned int i = 0; i < numberTimes; ++i) {
85  if (reg == maxTimeRegions[i]) {
86  tofM = maxTrackTimes[i];
87  break;
88  }
89  }
90  return (time > tofM);
91 }
std::vector< const G4Region * > maxTimeRegions
std::vector< double > maxTrackTimes

◆ PrintKilledTrack()

void Phase2SteppingAction::PrintKilledTrack ( const G4Track *  aTrack,
const TrackStatus tst 
) const
private

Definition at line 320 of file Phase2SteppingAction.cc.

References rname, sDeadRegion, sEnergyDepNaN, sLowEnergy, sLowEnergyInVacuum, sNumberOfSteps, sOutOfTime, AlCaHLTBitMon_QueryRunRegistry::string, and sVeryForward.

Referenced by UserSteppingAction().

320  {
321  std::string vname = "";
322  std::string rname = "";
323  std::string typ = " ";
324  switch (tst) {
325  case sDeadRegion:
326  typ = " in dead region ";
327  break;
328  case sOutOfTime:
329  typ = " out of time window ";
330  break;
331  case sLowEnergy:
332  typ = " low energy limit ";
333  break;
334  case sLowEnergyInVacuum:
335  typ = " low energy limit in vacuum ";
336  break;
337  case sEnergyDepNaN:
338  typ = " energy deposition is NaN ";
339  break;
340  case sVeryForward:
341  typ = " very forward track ";
342  break;
343  case sNumberOfSteps:
344  typ = " too many steps ";
345  break;
346  default:
347  break;
348  }
349  G4VPhysicalVolume* pv = aTrack->GetNextVolume();
350  vname = pv->GetLogicalVolume()->GetName();
351  rname = pv->GetLogicalVolume()->GetRegion()->GetName();
352 
353  const double ekin = aTrack->GetKineticEnergy();
354  if (ekin < 2 * CLHEP::MeV) {
355  return;
356  }
357  edm::LogWarning("SimG4CoreApplication")
358  << "Track #" << aTrack->GetTrackID() << " StepN= " << aTrack->GetCurrentStepNumber() << " "
359  << aTrack->GetDefinition()->GetParticleName() << " E(MeV)=" << ekin / CLHEP::MeV
360  << " T(ns)=" << aTrack->GetGlobalTime() / CLHEP::ns << " is killed due to " << typ << "\n LV: " << vname << " ("
361  << rname << ") at " << aTrack->GetPosition() << " step(cm)=" << aTrack->GetStep()->GetStepLength() / CLHEP::cm;
362 }
const G4String rname[NREG]
Log< level::Warning, false > LogWarning

◆ UserSteppingAction()

void Phase2SteppingAction::UserSteppingAction ( const G4Step *  aStep)
final

Definition at line 91 of file Phase2SteppingAction.cc.

References funct::abs(), btl, calo, cmse, TrackInformation::crossedBoundary(), initialized, initPointer(), TrackInformation::isBTLlooper(), TrackInformation::isFromBTLtoT(), TrackInformation::isFromTtoBTL(), isInsideDeadRegion(), TrackInformation::isInTrkFromBackscattering(), isLowEnergy(), isOutOfTimeWindow(), killBeamPipe, LogDebug, m_g4StepSignal, maxNumberOfSteps, maxTrackTimeForward, maxZCentralCMS, TrackInformation::mcTruthID(), CMSSteppingVerbose::nextStep(), numberEkins, nWarnings, PrintKilledTrack(), sAlive, sDeadRegion, TrackInformation::setBTLlooper(), TrackInformation::setCrossedBoundary(), TrackInformation::setFromBTLtoT(), TrackInformation::setFromTtoBTL(), TrackInformation::setInTrkFromBackscattering(), sKilledByProcess, sLowEnergy, sLowEnergyInVacuum, sNumberOfSteps, sOutOfTime, steppingVerbose, sVeryForward, theCriticalDensity, theCriticalEnergyForVacuum, hcalRecHitTable_cff::time, and tracker.

91  {
92  if (!initialized) {
94  }
95 
96  m_g4StepSignal(aStep);
97 
98  G4Track* theTrack = aStep->GetTrack();
99  TrackStatus tstat = (theTrack->GetTrackStatus() == fAlive) ? sAlive : sKilledByProcess;
100 
101  if (theTrack->GetKineticEnergy() < 0.0) {
102  if (nWarnings < 2) {
103  ++nWarnings;
104  edm::LogWarning("SimG4CoreApplication")
105  << "Phase2SteppingAction::UserPhase2SteppingAction: Track #" << theTrack->GetTrackID() << " "
106  << theTrack->GetDefinition()->GetParticleName()
107  << " Ekin(MeV)= " << theTrack->GetKineticEnergy() / CLHEP::MeV;
108  }
109  theTrack->SetKineticEnergy(0.0);
110  }
111 
112  const G4StepPoint* preStep = aStep->GetPreStepPoint();
113  const G4StepPoint* postStep = aStep->GetPostStepPoint();
114 
115  // the track is killed by the process
116  if (tstat == sKilledByProcess) {
117  if (nullptr != steppingVerbose) {
118  steppingVerbose->nextStep(aStep, fpSteppingManager, false);
119  }
120  return;
121  }
122 
123  if (sAlive == tstat && theTrack->GetCurrentStepNumber() > maxNumberOfSteps) {
124  tstat = sNumberOfSteps;
125  if (nWarnings < 5) {
126  ++nWarnings;
127  edm::LogWarning("SimG4CoreApplication")
128  << "Track #" << theTrack->GetTrackID() << " " << theTrack->GetDefinition()->GetParticleName()
129  << " E(MeV)= " << preStep->GetKineticEnergy() / CLHEP::MeV << " Nstep= " << theTrack->GetCurrentStepNumber()
130  << " is killed due to limit on number of steps;/n PV: " << preStep->GetPhysicalVolume()->GetName() << " at "
131  << theTrack->GetPosition() << " StepLen(mm)= " << aStep->GetStepLength();
132  }
133  }
134  const double time = theTrack->GetGlobalTime();
135 
136  // check Z-coordinate
137  if (sAlive == tstat && std::abs(theTrack->GetPosition().z()) >= maxZCentralCMS) {
139  }
140 
141  // check G4Region
142  if (sAlive == tstat) {
143  // next logical volume and next region
144  const G4LogicalVolume* lv = postStep->GetPhysicalVolume()->GetLogicalVolume();
145  const G4Region* theRegion = lv->GetRegion();
146 
147  // kill in dead regions
148  if (isInsideDeadRegion(theRegion))
149  tstat = sDeadRegion;
150 
151  // kill out of time
152  if (sAlive == tstat) {
153  if (isOutOfTimeWindow(theRegion, time))
154  tstat = sOutOfTime;
155  }
156 
157  // kill low-energy in volumes on demand
158  if (sAlive == tstat && numberEkins > 0) {
159  if (isLowEnergy(lv, theTrack))
160  tstat = sLowEnergy;
161  }
162 
163  // kill low-energy in vacuum
164  if (sAlive == tstat && killBeamPipe) {
165  if (theTrack->GetKineticEnergy() < theCriticalEnergyForVacuum &&
166  theTrack->GetDefinition()->GetPDGCharge() != 0.0 && lv->GetMaterial()->GetDensity() <= theCriticalDensity) {
167  tstat = sLowEnergyInVacuum;
168  }
169  }
170  }
171  // check transition tracker/btl and tracker/calo
172  bool isKilled = false;
173  if (sAlive == tstat || sVeryForward == tstat) {
174  // store TrackInformation about transition from one envelope to another
175  if (preStep->GetPhysicalVolume() == tracker && postStep->GetPhysicalVolume() == btl) {
176  // store transition tracker -> BTL only for tracks entering BTL for the first time
177  TrackInformation* trkinfo = static_cast<TrackInformation*>(theTrack->GetUserInformation());
178  if (!trkinfo->isFromTtoBTL() && !trkinfo->isFromBTLtoT()) {
179  trkinfo->setFromTtoBTL();
180 #ifdef EDM_ML_DEBUG
181  LogDebug("SimG4CoreApplication") << "Setting flag for Tracker -> BTL " << trkinfo->isFromTtoBTL()
182  << " IdAtBTLentrance = " << trkinfo->mcTruthID();
183 #endif
184  } else {
185  trkinfo->setBTLlooper();
186 #ifdef EDM_ML_DEBUG
187  LogDebug("SimG4CoreApplication") << "Setting flag for BTL looper " << trkinfo->isBTLlooper();
188 #endif
189  }
190  } else if (preStep->GetPhysicalVolume() == btl && postStep->GetPhysicalVolume() == tracker) {
191  // store transition BTL -> tracker
192  TrackInformation* trkinfo = static_cast<TrackInformation*>(theTrack->GetUserInformation());
193  if (!trkinfo->isFromBTLtoT()) {
194  trkinfo->setFromBTLtoT();
195 #ifdef EDM_ML_DEBUG
196  LogDebug("SimG4CoreApplication") << "Setting flag for BTL -> Tracker " << trkinfo->isFromBTLtoT();
197 #endif
198  }
199  } else if (preStep->GetPhysicalVolume() == tracker && postStep->GetPhysicalVolume() == calo) {
200  // store transition tracker -> calo
201  TrackInformation* trkinfo = static_cast<TrackInformation*>(theTrack->GetUserInformation());
202  if (!trkinfo->crossedBoundary()) {
203  trkinfo->setCrossedBoundary(theTrack);
204  }
205  } else if ((preStep->GetPhysicalVolume() == calo && postStep->GetPhysicalVolume() == tracker) ||
206  (preStep->GetPhysicalVolume() == cmse && postStep->GetPhysicalVolume() == tracker)) {
207  // accounting for both geometries with direct CALO -> Tracker transitions or older versions with CMSE in the middle
208  TrackInformation* trkinfo = static_cast<TrackInformation*>(theTrack->GetUserInformation());
209  trkinfo->setInTrkFromBackscattering();
210 #ifdef EDM_ML_DEBUG
211  LogDebug("SimG4CoreApplication") << "Setting flag for backscattering from CALO "
212  << trkinfo->isInTrkFromBackscattering();
213 #endif
214  }
215  } else {
216  theTrack->SetTrackStatus(fStopAndKill);
217  isKilled = true;
218 #ifdef EDM_ML_DEBUG
219  PrintKilledTrack(theTrack, tstat);
220 #endif
221  }
222  if (nullptr != steppingVerbose) {
223  steppingVerbose->nextStep(aStep, fpSteppingManager, isKilled);
224  }
225 }
bool crossedBoundary() const
const CMSSteppingVerbose * steppingVerbose
bool isOutOfTimeWindow(const G4Region *reg, const double &time) const
void setInTrkFromBackscattering()
SimActivityRegistry::G4StepSignal m_g4StepSignal
const G4VPhysicalVolume * calo
const G4VPhysicalVolume * tracker
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool isInTrkFromBackscattering() const
const G4VPhysicalVolume * btl
bool isFromBTLtoT() const
int mcTruthID() const
void PrintKilledTrack(const G4Track *, const TrackStatus &) const
bool isBTLlooper() const
bool isLowEnergy(const G4LogicalVolume *, const G4Track *) const
bool isInsideDeadRegion(const G4Region *reg) const
void nextStep(const G4Step *, const G4SteppingManager *ptr, bool isKilled) const
bool isFromTtoBTL() const
Log< level::Warning, false > LogWarning
void setCrossedBoundary(const G4Track *track)
TrackStatus
Definition: Common.h:9
const G4VPhysicalVolume * cmse
#define LogDebug(id)

Member Data Documentation

◆ btl

const G4VPhysicalVolume* Phase2SteppingAction::btl {nullptr}
private

Definition at line 41 of file Phase2SteppingAction.h.

Referenced by initPointer(), and UserSteppingAction().

◆ btlName_

G4String Phase2SteppingAction::btlName_
private

Definition at line 68 of file Phase2SteppingAction.h.

Referenced by initPointer(), and Phase2SteppingAction().

◆ calo

const G4VPhysicalVolume* Phase2SteppingAction::calo {nullptr}
private

Definition at line 40 of file Phase2SteppingAction.h.

Referenced by UserSteppingAction().

◆ caloName_

G4String Phase2SteppingAction::caloName_
private

Definition at line 68 of file Phase2SteppingAction.h.

Referenced by initPointer(), and Phase2SteppingAction().

◆ cms2ZDCName_

G4String Phase2SteppingAction::cms2ZDCName_
private

Definition at line 68 of file Phase2SteppingAction.h.

Referenced by Phase2SteppingAction().

◆ cmse

const G4VPhysicalVolume* Phase2SteppingAction::cmse {nullptr}
private

Definition at line 38 of file Phase2SteppingAction.h.

Referenced by initPointer(), and UserSteppingAction().

◆ cmseName_

G4String Phase2SteppingAction::cmseName_
private

Definition at line 68 of file Phase2SteppingAction.h.

Referenced by initPointer(), and Phase2SteppingAction().

◆ dd4hep_

bool Phase2SteppingAction::dd4hep_
private

Definition at line 59 of file Phase2SteppingAction.h.

Referenced by initPointer().

◆ deadRegionNames

std::vector<std::string> Phase2SteppingAction::deadRegionNames
private

Definition at line 63 of file Phase2SteppingAction.h.

Referenced by initPointer(), and Phase2SteppingAction().

◆ deadRegions

std::vector<const G4Region*> Phase2SteppingAction::deadRegions
private

Definition at line 65 of file Phase2SteppingAction.h.

Referenced by initPointer(), and isInsideDeadRegion().

◆ ekinMins

std::vector<double> Phase2SteppingAction::ekinMins
private

Definition at line 61 of file Phase2SteppingAction.h.

Referenced by initPointer(), isLowEnergy(), and Phase2SteppingAction().

◆ ekinNames

std::vector<std::string> Phase2SteppingAction::ekinNames
private

Definition at line 62 of file Phase2SteppingAction.h.

Referenced by initPointer(), and Phase2SteppingAction().

◆ ekinParticles

std::vector<std::string> Phase2SteppingAction::ekinParticles
private

Definition at line 62 of file Phase2SteppingAction.h.

Referenced by initPointer(), and Phase2SteppingAction().

◆ ekinPDG

std::vector<int> Phase2SteppingAction::ekinPDG
private

Definition at line 67 of file Phase2SteppingAction.h.

Referenced by initPointer(), and isLowEnergy().

◆ ekinVolumes

std::vector<G4LogicalVolume*> Phase2SteppingAction::ekinVolumes
private

Definition at line 66 of file Phase2SteppingAction.h.

Referenced by initPointer(), and isLowEnergy().

◆ hasWatcher

bool Phase2SteppingAction::hasWatcher
private

Definition at line 58 of file Phase2SteppingAction.h.

◆ initialized

bool Phase2SteppingAction::initialized {false}
private

Definition at line 56 of file Phase2SteppingAction.h.

Referenced by UserSteppingAction().

◆ killBeamPipe

bool Phase2SteppingAction::killBeamPipe {false}
private

Definition at line 57 of file Phase2SteppingAction.h.

Referenced by Phase2SteppingAction(), and UserSteppingAction().

◆ m_g4StepSignal

SimActivityRegistry::G4StepSignal Phase2SteppingAction::m_g4StepSignal

Definition at line 27 of file Phase2SteppingAction.h.

Referenced by RunManagerMTWorker::Connect(), and UserSteppingAction().

◆ maxNumberOfSteps

G4int Phase2SteppingAction::maxNumberOfSteps
private

Definition at line 54 of file Phase2SteppingAction.h.

Referenced by Phase2SteppingAction(), and UserSteppingAction().

◆ maxTimeNames

std::vector<std::string> Phase2SteppingAction::maxTimeNames
private

Definition at line 62 of file Phase2SteppingAction.h.

Referenced by initPointer(), and Phase2SteppingAction().

◆ maxTimeRegions

std::vector<const G4Region*> Phase2SteppingAction::maxTimeRegions
private

Definition at line 64 of file Phase2SteppingAction.h.

Referenced by initPointer(), and isOutOfTimeWindow().

◆ maxTrackTime

double Phase2SteppingAction::maxTrackTime
private

Definition at line 45 of file Phase2SteppingAction.h.

Referenced by isOutOfTimeWindow(), and Phase2SteppingAction().

◆ maxTrackTimeForward

double Phase2SteppingAction::maxTrackTimeForward
private

Definition at line 46 of file Phase2SteppingAction.h.

Referenced by Phase2SteppingAction(), and UserSteppingAction().

◆ maxTrackTimes

std::vector<double> Phase2SteppingAction::maxTrackTimes
private

Definition at line 61 of file Phase2SteppingAction.h.

Referenced by isOutOfTimeWindow(), and Phase2SteppingAction().

◆ maxZCentralCMS

double Phase2SteppingAction::maxZCentralCMS
private

Definition at line 47 of file Phase2SteppingAction.h.

Referenced by Phase2SteppingAction(), and UserSteppingAction().

◆ ndeadRegions

unsigned int Phase2SteppingAction::ndeadRegions
private

Definition at line 52 of file Phase2SteppingAction.h.

Referenced by initPointer(), and Phase2SteppingAction().

◆ numberEkins

unsigned int Phase2SteppingAction::numberEkins
private

Definition at line 50 of file Phase2SteppingAction.h.

Referenced by initPointer(), Phase2SteppingAction(), and UserSteppingAction().

◆ numberPart

unsigned int Phase2SteppingAction::numberPart
private

Definition at line 51 of file Phase2SteppingAction.h.

Referenced by initPointer(), isLowEnergy(), and Phase2SteppingAction().

◆ numberTimes

unsigned int Phase2SteppingAction::numberTimes
private

Definition at line 49 of file Phase2SteppingAction.h.

Referenced by initPointer(), isOutOfTimeWindow(), and Phase2SteppingAction().

◆ nWarnings

unsigned int Phase2SteppingAction::nWarnings {0}
private

Definition at line 53 of file Phase2SteppingAction.h.

Referenced by UserSteppingAction().

◆ steppingVerbose

const CMSSteppingVerbose* Phase2SteppingAction::steppingVerbose
private

Definition at line 42 of file Phase2SteppingAction.h.

Referenced by UserSteppingAction().

◆ theCriticalDensity

double Phase2SteppingAction::theCriticalDensity
private

Definition at line 44 of file Phase2SteppingAction.h.

Referenced by Phase2SteppingAction(), and UserSteppingAction().

◆ theCriticalEnergyForVacuum

double Phase2SteppingAction::theCriticalEnergyForVacuum
private

Definition at line 43 of file Phase2SteppingAction.h.

Referenced by Phase2SteppingAction(), and UserSteppingAction().

◆ tracker

const G4VPhysicalVolume* Phase2SteppingAction::tracker {nullptr}
private

Definition at line 39 of file Phase2SteppingAction.h.

Referenced by initPointer(), and UserSteppingAction().

◆ trackerName_

G4String Phase2SteppingAction::trackerName_
private

Definition at line 68 of file Phase2SteppingAction.h.

Referenced by initPointer(), and Phase2SteppingAction().