CMS 3D CMS Logo

ElectronLimiter.h
Go to the documentation of this file.
1 #ifndef ElectronLimiter_h
2 #define ElectronLimiter_h 1
3 
4 // V.Ivanchenko 2013/10/19
5 // step limiter and killer for e+,e- and other charged particles
6 
8 
9 #include "globals.hh"
10 #include "G4VEmProcess.hh"
11 #include "G4ParticleChangeForGamma.hh"
12 #include <vector>
13 
14 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
15 
16 class G4Step;
17 class G4Track;
18 class G4Region;
19 class G4ParticleDefinition;
20 class G4VEnergyLossProcess;
22 
23 class ElectronLimiter : public G4VEmProcess {
24 public:
25  explicit ElectronLimiter(const edm::ParameterSet &, const G4ParticleDefinition *);
26 
27  ~ElectronLimiter() override;
28 
29  G4bool IsApplicable(const G4ParticleDefinition &) override;
30 
31  void InitialiseProcess(const G4ParticleDefinition *) override;
32 
33  void StartTracking(G4Track *) override;
34 
35  G4double PostStepGetPhysicalInteractionLength(const G4Track &track,
36  G4double previousStepSize,
37  G4ForceCondition *condition) override;
38 
39  G4VParticleChange *PostStepDoIt(const G4Track &, const G4Step &) override;
40 
41  void SetTrackingCutPerRegion(std::vector<const G4Region *> &,
42  std::vector<G4double> &,
43  std::vector<G4double> &,
44  std::vector<G4double> &);
45 
46  inline void SetRangeCheckFlag(G4bool);
47 
48  inline void SetFieldCheckFlag(G4bool);
49 
50 private:
51  G4VEnergyLossProcess *ionisation_;
53  const G4ParticleDefinition *particle_;
54 
55  std::vector<const G4Region *> regions_;
56  std::vector<G4double> energyLimits_;
57  std::vector<G4double> factors_;
58  std::vector<G4double> rms_;
59 
60  G4double minStepLimit_;
61 
62  G4int nRegions_;
65  G4bool killTrack_;
66 };
67 
69 
71 
72 #endif
void SetRangeCheckFlag(G4bool)
ElectronLimiter(const edm::ParameterSet &, const G4ParticleDefinition *)
const G4ParticleDefinition * particle_
void StartTracking(G4Track *) override
CMSTrackingCutModel * trcut_
std::vector< G4double > rms_
G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
G4double minStepLimit_
void InitialiseProcess(const G4ParticleDefinition *) override
~ElectronLimiter() override
void SetFieldCheckFlag(G4bool)
G4VEnergyLossProcess * ionisation_
G4bool IsApplicable(const G4ParticleDefinition &) override
std::vector< const G4Region * > regions_
std::vector< G4double > energyLimits_
G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &) override
void SetTrackingCutPerRegion(std::vector< const G4Region * > &, std::vector< G4double > &, std::vector< G4double > &, std::vector< G4double > &)
std::vector< G4double > factors_