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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/G4MaterialCutsCouple.hh (Version 11.3.0) and /processes/cuts/include/G4MaterialCutsCouple.hh (Version 10.4.p3)


  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 // G4MaterialCutsCouple                        << 
 27 //                                                 26 //
 28 // Class description:                          <<  27 // $Id$
 29 //                                                 28 //
 30 // The same material can be used in regions wi <<  29 // 
 31 // and physics processes must prepare several  <<  30 // ------------------------------------------------------------
 32 // for that material.                          <<  31 //  GEANT 4 class header file 
 33 // The G4ProductionCutsTable has G4MaterialCut <<  32 //
 34 // which consists of a material paired with a  <<  33 //
 35 // G4MaterialCutsCouples objects are numbered  <<  34 // Class Description
 36 // same as the index of a G4PhysicsVector for  <<  35 //  This class is 
 37 // G4MaterialCutsCouple in the G4PhysicsTable. <<  36 //
 38 // The list of G4MaterialCutsCouple objects us <<  37 // ------------------------------------------------------------
 39 // is updated before starting the event loop i <<  38 //   First Implementation          17 Sep. 2002  H.Kurahige
 40                                                <<  39 // ------------------------------------------------------------
 41 // Author: H.Kurashige, 17 September 2002 - Fi <<  40 
 42 // ------------------------------------------- <<  41 #ifndef G4MaterialCutsCouple_h 
 43 #ifndef G4MaterialCutsCouple_hh                <<  42 #define G4MaterialCutsCouple_h 1
 44 #define G4MaterialCutsCouple_hh 1              << 
 45                                                    43 
 46 #include "globals.hh"                              44 #include "globals.hh"
 47 #include "G4ios.hh"                                45 #include "G4ios.hh"
 48 #include "G4ProductionCuts.hh"                 << 
 49                                                    46 
 50 class G4Material;                                  47 class G4Material;
                                                   >>  48 #include "G4ProductionCuts.hh"
 51                                                    49 
 52 class G4MaterialCutsCouple                         50 class G4MaterialCutsCouple  
 53 {                                                  51 {
 54   public:                                      <<  52   public: // with description
                                                   >>  53   //  constructor 
                                                   >>  54   G4MaterialCutsCouple();
                                                   >>  55   G4MaterialCutsCouple(const G4Material*, G4ProductionCuts* cut=0);
 55                                                    56 
 56     G4MaterialCutsCouple();                    <<  57   //  copy constructor 
 57     G4MaterialCutsCouple(const G4Material*, G4 <<  58   G4MaterialCutsCouple(const G4MaterialCutsCouple &right);
 58       // Constructors                          << 
 59                                                    59 
 60     virtual ~G4MaterialCutsCouple();           <<  60   G4MaterialCutsCouple & operator=(const G4MaterialCutsCouple &right);
 61       // Destructor                            << 
 62                                                    61 
 63     G4MaterialCutsCouple(const G4MaterialCutsC <<  62   public: 
 64     G4MaterialCutsCouple& operator=(const G4Ma <<  63   //  destructor 
 65       // Copy constructor & assignment operato <<  64   virtual ~G4MaterialCutsCouple();
 66                                                    65 
 67     G4bool operator==(const G4MaterialCutsCoup <<  66   // equal opperators
 68     G4bool operator!=(const G4MaterialCutsCoup <<  67   G4int operator==(const G4MaterialCutsCouple &right) const;
 69       // Equality operators                    <<  68   G4int operator!=(const G4MaterialCutsCouple &right) const;
 70                                                    69 
 71     void SetMaterial(const G4Material*);       <<  70   public: // with description
 72       // Set pointer to material               <<  71   void              SetMaterial(const G4Material*);
                                                   >>  72   // Set pointer to material
 73                                                    73 
 74     const G4Material* GetMaterial() const;     <<  74   const G4Material* GetMaterial() const;
 75       // Get pointer to material               <<  75   // Get pointer to material
 76                                                    76 
 77     void SetProductionCuts(G4ProductionCuts*); <<  77   void              SetProductionCuts(G4ProductionCuts*);
 78       // Set pointer to production cuts        <<  78   // Set pointer to production cuts
 79                                                    79 
 80     G4ProductionCuts* GetProductionCuts() cons <<  80   G4ProductionCuts* GetProductionCuts() const;
 81       // Get pointer to production cuts        <<  81   // Get pointer to production cuts
 82                                                    82 
 83     G4bool IsRecalcNeeded() const;             <<  83   G4bool           IsRecalcNeeded() const;
 84       // Return true if cut and/or material ha <<  84   // return true if cut and/or material has been modified 
 85       // after last calculation of PhysicsTabl <<  85   // after last calculation of PhysicsTable          
 86                                                    86 
 87     void PhysicsTableUpdated();                <<  87   void             PhysicsTableUpdated();
 88       // Inform end of calculation of Physics  <<  88   // inform end of calculation of PhysicsTable  
 89                                                    89 
 90     void SetIndex(G4int idx);                  <<  90   void             SetIndex(G4int idx);
 91     G4int GetIndex() const;                    <<  91   G4int            GetIndex() const;
 92       // Set/Get the index number in G4Product <<  92   // Set/Get the index number in G4ProductionCutsTable
 93                                                    93 
 94     void SetUseFlag(G4bool flg = true);        <<  94   void             SetUseFlag(G4bool flg=true);
 95     G4bool IsUsed() const;                     <<  95   G4bool           IsUsed() const;
 96                                                    96  
 97   private:                                         97   private:
 98                                                <<  98   G4bool                   isMaterialModified;
 99     G4bool            isMaterialModified = fal <<  99   const G4Material*        fMaterial;
100     const G4Material* fMaterial = nullptr;     << 100   G4ProductionCuts*        fCuts;
101     G4ProductionCuts* fCuts = nullptr;         << 101   G4int                    indexNumber;
102     G4int             indexNumber = -1;        << 102   G4bool                   isUsedInGeometry;
103     G4bool            isUsedInGeometry = false << 
104 };                                                103 };
105                                                   104 
106 // ------------------                          << 105 #include "G4ProductionCuts.hh"
107 // Inline methods                              << 
108 // ------------------                          << 
109                                                << 
110 inline                                            106 inline 
111 void G4MaterialCutsCouple::SetIndex(G4int idx) << 107  void G4MaterialCutsCouple::SetIndex(G4int idx)
112 {                                              << 108 { indexNumber = idx; }
113   indexNumber = idx;                           << 
114 }                                              << 
115                                                   109 
116 inline                                            110 inline
117 G4int G4MaterialCutsCouple::GetIndex() const   << 111  G4int G4MaterialCutsCouple::GetIndex() const
118 {                                              << 112 { return indexNumber; }
119   return indexNumber;                          << 
120 }                                              << 
121                                                   113 
122 inline                                            114 inline 
123 void G4MaterialCutsCouple::SetUseFlag(G4bool f << 115  void G4MaterialCutsCouple::SetUseFlag(G4bool flg)
124 {                                              << 116 { isUsedInGeometry = flg; }
125   isUsedInGeometry = flg;                      << 
126 }                                              << 
127                                                   117 
128 inline                                            118 inline
129 G4bool G4MaterialCutsCouple::IsUsed() const    << 119  G4bool G4MaterialCutsCouple::IsUsed() const
130 {                                              << 120 { return isUsedInGeometry; }
131   return isUsedInGeometry;                     << 
132 }                                              << 
133                                                   121 
134 inline                                            122 inline
135 void G4MaterialCutsCouple::SetProductionCuts(G << 123  void G4MaterialCutsCouple::SetProductionCuts(G4ProductionCuts* aCut)
136 {                                              << 124 { fCuts = aCut; }
137   fCuts = aCut;                                << 
138 }                                              << 
139                                                   125 
140 inline                                            126 inline
141 G4ProductionCuts* G4MaterialCutsCouple::GetPro << 127  G4ProductionCuts* G4MaterialCutsCouple::GetProductionCuts() const
142 {                                              << 128 { return fCuts; }
143   return fCuts;                                << 
144 }                                              << 
145                                                   129 
146 inline                                            130 inline
147 G4bool G4MaterialCutsCouple::operator==(const  << 131  G4int G4MaterialCutsCouple::operator==(const G4MaterialCutsCouple &right) const
148 {                                                 132 {
149   return (this == &right);                        133   return (this == &right);
150 }                                                 134 }
151                                                   135 
152 inline                                            136 inline
153 G4bool G4MaterialCutsCouple::operator!=(const  << 137  G4int G4MaterialCutsCouple::operator!=(const G4MaterialCutsCouple &right) const
154 {                                                 138 {
155   return (this !=  &right);                       139   return (this !=  &right);
156 }                                                 140 }
157                                                   141 
158 inline                                            142 inline
159 void  G4MaterialCutsCouple::SetMaterial(const  << 143   void  G4MaterialCutsCouple::SetMaterial(const G4Material* material)
160 {                                                 144 {
161   fMaterial = material;                           145   fMaterial = material;
162   isMaterialModified = true;                      146   isMaterialModified = true;
163 }                                                 147 }
164                                                   148 
165 inline                                            149 inline
166 const G4Material* G4MaterialCutsCouple::GetMat << 150   const G4Material* G4MaterialCutsCouple::GetMaterial() const
167 {                                                 151 {
168   return fMaterial;                               152   return fMaterial;
169 }                                                 153 }
170                                                   154 
171 inline                                            155 inline
172 G4bool  G4MaterialCutsCouple::IsRecalcNeeded()    156 G4bool  G4MaterialCutsCouple::IsRecalcNeeded() const
173 {                                                 157 {
174   G4bool isCutModified = false;                   158   G4bool isCutModified = false;
175   if (fCuts != nullptr ) isCutModified = fCuts << 159   if (fCuts !=0 ) isCutModified = fCuts->IsModified();
176   return (isMaterialModified || isCutModified)    160   return (isMaterialModified || isCutModified);
177 }                                                 161 }
178                                                   162 
179 inline                                            163 inline
180 void G4MaterialCutsCouple::PhysicsTableUpdated << 164 void   G4MaterialCutsCouple::PhysicsTableUpdated()
181 {                                                 165 {
182   if (fCuts != nullptr ) fCuts->PhysicsTableUp << 166   if (fCuts !=0 ) fCuts->PhysicsTableUpdated();
183   isMaterialModified = false;                     167   isMaterialModified = false;
184 }                                                 168 }
185                                                   169 
                                                   >> 170 
186 #endif                                            171 #endif
                                                   >> 172 
                                                   >> 173 
                                                   >> 174 
                                                   >> 175 
                                                   >> 176 
                                                   >> 177 
187                                                   178