Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // G4StepPoint << 27 // 26 // 28 // Class description: << 27 // $Id: G4StepPoint.hh,v 1.19 2008/10/24 08:22:20 kurasige Exp $ >> 28 // GEANT4 tag $Name: geant4-09-02 $ 29 // 29 // 30 // This class represents information associate << 30 // 31 // of a Step like the space/time data of the p << 31 //--------------------------------------------------------------- 32 << 32 // 33 // Author: Hisaya Kurashige, 16 February 2000 << 33 // G4StepPoint.hh 34 // ------------------------------------------- << 34 // 35 #ifndef G4StepPoint_hh << 35 // Class Description: 36 #define G4StepPoint_hh 1 << 36 // This class represents information associated with the 37 << 37 // each end of a Step like the space/time data of the 38 #include <cmath> // Include from 'system' << 38 // particle. 39 #include <CLHEP/Units/PhysicalConstants.h> << 39 // 40 << 40 // Contact: 41 #include "globals.hh" // Include fr << 41 // Questions and comments to this code should be sent to 42 #include "G4Allocator.hh" // Include fr << 42 // Hisaya Kurashige 43 #include "G4ThreeVector.hh" // Include fr << 43 // 44 #include "G4VPhysicalVolume.hh" // Include fr << 44 // --------------------------------------------------------------- >> 45 // Added fpMaterial 16 FEb. 2000 H.Kurahige >> 46 // Added fpMaterialCutsCouple 8 Oct. 2002 H.Kurahige >> 47 // Added fMagneticMoment Mar 2007 H.Kurashige >> 48 >> 49 #ifndef G4StepPoint_h >> 50 #define G4StepPoint_h 1 >> 51 >> 52 #include "globals.hh" // Include from 'global' >> 53 #include <cmath> // Include from 'system' >> 54 #include "G4Allocator.hh" // Include from 'global' >> 55 #include "G4ThreeVector.hh" // Include from 'geometry' >> 56 #include "G4VPhysicalVolume.hh" // Include from 'geometry' >> 57 class G4VProcess; 45 #include "G4SteppingControl.hh" 58 #include "G4SteppingControl.hh" 46 #include "G4StepStatus.hh" // Include fr << 59 #include "G4StepStatus.hh" // Include from 'track' 47 #include "G4TouchableHandle.hh" // Include fr << 60 #include "G4TouchableHandle.hh" // Include from 'geometry' 48 #include "G4Material.hh" 61 #include "G4Material.hh" 49 #include "G4LogicalVolume.hh" 62 #include "G4LogicalVolume.hh" 50 63 51 class G4VProcess; << 52 class G4MaterialCutsCouple; 64 class G4MaterialCutsCouple; 53 class G4VSensitiveDetector; 65 class G4VSensitiveDetector; 54 << 66 ///////////////// 55 class G4StepPoint 67 class G4StepPoint >> 68 ///////////////// 56 { 69 { 57 public: << 58 70 59 G4StepPoint() = default; << 71 //-------- 60 ~G4StepPoint()= default; << 72 public: 61 // Constructor/Destructor << 62 << 63 G4StepPoint(const G4StepPoint&) = default; << 64 G4StepPoint& operator=(const G4StepPoint&) << 65 // Copy Constructor and assignment opera << 66 << 67 inline const G4ThreeVector& GetPosition() << 68 inline void SetPosition(const G4ThreeVecto << 69 inline void AddPosition(const G4ThreeVecto << 70 // Position << 71 << 72 inline G4double GetLocalTime() const; << 73 inline void SetLocalTime(const G4double aV << 74 inline void AddLocalTime(const G4double aV << 75 // Time since the track is created << 76 << 77 inline G4double GetGlobalTime() const; << 78 inline void SetGlobalTime(const G4double a << 79 inline void AddGlobalTime(const G4double a << 80 // Time since the event in which the tra << 81 << 82 inline G4double GetProperTime() const; << 83 inline void SetProperTime(const G4double a << 84 inline void AddProperTime(const G4double a << 85 // Proper time of the particle << 86 << 87 inline const G4ThreeVector& GetMomentumDir << 88 inline void SetMomentumDirection(const G4T << 89 inline void AddMomentumDirection(const G4T << 90 // Direction of momentum (should be an << 91 73 92 inline G4ThreeVector GetMomentum() const; << 93 // Total momentum of the track << 94 74 95 inline G4double GetTotalEnergy() const; << 75 // Constructor/Destructor 96 // Total energy of the track << 76 G4StepPoint(); 97 77 98 inline G4double GetKineticEnergy() const; << 78 ~G4StepPoint(){} 99 inline void SetKineticEnergy(const G4doubl << 100 inline void AddKineticEnergy(const G4doubl << 101 // Kinetic Energy of the track << 102 79 103 inline G4double GetVelocity() const; << 80 //-------- 104 inline void SetVelocity(G4double v); << 81 105 // Velocity << 82 public: // with description >> 83 >> 84 // Get/Set functions >> 85 inline const G4ThreeVector& GetPosition() const; >> 86 inline void SetPosition(const G4ThreeVector& aValue); >> 87 inline void AddPosition(const G4ThreeVector& aValue); >> 88 >> 89 inline G4double GetLocalTime() const; >> 90 inline void SetLocalTime(const G4double aValue); >> 91 inline void AddLocalTime(const G4double aValue); >> 92 // Time since the track is created. >> 93 >> 94 inline G4double GetGlobalTime() const; >> 95 inline void SetGlobalTime(const G4double aValue); >> 96 inline void AddGlobalTime(const G4double aValue); >> 97 // Time since the event in which the track belongs is created. >> 98 >> 99 inline G4double GetProperTime() const; >> 100 inline void SetProperTime(const G4double aValue); >> 101 inline void AddProperTime(const G4double aValue); >> 102 // Proper time of the particle. >> 103 >> 104 inline const G4ThreeVector& GetMomentumDirection() const; >> 105 inline void SetMomentumDirection(const G4ThreeVector& aValue); >> 106 inline void AddMomentumDirection(const G4ThreeVector& aValue); >> 107 // Direction of momentum (should be an unit vector) >> 108 >> 109 inline G4ThreeVector GetMomentum() const; >> 110 // Total momentum of the track >> 111 >> 112 >> 113 inline G4double GetTotalEnergy() const; >> 114 // Total energy of the track 106 115 107 inline G4double GetBeta() const; << 116 inline G4double GetKineticEnergy() const; 108 // Velocity of the track in unit of c(li << 117 inline void SetKineticEnergy(const G4double aValue); >> 118 inline void AddKineticEnergy(const G4double aValue); >> 119 // Kinetic Energy of the track 109 120 110 inline G4double GetGamma() const; << 121 inline G4double GetVelocity() const; 111 // Gamma factor (1/sqrt[1-beta*beta]) of << 122 inline void SetVelocity(G4double v); >> 123 // 112 124 113 inline G4VPhysicalVolume* GetPhysicalVolum << 125 inline G4double GetBeta() const; >> 126 // Velocity of the track in unit of c(light velocity) 114 127 115 inline const G4VTouchable* GetTouchable() << 128 inline G4double GetGamma() const; 116 inline const G4TouchableHandle& GetTouchab << 129 // Gamma factor (1/sqrt[1-beta*beta]) of the track 117 inline void SetTouchableHandle(const G4Tou << 118 130 119 inline G4Material* GetMaterial() const; << 131 inline G4VPhysicalVolume* GetPhysicalVolume() const; 120 inline void SetMaterial(G4Material*); << 121 132 122 inline const G4MaterialCutsCouple* GetMate << 133 inline const G4VTouchable* GetTouchable() const; 123 inline void SetMaterialCutsCouple(const G4 << 134 inline const G4TouchableHandle& GetTouchableHandle() const; >> 135 inline void SetTouchableHandle(const G4TouchableHandle& apValue); 124 136 125 inline G4VSensitiveDetector* GetSensitiveD << 137 inline G4Material* GetMaterial() const; 126 inline void SetSensitiveDetector(G4VSensit << 138 inline void SetMaterial(G4Material*); 127 139 128 inline G4double GetSafety() const; << 140 inline const G4MaterialCutsCouple* GetMaterialCutsCouple() const; 129 inline void SetSafety(const G4double aValu << 141 inline void SetMaterialCutsCouple(const G4MaterialCutsCouple*); 130 142 131 inline const G4ThreeVector& GetPolarizatio << 143 inline G4VSensitiveDetector* GetSensitiveDetector() const; 132 inline void SetPolarization(const G4ThreeV << 144 inline void SetSensitiveDetector(G4VSensitiveDetector*); 133 inline void AddPolarization(const G4ThreeV << 134 145 135 inline G4StepStatus GetStepStatus() const; << 146 inline G4double GetSafety() const; 136 inline void SetStepStatus(const G4StepStat << 147 inline void SetSafety(const G4double aValue); 137 148 138 inline const G4VProcess* GetProcessDefined << 149 inline const G4ThreeVector& GetPolarization() const; 139 // If the pointer is 0, this means the S << 150 inline void SetPolarization(const G4ThreeVector& aValue); 140 // by the user defined limit in the curr << 151 inline void AddPolarization(const G4ThreeVector& aValue); 141 inline void SetProcessDefinedStep(const G4 << 142 152 143 inline G4double GetMass() const; << 153 inline G4StepStatus GetStepStatus() const; 144 inline void SetMass(G4double value); << 154 inline void SetStepStatus(const G4StepStatus aValue); 145 155 146 inline G4double GetCharge() const; << 156 inline const G4VProcess* GetProcessDefinedStep() const; 147 inline void SetCharge(G4double value); << 157 // If the pointer is 0, this means the Step is defined >> 158 // by the user defined limit in the current volume. >> 159 inline void SetProcessDefinedStep(const G4VProcess* aValue); 148 160 149 inline G4double GetMagneticMoment() const; << 161 150 inline void SetMagneticMoment(G4double val << 162 inline G4double GetMass() const; >> 163 inline void SetMass(G4double value); 151 164 152 inline void SetWeight(G4double aValue); << 165 inline G4double GetCharge() const; 153 inline G4double GetWeight() const; << 166 inline void SetCharge(G4double value); 154 167 155 private: << 168 inline G4double GetMagneticMoment() const; >> 169 inline void SetMagneticMoment(G4double value); 156 170 157 G4ThreeVector fPosition; << 171 inline void SetWeight(G4double aValue); 158 G4double fGlobalTime = 0.0; << 172 inline G4double GetWeight() const; >> 173 >> 174 public: >> 175 // copy constructor and assignment operator as protected >> 176 G4StepPoint(const G4StepPoint &right); >> 177 inline G4StepPoint & operator=(const G4StepPoint &right); >> 178 >> 179 >> 180 >> 181 //--------- >> 182 private: >> 183 //--------- >> 184 >> 185 // Member data >> 186 G4ThreeVector fPosition; >> 187 G4double fGlobalTime; 159 // Time since event is created 188 // Time since event is created 160 G4double fLocalTime = 0.0; << 189 G4double fLocalTime; 161 // Time since track is created 190 // Time since track is created 162 G4double fProperTime = 0.0; << 191 G4double fProperTime; 163 // Time since track is created (in rest 192 // Time since track is created (in rest frame of particle) 164 G4ThreeVector fMomentumDirection; << 193 G4ThreeVector fMomentumDirection; 165 G4double fKineticEnergy = 0.0; << 194 G4double fKineticEnergy; 166 G4double fVelocity = 0.0; << 195 G4double fVelocity; 167 // Momentum,energy and velocity << 196 // Momentum,energy and velocity 168 G4TouchableHandle fpTouchable; << 197 G4TouchableHandle fpTouchable; 169 // Touchable Handle << 198 // Touchable Handle 170 G4Material* fpMaterial = nullptr; << 199 G4Material* fpMaterial; 171 // Material of the volmue 200 // Material of the volmue 172 const G4MaterialCutsCouple* fpMaterialCuts << 201 const G4MaterialCutsCouple* fpMaterialCutsCouple; 173 // MaterialCutsCouple of the volmue 202 // MaterialCutsCouple of the volmue 174 G4VSensitiveDetector* fpSensitiveDetector << 203 G4VSensitiveDetector* fpSensitiveDetector; 175 G4double fSafety = 0.0; << 204 G4double fSafety; 176 G4ThreeVector fPolarization; << 205 G4ThreeVector fPolarization; 177 G4StepStatus fStepStatus = fUndefined; << 206 G4StepStatus fStepStatus; 178 // DoIt type which defined the current S 207 // DoIt type which defined the current Step. 179 const G4VProcess* fpProcessDefinedStep = n << 208 const G4VProcess* fpProcessDefinedStep; 180 // Process which defined the current Ste 209 // Process which defined the current Step. 181 G4double fMass = 0.0; << 210 G4double fMass; 182 // Dynamical mass of the particle 211 // Dynamical mass of the particle 183 G4double fCharge = 0.0; << 212 G4double fCharge; 184 // Dynamical Charge of the particle 213 // Dynamical Charge of the particle 185 G4double fMagneticMoment = 0.0; << 214 G4double fMagneticMoment; 186 // Dynamical MagneticMoment of the parti 215 // Dynamical MagneticMoment of the particle 187 G4double fWeight = 0.0; << 216 G4double fWeight; 188 // Track Weight 217 // Track Weight 189 }; 218 }; 190 219 191 #include "G4StepPoint.icc" 220 #include "G4StepPoint.icc" 192 221 193 #endif 222 #endif 194 223