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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 /geometry/management/include/G4Region.icc (Version 11.3.0) and /geometry/management/include/G4Region.icc (Version 5.1)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                    <<   3 // * DISCLAIMER                                                       *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th <<   5 // * The following disclaimer summarizes all the specific disclaimers *
  6 // * the Geant4 Collaboration.  It is provided <<   6 // * of contributors to this software. The specific disclaimers,which *
  7 // * conditions of the Geant4 Software License <<   7 // * govern, are listed with their locations in:                      *
  8 // * LICENSE and available at  http://cern.ch/ <<   8 // *   http://cern.ch/geant4/license                                  *
  9 // * include a list of copyright holders.      << 
 10 // *                                                9 // *                                                                  *
 11 // * Neither the authors of this software syst     10 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     11 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     12 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     13 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file  <<  14 // * use.                                                             *
 16 // * for the full disclaimer and the limitatio << 
 17 // *                                               15 // *                                                                  *
 18 // * This  code  implementation is the result  <<  16 // * This  code  implementation is the  intellectual property  of the *
 19 // * technical work of the GEANT4 collaboratio <<  17 // * GEANT4 collaboration.                                            *
 20 // * By using,  copying,  modifying or  distri <<  18 // * By copying,  distributing  or modifying the Program (or any work *
 21 // * any work based  on the software)  you  ag <<  19 // * based  on  the Program)  you indicate  your  acceptance of  this *
 22 // * use  in  resulting  scientific  publicati <<  20 // * statement, and all its terms.                                    *
 23 // * acceptance of all terms of the Geant4 Sof << 
 24 // *******************************************     21 // ********************************************************************
                                                   >>  22 //
                                                   >>  23 //
                                                   >>  24 // $Id: G4Region.icc,v 1.3 2002/12/16 14:03:25 gcosmo Exp $
                                                   >>  25 // GEANT4 tag $Name: geant4-05-01 $
                                                   >>  26 //
 25 //                                                 27 // 
 26 // G4Region inline implementation              <<  28 // class G4Region Inline Implementation file
 27 //                                                 29 //
 28 // 19.09.02, G.Cosmo - Created                 <<  30 // 19.09.02 - G.Cosmo: Created
 29 // ------------------------------------------- <<  31 // ********************************************************************
 30                                                    32 
 31 // *******************************************     33 // ********************************************************************
 32 // Equality operator, defined by address only      34 // Equality operator, defined by address only
 33 // *******************************************     35 // ********************************************************************
 34 //                                                 36 //
 35 inline                                             37 inline
 36 G4bool G4Region::operator==(const G4Region& rg     38 G4bool G4Region::operator==(const G4Region& rg) const
 37 {                                                  39 {
 38   return this==&rg;                            <<  40   return (this==&rg) ? true : false;
 39 }                                                  41 }
 40                                                    42 
 41 // *******************************************     43 // ********************************************************************
 42 // GetInstanceID                               <<  44 // GetName
 43 // *******************************************     45 // ********************************************************************
 44 //                                                 46 //
 45 inline                                             47 inline
 46 G4int G4Region::GetInstanceID() const          <<  48 const G4String& G4Region::GetName() const
 47 {                                                  49 {
 48   return instanceID;                           <<  50   return fName;
 49 }                                                  51 }
 50                                                    52     
 51 // *******************************************     53 // ********************************************************************
 52 // GetName                                     <<  54 // SetName
 53 // *******************************************     55 // ********************************************************************
 54 //                                                 56 //
 55 inline                                             57 inline
 56 const G4String& G4Region::GetName() const      <<  58 void G4Region::SetName(const G4String& pName)
 57 {                                                  59 {
 58   return fName;                                <<  60   fName = pName;
 59 }                                                  61 }
 60                                                <<  62 
 61 // *******************************************     63 // ********************************************************************
 62 // RegionModified                                  64 // RegionModified
 63 // *******************************************     65 // ********************************************************************
 64 //                                                 66 //
 65 inline                                             67 inline
 66 void G4Region::RegionModified(G4bool flag)         68 void G4Region::RegionModified(G4bool flag)
 67 {                                                  69 {
 68   fRegionMod = flag;                               70   fRegionMod = flag;
 69 }                                                  71 }
 70                                                    72 
 71 // *******************************************     73 // ********************************************************************
 72 // IsModified                                      74 // IsModified
 73 // *******************************************     75 // ********************************************************************
 74 //                                                 76 //
 75 inline                                             77 inline
 76 G4bool G4Region::IsModified() const                78 G4bool G4Region::IsModified() const
 77 {                                                  79 {
 78   return fRegionMod;                               80   return fRegionMod;
 79 }                                                  81 }
 80                                                    82 
 81 // *******************************************     83 // ********************************************************************
 82 // SetProductionCuts                               84 // SetProductionCuts
 83 // *******************************************     85 // ********************************************************************
 84 //                                                 86 //
 85 inline                                             87 inline
 86 void G4Region::SetProductionCuts(G4ProductionC     88 void G4Region::SetProductionCuts(G4ProductionCuts* cut)
 87 {                                                  89 {
 88   fCut = cut;                                      90   fCut = cut;
 89   fRegionMod = true;                               91   fRegionMod = true;
 90 }                                                  92 }
 91                                                    93 
 92 // *******************************************     94 // ********************************************************************
 93 // GetProductionCuts                               95 // GetProductionCuts
 94 // *******************************************     96 // ********************************************************************
 95 //                                                 97 //
 96 inline                                             98 inline
 97 G4ProductionCuts* G4Region::GetProductionCuts(     99 G4ProductionCuts* G4Region::GetProductionCuts() const
 98 {                                                 100 {
 99   return fCut;                                    101   return fCut;
100 }                                                 102 }
101                                                   103 
102 // *******************************************    104 // ********************************************************************
103 // GetLogicalVolumeIterator                       105 // GetLogicalVolumeIterator
104 // *******************************************    106 // ********************************************************************
105 //                                                107 //
106 inline                                            108 inline
107 std::vector<G4LogicalVolume*>::iterator        << 109 G4std::vector<G4LogicalVolume*>::iterator
108 G4Region::GetRootLogicalVolumeIterator()          110 G4Region::GetRootLogicalVolumeIterator()
109 {                                                 111 {
110   return G4RootLVList::iterator(fRootVolumes.b << 112   G4RootLVList::iterator iterator =  G4RootLVList::iterator(fRootVolumes.begin());
                                                   >> 113   return iterator;
111 }                                                 114 }
112                                                   115 
113 // *******************************************    116 // ********************************************************************
114 // GetMaterialIterator                            117 // GetMaterialIterator
115 // *******************************************    118 // ********************************************************************
116 //                                                119 //
117 inline                                            120 inline
118 std::vector<G4Material*>::const_iterator       << 121 G4std::vector<G4Material*>::const_iterator
119 G4Region::GetMaterialIterator() const             122 G4Region::GetMaterialIterator() const
120 {                                                 123 {
121   return fMaterials.cbegin();                  << 124   G4MaterialList::const_iterator iterator = fMaterials.begin();
                                                   >> 125   return iterator;
122 }                                                 126 }
123                                                   127 
124 // *******************************************    128 // ********************************************************************
125 // GetNumberOfMaterials                           129 // GetNumberOfMaterials
126 // *******************************************    130 // ********************************************************************
127 //                                                131 //
128 inline                                            132 inline
129 size_t G4Region::GetNumberOfMaterials() const     133 size_t G4Region::GetNumberOfMaterials() const
130 {                                                 134 {
131   return fMaterials.size();                       135   return fMaterials.size();
132 }                                                 136 }
133                                                   137 
134 // *******************************************    138 // ********************************************************************
135 // GetNumberOfRootVolumes                         139 // GetNumberOfRootVolumes
136 // *******************************************    140 // ********************************************************************
137 //                                                141 //
138 inline                                            142 inline
139 size_t G4Region::GetNumberOfRootVolumes() cons    143 size_t G4Region::GetNumberOfRootVolumes() const
140 {                                                 144 {
141   return fRootVolumes.size();                     145   return fRootVolumes.size();
142 }                                              << 
143                                                << 
144 // ******************************************* << 
145 // SetUserInformation                          << 
146 // ******************************************* << 
147 //                                             << 
148 inline                                         << 
149 void G4Region::SetUserInformation(G4VUserRegio << 
150 {                                              << 
151   fUserInfo = ui;                              << 
152 }                                              << 
153                                                << 
154 // ******************************************* << 
155 // GetUserInformation                          << 
156 // ******************************************* << 
157 //                                             << 
158 inline                                         << 
159 G4VUserRegionInformation* G4Region::GetUserInf << 
160 {                                              << 
161   return fUserInfo;                            << 
162 }                                              << 
163                                                << 
164 // ******************************************* << 
165 // SetUserLimits                               << 
166 // ******************************************* << 
167 //                                             << 
168 inline                                         << 
169 void G4Region::SetUserLimits(G4UserLimits* ul) << 
170 {                                              << 
171   fUserLimits = ul;                            << 
172 }                                              << 
173                                                << 
174 // ******************************************* << 
175 // GetUserLimits                               << 
176 // ******************************************* << 
177 //                                             << 
178 inline                                         << 
179 G4UserLimits* G4Region::GetUserLimits() const  << 
180 {                                              << 
181   return fUserLimits;                          << 
182 }                                              << 
183                                                << 
184 // ******************************************* << 
185 // ClearMap                                    << 
186 // ******************************************* << 
187 //                                             << 
188 inline                                         << 
189 void G4Region::ClearMap()                      << 
190 {                                              << 
191   if(!(fMaterialCoupleMap.empty()))            << 
192   {                                            << 
193     auto b = fMaterialCoupleMap.cbegin();      << 
194     auto e = fMaterialCoupleMap.cend();        << 
195     fMaterialCoupleMap.erase(b,e);             << 
196   }                                            << 
197 }                                              << 
198                                                << 
199 // ******************************************* << 
200 // RegisterMateralCouplePair                   << 
201 // ******************************************* << 
202 //                                             << 
203 inline                                         << 
204 void G4Region::RegisterMaterialCouplePair(G4Ma << 
205                                           G4Ma << 
206 {                                              << 
207   fMaterialCoupleMap.insert(G4MaterialCouplePa << 
208 }                                              << 
209                                                << 
210 // ******************************************* << 
211 // FindCouple                                  << 
212 // ******************************************* << 
213 //                                             << 
214 inline                                         << 
215 G4MaterialCutsCouple* G4Region::FindCouple(G4M << 
216 {                                              << 
217   auto c = fMaterialCoupleMap.find(mat);       << 
218   G4MaterialCutsCouple* couple = nullptr;      << 
219   if(c!=fMaterialCoupleMap.cend()) couple = (* << 
220   return couple;                               << 
221 }                                              << 
222                                                << 
223 // ******************************************* << 
224 // GetFieldManager                             << 
225 // ******************************************* << 
226 //                                             << 
227 inline                                         << 
228 G4FieldManager* G4Region::GetFieldManager() co << 
229 {                                              << 
230   return fFieldManager;                        << 
231 }                                              << 
232                                                << 
233 // ******************************************* << 
234 // SetFieldManager                             << 
235 // ******************************************* << 
236 //                                             << 
237 inline                                         << 
238 void G4Region::SetFieldManager(G4FieldManager* << 
239 {                                              << 
240   fFieldManager = fm;                          << 
241 }                                              << 
242                                                << 
243 // ******************************************* << 
244 // GetWorldPhysical                            << 
245 // ******************************************* << 
246 //                                             << 
247 inline                                         << 
248 G4VPhysicalVolume* G4Region::GetWorldPhysical( << 
249 {                                              << 
250   return fWorldPhys;                           << 
251 }                                              << 
252                                                << 
253 // ******************************************* << 
254 // AddMaterial                                 << 
255 // ******************************************* << 
256 //                                             << 
257 inline                                         << 
258 void G4Region::AddMaterial(G4Material* aMateri << 
259 {                                              << 
260   auto pos = std::find(fMaterials.cbegin(),fMa << 
261   if (pos == fMaterials.cend())                << 
262   {                                            << 
263     fMaterials.push_back(aMaterial);           << 
264     fRegionMod = true;                         << 
265   }                                            << 
266 }                                              << 
267                                                << 
268 // ******************************************* << 
269 // UsedInMassGeometry                          << 
270 // ******************************************* << 
271 //                                             << 
272 inline                                         << 
273 void G4Region::UsedInMassGeometry(G4bool val)  << 
274 {                                              << 
275   fInMassGeometry = val;                       << 
276 }                                              << 
277                                                << 
278 // ******************************************* << 
279 // UsedInParallelGeometry                      << 
280 // ******************************************* << 
281 //                                             << 
282 inline                                         << 
283 void G4Region::UsedInParallelGeometry(G4bool v << 
284 {                                              << 
285   fInParallelGeometry = val;                   << 
286 }                                              << 
287                                                << 
288 // ******************************************* << 
289 // IsInMassGeometry                            << 
290 // ******************************************* << 
291 //                                             << 
292 inline                                         << 
293 G4bool G4Region::IsInMassGeometry() const      << 
294 {                                              << 
295   return fInMassGeometry;                      << 
296 }                                              << 
297                                                << 
298 // ******************************************* << 
299 // IsInParallelGeometry                        << 
300 // ******************************************* << 
301 //                                             << 
302 inline                                         << 
303 G4bool G4Region::IsInParallelGeometry() const  << 
304 {                                              << 
305   return fInParallelGeometry;                  << 
306 }                                                 146 }
307                                                   147