Geant4  10.01.p02
F01StepCut.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
28 //
29 //
30 // $Id: F01StepCut.hh 76248 2013-11-08 11:19:52Z gcosmo $
31 //
32 //
33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
35 
36 #ifndef F01StepCut_h
37 #define F01StepCut_h 1
38 
39 #include "G4VDiscreteProcess.hh"
40 
41 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42 
44 {
45  public:
46 
47  F01StepCut(const G4String& processName ="UserStepCut" );
49 
50  virtual ~F01StepCut();
51 
53  const G4Track& track,
54  G4double previousStepSize,
56  );
57 
59  const G4Track&,
60  const G4Step&
61  );
62 
63  void SetMaxStep(G4double);
64 
65  protected:
66 
67  // it is not needed here !
68  virtual G4double GetMeanFreePath(const G4Track& aTrack,
69  G4double previousStepSize,
70  G4ForceCondition* condition
71  );
72 
73  private:
74 
75  // hide assignment operator as private
77 
78  private:
79 
81 };
82 
83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84 
85 // inlined function members implementation
86 
88  const G4Track& aTrack,
89  G4double,
91 {
92  // condition is set to "Not Forced"
93  *condition = NotForced;
94 
95  G4double proposedStep = DBL_MAX;
96 
97  if((fMaxChargedStep > 0.) &&
98  (aTrack.GetVolume() != 0) &&
99  (aTrack.GetVolume()->GetName() == "Absorber") &&
100  (aTrack.GetDynamicParticle()->GetDefinition()->GetPDGCharge() != 0.))
101  proposedStep = fMaxChargedStep;
102 
103  return proposedStep;
104 }
105 
106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
107 
109  const G4Track& aTrack,
110  const G4Step&
111  )
112 {
113  // do nothing
114  aParticleChange.Initialize(aTrack);
115  return &aParticleChange;
116 }
117 
118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
119 
121  G4double,
123 {
124  return 0.;
125 }
126 
127 #endif
G4double condition(const G4ErrorSymMatrix &m)
F01StepCut(const G4String &processName="UserStepCut")
Definition: F01StepCut.cc:44
void SetMaxStep(G4double)
Definition: F01StepCut.cc:66
const G4DynamicParticle * GetDynamicParticle() const
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
Definition: F01StepCut.hh:108
G4ParticleDefinition * GetDefinition() const
virtual ~F01StepCut()
Definition: F01StepCut.cc:55
const G4String & GetName() const
G4double fMaxChargedStep
Definition: F01StepCut.hh:80
Definition: G4Step.hh:76
F01StepCut & operator=(const F01StepCut &right)
virtual void Initialize(const G4Track &)
virtual G4double GetMeanFreePath(const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition)
Definition: F01StepCut.hh:120
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
Definition: F01StepCut.hh:87
G4ParticleChange aParticleChange
Definition: G4VProcess.hh:289
G4VPhysicalVolume * GetVolume() const
double G4double
Definition: G4Types.hh:76
G4ForceCondition
G4double GetPDGCharge() const
#define DBL_MAX
Definition: templates.hh:83