Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/management/include/G4VProcess.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/management/include/G4VProcess.hh (Version 11.3.0) and /processes/management/include/G4VProcess.hh (Version 3.1)


                                                   >>   1 // This code implementation is the intellectual property of
                                                   >>   2 // the GEANT4 collaboration.
  1 //                                                  3 //
  2 // ******************************************* <<   4 // By copying, distributing or modifying the Program (or any work
  3 // * License and Disclaimer                    <<   5 // based on the Program) you indicate your acceptance of this statement,
  4 // *                                           <<   6 // and all its terms.
  5 // * The  Geant4 software  is  copyright of th << 
  6 // * the Geant4 Collaboration.  It is provided << 
  7 // * conditions of the Geant4 Software License << 
  8 // * LICENSE and available at  http://cern.ch/ << 
  9 // * include a list of copyright holders.      << 
 10 // *                                           << 
 11 // * Neither the authors of this software syst << 
 12 // * institutes,nor the agencies providing fin << 
 13 // * work  make  any representation or  warran << 
 14 // * regarding  this  software system or assum << 
 15 // * use.  Please see the license in the file  << 
 16 // * for the full disclaimer and the limitatio << 
 17 // *                                           << 
 18 // * This  code  implementation is the result  << 
 19 // * technical work of the GEANT4 collaboratio << 
 20 // * By using,  copying,  modifying or  distri << 
 21 // * any work based  on the software)  you  ag << 
 22 // * use  in  resulting  scientific  publicati << 
 23 // * acceptance of all terms of the Geant4 Sof << 
 24 // ******************************************* << 
 25 //                                                  7 //
 26 // G4VProcess                                  <<   8 // $Id: G4VProcess.hh,v 1.8 2001/03/12 06:39:22 kurasige Exp $
                                                   >>   9 // GEANT4 tag $Name: geant4-03-01 $
 27 //                                                 10 //
 28 // Class description:                          <<  11 // 
                                                   >>  12 // ------------------------------------------------------------
                                                   >>  13 //  GEANT 4 class header file 
 29 //                                                 14 //
 30 // This class is the virtual class for physics <<  15 //  For information related to this code contact:
 31 // It defines public methods which describe th <<  16 //  CERN, CN Division, ASD group
 32 // a physics process.                          <<  17 //  History: first implementation, based on object model of
 33                                                <<  18 //  2nd December 1995, G.Cosmo
 34 // Authors:                                    <<  19 //
 35 // - 2 December 1995, G.Cosmo - First implemen <<  20 // Class Description
 36 // - 18 December 1996, H.Kurashige - New Physi <<  21 //  This class is the virtual class for physics process objects. 
 37 // ------------------------------------------- <<  22 //   It defines public methods which describe the behavior of 
 38 #ifndef G4VProcess_hh                          <<  23 //   a physics process.
 39 #define G4VProcess_hh 1                        <<  24 //
                                                   >>  25 // ------------------------------------------------------------
                                                   >>  26 //   New Physics scheme           18 Dec. 1996  H.Kurahige
                                                   >>  27 // ------------------------------------------------------------
                                                   >>  28 //   change DoIt/GetPIL arguments type 20 Mar. 1997 H.Kurashige
                                                   >>  29 //   modified AlongStepGPIL       17 Dec. 1997 H.Kurashige
                                                   >>  30 //   modified for new ParticleChange 12 Mar. 1998  H.Kurashige
                                                   >>  31 //   Add process trype            27 Mar. 1998  H.Kurashige
                                                   >>  32 //   Remove thePhysicsTable       2 Aug. 1998   H.Kurashige
                                                   >>  33 //   Add PILfactor and GPIL       3 Nov. 2000   H.Kurashige
                                                   >>  34 //   Add Store/RetrievePhysicsTable 8  Nov. 2000   H.Kurashige
                                                   >>  35 //   Modify Store/RetrievePhysicsTable methods 9 Mar. 2001   H.Kurashige
 40                                                    36 
 41 #include <cmath>                               <<  37 #ifndef G4VProcess_h 
                                                   >>  38 #define G4VProcess_h 1
 42                                                    39 
 43 #include "globals.hh"                              40 #include "globals.hh"
 44 #include "G4ios.hh"                                41 #include "G4ios.hh"
 45 #include "Randomize.hh"                        <<  42 
                                                   >>  43 class G4ParticleDefinition;
                                                   >>  44 class G4DynamicParticle;
                                                   >>  45 class G4Track;
                                                   >>  46 class G4Step;
 46                                                    47 
 47 #include "G4PhysicsTable.hh"                       48 #include "G4PhysicsTable.hh"
 48 #include "G4VParticleChange.hh"                    49 #include "G4VParticleChange.hh"
 49 #include "G4ForceCondition.hh"                     50 #include "G4ForceCondition.hh"
 50 #include "G4GPILSelection.hh"                      51 #include "G4GPILSelection.hh"
 51 #include "G4ParticleChange.hh"                     52 #include "G4ParticleChange.hh"
 52 #include "G4ProcessType.hh"                        53 #include "G4ProcessType.hh"
 53                                                    54 
 54 class G4ParticleDefinition;                    << 
 55 class G4DynamicParticle;                       << 
 56 class G4Track;                                 << 
 57 class G4Step;                                  << 
 58 class G4ProcessTable;                          << 
 59                                                << 
 60 class G4VProcess                                   55 class G4VProcess 
 61 {                                                  56 {
                                                   >>  57   //  A virtual class for physics process objects. It defines
                                                   >>  58   //  public methods which describe the behavior of a
                                                   >>  59   //  physics process.
 62                                                    60 
 63   public:                                      <<  61   private:
 64                                                <<  62   // hide default constructor and assignment operator as private 
 65     G4VProcess(const G4String& aName = "NoName <<  63   //  do not hide default constructor for alpha version 
 66                G4ProcessType aType = fNotDefin <<  64   //  G4VProcess G4VProcess();  
 67       // Constructor requires the process name <<  65       G4VProcess & operator=(const G4VProcess &right);
 68                                                <<  66 
 69     G4VProcess(const G4VProcess& right);       <<  67   public: // with description
 70       // Copy constructor copies the name but  <<  68   //  constructor requires the process name and type
 71       // physics table (null pointer is assign <<  69       G4VProcess(const G4String& aName =  "NoName",
 72                                                <<  70      G4ProcessType   aType = fNotDefined );
 73     virtual ~G4VProcess();                     <<  71 
 74       // Destructor                            <<  72   //  copy constructor copys the name but does not copy the 
 75                                                <<  73   //  physics table (0 pointer is assigned)
 76     G4VProcess& operator=(const G4VProcess&) = <<  74       G4VProcess(G4VProcess &right);
 77                                                <<  75 
 78     G4bool operator==(const G4VProcess& right) <<  76   public: 
 79     G4bool operator!=(const G4VProcess& right) <<  77   //  destructor 
 80       // Equality operators                    <<  78       virtual ~G4VProcess();
 81                                                <<  79 
 82     ////////////////////////////               <<  80   // equal opperators
 83     // DoIt    /////////////////               <<  81       G4int operator==(const G4VProcess &right) const;
 84     ////////////////////////////               <<  82       G4int operator!=(const G4VProcess &right) const;
 85                                                <<  83 
 86     virtual G4VParticleChange* PostStepDoIt(   <<  84   public: // with description
 87                              const G4Track& tr <<  85   ////////////////////////////
 88                              const G4Step& ste <<  86   // DoIt    /////////////////
 89                             ) = 0;             <<  87   ///////////////////////////
 90                                                <<  88       virtual G4VParticleChange* PostStepDoIt(
 91     virtual G4VParticleChange* AlongStepDoIt(  <<  89            const G4Track& track,
 92                              const G4Track& tr <<  90            const G4Step&  stepData
 93                              const G4Step& ste <<  91           ) = 0;
 94                             ) = 0;             <<  92 
 95     virtual G4VParticleChange* AtRestDoIt(     <<  93       virtual G4VParticleChange* AlongStepDoIt(
 96                              const G4Track& tr <<  94            const G4Track& track,
 97                              const G4Step& ste <<  95            const G4Step& stepData
 98                             ) = 0;             <<  96           ) = 0;
 99       // A virtual base class function that ha <<  97       virtual G4VParticleChange* AtRestDoIt(
100       // by any subclass. The DoIt() method ac <<  98            const G4Track& track,
101       // physics process and determines either <<  99            const G4Step& stepData
102       // of the production of secondaries etc. << 100           ) = 0;
103       //    Arguments                          << 101       //  A virtual base class function that has to be overridden
104       //      const G4Track& track:            << 102       //  by any subclass. The DoIt method actually performs the
                                                   >> 103       //  physics process and determines either momentum change
                                                   >> 104       //  of the production of secondaries etc.
                                                   >> 105       //    arguments
                                                   >> 106       //      const G4Track&    track:
105       //        reference to the current G4Tra    107       //        reference to the current G4Track information
106       //      const G4Step&  stepData:         << 108       //      const G4Step&     stepData:
107       //        reference to the current G4Ste    109       //        reference to the current G4Step information
108                                                   110 
109     //////////////////////////                 << 111   //////////////////////////
110     // GPIL    ///////////////                 << 112   // GPIL    //////////////
111     //////////////////////////                 << 113   /////////////////////////  
112                                                << 114       virtual G4double AlongStepGetPhysicalInteractionLength(
113     virtual G4double AlongStepGetPhysicalInter << 
114                              const G4Track& tr    115                              const G4Track& track,
115                              G4double previous << 116            G4double  previousStepSize,
116                              G4double currentM << 117            G4double  currentMinimumStep,
117                              G4double& propose << 118            G4double& proposedSafety,
118                              G4GPILSelection*     119                              G4GPILSelection* selection) = 0;
119                                                   120 
120     virtual G4double AtRestGetPhysicalInteract << 121       virtual G4double AtRestGetPhysicalInteractionLength(
121                              const G4Track& tr    122                              const G4Track& track,
122                              G4ForceCondition* << 123            G4ForceCondition* condition
                                                   >> 124           ) = 0;
123                                                   125 
124     virtual G4double PostStepGetPhysicalIntera << 126       virtual G4double PostStepGetPhysicalInteractionLength(
125                              const G4Track& tr    127                              const G4Track& track,
126                              G4double previous << 128            G4double   previousStepSize,
127                              G4ForceCondition* << 129            G4ForceCondition* condition
                                                   >> 130           ) = 0;
                                                   >> 131   
128       //  Returns the Step-size (actual length    132       //  Returns the Step-size (actual length) which is allowed 
129       //  by "this" process. (for AtRestGetPhy    133       //  by "this" process. (for AtRestGetPhysicalInteractionLength,
130       //  return value is Step-time) The Numbe    134       //  return value is Step-time) The NumberOfInteractionLengthLeft is
131       //  recalculated by using previousStepSi    135       //  recalculated by using previousStepSize and the Step-size is 
132       //  calucalted accoding to the resultant    136       //  calucalted accoding to the resultant NumberOfInteractionLengthLeft.
133       //  using NumberOfInteractionLengthLeft,    137       //  using NumberOfInteractionLengthLeft, which is recalculated at 
134       //    arguments                             138       //    arguments
135       //      const G4Track&    track:            139       //      const G4Track&    track:
136       //        reference to the current G4Tra    140       //        reference to the current G4Track information
137       //      G4double*          previousStepS    141       //      G4double*          previousStepSize: 
138       //        the Step-size (actual length)     142       //        the Step-size (actual length) of the previous Step 
139       //        of this track. Negative calue     143       //        of this track. Negative calue indicates that
140       //        NumberOfInteractionLengthLeft     144       //        NumberOfInteractionLengthLeft must be reset.
141       //        the current physical interacti    145       //        the current physical interaction legth of this process
142       //      G4ForceCondition* condition:        146       //      G4ForceCondition* condition:
143       //        the flag indicates DoIt of thi    147       //        the flag indicates DoIt of this process is forced 
144       //        to be called                      148       //        to be called
145       //         Forced:    Corresponding DoIt    149       //         Forced:    Corresponding DoIt is forced
146       //         NotForced: Corresponding DoIt    150       //         NotForced: Corresponding DoIt is called 
147       //                    if the Step size o    151       //                    if the Step size of this Step is determined 
148       //                    by this process       152       //                    by this process
149       //        !! AlongStepDoIt is always cal    153       //        !! AlongStepDoIt is always called !! 
150       //      G4double& currentMinimumStep:       154       //      G4double& currentMinimumStep:
151       //        this value is used for transfo    155       //        this value is used for transformation of
152       //        true path length to geometrica    156       //        true path length to geometrical path length
153                                                   157 
154     inline G4double GetCurrentInteractionLengt << 158       ////////// PIL factor ////////
155       // Returns currentInteractionLength      << 159       void SetPILfactor(G4double value);
156                                                << 160       G4double GetPILfactor() const;
157     ////////// PIL factor ////////             << 
158     //                                         << 
159     inline void SetPILfactor(G4double value);  << 
160     inline G4double GetPILfactor() const;      << 
161       // Set/Get factor for PhysicsInteraction    161       // Set/Get factor for PhysicsInteractionLength 
162       // which is passed to G4SteppingManager     162       // which is passed to G4SteppingManager for both AtRest and PostStep
163                                                   163 
164     // These three GPIL methods are used by St << 164       // These three GPIL methods are used by Stepping Manager.
165     // They invoke virtual GPIL methods listed << 165       // They invoke virtual GPIL methods listed above.
166     // As for AtRest and PostStep the returned << 166       // As for AtRest and PostStep the returned value is multipled by thePILfactor 
167     // thePILfactor                            << 167       // 
168     //                                         << 168       G4double AlongStepGPIL( const G4Track& track,
169     inline G4double AlongStepGPIL( const G4Tra << 169                               G4double  previousStepSize,
170                                    G4double pr << 170                               G4double  currentMinimumStep,
171                                    G4double cu << 171                               G4double& proposedSafety,
172                                    G4double& p << 172                               G4GPILSelection* selection     );
173                                    G4GPILSelec << 173 
174                                                << 174       G4double AtRestGPIL( const G4Track& track,
175     inline G4double AtRestGPIL( const G4Track& << 175                            G4ForceCondition* condition );
176                                 G4ForceConditi << 176 
177                                                << 177       G4double PostStepGPIL( const G4Track& track,
178     inline G4double PostStepGPIL( const G4Trac << 178                              G4double   previousStepSize,
179                                   G4double pre << 179                              G4ForceCondition* condition );
180                                   G4ForceCondi << 
181                                                   180 
182     virtual G4bool IsApplicable(const G4Partic << 181   ////////////////////// 
                                                   >> 182       virtual G4bool IsApplicable(const G4ParticleDefinition&){return true;};
183       // Returns true if this process object i    183       // Returns true if this process object is applicable to
184       // the particle type. Process will not b << 184       // the particle type
185       // particle if IsApplicable is false     << 185       // Process will not be registered to a particle if IsApplicable is false   
186                                                   186 
187     virtual void BuildPhysicsTable(const G4Par << 187       virtual void BuildPhysicsTable(const G4ParticleDefinition&){};
188       // Messaged by the Particle definition (    188       // Messaged by the Particle definition (via the Process manager)
189       // whenever cross-section tables have to << 189       // whenever cross section tables have to be rebuilt (i.e. if new
190       // materials have been defined).            190       // materials have been defined). 
191       // It is overloaded by individual proces    191       // It is overloaded by individual processes when they need physics
192       // tables                                << 192       // tables. 
193                                                   193 
194     virtual void PreparePhysicsTable(const G4P << 194       // Processes which Build (for example in their
195       // Messaged by the Particle definition ( << 195       // constructors) physics tables independent of cuts
196       // whenever cross-section tables have to << 196       // should preferably use a
197       // (i.e. if new materials have been defi << 197       // private void BuildThePhysicsTable()
198       // It is overloaded by individual proces << 198       // function. Not another BuildPhysicsTable, please.
199       // tables                                << 
200                                                << 
201     // Processes which Build physics tables in << 
202     // (for example in their constructors) sho << 
203     // void BuildThePhysicsTable() and void Pr << 
204     // *Not* another BuildPhysicsTable         << 
205                                                << 
206     virtual G4bool StorePhysicsTable(const G4P << 
207                                      const G4S << 
208       // Store PhysicsTable in a file.         << 
209       // Return false in case of failure at I/ << 
210                                                << 
211     virtual G4bool RetrievePhysicsTable(const  << 
212                                       const G4 << 
213       // Retrieve Physics from a file.         << 
214       // Return true if the Physics Table can  << 
215       // Return false if the process has no fu << 
216       // of failure. File name should be defin << 
217       // file should be placed under the direc << 
218                                                << 
219     const G4String& GetPhysicsTableFileName(co << 
220                                             co << 
221                                             co << 
222                                             G4 << 
223       // This method is utility for Store/Retr << 
224                                                << 
225     inline const G4String& GetProcessName() co << 
226       // Returns the name of the process       << 
227                                                << 
228     inline G4ProcessType GetProcessType() cons << 
229       // Returns the process type              << 
230                                                << 
231     inline void SetProcessType(G4ProcessType); << 
232       // Sets the process type                 << 
233                                                << 
234     inline G4int GetProcessSubType() const;    << 
235       // Returns the process sub type          << 
236                                                << 
237     inline void SetProcessSubType(G4int);      << 
238       // Sets the process sub type             << 
239                                                << 
240     static const G4String& GetProcessTypeName( << 
241       // Returns the process type name         << 
242                                                << 
243     virtual const G4VProcess* GetCreatorProces << 
244       // Returns the process to be used as Cre << 
245       // coming from this process              << 
246                                                << 
247     virtual void StartTracking(G4Track*);      << 
248     virtual void EndTracking();                << 
249       // Inform Start/End of tracking for each << 
250                                                << 
251     virtual void SetProcessManager(const G4Pro << 
252       // A process manager sets its own pointe << 
253       // is registered in the process Manager  << 
254     virtual const G4ProcessManager* GetProcess << 
255       // Get the process manager which the pro << 
256                                                << 
257     virtual void ResetNumberOfInteractionLengt << 
258       // Reset (determine the value of) Number << 
259                                                   199 
260     inline G4double GetNumberOfInteractionLeng << 
261       // Get NumberOfInteractionLengthLeft     << 
262                                                   200 
263     inline G4double GetTotalNumberOfInteractio << 201       virtual G4bool StorePhysicsTable(const G4String& directory, 
264       // Get NumberOfInteractionLength after   << 202                G4bool          ascii = false)
265       //  ResetNumberOfInteractionLengthLeft() << 203                                       {return true;}
266                                                << 204       // Store PhysicsTable in a file. 
267     inline G4bool isAtRestDoItIsEnabled() cons << 205       // (return false in case of failure at I/O ) 
268     inline G4bool isAlongStepDoItIsEnabled() c << 
269     inline G4bool isPostStepDoItIsEnabled() co << 
270       // These methods indicate which DoIt is  << 
271       // They are used by G4ProcessManager to  << 
272       // that ordering parameters are properly << 
273                                                << 
274     virtual void  DumpInfo() const;            << 
275       // Dump out process information          << 
276                                                << 
277     virtual void ProcessDescription(std::ostre << 
278       // Write out to html file for automatic  << 
279                                                << 
280     inline void  SetVerboseLevel(G4int value); << 
281     inline G4int GetVerboseLevel() const;      << 
282       // set/get control flag for output messa << 
283       //  0: Silent                            << 
284       //  1: Warning message                   << 
285       //  2: More                              << 
286                                                << 
287     virtual void SetMasterProcess(G4VProcess*  << 
288       // Sets the master thread process instan << 
289     inline const G4VProcess* GetMasterProcess( << 
290       // Returns the master thread process ins << 
291       // Can be used to initialise worker type << 
292       // instances from master one (e.g. to sh << 
293       // if ( this != GetMasterProcess() ) { / << 
294       // else { /* master or sequential */ }   << 
295                                                << 
296     virtual void BuildWorkerPhysicsTable(const << 
297       // Messaged by the Particle definition ( << 
298       // in worker threads. See BuildWorkerPhy << 
299       // Can be used to share among threads ph << 
300       // Use GetMasterProcess() to get pointer << 
301       // worker thread.                        << 
302       // By default this method makes a forwar << 
303                                                << 
304     virtual void PrepareWorkerPhysicsTable(con << 
305       // Messaged by the Particle definition ( << 
306       // in worker threads. See Preparephysics << 
307       // Can be used to share among threads ph << 
308       // Use GetMasterProcess() to get pointer << 
309       // worker thread                         << 
310       // By default this method makes a forwar << 
311                                                << 
312   protected:                                   << 
313                                                << 
314     inline void SubtractNumberOfInteractionLen << 
315       // Subtract NumberOfInteractionLengthLef << 
316       // to previousStepSize                   << 
317                                                   206  
318     inline void ClearNumberOfInteractionLength << 207       virtual G4bool RetrievePhysicsTable(const G4String& directory, 
319       // This method should be at the end of P << 208                   G4bool          ascii = false)
320                                                << 209                                       {return false;}
321   protected:                                   << 210       // Retrieve Physics from a file. 
322                                                << 211       // (return true if the Physics Table can be build by using file)
323     const G4ProcessManager* aProcessManager =  << 212       // (return false if the process has no functionality or in case of failure)
                                                   >> 213       // File name should be defined by each process 
                                                   >> 214       // and the file should be placed under the directory specifed by the argument. 
324                                                   215  
325     G4VParticleChange* pParticleChange = nullp << 216   ////////////////////////////
326       // The pointer to G4VParticleChange obje << 217       const G4String& GetProcessName() const;
327       // which is modified and returned by add << 218       //  Returns the name of the process.
328       // This pointer should be set in each ph << 219 
329       // after construction of derived class o << 220       G4ProcessType GetProcessType() const;
330                                                << 221       //  Returns the process type.
331     G4ParticleChange aParticleChange;          << 222 
332       // This object is kept for compatibility << 223       void SetProcessType(G4ProcessType );
333       // May be removed in future              << 224       //  Set the process type.
334                                                << 225 
335     G4double theNumberOfInteractionLengthLeft  << 226       static const G4String& GetProcessTypeName(G4ProcessType );
336       // The flight length left for the curren << 227       //  Returns the process type name
337       // in unit of "Interaction length"       << 228 
338                                                << 229       virtual void StartTracking();
339     G4double currentInteractionLength = -1.0;  << 230       virtual void EndTracking();
340       // The InteractionLength in the current  << 231       // inform Start/End of tracking for each track to the physics process 
341                                                << 
342     G4double theInitialNumberOfInteractionLeng << 
343       // The initial value when ResetNumberOfI << 
344                                                << 
345     G4String theProcessName;                   << 
346       // The name of the process               << 
347                                                << 
348     G4String thePhysicsTableFileName;          << 
349                                                << 
350     G4ProcessType theProcessType = fNotDefined << 
351       // The type of the process               << 
352                                                << 
353     G4int theProcessSubType = -1;              << 
354       // The sub type of the process           << 
355                                                << 
356     G4double thePILfactor = 1.0;               << 
357       // Factor for PhysicsInteractionLength   << 
358       // which is passed to G4SteppingManager  << 
359                                                   232  
360     G4int verboseLevel = 0;                    << 
361       // Controle flag for output message      << 
362                                                << 
363     G4bool enableAtRestDoIt = true;            << 
364     G4bool enableAlongStepDoIt = true;         << 
365     G4bool enablePostStepDoIt = true;          << 
366                                                   233 
367   private:                                     << 234   protected:
                                                   >> 235       G4VParticleChange* pParticleChange;
                                                   >> 236       //  The pointer to G4VParticleChange object 
                                                   >> 237       //  which is modified and returned by address by the DoIt() method.
                                                   >> 238       //  This pointer should be set in each physics process
                                                   >> 239       //  after construction of derived class object.  
                                                   >> 240 
                                                   >> 241       G4ParticleChange aParticleChange;
                                                   >> 242       //  This object is kept for compatibility with old scheme
                                                   >> 243       //  This will be removed in future
                                                   >> 244 
                                                   >> 245       G4double          theNumberOfInteractionLengthLeft;
                                                   >> 246      // The flight length left for the current tracking particle
                                                   >> 247      // in unit of "Interaction length".
                                                   >> 248 
                                                   >> 249       G4double          currentInteractionLength;
                                                   >> 250      // The InteractionLength in the current material
                                                   >> 251 
                                                   >> 252  public: // with description
                                                   >> 253       virtual void      ResetNumberOfInteractionLengthLeft();
                                                   >> 254      // reset (determine the value of)NumberOfInteractionLengthLeft
368                                                   255  
369     G4VProcess();                              << 256  protected:  // with description
370       // Hidden default constructor            << 257      virtual void      SubtractNumberOfInteractionLengthLeft(
                                                   >> 258           G4double previousStepSize
                                                   >> 259                                 );
                                                   >> 260      // subtract NumberOfInteractionLengthLeft by the value corresponding to 
                                                   >> 261      // previousStepSize      
                                                   >> 262  
                                                   >> 263      virtual void      ClearNumberOfInteractionLengthLeft();
                                                   >> 264      // clear NumberOfInteractionLengthLeft 
                                                   >> 265      // !!! This method should be at the end of PostStepDoIt()
                                                   >> 266      // !!! and AtRestDoIt
                                                   >> 267 
                                                   >> 268  private: 
                                                   >> 269       G4String theProcessName;
                                                   >> 270       //  The name of the process
371                                                   271 
372   private:                                     << 272       G4ProcessType theProcessType;
                                                   >> 273       //  The type of the process
373                                                   274 
374     G4VProcess* masterProcessShadow = nullptr; << 275       G4double thePILfactor;
375       // For multi-threaded: pointer to the in << 276       // factor for PhysicsInteractionLength 
376       // for the master thread                 << 277       // which is passed to G4SteppingManager
                                                   >> 278       
                                                   >> 279  public: // with description
                                                   >> 280    virtual void  DumpInfo() const;
                                                   >> 281    // dump out process information    
                                                   >> 282 
                                                   >> 283  public: // with description
                                                   >> 284    void  SetVerboseLevel(G4int value);
                                                   >> 285    G4int GetVerboseLevel() const;
                                                   >> 286    // set/get controle flag for output message
                                                   >> 287    //  0: Silent
                                                   >> 288    //  1: Warning message
                                                   >> 289    //  2: More
                                                   >> 290 
                                                   >> 291 
                                                   >> 292  protected:
                                                   >> 293    G4int verboseLevel;
                                                   >> 294    // controle flag for output message
377                                                   295 
378     G4ProcessTable* fProcessTable = nullptr;   << 
379 };                                                296 };
380                                                   297 
381 // -----------------------------------------      298 // -----------------------------------------
382 //  inlined function members implementation       299 //  inlined function members implementation
383 // -----------------------------------------      300 // -----------------------------------------
                                                   >> 301 #include "Randomize.hh"              
384                                                   302 
385 inline                                            303 inline 
386 const G4String& G4VProcess::GetProcessName() c << 304  const G4String& G4VProcess::GetProcessName() const
387 {                                                 305 {
388   return theProcessName;                          306   return theProcessName;
389 }                                                 307 }
390                                                   308 
391 inline                                            309 inline      
392 G4ProcessType G4VProcess::GetProcessType() con << 310  G4ProcessType G4VProcess::GetProcessType() const
393 {                                                 311 {
394   return theProcessType;                          312   return theProcessType;
395 }                                                 313 }
396                                                   314 
397 inline                                            315 inline
398 void G4VProcess::SetProcessType(G4ProcessType  << 316  void G4VProcess::SetProcessType(G4ProcessType aType)
399 {                                                 317 {
400   theProcessType = aType;                         318   theProcessType = aType;
401 }                                                 319 }
402                                                   320 
403 inline                                         << 321 inline  void G4VProcess::SetVerboseLevel(G4int value)
404  G4int G4VProcess::GetProcessSubType() const   << 
405 {                                              << 
406   return theProcessSubType;                    << 
407 }                                              << 
408                                                << 
409 inline                                         << 
410 void G4VProcess::SetProcessSubType(G4int value << 
411 {                                              << 
412   theProcessSubType = value;                   << 
413 }                                              << 
414                                                << 
415 inline                                         << 
416 void G4VProcess::SetVerboseLevel(G4int value)  << 
417 {                                                 322 {
418   verboseLevel = value;                           323   verboseLevel = value;
419 }                                                 324 }
420                                                   325 
421 inline                                         << 326 inline  G4int G4VProcess::GetVerboseLevel() const
422 G4int G4VProcess::GetVerboseLevel() const      << 
423 {                                                 327 {
424   return  verboseLevel;                           328   return  verboseLevel;
425 }                                                 329 }
426                                                   330 
427 inline                                         << 331 inline void G4VProcess::ResetNumberOfInteractionLengthLeft()
428 void G4VProcess::ClearNumberOfInteractionLengt << 
429 {                                                 332 {
430   theInitialNumberOfInteractionLength = -1.0;  << 333   theNumberOfInteractionLengthLeft =  -log( G4UniformRand() );
431   theNumberOfInteractionLengthLeft =  -1.0;    << 
432 }                                                 334 }
433                                                   335 
434 inline                                         << 336 inline void G4VProcess::ClearNumberOfInteractionLengthLeft()
435 G4double G4VProcess::GetNumberOfInteractionLen << 
436 {                                              << 
437   return theNumberOfInteractionLengthLeft;     << 
438 }                                              << 
439                                                << 
440 inline                                         << 
441 G4double G4VProcess::GetTotalNumberOfInteracti << 
442 {                                                 337 {
443   return theInitialNumberOfInteractionLength - << 338   theNumberOfInteractionLengthLeft =  -1.0;
444 }                                              << 
445                                                << 
446 inline                                         << 
447 G4double G4VProcess::GetCurrentInteractionLeng << 
448 {                                              << 
449   return currentInteractionLength;             << 
450 }                                                 339 }
451                                                   340 
452 inline                                         << 341 inline void G4VProcess::SetPILfactor(G4double value)
453 void G4VProcess::SetPILfactor(G4double value)  << 
454 {                                                 342 {
455   if (value>0.) { thePILfactor = value; }      << 343   if (value>0.) {
                                                   >> 344     thePILfactor = value;
                                                   >> 345   }
456 }                                                 346 }
457                                                   347 
458 inline                                         << 348 inline G4double G4VProcess::GetPILfactor() const
459 G4double G4VProcess::GetPILfactor() const      << 
460 {                                                 349 {
461   return thePILfactor;                            350   return thePILfactor;
462 }                                                 351 }
463                                                   352 
464 inline                                         << 353 inline G4double G4VProcess::AlongStepGPIL( const G4Track& track,
465 G4double G4VProcess::AlongStepGPIL( const G4Tr << 354                                      G4double  previousStepSize,
466                                     G4double   << 355                                      G4double  currentMinimumStep,
467                                     G4double   << 356                                      G4double& proposedSafety,
468                                     G4double&  << 357                                      G4GPILSelection* selection     )
469                                     G4GPILSele << 358 {
470 {                                              << 359   G4double value
471   return AlongStepGetPhysicalInteractionLength << 360    =AlongStepGetPhysicalInteractionLength(track, previousStepSize, currentMinimumStep, proposedSafety, selection);
472                              currentMinimumSte << 361   return value;
473 }                                                 362 }
474                                                   363 
475 inline                                         << 364 inline G4double G4VProcess::AtRestGPIL( const G4Track& track,
476 G4double G4VProcess::AtRestGPIL( const G4Track << 
477                                  G4ForceCondit    365                                  G4ForceCondition* condition )
478 {                                                 366 {
479   return thePILfactor * AtRestGetPhysicalInter << 367   G4double value
                                                   >> 368    =AtRestGetPhysicalInteractionLength(track, condition);
                                                   >> 369   return thePILfactor*value;
480 }                                                 370 }
481                                                   371 
482 inline                                         << 372 inline G4double G4VProcess::PostStepGPIL( const G4Track& track,
483 G4double G4VProcess::PostStepGPIL( const G4Tra << 373                                    G4double   previousStepSize,
484                                    G4double pr << 
485                                    G4ForceCond    374                                    G4ForceCondition* condition )
486 {                                                 375 {
487   return thePILfactor *                        << 376   G4double value
488       PostStepGetPhysicalInteractionLength(tra << 377    =PostStepGetPhysicalInteractionLength(track, previousStepSize, condition);
489 }                                              << 378   return thePILfactor*value;
490                                                << 
491 inline                                         << 
492 void G4VProcess::SetProcessManager(const G4Pro << 
493 {                                              << 
494   aProcessManager = procMan;                   << 
495 }                                                 379 }
                                                   >> 380 #endif
                                                   >> 381 
                                                   >> 382 
                                                   >> 383 
                                                   >> 384 
                                                   >> 385 
                                                   >> 386 
                                                   >> 387 
                                                   >> 388 
                                                   >> 389 
                                                   >> 390 
                                                   >> 391 
                                                   >> 392 
                                                   >> 393 
496                                                   394 
497 inline                                         << 
498 const G4ProcessManager* G4VProcess::GetProcess << 
499 {                                              << 
500   return aProcessManager;                      << 
501 }                                              << 
502                                                   395 
503 inline                                         << 
504 G4bool G4VProcess::isAtRestDoItIsEnabled() con << 
505 {                                              << 
506   return enableAtRestDoIt;                     << 
507 }                                              << 
508                                                   396 
509 inline                                         << 
510 G4bool G4VProcess::isAlongStepDoItIsEnabled()  << 
511 {                                              << 
512   return enableAlongStepDoIt;                  << 
513 }                                              << 
514                                                   397 
515 inline                                         << 
516 G4bool G4VProcess::isPostStepDoItIsEnabled() c << 
517 {                                              << 
518   return enablePostStepDoIt;                   << 
519 }                                              << 
520                                                   398 
521 inline                                         << 
522 const G4VProcess* G4VProcess::GetMasterProcess << 
523 {                                              << 
524   return masterProcessShadow;                  << 
525 }                                              << 
526                                                   399 
527 inline                                         << 
528 void G4VProcess::SubtractNumberOfInteractionLe << 
529 {                                              << 
530   if (currentInteractionLength>0.0)            << 
531   {                                            << 
532     theNumberOfInteractionLengthLeft -= prevSt << 
533     if(theNumberOfInteractionLengthLeft<0.)    << 
534     {                                          << 
535        theNumberOfInteractionLengthLeft=CLHEP: << 
536     }                                          << 
537   }                                            << 
538   else                                         << 
539   {                                            << 
540 #ifdef G4VERBOSE                               << 
541     if (verboseLevel>0)                        << 
542     {                                          << 
543       G4cerr << "G4VProcess::SubtractNumberOfI << 
544       G4cerr << " [" << theProcessName << "]"  << 
545       G4cerr << " currentInteractionLength = " << 
546              << currentInteractionLength << "  << 
547       G4cerr << " previousStepSize = " << prev << 
548       G4cerr << G4endl;                        << 
549     }                                          << 
550 #endif                                         << 
551     G4String msg = "Negative currentInteractio << 
552     msg += theProcessName;                     << 
553     G4Exception("G4VProcess::SubtractNumberOfI << 
554                 "ProcMan201", EventMustBeAbort << 
555   }                                            << 
556 }                                              << 
557                                                   400 
558 #endif                                         << 
559                                                   401