Geant4_10
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 64057 2012-10-30 15:04:49Z 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 (kara (AT) cenbg . in2p3 . fr)
34 //
35 // History:
36 // -----------
37 // 10 Oct 2011 M.Karamitros created
38 //
39 // -------------------------------------------------------------------
40 
41 
42 #ifndef G4VITRestProcess_h
43 #define G4VITRestProcess_h 1
44 
46 
47 #include "G4VITProcess.hh"
48 
54 {
55  // Abstract class which defines the public behavior of
56  // physics interactions at rest.
57 
58  public:
59  G4VITRestProcess(const G4String& ,
60  G4ProcessType aType = fNotDefined );
62 
63  virtual ~G4VITRestProcess();
64 
65  public: // with description
67  const G4Track& track,
69  );
70 
72  const G4Track& ,
73  const G4Step&
74  );
75 
76  // no operation in PostStepDoIt and AlongStepDoIt
78  const G4Track&,
79  G4double ,
80  G4double ,
81  G4double& ,
83  ){ return -1.0; }
84 
86  const G4Track& ,
87  G4double ,
89  ) { return -1.0; }
90 
91  // no operation in PostStepDoIt and AlongStepDoIt
93  const G4Track& ,
94  const G4Step&
95  ) {return 0;}
96 
98  const G4Track& ,
99  const G4Step&
100  ) {return 0;}
101 
102  protected: // with description
103 
104  virtual G4double GetMeanLifeTime(const G4Track& aTrack,G4ForceCondition* condition)=0;
105  // Calculates the mean life-time (i.e. for decays) of the
106  // particle at rest due to the occurence of the given process,
107  // or converts the probability of interaction (i.e. for
108  // annihilation) into the life-time of the particle for the
109  // occurence of the given process.
110 
111  protected:
112  // hide default constructor and assignment operator as private
115 };
116 
117 // -----------------------------------------
118 // inlined function members implementation
119 // -----------------------------------------
121  const G4Track& track,
123  )
124 {
125  // beggining of tracking
127 
128  // condition is set to "Not Forced"
129  *condition = NotForced;
130 
131  // get mean life time
132  fpState->currentInteractionLength = GetMeanLifeTime(track, condition);
133 
134 #ifdef G4VERBOSE
135  if ((fpState->currentInteractionLength <0.0) || (verboseLevel>2)){
136  G4cout << "G4VITRestProcess::AtRestGetPhysicalInteractionLength ";
137  G4cout << "[ " << GetProcessName() << "]" <<G4endl;
138  track.GetDynamicParticle()->DumpInfo();
139  G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
140  G4cout << "MeanLifeTime = " << fpState->currentInteractionLength/CLHEP::ns << "[ns]" <<G4endl;
141  }
142 #endif
143 
145 }
146 
147 
149  const G4Track&,
150  const G4Step&
151  )
152 {
153 // clear NumberOfInteractionLengthLeft
155 
156  return pParticleChange;
157 }
158 
159 
160 #endif
161 
162 
163 
164 
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 &)
virtual void ResetNumberOfInteractionLengthLeft()
const G4String & GetName() const
Definition: G4Material.hh:176
void DumpInfo(G4int mode=0) const
G4ProcessState * fpState
virtual G4double GetMeanLifeTime(const G4Track &aTrack, G4ForceCondition *condition)=0
Identical to G4VRestProcess with dependency from G4VITProcess.
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track &track, G4ForceCondition *condition)
G4GLOB_DLL std::ostream G4cout
virtual G4double AlongStepGetPhysicalInteractionLength(const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
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 &)