Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/electromagnetic/dna/management/include/G4ITStepProcessor.hh

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/electromagnetic/dna/management/include/G4ITStepProcessor.hh (Version 11.3.0) and /processes/electromagnetic/dna/management/include/G4ITStepProcessor.hh (Version 10.4.p3)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
                                                   >>  26 // $Id$
 26 //                                                 27 //
 27 // Author: Mathieu Karamitros                      28 // Author: Mathieu Karamitros
 28                                                    29 
 29 // The code is developed in the framework of t     30 // The code is developed in the framework of the ESA AO7146
 30 //                                                 31 //
 31 // We would be very happy hearing from you, se     32 // We would be very happy hearing from you, send us your feedback! :)
 32 //                                                 33 //
 33 // In order for Geant4-DNA to be maintained an     34 // In order for Geant4-DNA to be maintained and still open-source,
 34 // article citations are crucial.                  35 // article citations are crucial. 
 35 // If you use Geant4-DNA chemistry and you pub     36 // If you use Geant4-DNA chemistry and you publish papers about your software, 
 36 // in addition to the general paper on Geant4-     37 // in addition to the general paper on Geant4-DNA:
 37 //                                                 38 //
 38 // Int. J. Model. Simul. Sci. Comput. 1 (2010)     39 // Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
 39 //                                                 40 //
 40 // we would be very happy if you could please      41 // we would be very happy if you could please also cite the following
 41 // reference papers on chemistry:                  42 // reference papers on chemistry:
 42 //                                                 43 //
 43 // J. Comput. Phys. 274 (2014) 841-882             44 // J. Comput. Phys. 274 (2014) 841-882
 44 // Prog. Nucl. Sci. Tec. 2 (2011) 503-508          45 // Prog. Nucl. Sci. Tec. 2 (2011) 503-508 
 45                                                    46 
 46 #ifndef G4ITSTEPPROCESSOR_H                        47 #ifndef G4ITSTEPPROCESSOR_H
 47 #define G4ITSTEPPROCESSOR_H                        48 #define G4ITSTEPPROCESSOR_H
 48                                                    49 
 49 #include "G4ios.hh"                   // Inclu     50 #include "G4ios.hh"                   // Include from 'system'
 50 #include "globals.hh"                 // Inclu     51 #include "globals.hh"                 // Include from 'global'
 51 #include "Randomize.hh"               // Inclu     52 #include "Randomize.hh"               // Include from 'global'
 52                                                    53 
 53 #include "G4LogicalVolume.hh"         // Inclu     54 #include "G4LogicalVolume.hh"         // Include from 'geometry'
 54 #include "G4VPhysicalVolume.hh"       // Inclu     55 #include "G4VPhysicalVolume.hh"       // Include from 'geometry'
 55 #include "G4ProcessManager.hh"        // Inclu     56 #include "G4ProcessManager.hh"        // Include from 'piim'
 56                                                    57 
 57 #include "G4Track.hh"                 // Inclu     58 #include "G4Track.hh"                 // Include from 'track'
 58 #include "G4TrackVector.hh"           // Inclu     59 #include "G4TrackVector.hh"           // Include from 'track'
 59 #include "G4TrackStatus.hh"           // Inclu     60 #include "G4TrackStatus.hh"           // Include from 'track'
 60 #include "G4StepStatus.hh"            // Inclu     61 #include "G4StepStatus.hh"            // Include from 'track'
                                                   >>  62 //#include "G4UserSteppingAction.hh"    // Include from 'tracking'
                                                   >>  63 //#include "G4UserTrackingAction.hh"    // Include from 'tracking'
 61 #include "G4Step.hh"                  // Inclu     64 #include "G4Step.hh"                  // Include from 'track'
 62 #include "G4StepPoint.hh"             // Inclu     65 #include "G4StepPoint.hh"             // Include from 'track'
 63 #include "G4TouchableHandle.hh"       // Inclu <<  66 #include "G4TouchableHandle.hh"             // Include from 'geometry'
                                                   >>  67 #include "G4TouchableHistoryHandle.hh"      // Include from 'geometry'
 64                                                    68 
 65 #include "G4ITStepProcessorState_Lock.hh"          69 #include "G4ITStepProcessorState_Lock.hh"
 66 #include "G4ITLeadingTracks.hh"                    70 #include "G4ITLeadingTracks.hh"
 67                                                    71 
 68 #include <vector>                              << 
 69                                                << 
 70 class G4ITNavigator;                               72 class G4ITNavigator;
 71 class G4ParticleDefinition;                        73 class G4ParticleDefinition;
 72 class G4ITTrackingManager;                         74 class G4ITTrackingManager;
 73 class G4IT;                                        75 class G4IT;
 74 class G4TrackingInformation;                       76 class G4TrackingInformation;
 75 class G4ITTransportation;                          77 class G4ITTransportation;
 76 class G4VITProcess;                                78 class G4VITProcess;
 77 class G4VITSteppingVerbose;                        79 class G4VITSteppingVerbose;
 78 class G4ITTrackHolder;                             80 class G4ITTrackHolder;
 79 using G4SelectedAtRestDoItVector = std::vector <<  81 typedef class std::vector<int, std::allocator<int> > G4SelectedAtRestDoItVector;
 80 using G4SelectedAlongStepDoItVector = std::vec <<  82 typedef class std::vector<int, std::allocator<int> > G4SelectedAlongStepDoItVector;
 81 using G4SelectedPostStepDoItVector = std::vect <<  83 typedef class std::vector<int, std::allocator<int> > G4SelectedPostStepDoItVector;
 82                                                    84 
 83 //____________________________________________     85 //________________________________________________
 84 //                                                 86 //
 85 // Members related to ParticleDefinition and n     87 // Members related to ParticleDefinition and not
 86 // proper to a track                               88 // proper to a track
 87 //____________________________________________     89 //________________________________________________
 88 struct ProcessGeneralInfo                          90 struct ProcessGeneralInfo
 89 {                                                  91 {
 90   G4ProcessVector* fpAtRestDoItVector;             92   G4ProcessVector* fpAtRestDoItVector;
 91   G4ProcessVector* fpAlongStepDoItVector;          93   G4ProcessVector* fpAlongStepDoItVector;
 92   G4ProcessVector* fpPostStepDoItVector;           94   G4ProcessVector* fpPostStepDoItVector;
 93                                                    95 
 94   G4ProcessVector* fpAtRestGetPhysIntVector;       96   G4ProcessVector* fpAtRestGetPhysIntVector;
 95   G4ProcessVector* fpAlongStepGetPhysIntVector     97   G4ProcessVector* fpAlongStepGetPhysIntVector;
 96   G4ProcessVector* fpPostStepGetPhysIntVector;     98   G4ProcessVector* fpPostStepGetPhysIntVector;
 97   //                                               99   //
 98   // Note: DoItVector has inverse order agains    100   // Note: DoItVector has inverse order against GetPhysIntVector
 99   //       and SelectedPostStepDoItVector.        101   //       and SelectedPostStepDoItVector.
100   //                                              102   //
101   // * Max number of processes                    103   // * Max number of processes
102   std::size_t MAXofAtRestLoops;                << 104   size_t MAXofAtRestLoops;
103   std::size_t MAXofAlongStepLoops;             << 105   size_t MAXofAlongStepLoops;
104   std::size_t MAXofPostStepLoops;              << 106   size_t MAXofPostStepLoops;
105   // Maximum number of processes for each type    107   // Maximum number of processes for each type of process
106   // These depend on the G4ParticleDefinition,    108   // These depend on the G4ParticleDefinition, so on the track
107                                                   109 
108   // * Transportation process                     110   // * Transportation process
109   G4ITTransportation* fpTransportation;           111   G4ITTransportation* fpTransportation;
110 };                                                112 };
111                                                   113 
112 //____________________________________________    114 //________________________________________________
113 //                                                115 //
114 //          Members proper to a track             116 //          Members proper to a track
115 //____________________________________________    117 //________________________________________________
116 class G4ITStepProcessorState : public G4ITStep    118 class G4ITStepProcessorState : public G4ITStepProcessorState_Lock
117 {                                                 119 {
118 public:                                           120 public:
119   G4ITStepProcessorState();                       121   G4ITStepProcessorState();
120   ~G4ITStepProcessorState() override;          << 122   virtual ~G4ITStepProcessorState();
121                                                   123 
122   G4ITStepProcessorState(const G4ITStepProcess    124   G4ITStepProcessorState(const G4ITStepProcessorState&);
123   G4ITStepProcessorState& operator=(const G4IT    125   G4ITStepProcessorState& operator=(const G4ITStepProcessorState&);
124                                                   126 
125   // * Max Number of Process                      127   // * Max Number of Process
126   G4SelectedAtRestDoItVector fSelectedAtRestDo    128   G4SelectedAtRestDoItVector fSelectedAtRestDoItVector;
127   G4SelectedPostStepDoItVector fSelectedPostSt    129   G4SelectedPostStepDoItVector fSelectedPostStepDoItVector;
128                                                   130 
129   G4double fPhysicalStep;                         131   G4double fPhysicalStep;
130   G4double fPreviousStepSize;                     132   G4double fPreviousStepSize;
131   G4double fSafety;                               133   G4double fSafety;
132                                                   134 
133   G4StepStatus fStepStatus;                       135   G4StepStatus fStepStatus;
134                                                   136 
135   // * Safety                                     137   // * Safety
136   G4double fProposedSafety;                       138   G4double fProposedSafety;
137   // This keeps the minimum safety value propo    139   // This keeps the minimum safety value proposed by AlongStepGPILs.
138   G4ThreeVector fEndpointSafOrigin;               140   G4ThreeVector fEndpointSafOrigin;
139   G4double fEndpointSafety;                       141   G4double fEndpointSafety;
140   // To get the true safety value at the PostS    142   // To get the true safety value at the PostStepPoint, you have
141   // to subtract the distance to 'endpointSafO    143   // to subtract the distance to 'endpointSafOrigin' from this value.
142                                                   144 
143   G4TouchableHandle fTouchableHandle;             145   G4TouchableHandle fTouchableHandle;
144 };                                                146 };
145                                                   147 
146 /**                                               148 /**
147  * Its role is the same as G4StepManager :        149  * Its role is the same as G4StepManager :
148  * - Find the minimum physical length and corr    150  * - Find the minimum physical length and corresponding time step
149  * - Step one track BUT on a given time step.     151  * - Step one track BUT on a given time step.
150  */                                               152  */
151                                                   153 
152 class G4ITStepProcessor                           154 class G4ITStepProcessor
153 {                                                 155 {
154 friend class G4Scheduler;                         156 friend class G4Scheduler;
155 public:                                           157 public:
156   G4ITStepProcessor();                            158   G4ITStepProcessor();
157   virtual ~G4ITStepProcessor();                   159   virtual ~G4ITStepProcessor();
158                                                   160 
159   inline void SetPreviousStepTime(G4double);      161   inline void SetPreviousStepTime(G4double);
160                                                   162 
161   inline G4Track* GetTrack()                      163   inline G4Track* GetTrack()
162   {                                               164   {
163     return fpTrack;                               165     return fpTrack;
164   }                                               166   }
165   inline G4Step* GetStep()                        167   inline G4Step* GetStep()
166   {                                               168   {
167     return fpStep;                                169     return fpStep;
168   }                                               170   }
169   inline const G4Step* GetStep() const            171   inline const G4Step* GetStep() const
170   {                                               172   {
171     return fpStep;                                173     return fpStep;
172   }                                               174   }
173   inline void SetStep(G4Step* val)                175   inline void SetStep(G4Step* val)
174   {                                               176   {
175     fpStep = val;                                 177     fpStep = val;
176   }                                               178   }
177                                                   179 
178   inline G4TrackVector* GetSecondaries() const    180   inline G4TrackVector* GetSecondaries() const
179   {                                               181   {
180     return fpSecondary;                           182     return fpSecondary;
181   }                                               183   }
182   inline void SetTrackingManager(G4ITTrackingM    184   inline void SetTrackingManager(G4ITTrackingManager* trackMan)
183   {                                               185   {
184     fpTrackingManager = trackMan;                 186     fpTrackingManager = trackMan;
185   }                                               187   }
186   inline G4ITTrackingManager* GetTrackingManag    188   inline G4ITTrackingManager* GetTrackingManager()
187   {                                               189   {
188     return fpTrackingManager;                     190     return fpTrackingManager;
189   }                                               191   }
190                                                   192 
191   //___________________________________           193   //___________________________________
192                                                   194 
193   virtual void Initialize();                      195   virtual void Initialize();
194   void ForceReInitialization();                   196   void ForceReInitialization();
195                                                   197 
196   void ResetLeadingTracks();                      198   void ResetLeadingTracks();
197   void PrepareLeadingTracks();                    199   void PrepareLeadingTracks();
198                                                   200 
199   //___________________________________           201   //___________________________________
200   G4double ComputeInteractionLength(double pre    202   G4double ComputeInteractionLength(double previousTimeStep);
201   void DefinePhysicalStepLength(G4Track*);        203   void DefinePhysicalStepLength(G4Track*);
202   G4double GetILTimeStep()                        204   G4double GetILTimeStep()
203   {                                               205   {
204     return fILTimeStep;                           206     return fILTimeStep;
205   }                                               207   }
206                                                   208 
207   //___________________________________           209   //___________________________________
208   // DoIt                                         210   // DoIt
209   void DoIt(double timeStep);                     211   void DoIt(double timeStep);
210   void ExtractDoItData();                         212   void ExtractDoItData();
211   void Stepping(G4Track*, const double&);         213   void Stepping(G4Track*, const double&);
212   void FindTransportationStep();                  214   void FindTransportationStep();
213   //___________________________________           215   //___________________________________
214                                                   216 
215   inline double GetInteractionTime();             217   inline double GetInteractionTime();
216   inline const G4Track* GetTrack() const;         218   inline const G4Track* GetTrack() const;
217   inline void CleanProcessor();                   219   inline void CleanProcessor();
218                                                   220 
219   std::size_t GetAtRestDoItProcTriggered() con << 221   size_t GetAtRestDoItProcTriggered() const
220   {                                               222   {
221     return fAtRestDoItProcTriggered;              223     return fAtRestDoItProcTriggered;
222   }                                               224   }
223                                                   225 
224   G4GPILSelection GetGPILSelection() const        226   G4GPILSelection GetGPILSelection() const
225   {                                               227   {
226     return fGPILSelection;                        228     return fGPILSelection;
227   }                                               229   }
228                                                   230 
229   G4int GetN2ndariesAlongStepDoIt() const         231   G4int GetN2ndariesAlongStepDoIt() const
230   {                                               232   {
231     return fN2ndariesAlongStepDoIt;               233     return fN2ndariesAlongStepDoIt;
232   }                                               234   }
233                                                   235 
234   G4int GetN2ndariesAtRestDoIt() const            236   G4int GetN2ndariesAtRestDoIt() const
235   {                                               237   {
236     return fN2ndariesAtRestDoIt;                  238     return fN2ndariesAtRestDoIt;
237   }                                               239   }
238                                                   240 
239   G4int GetN2ndariesPostStepDoIt() const          241   G4int GetN2ndariesPostStepDoIt() const
240   {                                               242   {
241     return fN2ndariesPostStepDoIt;                243     return fN2ndariesPostStepDoIt;
242   }                                               244   }
243                                                   245 
244   const G4VITProcess* GetCurrentProcess() cons    246   const G4VITProcess* GetCurrentProcess() const
245   {                                               247   {
246     return fpCurrentProcess;                      248     return fpCurrentProcess;
247   }                                               249   }
248                                                   250 
249   G4double GetPhysIntLength() const               251   G4double GetPhysIntLength() const
250   {                                               252   {
251     return fPhysIntLength;                        253     return fPhysIntLength;
252   }                                               254   }
253                                                   255 
254   std::size_t GetPostStepAtTimeDoItProcTrigger << 256   size_t GetPostStepAtTimeDoItProcTriggered() const
255   {                                               257   {
256     return fPostStepAtTimeDoItProcTriggered;      258     return fPostStepAtTimeDoItProcTriggered;
257   }                                               259   }
258                                                   260 
259   std::size_t GetPostStepDoItProcTriggered() c << 261   size_t GetPostStepDoItProcTriggered() const
260   {                                               262   {
261     return fPostStepDoItProcTriggered;            263     return fPostStepDoItProcTriggered;
262   }                                               264   }
263                                                   265 
264   const ProcessGeneralInfo* GetCurrentProcessI    266   const ProcessGeneralInfo* GetCurrentProcessInfo() const
265   {                                               267   {
266     return fpProcessInfo;                         268     return fpProcessInfo;
267   }                                               269   }
268                                                   270 
269   const G4ITStepProcessorState* GetProcessorSt    271   const G4ITStepProcessorState* GetProcessorState() const
270   {                                               272   {
271     return fpState;                               273     return fpState;
272   }                                               274   }
273                                                   275 
274   const G4VParticleChange* GetParticleChange()    276   const G4VParticleChange* GetParticleChange() const
275   {                                               277   {
276     return fpParticleChange;                      278     return fpParticleChange;
277   }                                               279   }
278                                                   280 
279   const G4VPhysicalVolume* GetCurrentVolume()     281   const G4VPhysicalVolume* GetCurrentVolume() const
280   {                                               282   {
281     return fpCurrentVolume;                       283     return fpCurrentVolume;
282   }                                               284   }
283                                                   285 
284   G4ForceCondition GetCondition() const           286   G4ForceCondition GetCondition() const
285   {                                               287   {
286     return fCondition;                            288     return fCondition;
287   }                                               289   }
288                                                   290 
289 protected:                                        291 protected:
290                                                   292 
291   void ExtractILData();                           293   void ExtractILData();
292                                                   294 
293   void SetupGeneralProcessInfo(G4ParticleDefin    295   void SetupGeneralProcessInfo(G4ParticleDefinition*, G4ProcessManager*);
294   void ClearProcessInfo();                        296   void ClearProcessInfo();
295   void SetTrack(G4Track*);                        297   void SetTrack(G4Track*);
296                                                   298 
297   void GetProcessInfo();                          299   void GetProcessInfo();
298                                                   300 
299   void SetupMembers();                            301   void SetupMembers();
300   void ResetSecondaries();                        302   void ResetSecondaries();
301   void InitDefineStep();                          303   void InitDefineStep();
302                                                   304 
303   void SetInitialStep();                          305   void SetInitialStep();
304                                                   306 
305   void GetAtRestIL();                             307   void GetAtRestIL();
306   void DoDefinePhysicalStepLength();              308   void DoDefinePhysicalStepLength();
307   void DoStepping();                              309   void DoStepping();
308   void PushSecondaries();                         310   void PushSecondaries();
309                                                   311 
310   // void CalculateStep();                        312   // void CalculateStep();
311   // void DoCalculateStep();                      313   // void DoCalculateStep();
312                                                   314 
313   // void CloneProcesses();                       315   // void CloneProcesses();
314   void ActiveOnlyITProcess();                     316   void ActiveOnlyITProcess();
315   void ActiveOnlyITProcess(G4ProcessManager*);    317   void ActiveOnlyITProcess(G4ProcessManager*);
316                                                   318 
317   void DealWithSecondaries(G4int&);               319   void DealWithSecondaries(G4int&);
318   void InvokeAtRestDoItProcs();                   320   void InvokeAtRestDoItProcs();
319   void InvokeAlongStepDoItProcs();                321   void InvokeAlongStepDoItProcs();
320   void InvokePostStepDoItProcs();                 322   void InvokePostStepDoItProcs();
321   void InvokePSDIP(std::size_t); //            << 323   void InvokePSDIP(size_t); //
322   void InvokeTransportationProc();                324   void InvokeTransportationProc();
323   void SetNavigator(G4ITNavigator *value);        325   void SetNavigator(G4ITNavigator *value);
324   G4double CalculateSafety();                     326   G4double CalculateSafety();
325                                                   327 
326   // Return the estimated safety value at the     328   // Return the estimated safety value at the PostStepPoint
327   void ApplyProductionCut(G4Track*);              329   void ApplyProductionCut(G4Track*);
328                                                   330 
329   G4ITStepProcessor(const G4ITStepProcessor& o    331   G4ITStepProcessor(const G4ITStepProcessor& other);
330   G4ITStepProcessor& operator=(const G4ITStepP    332   G4ITStepProcessor& operator=(const G4ITStepProcessor& other);
331                                                   333 
332 private:                                          334 private:
333   //__________________________________________    335   //________________________________________________
334   //                                              336   //
335   //              General members                 337   //              General members
336   //__________________________________________    338   //________________________________________________
337                                                   339 
338   G4bool fInitialized;                            340   G4bool fInitialized;
339                                                   341 
340   G4ITTrackingManager* fpTrackingManager;         342   G4ITTrackingManager* fpTrackingManager;
341                                                   343 
342   G4double kCarTolerance;                         344   G4double kCarTolerance;
343   // Cached geometrical tolerance on surface      345   // Cached geometrical tolerance on surface
344                                                   346 
345   G4ITNavigator* fpNavigator;                     347   G4ITNavigator* fpNavigator;
346   G4int fStoreTrajectory;                         348   G4int fStoreTrajectory;
347   G4VITSteppingVerbose* fpVerbose;                349   G4VITSteppingVerbose* fpVerbose;
348                                                   350 
349   G4ITTrackHolder* fpTrackContainer;              351   G4ITTrackHolder* fpTrackContainer;
350   G4ITLeadingTracks fLeadingTracks;               352   G4ITLeadingTracks fLeadingTracks;
351                                                   353 
352   //__________________________________________    354   //________________________________________________
353   //                                              355   //
354   // Members used as temporaries (= not proper    356   // Members used as temporaries (= not proper to a track)
355   //__________________________________________    357   //________________________________________________
356                                                   358 
357   G4double fTimeStep; // not proper to a track    359   G4double fTimeStep; // not proper to a track
358   G4double fILTimeStep; // proper to a track e    360   G4double fILTimeStep; // proper to a track ensemble
359                                                   361 
360   G4double fPreviousTimeStep;                     362   G4double fPreviousTimeStep;
361   G4TrackVector* fpSecondary; // get from fpSt    363   G4TrackVector* fpSecondary; // get from fpStep at every configuration setup
362   G4VParticleChange* fpParticleChange;            364   G4VParticleChange* fpParticleChange;
363                                                   365 
364   G4VITProcess* fpCurrentProcess;                 366   G4VITProcess* fpCurrentProcess;
365   // The pointer to the process of which DoIt     367   // The pointer to the process of which DoIt or
366   // GetPhysicalInteractionLength has been jus    368   // GetPhysicalInteractionLength has been just executed
367                                                   369 
368   // * Secondaries                                370   // * Secondaries
369   G4int fN2ndariesAtRestDoIt;                     371   G4int fN2ndariesAtRestDoIt;
370   G4int fN2ndariesAlongStepDoIt;                  372   G4int fN2ndariesAlongStepDoIt;
371   G4int fN2ndariesPostStepDoIt;                   373   G4int fN2ndariesPostStepDoIt;
372   // These are the numbers of secondaries gene    374   // These are the numbers of secondaries generated by the process
373   // just executed.                               375   // just executed.
374                                                   376 
375   // * Process selection                          377   // * Process selection
376   std::size_t fAtRestDoItProcTriggered;        << 378   size_t fAtRestDoItProcTriggered;
377   std::size_t fPostStepDoItProcTriggered;      << 379   size_t fPostStepDoItProcTriggered;
378   std::size_t fPostStepAtTimeDoItProcTriggered << 380   size_t fPostStepAtTimeDoItProcTriggered;
379   // Record the selected process                  381   // Record the selected process
380                                                   382 
381   G4ForceCondition fCondition;                    383   G4ForceCondition fCondition;
382   G4GPILSelection fGPILSelection;                 384   G4GPILSelection fGPILSelection;
383   // Above three variables are for the method     385   // Above three variables are for the method
384   // DefinePhysicalStepLength(). To pass these    386   // DefinePhysicalStepLength(). To pass these information to
385   // the method Verbose, they are kept at here    387   // the method Verbose, they are kept at here. Need a more
386   // elegant mechanism.                           388   // elegant mechanism.
387                                                   389 
388   G4double fPhysIntLength;                        390   G4double fPhysIntLength;
389   // The minimum physical interaction length o    391   // The minimum physical interaction length over all possible processes
390                                                   392 
391   // * Sensitive detector                         393   // * Sensitive detector
392   //    G4SteppingControl StepControlFlag;        394   //    G4SteppingControl StepControlFlag;
393   //    G4VSensitiveDetector*   fpSensitive;      395   //    G4VSensitiveDetector*   fpSensitive;
394                                                   396 
395   G4VPhysicalVolume* fpCurrentVolume;             397   G4VPhysicalVolume* fpCurrentVolume;
396   // Get from fpStep or touchable, keep as mem    398   // Get from fpStep or touchable, keep as member for user interface
397                                                   399 
398   //__________________________________________    400   //________________________________________________
399   //                                              401   //
400   // Members related to ParticleDefinition and    402   // Members related to ParticleDefinition and not
401   // proper to a track                            403   // proper to a track
402   //__________________________________________    404   //________________________________________________
403                                                   405 
404   std::map<const G4ParticleDefinition*, Proces    406   std::map<const G4ParticleDefinition*, ProcessGeneralInfo*> fProcessGeneralInfoMap;
405   ProcessGeneralInfo* fpProcessInfo;              407   ProcessGeneralInfo* fpProcessInfo;
406   G4ITTransportation* fpTransportation;           408   G4ITTransportation* fpTransportation;
407                                                   409 
408   //__________________________________________    410   //________________________________________________
409   //                                              411   //
410   // Members used for setting up the processor    412   // Members used for setting up the processor
411   //__________________________________________    413   //________________________________________________
412                                                   414 
413   G4Track* fpTrack; // Set track                  415   G4Track* fpTrack; // Set track
414   G4IT* fpITrack; // Set track                    416   G4IT* fpITrack; // Set track
415   G4TrackingInformation* fpTrackingInfo; // Se    417   G4TrackingInformation* fpTrackingInfo; // Set track
416                                                   418 
417   G4ITStepProcessorState* fpState; // SetupMem    419   G4ITStepProcessorState* fpState; // SetupMembers or InitDefineStep
418   G4Step* fpStep; // Set track or InitDefineSt    420   G4Step* fpStep; // Set track or InitDefineStep
419                                                   421 
420   G4StepPoint* fpPreStepPoint; // SetupMembers    422   G4StepPoint* fpPreStepPoint; // SetupMembers
421   G4StepPoint* fpPostStepPoint; // SetupMember    423   G4StepPoint* fpPostStepPoint; // SetupMembers
422 };                                                424 };
423                                                   425 
424 //____________________________________________    426 //______________________________________________________________________________
425                                                   427 
426 inline void G4ITStepProcessor::SetPreviousStep    428 inline void G4ITStepProcessor::SetPreviousStepTime(G4double previousTimeStep)
427 {                                                 429 {
428   fPreviousTimeStep = previousTimeStep;           430   fPreviousTimeStep = previousTimeStep;
429 }                                                 431 }
430                                                   432 
431 //____________________________________________    433 //______________________________________________________________________________
432                                                   434 
433 inline const G4Track* G4ITStepProcessor::GetTr    435 inline const G4Track* G4ITStepProcessor::GetTrack() const
434 {                                                 436 {
435   return fpTrack;                                 437   return fpTrack;
436 }                                                 438 }
437                                                   439 
438 //____________________________________________    440 //______________________________________________________________________________
439                                                   441 
440 inline G4double G4ITStepProcessor::CalculateSa    442 inline G4double G4ITStepProcessor::CalculateSafety()
441 {                                                 443 {
442   return std::max(fpState->fEndpointSafety - (    444   return std::max(fpState->fEndpointSafety - (fpState->fEndpointSafOrigin
443                       - fpPostStepPoint->GetPo    445                       - fpPostStepPoint->GetPosition()).mag(),
444                   kCarTolerance);                 446                   kCarTolerance);
445 }                                                 447 }
446                                                   448 
447 //____________________________________________    449 //______________________________________________________________________________
448                                                   450 
449 inline void G4ITStepProcessor::SetNavigator(G4    451 inline void G4ITStepProcessor::SetNavigator(G4ITNavigator *value)
450 {                                                 452 {
451   fpNavigator = value;                            453   fpNavigator = value;
452 }                                                 454 }
453                                                   455 
454 //____________________________________________    456 //______________________________________________________________________________
455                                                   457 
456 inline void G4ITStepProcessor::CleanProcessor(    458 inline void G4ITStepProcessor::CleanProcessor()
457 {                                                 459 {
458   fTimeStep = DBL_MAX;                            460   fTimeStep = DBL_MAX;
459   fPhysIntLength = DBL_MAX;                       461   fPhysIntLength = DBL_MAX;
460                                                   462 
461   fpState = nullptr;                           << 463   fpState = 0;
462   fpTrack = nullptr;                           << 464   fpTrack = 0;
463   fpTrackingInfo = nullptr;                    << 465   fpTrackingInfo = 0;
464   fpITrack = nullptr;                          << 466   fpITrack = 0;
465   fpStep = nullptr;                            << 467   fpStep = 0;
466   fpPreStepPoint = nullptr;                    << 468   fpPreStepPoint = 0;
467   fpPostStepPoint = nullptr;                   << 469   fpPostStepPoint = 0;
468                                                   470 
469   fpParticleChange = nullptr;                  << 471   fpParticleChange = 0;
470                                                   472 
471   fpCurrentVolume = nullptr;                   << 473   fpCurrentVolume = 0;
472   //    fpSensitive = 0;                          474   //    fpSensitive = 0;
473                                                   475 
474   fpSecondary = nullptr;                       << 476   fpSecondary = 0;
475                                                   477 
476   fpTransportation = nullptr;                  << 478   fpTransportation = 0;
477                                                   479 
478   fpCurrentProcess= nullptr;                   << 480   fpCurrentProcess= 0;
479   fpProcessInfo = nullptr;                     << 481   fpProcessInfo = 0;
480                                                   482 
481   fAtRestDoItProcTriggered = INT_MAX;             483   fAtRestDoItProcTriggered = INT_MAX;
482   fPostStepDoItProcTriggered = INT_MAX;           484   fPostStepDoItProcTriggered = INT_MAX;
483   fPostStepAtTimeDoItProcTriggered = INT_MAX;     485   fPostStepAtTimeDoItProcTriggered = INT_MAX;
484   fGPILSelection = NotCandidateForSelection;      486   fGPILSelection = NotCandidateForSelection;
485   fCondition = NotForced;                         487   fCondition = NotForced;
486 }                                                 488 }
487                                                   489 
488 //____________________________________________    490 //______________________________________________________________________________
489                                                   491 
490 inline double G4ITStepProcessor::GetInteractio    492 inline double G4ITStepProcessor::GetInteractionTime()
491 {                                                 493 {
492   return fTimeStep;                               494   return fTimeStep;
493 }                                                 495 }
494                                                   496 
495 #endif // G4ITSTEPPROCESSOR_H                     497 #endif // G4ITSTEPPROCESSOR_H
496                                                   498