Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/electromagnetic/dna/management/include/G4Scheduler.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/G4Scheduler.hh (Version 11.3.0) and /processes/electromagnetic/dna/management/include/G4Scheduler.hh (Version 10.2.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: G4ITStepManager.hh 60427 2012-07-11 16:34:35Z matkara $
 26 //                                                 27 //
 27 // Author: Mathieu Karamitros                  <<  28 // Author: Mathieu Karamitros, kara@cenbg.in2p3.fr
 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 
                                                   >>  46 
                                                   >>  47 
 45                                                    48 
 46 #ifndef G4Scheduler_h                              49 #ifndef G4Scheduler_h
 47 #define G4Scheduler_h                              50 #define G4Scheduler_h
 48                                                    51 
                                                   >>  52 #include <G4VScheduler.hh>
                                                   >>  53 #include <vector>
                                                   >>  54 #include <map>
                                                   >>  55 #include <memory>
                                                   >>  56 
                                                   >>  57 #include "globals.hh"
                                                   >>  58 
 49 #include "G4ITModelHandler.hh"                     59 #include "G4ITModelHandler.hh"
 50 #include "G4ITReaction.hh"                     << 
 51 #include "G4ITStepStatus.hh"                       60 #include "G4ITStepStatus.hh"
 52 #include "G4ITTrackHolder.hh"                      61 #include "G4ITTrackHolder.hh"
 53 #include "G4VScavengerMaterial.hh"             << 
 54 #include "G4VStateDependent.hh"                    62 #include "G4VStateDependent.hh"
 55 #include "globals.hh"                          <<  63 #include "G4ITReaction.hh"
 56                                                << 
 57 #include <G4VScheduler.hh>                     << 
 58                                                    64 
 59 #include <map>                                 << 
 60 #include <memory>                              << 
 61 #include <vector>                              << 
 62                                                    65 
 63 class G4ITTrackingManager;                         66 class G4ITTrackingManager;
 64 class G4ITModelProcessor;                          67 class G4ITModelProcessor;
 65 class G4ITStepProcessor;                           68 class G4ITStepProcessor;
 66 class G4Track;                                     69 class G4Track;
 67 class G4UserTimeStepAction;                        70 class G4UserTimeStepAction;
 68 class G4SchedulerMessenger;                        71 class G4SchedulerMessenger;
 69 class G4ITTrackingInteractivity;                   72 class G4ITTrackingInteractivity;
 70 class G4ITGun;                                     73 class G4ITGun;
 71                                                    74 
                                                   >>  75 
                                                   >>  76 
                                                   >>  77 
 72 #ifndef compTrackPerID__                           78 #ifndef compTrackPerID__
 73 #  define compTrackPerID__                     <<  79 #define compTrackPerID__
 74 struct compTrackPerID                          <<  80   struct compTrackPerID
 75 {                                              <<  81   {
 76     G4bool operator()(G4Track* rhs, G4Track* l <<  82     bool operator()(G4Track* rhs, G4Track* lhs) const
 77     {                                              83     {
 78       return rhs->GetTrackID() < lhs->GetTrack     84       return rhs->GetTrackID() < lhs->GetTrackID();
 79     }                                              85     }
 80 };                                             <<  86   };
 81 #endif                                             87 #endif
 82                                                    88 
                                                   >>  89 
 83 /**                                                90 /**
 84  * G4Scheduler synchronizes (in time) track st <<  91  * G4ITStepManager enables to synchronize in time
                                                   >>  92  * the step of tracks.
 85  */                                                93  */
 86 class G4Scheduler : public G4VScheduler, publi <<  94 class G4Scheduler :
 87 {                                              <<  95     public G4VScheduler,
 88   protected:                                   <<  96     public G4VStateDependent
 89     ~G4Scheduler() override;                   <<  97 {
 90                                                <<  98 protected:
 91   public:                                      <<  99   virtual ~G4Scheduler();
 92     G4Scheduler(const G4Scheduler&) = delete;  << 100 
 93     G4Scheduler& operator=(const G4Scheduler&) << 101 public:
 94                                                << 102   static G4Scheduler* Instance();
 95     static G4Scheduler* Instance();            << 103   /** DeleteInstance should be used instead
 96     /** DeleteInstance should be used instead  << 104    * of the destructor
 97      * of the destructor                       << 105    */
 98      */                                        << 106   static void DeleteInstance();
 99     static void DeleteInstance();              << 107   virtual G4bool Notify(G4ApplicationState requestedState);
100     G4bool Notify(G4ApplicationState requested << 108 
101                                                << 109   virtual void RegisterModel(G4VITStepModel*, double);
102     void RegisterModel(G4VITStepModel*, G4doub << 110 
103                                                << 111   void Initialize();
104     void Initialize() override;                << 112   void ForceReinitialization();
105     void ForceReinitialization();              << 113   inline bool IsInitialized();
106     inline G4bool IsInitialized();             << 114   inline bool IsRunning(){return fRunning;}
107     inline G4bool IsRunning() override { retur << 115   void Reset();
108     void Reset() override;                     << 116   void Process();
109     void Process() override;                   << 117   void ClearList();
110     void ClearList();                          << 118 
111                                                << 119   inline void SetGun(G4ITGun*);
112     inline void SetGun(G4ITGun*) override;     << 120   inline G4ITGun* GetGun();
113     inline G4ITGun* GetGun();                  << 121 
114                                                << 122   inline void Stop();
115     inline void Stop();                        << 123   void Clear();
116     void Clear();                              << 124 
117                                                << 125   // To be called only in UserReactionAction::EndProcessing()
118     // To be called only in UserReactionAction << 126   // after fRunning flag has been turned off.
119     // after fRunning flag has been turned off << 127   // This is not done automatically before UserReactionAction::EndProcessing()
120     // This is not done automatically before U << 128   // is called in case one would like to access some track information
121     // is called in case one would like to acc << 129   void EndTracking();
122     void EndTracking();                        << 130 
123                                                << 131   void SetEndTime(const double);
124     void SetEndTime(const G4double) override;  << 132 
125                                                << 133   inline void SetTimeTolerance(double);
126     /* Two tracks below the time tolerance are << 134   // Two tracks below the time tolerance are supposed to be
127      * in the same time slice                  << 135   // in the same time slice
128      */                                        << 136   inline double GetTimeTolerance() const;
129     inline void SetTimeTolerance(G4double) ove << 137 
130     inline G4double GetTimeTolerance() const o << 138   inline void SetMaxZeroTimeAllowed(int);
131                                                << 139   inline int GetMaxZeroTimeAllowed() const;
132     inline void SetMaxZeroTimeAllowed(G4int) o << 140 
133     inline G4int GetMaxZeroTimeAllowed() const << 141   //==
134                                                << 142   inline G4ITModelHandler* GetModelHandler();
135     inline G4ITModelHandler* GetModelHandler() << 143 
136                                                << 144   inline void SetTimeSteps(std::map<double, double>*);
137     inline void SetTimeSteps(std::map<G4double << 145   inline void AddTimeStep(double, double);
138     inline void AddTimeStep(G4double, G4double << 146   inline void SetDefaultTimeStep(double);
139     inline void SetDefaultTimeStep(G4double) o << 147   double GetLimitingTimeStep() const;
140     G4double GetLimitingTimeStep() const overr << 148   inline G4int GetNbSteps() const;
141     inline G4int GetNbSteps() const override;  << 149   inline void SetMaxNbSteps(G4int);
142     inline void SetMaxNbSteps(G4int) override; << 150   inline G4int GetMaxNbSteps() const;
143     inline G4int GetMaxNbSteps() const overrid << 151   inline G4double GetStartTime() const;
144     inline G4double GetStartTime() const overr << 152   inline G4double GetEndTime() const;
145     inline G4double GetEndTime() const overrid << 153   virtual inline G4double GetTimeStep() const;
146     inline G4double GetTimeStep() const overri << 154   inline G4double GetPreviousTimeStep() const;
147     inline G4double GetPreviousTimeStep() cons << 155   inline G4double GetGlobalTime() const;
148     inline G4double GetGlobalTime() const over << 156   inline void SetUserAction(G4UserTimeStepAction*);
149     inline void SetUserAction(G4UserTimeStepAc << 157   inline G4UserTimeStepAction* GetUserTimeStepAction() const;
150     inline G4UserTimeStepAction* GetUserTimeSt << 158 
151                                                << 159   // To use with transportation only, no reactions
152     // To use with transportation only, no rea << 160   inline void UseDefaultTimeSteps(G4bool);
153     inline void UseDefaultTimeSteps(G4bool);   << 161   inline G4bool AreDefaultTimeStepsUsed();
154     inline G4bool AreDefaultTimeStepsUsed();   << 162 
155                                                << 163   inline G4ITStepStatus GetStatus() const;
156     inline G4ITStepStatus GetStatus() const;   << 164 
157                                                << 165   inline void SetVerbose(int);
158     /* 1 : Reaction information                << 166   // 1 : Reaction information
159      * 2 : (1) + time step information         << 167   // 2 : (1) + time step information
160      * 3 : (2) + step info for individual trac << 168   // 3 : (2) + step info for individual tracks
161      * 4 : (2) + trackList processing info + p << 169   // 4 : (2) + trackList processing info + pushed and killed track info
162      */                                        << 170   inline int GetVerbose() const;
163     inline void SetVerbose(G4int) override;    << 171 
164                                                << 172   inline void WhyDoYouStop();
165     inline G4int GetVerbose() const;           << 173 
166                                                << 174   void SetInteractivity(G4ITTrackingInteractivity*);
167     inline void WhyDoYouStop();                << 175   inline G4ITTrackingInteractivity* GetInteractivity();
168                                                << 176 
169     void SetInteractivity(G4ITTrackingInteract << 177   virtual size_t GetNTracks();
170     inline G4ITTrackingInteractivity* GetInter << 178 
                                                   >> 179   void GetCollisionType(G4String& interactionType);
                                                   >> 180 
                                                   >> 181   void AddWatchedTime(double time)
                                                   >> 182   {
                                                   >> 183     fWatchedTimes.insert(time);
                                                   >> 184   }
171                                                   185 
172     virtual size_t GetNTracks();               << 186   double GetNextWatchedTime() const;
173                                                   187 
174     void GetCollisionType(G4String& interactio << 188   inline void SetMaxTimeStep(double maxTimeStep)
                                                   >> 189   {
                                                   >> 190     fMaxTimeStep = maxTimeStep;
                                                   >> 191   }
175                                                   192 
176     void AddWatchedTime(G4double time) { fWatc << 
177                                                   193 
178     G4double GetNextWatchedTime() const;       << 194   inline double GetMaxTimeStep() const
                                                   >> 195   {
                                                   >> 196     return fMaxTimeStep;
                                                   >> 197   }
179                                                   198 
180     inline void SetMaxTimeStep(G4double maxTim << 199 protected:
181                                                   200 
182     inline G4double GetMaxTimeStep() const { r << 201   void DoProcess();
                                                   >> 202   void SynchronizeTracks();
                                                   >> 203   void Stepping();
                                                   >> 204 
                                                   >> 205   void FindUserPreDefinedTimeStep();
                                                   >> 206 
                                                   >> 207   bool CanICarryOn();
                                                   >> 208 
                                                   >> 209   void PrintWhyDoYouStop();
                                                   >> 210 
                                                   >> 211 private:
                                                   >> 212   G4Scheduler();
                                                   >> 213   void Create();
                                                   >> 214   G4Scheduler(const G4Scheduler&);
                                                   >> 215   G4Scheduler& operator=(const G4Scheduler&);
                                                   >> 216 
                                                   >> 217   G4SchedulerMessenger* fpMessenger;
                                                   >> 218 
                                                   >> 219   static G4ThreadLocal G4Scheduler* fgScheduler;
                                                   >> 220   int fVerbose;
                                                   >> 221   bool fWhyDoYouStop;
                                                   >> 222   bool fInitialized;
                                                   >> 223   bool fRunning;
                                                   >> 224   G4bool fContinue;
                                                   >> 225 
                                                   >> 226   int fNbSteps;
                                                   >> 227   int fMaxSteps;
                                                   >> 228 
                                                   >> 229   G4ITStepStatus fITStepStatus;
                                                   >> 230 
                                                   >> 231   // Time members
                                                   >> 232   G4bool fUseDefaultTimeSteps;
                                                   >> 233   double fTimeTolerance;
                                                   >> 234   double fGlobalTime;
                                                   >> 235   double fTmpGlobalTime;
                                                   >> 236   double fStartTime;
                                                   >> 237   double fStopTime;
                                                   >> 238   double fEndTime;
                                                   >> 239   double fPreviousTimeStep;
                                                   >> 240   int fZeroTimeCount;
                                                   >> 241   int fMaxNZeroTimeStepsAllowed;
                                                   >> 242 
                                                   >> 243   double fTimeStep; // The selected minimum time step
                                                   >> 244   double fMaxTimeStep;
                                                   >> 245 
                                                   >> 246   // User steps
                                                   >> 247   bool fUsePreDefinedTimeSteps;
                                                   >> 248   double fDefaultMinTimeStep;
                                                   >> 249   std::map<double, double>* fpUserTimeSteps;
                                                   >> 250   // One can give time steps in respect to the global time
                                                   >> 251   mutable double fUserUpperTimeLimit;
                                                   >> 252   double fDefinedMinTimeStep;
                                                   >> 253   // selected user time step in respect to the global time
                                                   >> 254   bool fReachedUserTimeLimit; // if fMinTimeStep == the user time step
                                                   >> 255 
                                                   >> 256   std::set<double> fWatchedTimes;
                                                   >> 257 
                                                   >> 258   G4UserTimeStepAction* fpUserTimeStepAction;
                                                   >> 259 
                                                   >> 260   // ==========================================
                                                   >> 261   // TO BE REMOVED
                                                   >> 262   G4ITStepProcessor* fpStepProcessor;
                                                   >> 263   G4ITModelProcessor* fpModelProcessor;
                                                   >> 264   G4ITTrackingManager* fpTrackingManager;
                                                   >> 265   G4ITTrackingInteractivity* fpTrackingInteractivity;
                                                   >> 266   G4ITReactionSet* fReactionSet;
                                                   >> 267   G4ITTrackHolder& fTrackContainer;
                                                   >> 268   G4ITModelHandler* fpModelHandler;
                                                   >> 269   // ==========================================
                                                   >> 270 
                                                   >> 271   double fTSTimeStep;
                                                   >> 272   // Time calculated by the time stepper in CalculateMinTimeStep()
                                                   >> 273   double fILTimeStep;
                                                   >> 274   // Time calculated by the interaction length methods
                                                   >> 275   // in ComputeInteractionLength()
                                                   >> 276 
                                                   >> 277   bool fInteractionStep;
                                                   >> 278   // Flag : if the step is driven by the interaction with the matter and
                                                   >> 279   // NOT by the reaction between tracks
183                                                   280 
184     inline G4VScavengerMaterial* GetScavengerM << 281   G4ITGun* fpGun;
185     inline void SetScavengerMaterial(std::uniq << 
186     {                                          << 
187       fpUserScavenger = std::move(scavengerMat << 
188     }                                          << 
189                                                   282 
190   protected:                                   << 283   // ==========================================
191     void DoProcess();                          << 284   //
192     void SynchronizeTracks();                  << 
193     void Stepping();                           << 
194                                                << 
195     void FindUserPreDefinedTimeStep();         << 
196                                                << 
197     G4bool CanICarryOn();                      << 
198                                                << 
199     void PrintWhyDoYouStop();                  << 
200                                                << 
201   private:                                     << 
202     G4Scheduler();                             << 
203     void Create();                             << 
204                                                << 
205     G4SchedulerMessenger* fpMessenger = nullpt << 
206                                                << 
207     static G4ThreadLocal G4Scheduler* fgSchedu << 
208     G4int fVerbose;                            << 
209     G4bool fWhyDoYouStop;                      << 
210     G4bool fInitialized;                       << 
211     G4bool fRunning;                           << 
212     G4bool fContinue;                          << 
213                                                << 
214     G4int fNbSteps;                            << 
215     G4int fMaxSteps;                           << 
216                                                << 
217     G4ITStepStatus fITStepStatus;              << 
218                                                << 
219     // Time members                            << 
220     G4bool fUseDefaultTimeSteps;               << 
221     G4double fTimeTolerance;                   << 
222     G4double fGlobalTime;                      << 
223     G4double fStartTime;                       << 
224     G4double fStopTime;                        << 
225     G4double fEndTime;                         << 
226     G4double fPreviousTimeStep;                << 
227     G4int fZeroTimeCount;                      << 
228     G4int fMaxNZeroTimeStepsAllowed;           << 
229                                                << 
230     G4double fTimeStep;  // The selected minim << 
231     G4double fMaxTimeStep;                     << 
232                                                << 
233     // User steps                              << 
234     G4bool fUsePreDefinedTimeSteps;            << 
235     G4double fDefaultMinTimeStep;              << 
236     std::map<G4double, G4double>* fpUserTimeSt << 
237     // One can give time steps in respect to t << 
238     mutable G4double fUserUpperTimeLimit;      << 
239     G4double fDefinedMinTimeStep;              << 
240     // selected user time step in respect to t << 
241     G4bool fReachedUserTimeLimit;  // if fMinT << 
242                                                << 
243     std::set<G4double> fWatchedTimes;          << 
244                                                << 
245     G4UserTimeStepAction* fpUserTimeStepAction << 
246                                                << 
247     std::unique_ptr<G4VScavengerMaterial> fpUs << 
248                                                << 
249     // ======================================= << 
250     // TO BE REMOVED                           << 
251     G4ITStepProcessor* fpStepProcessor = nullp << 
252     G4ITModelProcessor* fpModelProcessor = nul << 
253     G4ITTrackingManager* fpTrackingManager = n << 
254     G4ITTrackingInteractivity* fpTrackingInter << 
255     G4ITReactionSet* fReactionSet = nullptr;   << 
256     G4ITTrackHolder& fTrackContainer;          << 
257     G4ITModelHandler* fpModelHandler = nullptr << 
258     // ======================================= << 
259                                                << 
260     G4double fTSTimeStep;                      << 
261     // Time calculated by the time stepper in  << 
262     G4double fILTimeStep;                      << 
263     // Time calculated by the interaction leng << 
264     // in ComputeInteractionLength()           << 
265                                                << 
266     G4bool fInteractionStep;                   << 
267     // Flag : if the step is driven by the int << 
268     // NOT by the reaction between tracks      << 
269                                                << 
270     G4ITGun* fpGun;                            << 
271                                                << 
272     // ======================================= << 
273     // Hoang                                   << 
274     G4bool fResetScavenger;                    << 
275                                                   285 
276   public:                                      << 
277     void ResetScavenger(bool);                 << 
278 };                                                286 };
279                                                   287 
280 inline G4bool G4Scheduler::IsInitialized()     << 288 inline bool G4Scheduler::IsInitialized()
281 {                                                 289 {
282   return fInitialized;                            290   return fInitialized;
283 }                                                 291 }
284                                                   292 
285 inline G4ITModelHandler* G4Scheduler::GetModel    293 inline G4ITModelHandler* G4Scheduler::GetModelHandler()
286 {                                                 294 {
287   return fpModelHandler;                          295   return fpModelHandler;
288 }                                                 296 }
289                                                   297 
290 inline void G4Scheduler::SetEndTime(const G4do << 298 inline void G4Scheduler::SetEndTime(const double __endtime)
291 {                                                 299 {
292   fEndTime = __endtime;                           300   fEndTime = __endtime;
293 }                                                 301 }
294                                                   302 
295 inline void G4Scheduler::SetTimeSteps(std::map << 303 inline
                                                   >> 304 void G4Scheduler::SetTimeSteps(std::map<double, double>* steps)
296 {                                                 305 {
297   fUsePreDefinedTimeSteps = true;                 306   fUsePreDefinedTimeSteps = true;
298   fpUserTimeSteps = steps;                        307   fpUserTimeSteps = steps;
299 }                                                 308 }
300                                                   309 
301 inline void G4Scheduler::AddTimeStep(G4double  << 310 inline void G4Scheduler::AddTimeStep(double startingTime, double timeStep)
302 {                                                 311 {
303   if (fpUserTimeSteps == nullptr) {            << 312   if (fpUserTimeSteps == 0)
304     fpUserTimeSteps = new std::map<G4double, G << 313   {
                                                   >> 314     fpUserTimeSteps = new std::map<double, double>();
305     fUsePreDefinedTimeSteps = true;               315     fUsePreDefinedTimeSteps = true;
306   }                                               316   }
307                                                   317 
308   (*fpUserTimeSteps)[startingTime] = timeStep;    318   (*fpUserTimeSteps)[startingTime] = timeStep;
309 }                                                 319 }
310                                                   320 
311 inline G4int G4Scheduler::GetNbSteps() const      321 inline G4int G4Scheduler::GetNbSteps() const
312 {                                                 322 {
313   return fNbSteps;                                323   return fNbSteps;
314 }                                                 324 }
315                                                   325 
316 inline void G4Scheduler::SetMaxNbSteps(G4int m    326 inline void G4Scheduler::SetMaxNbSteps(G4int maxSteps)
317 {                                                 327 {
318   fMaxSteps = maxSteps;                           328   fMaxSteps = maxSteps;
319 }                                                 329 }
320                                                   330 
321 inline G4int G4Scheduler::GetMaxNbSteps() cons    331 inline G4int G4Scheduler::GetMaxNbSteps() const
322 {                                                 332 {
323   return fMaxSteps;                               333   return fMaxSteps;
324 }                                                 334 }
325                                                   335 
326 inline G4double G4Scheduler::GetStartTime() co    336 inline G4double G4Scheduler::GetStartTime() const
327 {                                                 337 {
328   return fStartTime;                              338   return fStartTime;
329 }                                                 339 }
330                                                   340 
331 inline G4double G4Scheduler::GetEndTime() cons    341 inline G4double G4Scheduler::GetEndTime() const
332 {                                                 342 {
333   return fEndTime;                                343   return fEndTime;
334 }                                                 344 }
335                                                   345 
336 inline G4double G4Scheduler::GetTimeStep() con    346 inline G4double G4Scheduler::GetTimeStep() const
337 {                                                 347 {
338   return fTimeStep;                               348   return fTimeStep;
339 }                                                 349 }
340                                                   350 
341 inline void G4Scheduler::SetDefaultTimeStep(G4 << 351 inline void G4Scheduler::SetDefaultTimeStep(double timeStep)
342 {                                                 352 {
343   fDefaultMinTimeStep = timeStep;                 353   fDefaultMinTimeStep = timeStep;
344 }                                                 354 }
345                                                   355 
346 inline G4double G4Scheduler::GetGlobalTime() c    356 inline G4double G4Scheduler::GetGlobalTime() const
347 {                                                 357 {
348   return fGlobalTime;                             358   return fGlobalTime;
349 }                                                 359 }
350                                                   360 
351 inline void G4Scheduler::SetUserAction(G4UserT << 361 inline
                                                   >> 362 void G4Scheduler::SetUserAction(G4UserTimeStepAction* userITAction)
352 {                                                 363 {
353   fpUserTimeStepAction = userITAction;            364   fpUserTimeStepAction = userITAction;
354 }                                                 365 }
355                                                   366 
356 inline G4UserTimeStepAction* G4Scheduler::GetU    367 inline G4UserTimeStepAction* G4Scheduler::GetUserTimeStepAction() const
357 {                                                 368 {
358   return fpUserTimeStepAction;                    369   return fpUserTimeStepAction;
359 }                                                 370 }
360                                                   371 
361 inline void G4Scheduler::SetVerbose(G4int verb << 372 inline void G4Scheduler::SetVerbose(int verbose)
362 {                                                 373 {
363   fVerbose = verbose;                             374   fVerbose = verbose;
364 }                                                 375 }
365                                                   376 
366 inline G4int G4Scheduler::GetVerbose() const   << 377 inline int G4Scheduler::GetVerbose() const
367 {                                                 378 {
368   return fVerbose;                                379   return fVerbose;
369 }                                                 380 }
370                                                   381 
371 inline void G4Scheduler::SetMaxZeroTimeAllowed << 382 inline
                                                   >> 383 void G4Scheduler::SetMaxZeroTimeAllowed(int maxTimeStepAllowed)
372 {                                                 384 {
373   fMaxNZeroTimeStepsAllowed = maxTimeStepAllow    385   fMaxNZeroTimeStepsAllowed = maxTimeStepAllowed;
374 }                                                 386 }
375                                                   387 
376 inline G4int G4Scheduler::GetMaxZeroTimeAllowe << 388 inline int G4Scheduler::GetMaxZeroTimeAllowed() const
377 {                                                 389 {
378   return fMaxNZeroTimeStepsAllowed;               390   return fMaxNZeroTimeStepsAllowed;
379 }                                                 391 }
380                                                   392 
381 inline void G4Scheduler::SetTimeTolerance(G4do << 393 inline void G4Scheduler::SetTimeTolerance(double time)
382 {                                                 394 {
383   fTimeTolerance = time;                          395   fTimeTolerance = time;
384 }                                                 396 }
385                                                   397 
386 inline G4double G4Scheduler::GetTimeTolerance( << 398 inline double G4Scheduler::GetTimeTolerance() const
387 {                                                 399 {
388   return fTimeTolerance;                          400   return fTimeTolerance;
389 }                                                 401 }
390                                                   402 
391 inline G4double G4Scheduler::GetPreviousTimeSt    403 inline G4double G4Scheduler::GetPreviousTimeStep() const
392 {                                                 404 {
393   return fPreviousTimeStep;                       405   return fPreviousTimeStep;
394 }                                                 406 }
395                                                   407 
396 inline G4ITStepStatus G4Scheduler::GetStatus()    408 inline G4ITStepStatus G4Scheduler::GetStatus() const
397 {                                                 409 {
398   return fITStepStatus;                           410   return fITStepStatus;
399 }                                                 411 }
400                                                   412 
401 inline void G4Scheduler::Stop()                   413 inline void G4Scheduler::Stop()
402 {                                                 414 {
403   fContinue = false;                              415   fContinue = false;
404 }                                                 416 }
405                                                   417 
406 inline G4ITTrackingInteractivity* G4Scheduler:    418 inline G4ITTrackingInteractivity* G4Scheduler::GetInteractivity()
407 {                                                 419 {
408   return fpTrackingInteractivity;                 420   return fpTrackingInteractivity;
409 }                                                 421 }
410                                                   422 
411 inline void G4Scheduler::SetGun(G4ITGun* gun)     423 inline void G4Scheduler::SetGun(G4ITGun* gun)
412 {                                                 424 {
413   fpGun = gun;                                    425   fpGun = gun;
414 }                                                 426 }
415                                                   427 
416 inline G4ITGun* G4Scheduler::GetGun()             428 inline G4ITGun* G4Scheduler::GetGun()
417 {                                                 429 {
418   return fpGun;                                   430   return fpGun;
419 }                                                 431 }
420                                                   432 
421 inline void G4Scheduler::WhyDoYouStop()           433 inline void G4Scheduler::WhyDoYouStop()
422 {                                                 434 {
423   fWhyDoYouStop = true;                           435   fWhyDoYouStop = true;
424 }                                                 436 }
425                                                   437 
426 inline void G4Scheduler::UseDefaultTimeSteps(G    438 inline void G4Scheduler::UseDefaultTimeSteps(G4bool flag)
427 {                                                 439 {
428   fUseDefaultTimeSteps = flag;                    440   fUseDefaultTimeSteps = flag;
429 }                                                 441 }
430                                                   442 
431 inline G4bool G4Scheduler::AreDefaultTimeSteps    443 inline G4bool G4Scheduler::AreDefaultTimeStepsUsed()
432 {                                                 444 {
433   return (!fUseDefaultTimeSteps && !fUsePreDef << 445   return (fUseDefaultTimeSteps == false && fUsePreDefinedTimeSteps == false);
434 }                                              << 
435                                                << 
436 inline void G4Scheduler::ResetScavenger(bool v << 
437 {                                              << 
438   fResetScavenger = value;                     << 
439 }                                                 446 }
440                                                   447 
441 #endif                                            448 #endif
442                                                   449