9 #include "G4ParticleDefinition.hh" 10 #include "G4VEnergyLossProcess.hh" 11 #include "G4LossTableManager.hh" 12 #include "G4DummyModel.hh" 15 #include "G4Region.hh" 16 #include "G4SystemOfUnits.hh" 17 #include "G4TransportationProcessType.hh" 20 : G4VEmProcess(
"eLimiter", fGeneral),
24 rangeCheckFlag_(
false),
25 fieldCheckFlag_(
false),
28 SetProcessSubType(static_cast<int>(STEP_LIMITER));
29 minStepLimit_ =
p.getParameter<
double>(
"MinStepLimit") * CLHEP::mm;
36 G4LossTableManager *lManager = G4LossTableManager::Instance();
43 AddEmModel(0,
new G4DummyModel());
45 if (lManager->IsMaster()) {
47 <<
"ElectronLimiter::BuildPhysicsTable for " <<
particle_->GetParticleName() <<
" ioni: " <<
ionisation_ 49 <<
" regions for tracking cuts\n";
54 G4double previousLimit,
55 G4ForceCondition *condition) {
56 *condition = NotForced;
57 G4double
limit = DBL_MAX;
60 G4double kinEnergy = aTrack.GetKineticEnergy();
69 const G4Region *reg = aTrack.GetVolume()->GetLogicalVolume()->GetRegion();
81 G4double safety = aTrack.GetStep()->GetPreStepPoint()->GetSafety();
83 G4double
range =
ionisation_->GetRange(kinEnergy, aTrack.GetMaterialCutsCouple());
84 if (safety >=
range) {
97 fParticleChange.Initialize(aTrack);
99 fParticleChange.ProposeTrackStatus(fStopAndKill);
101 fParticleChange.ProposeLocalEnergyDeposit(edep);
102 fParticleChange.SetProposedKineticEnergy(0.0);
104 return &fParticleChange;
112 std::vector<G4double> &
cut,
113 std::vector<G4double> &fac,
114 std::vector<G4double> &
rms) {
Log< level::Info, true > LogVerbatim
ElectronLimiter(const edm::ParameterSet &, const G4ParticleDefinition *)
void SetTrackingCutPerRegion(std::vector< const G4Region *> &, std::vector< G4double > &, std::vector< G4double > &, std::vector< G4double > &)
const G4ParticleDefinition * particle_
void StartTracking(G4Track *) override
CMSTrackingCutModel * trcut_
std::vector< G4double > rms_
G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
void InitialiseProcess(const G4ParticleDefinition *) override
~ElectronLimiter() override
void InitialiseForStep(G4double fac, G4double rms)
G4VEnergyLossProcess * ionisation_
G4bool IsApplicable(const G4ParticleDefinition &) override
virtual G4double SampleEnergyDepositEcal(G4double kinEnergy)
std::vector< const G4Region * > regions_
std::vector< G4double > energyLimits_
G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &) override
std::vector< G4double > factors_