LDMX Software
ParallelWorld.cxx
1
2#include "SimCore/ParallelWorld.h"
3
4#include "Framework/Configure/Parameters.h"
5
6namespace simcore {
7ParallelWorld::ParallelWorld(G4GDMLParser *parser, G4String worldName)
8 : G4VUserParallelWorld(worldName),
9 parser_(parser),
10 auxInfoReader_(
11 new geo::AuxInfoReader(parser, framework::config::Parameters())) {}
12
14
15void ParallelWorld::Construct() {}
16
17void ParallelWorld::ConstructSD() {
18 G4VPhysicalVolume *worldPhysical = GetWorld();
19 G4LogicalVolume *worldLogical = worldPhysical->GetLogicalVolume();
20
21 G4LogicalVolume *parallelWorldLogical =
22 parser_->GetWorldVolume()->GetLogicalVolume();
24
25 for (int index = 0; index < parallelWorldLogical->GetNoDaughters(); index++) {
26 G4VPhysicalVolume *physicalVol = parallelWorldLogical->GetDaughter(index);
27 ldmx_log(debug) << "Adding : " << physicalVol->GetName()
28 << " to parallel world.";
29 worldLogical->AddDaughter(physicalVol);
30 }
31
33}
34} // namespace simcore
G4GDMLParser * parser_
GDML parser.
ParallelWorld(G4GDMLParser *parser, G4String worldName)
Constructor.
geo::AuxInfoReader * auxInfoReader_
The auxiliary GDML info reader.
void assignAuxInfoToVolumes()
Assign auxiliary info to volumes such as sensitive detectors.
void readGlobalAuxInfo()
Read the global auxiliary information from the auxinfo block.
All classes in the ldmx-sw project use this namespace.
Definition PerfDict.cxx:45