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: G4ParticleChangeForLoss.hh,v 1.3 1999/11/07 16:32:00 kurasige Exp $ 7 // * conditions of the Geant4 Software License << 9 // GEANT4 tag $Name: geant4-01-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 // 16 // * for the full disclaimer and the limitatio << 18 // ------------------------------------------------------------ 17 // * << 19 // Implemented for the new scheme 23 Mar. 1998 H.Kurahige 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 // This class is a concrete class for ParticleChange for EnergyLoss 21 // * any work based on the software) you ag << 23 // 22 // * use in resulting scientific publicati << 24 #ifndef G4ParticleChangeForLoss_h 23 // * acceptance of all terms of the Geant4 Sof << 25 #define G4ParticleChangeForLoss_h 1 24 // ******************************************* << 25 // << 26 // G4ParticleChangeForLoss << 27 // << 28 // Class description: << 29 // << 30 // Concrete class for ParticleChange for Energ << 31 << 32 // Author: Hisaya Kurashige, 23 March 1998 << 33 // Revision: Vladimir Ivantchenko, 16 January << 34 // 24 August 2 << 35 // ------------------------------------------- << 36 #ifndef G4ParticleChangeForLoss_hh << 37 #define G4ParticleChangeForLoss_hh 1 << 38 26 >> 27 #include "globals.hh" >> 28 #include "G4ios.hh" >> 29 class G4DynamicParticle; 39 #include "G4VParticleChange.hh" 30 #include "G4VParticleChange.hh" 40 #include "G4DynamicParticle.hh" << 41 << 42 class G4ParticleChangeForLoss final : public G << 43 { << 44 public: << 45 << 46 G4ParticleChangeForLoss(); << 47 << 48 ~G4ParticleChangeForLoss() override = defaul << 49 << 50 G4ParticleChangeForLoss(const G4ParticleChan << 51 G4ParticleChangeForLoss& operator=(const G4P << 52 << 53 // --- the following methods are for updatin << 54 << 55 G4Step* UpdateStepForAlongStep(G4Step* step) << 56 G4Step* UpdateStepForPostStep(G4Step* step) << 57 << 58 // Initialize all used properties << 59 inline void InitializeForAlongStep(const G4T << 60 inline void InitializeForPostStep(const G4Tr << 61 << 62 // Get/Set dynamic charge << 63 inline G4double GetProposedCharge() const; << 64 inline void SetProposedCharge(G4double theCh << 65 << 66 // Get/Set the final kinetic energy of the c << 67 inline G4double GetProposedKineticEnergy() c << 68 inline void SetProposedKineticEnergy(G4doubl << 69 31 70 // Get/Propose the MomentumDirection vector: << 32 class G4ParticleChangeForLoss: public G4VParticleChange 71 // direction << 33 { 72 inline const G4ThreeVector& GetProposedMomen << 34 public: 73 inline void SetProposedMomentumDirection(con << 35 // default constructor 74 inline void ProposeMomentumDirection(const G << 36 G4ParticleChangeForLoss(); 75 << 37 76 inline const G4ThreeVector& GetProposedPolar << 38 // destructor 77 inline void ProposePolarization(const G4Thre << 39 virtual ~G4ParticleChangeForLoss(); 78 inline void ProposePolarization(G4double Px, << 40 79 << 41 protected: 80 void DumpInfo() const final; << 42 // hide copy constructor and assignment operaor as protected 81 << 43 G4ParticleChangeForLoss(const G4ParticleChangeForLoss &right); 82 private: << 44 G4ParticleChangeForLoss & operator=(const G4ParticleChangeForLoss &right); 83 << 45 84 G4double proposedKinEnergy = 0.0; << 46 public: 85 // The final kinetic energy of the current p << 47 // equal/unequal operator 86 << 48 G4bool operator==(const G4ParticleChangeForLoss &right) const; 87 G4double currentCharge = 0.0; << 49 G4bool operator!=(const G4ParticleChangeForLoss &right) const; 88 // The final charge of the current parti << 50 89 << 51 90 G4ThreeVector proposedMomentumDirection; << 52 public: // with description 91 // The final momentum direction of the curre << 53 // ---------------------------------------------------- 92 << 54 // --- the following methods are for updating G4Step ----- 93 G4ThreeVector proposedPolarization; << 55 virtual G4Step* UpdateStepForAlongStep(G4Step* Step); 94 // The final polarization of the current par << 56 >> 57 virtual void Initialize(const G4Track&); >> 58 // Initialize all propoerties by using G4Track information >> 59 >> 60 G4double GetEnergyChange() const; >> 61 void SetEnergyChange(G4double theEnergyChange); >> 62 // Get/Set the final kinetic energy of the current particle. >> 63 >> 64 >> 65 public: >> 66 virtual void DumpInfo() const; >> 67 >> 68 protected: >> 69 G4double theEnergyChange; >> 70 // The final kinetic energy of the current particle. >> 71 >> 72 public: >> 73 // for Debug >> 74 virtual G4bool CheckIt(const G4Track&); 95 }; 75 }; 96 76 97 // ---------------------- << 98 // Inline methods << 99 // ---------------------- << 100 << 101 inline 77 inline 102 G4double G4ParticleChangeForLoss::GetProposedK << 78 G4double G4ParticleChangeForLoss::GetEnergyChange() const 103 { 79 { 104 return proposedKinEnergy; << 80 return theEnergyChange; 105 } 81 } 106 82 107 inline 83 inline 108 void G4ParticleChangeForLoss::SetProposedKinet << 84 void G4ParticleChangeForLoss::SetEnergyChange(G4double Energy) 109 { 85 { 110 proposedKinEnergy = energy; << 86 theEnergyChange = Energy; 111 } 87 } 112 88 113 inline G4double G4ParticleChangeForLoss::GetPr << 89 #endif 114 { << 90 115 return currentCharge; << 91 116 } << 92 >> 93 >> 94 >> 95 117 96 118 inline << 119 void G4ParticleChangeForLoss::SetProposedCharg << 120 { << 121 currentCharge = theCharge; << 122 } << 123 97 124 inline << 125 const G4ThreeVector& << 126 G4ParticleChangeForLoss::GetProposedMomentumDi << 127 { << 128 return proposedMomentumDirection; << 129 } << 130 98 131 inline << 132 void G4ParticleChangeForLoss::ProposeMomentumD << 133 { << 134 proposedMomentumDirection = dir; << 135 } << 136 99 137 inline << 138 void << 139 G4ParticleChangeForLoss::SetProposedMomentumDi << 140 { << 141 proposedMomentumDirection = dir; << 142 } << 143 100 144 inline << 145 const G4ThreeVector& G4ParticleChangeForLoss:: << 146 { << 147 return proposedPolarization; << 148 } << 149 101 150 inline << 151 void G4ParticleChangeForLoss::ProposePolarizat << 152 { << 153 proposedPolarization = dir; << 154 } << 155 102 156 inline void G4ParticleChangeForLoss::ProposePo << 157 << 158 << 159 { << 160 proposedPolarization.set(Px, Py, Pz); << 161 } << 162 103 163 inline << 164 void G4ParticleChangeForLoss::InitializeForAlo << 165 { << 166 InitializeSecondaries(); << 167 InitializeLocalEnergyDeposit(); << 168 InitializeParentWeight(track); << 169 InitializeStatusChange(track); << 170 proposedKinEnergy = track.GetKineticEnergy() << 171 currentCharge = track.GetDynamicParticle()-> << 172 } << 173 104 174 inline << 175 void G4ParticleChangeForLoss::InitializeForPos << 176 { << 177 InitializeForAlongStep(track); << 178 proposedMomentumDirection = track.GetMomentu << 179 proposedPolarization = track.GetPolarization << 180 } << 181 105 182 #endif << 183 106