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.1.p3)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
                                                   >>  25 //
                                                   >>  26 //
                                                   >>  27 // $Id: G4LogicalVolume.icc 90701 2015-06-08 09:43:16Z 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 }
                                                   >> 270 
                                                   >> 271 // ********************************************************************
                                                   >> 272 // GetSolid
                                                   >> 273 // ********************************************************************
                                                   >> 274 //
                                                   >> 275 inline
                                                   >> 276 G4VSolid* G4LogicalVolume::GetSolid(G4LVData &instLVdata) // const
                                                   >> 277 {
                                                   >> 278   return instLVdata.fSolid;
                                                   >> 279 }
                                                   >> 280 
                                                   >> 281 inline
                                                   >> 282 G4VSolid* G4LogicalVolume::GetSolid() const
                                                   >> 283 {
                                                   >> 284   // return G4MT_solid;
                                                   >> 285   // return ((subInstanceManager.offset[instanceID]).fSolid);
                                                   >> 286   return this->GetSolid( subInstanceManager.offset[instanceID] ); 
                                                   >> 287 }
                                                   >> 288 
141 // *******************************************    289 // ********************************************************************
142 // GetMasterSolid                                 290 // GetMasterSolid
143 // *******************************************    291 // ********************************************************************
144 //                                                292 //
145 inline                                            293 inline
146 G4VSolid* G4LogicalVolume::GetMasterSolid() co    294 G4VSolid* G4LogicalVolume::GetMasterSolid() const
147 {                                                 295 {
148   return fSolid;                                  296   return fSolid;
149 }                                                 297 }
150                                                   298 
151 // *******************************************    299 // ********************************************************************
                                                   >> 300 // SetSolid
                                                   >> 301 // ********************************************************************
                                                   >> 302 //
                                                   >> 303 inline
                                                   >> 304 void G4LogicalVolume::SetSolid(G4VSolid *pSolid)
                                                   >> 305 {
                                                   >> 306 
                                                   >> 307   // ((subInstanceManager.offset[instanceID]).fSolid) = pSolid;
                                                   >> 308   G4MT_solid=pSolid;
                                                   >> 309   // G4MT_mass = 0.;
                                                   >> 310   this->ResetMass(); 
                                                   >> 311 }
                                                   >> 312 
                                                   >> 313 inline
                                                   >> 314 void G4LogicalVolume::SetSolid(G4LVData &instLVdata, G4VSolid *pSolid)
                                                   >> 315 {  
                                                   >> 316   instLVdata.fSolid = pSolid;
                                                   >> 317   // G4MT_solid=pSolid;
                                                   >> 318   instLVdata.fMass= 0;
                                                   >> 319   // A fast way to reset the mass ... ie G4MT_mass = 0.;
                                                   >> 320 }
                                                   >> 321 
                                                   >> 322 // ********************************************************************
                                                   >> 323 // GetMaterial
                                                   >> 324 // ********************************************************************
                                                   >> 325 //
                                                   >> 326 inline
                                                   >> 327 G4Material* G4LogicalVolume::GetMaterial() const
                                                   >> 328 {
                                                   >> 329   return G4MT_material;
                                                   >> 330 }
                                                   >> 331 
                                                   >> 332 // ********************************************************************
                                                   >> 333 // SetMaterial
                                                   >> 334 // ********************************************************************
                                                   >> 335 //
                                                   >> 336 inline
                                                   >> 337 void G4LogicalVolume::SetMaterial(G4Material *pMaterial)
                                                   >> 338 {
                                                   >> 339   G4MT_material=pMaterial;
                                                   >> 340   G4MT_mass = 0.;
                                                   >> 341 }
                                                   >> 342 
                                                   >> 343 // ********************************************************************
                                                   >> 344 // UpdateMaterial
                                                   >> 345 // ********************************************************************
                                                   >> 346 //
                                                   >> 347 inline
                                                   >> 348 void G4LogicalVolume::UpdateMaterial(G4Material *pMaterial)
                                                   >> 349 {
                                                   >> 350   G4MT_material=pMaterial;
                                                   >> 351   if(fRegion) { G4MT_ccouple = fRegion->FindCouple(pMaterial); }
                                                   >> 352   G4MT_mass = 0.;
                                                   >> 353 }
                                                   >> 354 
                                                   >> 355 // ********************************************************************
                                                   >> 356 // GetSensitiveDetector
                                                   >> 357 // ********************************************************************
                                                   >> 358 //
                                                   >> 359 inline
                                                   >> 360 G4VSensitiveDetector* G4LogicalVolume::GetSensitiveDetector() const
                                                   >> 361 {
                                                   >> 362   return G4MT_sdetector;
                                                   >> 363 }
                                                   >> 364 
                                                   >> 365 // ********************************************************************
152 // GetMasterSensitiveDetector                     366 // GetMasterSensitiveDetector
153 // *******************************************    367 // ********************************************************************
154 //                                                368 //
155 inline                                            369 inline
156 G4VSensitiveDetector* G4LogicalVolume::GetMast    370 G4VSensitiveDetector* G4LogicalVolume::GetMasterSensitiveDetector() const
157 {                                                 371 {
158   return fSensitiveDetector;                      372   return fSensitiveDetector;
159 }                                                 373 }
160                                                   374 
161 // *******************************************    375 // ********************************************************************
                                                   >> 376 // SetSensitiveDetector
                                                   >> 377 // ********************************************************************
                                                   >> 378 //
                                                   >> 379 inline
                                                   >> 380 void G4LogicalVolume::SetSensitiveDetector(G4VSensitiveDetector* pSDetector)
                                                   >> 381 {
                                                   >> 382   G4MT_sdetector = pSDetector;
                                                   >> 383   if(!G4Threading::IsWorkerThread()) fSensitiveDetector = pSDetector;
                                                   >> 384 }
                                                   >> 385 
                                                   >> 386 // ********************************************************************
162 // GetUserLimits                                  387 // GetUserLimits
163 // *******************************************    388 // ********************************************************************
164 //                                                389 //
165 inline                                            390 inline
166 G4UserLimits* G4LogicalVolume::GetUserLimits()    391 G4UserLimits* G4LogicalVolume::GetUserLimits() const
167 {                                                 392 {
168   if(fUserLimits != nullptr) return fUserLimit << 393   if(fUserLimits) return fUserLimits;
169   if(fRegion != nullptr) return fRegion->GetUs << 394   if(fRegion) return fRegion->GetUserLimits();
170   return nullptr;                              << 395   return 0;
171 }                                                 396 }
172                                                   397 
173 // *******************************************    398 // ********************************************************************
174 // SetUserLimits                                  399 // SetUserLimits
175 // *******************************************    400 // ********************************************************************
176 //                                                401 //
177 inline                                            402 inline
178 void G4LogicalVolume::SetUserLimits(G4UserLimi    403 void G4LogicalVolume::SetUserLimits(G4UserLimits* pULimits)
179 {                                                 404 {
180   fUserLimits = pULimits;                         405   fUserLimits = pULimits;
181 }                                                 406 }
182                                                   407 
183 // *******************************************    408 // ********************************************************************
184 // GetVoxelHeader                                 409 // GetVoxelHeader
185 // *******************************************    410 // ********************************************************************
186 //                                                411 //
187 inline                                            412 inline
188 G4SmartVoxelHeader* G4LogicalVolume::GetVoxelH    413 G4SmartVoxelHeader* G4LogicalVolume::GetVoxelHeader() const
189 {                                                 414 {
190   return fVoxel;                                  415   return fVoxel;
191 }                                                 416 }
192                                                   417 
193 // *******************************************    418 // ********************************************************************
194 // SetVoxelHeader                                 419 // SetVoxelHeader
195 // *******************************************    420 // ********************************************************************
196 //                                                421 //
197 inline                                            422 inline
198 void G4LogicalVolume::SetVoxelHeader(G4SmartVo    423 void G4LogicalVolume::SetVoxelHeader(G4SmartVoxelHeader* pVoxel)
199 {                                                 424 {
200   fVoxel = pVoxel;                                425   fVoxel = pVoxel;
201 }                                                 426 }
202                                                   427 
203 // *******************************************    428 // ********************************************************************
204 // GetSmartless                                   429 // GetSmartless
205 // *******************************************    430 // ********************************************************************
206 //                                                431 //
207 inline                                            432 inline
208 G4double G4LogicalVolume::GetSmartless() const    433 G4double G4LogicalVolume::GetSmartless() const
209 {                                                 434 {
210   return fSmartless;                              435   return fSmartless;
211 }                                                 436 }
212                                                   437 
213 // *******************************************    438 // ********************************************************************
214 // SetSmartless                                   439 // SetSmartless
215 // *******************************************    440 // ********************************************************************
216 //                                                441 //
217 inline                                            442 inline
218 void G4LogicalVolume::SetSmartless(G4double sm    443 void G4LogicalVolume::SetSmartless(G4double smt)
219 {                                                 444 {
220   fSmartless = smt;                               445   fSmartless = smt;
221 }                                                 446 }
222                                                   447 
223 // *******************************************    448 // ********************************************************************
224 // IsToOptimise                                   449 // IsToOptimise
225 // *******************************************    450 // ********************************************************************
226 //                                                451 //
227 inline                                            452 inline
228 G4bool G4LogicalVolume::IsToOptimise() const      453 G4bool G4LogicalVolume::IsToOptimise() const
229 {                                                 454 {
230   return fOptimise;                               455   return fOptimise;
231 }                                                 456 }
232                                                   457 
233 // *******************************************    458 // ********************************************************************
234 // SetOptimisation                                459 // SetOptimisation
235 // *******************************************    460 // ********************************************************************
236 //                                                461 //
237 inline                                            462 inline
238 void G4LogicalVolume::SetOptimisation(G4bool o    463 void G4LogicalVolume::SetOptimisation(G4bool optim)
239 {                                                 464 {
240   fOptimise = optim;                              465   fOptimise = optim;
241 }                                                 466 }
242                                                   467 
243 // *******************************************    468 // ********************************************************************
244 // IsRootRegion                                   469 // IsRootRegion
245 // *******************************************    470 // ********************************************************************
246 //                                                471 //
247 inline                                            472 inline
248 G4bool G4LogicalVolume::IsRootRegion() const      473 G4bool G4LogicalVolume::IsRootRegion() const
249 {                                                 474 {
250   return fRootRegion;                             475   return fRootRegion;
251 }                                                 476 }
252                                                   477 
253 // *******************************************    478 // ********************************************************************
254 // SetRegionRootFlag                              479 // SetRegionRootFlag
255 // *******************************************    480 // ********************************************************************
256 //                                                481 //
257 inline                                            482 inline
258 void G4LogicalVolume::SetRegionRootFlag(G4bool    483 void G4LogicalVolume::SetRegionRootFlag(G4bool rreg)
259 {                                                 484 {
260   fRootRegion = rreg;                             485   fRootRegion = rreg;
261 }                                                 486 }
262                                                   487 
263 // *******************************************    488 // ********************************************************************
264 // IsRegion                                       489 // IsRegion
265 // *******************************************    490 // ********************************************************************
266 //                                                491 //
267 inline                                            492 inline
268 G4bool G4LogicalVolume::IsRegion() const          493 G4bool G4LogicalVolume::IsRegion() const
269 {                                                 494 {
270   G4bool reg = false;                             495   G4bool reg = false;
271   if (fRegion != nullptr) reg = true;          << 496   if (fRegion) reg = true;
272   return reg;                                     497   return reg;
273 }                                                 498 }
274                                                   499 
275 // *******************************************    500 // ********************************************************************
276 // SetRegion                                      501 // SetRegion
277 // *******************************************    502 // ********************************************************************
278 //                                                503 //
279 inline                                            504 inline
280 void G4LogicalVolume::SetRegion(G4Region* reg)    505 void G4LogicalVolume::SetRegion(G4Region* reg)
281 {                                                 506 {
282   fRegion = reg;                                  507   fRegion = reg;
283 }                                                 508 }
284                                                   509 
285 // *******************************************    510 // ********************************************************************
286 // GetRegion                                      511 // GetRegion
287 // *******************************************    512 // ********************************************************************
288 //                                                513 //
289 inline                                            514 inline
290 G4Region* G4LogicalVolume::GetRegion() const      515 G4Region* G4LogicalVolume::GetRegion() const
291 {                                                 516 {
292   return fRegion;                                 517   return fRegion;
293 }                                                 518 }
294                                                   519 
295 // *******************************************    520 // ********************************************************************
296 // PropagateRegion                                521 // PropagateRegion
297 // *******************************************    522 // ********************************************************************
298 //                                                523 //
299 inline                                            524 inline
300 void G4LogicalVolume::PropagateRegion()           525 void G4LogicalVolume::PropagateRegion()
301 {                                                 526 {
302   fRegion->ScanVolumeTree(this, true);            527   fRegion->ScanVolumeTree(this, true);
303 }                                                 528 }
304                                                   529 
305 // *******************************************    530 // ********************************************************************
                                                   >> 531 // GetMaterialCutsCouple
                                                   >> 532 // ********************************************************************
                                                   >> 533 //
                                                   >> 534 inline
                                                   >> 535 const G4MaterialCutsCouple* G4LogicalVolume::GetMaterialCutsCouple() const
                                                   >> 536 {
                                                   >> 537   return G4MT_ccouple;
                                                   >> 538 }
                                                   >> 539 
                                                   >> 540 // ********************************************************************
                                                   >> 541 // SetMaterialCutsCouple
                                                   >> 542 // ********************************************************************
                                                   >> 543 //
                                                   >> 544 inline
                                                   >> 545 void G4LogicalVolume::SetMaterialCutsCouple(G4MaterialCutsCouple* cuts)
                                                   >> 546 {
                                                   >> 547   G4MT_ccouple = cuts;
                                                   >> 548 }
                                                   >> 549 
                                                   >> 550 // ********************************************************************
306 // Lock                                           551 // Lock
307 // *******************************************    552 // ********************************************************************
308 //                                                553 //
309 inline                                            554 inline
310 void G4LogicalVolume::Lock()                      555 void G4LogicalVolume::Lock()
311 {                                                 556 {
312   fLock = true;                                   557   fLock = true;
313 }                                                 558 }
314                                                   559 
315 // *******************************************    560 // ********************************************************************
316 // Operator ==                                    561 // Operator ==
317 // *******************************************    562 // ********************************************************************
318 //                                                563 //
319 inline                                            564 inline
320 G4bool G4LogicalVolume::operator == ( const G4    565 G4bool G4LogicalVolume::operator == ( const G4LogicalVolume& lv) const
321 {                                                 566 {
322   return this==&lv;                            << 567   return (this==&lv) ? true : false;
323 }                                                 568 }
324                                                   569 
325 // *******************************************    570 // ********************************************************************
326 // SetBiasWeight                               << 571 // GetVisAttributes
327 // *******************************************    572 // ********************************************************************
328 //                                                573 //
329 inline                                            574 inline
330 void G4LogicalVolume::SetBiasWeight(G4double w << 575 const G4VisAttributes* G4LogicalVolume::GetVisAttributes () const
331 {                                                 576 {
332   fBiasWeight = weight;                        << 577   return fVisAttributes;
333 }                                                 578 }
334                                                   579 
335 // *******************************************    580 // ********************************************************************
336 // GetBiasWeight                               << 581 // SetVisAttributes
337 // *******************************************    582 // ********************************************************************
338 //                                                583 //
339 inline                                            584 inline
340 G4double G4LogicalVolume::GetBiasWeight() cons << 585 void G4LogicalVolume::SetVisAttributes (const G4VisAttributes* pVA)
341 {                                                 586 {
342   return fBiasWeight;                          << 587   fVisAttributes = pVA;
343 }                                                 588 }
344                                                   589 
345 // *******************************************    590 // ********************************************************************
346 // GetVisAttributes                            << 591 // SetBiasWeight
347 // *******************************************    592 // ********************************************************************
348 //                                                593 //
349 inline                                            594 inline
350 const G4VisAttributes* G4LogicalVolume::GetVis << 595 void G4LogicalVolume::SetBiasWeight(G4double weight)
                                                   >> 596 {
                                                   >> 597   fBiasWeight = weight;
                                                   >> 598 }
                                                   >> 599 
                                                   >> 600 // ********************************************************************
                                                   >> 601 // GetBiasWeight
                                                   >> 602 // ********************************************************************
                                                   >> 603 //
                                                   >> 604 inline
                                                   >> 605 G4double G4LogicalVolume::GetBiasWeight() const
351 {                                                 606 {
352   return fVisAttributes.get();                 << 607   return fBiasWeight;
353 }                                                 608 }
                                                   >> 609 #undef G4MT_solid
                                                   >> 610 #undef G4MT_sdetector
                                                   >> 611 #undef G4MT_fmanager
                                                   >> 612 #undef G4MT_material
                                                   >> 613 // #undef G4MT_mass
                                                   >> 614 // #undef G4MT_ccouple
                                                   >> 615 #undef G4MT_instance
354                                                   616