Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13_0_X SIM] Backport for ZDC simulation #43483

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SimG4Core/Application/interface/SteppingAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class SteppingAction : public G4UserSteppingAction {
EventAction* eventAction_;
const G4VPhysicalVolume *tracker, *calo;
const CMSSteppingVerbose* steppingVerbose;
const G4LogicalVolume* m_CMStoZDC{nullptr};
double theCriticalEnergyForVacuum;
double theCriticalDensity;
double maxTrackTime;
Expand Down
7 changes: 5 additions & 2 deletions SimG4Core/Application/src/SteppingAction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ void SteppingAction::UserSteppingAction(const G4Step* aStep) {
}

// check G4Region
if (sAlive == tstat) {
if (sAlive == tstat || sVeryForward == tstat) {
// next logical volume and next region
const G4LogicalVolume* lv = postStep->GetPhysicalVolume()->GetLogicalVolume();
const G4Region* theRegion = lv->GetRegion();

// kill in dead regions
if (isInsideDeadRegion(theRegion))
if (lv != m_CMStoZDC && isInsideDeadRegion(theRegion))
tstat = sDeadRegion;

// kill out of time
Expand Down Expand Up @@ -245,6 +245,9 @@ bool SteppingAction::initPointer() {
ekinVolumes.resize(numberEkins, nullptr);
for (auto const& lvcite : *lvs) {
const G4String& lvname = lvcite->GetName();
if (lvname == "CMStoZDC") {
m_CMStoZDC = lvcite;
}
for (unsigned int i = 0; i < numberEkins; ++i) {
if (lvname == (G4String)(ekinNames[i])) {
ekinVolumes[i] = lvcite;
Expand Down