Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/run/include/G4VUserPhysicsList.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 /run/include/G4VUserPhysicsList.hh (Version 11.3.0) and /run/include/G4VUserPhysicsList.hh (Version 9.5.p2)


  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 // G4VUserPhysicsList                          << 
 27 //                                                 26 //
 28 // Class description:                          <<  27 // $Id: G4VUserPhysicsList.hh,v 1.41 2009-08-09 14:31:46 kurasige Exp $
                                                   >>  28 // GEANT4 tag $Name: not supported by cvs2svn $
 29 //                                                 29 //
 30 // This class is an abstract class for constru <<  30 // 
 31 // User must implement the following two pure  <<  31 // ------------------------------------------------------------
 32 // class derived from this class:              <<  32 //  GEANT 4 class header file 
 33 // - G4VUserPhysicsList::ConstructParticle()   <<  33 // Class Description:
 34 //     Construct particles                     <<  34 //      This class is an abstract class for
 35 // - G4VUserPhysicsList::ConstructProcess()    <<  35 //      constructing particles and processes.
 36 //     Construct procesess and register them t <<  36 //      User must implement following three virtual methods
 37                                                <<  37 //      in his/her own concrete class derived from this class. 
 38 // Original author: H.Kurashige (Kobe Universi <<  38 //        G4VUserPhysicsList::ConstructParticle() 
 39 // ------------------------------------------- <<  39 //           Construct particles
 40 #ifndef G4VUserPhysicsList_hh                  <<  40 //        G4VUserPhysicsList::ConstructProcess() 
 41 #define G4VUserPhysicsList_hh 1                <<  41 //           Construct procesess and register them to particles
                                                   >>  42 //
                                                   >>  43 // ------------------------------------------- 
                                                   >>  44 //  History
                                                   >>  45 //        first version                   09 Jan. 1998 by H.Kurashige 
                                                   >>  46 //        modified                        24 Jan. 1998 by H.Kurashige
                                                   >>  47 //          rename DumpCutValues/DumpCutValuesTable 
                                                   >>  48 //          change SetCuts method
                                                   >>  49 //          add    SetCutsWithDefault method
                                                   >>  50 //        modified                       06 June 1998 by H.Kurashige
                                                   >>  51 //          add    AddProcessManager
                                                   >>  52 //          add    BuildPhysicsTable
                                                   >>  53 //       modified                        29  June 1998 by H.Kurashige
                                                   >>  54 //          add    AddProcessManager
                                                   >>  55 //       modified                        05 Dec. 1998 by H.Kurashige
                                                   >>  56 //          add    ConstructAllParticles()
                                                   >>  57 //        modified                        14, Apr 1999 by H.Kurashige
                                                   >>  58 //          change BuildPhysicsTable as public
                                                   >>  59 //          removed ConstructAllParticles() and related methods  
                                                   >>  60 //          changed SetCuts method argument
                                                   >>  61 //       modified                           08, Nov 2000 by H.Kurashige
                                                   >>  62 //          added   Retrieve/StorePhysicsTable and related methods
                                                   >>  63 //       modified                           08, Mar 2001 by H.Kurashige
                                                   >>  64 //          added   binary mode for Retrieve/StorePhysicsTable
                                                   >>  65 //          added   RetrieveCutValues and related
                                                   >>  66 //          added   Set/ResetStoredInAscii() to switch on ascii mode 
                                                   >>  67 //                  for Retrieve/StorePhysicsTable
                                                   >>  68 //       modified for CUTS per REGION      10, Oct 2002 by H.Kurashige 
                                                   >>  69 //          removed following methods 
                                                   >>  70 //           void ReCalcCutValue() 
                                                   >>  71 //           void SetCutValueForOthers()
                                                   >>  72 //           void SetCutValueForOtherThan() 
                                                   >>  73 //           void ReCalcCutValueForOthers()
                                                   >>  74 //           virtual G4bool  StoreMaterialInfo()
                                                   >>  75 //           virtual G4bool  StoreCutValues()
                                                   >>  76 //           virtual G4bool  RetrieveCutValues()
                                                   >>  77 //           virtual G4bool  CheckForRetrievePhysicsTable()
                                                   >>  78 //           virtual G4bool  CheckMaterialInfo()
                                                   >>  79 //          added    void BuildPhysicsTable()    
                                                   >>  80 //       Added PhysicsListHelper           29 Apr. 2011 H.Kurashige
                                                   >>  81 //       Added default impelmentation of SetCuts 10 June 2011 H.Kurashige 
                                                   >>  82 //           SetCuts is not 'pure virtual' any more 
                                                   >>  83 // ------------------------------------------------------------
                                                   >>  84 #ifndef G4VUserPhysicsList_h
                                                   >>  85 #define G4VUserPhysicsList_h 1
                                                   >>  86 #include "globals.hh"
                                                   >>  87 #include "G4ios.hh"
 42                                                    88 
 43 #include "G4ParticleDefinition.hh"             << 
 44 #include "G4ParticleTable.hh"                      89 #include "G4ParticleTable.hh"
 45 #include "G4PhysicsModelCatalog.hh"            <<  90 #include "G4ParticleDefinition.hh" 
 46 #include "G4ProductionCutsTable.hh"                91 #include "G4ProductionCutsTable.hh"
 47 #include "G4Threading.hh"                      << 
 48 #include "G4VUPLSplitter.hh"                   << 
 49 #include "G4ios.hh"                            << 
 50 #include "globals.hh"                          << 
 51                                                << 
 52 #include "rundefs.hh"                          << 
 53 #include "tls.hh"                              << 
 54                                                    92 
 55 class G4UserPhysicsListMessenger;                  93 class G4UserPhysicsListMessenger;
 56 class G4PhysicsListHelper;                         94 class G4PhysicsListHelper;
 57 class G4VProcess;                                  95 class G4VProcess;
 58                                                    96 
 59 // Encapsulate the fields of class G4VUserPhys << 
 60 class G4VUPLData                               << 
 61 {                                              << 
 62   public:                                      << 
 63     void initialize();                         << 
 64                                                << 
 65     G4ParticleTable::G4PTblDicIterator* _thePa << 
 66     G4UserPhysicsListMessenger* _theMessenger  << 
 67     G4PhysicsListHelper* _thePLHelper = nullpt << 
 68     G4bool _fIsPhysicsTableBuilt = false;      << 
 69     G4int _fDisplayThreshold = 0;              << 
 70 };                                             << 
 71                                                << 
 72 // The type G4VUPLManager is introduced to enc << 
 73 // both the master thread and worker threads t << 
 74 // the fields encapsulated by the class G4VUPL << 
 75 // changes the value for these fields, it refe << 
 76 // definition defined below. For every G4VUser << 
 77 // there is a corresponding G4VUPLData instanc << 
 78 // are organized by the class G4VUPLManager as << 
 79 // The field "int g4vuplInstanceID" is added t << 
 80 // The value of this field in each G4VUserPhys << 
 81 // subscript of the corresponding G44VUPLData  << 
 82 // In order to use the class G44VUPLManager, w << 
 83 // G4VUserPhysicsList as follows: "static G4VU << 
 84 // Both the master thread and worker threads c << 
 85 // for G44VUPLData instances mutually along wi << 
 86 // instances are created. For each worker thre << 
 87 // Consider any thread A, if there is any othe << 
 88 // This ion is shared by the thread A. So the  << 
 89 // in the array of G4PDefData instances for th << 
 90 //                                             << 
 91 // Important Note: you may wonder why we are i << 
 92 //                 since there is only one PL  << 
 93 //                 This is true, in the sense  << 
 94 //                 to be associated to a G4Run << 
 95 //                 instantiate as many PLs are << 
 96 //                 of the PLs to be used we th << 
 97 //                 guarantee that the system w << 
 98 //                 this (unusual) case. This m << 
 99 //                                             << 
100 using G4VUPLManager = G4VUPLSplitter<G4VUPLDat << 
101 using G4VUserPhysicsListSubInstanceManager = G << 
102                                                << 
103 class G4VUserPhysicsList                           97 class G4VUserPhysicsList
104 {                                                  98 {
105   public:                                      <<  99   public: 
106     G4VUserPhysicsList();                         100     G4VUserPhysicsList();
107     virtual ~G4VUserPhysicsList();                101     virtual ~G4VUserPhysicsList();
                                                   >> 102 
                                                   >> 103   // copy constructor and assignment operator
108     G4VUserPhysicsList(const G4VUserPhysicsLis    104     G4VUserPhysicsList(const G4VUserPhysicsList&);
109     G4VUserPhysicsList& operator=(const G4VUse << 105     G4VUserPhysicsList & operator=(const G4VUserPhysicsList&);
110                                                   106 
111     // Each particle type will be instantiated << 107   public:  // with description
112     // This method is invoked by the RunManger << 108    // Each particle type will be instantiated
113     virtual void ConstructParticle() = 0;      << 109    // This method is invoked by the RunManger 
114                                                << 110    virtual void ConstructParticle() = 0;
115     // By calling the "Construct" method,      << 111 
116     // process manager and processes are creat << 112    // By calling the "Construct" method, 
117     void Construct();                          << 113    // process manager and processes are created. 
118                                                << 114    void Construct();
119     // Each physics process will be instantiat << 115  
120     // registered to the process manager of ea << 116    // Each physics process will be instantiated and
121     // Invoked in the Construct() method.      << 117    // registered to the process manager of each particle type 
122     virtual void ConstructProcess() = 0;       << 118    // This method is invoked in Construct method 
123                                                << 119    virtual void ConstructProcess() = 0;
124     // Sets a cut value for all particle types << 120 
125     virtual void SetCuts();                    << 121   protected: // with description
126                                                << 122    //  User must invoke this method in his ConstructProcess() 
127     // Set/get the default cut value. Calling  << 123    //  implementation in order to insures particle transportation.
128     // re-calcuration of cut values and physic << 124    void AddTransportation();
129     // next event loop.                        << 125 
130     void SetDefaultCutValue(G4double newCutVal << 126    //Register a process to the particle type 
131     G4double GetDefaultCutValue() const;       << 127    // according to the ordering parameter table
                                                   >> 128    //  'true' is returned if the process is registerd successfully
                                                   >> 129    G4bool RegisterProcess(G4VProcess*            process,
                                                   >> 130         G4ParticleDefinition*  particle);
132                                                   131 
133     // Invoke BuildPhysicsTable for all proces << 132   public:
134     // In case of "Retrieve" flag is ON, Physi << 133    void UseCoupledTransportation(G4bool vl=true);
135     // retrieved from files.                   << 
136     void BuildPhysicsTable();                  << 
137                                                   134 
138     // Prepare the PhysicsTable for specified  << 135   /////////////////////////////////////////////////////////////////
139     void PreparePhysicsTable(G4ParticleDefinit << 136   public: // with description 
                                                   >> 137    //  "SetCuts" method sets a cut value for all particle types 
                                                   >> 138    //   in the particle table
                                                   >> 139    virtual void SetCuts(); 
                                                   >> 140 
                                                   >> 141   public:  // with description
                                                   >> 142    //  set/get the default cut value
                                                   >> 143    //  Calling SetDefaultCutValue causes re-calcuration of cut values
                                                   >> 144    //  and physics tables just before the next event loop
                                                   >> 145    void     SetDefaultCutValue(G4double newCutValue);
                                                   >> 146    G4double GetDefaultCutValue() const;
                                                   >> 147 
                                                   >> 148   /////////////////////////////////////////////////////////////////////  
                                                   >> 149   public: // with description
                                                   >> 150     // Invoke BuildPhysicsTable for all processes for all particles
                                                   >> 151     // In case of "Retrieve" flag is ON, PhysicsTable will be
                                                   >> 152     // retrieved from files
                                                   >> 153     void BuildPhysicsTable();    
                                                   >> 154   
                                                   >> 155    // do PreparePhysicsTable for specified particle type
                                                   >> 156     void PreparePhysicsTable(G4ParticleDefinition* );    
140                                                   157 
141     // Build the PhysicsTable for specified pa << 158    // do BuildPhysicsTable for specified particle type
142     void BuildPhysicsTable(G4ParticleDefinitio << 159     void BuildPhysicsTable(G4ParticleDefinition* );    
143                                                   160 
144     // Store PhysicsTable together with both m << 161      // Store PhysicsTable together with both material and cut value 
145     // information in files under the specifie    162     // information in files under the specified directory.
146     // Returns "true" if files are successfull << 163     //  (return true if files are sucessfully created)
147     G4bool StorePhysicsTable(const G4String& d << 164     G4bool  StorePhysicsTable(const G4String& directory = ".");
148                                                << 165  
149     // Return true if "Retrieve" flag is ON.   << 166     // Return true if "Retrieve" flag is ON. 
150     // (i.e. PhysicsTable will be retrieved fr << 167     // (i.e. PhysicsTable will be retrieved from files)
151     G4bool IsPhysicsTableRetrieved() const;    << 168     G4bool  IsPhysicsTableRetrieved() const;
152     G4bool IsStoredInAscii() const;            << 169     G4bool  IsStoredInAscii() const;
153                                                   170 
154     // Get directory path for physics table fi    171     // Get directory path for physics table files.
155     const G4String& GetPhysicsTableDirectory()    172     const G4String& GetPhysicsTableDirectory() const;
156                                                   173 
157     // Set "Retrieve" flag. Directory path can << 174     // Set "Retrieve" flag
158     // Null string (default) means directory i << 175     // Directory path can be set together.
159     // from the current value.                 << 176     // Null string (default) means directory is not changed 
160     void SetPhysicsTableRetrieved(const G4Stri << 177     // from the current value 
161     void SetStoredInAscii();                   << 178     void    SetPhysicsTableRetrieved(const G4String& directory = "");
162                                                << 179     void    SetStoredInAscii();
163     // Reset "Retrieve" flag.                  << 180   
164     void ResetPhysicsTableRetrieved();         << 181     // Reset "Retrieve" flag
165     void ResetStoredInAscii();                 << 182     void    ResetPhysicsTableRetrieved();
166                                                << 183     void    ResetStoredInAscii();
167     // Print out the List of registered partic << 184 
                                                   >> 185  ///////////////////////////////////////////////////////////////////////
                                                   >> 186   public: // with description
                                                   >> 187     // Print out the List of registered particles types
168     void DumpList() const;                        188     void DumpList() const;
169                                                   189 
170     // Request to print out information of cut << 190   public: // with description
171     // Printing will be performed when all tab << 191     // Request to print out information of cut values
172     void DumpCutValuesTable(G4int flag = 1);   << 192     // Printing will be performed when all tables are made
173                                                << 193     void DumpCutValuesTable(G4int flag =1);
174     // Triggers the print-out requested by the << 194 
175     // This method must be invoked by RunManag << 195     // The following method actually trigger the print-out requested
                                                   >> 196     // by the above method. This method must be invoked by RunManager
                                                   >> 197     // at the proper moment.
176     void DumpCutValuesTableIfRequested();         198     void DumpCutValuesTableIfRequested();
177                                                   199 
178     // Set/get control flag for output message << 200   public: // with description
                                                   >> 201     void  SetVerboseLevel(G4int value);
                                                   >> 202     G4int GetVerboseLevel() const;
                                                   >> 203     // set/get controle flag for output message
179     //  0: Silent                                 204     //  0: Silent
180     //  1: Warning message                        205     //  1: Warning message
181     //  2: More                                   206     //  2: More
182     void SetVerboseLevel(G4int value);         << 
183     G4int GetVerboseLevel() const;             << 
184                                                   207 
185     void UseCoupledTransportation(G4bool vl =  << 208   ///////////////////////////////////////////////////////////////////////////
186                                                << 209   public: // with description
187     // Invokes default SetCuts() method.       << 210    //  "SetCutsWithDefault" method invokes default SetCuts method
188     // Note: cut values will not be overwritte << 211    //   Note: Cut values will not be overwriten with this method 
189     // Use of default SetCuts() method is reco << 212    //   Using default SetCuts method is recommended
190     void SetCutsWithDefault();                 << 213    //  (i.e You do not need to implement SetCuts method) 
191                                                << 214    void SetCutsWithDefault();   
192     // Sets a cut value for a particle type fo << 215 
193     void SetCutValue(G4double aCut, const G4St << 216    // Following are utility methods for SetCuts
194                                                << 217   
195     // Gets a cut value for a particle type fo << 218    // SetCutValue sets a cut value for a particle type for the default region
196     G4double GetCutValue(const G4String& pname << 219    void SetCutValue(G4double aCut, const G4String& pname); 
197                                                << 220 
198     // Sets a cut value for a particle type fo << 221    // GetCutValue sets a cut value for a particle type for the default region
199     void SetCutValue(G4double aCut, const G4St << 222    G4double GetCutValue(const G4String& pname) const; 
200                                                << 223 
201     // Invoke SetCuts for specified particle f << 224    // SetCutValue sets a cut value for a particle type for a region
202     // If the pointer to the region is NULL, t << 225    void SetCutValue(G4double aCut, const G4String& pname, const G4String& rname); 
203     // In case of "Retrieve" flag is ON, cut v << 226 
204     // from files.                             << 227    // Invoke SetCuts for specified particle for a region
205     void SetParticleCuts(G4double cut, G4Parti << 228    // If the pointer to the region is NULL, the default region is used
206     void SetParticleCuts(G4double cut, const G << 229    // In case of "Retrieve" flag is ON, 
207                                                << 230    // Cut values will be retrieved from files
208     // Invoke SetCuts() for all particles in a << 231    void SetParticleCuts(G4double cut,G4ParticleDefinition* particle,G4Region* region=0);
209     void SetCutsForRegion(G4double aCut, const << 232   void SetParticleCuts( G4double cut, const G4String& particleName, G4Region* region=0);
210                                                << 233 
211     // Gets/sets the flag for ApplyCuts().     << 234    // Invoke SetCuts for all particles in a region
212     void SetApplyCuts(G4bool value, const G4St << 235    void SetCutsForRegion(G4double aCut, const G4String& rname);
213     G4bool GetApplyCuts(const G4String& name)  << 236 
                                                   >> 237    // Following are utility methods are obsolete
                                                   >> 238    void ResetCuts();
                                                   >> 239 
                                                   >> 240 ///////////////////////////////////////////////////////////////////
                                                   >> 241   public:   
                                                   >> 242    // Get/SetApplyCuts gets/sets the flag for ApplyCuts
                                                   >> 243    void SetApplyCuts(G4bool value, const G4String& name); 
                                                   >> 244    G4bool GetApplyCuts(const G4String& name) const; 
                                                   >> 245 
                                                   >> 246 ///////////////////////////////////////////////////////////////////////////////
                                                   >> 247   protected:  
                                                   >> 248     // do BuildPhysicsTable for make the integral schema
                                                   >> 249     void BuildIntegralPhysicsTable(G4VProcess* ,G4ParticleDefinition*  );   
                                                   >> 250 
                                                   >> 251 
                                                   >> 252   protected: 
                                                   >> 253     // Retrieve PhysicsTable from files for proccess belongng the particle.
                                                   >> 254     // Normal BuildPhysics procedure of processes will be invoked, 
                                                   >> 255     // if it fails (in case of Process's RetrievePhysicsTable returns false)
                                                   >> 256     virtual void  RetrievePhysicsTable(G4ParticleDefinition* ,  
                                                   >> 257                const G4String& directory, 
                                                   >> 258                G4bool          ascii = false);
                                                   >> 259 
                                                   >> 260    /////////////////////////////////////////////////////////////////
                                                   >> 261   protected: 
                                                   >> 262     // adds new ProcessManager to all particles in the Particle Table
                                                   >> 263     //   this routine is used in Construct()
                                                   >> 264     void InitializeProcessManager();
214                                                   265 
215     // Remove and delete ProcessManagers for a << 266   public: // with description
216     // Particle Table.                         << 267     // remove and delete ProcessManagers for all particles in tha Particle Table
                                                   >> 268     //    this routine is invoked from RunManager 
217     void RemoveProcessManager();                  269     void RemoveProcessManager();
218                                                   270 
219     // Remove and delete TrackingManagers for  << 271   public: // with description
220     // Particle Table.                         << 272     // add process manager for particles created on-the-fly 
221     void RemoveTrackingManager();              << 
222                                                << 
223     // Add process manager for particles creat << 
224     void AddProcessManager(G4ParticleDefinitio    273     void AddProcessManager(G4ParticleDefinition* newParticle,
225                            G4ProcessManager* n << 274          G4ProcessManager*    newManager = 0 );
                                                   >> 275  
                                                   >> 276    /////////////////////////////////////////////////////////////////
                                                   >> 277   public:
                                                   >> 278     // check consistencies of list of particles 
226                                                   279 
227     // Check consistencies of list of particle << 
228     void CheckParticleList();                     280     void CheckParticleList();
229                                                   281 
230     void DisableCheckParticleList();              282     void DisableCheckParticleList();
231                                                << 283  
232     inline G4int GetInstanceID() const;        << 284   ////////////////////////////////////////////////////////////////////////
233     static const G4VUPLManager& GetSubInstance << 
234                                                << 
235     // Used by Worker threads on the shared in << 
236     // to initialise workers. Derived class re << 
237     // must also call this base class method.  << 
238     virtual void InitializeWorker();           << 
239                                                << 
240     // Destroy thread-local data. Note that de << 
241     // implementing this method should still c << 
242     virtual void TerminateWorker();            << 
243                                                << 
244   protected:                                      285   protected:
245     // User must invoke this method in his Con << 286    // the particle table has the complete List of existing particle types
246     // implementation in order to enable parti << 287    G4ParticleTable* theParticleTable;
247     void AddTransportation();                  << 288    G4ParticleTable::G4PTblDicIterator* theParticleIterator;
248                                                << 289 
249     // Register a process to the particle type << 290   protected: 
250     // according to the ordering parameter tab << 291    // pointer to G4UserPhysicsListMessenger
251     // 'true' is returned if the process is re << 292    G4UserPhysicsListMessenger* theMessenger;
252     G4bool RegisterProcess(G4VProcess* process << 
253                                                << 
254     // Build PhysicsTable for making the integ << 
255     void BuildIntegralPhysicsTable(G4VProcess* << 
256                                                << 
257     // Retrieve PhysicsTable from files for pr << 
258     // Normal BuildPhysics procedure of proces << 
259     // fails (in case of process's RetrievePhy << 
260     virtual void RetrievePhysicsTable(G4Partic << 
261                                       G4bool a << 
262                                                   293 
263     // Adds new ProcessManager to all particle << 294   protected:
264     // This function is used in Construct().   << 295    G4int verboseLevel;
265     void InitializeProcessManager();           << 
266                                                   296 
267     G4ParticleTable::G4PTblDicIterator* GetPar << 297   protected:
                                                   >> 298    // this is the default cut value for all particles
                                                   >> 299    G4double defaultCutValue;
                                                   >> 300   G4bool   isSetDefaultCutValue;
268                                                   301 
269   protected:                                      302   protected:
270     // The particle table has the complete Lis << 303    // pointer to ProductionCutsTable
271     G4ParticleTable* theParticleTable = nullpt << 304    G4ProductionCutsTable* fCutsTable;
272                                                   305 
273     G4int verboseLevel = 1;                    << 306    // flag to determine physics table will be build from file or not
                                                   >> 307    G4bool fRetrievePhysicsTable;  
                                                   >> 308    G4bool fStoredInAscii;
                                                   >> 309  
                                                   >> 310    G4bool fIsCheckedForRetrievePhysicsTable;
                                                   >> 311    G4bool fIsRestoredCutValues;
274                                                   312 
275     // Default cut value for all particles     << 313    // directory name for physics table files 
276     G4double defaultCutValue = 1.0;            << 314    G4String directoryPhysicsTable;   
277     G4bool isSetDefaultCutValue = false;       << 
278                                                   315 
279     // Pointer to ProductionCutsTable.         << 316    // flag for displaying the range cuts & energy thresholds
280     G4ProductionCutsTable* fCutsTable = nullpt << 317    G4int fDisplayThreshold;
281                                                   318 
282     // Flag to determine if physics table will << 319   // flag for Physics Table has been built 
283     G4bool fRetrievePhysicsTable = false;      << 320    G4bool fIsPhysicsTableBuilt;
284     G4bool fStoredInAscii = true;              << 
285                                                   321 
286     G4bool fIsCheckedForRetrievePhysicsTable = << 322   // flag for CheckParticleList 
287     G4bool fIsRestoredCutValues = false;       << 323   G4bool fDisableCheckParticleList; 
288                                                   324 
289     // Directory name for physics table files. << 325   // PhysicsListHelper
290     G4String directoryPhysicsTable = ".";      << 326   G4PhysicsListHelper* thePLHelper;
291                                                   327 
292     // Flag for CheckParticleList().           << 328   private:
293     G4bool fDisableCheckParticleList = false;  << 329    enum { FixedStringLengthForStore = 32 }; 
294                                                   330 
295     // MT data                                 << 
296     G4int g4vuplInstanceID = 0;                << 
297     G4RUN_DLL static G4VUPLManager subInstance << 
298 };                                             << 
299                                                   331 
300 // Inline methods implementations              << 332 };
301                                                   333 
302 inline void G4VUserPhysicsList::Construct()       334 inline void G4VUserPhysicsList::Construct()
303 {                                                 335 {
304 #ifdef G4VERBOSE                               << 336 #ifdef G4VERBOSE  
305   if (verboseLevel > 1) G4cout << "G4VUserPhys << 337   if (verboseLevel >1) G4cout << "G4VUserPhysicsList::Construct()" << G4endl;  
306 #endif                                            338 #endif
307                                                   339 
308   if (G4Threading::IsMasterThread()) G4Physics << 
309                                                << 
310   InitializeProcessManager();                     340   InitializeProcessManager();
311                                                   341 
312 #ifdef G4VERBOSE                               << 342 #ifdef G4VERBOSE  
313   if (verboseLevel > 1) G4cout << "Construct p << 343   if (verboseLevel >1) G4cout << "Construct processes " << G4endl;  
314 #endif                                            344 #endif
315   ConstructProcess();                             345   ConstructProcess();
                                                   >> 346 
316 }                                                 347 }
317                                                   348 
318 inline G4double G4VUserPhysicsList::GetDefault    349 inline G4double G4VUserPhysicsList::GetDefaultCutValue() const
319 {                                                 350 {
320   return defaultCutValue;                         351   return defaultCutValue;
321 }                                                 352 }
322                                                   353 
323 inline G4int G4VUserPhysicsList::GetVerboseLev << 354 
                                                   >> 355 inline  G4int G4VUserPhysicsList::GetVerboseLevel() const
324 {                                                 356 {
325   return verboseLevel;                         << 357   return  verboseLevel;
326 }                                                 358 }
327                                                   359 
328 inline G4bool G4VUserPhysicsList::IsPhysicsTab << 360 inline  
                                                   >> 361  G4bool  G4VUserPhysicsList::IsPhysicsTableRetrieved() const
329 {                                                 362 {
330   return fRetrievePhysicsTable;                << 363   return fRetrievePhysicsTable;  
331 }                                                 364 }
332                                                   365 
333 inline G4bool G4VUserPhysicsList::IsStoredInAs << 366 inline  
                                                   >> 367  G4bool  G4VUserPhysicsList::IsStoredInAscii() const
334 {                                                 368 {
335   return fStoredInAscii;                          369   return fStoredInAscii;
336 }                                                 370 }
337                                                   371 
338 inline const G4String& G4VUserPhysicsList::Get << 372 inline 
                                                   >> 373   const G4String& G4VUserPhysicsList::GetPhysicsTableDirectory() const
339 {                                                 374 {
340   return directoryPhysicsTable;                << 375   return directoryPhysicsTable;  
341 }                                                 376 }
342                                                   377 
343 inline void G4VUserPhysicsList::SetStoredInAsc << 378 inline 
                                                   >> 379  void  G4VUserPhysicsList::SetStoredInAscii()
344 {                                                 380 {
345   fStoredInAscii = true;                          381   fStoredInAscii = true;
346 }                                                 382 }
347                                                << 383     
348 inline void G4VUserPhysicsList::ResetPhysicsTa << 384     
                                                   >> 385 inline 
                                                   >> 386  void  G4VUserPhysicsList::ResetPhysicsTableRetrieved()
349 {                                                 387 {
350   fRetrievePhysicsTable = false;                  388   fRetrievePhysicsTable = false;
351   fIsRestoredCutValues = false;                   389   fIsRestoredCutValues = false;
352   fIsCheckedForRetrievePhysicsTable = false;   << 390   fIsCheckedForRetrievePhysicsTable=false;
353 }                                                 391 }
354                                                   392 
355 inline void G4VUserPhysicsList::ResetStoredInA << 393 
                                                   >> 394 inline 
                                                   >> 395  void  G4VUserPhysicsList::ResetStoredInAscii()
356 {                                                 396 {
357   fStoredInAscii = false;                         397   fStoredInAscii = false;
358 }                                                 398 }
359                                                   399 
360 inline void G4VUserPhysicsList::DisableCheckPa << 400 inline
                                                   >> 401  void G4VUserPhysicsList::DisableCheckParticleList()
361 {                                                 402 {
362   fDisableCheckParticleList = true;               403   fDisableCheckParticleList = true;
363 }                                                 404 }
364                                                   405 
365 inline G4int G4VUserPhysicsList::GetInstanceID << 
366 {                                              << 
367   return g4vuplInstanceID;                     << 
368 }                                              << 
369                                                << 
370 inline const G4VUPLManager& G4VUserPhysicsList << 
371 {                                              << 
372   return subInstanceManager;                   << 
373 }                                              << 
374                                                << 
375 #endif                                            406 #endif
                                                   >> 407 
376                                                   408