Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/advanced/CaTS/src/DetectorConstruction.cc

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 /examples/advanced/CaTS/src/DetectorConstruction.cc (Version 11.3.0) and /examples/advanced/CaTS/src/DetectorConstruction.cc (Version 11.1.1)


  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 //                                                 25 //
 26 // *******************************************     26 // ********************************************************************
 27 //                                                 27 //
 28 //  CaTS (Calorimetry and Tracking Simulation)     28 //  CaTS (Calorimetry and Tracking Simulation)
 29 //                                                 29 //
 30 //  Authors : Hans Wenzel                          30 //  Authors : Hans Wenzel
 31 //            Soon Yung Jun                        31 //            Soon Yung Jun
 32 //            (Fermi National Accelerator Labo     32 //            (Fermi National Accelerator Laboratory)
 33 //                                                 33 //
 34 // History                                         34 // History
 35 //   October 18th, 2021 : first implementation     35 //   October 18th, 2021 : first implementation
 36 //                                                 36 //
 37 // *******************************************     37 // ********************************************************************
 38 //                                                 38 //
 39 /// \file DetectorConstruction.cc                  39 /// \file DetectorConstruction.cc
 40 /// \brief Implementation of the CaTS::Detecto     40 /// \brief Implementation of the CaTS::DetectorConstruction class
 41                                                    41 
 42 // Geant4 headers                                  42 // Geant4 headers
 43 #include "G4RunManager.hh"                         43 #include "G4RunManager.hh"
 44 #include "G4PhysicalVolumeStore.hh"                44 #include "G4PhysicalVolumeStore.hh"
 45 #include "G4LogicalVolumeStore.hh"                 45 #include "G4LogicalVolumeStore.hh"
 46 #include "G4VisAttributes.hh"                      46 #include "G4VisAttributes.hh"
 47 #include "G4UserLimits.hh"                         47 #include "G4UserLimits.hh"
 48 #include "G4ios.hh"                                48 #include "G4ios.hh"
 49 #include "G4SDManager.hh"                          49 #include "G4SDManager.hh"
 50 #include "G4GDMLParser.hh"                         50 #include "G4GDMLParser.hh"
 51 // project headers                                 51 // project headers
 52 #include "ConfigurationManager.hh"                 52 #include "ConfigurationManager.hh"
 53 #include "DetectorConstruction.hh"                 53 #include "DetectorConstruction.hh"
 54 #include "TrackerSD.hh"                            54 #include "TrackerSD.hh"
 55 #include "MscSD.hh"                                55 #include "MscSD.hh"
 56 #include "lArTPCSD.hh"                             56 #include "lArTPCSD.hh"
 57 #include "CalorimeterSD.hh"                        57 #include "CalorimeterSD.hh"
 58 #include "DRCalorimeterSD.hh"                      58 #include "DRCalorimeterSD.hh"
 59 #include "RadiatorSD.hh"                           59 #include "RadiatorSD.hh"
 60 #include "PhotonSD.hh"                             60 #include "PhotonSD.hh"
 61 #include "InteractionSD.hh"                        61 #include "InteractionSD.hh"
 62 #include "ColorReader.hh"                          62 #include "ColorReader.hh"
 63 // c++ headers                                     63 // c++ headers
 64 #include <iostream>                                64 #include <iostream>
 65                                                    65 
 66 DetectorConstruction::DetectorConstruction(G4S     66 DetectorConstruction::DetectorConstruction(G4String fname)
 67   : G4VUserDetectorConstruction()                  67   : G4VUserDetectorConstruction()
 68   , gdmlFile(fname)                                68   , gdmlFile(fname)
 69 {}                                                 69 {}
 70                                                    70 
 71 DetectorConstruction::~DetectorConstruction()      71 DetectorConstruction::~DetectorConstruction() {}
 72 G4VPhysicalVolume* DetectorConstruction::Const     72 G4VPhysicalVolume* DetectorConstruction::Construct()
 73 {                                                  73 {
 74   verbose = ConfigurationManager::getInstance(     74   verbose = ConfigurationManager::getInstance()->isEnable_verbose();
 75   ReadGDML();                                      75   ReadGDML();
 76   const G4GDMLAuxMapType* auxmap = parser->Get     76   const G4GDMLAuxMapType* auxmap = parser->GetAuxMap();
 77   if(verbose)                                      77   if(verbose)
 78   {                                                78   {
 79     G4cout << "Found " << auxmap->size()           79     G4cout << "Found " << auxmap->size()
 80            << " volume(s) with auxiliary infor     80            << " volume(s) with auxiliary information." << G4endl << G4endl;
 81   }                                                81   }
 82   for(G4GDMLAuxMapType::const_iterator iter =      82   for(G4GDMLAuxMapType::const_iterator iter = auxmap->begin();
 83       iter != auxmap->end(); iter++)               83       iter != auxmap->end(); iter++)
 84   {                                                84   {
 85     if(verbose)                                    85     if(verbose)
 86     {                                              86     {
 87       G4cout << "Volume " << ((*iter).first)->     87       G4cout << "Volume " << ((*iter).first)->GetName()
 88              << " has the following list of au     88              << " has the following list of auxiliary information: " << G4endl;
 89     }                                              89     }
 90     for(G4GDMLAuxListType::const_iterator vit      90     for(G4GDMLAuxListType::const_iterator vit = (*iter).second.begin();
 91         vit != (*iter).second.end(); vit++)        91         vit != (*iter).second.end(); vit++)
 92     {                                              92     {
 93       if(verbose)                                  93       if(verbose)
 94       {                                            94       {
 95         G4cout << "--> Type: " << (*vit).type      95         G4cout << "--> Type: " << (*vit).type << " Value: " << (*vit).value
 96                << G4endl;                          96                << G4endl;
 97       }                                            97       }
 98       if((*vit).type == "StepLimit")               98       if((*vit).type == "StepLimit")
 99       {                                            99       {
100         G4UserLimits* fStepLimit = new G4UserL    100         G4UserLimits* fStepLimit = new G4UserLimits(atof((*vit).value));
101         ((*iter).first)->SetUserLimits(fStepLi    101         ((*iter).first)->SetUserLimits(fStepLimit);
102       }                                           102       }
103     }                                             103     }
104   }                                               104   }
105   G4VPhysicalVolume* worldPhysVol = parser->Ge    105   G4VPhysicalVolume* worldPhysVol = parser->GetWorldVolume();
106   if(ConfigurationManager::getInstance()->isDu    106   if(ConfigurationManager::getInstance()->isDumpgdml())
107   {                                               107   {
108     std::ifstream ifile;                          108     std::ifstream ifile;
109     ifile.open(ConfigurationManager::getInstan    109     ifile.open(ConfigurationManager::getInstance()->getGDMLFileName());
110     if(ifile)                                     110     if(ifile)
111     {                                             111     {
112       G4cout << "*****************************    112       G4cout << "****************************************************"
113              << G4endl;                           113              << G4endl;
114       G4cout << ConfigurationManager::getInsta    114       G4cout << ConfigurationManager::getInstance()->getGDMLFileName()
115              << " already exists!!!" << G4endl    115              << " already exists!!!" << G4endl;
116       G4cout << "No new gdml dump created!!!"     116       G4cout << "No new gdml dump created!!!" << G4endl;
117       G4cout << "*****************************    117       G4cout << "****************************************************"
118              << G4endl;                           118              << G4endl;
119     }                                             119     }
120     else                                          120     else
121     {                                             121     {
122       G4cout << "Writing: "                       122       G4cout << "Writing: "
123              << ConfigurationManager::getInsta    123              << ConfigurationManager::getInstance()->getGDMLFileName()
124              << G4endl;                           124              << G4endl;
125       parser->Write(ConfigurationManager::getI    125       parser->Write(ConfigurationManager::getInstance()->getGDMLFileName(),
126                     worldPhysVol);                126                     worldPhysVol);
127     }                                             127     }
128   }                                               128   }
129   return worldPhysVol;                            129   return worldPhysVol;
130 }                                                 130 }
131 void DetectorConstruction::ConstructSDandField    131 void DetectorConstruction::ConstructSDandField()
132 {                                                 132 {
133   G4SDManager* SDman             = G4SDManager    133   G4SDManager* SDman             = G4SDManager::GetSDMpointer();
134   const G4GDMLAuxMapType* auxmap = parser->Get    134   const G4GDMLAuxMapType* auxmap = parser->GetAuxMap();
135   if(verbose)                                     135   if(verbose)
136   {                                               136   {
137     G4cout << "Found " << auxmap->size()          137     G4cout << "Found " << auxmap->size()
138            << " volume(s) with auxiliary infor    138            << " volume(s) with auxiliary information." << G4endl << G4endl;
139   }                                               139   }
140   for(G4GDMLAuxMapType::const_iterator iter =     140   for(G4GDMLAuxMapType::const_iterator iter = auxmap->begin();
141       iter != auxmap->end(); iter++)              141       iter != auxmap->end(); iter++)
142   {                                               142   {
143     if(verbose)                                   143     if(verbose)
144     {                                             144     {
145       G4cout << "Volume " << ((*iter).first)->    145       G4cout << "Volume " << ((*iter).first)->GetName()
146              << " has the following list of au    146              << " has the following list of auxiliary information: " << G4endl;
147     }                                             147     }
148     for(G4GDMLAuxListType::const_iterator vit     148     for(G4GDMLAuxListType::const_iterator vit = (*iter).second.begin();
149         vit != (*iter).second.end(); vit++)       149         vit != (*iter).second.end(); vit++)
150     {                                             150     {
151       if(verbose)                                 151       if(verbose)
152       {                                           152       {
153         G4cout << "--> Type: " << (*vit).type     153         G4cout << "--> Type: " << (*vit).type << " Value: " << (*vit).value
154                << G4endl;                         154                << G4endl;
155       }                                           155       }
156       if((*vit).type == "SensDet")                156       if((*vit).type == "SensDet")
157       {                                           157       {
158         if(verbose)                               158         if(verbose)
159         {                                         159         {
160           G4cout << "Found sensitive Detector:    160           G4cout << "Found sensitive Detector: " << (*vit).value << G4endl;
161         }                                         161         }
162         if((*vit).value == "PhotonDetector")      162         if((*vit).value == "PhotonDetector")
163         {                                         163         {
164           G4String name       = ((*iter).first    164           G4String name       = ((*iter).first)->GetName() + "_Photondetector";
165           PhotonSD* aPhotonSD = new PhotonSD(n    165           PhotonSD* aPhotonSD = new PhotonSD(name);
166           SDman->AddNewDetector(aPhotonSD);       166           SDman->AddNewDetector(aPhotonSD);
167           ((*iter).first)->SetSensitiveDetecto    167           ((*iter).first)->SetSensitiveDetector(aPhotonSD);
168           if(verbose)                             168           if(verbose)
169           {                                       169           {
170             G4cout << "Attaching sensitive Det    170             G4cout << "Attaching sensitive Detector: " << (*vit).value
171                    << " to Volume:  " << ((*it    171                    << " to Volume:  " << ((*iter).first)->GetName() << G4endl;
172           }                                       172           }
173         }                                         173         }
174         else if((*vit).value == "Target")         174         else if((*vit).value == "Target")
175         {                                         175         {
176           G4String name = ((*iter).first)->Get    176           G4String name = ((*iter).first)->GetName() + "_Target";
177           InteractionSD* aInteractionSD = new     177           InteractionSD* aInteractionSD = new InteractionSD(name);
178           SDman->AddNewDetector(aInteractionSD    178           SDman->AddNewDetector(aInteractionSD);
179           ((*iter).first)->SetSensitiveDetecto    179           ((*iter).first)->SetSensitiveDetector(aInteractionSD);
180           if(verbose)                             180           if(verbose)
181           {                                       181           {
182             G4cout << "Attaching sensitive Det    182             G4cout << "Attaching sensitive Detector: " << (*vit).value
183                    << " to Volume:  " << ((*it    183                    << " to Volume:  " << ((*iter).first)->GetName() << G4endl;
184           }                                       184           }
185         }                                         185         }
186         else if((*vit).value == "Tracker")        186         else if((*vit).value == "Tracker")
187         {                                         187         {
188           G4String name         = ((*iter).fir    188           G4String name         = ((*iter).first)->GetName() + "_Tracker";
189           TrackerSD* aTrackerSD = new TrackerS    189           TrackerSD* aTrackerSD = new TrackerSD(name);
190           SDman->AddNewDetector(aTrackerSD);      190           SDman->AddNewDetector(aTrackerSD);
191           ((*iter).first)->SetSensitiveDetecto    191           ((*iter).first)->SetSensitiveDetector(aTrackerSD);
192           if(verbose)                             192           if(verbose)
193           {                                       193           {
194             G4cout << "Attaching sensitive Det    194             G4cout << "Attaching sensitive Detector: " << (*vit).value
195                    << " to Volume:  " << ((*it    195                    << " to Volume:  " << ((*iter).first)->GetName() << G4endl;
196           }                                       196           }
197         }                                         197         }
198         else if((*vit).value == "Msc")            198         else if((*vit).value == "Msc")
199         {                                         199         {
200           G4String name = ((*iter).first)->Get    200           G4String name = ((*iter).first)->GetName() + "_Msc";
201           MscSD* aMscSD = new MscSD(name);        201           MscSD* aMscSD = new MscSD(name);
202           SDman->AddNewDetector(aMscSD);          202           SDman->AddNewDetector(aMscSD);
203           ((*iter).first)->SetSensitiveDetecto    203           ((*iter).first)->SetSensitiveDetector(aMscSD);
204           if(verbose)                             204           if(verbose)
205           {                                       205           {
206             G4cout << "Attaching sensitive Det    206             G4cout << "Attaching sensitive Detector: " << (*vit).value
207                    << " to Volume:  " << ((*it    207                    << " to Volume:  " << ((*iter).first)->GetName() << G4endl;
208           }                                       208           }
209         }                                         209         }
210         else if((*vit).value == "lArTPC")         210         else if((*vit).value == "lArTPC")
211         {                                         211         {
212           G4String name       = ((*iter).first    212           G4String name       = ((*iter).first)->GetName() + "_lArTPC";
213           lArTPCSD* alArTPCSD = new lArTPCSD(n    213           lArTPCSD* alArTPCSD = new lArTPCSD(name);
214           SDman->AddNewDetector(alArTPCSD);       214           SDman->AddNewDetector(alArTPCSD);
215           ((*iter).first)->SetSensitiveDetecto    215           ((*iter).first)->SetSensitiveDetector(alArTPCSD);
216           if(verbose)                             216           if(verbose)
217           {                                       217           {
218             G4cout << "Attaching sensitive Det    218             G4cout << "Attaching sensitive Detector: " << (*vit).value
219                    << " to Volume:  " << ((*it    219                    << " to Volume:  " << ((*iter).first)->GetName() << G4endl;
220           }                                       220           }
221         }                                         221         }
222         else if((*vit).value == "Radiator")       222         else if((*vit).value == "Radiator")
223         {                                         223         {
224           G4String name           = ((*iter).f    224           G4String name           = ((*iter).first)->GetName() + "_Radiator";
225           RadiatorSD* aRadiatorSD = new Radiat    225           RadiatorSD* aRadiatorSD = new RadiatorSD(name);
226           SDman->AddNewDetector(aRadiatorSD);     226           SDman->AddNewDetector(aRadiatorSD);
227           ((*iter).first)->SetSensitiveDetecto    227           ((*iter).first)->SetSensitiveDetector(aRadiatorSD);
228           if(verbose)                             228           if(verbose)
229           {                                       229           {
230             G4cout << "Attaching sensitive Det    230             G4cout << "Attaching sensitive Detector: " << (*vit).value
231                    << " to Volume:  " << ((*it    231                    << " to Volume:  " << ((*iter).first)->GetName() << G4endl;
232           }                                       232           }
233         }                                         233         }
234         else if((*vit).value == "Calorimeter")    234         else if((*vit).value == "Calorimeter")
235         {                                         235         {
236           G4String name = ((*iter).first)->Get    236           G4String name = ((*iter).first)->GetName() + "_Calorimeter";
237           CalorimeterSD* aCalorimeterSD = new     237           CalorimeterSD* aCalorimeterSD = new CalorimeterSD(name);
238           SDman->AddNewDetector(aCalorimeterSD    238           SDman->AddNewDetector(aCalorimeterSD);
239           ((*iter).first)->SetSensitiveDetecto    239           ((*iter).first)->SetSensitiveDetector(aCalorimeterSD);
240           if(verbose)                             240           if(verbose)
241           {                                       241           {
242             G4cout << "Attaching sensitive Det    242             G4cout << "Attaching sensitive Detector: " << (*vit).value
243                    << " to Volume:  " << ((*it    243                    << " to Volume:  " << ((*iter).first)->GetName() << G4endl;
244           }                                       244           }
245         }                                         245         }
246         else if((*vit).value == "DRCalorimeter    246         else if((*vit).value == "DRCalorimeter")
247         {                                         247         {
248           G4String name = ((*iter).first)->Get    248           G4String name = ((*iter).first)->GetName() + "_DRCalorimeter";
249           DRCalorimeterSD* aDRCalorimeterSD =     249           DRCalorimeterSD* aDRCalorimeterSD = new DRCalorimeterSD(name);
250           SDman->AddNewDetector(aDRCalorimeter    250           SDman->AddNewDetector(aDRCalorimeterSD);
251           ((*iter).first)->SetSensitiveDetecto    251           ((*iter).first)->SetSensitiveDetector(aDRCalorimeterSD);
252           if(verbose)                             252           if(verbose)
253           {                                       253           {
254             G4cout << "Attaching sensitive Det    254             G4cout << "Attaching sensitive Detector: " << (*vit).value
255                    << " to Volume:  " << ((*it    255                    << " to Volume:  " << ((*iter).first)->GetName() << G4endl;
256           }                                       256           }
257         }                                         257         }
258       }                                           258       }
259       else if((*vit).type == "Solid")             259       else if((*vit).type == "Solid")
260       {                                           260       {
261         if((*vit).value == "True")                261         if((*vit).value == "True")
262         {                                         262         {
263           G4VisAttributes* visibility = new G4    263           G4VisAttributes* visibility = new G4VisAttributes();
264           visibility->SetForceSolid(true);        264           visibility->SetForceSolid(true);
265           G4VisAttributes* visatt = new G4VisA    265           G4VisAttributes* visatt = new G4VisAttributes(
266             ((*iter).first)->GetVisAttributes(    266             ((*iter).first)->GetVisAttributes()->GetColour());
267           visatt->SetVisibility(true);            267           visatt->SetVisibility(true);
268           visatt->SetForceSolid(true);            268           visatt->SetForceSolid(true);
269           visatt->SetForceAuxEdgeVisible(true)    269           visatt->SetForceAuxEdgeVisible(true);
270           ((*iter).first)->SetVisAttributes(vi    270           ((*iter).first)->SetVisAttributes(visatt);
271         }                                         271         }
272       }                                           272       }
273     }                                             273     }
274   }                                               274   }
275 }                                                 275 }
276 void DetectorConstruction::ReadGDML()             276 void DetectorConstruction::ReadGDML()
277 {                                                 277 {
278   fReader = new ColorReader;                      278   fReader = new ColorReader;
279   parser  = new G4GDMLParser(fReader);            279   parser  = new G4GDMLParser(fReader);
280   parser->Read(gdmlFile, false);                  280   parser->Read(gdmlFile, false);
281   G4VPhysicalVolume* World = parser->GetWorldV    281   G4VPhysicalVolume* World = parser->GetWorldVolume();
282   //----- GDML parser makes world invisible, t    282   //----- GDML parser makes world invisible, this is a hack to make it
283   // visible again...                             283   // visible again...
284   G4LogicalVolume* pWorldLogical = World->GetL    284   G4LogicalVolume* pWorldLogical = World->GetLogicalVolume();
285   pWorldLogical->SetVisAttributes(0);             285   pWorldLogical->SetVisAttributes(0);
286   G4cout << World->GetTranslation() << G4endl     286   G4cout << World->GetTranslation() << G4endl << G4endl;
287   if(verbose)                                     287   if(verbose)
288   {                                               288   {
289     G4cout << "Found World:  " << World->GetNa    289     G4cout << "Found World:  " << World->GetName() << G4endl;
290     G4cout << "World LV:  " << World->GetLogic    290     G4cout << "World LV:  " << World->GetLogicalVolume()->GetName() << G4endl;
291   }                                               291   }
292   G4LogicalVolumeStore* pLVStore = G4LogicalVo    292   G4LogicalVolumeStore* pLVStore = G4LogicalVolumeStore::GetInstance();
293   if(verbose)                                     293   if(verbose)
294   {                                               294   {
295     G4cout << "Found " << pLVStore->size() <<     295     G4cout << "Found " << pLVStore->size() << " logical volumes." << G4endl
296            << G4endl;                             296            << G4endl;
297   }                                               297   }
298   G4PhysicalVolumeStore* pPVStore = G4Physical    298   G4PhysicalVolumeStore* pPVStore = G4PhysicalVolumeStore::GetInstance();
299   if(verbose)                                     299   if(verbose)
300   {                                               300   {
301     G4cout << "Found " << pPVStore->size() <<     301     G4cout << "Found " << pPVStore->size() << " physical volumes." << G4endl
302            << G4endl;                             302            << G4endl;
303   }                                               303   }
304 }                                                 304 }
305                                                   305 
306 void DetectorConstruction::UpdateGeometry()       306 void DetectorConstruction::UpdateGeometry()
307 {                                                 307 {
308   G4RunManager::GetRunManager()->DefineWorldVo    308   G4RunManager::GetRunManager()->DefineWorldVolume(Construct());
309 }                                                 309 }
310                                                   310