Geant4 Cross Reference |
>> 1 // This code implementation is the intellectual property of >> 2 // the GEANT4 collaboration. 1 // 3 // 2 // ******************************************* << 4 // By copying, distributing or modifying the Program (or any work 3 // * License and Disclaimer << 5 // based on the Program) you indicate your acceptance of this statement, 4 // * << 6 // and all its terms. 5 // * The Geant4 software is copyright of th << 7 // 6 // * the Geant4 Collaboration. It is provided << 8 // $Id: G4VContinuousProcess.hh,v 1.4 1999/12/15 14:53:42 gunter Exp $ 7 // * conditions of the Geant4 Software License << 9 // GEANT4 tag $Name: geant4-03-00 $ 8 // * LICENSE and available at http://cern.ch/ << 10 // 9 // * include a list of copyright holders. << 11 // 10 // * << 12 // ------------------------------------------------------------ 11 // * Neither the authors of this software syst << 13 // GEANT 4 class header file 12 // * institutes,nor the agencies providing fin << 14 // 13 // * work make any representation or warran << 15 // For information related to this code contact: 14 // * regarding this software system or assum << 16 // CERN, CN Division, ASD group 15 // * use. Please see the license in the file << 17 // History: first implementation, based on object model of 16 // * for the full disclaimer and the limitatio << 18 // 2nd December 1995, G.Cosmo 17 // * << 19 // add G4VContinuousProcess(const G4String&) 24 Jul 1996, Hisaya kurashige 18 // * This code implementation is the result << 20 // 19 // * technical work of the GEANT4 collaboratio << 21 // Class Description 20 // * By using, copying, modifying or distri << 22 // Abstract class which defines the public behavior of 21 // * any work based on the software) you ag << 23 // Continuous physics interactions. 22 // * use in resulting scientific publicati << 24 // 23 // * acceptance of all terms of the Geant4 Sof << 25 // ------------------------------------------------------------ 24 // ******************************************* << 26 // New Physics scheme 18 Dec. 1996 H.Kurahige 25 // << 27 // ------------------------------------------------------------ 26 // G4VContinuousProcess << 28 // modified 25 Feb. 1997 H.Kurahige 27 // << 29 // modified 8 Mar. 1997 H.Kurashige 28 // Class description: << 30 // modified 22 Mar. 1997 H.Kurashige 29 // << 31 // modified 26 Mar. 1997 H.Kurashige 30 // Abstract class which defines the public beh << 32 // modified AlongStepGPIL etc. 17 Dec. 1997 H.Kurashige 31 // Continuous physics interactions. << 33 // fix bugs in GetGPILSelection() 24 Jan. 1998 H.Kurashige 32 << 34 // modified for new ParticleChange 12 Mar. 1998 H.Kurashige 33 // Authors: << 35 34 // - 2 December 1995, G.Cosmo - First implemen << 36 #ifndef G4VContinuousProcess_h 35 // - 18 December 1996, H.Kurashige - New Physi << 37 #define G4VContinuousProcess_h 1 36 // ------------------------------------------- << 37 #ifndef G4VContinuousProcess_hh << 38 #define G4VContinuousProcess_hh 1 << 39 38 40 #include "globals.hh" 39 #include "globals.hh" 41 #include "G4ios.hh" 40 #include "G4ios.hh" 42 41 43 #include "G4VProcess.hh" 42 #include "G4VProcess.hh" 44 43 45 class G4VContinuousProcess : public G4VProcess 44 class G4VContinuousProcess : public G4VProcess 46 { 45 { >> 46 // Abstract class which defines the public behavior of >> 47 // Continuous physics interactions. 47 public: 48 public: 48 49 49 G4VContinuousProcess(const G4String& aName << 50 G4VContinuousProcess(const G4String& , 50 G4ProcessType aType = << 51 G4ProcessType aType = fNotDefined ); 51 G4VContinuousProcess(G4VContinuousProcess << 52 G4VContinuousProcess(G4VContinuousProcess &); 52 53 53 virtual ~G4VContinuousProcess(); << 54 virtual ~G4VContinuousProcess(); 54 55 55 G4VContinuousProcess& operator=(const G4VC << 56 public: // with description 56 << 57 virtual G4double AlongStepGetPhysicalInteractionLength( 57 virtual G4double AlongStepGetPhysicalInter << 58 const G4Track& tr 58 const G4Track& track, 59 G4double previou << 59 G4double previousStepSize, 60 G4double current << 60 G4double currentMinimumStep, 61 G4double& propose << 61 G4double& proposedSafety, 62 G4GPILSelection* 62 G4GPILSelection* selection 63 ); << 63 ); 64 64 65 virtual G4VParticleChange* AlongStepDoIt( << 65 virtual G4VParticleChange* AlongStepDoIt( 66 const G4Track& , << 66 const G4Track& , 67 const G4Step& << 67 const G4Step& 68 ); << 68 ); 69 69 70 // no operation in AtRestDoIt and PostStep << 70 // no operation in AtRestDoIt and PostStepDoIt 71 // << 71 virtual G4double PostStepGetPhysicalInteractionLength( 72 virtual G4double PostStepGetPhysicalIntera << 73 const G4Track&, 72 const G4Track&, 74 G4double, << 73 G4double, 75 G4ForceCondition* << 74 G4ForceCondition* 76 ) { return -1.0; } << 75 ){ return -1.0; }; 77 << 78 virtual G4double AtRestGetPhysicalInteract << 79 const G4Track& , << 80 G4ForceCondition* << 81 ) { return -1.0; } << 82 76 83 // no operation in AtRestDoIt and PostStep << 77 virtual G4double AtRestGetPhysicalInteractionLength( 84 // << 85 virtual G4VParticleChange* AtRestDoIt( << 86 const G4Track& , 78 const G4Track& , 87 const G4Step& << 79 G4ForceCondition* 88 ) { return 0; } << 80 ) { return -1.0; }; 89 81 90 virtual G4VParticleChange* PostStepDoIt( << 82 // no operation in AtRestDoIt and PostStepDoIt 91 const G4Track& , << 83 virtual G4VParticleChange* AtRestDoIt( 92 const G4Step& << 84 const G4Track& , 93 ) { return 0; } << 85 const G4Step& >> 86 ) {return 0;}; >> 87 >> 88 virtual G4VParticleChange* PostStepDoIt( >> 89 const G4Track& , >> 90 const G4Step& >> 91 ) {return 0;}; 94 92 95 protected: << 93 protected: // with description >> 94 virtual G4double GetContinuousStepLimit(const G4Track& aTrack, >> 95 G4double previousStepSize, >> 96 G4double currentMinimumStep, >> 97 G4double& currentSafety >> 98 )=0; >> 99 // This pure virtual function is used to calculate step limit >> 100 // for AlongStep in the derived processes 96 101 97 virtual G4double GetContinuousStepLimit( c << 102 private: 98 G << 103 // this is the returnd value of G4GPILSelection in 99 G << 104 // the arguments of AlongStepGPIL() 100 G << 105 G4GPILSelection valueGPILSelection; 101 // This pure virtual function is used to << 106 102 // for AlongStep in the derived processe << 107 protected: // with description >> 108 // these two methods are set/get methods for valueGPILSelection >> 109 void SetGPILSelection(G4GPILSelection selection) >> 110 { valueGPILSelection = selection;}; 103 111 104 inline void SetGPILSelection(G4GPILSelecti << 112 G4GPILSelection GetGPILSelection() const{return valueGPILSelection;}; 105 { valueGPILSelection = selection; } << 106 113 107 inline G4GPILSelection GetGPILSelection() << 108 { return valueGPILSelection; } << 109 114 110 private: 115 private: >> 116 // hide default constructor and assignment operator as private >> 117 G4VContinuousProcess(); >> 118 G4VContinuousProcess & operator=(const G4VContinuousProcess &right); 111 119 112 G4VContinuousProcess(); << 113 // Hidden default constructor << 114 << 115 G4GPILSelection valueGPILSelection = Candi << 116 // The returned value of G4GPILSelection << 117 // the arguments of AlongStepGPIL() << 118 }; 120 }; >> 121 // ----------------------------------------- >> 122 // inlined function members implementation >> 123 // ----------------------------------------- >> 124 #include "G4Step.hh" >> 125 #include "G4Track.hh" >> 126 #include "G4MaterialTable.hh" >> 127 #include "G4VParticleChange.hh" >> 128 >> 129 inline G4double G4VContinuousProcess::AlongStepGetPhysicalInteractionLength( >> 130 const G4Track& track, >> 131 G4double previousStepSize, >> 132 G4double currentMinimumStep, >> 133 G4double& currentSafety, >> 134 G4GPILSelection* selection >> 135 ) >> 136 { >> 137 // GPILSelection is set to defaule value of CandidateForSelection >> 138 valueGPILSelection = CandidateForSelection; >> 139 >> 140 // get Step limit proposed by the process >> 141 G4double steplength = GetContinuousStepLimit(track,previousStepSize,currentMinimumStep, currentSafety); 119 142 >> 143 // set return value for G4GPILSelection >> 144 *selection = valueGPILSelection; >> 145 >> 146 #ifdef G4VERBOSE >> 147 if (verboseLevel>1){ >> 148 G4cout << "G4VContinuousProcess::AlongStepGetPhysicalInteractionLength "; >> 149 G4cout << "[ " << GetProcessName() << "]" <<G4endl; >> 150 track.GetDynamicParticle()->DumpInfo(); >> 151 G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl; >> 152 G4cout << "IntractionLength= " << steplength/cm <<"[cm] " <<G4endl; >> 153 } 120 #endif 154 #endif >> 155 >> 156 return steplength ; >> 157 } >> 158 >> 159 inline G4VParticleChange* G4VContinuousProcess::AlongStepDoIt( >> 160 const G4Track& , >> 161 const G4Step& >> 162 ) >> 163 { >> 164 return pParticleChange; >> 165 } >> 166 >> 167 #endif >> 168 >> 169 >> 170 >> 171 121 172