Skip to content

Commit 4f5e150

Browse files
committed
code format
1 parent 4557dfe commit 4f5e150

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

SimG4Core/Application/src/SteppingAction.cc

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ void SteppingAction::UserSteppingAction(const G4Step* aStep) {
116116
}
117117

118118
// the track is killed by the process
119-
if(tstat == sKilledByProcess) {
119+
if (tstat == sKilledByProcess) {
120120
if (nullptr != steppingVerbose) {
121121
steppingVerbose->NextStep(aStep, fpSteppingManager, false);
122122
}
@@ -143,7 +143,6 @@ void SteppingAction::UserSteppingAction(const G4Step* aStep) {
143143

144144
// check G4Region
145145
if (sAlive == tstat) {
146-
147146
// next logical volume and next region
148147
const G4LogicalVolume* lv = postStep->GetPhysicalVolume()->GetLogicalVolume();
149148
const G4Region* theRegion = lv->GetRegion();
@@ -154,22 +153,21 @@ void SteppingAction::UserSteppingAction(const G4Step* aStep) {
154153

155154
// kill out of time
156155
if (sAlive == tstat) {
157-
if(isOutOfTimeWindow(theRegion, time))
158-
tstat = sOutOfTime;
156+
if (isOutOfTimeWindow(theRegion, time))
157+
tstat = sOutOfTime;
159158
}
160159

161160
// kill low-energy in volumes on demand
162161
if (sAlive == tstat && numberEkins > 0) {
163-
if(isLowEnergy(lv, theTrack))
164-
tstat = sLowEnergy;
162+
if (isLowEnergy(lv, theTrack))
163+
tstat = sLowEnergy;
165164
}
166165

167166
// kill low-energy in vacuum
168167
if (sAlive == tstat && killBeamPipe) {
169-
if(theTrack->GetKineticEnergy() < theCriticalEnergyForVacuum &&
170-
theTrack->GetDefinition()->GetPDGCharge() != 0.0 &&
171-
lv->GetMaterial()->GetDensity() <= theCriticalDensity) {
172-
tstat = sLowEnergyInVacuum;
168+
if (theTrack->GetKineticEnergy() < theCriticalEnergyForVacuum &&
169+
theTrack->GetDefinition()->GetPDGCharge() != 0.0 && lv->GetMaterial()->GetDensity() <= theCriticalDensity) {
170+
tstat = sLowEnergyInVacuum;
173171
}
174172
}
175173
}
@@ -322,14 +320,12 @@ void SteppingAction::PrintKilledTrack(const G4Track* aTrack, const TrackStatus&
322320
rname = pv->GetLogicalVolume()->GetRegion()->GetName();
323321

324322
const double ekin = aTrack->GetKineticEnergy();
325-
if(ekin < 2*CLHEP::MeV) { return; }
323+
if (ekin < 2 * CLHEP::MeV) {
324+
return;
325+
}
326326
edm::LogWarning("SimG4CoreApplication")
327-
<< "Track #" << aTrack->GetTrackID() << " StepN= "
328-
<< aTrack->GetCurrentStepNumber() << " "
329-
<< aTrack->GetDefinition()->GetParticleName()
330-
<< " E(MeV)=" << ekin / CLHEP::MeV
331-
<< " T(ns)=" << aTrack->GetGlobalTime() / CLHEP::ns
332-
<< " is killed due to " << typ << "\n LV: " << vname << " ("
333-
<< rname << ") at " << aTrack->GetPosition()
334-
<< " step(cm)=" << aTrack->GetStep()->GetStepLength()/CLHEP::cm;
327+
<< "Track #" << aTrack->GetTrackID() << " StepN= " << aTrack->GetCurrentStepNumber() << " "
328+
<< aTrack->GetDefinition()->GetParticleName() << " E(MeV)=" << ekin / CLHEP::MeV
329+
<< " T(ns)=" << aTrack->GetGlobalTime() / CLHEP::ns << " is killed due to " << typ << "\n LV: " << vname << " ("
330+
<< rname << ") at " << aTrack->GetPosition() << " step(cm)=" << aTrack->GetStep()->GetStepLength() / CLHEP::cm;
335331
}

0 commit comments

Comments
 (0)