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