Geant4  10.01
F03StepCut.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: F03StepCut.hh 76602 2013-11-13 08:33:35Z gcosmo $
31 //
32 //
33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
35 
36 #ifndef F03StepCut_h
37 #define F03StepCut_h 1
38 
39 #include "G4VDiscreteProcess.hh"
40 
41 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42 
44 {
45  public:
46 
47  F03StepCut(const G4String& processName ="UserStepCut" );
49 
50  virtual ~F03StepCut();
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)
F03StepCut & operator=(const F03StepCut &right)
F03StepCut(const G4String &processName="UserStepCut")
Definition: F03StepCut.cc:44
const G4DynamicParticle * GetDynamicParticle() const
virtual ~F03StepCut()
Definition: F03StepCut.cc:55
G4ParticleDefinition * GetDefinition() const
G4double fMaxChargedStep
Definition: F03StepCut.hh:80
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
Definition: F03StepCut.hh:87
void SetMaxStep(G4double)
Definition: F03StepCut.cc:66
const G4String & GetName() const
Definition: G4Step.hh:76
virtual void Initialize(const G4Track &)
G4ParticleChange aParticleChange
Definition: G4VProcess.hh:289
G4VPhysicalVolume * GetVolume() const
virtual G4double GetMeanFreePath(const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition)
Definition: F03StepCut.hh:120
double G4double
Definition: G4Types.hh:76
G4ForceCondition
G4double GetPDGCharge() const
#define DBL_MAX
Definition: templates.hh:83
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
Definition: F03StepCut.hh:108