Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4VITRestProcess.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 // $Id: G4VITRestProcess.hh 100802 2016-11-02 14:55:27Z gcosmo $
27 //
29 //
30 // WARNING : This class is released as a prototype.
31 // It might strongly evolve or even disapear in the next releases.
32 //
33 // Author: Mathieu Karamitros
34 
35 // The code is developed in the framework of the ESA AO7146
36 //
37 // We would be very happy hearing from you, send us your feedback! :)
38 //
39 // In order for Geant4-DNA to be maintained and still open-source,
40 // article citations are crucial.
41 // If you use Geant4-DNA chemistry and you publish papers about your software,
42 // in addition to the general paper on Geant4-DNA:
43 //
44 // Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
45 //
46 // we would be very happy if you could please also cite the following
47 // reference papers on chemistry:
48 //
49 // J. Comput. Phys. 274 (2014) 841-882
50 // Prog. Nucl. Sci. Tec. 2 (2011) 503-508
51 
52 #ifndef G4VITRestProcess_h
53 #define G4VITRestProcess_h 1
54 
56 
57 #include "G4VITProcess.hh"
58 
64 {
65  // Abstract class which defines the public behavior of
66  // physics interactions at rest.
67 
68 public:
71 
72  virtual ~G4VITRestProcess();
73 
74 public:
75  // with description
78 
79  virtual G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&);
80 
81  // no operation in PostStepDoIt and AlongStepDoIt
83  G4double,
84  G4double,
85  G4double&,
87  {
88  return -1.0;
89  }
90 
92  G4double,
94  {
95  return -1.0;
96  }
97 
98  // no operation in PostStepDoIt and AlongStepDoIt
99  virtual G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&)
100  {
101  return 0;
102  }
103 
105  {
106  return 0;
107  }
108 
109 protected:
110  // with description
111 
112  virtual G4double GetMeanLifeTime(const G4Track& aTrack,
113  G4ForceCondition* condition)=0;
114  // Calculates the mean life-time (i.e. for decays) of the
115  // particle at rest due to the occurence of the given process,
116  // or converts the probability of interaction (i.e. for
117  // annihilation) into the life-time of the particle for the
118  // occurence of the given process.
119 
120 protected:
121  // hide default constructor and assignment operator as private
124 };
125 
126 // -----------------------------------------
127 // inlined function members implementation
128 // -----------------------------------------
131 {
132  // beggining of tracking
134 
135  // condition is set to "Not Forced"
136  *condition = NotForced;
137 
138  // get mean life time
139  fpState->currentInteractionLength = GetMeanLifeTime(track, condition);
140 
141 #ifdef G4VERBOSE
142  if((fpState->currentInteractionLength < 0.0) || (verboseLevel > 2))
143  {
144  G4cout << "G4VITRestProcess::AtRestGetPhysicalInteractionLength ";
145  G4cout << "[ " << GetProcessName() << "]" << G4endl;
146  track.GetDynamicParticle()->DumpInfo();
147  G4cout << " in Material " << track.GetMaterial()->GetName() << G4endl;
148  G4cout << "MeanLifeTime = " << fpState->currentInteractionLength / CLHEP::ns
149  << "[ns]" << G4endl;
150  }
151 #endif
152 
153  return (fpState->theNumberOfInteractionLengthLeft)
154  * (fpState->currentInteractionLength);
155 }
156 
158  const G4Step&)
159 {
162  return pParticleChange;
163 }
164 
165 #endif
166 
G4double condition(const G4ErrorSymMatrix &m)
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &, G4double, G4ForceCondition *)
virtual void ClearNumberOfInteractionLengthLeft()
G4int verboseLevel
Definition: G4VProcess.hh:368
const G4DynamicParticle * GetDynamicParticle() const
virtual G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &)
static constexpr double ns
virtual void ResetNumberOfInteractionLengthLeft()
const G4String & GetName() const
Definition: G4Material.hh:178
void DumpInfo(G4int mode=0) const
virtual G4double GetMeanLifeTime(const G4Track &aTrack, G4ForceCondition *condition)=0
Identical to G4VRestProcess with dependency from G4VITProcess.
virtual void ClearInteractionTimeLeft()
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track &track, G4ForceCondition *condition)
G4GLOB_DLL std::ostream G4cout
virtual G4double AlongStepGetPhysicalInteractionLength(const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
G4shared_ptr< G4ProcessState > fpState
Definition: G4Step.hh:76
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
G4Material * GetMaterial() const
virtual ~G4VITRestProcess()
G4VParticleChange * pParticleChange
Definition: G4VProcess.hh:283
#define G4endl
Definition: G4ios.hh:61
G4VITRestProcess & operator=(const G4VITRestProcess &right)
double G4double
Definition: G4Types.hh:76
G4ForceCondition
G4GPILSelection
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
G4ProcessType
virtual G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)