|
||||
File indexing completed on 2025-01-18 09:58:51
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // G4ParticleChangeForTransport 0027 // 0028 // Class description: 0029 // 0030 // Concrete class for ParticleChange for transportation. 0031 0032 // Author: Hisaya Kurashige, 10 May 1998 0033 // -------------------------------------------------------------------- 0034 #ifndef G4ParticleChangeForTransport_hh 0035 #define G4ParticleChangeForTransport_hh 1 0036 0037 #include "globals.hh" 0038 #include "G4ios.hh" 0039 #include "G4TouchableHandle.hh" 0040 #include "G4ParticleChange.hh" 0041 0042 class G4MaterialCutsCouple; 0043 class G4VSensitiveDetector; 0044 0045 class G4ParticleChangeForTransport final : public G4ParticleChange 0046 { 0047 public: 0048 0049 G4ParticleChangeForTransport(); 0050 0051 ~G4ParticleChangeForTransport() override = default; 0052 0053 G4ParticleChangeForTransport(const G4ParticleChangeForTransport& right) = delete; 0054 G4ParticleChangeForTransport& operator=(const G4ParticleChangeForTransport& right) = delete; 0055 0056 // --- the following methods are for updating G4Step --- 0057 // Return the pointer to the G4Step after updating the Step information 0058 // by using final state information of the track given by a physics process 0059 0060 G4Step* UpdateStepForAlongStep(G4Step* Step) final; 0061 G4Step* UpdateStepForAtRest(G4Step* Step) final; 0062 G4Step* UpdateStepForPostStep(G4Step* Step) final; 0063 // A physics process gives the final state of the particle 0064 // based on information of G4Track (or equivalently the PreStepPoint) 0065 0066 void Initialize(const G4Track&) final; 0067 // Initialize all properties by using G4Track information 0068 0069 // --- methods to keep information of the final state --- 0070 // IMPORTANT NOTE: despite the name, what this class stores/returns 0071 // through its methods, are the "FINAL" values of the Position, Momentum, etc. 0072 0073 inline const G4TouchableHandle& GetTouchableHandle() const; 0074 inline void SetTouchableHandle(const G4TouchableHandle& fTouchable); 0075 // Get/Set the touchable of the current particle. 0076 // Note: Touchable in PostStepPoint will be updated only after 0077 // PostStepDoIt 0078 0079 inline G4Material* GetMaterialInTouchable() const; 0080 inline void SetMaterialInTouchable(G4Material* fMaterial); 0081 // Get/Propose the material in the touchable of the current particle 0082 0083 inline const G4MaterialCutsCouple* GetMaterialCutsCoupleInTouchable() const; 0084 inline void SetMaterialCutsCoupleInTouchable( 0085 const G4MaterialCutsCouple* fMaterialCutsCouple); 0086 // Get/Set the materialCutsCouple in the touchable of the current 0087 // particle 0088 0089 inline G4VSensitiveDetector* GetSensitiveDetectorInTouchable() const; 0090 inline void SetSensitiveDetectorInTouchable( 0091 G4VSensitiveDetector* fSensitiveDetector); 0092 // Get/Set the sensitive detector in the touchable of the current particle 0093 0094 inline G4bool GetMomentumChanged() const; 0095 inline void SetMomentumChanged(G4bool b); 0096 0097 inline void 0098 SetPointerToVectorOfAuxiliaryPoints(std::vector<G4ThreeVector>* vec); 0099 inline std::vector<G4ThreeVector>* 0100 GetPointerToVectorOfAuxiliaryPoints() const; 0101 // Smooth representation of curved trajectories 0102 0103 void DumpInfo() const final; 0104 0105 private: 0106 0107 G4TouchableHandle theTouchableHandle; 0108 // The changed touchable of a given particle 0109 0110 G4bool isMomentumChanged = false; 0111 // The flag which is set if momentum is changed in current step 0112 0113 G4Material* theMaterialChange = nullptr; 0114 0115 const G4MaterialCutsCouple* theMaterialCutsCoupleChange = nullptr; 0116 0117 G4VSensitiveDetector* theSensitiveDetectorChange = nullptr; 0118 // The material (and MaterialCutsCouple) where given track 0119 // currently locates 0120 0121 std::vector<G4ThreeVector>* fpVectorOfAuxiliaryPointsPointer = nullptr; 0122 }; 0123 0124 #include "G4ParticleChangeForTransport.icc" 0125 0126 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |