Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // 26 // G4VRestProcess << 23 // >> 24 // $Id: G4VRestProcess.hh,v 1.5 2001/07/11 10:08:18 gunter Exp $ >> 25 // GEANT4 tag $Name: geant4-05-01-patch-01 $ >> 26 // >> 27 // >> 28 // ------------------------------------------------------------ >> 29 // GEANT 4 class header file >> 30 // >> 31 // History: first implementation, based on object model of >> 32 // 2nd December 1995, G.Cosmo 27 // 33 // 28 // Class description: << 34 // Class Description >> 35 // Abstract class which defines the public behavior of >> 36 // physics interactions at rest. 29 // 37 // 30 // Abstract class which defines the public beh << 38 // ------------------------------------------------------------ 31 // physics interactions at rest. << 39 // New Physics scheme 18 Dec. 1996 H.Kurahige >> 40 // ------------------------------------------------------------ >> 41 // modified 25 Feb. 1997 H.Kurahige >> 42 // modified 8 Mar. 1997 H.Kurahige >> 43 // modified 26 Mar. 1997 H.Kurahige >> 44 // modified 16 Apr. 1997 L.Urban >> 45 // modified 17 Dec. 1997 L.Urban >> 46 // modified for new ParticleChange 12 Mar. 1998 H.Kurashige >> 47 32 48 33 // Authors: << 49 #ifndef G4VRestProcess_h 34 // - 2 December 1995, G.Cosmo - First implemen << 50 #define G4VRestProcess_h 1 35 // - 18 December 1996, H.Kurashige - New Physi << 36 // ------------------------------------------- << 37 #ifndef G4VRestProcess_hh << 38 #define G4VRestProcess_hh 1 << 39 51 40 #include "globals.hh" 52 #include "globals.hh" 41 #include "G4ios.hh" 53 #include "G4ios.hh" 42 54 43 #include "G4VProcess.hh" 55 #include "G4VProcess.hh" 44 56 >> 57 45 class G4VRestProcess : public G4VProcess 58 class G4VRestProcess : public G4VProcess 46 { 59 { 47 public: << 60 // Abstract class which defines the public behavior of 48 << 61 // physics interactions at rest. 49 G4VRestProcess(const G4String& aName, << 50 G4ProcessType aType = fNotD << 51 G4VRestProcess(G4VRestProcess&); << 52 62 53 virtual ~G4VRestProcess(); << 63 public: >> 64 G4VRestProcess(const G4String& , >> 65 G4ProcessType aType = fNotDefined ); >> 66 G4VRestProcess(G4VRestProcess& ); 54 67 55 G4VRestProcess& operator=(const G4VRestPro << 68 virtual ~G4VRestProcess(); 56 69 57 virtual G4double AtRestGetPhysicalInteract << 70 public: // with description >> 71 virtual G4double AtRestGetPhysicalInteractionLength( 58 const G4Track& tr 72 const G4Track& track, 59 G4ForceCondition* << 73 G4ForceCondition* condition 60 ); << 74 ); 61 75 62 virtual G4VParticleChange* AtRestDoIt( << 76 virtual G4VParticleChange* AtRestDoIt( 63 const G4Track& , << 77 const G4Track& , 64 const G4Step& << 78 const G4Step& 65 ); << 79 ); 66 80 67 virtual G4double AlongStepGetPhysicalInter << 81 // no operation in PostStepDoIt and AlongStepDoIt >> 82 virtual G4double AlongStepGetPhysicalInteractionLength( 68 const G4Track&, 83 const G4Track&, 69 G4double , << 84 G4double , 70 G4double , << 85 G4double , 71 G4double& , << 86 G4double& , 72 G4GPILSelection* << 87 G4GPILSelection* 73 ) { return -1.0; } << 88 ){ return -1.0; }; 74 // No operation in AlongStepGPIL << 75 89 76 virtual G4double PostStepGetPhysicalIntera << 90 virtual G4double PostStepGetPhysicalInteractionLength( 77 const G4Track& , 91 const G4Track& , 78 G4double , << 92 G4double , 79 G4ForceCondition* << 93 G4ForceCondition* 80 ) { return -1.0; } << 94 ) { return -1.0; }; 81 // No operation in PostStepGPIL << 95 >> 96 // no operation in PostStepDoIt and AlongStepDoIt >> 97 virtual G4VParticleChange* PostStepDoIt( >> 98 const G4Track& , >> 99 const G4Step& >> 100 ) {return 0;}; >> 101 >> 102 virtual G4VParticleChange* AlongStepDoIt( >> 103 const G4Track& , >> 104 const G4Step& >> 105 ) {return 0;}; >> 106 >> 107 protected: // with description >> 108 >> 109 virtual G4double GetMeanLifeTime(const G4Track& aTrack,G4ForceCondition* condition)=0; >> 110 // Calculates the mean life-time (i.e. for decays) of the >> 111 // particle at rest due to the occurence of the given process, >> 112 // or converts the probability of interaction (i.e. for >> 113 // annihilation) into the life-time of the particle for the >> 114 // occurence of the given process. >> 115 >> 116 private: >> 117 // hide default constructor and assignment operator as private >> 118 G4VRestProcess(); >> 119 G4VRestProcess & operator=(const G4VRestProcess &right); >> 120 }; 82 121 83 virtual G4VParticleChange* PostStepDoIt( << 122 // ----------------------------------------- 84 const G4Track& , << 123 // inlined function members implementation 85 const G4Step& << 124 // ----------------------------------------- 86 ) { return 0; } << 125 #include "G4Step.hh" 87 // No operation in PostStepDoIt << 126 #include "G4Track.hh" >> 127 #include "G4MaterialTable.hh" >> 128 #include "G4VParticleChange.hh" 88 129 89 virtual G4VParticleChange* AlongStepDoIt( << 130 inline G4double G4VRestProcess::AtRestGetPhysicalInteractionLength( 90 const G4Track& , << 131 const G4Track& track, 91 const G4Step& << 132 G4ForceCondition* condition 92 ) { return 0; } << 133 ) 93 // No operation in AlongStepDoIt << 134 { 94 << 135 // beggining of tracking 95 protected: << 136 ResetNumberOfInteractionLengthLeft(); 96 << 97 virtual G4double GetMeanLifeTime(const G4T << 98 G4ForceCo << 99 // Calculates the mean life-time (i.e. f << 100 // particle at rest due to the occurrenc << 101 // or converts the probability of intera << 102 // annihilation) into the life-time of t << 103 // occurrence of the given process << 104 137 105 private: << 138 // condition is set to "Not Forced" >> 139 *condition = NotForced; >> 140 >> 141 // get mean life time >> 142 currentInteractionLength = GetMeanLifeTime(track, condition); >> 143 >> 144 #ifdef G4VERBOSE >> 145 if ((currentInteractionLength <0.0) || (verboseLevel>2)){ >> 146 G4cout << "G4VRestProcess::AtRestGetPhysicalInteractionLength "; >> 147 G4cout << "[ " << GetProcessName() << "]" <<G4endl; >> 148 track.GetDynamicParticle()->DumpInfo(); >> 149 G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl; >> 150 G4cout << "MeanLifeTime = " << currentInteractionLength/ns << "[ns]" <<G4endl; >> 151 } >> 152 #endif >> 153 >> 154 return theNumberOfInteractionLengthLeft * currentInteractionLength; >> 155 } >> 156 >> 157 >> 158 inline G4VParticleChange* G4VRestProcess::AtRestDoIt( >> 159 const G4Track&, >> 160 const G4Step& >> 161 ) >> 162 { >> 163 // clear NumberOfInteractionLengthLeft >> 164 ClearNumberOfInteractionLengthLeft(); >> 165 >> 166 return pParticleChange; >> 167 } 106 168 107 G4VRestProcess(); << 108 // Hidden default constructor << 109 }; << 110 169 111 #endif 170 #endif >> 171 >> 172 >> 173 112 174