Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:29:31

0001 #ifndef ElectronLimiter_h
0002 #define ElectronLimiter_h 1
0003 
0004 // V.Ivanchenko 2013/10/19
0005 // step limiter and killer for e+,e- and other charged particles
0006 
0007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0008 
0009 #include "globals.hh"
0010 #include "G4VEmProcess.hh"
0011 #include "G4ParticleChangeForGamma.hh"
0012 #include <vector>
0013 
0014 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0015 
0016 class G4Step;
0017 class G4Track;
0018 class G4Region;
0019 class G4ParticleDefinition;
0020 class G4VEnergyLossProcess;
0021 class CMSTrackingCutModel;
0022 
0023 class ElectronLimiter : public G4VEmProcess {
0024 public:
0025   explicit ElectronLimiter(const edm::ParameterSet &, const G4ParticleDefinition *);
0026 
0027   ~ElectronLimiter() override;
0028 
0029   G4bool IsApplicable(const G4ParticleDefinition &) override;
0030 
0031   void InitialiseProcess(const G4ParticleDefinition *) override;
0032 
0033   void StartTracking(G4Track *) override;
0034 
0035   G4double PostStepGetPhysicalInteractionLength(const G4Track &track,
0036                                                 G4double previousStepSize,
0037                                                 G4ForceCondition *condition) override;
0038 
0039   G4VParticleChange *PostStepDoIt(const G4Track &, const G4Step &) override;
0040 
0041   void SetTrackingCutPerRegion(std::vector<const G4Region *> &,
0042                                std::vector<G4double> &,
0043                                std::vector<G4double> &,
0044                                std::vector<G4double> &);
0045 
0046   inline void SetRangeCheckFlag(G4bool);
0047 
0048   inline void SetFieldCheckFlag(G4bool);
0049 
0050 private:
0051   G4VEnergyLossProcess *ionisation_;
0052   CMSTrackingCutModel *trcut_;
0053   const G4ParticleDefinition *particle_;
0054 
0055   std::vector<const G4Region *> regions_;
0056   std::vector<G4double> energyLimits_;
0057   std::vector<G4double> factors_;
0058   std::vector<G4double> rms_;
0059 
0060   G4double minStepLimit_;
0061 
0062   G4int nRegions_;
0063   G4bool rangeCheckFlag_;
0064   G4bool fieldCheckFlag_;
0065   G4bool killTrack_;
0066 };
0067 
0068 inline void ElectronLimiter::SetRangeCheckFlag(G4bool val) { rangeCheckFlag_ = val; }
0069 
0070 inline void ElectronLimiter::SetFieldCheckFlag(G4bool val) { fieldCheckFlag_ = val; }
0071 
0072 #endif