Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/geometry/management/include/G4LogicalVolume.icc

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 /geometry/management/include/G4LogicalVolume.icc (Version 11.3.0) and /geometry/management/include/G4LogicalVolume.icc (Version 9.6.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 //
                                                   >>  26 //
                                                   >>  27 // $Id$
                                                   >>  28 //
 25 //                                                 29 // 
 26 // class G4LogicalVolume inline implementation <<  30 // class G4LogicalVolume Inline Implementation file
 27 //                                                 31 //
 28 // 15.01.13 - G.Cosmo, A.Dotti: Modified for t <<  32 // 10.20.97 - P. MoraDeFreitas : Added SetFastSimulation method.
 29 // 10.20.97 - P. MoraDeFreitas : Added SetFast << 
 30 // 05.11.98 - M. Verderi: Add Get/Set methods      33 // 05.11.98 - M. Verderi: Add Get/Set methods for fBiasWeight
 31 // 09.11.98 - J.Apostolakis:  Changed Magnetic <<  34 // 09.11.98 - J. Apostolakis:  Changed MagneticField to FieldManager
 32 // 12.02.99 - S.Giani: Added set/get methods f     35 // 12.02.99 - S.Giani: Added set/get methods for voxelization quality
 33 // 18.04.01 - G.Cosmo: Migrated to STL vector      36 // 18.04.01 - G.Cosmo: Migrated to STL vector
 34 // 17.05.02 - G.Cosmo: Added IsToOptimise() me     37 // 17.05.02 - G.Cosmo: Added IsToOptimise() method
 35 // -------------------------------------------     38 // --------------------------------------------------------------------
 36                                                    39 
 37 // *******************************************     40 // ********************************************************************
 38 // GetName                                         41 // GetName
 39 // *******************************************     42 // ********************************************************************
 40 //                                                 43 //
 41 inline                                             44 inline
 42 const G4String& G4LogicalVolume::GetName() con <<  45 G4String G4LogicalVolume::GetName() const
 43 {                                                  46 {
 44   return fName;                                    47   return fName;
 45 }                                                  48 }
 46                                                    49     
 47 // *******************************************     50 // ********************************************************************
 48 // GetInstanceID                               <<  51 // SetName
 49 // *******************************************     52 // ********************************************************************
 50 //                                                 53 //
 51 inline                                             54 inline
 52 G4int G4LogicalVolume::GetInstanceID() const   <<  55 void G4LogicalVolume::SetName(const G4String& pName)
 53 {                                                  56 {
 54   return instanceID;                           <<  57   fName = pName;
 55 }                                                  58 }
 56                                                    59 
 57 // *******************************************     60 // ********************************************************************
 58 // GetMasterFieldManager                       <<  61 // GetFieldManager
 59 // *******************************************     62 // ********************************************************************
 60 //                                                 63 //
 61 inline                                             64 inline
 62 G4FieldManager* G4LogicalVolume::GetMasterFiel <<  65 G4FieldManager* G4LogicalVolume::GetFieldManager() const
 63 {                                                  66 {
 64   return fFieldManager;                            67   return fFieldManager;
 65 }                                                  68 }
 66                                                    69 
 67 // *******************************************     70 // ********************************************************************
 68 // GetNoDaughters                                  71 // GetNoDaughters
 69 // *******************************************     72 // ********************************************************************
 70 //                                                 73 //
 71 inline                                             74 inline
 72 std::size_t G4LogicalVolume::GetNoDaughters()  <<  75 G4int G4LogicalVolume::GetNoDaughters() const
 73 {                                                  76 {
 74   return fDaughters.size();                        77   return fDaughters.size();
 75 }                                                  78 }
 76                                                    79 
 77 // *******************************************     80 // ********************************************************************
 78 // GetDaughter                                     81 // GetDaughter
 79 // *******************************************     82 // ********************************************************************
 80 //                                                 83 //
 81 inline                                             84 inline
 82 G4VPhysicalVolume* G4LogicalVolume::GetDaughte <<  85 G4VPhysicalVolume* G4LogicalVolume::GetDaughter(const G4int i) const
 83 {                                                  86 {
 84   return fDaughters[i];                            87   return fDaughters[i];
 85 }                                                  88 }
 86                                                    89 
 87 // *******************************************     90 // ********************************************************************
 88 // GetFastSimulationManager                        91 // GetFastSimulationManager
 89 // *******************************************     92 // ********************************************************************
 90 //                                                 93 //
 91 inline                                             94 inline
 92 G4FastSimulationManager* G4LogicalVolume::GetF     95 G4FastSimulationManager* G4LogicalVolume::GetFastSimulationManager () const 
 93 {                                                  96 {
 94   G4FastSimulationManager* fFSM = nullptr;     <<  97   G4FastSimulationManager* fFSM = 0;
 95   if(fRegion != nullptr) fFSM = fRegion->GetFa <<  98   if(fRegion) fFSM = fRegion->GetFastSimulationManager();
 96   return fFSM;                                     99   return fFSM;
 97 }                                                 100 }
 98                                                   101 
 99 // *******************************************    102 // ********************************************************************
                                                   >> 103 // AddDaughter
                                                   >> 104 // ********************************************************************
                                                   >> 105 //
                                                   >> 106 inline
                                                   >> 107 void G4LogicalVolume::AddDaughter(G4VPhysicalVolume* pNewDaughter)
                                                   >> 108 {
                                                   >> 109   if( !fDaughters.empty() && fDaughters[0]->IsReplicated() )
                                                   >> 110   {
                                                   >> 111     std::ostringstream message;
                                                   >> 112     message << "ERROR - Attempt to place a volume in a mother volume" << G4endl
                                                   >> 113             << "        already containing a replicated volume." << G4endl
                                                   >> 114             << "        A volume can either contain several placements" << G4endl
                                                   >> 115             << "        or a unique replica or parameterised volume !" << G4endl
                                                   >> 116             << "           Mother logical volume: " << GetName() << G4endl
                                                   >> 117             << "           Placing volume: " << pNewDaughter->GetName() << G4endl;
                                                   >> 118     G4Exception("G4LogicalVolume::AddDaughter()", "GeomMgt0002",
                                                   >> 119                 FatalException, message,
                                                   >> 120                 "Replica or parameterised volume must be the only daughter !");
                                                   >> 121   }
                                                   >> 122 
                                                   >> 123   fMass = 0.;
                                                   >> 124   fDaughters.push_back(pNewDaughter);
                                                   >> 125 
                                                   >> 126   G4LogicalVolume* pDaughterLogical = pNewDaughter->GetLogicalVolume();
                                                   >> 127 
                                                   >> 128   // Propagate the Field Manager, if the daughter has no field Manager.
                                                   >> 129   //
                                                   >> 130   G4FieldManager* pDaughterFieldManager = pDaughterLogical->GetFieldManager();
                                                   >> 131 
                                                   >> 132   if( pDaughterFieldManager == 0 )
                                                   >> 133   {
                                                   >> 134     pDaughterLogical->SetFieldManager(fFieldManager, false);
                                                   >> 135   }
                                                   >> 136   if (fRegion)
                                                   >> 137   {
                                                   >> 138     PropagateRegion();
                                                   >> 139     fRegion->RegionModified(true);
                                                   >> 140   }
                                                   >> 141 }
                                                   >> 142 
                                                   >> 143 // ********************************************************************
100 // IsDaughter                                     144 // IsDaughter
101 // *******************************************    145 // ********************************************************************
102 //                                                146 //
103 inline                                            147 inline
104 G4bool G4LogicalVolume::IsDaughter(const G4VPh    148 G4bool G4LogicalVolume::IsDaughter(const G4VPhysicalVolume* p) const
105 {                                                 149 {
106   for (const auto & daughter : fDaughters)     << 150   G4PhysicalVolumeList::const_iterator i;
                                                   >> 151   for ( i=fDaughters.begin(); i!=fDaughters.end(); ++i )
107   {                                               152   {
108     if (*daughter==*p) return true;            << 153     if (**i==*p) return true;
109   }                                               154   }
110   return false;                                   155   return false;
111 }                                                 156 }
112                                                   157 
113 // *******************************************    158 // ********************************************************************
114 // CharacteriseDaughters                       << 159 // RemoveDaughter
115 // *******************************************    160 // ********************************************************************
116 //                                                161 //
117 inline                                            162 inline
118 EVolume G4LogicalVolume::CharacteriseDaughters << 163 void G4LogicalVolume::RemoveDaughter(const G4VPhysicalVolume* p)
119 {                                                 164 {
120   return fDaughtersVolumeType;                 << 165   G4PhysicalVolumeList::iterator i;
                                                   >> 166   for ( i=fDaughters.begin(); i!=fDaughters.end(); ++i )
                                                   >> 167   {
                                                   >> 168     if (**i==*p)
                                                   >> 169     {
                                                   >> 170       fDaughters.erase(i);
                                                   >> 171       break;
                                                   >> 172     }
                                                   >> 173   }
                                                   >> 174   if (fRegion)
                                                   >> 175   {
                                                   >> 176     fRegion->RegionModified(true);
                                                   >> 177   }
                                                   >> 178   fMass = 0.;
121 }                                                 179 }
122                                                   180 
123 // *******************************************    181 // ********************************************************************
124 // DeduceDaughtersType                         << 182 // ClearDaughters
125 // *******************************************    183 // ********************************************************************
126 //                                                184 //
127 inline                                            185 inline
128 EVolume G4LogicalVolume::DeduceDaughtersType() << 186 void G4LogicalVolume::ClearDaughters()
129 {                                                 187 {
130   EVolume type= kNormal;                       << 188   G4PhysicalVolumeList::iterator i;
131   G4VPhysicalVolume* pVol;                     << 189   for ( i=fDaughters.begin(); i!=fDaughters.end(); ++i )
132                                                << 
133   if ( GetNoDaughters() >= 1 )                 << 
134   {                                               190   {
135     pVol = GetDaughter(0);                     << 191     fDaughters.erase(i);
136     type = pVol->VolumeType();                 << 
137   }                                               192   }
138   return type;                                 << 193   if (fRegion)
                                                   >> 194   {
                                                   >> 195     fRegion->RegionModified(true);
                                                   >> 196   }
                                                   >> 197   fMass = 0.;
139 }                                                 198 }
140                                                   199 
141 // *******************************************    200 // ********************************************************************
142 // GetMasterSolid                              << 201 // GetSolid
143 // *******************************************    202 // ********************************************************************
144 //                                                203 //
145 inline                                            204 inline
146 G4VSolid* G4LogicalVolume::GetMasterSolid() co << 205 G4VSolid* G4LogicalVolume::GetSolid() const
147 {                                                 206 {
148   return fSolid;                                  207   return fSolid;
149 }                                                 208 }
150                                                   209 
151 // *******************************************    210 // ********************************************************************
152 // GetMasterSensitiveDetector                  << 211 // SetSolid
                                                   >> 212 // ********************************************************************
                                                   >> 213 //
                                                   >> 214 inline
                                                   >> 215 void G4LogicalVolume::SetSolid(G4VSolid *pSolid)
                                                   >> 216 {
                                                   >> 217   assert(pSolid != 0);
                                                   >> 218   fSolid=pSolid;
                                                   >> 219   fMass = 0.;
                                                   >> 220 }
                                                   >> 221 
                                                   >> 222 // ********************************************************************
                                                   >> 223 // GetMaterial
                                                   >> 224 // ********************************************************************
                                                   >> 225 //
                                                   >> 226 inline
                                                   >> 227 G4Material* G4LogicalVolume::GetMaterial() const
                                                   >> 228 {
                                                   >> 229   return fMaterial;
                                                   >> 230 }
                                                   >> 231 
                                                   >> 232 // ********************************************************************
                                                   >> 233 // SetMaterial
                                                   >> 234 // ********************************************************************
                                                   >> 235 //
                                                   >> 236 inline
                                                   >> 237 void G4LogicalVolume::SetMaterial(G4Material *pMaterial)
                                                   >> 238 {
                                                   >> 239   fMaterial=pMaterial;
                                                   >> 240   fMass = 0.;
                                                   >> 241 }
                                                   >> 242 
                                                   >> 243 // ********************************************************************
                                                   >> 244 // UpdateMaterial
                                                   >> 245 // ********************************************************************
                                                   >> 246 //
                                                   >> 247 inline
                                                   >> 248 void G4LogicalVolume::UpdateMaterial(G4Material *pMaterial)
                                                   >> 249 {
                                                   >> 250   fMaterial=pMaterial;
                                                   >> 251   if(fRegion) { fCutsCouple = fRegion->FindCouple(pMaterial); }
                                                   >> 252   fMass = 0.;
                                                   >> 253 }
                                                   >> 254 
                                                   >> 255 // ********************************************************************
                                                   >> 256 // GetSensitiveDetector
153 // *******************************************    257 // ********************************************************************
154 //                                                258 //
155 inline                                            259 inline
156 G4VSensitiveDetector* G4LogicalVolume::GetMast << 260 G4VSensitiveDetector* G4LogicalVolume::GetSensitiveDetector() const
157 {                                                 261 {
158   return fSensitiveDetector;                      262   return fSensitiveDetector;
159 }                                                 263 }
160                                                   264 
161 // *******************************************    265 // ********************************************************************
                                                   >> 266 // SetSensitiveDetector
                                                   >> 267 // ********************************************************************
                                                   >> 268 //
                                                   >> 269 inline
                                                   >> 270 void G4LogicalVolume::SetSensitiveDetector(G4VSensitiveDetector* pSDetector)
                                                   >> 271 {
                                                   >> 272   fSensitiveDetector = pSDetector;
                                                   >> 273 }
                                                   >> 274 
                                                   >> 275 // ********************************************************************
162 // GetUserLimits                                  276 // GetUserLimits
163 // *******************************************    277 // ********************************************************************
164 //                                                278 //
165 inline                                            279 inline
166 G4UserLimits* G4LogicalVolume::GetUserLimits()    280 G4UserLimits* G4LogicalVolume::GetUserLimits() const
167 {                                                 281 {
168   if(fUserLimits != nullptr) return fUserLimit << 282   if(fUserLimits) return fUserLimits;
169   if(fRegion != nullptr) return fRegion->GetUs << 283   if(fRegion) return fRegion->GetUserLimits();
170   return nullptr;                              << 284   return 0;
171 }                                                 285 }
172                                                   286 
173 // *******************************************    287 // ********************************************************************
174 // SetUserLimits                                  288 // SetUserLimits
175 // *******************************************    289 // ********************************************************************
176 //                                                290 //
177 inline                                            291 inline
178 void G4LogicalVolume::SetUserLimits(G4UserLimi    292 void G4LogicalVolume::SetUserLimits(G4UserLimits* pULimits)
179 {                                                 293 {
180   fUserLimits = pULimits;                         294   fUserLimits = pULimits;
181 }                                                 295 }
182                                                   296 
183 // *******************************************    297 // ********************************************************************
184 // GetVoxelHeader                                 298 // GetVoxelHeader
185 // *******************************************    299 // ********************************************************************
186 //                                                300 //
187 inline                                            301 inline
188 G4SmartVoxelHeader* G4LogicalVolume::GetVoxelH    302 G4SmartVoxelHeader* G4LogicalVolume::GetVoxelHeader() const
189 {                                                 303 {
190   return fVoxel;                                  304   return fVoxel;
191 }                                                 305 }
192                                                   306 
193 // *******************************************    307 // ********************************************************************
194 // SetVoxelHeader                                 308 // SetVoxelHeader
195 // *******************************************    309 // ********************************************************************
196 //                                                310 //
197 inline                                            311 inline
198 void G4LogicalVolume::SetVoxelHeader(G4SmartVo    312 void G4LogicalVolume::SetVoxelHeader(G4SmartVoxelHeader* pVoxel)
199 {                                                 313 {
200   fVoxel = pVoxel;                                314   fVoxel = pVoxel;
201 }                                                 315 }
202                                                   316 
203 // *******************************************    317 // ********************************************************************
204 // GetSmartless                                   318 // GetSmartless
205 // *******************************************    319 // ********************************************************************
206 //                                                320 //
207 inline                                            321 inline
208 G4double G4LogicalVolume::GetSmartless() const    322 G4double G4LogicalVolume::GetSmartless() const
209 {                                                 323 {
210   return fSmartless;                              324   return fSmartless;
211 }                                                 325 }
212                                                   326 
213 // *******************************************    327 // ********************************************************************
214 // SetSmartless                                   328 // SetSmartless
215 // *******************************************    329 // ********************************************************************
216 //                                                330 //
217 inline                                            331 inline
218 void G4LogicalVolume::SetSmartless(G4double sm    332 void G4LogicalVolume::SetSmartless(G4double smt)
219 {                                                 333 {
220   fSmartless = smt;                               334   fSmartless = smt;
221 }                                                 335 }
222                                                   336 
223 // *******************************************    337 // ********************************************************************
224 // IsToOptimise                                   338 // IsToOptimise
225 // *******************************************    339 // ********************************************************************
226 //                                                340 //
227 inline                                            341 inline
228 G4bool G4LogicalVolume::IsToOptimise() const      342 G4bool G4LogicalVolume::IsToOptimise() const
229 {                                                 343 {
230   return fOptimise;                               344   return fOptimise;
231 }                                                 345 }
232                                                   346 
233 // *******************************************    347 // ********************************************************************
234 // SetOptimisation                                348 // SetOptimisation
235 // *******************************************    349 // ********************************************************************
236 //                                                350 //
237 inline                                            351 inline
238 void G4LogicalVolume::SetOptimisation(G4bool o    352 void G4LogicalVolume::SetOptimisation(G4bool optim)
239 {                                                 353 {
240   fOptimise = optim;                              354   fOptimise = optim;
241 }                                                 355 }
242                                                   356 
243 // *******************************************    357 // ********************************************************************
244 // IsRootRegion                                   358 // IsRootRegion
245 // *******************************************    359 // ********************************************************************
246 //                                                360 //
247 inline                                            361 inline
248 G4bool G4LogicalVolume::IsRootRegion() const      362 G4bool G4LogicalVolume::IsRootRegion() const
249 {                                                 363 {
250   return fRootRegion;                             364   return fRootRegion;
251 }                                                 365 }
252                                                   366 
253 // *******************************************    367 // ********************************************************************
254 // SetRegionRootFlag                              368 // SetRegionRootFlag
255 // *******************************************    369 // ********************************************************************
256 //                                                370 //
257 inline                                            371 inline
258 void G4LogicalVolume::SetRegionRootFlag(G4bool    372 void G4LogicalVolume::SetRegionRootFlag(G4bool rreg)
259 {                                                 373 {
260   fRootRegion = rreg;                             374   fRootRegion = rreg;
261 }                                                 375 }
262                                                   376 
263 // *******************************************    377 // ********************************************************************
264 // IsRegion                                       378 // IsRegion
265 // *******************************************    379 // ********************************************************************
266 //                                                380 //
267 inline                                            381 inline
268 G4bool G4LogicalVolume::IsRegion() const          382 G4bool G4LogicalVolume::IsRegion() const
269 {                                                 383 {
270   G4bool reg = false;                             384   G4bool reg = false;
271   if (fRegion != nullptr) reg = true;          << 385   if (fRegion) reg = true;
272   return reg;                                     386   return reg;
273 }                                                 387 }
274                                                   388 
275 // *******************************************    389 // ********************************************************************
276 // SetRegion                                      390 // SetRegion
277 // *******************************************    391 // ********************************************************************
278 //                                                392 //
279 inline                                            393 inline
280 void G4LogicalVolume::SetRegion(G4Region* reg)    394 void G4LogicalVolume::SetRegion(G4Region* reg)
281 {                                                 395 {
282   fRegion = reg;                                  396   fRegion = reg;
283 }                                                 397 }
284                                                   398 
285 // *******************************************    399 // ********************************************************************
286 // GetRegion                                      400 // GetRegion
287 // *******************************************    401 // ********************************************************************
288 //                                                402 //
289 inline                                            403 inline
290 G4Region* G4LogicalVolume::GetRegion() const      404 G4Region* G4LogicalVolume::GetRegion() const
291 {                                                 405 {
292   return fRegion;                                 406   return fRegion;
293 }                                                 407 }
294                                                   408 
295 // *******************************************    409 // ********************************************************************
296 // PropagateRegion                                410 // PropagateRegion
297 // *******************************************    411 // ********************************************************************
298 //                                                412 //
299 inline                                            413 inline
300 void G4LogicalVolume::PropagateRegion()           414 void G4LogicalVolume::PropagateRegion()
301 {                                                 415 {
302   fRegion->ScanVolumeTree(this, true);            416   fRegion->ScanVolumeTree(this, true);
303 }                                                 417 }
304                                                   418 
305 // *******************************************    419 // ********************************************************************
                                                   >> 420 // GetMaterialCutsCouple
                                                   >> 421 // ********************************************************************
                                                   >> 422 //
                                                   >> 423 inline
                                                   >> 424 const G4MaterialCutsCouple* G4LogicalVolume::GetMaterialCutsCouple() const
                                                   >> 425 {
                                                   >> 426   return fCutsCouple;
                                                   >> 427 }
                                                   >> 428 
                                                   >> 429 // ********************************************************************
                                                   >> 430 // SetMaterialCutsCouple
                                                   >> 431 // ********************************************************************
                                                   >> 432 //
                                                   >> 433 inline
                                                   >> 434 void G4LogicalVolume::SetMaterialCutsCouple(G4MaterialCutsCouple* cuts)
                                                   >> 435 {
                                                   >> 436   fCutsCouple = cuts;
                                                   >> 437 }
                                                   >> 438 
                                                   >> 439 // ********************************************************************
306 // Lock                                           440 // Lock
307 // *******************************************    441 // ********************************************************************
308 //                                                442 //
309 inline                                            443 inline
310 void G4LogicalVolume::Lock()                      444 void G4LogicalVolume::Lock()
311 {                                                 445 {
312   fLock = true;                                   446   fLock = true;
313 }                                                 447 }
314                                                   448 
315 // *******************************************    449 // ********************************************************************
316 // Operator ==                                    450 // Operator ==
317 // *******************************************    451 // ********************************************************************
318 //                                                452 //
319 inline                                            453 inline
320 G4bool G4LogicalVolume::operator == ( const G4    454 G4bool G4LogicalVolume::operator == ( const G4LogicalVolume& lv) const
321 {                                                 455 {
322   return this==&lv;                            << 456   return (this==&lv) ? true : false;
323 }                                                 457 }
324                                                   458 
325 // *******************************************    459 // ********************************************************************
326 // SetBiasWeight                               << 460 // GetVisAttributes
327 // *******************************************    461 // ********************************************************************
328 //                                                462 //
329 inline                                            463 inline
330 void G4LogicalVolume::SetBiasWeight(G4double w << 464 const G4VisAttributes* G4LogicalVolume::GetVisAttributes () const
331 {                                                 465 {
332   fBiasWeight = weight;                        << 466   return fVisAttributes;
333 }                                                 467 }
334                                                   468 
335 // *******************************************    469 // ********************************************************************
336 // GetBiasWeight                               << 470 // SetVisAttributes
337 // *******************************************    471 // ********************************************************************
338 //                                                472 //
339 inline                                            473 inline
340 G4double G4LogicalVolume::GetBiasWeight() cons << 474 void G4LogicalVolume::SetVisAttributes (const G4VisAttributes* pVA)
341 {                                                 475 {
342   return fBiasWeight;                          << 476   fVisAttributes = pVA;
343 }                                                 477 }
344                                                   478 
345 // *******************************************    479 // ********************************************************************
346 // GetVisAttributes                            << 480 // SetBiasWeight
347 // *******************************************    481 // ********************************************************************
348 //                                                482 //
349 inline                                            483 inline
350 const G4VisAttributes* G4LogicalVolume::GetVis << 484 void G4LogicalVolume::SetBiasWeight(G4double weight)
351 {                                                 485 {
352   return fVisAttributes.get();                 << 486   fBiasWeight = weight;
                                                   >> 487 }
                                                   >> 488 
                                                   >> 489 // ********************************************************************
                                                   >> 490 // GetBiasWeight
                                                   >> 491 // ********************************************************************
                                                   >> 492 //
                                                   >> 493 inline
                                                   >> 494 G4double G4LogicalVolume::GetBiasWeight() const
                                                   >> 495 {
                                                   >> 496   return fBiasWeight;
353 }                                                 497 }
                                                   >> 498 
354                                                   499