8 #include "DD4hep/Filter.h"
18 : name1_(name1), name2_(
name2), type_(
type) {
20 for (
const auto& lvname :
names)
23 <<
names.size() <<
" LVs: " <<
ss.str();
25 std::string namex = (static_cast<std::string>(dd4hep::dd::noNamespace(
name))).substr(0, 4);
27 names_.emplace_back(namex);
29 edm::LogVerbatim(
"EcalGeom") <<
"EcalDumpGeometry:: dump geometry information for detector of type " <<
type_
30 <<
" with " <<
names_.size() <<
" elements:";
31 for (
unsigned int k = 0;
k <
names_.size(); ++
k)
36 G4VPhysicalVolume* theTopPV =
37 G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume();
38 edm::LogVerbatim(
"EcalGeom") <<
"EcalDumpGeometry entered with entry of top PV at " << theTopPV;
47 if (
info.flag() && (
info.solid() !=
nullptr)) {
48 info.solid()->DumpInfo();
61 G4ThreeVector globalpoint =
fHistory_.GetTopTransform().Inverse().TransformPoint(G4ThreeVector(0, 0, 0));
62 G4LogicalVolume* lv =
pv->GetLogicalVolume();
65 std::string lvname = (static_cast<std::string>(dd4hep::dd::noNamespace(lv->GetName())));
68 for (
unsigned int k = 0;
k <
names_.size(); ++
k) {
73 theBaseNumber.
reset();
75 theBaseNumber.
setSize(theSize + 1);
79 for (
int ii = theSize;
ii >= 0; --
ii) {
80 std::string_view
name = dd4hep::dd::noNamespace(
fHistory_.GetVolume(
ii)->GetName());
94 double r = globalpoint.rho();
99 G4VSolid* solid = (lv->GetSolid());
100 if (((
type_ / 100) % 10) != 0)
109 int NoDaughters = lv->GetNoDaughters();
110 while ((NoDaughters--) > 0) {
111 G4VPhysicalVolume* pvD = lv->GetDaughter(NoDaughters);
112 if (!pvD->IsReplicated())
121 if (
name.find(
"_refl") == std::string::npos) {
124 size_t n =
name.size();
125 return name.substr(0,
n - 5);