Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/cuts/include/G4ProductionCutsTable.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/cuts/include/G4ProductionCutsTable.hh (Version 11.3.0) and /processes/cuts/include/G4ProductionCutsTable.hh (Version 8.1)


  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 // G4ProductionCutsTable                       << 
 27 //                                                 26 //
 28 // Class description:                          <<  27 // $Id: G4ProductionCutsTable.hh,v 1.7 2006/06/29 19:29:50 gunter Exp $
                                                   >>  28 // GEANT4 tag $Name: geant4-08-01 $
 29 //                                                 29 //
 30 // G4ProductionCutsTable is a singleton class  <<  30 // 
 31 // G4ProductionCuts objects. This class manage <<  31 // ------------------------------------------------------------
 32 // cuts and energy cuts for each particle type <<  32 //  GEANT 4 class header file 
 33                                                <<  33 //
 34 // Author: M.Asai, 5 October 2002 - First impl <<  34 // Class Description
 35 // Modifications: H.Kurashige, 2004-2008       <<  35 //  G4ProductionCutsTable is a static singleton class of a table of
 36 // ------------------------------------------- <<  36 //  G4ProductionCuts objects. This class also manages tables of
 37 #ifndef G4ProductionCutsTable_hh               <<  37 //  production cut and energy cut for each particle type.
 38 #define G4ProductionCutsTable_hh 1             <<  38 //
                                                   >>  39 // ------------------------------------------------------------
                                                   >>  40 //   First Implementation          05 Oct. 2002  M.Asai    
                                                   >>  41 //
                                                   >>  42 //   Modified                      03 Feb 2004 H.Kurashige
                                                   >>  43 //    Modify RetrieveCutsTable to allow ordering of materials and 
                                                   >>  44 //    couples can be different from one in file (i.e. at storing)
                                                   >>  45 //   Modified                      20 Aug. 2004 H.Kurashige
                                                   >>  46 //    Modify RetrieveCutsTable to allow materials and 
                                                   >>  47 //    couples can be different from one in file (i.e. at storing)
                                                   >>  48 //
                                                   >>  49 // ------------------------------------------------------------
 39                                                    50 
 40 #include <cmath>                               <<  51 #ifndef G4ProductionCutsTable_h 
 41 #include <vector>                              <<  52 #define G4ProductionCutsTable_h 1
                                                   >>  53 
                                                   >>  54 class G4RegionStore;
                                                   >>  55 class G4VRangeToEnergyConverter;
                                                   >>  56 class G4LogicalVolume;
                                                   >>  57 class G4VPhysicalVolume;
                                                   >>  58 class G4ProductionCuts;
 42                                                    59 
 43 #include "globals.hh"                              60 #include "globals.hh"
                                                   >>  61 #include <cmath>
 44 #include "G4ios.hh"                                62 #include "G4ios.hh"
                                                   >>  63 #include <vector>
 45 #include "G4MaterialCutsCouple.hh"                 64 #include "G4MaterialCutsCouple.hh"
 46 #include "G4MCCIndexConversionTable.hh"            65 #include "G4MCCIndexConversionTable.hh"
 47 #include "G4Region.hh"                             66 #include "G4Region.hh"
 48                                                    67 
 49 class G4RegionStore;                           << 
 50 class G4VRangeToEnergyConverter;               << 
 51 class G4LogicalVolume;                         << 
 52 class G4VPhysicalVolume;                       << 
 53 class G4ProductionCuts;                        << 
 54 class G4ProductionCutsTableMessenger;          << 
 55                                                    68 
 56 class G4ProductionCutsTable                        69 class G4ProductionCutsTable  
 57 {                                                  70 {
 58   public:                                      <<  71   public: // with description
 59                                                << 
 60     static G4ProductionCutsTable* GetProductio     72     static G4ProductionCutsTable* GetProductionCutsTable();
 61       // This static method returns the single <<  73     // This static method returns the singleton pointer of this class object.
 62       // At first invocation, the singleton ob <<  74     // At the first invokation of this method, the singleton object is instantiated.
 63                                                    75 
 64     G4ProductionCutsTable(const G4ProductionCu <<  76   protected:
 65     G4ProductionCutsTable& operator=(const G4P <<  77     G4ProductionCutsTable();
                                                   >>  78   private:
                                                   >>  79     G4ProductionCutsTable(const G4ProductionCutsTable& right);
 66                                                    80 
                                                   >>  81   public:
 67     virtual ~G4ProductionCutsTable();              82     virtual ~G4ProductionCutsTable();
 68                                                    83 
 69     void CreateCoupleTables();                 <<  84   public: // with description
 70       // Creates material cuts couples table a << 
 71                                                << 
 72     void UpdateCoupleTable(G4VPhysicalVolume*      85     void UpdateCoupleTable(G4VPhysicalVolume* currentWorld);
 73       // Triggers an update of the table of G4 <<  86     // This method triggers an update of the table of G4ProductionCuts objects.
 74                                                    87 
 75     void SetEnergyRange(G4double lowedge, G4do     88     void SetEnergyRange(G4double lowedge, G4double highedge);
 76       // Sets the limits of energy cuts for al <<  89     // This method sets the limits of energy cuts for all particles.
 77                                                    90 
 78     G4double GetLowEdgeEnergy() const;             91     G4double GetLowEdgeEnergy() const;
 79     G4double GetHighEdgeEnergy() const;            92     G4double GetHighEdgeEnergy() const;
 80       // Get the limits of energy cuts for all <<  93     // These methods get the limits of energy cuts for all particles.
 81                                                << 
 82     G4double GetMaxEnergyCut();                << 
 83     void SetMaxEnergyCut(G4double value);      << 
 84       // Get/set max cut energy of RangeToEner << 
 85       // for all particle types                << 
 86                                                    94 
 87     void DumpCouples() const;                      95     void DumpCouples() const;
 88       // Displays a list of registered couples <<  96     // Display a list of registored couples
 89                                                    97 
 90     const G4MCCIndexConversionTable* GetMCCInd     98     const G4MCCIndexConversionTable* GetMCCIndexConversionTable() const;
 91       // Gives the pointer to the MCCIndexConv <<  99     // gives the pointer to the MCCIndexConversionTable
 92                                                   100 
 93     const std::vector<G4double>* GetRangeCutsV << 101   private:
 94     const std::vector<G4double>* GetEnergyCuts << 
 95                                                << 
 96     std::size_t GetTableSize() const;          << 
 97       // Returns the size of the couple table  << 
 98                                                << 
 99     const G4MaterialCutsCouple* GetMaterialCut << 
100       // Returns the pointer to the couple     << 
101                                                   102 
102     const G4MaterialCutsCouple* GetMaterialCut << 103    static G4ProductionCutsTable* fG4ProductionCutsTable;
103                                             co << 
104      // Returns the pointer to the couple      << 
105                                                << 
106     G4int GetCoupleIndex(const G4MaterialCutsC << 
107     G4int GetCoupleIndex(const G4Material* aMa << 
108                          const G4ProductionCut << 
109       // Return the index of the couple.       << 
110       // -1 is returned if index is not found  << 
111                                                   104 
112     G4bool IsModified() const;                 << 105    typedef std::vector<G4MaterialCutsCouple*> G4CoupleTable;
113       // Returns TRUE if at least one producti << 106    typedef std::vector<G4MaterialCutsCouple*>::const_iterator CoupleTableIterator;
                                                   >> 107    typedef std::vector<G4double> G4CutVectorForAParticle;
                                                   >> 108    typedef std::vector<G4CutVectorForAParticle*> G4CutTable;
                                                   >> 109    G4CoupleTable coupleTable;
                                                   >> 110    G4CutTable rangeCutTable;
                                                   >> 111    G4CutTable energyCutTable;
                                                   >> 112 
                                                   >> 113    G4RegionStore* fG4RegionStore;
                                                   >> 114    G4VRangeToEnergyConverter* converters[NumberOfG4CutIndex]; 
                                                   >> 115 
                                                   >> 116    G4ProductionCuts* defaultProductionCuts;
                                                   >> 117 
                                                   >> 118    G4MCCIndexConversionTable mccConversionTable;
                                                   >> 119 
                                                   >> 120 // These two vectors are for the backward comparibility
                                                   >> 121    G4double* rangeDoubleVector[NumberOfG4CutIndex];
                                                   >> 122    G4double* energyDoubleVector[NumberOfG4CutIndex];
                                                   >> 123 
                                                   >> 124   public: 
                                                   >> 125    const std::vector<G4double>* GetRangeCutsVector(size_t pcIdx) const;
                                                   >> 126    const std::vector<G4double>* GetEnergyCutsVector(size_t pcIdx) const;
                                                   >> 127 
                                                   >> 128 // These two vectors are for the backward comparibility
                                                   >> 129    G4double* GetRangeCutsDoubleVector(size_t pcIdx) const;
                                                   >> 130    G4double* GetEnergyCutsDoubleVector(size_t pcIdx) const;
114                                                   131   
115     void PhysicsTableUpdated();                << 132   public: // with description
116       // Resets the status of IsModified(). Th << 133    size_t GetTableSize() const;
117       // used by the RunManager when physics t << 134      // This method returns the size of the couple table.
118                                                << 135 
119     G4ProductionCuts* GetDefaultProductionCuts << 136    const G4MaterialCutsCouple* GetMaterialCutsCouple(G4int i) const;
120       // Returns the default production cuts   << 137     // This method returns the pointer to the couple.
121                                                << 138 
122     G4double ConvertRangeToEnergy(const G4Part << 139    const G4MaterialCutsCouple*
123                                   const G4Mate << 140      GetMaterialCutsCouple(const G4Material* aMat,
124                                         G4doub << 141                            const G4ProductionCuts* aCut) const;
125       // Gives energy corresponding to range v << 142     // This method returns the pointer to the couple.
126       // -1 is returned if particle or materia << 143 
127                                                << 144    G4int GetCoupleIndex(const G4MaterialCutsCouple* aCouple) const;
128     void ResetConverters();                    << 145    G4int GetCoupleIndex(const G4Material* aMat,
129       // Resets all range to energy converters << 146                            const G4ProductionCuts* aCut) const;
130                                                << 147     // These methods return the index of the couple.
131     G4bool StoreCutsTable(const G4String& dire << 148     // -1 is returned if index is not found.
132                           G4bool ascii = false << 
133       // Stores cuts and material information  << 
134       // the specified directory               << 
135                                                << 
136     G4bool RetrieveCutsTable(const G4String& d << 
137                              G4bool ascii = fa << 
138       // Retrieve material cut couple informat << 
139       // in files under the specified director << 
140                                                << 
141     G4bool CheckForRetrieveCutsTable(const G4S << 
142                                      G4bool as << 
143       // Checks stored material and cut values << 
144       // with the current detector setup       << 
145                                                << 
146     G4double* GetRangeCutsDoubleVector(std::si << 
147     G4double* GetEnergyCutsDoubleVector(std::s << 
148       // Methods for backward compatibility    << 
149                                                << 
150     void SetEnergyCutVector(const std::vector< << 
151       // User defined cut vectors (idx < 4) ra << 
152       // to avoid inconsistency in physics     << 
153                                                << 
154     void  SetVerboseLevel(G4int value);        << 
155     G4int GetVerboseLevel() const;             << 
156       // Control flag for output message       << 
157       //  0: Silent                            << 
158       //  1: Warning message                   << 
159       //  2: More                              << 
160                                                << 
161   protected:                                   << 
162                                                << 
163     G4ProductionCutsTable();                   << 
164                                                << 
165     virtual G4bool StoreMaterialInfo(const G4S << 
166                                      G4bool as << 
167       // Stores material information in files  << 
168                                                << 
169     virtual G4bool CheckMaterialInfo(const G4S << 
170                                      G4bool as << 
171       // Checks stored material is consistent  << 
172                                                << 
173     virtual G4bool StoreMaterialCutsCoupleInfo << 
174                                                << 
175       // Stores materialCutsCouple information << 
176       // specified directory                   << 
177                                                << 
178     virtual G4bool CheckMaterialCutsCoupleInfo << 
179                                                << 
180       // Checks stored materialCutsCouple is c << 
181       // the current detector setup            << 
182                                                << 
183     virtual G4bool StoreCutsInfo(const G4Strin << 
184                                  G4bool ascii  << 
185       // Stores cut values information in file << 
186                                                << 
187     virtual G4bool  RetrieveCutsInfo(const G4S << 
188                                      G4bool as << 
189       // Retrieves cut values information in f << 
190       // specified directory                   << 
191                                                   149 
                                                   >> 150    G4bool IsModified() const;
                                                   >> 151     // This method returns TRUE if at least one production cut value is modified.
                                                   >> 152   
                                                   >> 153    void PhysicsTableUpdated();
                                                   >> 154     // This method resets the status of IsModified(). This method must
                                                   >> 155     // be exclusively used by RunManager when physics tables are built.
                                                   >> 156 
                                                   >> 157    G4ProductionCuts* GetDefaultProductionCuts() const;
                                                   >> 158     // This method returns the default production cuts.
                                                   >> 159    
192   private:                                        160   private:
193                                                << 
194     void ScanAndSetCouple(G4LogicalVolume* aLV    161     void ScanAndSetCouple(G4LogicalVolume* aLV,
195                           G4MaterialCutsCouple << 162         G4MaterialCutsCouple* aCouple,
196                           G4Region* aRegion);  << 163         G4Region* aRegion);
197                                                << 
198     G4bool IsCoupleUsedInTheRegion(const G4Mat << 
199                                    const G4Reg << 
200                                                << 
201                                                << 
202   private:                                     << 
203                                                   164 
204     static G4ProductionCutsTable* fProductionC << 165     bool IsCoupleUsedInTheRegion(const G4MaterialCutsCouple* aCouple,
                                                   >> 166          const G4Region* aRegion) const;
205                                                   167 
206     std::vector<G4MaterialCutsCouple*> coupleT << 168   public: // with description
207     std::vector<std::vector<G4double>*> rangeC << 169    // Store cuts and material information in files under the specified directory.
208     std::vector<std::vector<G4double>*> energy << 170   G4bool  StoreCutsTable(const G4String& directory, 
209                                                << 171        G4bool          ascii = false);
210     std::vector<G4double>* userEnergyCuts[4] = << 172   
                                                   >> 173   // Retrieve material cut couple information 
                                                   >> 174   //  in files under the specified directory.
                                                   >> 175   G4bool  RetrieveCutsTable(const G4String& directory,
                                                   >> 176           G4bool          ascii = false);
                                                   >> 177   
                                                   >> 178   // check stored material and cut values are consistent with the current detector setup. 
                                                   >> 179   G4bool CheckForRetrieveCutsTable(const G4String& directory, 
                                                   >> 180            G4bool          ascii = false);
211                                                   181 
212     G4RegionStore* fG4RegionStore = nullptr;   << 182   protected:
213     G4VRangeToEnergyConverter* converters[Numb << 
214                                                   183 
215     G4ProductionCuts* defaultProductionCuts =  << 184   // Store material information in files under the specified directory.
                                                   >> 185   virtual G4bool  StoreMaterialInfo(const G4String& directory, 
                                                   >> 186             G4bool          ascii = false);
                                                   >> 187 
                                                   >> 188   // check stored material is consistent with the current detector setup. 
                                                   >> 189   virtual G4bool  CheckMaterialInfo(const G4String& directory, 
                                                   >> 190             G4bool          ascii = false);
                                                   >> 191   
                                                   >> 192   // Store materialCutsCouple information in files under the specified directory.
                                                   >> 193   virtual G4bool  StoreMaterialCutsCoupleInfo(const G4String& directory, 
                                                   >> 194             G4bool          ascii = false);
                                                   >> 195 
                                                   >> 196   // check stored materialCutsCouple is consistent with the current detector setup. 
                                                   >> 197   virtual G4bool  CheckMaterialCutsCoupleInfo(const G4String& directory, 
                                                   >> 198             G4bool          ascii = false);
                                                   >> 199 
                                                   >> 200   // Store cut values information in files under the specified directory.
                                                   >> 201   virtual G4bool  StoreCutsInfo(const G4String& directory, 
                                                   >> 202                                 G4bool          ascii = false);
                                                   >> 203   
                                                   >> 204  // Retrieve cut values information in files under the specified directory.
                                                   >> 205   virtual G4bool  RetrieveCutsInfo(const G4String& directory,
                                                   >> 206                                    G4bool          ascii = false);
216                                                   207 
217     G4MCCIndexConversionTable mccConversionTab << 208   private:
                                                   >> 209    G4bool firstUse;
                                                   >> 210    enum { FixedStringLengthForStore = 32 }; 
218                                                   211 
219     // These two vectors are for backward comp << 212   public: // with description  
220     G4double* rangeDoubleVector[NumberOfG4CutI << 213       void  SetVerboseLevel(G4int value);
221     G4double* energyDoubleVector[NumberOfG4Cut << 214       G4int GetVerboseLevel() const;
                                                   >> 215       // controle flag for output message
                                                   >> 216       //  0: Silent
                                                   >> 217       //  1: Warning message
                                                   >> 218       //  2: More
222                                                   219 
223     enum { FixedStringLengthForStore = 32 };   << 220   private:
                                                   >> 221    G4int verboseLevel;
224                                                   222 
225     G4ProductionCutsTableMessenger* fMessenger << 
226     G4int verboseLevel = 1;                    << 
227     G4bool firstUse = true;                    << 
228 };                                                223 };
229                                                   224 
230 // ------------------                          << 
231 // Inline methods                              << 
232 // ------------------                          << 
233                                                << 
234 inline                                            225 inline 
235 const std::vector<G4double>*                   << 226  const std::vector<G4double>* G4ProductionCutsTable::GetRangeCutsVector(size_t pcIdx) const
236 G4ProductionCutsTable::GetRangeCutsVector(std: << 
237 {                                                 227 { 
238   return rangeCutTable[pcIdx];                    228   return rangeCutTable[pcIdx]; 
239 }                                                 229 }
240                                                   230 
241 inline                                            231 inline 
242 const std::vector<G4double>*                   << 232  const std::vector<G4double>* G4ProductionCutsTable::GetEnergyCutsVector(size_t pcIdx) const
243 G4ProductionCutsTable::GetEnergyCutsVector(std << 
244 {                                                 233 {
245   return energyCutTable[pcIdx];                << 234  return energyCutTable[pcIdx]; 
246 }                                                 235 }
247                                                   236 
248 inline                                            237 inline 
249 std::size_t G4ProductionCutsTable::GetTableSiz << 238  size_t G4ProductionCutsTable::GetTableSize() const
250 {                                                 239 {
251   return coupleTable.size();                      240   return coupleTable.size(); 
252 }                                                 241 }
253                                                   242 
254 inline                                            243 inline 
255 const G4MaterialCutsCouple*                    << 244  const G4MaterialCutsCouple* G4ProductionCutsTable::GetMaterialCutsCouple(G4int i) const
256 G4ProductionCutsTable::GetMaterialCutsCouple(G << 
257 {                                                 245 { 
258   return coupleTable[std::size_t(i)];          << 246   return coupleTable[size_t(i)]; 
259 }                                                 247 }
260                                                   248 
261 inline                                            249 inline 
262 G4bool G4ProductionCutsTable::IsModified() con << 250  G4bool G4ProductionCutsTable::IsModified() const
263 {                                                 251 { 
264   if(firstUse) return true;                       252   if(firstUse) return true;
265   for(auto itr=coupleTable.cbegin(); itr!=coup << 253   for(G4ProductionCutsTable::CoupleTableIterator itr=coupleTable.begin();
266   {                                            << 254     itr!=coupleTable.end();itr++){ 
267     if((*itr)->IsRecalcNeeded())                  255     if((*itr)->IsRecalcNeeded())
268     {                                             256     {
269       return true;                                257       return true; 
270     }                                             258     }
271   }                                               259   }
272   return false;                                   260   return false;
273 }                                                 261 }
274                                                   262   
275 inline                                            263 inline 
276 void G4ProductionCutsTable::PhysicsTableUpdate << 264  void G4ProductionCutsTable::PhysicsTableUpdated()
277 {                                                 265 { 
278   for(auto itr=coupleTable.cbegin(); itr!=coup << 266   for(G4ProductionCutsTable::CoupleTableIterator itr=coupleTable.begin();itr!=coupleTable.end();itr++){ 
279   {                                            << 
280     (*itr)->PhysicsTableUpdated();                267     (*itr)->PhysicsTableUpdated(); 
281   }                                               268   }
282 }                                                 269 }
283                                                   270 
284 inline                                            271 inline
285 G4double*                                      << 272  G4double* G4ProductionCutsTable::GetRangeCutsDoubleVector(size_t pcIdx) const
286 G4ProductionCutsTable::GetRangeCutsDoubleVecto << 273 { return rangeDoubleVector[pcIdx]; }
287 {                                              << 
288   return rangeDoubleVector[pcIdx];             << 
289 }                                              << 
290                                                   274 
291 inline                                            275 inline
292 G4double*                                      << 276  G4double* G4ProductionCutsTable::GetEnergyCutsDoubleVector(size_t pcIdx) const
293 G4ProductionCutsTable::GetEnergyCutsDoubleVect << 277 { return energyDoubleVector[pcIdx]; }
294 {                                              << 
295   return energyDoubleVector[pcIdx];            << 
296 }                                              << 
297                                                   278 
298 inline                                            279 inline
299 G4ProductionCuts* G4ProductionCutsTable::GetDe << 280  G4ProductionCuts* G4ProductionCutsTable::GetDefaultProductionCuts() const
300 {                                              << 281 { return defaultProductionCuts; }
301   return defaultProductionCuts;                << 
302 }                                              << 
303                                                   282 
304 inline                                            283 inline
305 G4bool G4ProductionCutsTable::IsCoupleUsedInTh << 284 bool G4ProductionCutsTable::IsCoupleUsedInTheRegion(
306                                  const G4Mater    285                                  const G4MaterialCutsCouple* aCouple,
307                                  const G4Regio    286                                  const G4Region* aRegion) const
308 {                                                 287 {
309   G4ProductionCuts* fProductionCut = aRegion->    288   G4ProductionCuts* fProductionCut = aRegion->GetProductionCuts();
310   auto mItr = aRegion->GetMaterialIterator();  << 289   std::vector<G4Material*>::const_iterator mItr = aRegion->GetMaterialIterator();
311   std::size_t nMaterial = aRegion->GetNumberOf << 290   size_t nMaterial = aRegion->GetNumberOfMaterials();
312   for(std::size_t iMate=0;iMate<nMaterial; ++i << 291   for(size_t iMate=0;iMate<nMaterial;iMate++, mItr++){
313   {                                            << 
314     if(aCouple->GetMaterial()==(*mItr) &&         292     if(aCouple->GetMaterial()==(*mItr) &&
315        aCouple->GetProductionCuts()==fProducti << 293        aCouple->GetProductionCuts()==fProductionCut){
316     {                                          << 
317       return true;                                294       return true;
318     }                                             295     }
319   }                                               296   }
320   return false;                                   297   return false;
321 }                                                 298 }
322                                                   299 
323 inline                                            300 inline
324 const G4MaterialCutsCouple*                       301 const G4MaterialCutsCouple* 
325 G4ProductionCutsTable::GetMaterialCutsCouple(c << 302      G4ProductionCutsTable::GetMaterialCutsCouple(const G4Material* aMat,
326                                              c << 303                            const G4ProductionCuts* aCut) const
327 {                                              << 304 { 
328   for(auto cItr=coupleTable.cbegin(); cItr!=co << 305   for(CoupleTableIterator cItr=coupleTable.begin();cItr!=coupleTable.end();cItr++)
329   {                                               306   { 
330     if((*cItr)->GetMaterial()!=aMat) continue;    307     if((*cItr)->GetMaterial()!=aMat) continue;
331     if((*cItr)->GetProductionCuts()==aCut) ret    308     if((*cItr)->GetProductionCuts()==aCut) return (*cItr);
332   }                                               309   }
333   return nullptr;                              << 310   return 0;
334 }                                                 311 }
335                                                   312 
336 inline                                            313 inline
337 G4int                                          << 314 G4int G4ProductionCutsTable::GetCoupleIndex(const G4MaterialCutsCouple* aCouple) const
338 G4ProductionCutsTable::GetCoupleIndex(const G4 << 
339 {                                                 315 { 
340   G4int idx = 0;                                  316   G4int idx = 0;
341   for(auto cItr=coupleTable.cbegin(); cItr!=co << 317   for(CoupleTableIterator cItr=coupleTable.begin();cItr!=coupleTable.end();cItr++)
342   {                                               318   {
343     if((*cItr)==aCouple) return idx;              319     if((*cItr)==aCouple) return idx;
344     ++idx;                                     << 320     idx++;
345   }                                               321   }
346   return -1;                                      322   return -1;
347 }                                                 323 }
348                                                   324 
349 inline                                            325 inline
350 G4int G4ProductionCutsTable::GetCoupleIndex(co << 326 G4int G4ProductionCutsTable:: GetCoupleIndex(const G4Material* aMat,
351                                             co << 327                            const G4ProductionCuts* aCut) const
352 {                                                 328 {
353   const G4MaterialCutsCouple* aCouple = GetMat    329   const G4MaterialCutsCouple* aCouple = GetMaterialCutsCouple(aMat,aCut);
354   return GetCoupleIndex(aCouple);                 330   return GetCoupleIndex(aCouple);
355 }                                                 331 }
356                                                   332 
357 inline                                            333 inline 
358 G4int G4ProductionCutsTable::GetVerboseLevel() << 334  void G4ProductionCutsTable::SetVerboseLevel(G4int value)
359 {                                                 335 {
360   return verboseLevel;                         << 336    verboseLevel = value;
                                                   >> 337 }
                                                   >> 338 
                                                   >> 339 inline 
                                                   >> 340  G4int G4ProductionCutsTable::GetVerboseLevel() const
                                                   >> 341 {
                                                   >> 342    return verboseLevel;
361 }                                                 343 }
362                                                   344 
363 inline                                            345 inline
364 const G4MCCIndexConversionTable*               << 346  const G4MCCIndexConversionTable* 
365 G4ProductionCutsTable::GetMCCIndexConversionTa << 347    G4ProductionCutsTable::GetMCCIndexConversionTable() const
366 {                                                 348 {
367   return &mccConversionTable;                     349   return &mccConversionTable;
368 }                                                 350 }
369                                                   351 
370 #endif                                            352 #endif
                                                   >> 353 
                                                   >> 354 
                                                   >> 355 
                                                   >> 356 
                                                   >> 357 
                                                   >> 358 
371                                                   359