13 #include "G4VPhysicalVolume.hh"
14 #include "G4PVPlacement.hh"
15 #include "G4LogicalVolume.hh"
16 #include "G4VSolid.hh"
17 #include "G4Region.hh"
18 #include "G4RegionStore.hh"
20 #include "G4GenericMessenger.hh"
21 #include "G4VisAttributes.hh"
22 #include "G4Version.hh"
42 "Define the input GDML file");
43 gdmlCmd.SetToBeBroadcasted(
false);
44 gdmlCmd.SetStates(G4State_PreInit);
46 "Define material definition file");
47 matCmd.SetToBeBroadcasted(
false);
48 matCmd.SetStates(G4State_PreInit);
55 G4Exception(
"eASTSupportStructure::Construct",
"eASTSupportStructure000",
56 FatalException,
"GDML file is not specified.");
60 #if G4VERSION_NUMBER > 1100
72 regInfo->SetSupportStructure();
73 pRegion->SetUserInformation(regInfo);
78 auto tempEnvLog = tempEnv->GetLogicalVolume();
79 auto tempEnvSolid = tempEnvLog->GetSolid();
80 G4int ndaughter = G4int(tempEnvLog->GetNoDaughters());
81 auto visAtt =
new G4VisAttributes(G4Colour(1.0,0.0,1.0));
82 for(G4int idaughter=0;idaughter<ndaughter;idaughter++)
84 auto daughter = tempEnvLog->GetDaughter(idaughter);
86 if(new_rmat!=G4RotationMatrix())
88 auto prmat =
const_cast<G4RotationMatrix*
>(daughter->GetFrameRotation());
89 if(prmat==
nullptr) prmat =
new G4RotationMatrix();
90 *prmat *= new_rmat.inverse();
91 daughter->SetRotation(prmat);
93 auto tran = daughter->GetObjectTranslation();
95 daughter->SetTranslation(tran);
96 daughter->GetLogicalVolume()->SetVisAttributes(visAtt);
97 worldPhys->GetLogicalVolume()->AddDaughter(daughter);
98 daughter->SetMotherLogical(worldPhys->GetLogicalVolume());
99 daughter->GetLogicalVolume()->SetRegion(
pRegion);
100 pRegion->AddRootLogicalVolume(daughter->GetLogicalVolume());