7 #include <phparameter/PHParameters.h>
13 #include <G4LogicalVolume.hh>
14 #include <G4Material.hh>
15 #include <G4PVPlacement.hh>
16 #include <G4SystemOfUnits.hh>
17 #include <G4VisAttributes.hh>
18 #include <G4tgbVolumeMgr.hh>
30 , m_Params(parameters)
37 std::set<G4VPhysicalVolume *>::const_iterator iter =
56 std::cerr <<
"[+] ERROR in " << __FILE__ <<
": cannot find MODEL TEXT FILE" << std::endl;
62 G4VisAttributes *vis =
new G4VisAttributes(G4Color(0., 0., 0.9, 0.5));
63 vis->SetForceSolid(
true);
64 vis->SetVisibility(
true);
66 vis->SetForceSolid(
true);
67 logicWorld->SetVisAttributes(G4VisAttributes::Invisible);
72 G4tgbVolumeMgr *volmgr = G4tgbVolumeMgr::GetInstance();
75 G4VPhysicalVolume *vesselPhysVol = volmgr->ReadAndConstructDetector();
78 std::cout <<
"[+] detector summary" << std::endl;
79 volmgr->DumpSummary();
80 std::cout <<
"[+] detector G4Solid list" << std::endl;
81 volmgr->DumpG4SolidList();
91 std::cout <<
"[+] Acrylic Wavelength Threshold : " << cfg.
filter_thr / (
nm) <<
" nm\n"
98 gasPO->setOpticalParams();
101 photoSensor->setOpticalParams(
"EICG4dRICH");
104 mirror->setOpticalParams(
"EICG4dRICH");
114 vesselPhysVol->SetRotation(rotation);
115 vesselPhysVol->SetTranslation(*position);
118 logicWorld->AddDaughter(vesselPhysVol);
135 G4String voluName = volu->GetName();
136 G4int voluCopyNo = volu->GetCopyNo();
137 G4LogicalVolume *logi = volu->GetLogicalVolume();
140 if (voluName.contains(
"petal"))
148 G4bool activate =
true;
153 std::cout <<
"[+] activate " << voluName <<
" petal " << petal <<
" copy "
154 << voluCopyNo << std::endl;
157 m_PetalMap.insert(std::pair<G4VPhysicalVolume *, G4int>(volu, petal));
161 G4int nd = logi->GetNoDaughters();
162 for (
int d = 0;
d < nd;
d++)
177 catch (
const std::out_of_range &ex)
179 std::cerr <<
"ERROR in EICG4dRICHDetector: cannot find petal associated with volume"
190 return volu->GetName().contains(
"psst") ? volu->GetCopyNo() : 0;
196 std::cout <<
"EICG4dRICH Detector:" << std::endl;
197 if (what ==
"ALL" || what ==
"VOLUME")
199 std::cout <<
"Version 0.1" << std::endl;
200 std::cout <<
"Parameters:" << std::endl;