Geant4 Cross Reference

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

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /geometry/management/include/G4LogicalVolume.icc (Version 11.3.0) and /geometry/management/include/G4LogicalVolume.icc (Version 9.5.p2)


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