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 // G4StepPoint << 27 // 23 // 28 // Class description: << 24 // $Id: G4StepPoint.hh,v 1.9 2001/10/22 04:19:40 kurasige Exp $ >> 25 // GEANT4 tag $Name: geant4-05-00 $ 29 // 26 // 30 // This class represents information associate << 27 // 31 // of a Step like the space/time data of the p << 28 //--------------------------------------------------------------- 32 << 29 // 33 // Author: Hisaya Kurashige, 16 February 2000 << 30 // G4StepPoint.hh 34 // ------------------------------------------- << 31 // 35 #ifndef G4StepPoint_hh << 32 // Class Description: 36 #define G4StepPoint_hh 1 << 33 // This class represents information associated with the >> 34 // each end of a Step like the space/time data of the >> 35 // particle. >> 36 // >> 37 // Contact: >> 38 // Questions and comments to this code should be sent to >> 39 // Katsuya Amako (e-mail: Katsuya.Amako@kek.jp) >> 40 // Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp) >> 41 // >> 42 // --------------------------------------------------------------- >> 43 // Added fpMaterial 16 FEb. 2000 H.Kurahige 37 44 38 #include <cmath> // Include from 'system' << 45 #ifndef G4StepPoint_h 39 #include <CLHEP/Units/PhysicalConstants.h> << 46 #define G4StepPoint_h 1 40 47 41 #include "globals.hh" // Include fr << 48 #include "globals.hh" // Include from 'global' 42 #include "G4Allocator.hh" // Include fr << 49 #include "G4Allocator.hh" // Include from 'global' 43 #include "G4ThreeVector.hh" // Include fr << 50 #include "G4ThreeVector.hh" // Include from 'geometry' 44 #include "G4VPhysicalVolume.hh" // Include fr << 51 #include "G4VPhysicalVolume.hh" // Include from 'geometry' >> 52 class G4VProcess; 45 #include "G4SteppingControl.hh" 53 #include "G4SteppingControl.hh" 46 #include "G4StepStatus.hh" // Include fr << 54 #include "G4StepStatus.hh" // Include from 'track' 47 #include "G4TouchableHandle.hh" // Include fr << 55 #include "G4TouchableHandle.hh" // Include from 'geometry' 48 #include "G4Material.hh" 56 #include "G4Material.hh" 49 #include "G4LogicalVolume.hh" 57 #include "G4LogicalVolume.hh" 50 58 51 class G4VProcess; << 59 ///////////////// 52 class G4MaterialCutsCouple; << 53 class G4VSensitiveDetector; << 54 << 55 class G4StepPoint 60 class G4StepPoint >> 61 ///////////////// 56 { 62 { 57 public: << 58 63 59 G4StepPoint() = default; << 64 //-------- 60 ~G4StepPoint()= default; << 65 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 << 92 inline G4ThreeVector GetMomentum() const; << 93 // Total momentum of the track << 94 66 95 inline G4double GetTotalEnergy() const; << 96 // Total energy of the track << 97 67 98 inline G4double GetKineticEnergy() const; << 68 // Constructor/Destructor 99 inline void SetKineticEnergy(const G4doubl << 69 G4StepPoint(); 100 inline void AddKineticEnergy(const G4doubl << 101 // Kinetic Energy of the track << 102 70 103 inline G4double GetVelocity() const; << 71 ~G4StepPoint(){}; 104 inline void SetVelocity(G4double v); << 105 // Velocity << 106 72 107 inline G4double GetBeta() const; << 73 //-------- 108 // Velocity of the track in unit of c(li << 74 >> 75 public: // with description >> 76 >> 77 // Get/Set functions >> 78 const G4ThreeVector& GetPosition() const; >> 79 void SetPosition(const G4ThreeVector& aValue); >> 80 void AddPosition(const G4ThreeVector& aValue); >> 81 >> 82 G4double GetLocalTime() const; >> 83 void SetLocalTime(const G4double aValue); >> 84 void AddLocalTime(const G4double aValue); >> 85 // Time since the track is created. >> 86 >> 87 G4double GetGlobalTime() const; >> 88 void SetGlobalTime(const G4double aValue); >> 89 void AddGlobalTime(const G4double aValue); >> 90 // Time since the event in which the track belongs is created. >> 91 >> 92 G4double GetProperTime() const; >> 93 void SetProperTime(const G4double aValue); >> 94 void AddProperTime(const G4double aValue); >> 95 // Proper time of the particle. >> 96 >> 97 const G4ThreeVector& GetMomentumDirection() const; >> 98 void SetMomentumDirection(const G4ThreeVector& aValue); >> 99 void AddMomentumDirection(const G4ThreeVector& aValue); >> 100 // Direction of momentum (should be an unit vector) >> 101 >> 102 G4ThreeVector GetMomentum() const; >> 103 // Total momentum of the track 109 104 110 inline G4double GetGamma() const; << 105 111 // Gamma factor (1/sqrt[1-beta*beta]) of << 106 G4double GetTotalEnergy() const; >> 107 // Total energy of the track 112 108 113 inline G4VPhysicalVolume* GetPhysicalVolum << 109 G4double GetKineticEnergy() const; >> 110 void SetKineticEnergy(const G4double aValue); >> 111 void AddKineticEnergy(const G4double aValue); >> 112 // Kinetic Energy of the track 114 113 115 inline const G4VTouchable* GetTouchable() << 114 G4double GetVelocity() const; 116 inline const G4TouchableHandle& GetTouchab << 115 void SetVelocity(G4double v); 117 inline void SetTouchableHandle(const G4Tou << 116 // 118 117 119 inline G4Material* GetMaterial() const; << 118 G4double GetBeta() const; 120 inline void SetMaterial(G4Material*); << 119 // Velocity of the track in unit of c(light velocity) 121 120 122 inline const G4MaterialCutsCouple* GetMate << 121 G4double GetGamma() const; 123 inline void SetMaterialCutsCouple(const G4 << 122 // Gamma factor (1/sqrt[1-beta*beta]) of the track 124 123 125 inline G4VSensitiveDetector* GetSensitiveD << 124 G4VPhysicalVolume* GetPhysicalVolume() const; 126 inline void SetSensitiveDetector(G4VSensit << 127 125 128 inline G4double GetSafety() const; << 126 const G4VTouchable* GetTouchable() const; 129 inline void SetSafety(const G4double aValu << 127 const G4TouchableHandle& GetTouchableHandle() const; >> 128 void SetTouchableHandle(const G4TouchableHandle& apValue); 130 129 131 inline const G4ThreeVector& GetPolarizatio << 130 G4Material* GetMaterial() const; 132 inline void SetPolarization(const G4ThreeV << 131 void SetMaterial(G4Material*); 133 inline void AddPolarization(const G4ThreeV << 134 132 135 inline G4StepStatus GetStepStatus() const; << 133 G4double GetSafety() const; 136 inline void SetStepStatus(const G4StepStat << 134 void SetSafety(const G4double aValue); 137 135 138 inline const G4VProcess* GetProcessDefined << 136 const G4ThreeVector& GetPolarization() const; 139 // If the pointer is 0, this means the S << 137 void SetPolarization(const G4ThreeVector& aValue); 140 // by the user defined limit in the curr << 138 void AddPolarization(const G4ThreeVector& aValue); 141 inline void SetProcessDefinedStep(const G4 << 142 139 143 inline G4double GetMass() const; << 140 G4StepStatus GetStepStatus() const; 144 inline void SetMass(G4double value); << 141 void SetStepStatus(const G4StepStatus aValue); 145 142 146 inline G4double GetCharge() const; << 143 const G4VProcess* GetProcessDefinedStep() const; 147 inline void SetCharge(G4double value); << 144 // If the pointer is 0, this means the Step is defined >> 145 // by the user defined limit in the current volume. >> 146 void SetProcessDefinedStep(G4VProcess* aValue); 148 147 149 inline G4double GetMagneticMoment() const; << 148 150 inline void SetMagneticMoment(G4double val << 149 G4double GetMass() const; >> 150 void SetMass(G4double value); 151 151 152 inline void SetWeight(G4double aValue); << 152 G4double GetCharge() const; 153 inline G4double GetWeight() const; << 153 void SetCharge(G4double value); 154 154 155 private: << 155 void SetWeight(G4double aValue); >> 156 G4double GetWeight() const; 156 157 157 G4ThreeVector fPosition; << 158 public: 158 G4double fGlobalTime = 0.0; << 159 // copy constructor and assignment operaor as protected >> 160 G4StepPoint(const G4StepPoint &right); >> 161 G4StepPoint & operator=(const G4StepPoint &right); >> 162 >> 163 >> 164 >> 165 //--------- >> 166 private: >> 167 //--------- >> 168 >> 169 // Member data >> 170 G4ThreeVector fPosition; >> 171 G4double fGlobalTime; 159 // Time since event is created 172 // Time since event is created 160 G4double fLocalTime = 0.0; << 173 G4double fLocalTime; 161 // Time since track is created 174 // Time since track is created 162 G4double fProperTime = 0.0; << 175 G4double fProperTime; 163 // Time since track is created (in rest 176 // Time since track is created (in rest frame of particle) 164 G4ThreeVector fMomentumDirection; << 177 G4ThreeVector fMomentumDirection; 165 G4double fKineticEnergy = 0.0; << 178 G4double fKineticEnergy; 166 G4double fVelocity = 0.0; << 179 G4double fVelocity; 167 // Momentum,energy and velocity << 180 // Momentum,energy and velocity 168 G4TouchableHandle fpTouchable; << 181 G4TouchableHandle fpTouchable; 169 // Touchable Handle << 182 // Touchable Handle 170 G4Material* fpMaterial = nullptr; << 183 G4Material* fpMaterial; 171 // Material of the volmue 184 // Material of the volmue 172 const G4MaterialCutsCouple* fpMaterialCuts << 185 G4double fSafety; 173 // MaterialCutsCouple of the volmue << 186 G4ThreeVector fPolarization; 174 G4VSensitiveDetector* fpSensitiveDetector << 187 G4StepStatus fStepStatus; 175 G4double fSafety = 0.0; << 176 G4ThreeVector fPolarization; << 177 G4StepStatus fStepStatus = fUndefined; << 178 // DoIt type which defined the current S 188 // DoIt type which defined the current Step. 179 const G4VProcess* fpProcessDefinedStep = n << 189 G4VProcess* fpProcessDefinedStep; 180 // Process which defined the current Ste 190 // Process which defined the current Step. 181 G4double fMass = 0.0; << 191 G4double fMass; 182 // Dynamical mass of the particle 192 // Dynamical mass of the particle 183 G4double fCharge = 0.0; << 193 G4double fCharge; 184 // Dynamical Charge of the particle 194 // Dynamical Charge of the particle 185 G4double fMagneticMoment = 0.0; << 195 G4double fWeight; 186 // Dynamical MagneticMoment of the parti << 187 G4double fWeight = 0.0; << 188 // Track Weight 196 // Track Weight 189 }; 197 }; 190 198 191 #include "G4StepPoint.icc" 199 #include "G4StepPoint.icc" 192 << 193 #endif 200 #endif >> 201 194 202