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