1 | // |
---|
2 | // ******************************************************************** |
---|
3 | // * License and Disclaimer * |
---|
4 | // * * |
---|
5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
7 | // * conditions of the Geant4 Software License, included in the file * |
---|
8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
9 | // * include a list of copyright holders. * |
---|
10 | // * * |
---|
11 | // * Neither the authors of this software system, nor their employing * |
---|
12 | // * institutes,nor the agencies providing financial support for this * |
---|
13 | // * work make any representation or warranty, express or implied, * |
---|
14 | // * regarding this software system or assume any liability for its * |
---|
15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
16 | // * for the full disclaimer and the limitation of liability. * |
---|
17 | // * * |
---|
18 | // * This code implementation is the result of the scientific and * |
---|
19 | // * technical work of the GEANT4 collaboration. * |
---|
20 | // * By using, copying, modifying or distributing the software (or * |
---|
21 | // * any work based on the software) you agree to acknowledge its * |
---|
22 | // * use in resulting scientific publications, and indicate your * |
---|
23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
24 | // ******************************************************************** |
---|
25 | // |
---|
26 | // |
---|
27 | // $Id: G4ParticleChangeForTransport.hh,v 1.16 2006/06/29 21:14:31 gunter Exp $ |
---|
28 | // GEANT4 tag $Name: $ |
---|
29 | // |
---|
30 | // |
---|
31 | // ------------------------------------------------------------ |
---|
32 | // GEANT 4 class header file |
---|
33 | // |
---|
34 | // |
---|
35 | // ------------------------------------------------------------ |
---|
36 | // Implemented for the new scheme 10 May. 1998 H.Kurahige |
---|
37 | // Added theMaterialChange 16 FEb. 2000 H.Kurahige |
---|
38 | // Remove thePolarizationChange 12 Feb. 2001 H.Kurashige |
---|
39 | // Modification for G4TouchableHandle 22 Oct. 2001 R.Chytracek |
---|
40 | // Add MaterialCutsCouple 8 Oct. 2002 H.Kurashige |
---|
41 | // |
---|
42 | // Class Description |
---|
43 | // This class is a concrete class for ParticleChange for transportation |
---|
44 | // |
---|
45 | #ifndef G4ParticleChangeForTransport_h |
---|
46 | #define G4ParticleChangeForTransport_h 1 |
---|
47 | |
---|
48 | #include "globals.hh" |
---|
49 | #include "G4ios.hh" |
---|
50 | #include "G4TouchableHandle.hh" |
---|
51 | #include "G4ParticleChange.hh" |
---|
52 | |
---|
53 | class G4MaterialCutsCouple; |
---|
54 | class G4VSensitiveDetector; |
---|
55 | |
---|
56 | class G4ParticleChangeForTransport: public G4ParticleChange |
---|
57 | { |
---|
58 | public: |
---|
59 | // default constructor |
---|
60 | G4ParticleChangeForTransport(); |
---|
61 | |
---|
62 | // destructor |
---|
63 | virtual ~G4ParticleChangeForTransport(); |
---|
64 | |
---|
65 | protected: |
---|
66 | // hide copy constructor and assignment operator as protected |
---|
67 | G4ParticleChangeForTransport(const G4ParticleChangeForTransport &right); |
---|
68 | G4ParticleChangeForTransport & operator=(const G4ParticleChangeForTransport &right); |
---|
69 | |
---|
70 | public: // with description |
---|
71 | // ---------------------------------------------------- |
---|
72 | // --- the following methods are for updating G4Step ----- |
---|
73 | // Return the pointer to the G4Step after updating the Step information |
---|
74 | // by using final state information of the track given by a physics |
---|
75 | // process |
---|
76 | virtual G4Step* UpdateStepForAlongStep(G4Step* Step); |
---|
77 | virtual G4Step* UpdateStepForAtRest(G4Step* Step); |
---|
78 | virtual G4Step* UpdateStepForPostStep(G4Step* Step); |
---|
79 | // A physics process gives the final state of the particle |
---|
80 | // based on information of G4Track (or equivalently the PreStepPoint) |
---|
81 | |
---|
82 | virtual void Initialize(const G4Track&); |
---|
83 | // Initialize all propoerties by using G4Track information |
---|
84 | |
---|
85 | // ---------------------------------------------------- |
---|
86 | //--- methods to keep information of the final state-- |
---|
87 | // IMPORTANT NOTE: Although the name of the class and methods are |
---|
88 | // "Change", what it stores (and returns in get) are the "FINAL" |
---|
89 | // values of the Position, Momentum, etc. |
---|
90 | |
---|
91 | const G4TouchableHandle& GetTouchableHandle() const; |
---|
92 | void SetTouchableHandle(const G4TouchableHandle& fTouchable); |
---|
93 | // Get/Set the touchable of the current particle. |
---|
94 | // Note: Touchable in PostStepPoint will be updated only after PostStepDoIt |
---|
95 | |
---|
96 | G4Material* GetMaterialInTouchable() const; |
---|
97 | void SetMaterialInTouchable(G4Material* fMaterial); |
---|
98 | // Get/Propose the material in the touchable of the current particle. |
---|
99 | |
---|
100 | const G4MaterialCutsCouple* GetMaterialCutsCoupleInTouchable() const; |
---|
101 | void SetMaterialCutsCoupleInTouchable(const G4MaterialCutsCouple* fMaterialCutsCouple); |
---|
102 | // Get/Set the materialCutsCouple in the touchable of the current particle. |
---|
103 | |
---|
104 | G4VSensitiveDetector* GetSensitiveDetectorInTouchable() const; |
---|
105 | void SetSensitiveDetectorInTouchable(G4VSensitiveDetector* fSensitiveDetector); |
---|
106 | // Get/Set the sensitive detector in the touchable of the current particle. |
---|
107 | |
---|
108 | G4bool GetMomentumChanged() const; |
---|
109 | void SetMomentumChanged(G4bool b); |
---|
110 | |
---|
111 | public: |
---|
112 | virtual void DumpInfo() const; |
---|
113 | |
---|
114 | protected: |
---|
115 | G4TouchableHandle theTouchableHandle; |
---|
116 | // The changed touchable of a given particle. |
---|
117 | |
---|
118 | public: |
---|
119 | |
---|
120 | // Prototype implementation of smooth representation of curved trajectories. |
---|
121 | // Auxiliary points are ThreeVectors for now; change to G4AuxiliaryPoints. |
---|
122 | |
---|
123 | inline void SetPointerToVectorOfAuxiliaryPoints( std::vector<G4ThreeVector>* theNewVectorPointer ); |
---|
124 | inline std::vector<G4ThreeVector>* GetPointerToVectorOfAuxiliaryPoints() const; |
---|
125 | |
---|
126 | private: |
---|
127 | G4bool isMomentumChanged; |
---|
128 | // The flag which is set if mometum is changed in this stepi |
---|
129 | G4Material* theMaterialChange; |
---|
130 | const G4MaterialCutsCouple* theMaterialCutsCoupleChange; |
---|
131 | G4VSensitiveDetector* theSensitiveDetectorChange; |
---|
132 | // The material (and MaterialCutsCouple) where given track |
---|
133 | // currently locates |
---|
134 | |
---|
135 | private: |
---|
136 | std::vector<G4ThreeVector>* fpVectorOfAuxiliaryPointsPointer; |
---|
137 | }; |
---|
138 | |
---|
139 | #include "G4ParticleChangeForTransport.icc" |
---|
140 | |
---|
141 | #endif |
---|
142 | |
---|
143 | |
---|
144 | |
---|
145 | |
---|
146 | |
---|
147 | |
---|