ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4SteppingManager.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4SteppingManager.hh
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 //
28 //---------------------------------------------------------------
29 //
30 // G4SteppingManager.hh
31 //
32 // class description:
33 // This is the class which plays an essential role in tracking
34 // the particle. It takes cares all message passing between
35 // objects in the different categories (for example,
36 // geometry(including transportation), interactions in
37 // matter, etc). It's public method 'stepping' steers to step
38 // the particle.
39 // Geant4 kernel use only
40 //
41 // Contact:
42 // Questions and comments to this code should be sent to
43 // Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
44 // Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
45 //
46 //---------------------------------------------------------------
47 // modified for new ParticleChange 12 Mar. 1998 H.Kurashige
48 
49 
50 class G4SteppingManager;
51 
52 #ifndef G4SteppingManager_h
53 #define G4SteppingManager_h 1
54 
56 
57 #include "G4ios.hh" // Include from 'system'
58 #include <iomanip> // Include from 'system'
59 #include <vector> // Include from 'system'
60 #include "globals.hh" // Include from 'global'
61 #include "Randomize.hh" // Include from 'global'
62 
63 #include "G4Navigator.hh" // Include from 'geometry'
64 #include "G4LogicalVolume.hh" // Include from 'geometry'
65 #include "G4VPhysicalVolume.hh" // Include from 'geometry'
66 #include "G4ProcessManager.hh" // Include from 'piim'
67 
68 #include "G4Track.hh" // Include from 'tracking'
69 #include "G4TrackVector.hh" // Include from 'tracking'
70 #include "G4TrackStatus.hh" // Include from 'tracking'
71 #include "G4StepStatus.hh" // Include from 'tracking'
72 #include "G4UserSteppingAction.hh" // Include from 'tracking'
73 #include "G4Step.hh" // Include from 'tracking'
74 #include "G4StepPoint.hh" // Include from 'tracking'
75 #include "G4VSteppingVerbose.hh" // Include from 'tracking'
76 #include "G4TouchableHandle.hh" // Include from 'geometry'
77 #include "G4TouchableHistoryHandle.hh" // Include from 'geometry'
78 
79 //
80  typedef std::vector<G4int>
82  typedef std::vector<G4int>
84  typedef std::vector<G4int>
86 
87  static const size_t SizeOfSelectedDoItVector=100;
88  // In global scope for porting on WIN-VC compiler...
89 
93 {
94 
95 //--------
96 public: //without description
97 //--------
98 
99 // Constructor/Destructor
100 
102  // SteppingManger should be dynamically persistent, therefore
103  // you need to invoke new() when you call this constructor.
104  // "Secodary track vector" will be dynamically created by this
105  // cosntructor. "G4UserSteppingAction" will be also constructed
106  // in this constructor, and "this" pointer will be passed to
107  // "G4UserSteppingAction".
108 
110 
111 // Get/Set functions
112 
113  const G4TrackVector* GetSecondary() const;
114  void SetUserAction(G4UserSteppingAction* apAction);
115  G4Track* GetTrack() const;
116  void SetVerboseLevel(G4int vLevel);
118  G4Step* GetStep() const;
120 
121 
122 // Other member functions
123 
125  // Steers to move the give particle from the TrackingManger
126  // by one Step.
127 
128  void SetInitialStep(G4Track* valueTrack);
129  // Sets up initial track information (enegry, position, etc) to
130  // the PreStepPoint of the G4Step. This funciton has to be called
131  // just once before the stepping loop in the "TrackingManager".
132 
133  void GetProcessNumber();
134 
135 // Get methods
144  G4double GetMass();
147  G4Track* GetfTrack();
149  G4Step* GetfStep();
171  size_t GetMAXofAtRestLoops();
172  size_t GetMAXofAlongStepLoops();
173  size_t GetMAXofPostStepLoops();
184  //
186 //---------
187  private:
188 //---------
189 
190 // Member functions
191 
193  // Calculate corresponding physical length from the mean free path
194  // left for each discrete phyiscs process. The minimum allowable
195  // Step for each continious process will be also calculated.
196  void InvokeAtRestDoItProcs();
199  void InvokePSDIP(size_t); //
201  // Return the estimated safety value at the PostStepPoint
203 
204 // Member data
205 
207 
209 
216 
220 
222 
229 
233  // The pointer to the process of which DoIt or
234  // GetPhysicalInteractionLength has been just executed.
235 
236 
240 
244 
248 
252 
256  // These are the numbers of secondaries generated by the process
257  // just executed.
258 
260 
262 
266 
268 
270 
272 
274  // Cached geometrical tolerance on surface
276  // This keeps the minimum safety value proposed by AlongStepGPILs.
279  // To get the true safety value at the PostStepPoint, you have
280  // to subtract the distance to 'endpointSafOrigin' from this value.
284  // Above three variables are for the method
285  // DefinePhysicalStepLength(). To pass these information to
286  // the method Verbose, they are kept at here. Need a more
287  // elegant mechanism.
288 
289 };
290 
291 
292 //*******************************************************************
293 //
294 // Inline function
295 //
296 //*******************************************************************
297 
299  return PhysicalStep;
300  }
301 
303  return GeometricalStep;
304  }
305 
307  return CorrectedStep;
308  }
309 
311  return PreStepPointIsGeom;
312  }
313 
315  return FirstStep;
316  }
317 
319  return fStepStatus;
320  }
321 
323  return TempInitVelocity;
324  }
326  return TempVelocity;
327  }
329  return Mass;
330  }
331 
333  return sumEnergyChange;
334  }
335 
337  return fParticleChange;
338  }
339 
341  return fTrack;
342  }
343 
345  return fStep->GetfSecondary();
346  }
348  return fStep;
349  }
351  return fPreStepPoint;
352  }
354  return fPostStepPoint;
355  }
356 
358  return fCurrentVolume;
359  }
361  return fSensitive;
362  }
364  return fCurrentProcess;
365  }
366 
368  return fAtRestDoItVector;
369  }
371  return fAlongStepDoItVector;
372  }
374  return fPostStepDoItVector;
375  }
376 
379  }
380 
383  }
384 
387  }
388 
390  return MAXofAtRestLoops;
391  }
393  return MAXofAlongStepLoops;
394  }
396  return MAXofPostStepLoops;
397  }
398 
401  }
404  }
407  }
409  return fN2ndariesAtRestDoIt;
410  }
413  }
415  return fN2ndariesPostStepDoIt;
416  }
417 
419  return fNavigator;
420  }
422  return verboseLevel;
423  }
424 
427  }
428 
431  }
432 
435  }
436 
438  return fPreviousStepSize;
439  }
440 
442  return fTouchableHandle;
443  }
444 
446  return StepControlFlag;
447  }
449  return physIntLength;
450  }
452  return fCondition;
453  }
455  return fGPILSelection;
456  }
457 
459  return fStep->GetSecondary();
460  }
461 
463  fNavigator = value;
464  }
465 
467  fUserSteppingAction = apAction;
468  }
470  return fUserSteppingAction;
471  }
472 
474  return fTrack;
475  }
476 
478  verboseLevel = vLevel;
479  }
480 
482  fVerbose = yourVerbose;
483  }
484 
486  return fStep;
487  }
488 
490  return std::max( endpointSafety -
492  kCarTolerance );
493  }
494 
495 
496 #endif