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: G4ParticleChangeForMSC.hh,v 1.4 1999/11/07 16:32:00 kurasige Exp $ 7 // * conditions of the Geant4 Software License << 9 // GEANT4 tag $ $ 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 // Class Description 17 // * << 19 // This class is special "Particle Change" for Multiple Scattering process 18 // * This code implementation is the result << 20 // 19 // * technical work of the GEANT4 collaboratio << 21 // ------------------------------------------------------------ 20 // * By using, copying, modifying or distri << 22 // Implemented for the new scheme 23 Mar. 1998 H.Kurahige 21 // * any work based on the software) you ag << 23 // Add Get/SetMomentumDirectionChange 6 Feb. 1999 H.Kurashige 22 // * use in resulting scientific publicati << 24 // 23 // * acceptance of all terms of the Geant4 Sof << 25 // ------------------------------------------------------------- 24 // ******************************************* << 26 #ifndef G4ParticleChangeForMSC_h 25 // << 27 #define G4ParticleChangeForMSC_h 1 26 // G4ParticleChangeForMSC << 27 // << 28 // Class description: << 29 // << 30 // Concrete "Particle Change" class for Multip << 31 << 32 // Author: Hisaya Kurashige, 23 March 1998 << 33 // Revision: Vladimir Ivantchenko, 16 January << 34 // 23 August 2 << 35 // ------------------------------------------- << 36 #ifndef G4ParticleChangeForMSC_hh << 37 #define G4ParticleChangeForMSC_hh 1 << 38 28 39 #include "globals.hh" 29 #include "globals.hh" 40 #include "G4ios.hh" 30 #include "G4ios.hh" 41 #include "G4ThreeVector.hh" 31 #include "G4ThreeVector.hh" >> 32 #include "G4ThreeVector.hh" >> 33 class G4DynamicParticle; 42 #include "G4VParticleChange.hh" 34 #include "G4VParticleChange.hh" 43 35 44 class G4ParticleChangeForMSC final : public G4 << 36 class G4ParticleChangeForMSC: public G4VParticleChange 45 { << 37 { 46 public: << 38 public: 47 << 39 // default constructor 48 G4ParticleChangeForMSC(); << 40 G4ParticleChangeForMSC(); 49 << 41 50 ~G4ParticleChangeForMSC() override = default << 42 // destructor 51 << 43 virtual ~G4ParticleChangeForMSC(); 52 G4ParticleChangeForMSC(const G4ParticleChang << 44 53 G4ParticleChangeForMSC& operator= << 45 protected: 54 (const G4ParticleChangeForMSC& right) = dele << 46 // hide copy constructor and assignment operaor as protected 55 << 47 G4ParticleChangeForMSC(const G4ParticleChangeForMSC &right); 56 // A multiple scattering process gives the f << 48 G4ParticleChangeForMSC & operator=(const G4ParticleChangeForMSC &right); 57 G4Step* UpdateStepForAlongStep(G4Step* step) << 49 58 << 50 59 // Initialise only properties changed by mul << 51 public: // with description 60 inline void InitialiseMSC(const G4Track&, co << 52 // ---------------------------------------------------- 61 << 53 // --- the following methods are for updating G4Step ----- 62 inline void ProposeMomentumDirection(const G << 54 // Return the pointer to the G4Step after updating the Step information 63 inline const G4ThreeVector* GetProposedMomen << 55 // by using final state information of the track given by a physics >> 56 // process >> 57 virtual G4Step* UpdateStepForAlongStep(G4Step* Step); >> 58 virtual G4Step* UpdateStepForAtRest(G4Step* Step); >> 59 virtual G4Step* UpdateStepForPostStep(G4Step* Step); >> 60 // A physics process gives the final state of the particle >> 61 // based on information of G4Track (or equivalently the PreStepPoint) >> 62 >> 63 virtual void Initialize(const G4Track&); >> 64 // Initialize all propoerties by using G4Track information >> 65 >> 66 >> 67 // ---------------------------------------------------- >> 68 //--- methods to keep information of the final state-- >> 69 // IMPORTANT NOTE: Although the name of the class and methods are >> 70 // "Change", what it stores (and returns in get) are the "FINAL" >> 71 // values of the Position, Momentum, etc. >> 72 >> 73 const G4ThreeVector* GetMomentumChange() const; >> 74 void SetMomentumChange(G4double Px, G4double Py, G4double Pz); >> 75 void SetMomentumChange(const G4ThreeVector& Pfinal); >> 76 const G4ThreeVector* GetMomentumDirectionChange() const; >> 77 void SetMomentumDirectionChange(G4double Px, G4double Py, G4double Pz); >> 78 void SetMomentumDirectionChange(const G4ThreeVector& Pfinal); >> 79 // Get/Set theMomentumDirectionChange vector: it is the final momentum direction. >> 80 >> 81 const G4ThreeVector* GetPositionChange() const; >> 82 void SetPositionChange(G4double x, G4double y, G4double z); >> 83 void SetPositionChange(const G4ThreeVector& finalPosition); >> 84 // Get/Set the final position of the current particle. >> 85 >> 86 public: >> 87 virtual void DumpInfo() const; >> 88 >> 89 protected: >> 90 G4ThreeVector theMomentumDirectionChange; >> 91 // It is the vector containing the final momentum direction >> 92 // after the invoked process. The application of the change >> 93 // of the momentum direction of the particle is not Done here. >> 94 // The responsibility to apply the change is up the entity >> 95 // which invoked the process. >> 96 >> 97 G4ThreeVector thePositionChange; >> 98 // The changed (final) position of a given particle. >> 99 >> 100 public: >> 101 // for Debug >> 102 virtual G4bool CheckIt(const G4Track&); >> 103 >> 104 }; 64 105 65 inline void ProposePosition(const G4ThreeVec << 106 #include "G4ParticleChangeForMSC.icc" 66 inline const G4ThreeVector& GetProposedPosit << 67 107 68 private: << 108 #endif 69 109 70 G4ThreeVector theMomentumDirection; << 71 // It is the vector containing the final mom << 72 // after multiple scattering is applied alon << 73 110 74 G4ThreeVector thePosition; << 75 // The changed of post step position after m << 76 }; << 77 111 78 inline void G4ParticleChangeForMSC::ProposeMom << 79 const G4ThreeVector& P) << 80 { << 81 theMomentumDirection = P; << 82 } << 83 << 84 inline const G4ThreeVector* << 85 G4ParticleChangeForMSC::GetProposedMomentumDir << 86 { << 87 return &theMomentumDirection; << 88 } << 89 << 90 inline void G4ParticleChangeForMSC::ProposePos << 91 { << 92 thePosition = P; << 93 } << 94 << 95 inline const G4ThreeVector& G4ParticleChangeFo << 96 { << 97 return thePosition; << 98 } << 99 << 100 inline void << 101 G4ParticleChangeForMSC::InitialiseMSC(const G4 << 102 { << 103 theStatusChange = track.GetTrackStatus(); << 104 auto poststep = step.GetPostStepPoint(); << 105 thePosition = poststep->GetPosition(); << 106 theMomentumDirection = poststep->GetMomentum << 107 theCurrentTrack = &track; << 108 } << 109 112 110 #endif << 111 113