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