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 10.0.p1)


  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 78050 2013-12-03 08:17:33Z gcosmo $
                                                   >>  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 // 15.01.13 - G.Cosmo, A.Dotti: Modified for thread-safety for MT
 29 // 10.20.97 - P. MoraDeFreitas : Added SetFast     33 // 10.20.97 - P. MoraDeFreitas : Added SetFastSimulation method
 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 
                                                   >>  41 
                                                   >>  42 // These macros change the references to fields that are now encapsulated
                                                   >>  43 // in the class G4LVData.
                                                   >>  44 //
                                                   >>  45 #define G4MT_solid     ((subInstanceManager.offset[instanceID]).fSolid)
                                                   >>  46 #define G4MT_sdetector ((subInstanceManager.offset[instanceID]).fSensitiveDetector)
                                                   >>  47 #define G4MT_fmanager  ((subInstanceManager.offset[instanceID]).fFieldManager)
                                                   >>  48 #define G4MT_material  ((subInstanceManager.offset[instanceID]).fMaterial)
                                                   >>  49 #define G4MT_mass      ((subInstanceManager.offset[instanceID]).fMass)
                                                   >>  50 #define G4MT_ccouple   ((subInstanceManager.offset[instanceID]).fCutsCouple)
                                                   >>  51 #define G4MT_instance  (subInstanceManager.offset[instanceID])
                                                   >>  52 
                                                   >>  53 #include "G4Threading.hh"
 37 // *******************************************     54 // ********************************************************************
 38 // GetName                                         55 // GetName
 39 // *******************************************     56 // ********************************************************************
 40 //                                                 57 //
 41 inline                                             58 inline
 42 const G4String& G4LogicalVolume::GetName() con <<  59 G4String G4LogicalVolume::GetName() const
 43 {                                                  60 {
 44   return fName;                                    61   return fName;
 45 }                                                  62 }
 46                                                    63     
 47 // *******************************************     64 // ********************************************************************
                                                   >>  65 // SetName
                                                   >>  66 // ********************************************************************
                                                   >>  67 //
                                                   >>  68 inline
                                                   >>  69 void G4LogicalVolume::SetName(const G4String& pName)
                                                   >>  70 {
                                                   >>  71   fName = pName;
                                                   >>  72 }
                                                   >>  73 
                                                   >>  74 // ********************************************************************
 48 // GetInstanceID                                   75 // GetInstanceID
 49 // *******************************************     76 // ********************************************************************
 50 //                                                 77 //
 51 inline                                             78 inline
 52 G4int G4LogicalVolume::GetInstanceID() const       79 G4int G4LogicalVolume::GetInstanceID() const
 53 {                                                  80 {
 54   return instanceID;                               81   return instanceID;
 55 }                                                  82 }
 56                                                    83 
 57 // *******************************************     84 // ********************************************************************
                                                   >>  85 // GetFieldManager
                                                   >>  86 // ********************************************************************
                                                   >>  87 //
                                                   >>  88 inline
                                                   >>  89 G4FieldManager* G4LogicalVolume::GetFieldManager() const
                                                   >>  90 {
                                                   >>  91   return G4MT_fmanager;
                                                   >>  92 }
                                                   >>  93 
                                                   >>  94 inline void G4LogicalVolume::AssignFieldManager( G4FieldManager *fldMgr)
                                                   >>  95 {
                                                   >>  96   G4MT_fmanager= fldMgr;
                                                   >>  97   if(!G4Threading::IsWorkerThread()) fFieldManager = fldMgr;
                                                   >>  98 }
                                                   >>  99 
                                                   >> 100 
                                                   >> 101 // ********************************************************************
 58 // GetMasterFieldManager                          102 // GetMasterFieldManager
 59 // *******************************************    103 // ********************************************************************
 60 //                                                104 //
 61 inline                                            105 inline
 62 G4FieldManager* G4LogicalVolume::GetMasterFiel    106 G4FieldManager* G4LogicalVolume::GetMasterFieldManager() const
 63 {                                                 107 {
 64   return fFieldManager;                           108   return fFieldManager;
 65 }                                                 109 }
 66                                                   110 
 67 // *******************************************    111 // ********************************************************************
 68 // GetNoDaughters                                 112 // GetNoDaughters
 69 // *******************************************    113 // ********************************************************************
 70 //                                                114 //
 71 inline                                            115 inline
 72 std::size_t G4LogicalVolume::GetNoDaughters()  << 116 G4int G4LogicalVolume::GetNoDaughters() const
 73 {                                                 117 {
 74   return fDaughters.size();                       118   return fDaughters.size();
 75 }                                                 119 }
 76                                                   120 
 77 // *******************************************    121 // ********************************************************************
 78 // GetDaughter                                    122 // GetDaughter
 79 // *******************************************    123 // ********************************************************************
 80 //                                                124 //
 81 inline                                            125 inline
 82 G4VPhysicalVolume* G4LogicalVolume::GetDaughte << 126 G4VPhysicalVolume* G4LogicalVolume::GetDaughter(const G4int i) const
 83 {                                                 127 {
 84   return fDaughters[i];                           128   return fDaughters[i];
 85 }                                                 129 }
 86                                                   130 
 87 // *******************************************    131 // ********************************************************************
 88 // GetFastSimulationManager                       132 // GetFastSimulationManager
 89 // *******************************************    133 // ********************************************************************
 90 //                                                134 //
 91 inline                                            135 inline
 92 G4FastSimulationManager* G4LogicalVolume::GetF    136 G4FastSimulationManager* G4LogicalVolume::GetFastSimulationManager () const 
 93 {                                                 137 {
 94   G4FastSimulationManager* fFSM = nullptr;     << 138   G4FastSimulationManager* fFSM = 0;
 95   if(fRegion != nullptr) fFSM = fRegion->GetFa << 139   if(fRegion) fFSM = fRegion->GetFastSimulationManager();
 96   return fFSM;                                    140   return fFSM;
 97 }                                                 141 }
 98                                                   142 
 99 // *******************************************    143 // ********************************************************************
                                                   >> 144 // AddDaughter
                                                   >> 145 // ********************************************************************
                                                   >> 146 //
                                                   >> 147 inline
                                                   >> 148 void G4LogicalVolume::AddDaughter(G4VPhysicalVolume* pNewDaughter)
                                                   >> 149 {
                                                   >> 150   if( !fDaughters.empty() && fDaughters[0]->IsReplicated() )
                                                   >> 151   {
                                                   >> 152     std::ostringstream message;
                                                   >> 153     message << "ERROR - Attempt to place a volume in a mother volume" << G4endl
                                                   >> 154             << "        already containing a replicated volume." << G4endl
                                                   >> 155             << "        A volume can either contain several placements" << G4endl
                                                   >> 156             << "        or a unique replica or parameterised volume !" << G4endl
                                                   >> 157             << "           Mother logical volume: " << GetName() << G4endl
                                                   >> 158             << "           Placing volume: " << pNewDaughter->GetName() << G4endl;
                                                   >> 159     G4Exception("G4LogicalVolume::AddDaughter()", "GeomMgt0002",
                                                   >> 160                 FatalException, message,
                                                   >> 161                 "Replica or parameterised volume must be the only daughter !");
                                                   >> 162   }
                                                   >> 163 
                                                   >> 164   // Invalidate previous calculation of mass - if any - for all threads
                                                   >> 165   G4MT_mass = 0.;
                                                   >> 166   // SignalVolumeChange();  // fVolumeChanged= true;
                                                   >> 167   fDaughters.push_back(pNewDaughter);
                                                   >> 168 
                                                   >> 169   G4LogicalVolume* pDaughterLogical = pNewDaughter->GetLogicalVolume();
                                                   >> 170 
                                                   >> 171   // Propagate the Field Manager, if the daughter has no field Manager.
                                                   >> 172   //
                                                   >> 173   G4FieldManager* pDaughterFieldManager = pDaughterLogical->GetFieldManager();
                                                   >> 174 
                                                   >> 175   if( pDaughterFieldManager == 0 )
                                                   >> 176   {
                                                   >> 177     pDaughterLogical->SetFieldManager(G4MT_fmanager, false);
                                                   >> 178   }
                                                   >> 179   if (fRegion)
                                                   >> 180   {
                                                   >> 181     PropagateRegion();
                                                   >> 182     fRegion->RegionModified(true);
                                                   >> 183   }
                                                   >> 184 }
                                                   >> 185 
                                                   >> 186 // ********************************************************************
100 // IsDaughter                                     187 // IsDaughter
101 // *******************************************    188 // ********************************************************************
102 //                                                189 //
103 inline                                            190 inline
104 G4bool G4LogicalVolume::IsDaughter(const G4VPh    191 G4bool G4LogicalVolume::IsDaughter(const G4VPhysicalVolume* p) const
105 {                                                 192 {
106   for (const auto & daughter : fDaughters)     << 193   G4PhysicalVolumeList::const_iterator i;
                                                   >> 194   for ( i=fDaughters.begin(); i!=fDaughters.end(); ++i )
107   {                                               195   {
108     if (*daughter==*p) return true;            << 196     if (**i==*p) return true;
109   }                                               197   }
110   return false;                                   198   return false;
111 }                                                 199 }
112                                                   200 
113 // *******************************************    201 // ********************************************************************
114 // CharacteriseDaughters                       << 202 // RemoveDaughter
115 // *******************************************    203 // ********************************************************************
116 //                                                204 //
117 inline                                            205 inline
118 EVolume G4LogicalVolume::CharacteriseDaughters << 206 void G4LogicalVolume::RemoveDaughter(const G4VPhysicalVolume* p)
119 {                                                 207 {
120   return fDaughtersVolumeType;                 << 208   G4PhysicalVolumeList::iterator i;
                                                   >> 209   for ( i=fDaughters.begin(); i!=fDaughters.end(); ++i )
                                                   >> 210   {
                                                   >> 211     if (**i==*p)
                                                   >> 212     {
                                                   >> 213       fDaughters.erase(i);
                                                   >> 214       break;
                                                   >> 215     }
                                                   >> 216   }
                                                   >> 217   if (fRegion)
                                                   >> 218   {
                                                   >> 219     fRegion->RegionModified(true);
                                                   >> 220   }
                                                   >> 221   G4MT_mass = 0.;
121 }                                                 222 }
122                                                   223 
123 // *******************************************    224 // ********************************************************************
124 // DeduceDaughtersType                         << 225 // ClearDaughters
125 // *******************************************    226 // ********************************************************************
126 //                                                227 //
127 inline                                            228 inline
128 EVolume G4LogicalVolume::DeduceDaughtersType() << 229 void G4LogicalVolume::ClearDaughters()
129 {                                                 230 {
130   EVolume type= kNormal;                       << 231   G4PhysicalVolumeList::iterator i;
131   G4VPhysicalVolume* pVol;                     << 232   for ( i=fDaughters.begin(); i!=fDaughters.end(); ++i )
132                                                << 233   {
133   if ( GetNoDaughters() >= 1 )                 << 234     fDaughters.erase(i);
                                                   >> 235   }
                                                   >> 236   if (fRegion)
                                                   >> 237   {
                                                   >> 238     fRegion->RegionModified(true);
                                                   >> 239   }
                                                   >> 240   G4MT_mass = 0.;
                                                   >> 241 }
                                                   >> 242 
                                                   >> 243 // ********************************************************************
                                                   >> 244 // CharacteriseDaughters
                                                   >> 245 // ********************************************************************
                                                   >> 246 //
                                                   >> 247 inline
                                                   >> 248 EVolume G4LogicalVolume::CharacteriseDaughters() const
                                                   >> 249 {
                                                   >> 250   EVolume type;
                                                   >> 251   G4VPhysicalVolume *pVol;
                                                   >> 252 
                                                   >> 253   if ( GetNoDaughters()==1 )
134   {                                               254   {
135     pVol = GetDaughter(0);                        255     pVol = GetDaughter(0);
136     type = pVol->VolumeType();                    256     type = pVol->VolumeType();
137   }                                               257   }
                                                   >> 258   else
                                                   >> 259   {
                                                   >> 260     type = kNormal;
                                                   >> 261   }
138   return type;                                    262   return type;
139 }                                                 263 }
140                                                   264 
                                                   >> 265 inline
                                                   >> 266 void G4LogicalVolume::ResetMass()
                                                   >> 267 {
                                                   >> 268   G4MT_mass= 0.0;
                                                   >> 269   // Do not fChangedState= 1; 
                                                   >> 270 }
                                                   >> 271 
                                                   >> 272 // ********************************************************************
                                                   >> 273 // GetSolid
                                                   >> 274 // ********************************************************************
                                                   >> 275 //
                                                   >> 276 inline
                                                   >> 277 G4VSolid* G4LogicalVolume::GetSolid(G4LVData &instLVdata) // const
                                                   >> 278 {
                                                   >> 279   return instLVdata.fSolid;
                                                   >> 280 }
                                                   >> 281 
                                                   >> 282 inline
                                                   >> 283 G4VSolid* G4LogicalVolume::GetSolid() const
                                                   >> 284 {
                                                   >> 285   // return G4MT_solid;
                                                   >> 286   // return ((subInstanceManager.offset[instanceID]).fSolid);
                                                   >> 287   return this->GetSolid( subInstanceManager.offset[instanceID] ); 
                                                   >> 288 }
                                                   >> 289 
141 // *******************************************    290 // ********************************************************************
142 // GetMasterSolid                                 291 // GetMasterSolid
143 // *******************************************    292 // ********************************************************************
144 //                                                293 //
145 inline                                            294 inline
146 G4VSolid* G4LogicalVolume::GetMasterSolid() co    295 G4VSolid* G4LogicalVolume::GetMasterSolid() const
147 {                                                 296 {
148   return fSolid;                                  297   return fSolid;
149 }                                                 298 }
150                                                   299 
151 // *******************************************    300 // ********************************************************************
                                                   >> 301 // SetSolid
                                                   >> 302 // ********************************************************************
                                                   >> 303 //
                                                   >> 304 inline
                                                   >> 305 void G4LogicalVolume::SetSolid(G4VSolid *pSolid)
                                                   >> 306 {
                                                   >> 307 
                                                   >> 308   // ((subInstanceManager.offset[instanceID]).fSolid) = pSolid;
                                                   >> 309   G4MT_solid=pSolid;
                                                   >> 310   // G4MT_mass = 0.;
                                                   >> 311   this->ResetMass(); 
                                                   >> 312 }
                                                   >> 313 
                                                   >> 314 inline
                                                   >> 315 void G4LogicalVolume::SetSolid(G4LVData &instLVdata, G4VSolid *pSolid)
                                                   >> 316 {  
                                                   >> 317   instLVdata.fSolid = pSolid;
                                                   >> 318   // G4MT_solid=pSolid;
                                                   >> 319   instLVdata.fMass= 0;
                                                   >> 320   // A fast way to reset the mass ... ie G4MT_mass = 0.;
                                                   >> 321 }
                                                   >> 322 
                                                   >> 323 // ********************************************************************
                                                   >> 324 // GetMaterial
                                                   >> 325 // ********************************************************************
                                                   >> 326 //
                                                   >> 327 inline
                                                   >> 328 G4Material* G4LogicalVolume::GetMaterial() const
                                                   >> 329 {
                                                   >> 330   return G4MT_material;
                                                   >> 331 }
                                                   >> 332 
                                                   >> 333 // ********************************************************************
                                                   >> 334 // SetMaterial
                                                   >> 335 // ********************************************************************
                                                   >> 336 //
                                                   >> 337 inline
                                                   >> 338 void G4LogicalVolume::SetMaterial(G4Material *pMaterial)
                                                   >> 339 {
                                                   >> 340   G4MT_material=pMaterial;
                                                   >> 341   G4MT_mass = 0.;
                                                   >> 342 }
                                                   >> 343 
                                                   >> 344 // ********************************************************************
                                                   >> 345 // UpdateMaterial
                                                   >> 346 // ********************************************************************
                                                   >> 347 //
                                                   >> 348 inline
                                                   >> 349 void G4LogicalVolume::UpdateMaterial(G4Material *pMaterial)
                                                   >> 350 {
                                                   >> 351   G4MT_material=pMaterial;
                                                   >> 352   if(fRegion) { G4MT_ccouple = fRegion->FindCouple(pMaterial); }
                                                   >> 353   G4MT_mass = 0.;
                                                   >> 354 }
                                                   >> 355 
                                                   >> 356 // ********************************************************************
                                                   >> 357 // GetSensitiveDetector
                                                   >> 358 // ********************************************************************
                                                   >> 359 //
                                                   >> 360 inline
                                                   >> 361 G4VSensitiveDetector* G4LogicalVolume::GetSensitiveDetector() const
                                                   >> 362 {
                                                   >> 363   return G4MT_sdetector;
                                                   >> 364 }
                                                   >> 365 
                                                   >> 366 // ********************************************************************
152 // GetMasterSensitiveDetector                     367 // GetMasterSensitiveDetector
153 // *******************************************    368 // ********************************************************************
154 //                                                369 //
155 inline                                            370 inline
156 G4VSensitiveDetector* G4LogicalVolume::GetMast    371 G4VSensitiveDetector* G4LogicalVolume::GetMasterSensitiveDetector() const
157 {                                                 372 {
158   return fSensitiveDetector;                      373   return fSensitiveDetector;
159 }                                                 374 }
160                                                   375 
161 // *******************************************    376 // ********************************************************************
                                                   >> 377 // SetSensitiveDetector
                                                   >> 378 // ********************************************************************
                                                   >> 379 //
                                                   >> 380 inline
                                                   >> 381 void G4LogicalVolume::SetSensitiveDetector(G4VSensitiveDetector* pSDetector)
                                                   >> 382 {
                                                   >> 383   G4MT_sdetector = pSDetector;
                                                   >> 384   if(!G4Threading::IsWorkerThread()) fSensitiveDetector = pSDetector;
                                                   >> 385 }
                                                   >> 386 
                                                   >> 387 // ********************************************************************
162 // GetUserLimits                                  388 // GetUserLimits
163 // *******************************************    389 // ********************************************************************
164 //                                                390 //
165 inline                                            391 inline
166 G4UserLimits* G4LogicalVolume::GetUserLimits()    392 G4UserLimits* G4LogicalVolume::GetUserLimits() const
167 {                                                 393 {
168   if(fUserLimits != nullptr) return fUserLimit << 394   if(fUserLimits) return fUserLimits;
169   if(fRegion != nullptr) return fRegion->GetUs << 395   if(fRegion) return fRegion->GetUserLimits();
170   return nullptr;                              << 396   return 0;
171 }                                                 397 }
172                                                   398 
173 // *******************************************    399 // ********************************************************************
174 // SetUserLimits                                  400 // SetUserLimits
175 // *******************************************    401 // ********************************************************************
176 //                                                402 //
177 inline                                            403 inline
178 void G4LogicalVolume::SetUserLimits(G4UserLimi    404 void G4LogicalVolume::SetUserLimits(G4UserLimits* pULimits)
179 {                                                 405 {
180   fUserLimits = pULimits;                         406   fUserLimits = pULimits;
181 }                                                 407 }
182                                                   408 
183 // *******************************************    409 // ********************************************************************
184 // GetVoxelHeader                                 410 // GetVoxelHeader
185 // *******************************************    411 // ********************************************************************
186 //                                                412 //
187 inline                                            413 inline
188 G4SmartVoxelHeader* G4LogicalVolume::GetVoxelH    414 G4SmartVoxelHeader* G4LogicalVolume::GetVoxelHeader() const
189 {                                                 415 {
190   return fVoxel;                                  416   return fVoxel;
191 }                                                 417 }
192                                                   418 
193 // *******************************************    419 // ********************************************************************
194 // SetVoxelHeader                                 420 // SetVoxelHeader
195 // *******************************************    421 // ********************************************************************
196 //                                                422 //
197 inline                                            423 inline
198 void G4LogicalVolume::SetVoxelHeader(G4SmartVo    424 void G4LogicalVolume::SetVoxelHeader(G4SmartVoxelHeader* pVoxel)
199 {                                                 425 {
200   fVoxel = pVoxel;                                426   fVoxel = pVoxel;
201 }                                                 427 }
202                                                   428 
203 // *******************************************    429 // ********************************************************************
204 // GetSmartless                                   430 // GetSmartless
205 // *******************************************    431 // ********************************************************************
206 //                                                432 //
207 inline                                            433 inline
208 G4double G4LogicalVolume::GetSmartless() const    434 G4double G4LogicalVolume::GetSmartless() const
209 {                                                 435 {
210   return fSmartless;                              436   return fSmartless;
211 }                                                 437 }
212                                                   438 
213 // *******************************************    439 // ********************************************************************
214 // SetSmartless                                   440 // SetSmartless
215 // *******************************************    441 // ********************************************************************
216 //                                                442 //
217 inline                                            443 inline
218 void G4LogicalVolume::SetSmartless(G4double sm    444 void G4LogicalVolume::SetSmartless(G4double smt)
219 {                                                 445 {
220   fSmartless = smt;                               446   fSmartless = smt;
221 }                                                 447 }
222                                                   448 
223 // *******************************************    449 // ********************************************************************
224 // IsToOptimise                                   450 // IsToOptimise
225 // *******************************************    451 // ********************************************************************
226 //                                                452 //
227 inline                                            453 inline
228 G4bool G4LogicalVolume::IsToOptimise() const      454 G4bool G4LogicalVolume::IsToOptimise() const
229 {                                                 455 {
230   return fOptimise;                               456   return fOptimise;
231 }                                                 457 }
232                                                   458 
233 // *******************************************    459 // ********************************************************************
234 // SetOptimisation                                460 // SetOptimisation
235 // *******************************************    461 // ********************************************************************
236 //                                                462 //
237 inline                                            463 inline
238 void G4LogicalVolume::SetOptimisation(G4bool o    464 void G4LogicalVolume::SetOptimisation(G4bool optim)
239 {                                                 465 {
240   fOptimise = optim;                              466   fOptimise = optim;
241 }                                                 467 }
242                                                   468 
243 // *******************************************    469 // ********************************************************************
244 // IsRootRegion                                   470 // IsRootRegion
245 // *******************************************    471 // ********************************************************************
246 //                                                472 //
247 inline                                            473 inline
248 G4bool G4LogicalVolume::IsRootRegion() const      474 G4bool G4LogicalVolume::IsRootRegion() const
249 {                                                 475 {
250   return fRootRegion;                             476   return fRootRegion;
251 }                                                 477 }
252                                                   478 
253 // *******************************************    479 // ********************************************************************
254 // SetRegionRootFlag                              480 // SetRegionRootFlag
255 // *******************************************    481 // ********************************************************************
256 //                                                482 //
257 inline                                            483 inline
258 void G4LogicalVolume::SetRegionRootFlag(G4bool    484 void G4LogicalVolume::SetRegionRootFlag(G4bool rreg)
259 {                                                 485 {
260   fRootRegion = rreg;                             486   fRootRegion = rreg;
261 }                                                 487 }
262                                                   488 
263 // *******************************************    489 // ********************************************************************
264 // IsRegion                                       490 // IsRegion
265 // *******************************************    491 // ********************************************************************
266 //                                                492 //
267 inline                                            493 inline
268 G4bool G4LogicalVolume::IsRegion() const          494 G4bool G4LogicalVolume::IsRegion() const
269 {                                                 495 {
270   G4bool reg = false;                             496   G4bool reg = false;
271   if (fRegion != nullptr) reg = true;          << 497   if (fRegion) reg = true;
272   return reg;                                     498   return reg;
273 }                                                 499 }
274                                                   500 
275 // *******************************************    501 // ********************************************************************
276 // SetRegion                                      502 // SetRegion
277 // *******************************************    503 // ********************************************************************
278 //                                                504 //
279 inline                                            505 inline
280 void G4LogicalVolume::SetRegion(G4Region* reg)    506 void G4LogicalVolume::SetRegion(G4Region* reg)
281 {                                                 507 {
282   fRegion = reg;                                  508   fRegion = reg;
283 }                                                 509 }
284                                                   510 
285 // *******************************************    511 // ********************************************************************
286 // GetRegion                                      512 // GetRegion
287 // *******************************************    513 // ********************************************************************
288 //                                                514 //
289 inline                                            515 inline
290 G4Region* G4LogicalVolume::GetRegion() const      516 G4Region* G4LogicalVolume::GetRegion() const
291 {                                                 517 {
292   return fRegion;                                 518   return fRegion;
293 }                                                 519 }
294                                                   520 
295 // *******************************************    521 // ********************************************************************
296 // PropagateRegion                                522 // PropagateRegion
297 // *******************************************    523 // ********************************************************************
298 //                                                524 //
299 inline                                            525 inline
300 void G4LogicalVolume::PropagateRegion()           526 void G4LogicalVolume::PropagateRegion()
301 {                                                 527 {
302   fRegion->ScanVolumeTree(this, true);            528   fRegion->ScanVolumeTree(this, true);
303 }                                                 529 }
304                                                   530 
305 // *******************************************    531 // ********************************************************************
                                                   >> 532 // GetMaterialCutsCouple
                                                   >> 533 // ********************************************************************
                                                   >> 534 //
                                                   >> 535 inline
                                                   >> 536 const G4MaterialCutsCouple* G4LogicalVolume::GetMaterialCutsCouple() const
                                                   >> 537 {
                                                   >> 538   return G4MT_ccouple;
                                                   >> 539 }
                                                   >> 540 
                                                   >> 541 // ********************************************************************
                                                   >> 542 // SetMaterialCutsCouple
                                                   >> 543 // ********************************************************************
                                                   >> 544 //
                                                   >> 545 inline
                                                   >> 546 void G4LogicalVolume::SetMaterialCutsCouple(G4MaterialCutsCouple* cuts)
                                                   >> 547 {
                                                   >> 548   G4MT_ccouple = cuts;
                                                   >> 549 }
                                                   >> 550 
                                                   >> 551 // ********************************************************************
306 // Lock                                           552 // Lock
307 // *******************************************    553 // ********************************************************************
308 //                                                554 //
309 inline                                            555 inline
310 void G4LogicalVolume::Lock()                      556 void G4LogicalVolume::Lock()
311 {                                                 557 {
312   fLock = true;                                   558   fLock = true;
313 }                                                 559 }
314                                                   560 
315 // *******************************************    561 // ********************************************************************
316 // Operator ==                                    562 // Operator ==
317 // *******************************************    563 // ********************************************************************
318 //                                                564 //
319 inline                                            565 inline
320 G4bool G4LogicalVolume::operator == ( const G4    566 G4bool G4LogicalVolume::operator == ( const G4LogicalVolume& lv) const
321 {                                                 567 {
322   return this==&lv;                            << 568   return (this==&lv) ? true : false;
323 }                                                 569 }
324                                                   570 
325 // *******************************************    571 // ********************************************************************
326 // SetBiasWeight                               << 572 // GetVisAttributes
327 // *******************************************    573 // ********************************************************************
328 //                                                574 //
329 inline                                            575 inline
330 void G4LogicalVolume::SetBiasWeight(G4double w << 576 const G4VisAttributes* G4LogicalVolume::GetVisAttributes () const
331 {                                                 577 {
332   fBiasWeight = weight;                        << 578   return fVisAttributes;
333 }                                                 579 }
334                                                   580 
335 // *******************************************    581 // ********************************************************************
336 // GetBiasWeight                               << 582 // SetVisAttributes
337 // *******************************************    583 // ********************************************************************
338 //                                                584 //
339 inline                                            585 inline
340 G4double G4LogicalVolume::GetBiasWeight() cons << 586 void G4LogicalVolume::SetVisAttributes (const G4VisAttributes* pVA)
341 {                                                 587 {
342   return fBiasWeight;                          << 588   fVisAttributes = pVA;
343 }                                                 589 }
344                                                   590 
345 // *******************************************    591 // ********************************************************************
346 // GetVisAttributes                            << 592 // SetBiasWeight
347 // *******************************************    593 // ********************************************************************
348 //                                                594 //
349 inline                                            595 inline
350 const G4VisAttributes* G4LogicalVolume::GetVis << 596 void G4LogicalVolume::SetBiasWeight(G4double weight)
                                                   >> 597 {
                                                   >> 598   fBiasWeight = weight;
                                                   >> 599 }
                                                   >> 600 
                                                   >> 601 // ********************************************************************
                                                   >> 602 // GetBiasWeight
                                                   >> 603 // ********************************************************************
                                                   >> 604 //
                                                   >> 605 inline
                                                   >> 606 G4double G4LogicalVolume::GetBiasWeight() const
351 {                                                 607 {
352   return fVisAttributes.get();                 << 608   return fBiasWeight;
353 }                                                 609 }
                                                   >> 610 #undef G4MT_solid
                                                   >> 611 #undef G4MT_sdetector
                                                   >> 612 #undef G4MT_fmanager
                                                   >> 613 #undef G4MT_material
                                                   >> 614 // #undef G4MT_mass
                                                   >> 615 // #undef G4MT_ccouple
                                                   >> 616 #undef G4MT_instance
354                                                   617