Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4IVRestDiscreteProcess.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 //
26 //
27 // $Id$
28 //
29 // $Id:
30 // ------------------------------------------------------------
31 // GEANT 4 class header file
32 //
33 //
34 // Class Description
35 // Abstract class which defines the public behavior of
36 // rest + discrete physics interactions.
37 //
38 // ------------------------------------------------------------
39 // New Physics scheme 8 Mar. 1997 H.Kurahige
40 // ------------------------------------------------------------
41 
42 
43 #ifndef G4IVRestDiscreteProcess_h
44 #define G4IVRestDiscreteProcess_h 1
45 
47 
48 #include "globals.hh"
49 #include "G4ios.hh"
50 #include "Randomize.hh"
51 
52 #include "G4VProcess.hh"
53 
54 #include "G4Step.hh"
55 #include "G4Track.hh"
56 #include "G4MaterialTable.hh"
57 #include "G4VParticleChange.hh"
58 
60 {
61  // Abstract class which defines the public behavior of
62  // rest + discrete physics interactions.
63 
64  public: // with description
65 
66  // constructors
68  G4ProcessType aType = fNotDefined );
70 
71  public:
72  virtual ~G4IVRestDiscreteProcess();
73 
74  public: // with description
75  // GPIL and DoIt methods derived from G4VProcess
77  const G4Track& track,
78  G4double previousStepSize,
80  );
81 
83  const G4Track& ,
84  const G4Step&
85  );
86 
88  const G4Track& ,
90  );
91 
93  const G4Track& ,
94  const G4Step&
95  );
96 
97  // no operation in AlongStepDoIt
99  const G4Track&,
100  G4double ,
101  G4double ,
102  G4double& ,
104  ){ return -1.0; }
105 
106  // no operation in AlongStepDoIt
108  const G4Track& ,
109  const G4Step&
110  ) {return 0;}
111 
112  protected:// with description
114  G4double previousStepSize) ;
115 
116  virtual G4double GetMeanLifeTime(const G4Track& aTrack,G4ForceCondition* condition)=0;
117  // Calculates the mean life-time (i.e. for decays) of the
118  // particle at rest due to the occurence of the given process,
119  // or converts the probability of interaction (i.e. for
120  // annihilation) into the life-time of the particle for the
121  // occurence of the given process.
122 
123  private:
124  // hide default constructor and assignment operator as private
127 
128 
129  protected:
132 
134 };
135 
136 // -----------------------------------------
137 // inlined function members implementation
138 // -----------------------------------------
139 
140 inline
142  G4double )
143  {
144  // dummy routine
145  ;
146  }
147 
149  const G4Track& ,
150  const G4Step&
151  )
152 {
153 // reset NumberOfInteractionLengthLeft
155 
156  return pParticleChange;
157 }
158 
160  const G4Track& track,
162  )
163 {
164  // beggining of tracking
166 
167  // condition is set to "Not Forced"
168  *condition = NotForced;
169 
170  // get mean life time
171  currentInteractionLength = GetMeanLifeTime(track, condition);
172 
173 #ifdef G4VERBOSE
174  if ((currentInteractionLength <0.0) || (verboseLevel>2)){
175  G4cout << "G4IVRestDiscreteProcess::AtRestGetPhysicalInteractionLength ";
176  G4cout << "[ " << GetProcessName() << "]" <<G4endl;
177  track.GetDynamicParticle()->DumpInfo();
178  G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
179  G4cout << "MeanLifeTime = " << currentInteractionLength/CLHEP::ns << "[ns]" <<G4endl;
180  }
181 #endif
182 
184 }
185 
186 
188  const G4Track&,
189  const G4Step&
190  )
191 {
192 // clear NumberOfInteractionLengthLeft
194 
195  return pParticleChange;
196 }
197 
198 #endif