8 #include "DD4hep/Filter.h"
18 : name1_(name1), name2_(name2), type_(type) {
20 for (
const auto& lvname : names)
23 << names.size() <<
" LVs: " << ss.str();
24 for (
const auto&
name : names) {
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();
59 fHistory_.NewLevel(pv, kNormal, pv->GetCopyNo());
61 G4ThreeVector globalpoint =
fHistory_.GetTopTransform().Inverse().TransformPoint(G4ThreeVector(0, 0, 0));
62 G4LogicalVolume* lv = pv->GetLogicalVolume();
64 bool flag = ((
type_ / 10) % 10 > 0);
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());
81 theBaseNumber.
addLevel(static_cast<std::string>(name),
fHistory_.GetVolume(
ii)->GetCopyNo());
83 ss <<
" " <<
ii <<
" " << name <<
":" <<
fHistory_.GetVolume(
ii)->GetCopyNo();
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);
Log< level::Info, true > LogVerbatim
std::string noRefl(const std::string &name)
EcalPreshowerNumberingScheme esNumbering_
EcalDumpGeometry(const std::vector< std::string_view > &, const std::string &, const std::string &, int)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const std::string names[nVars_]
void addLevel(const std::string &name, const int ©Number)
uint32_t getUnitID(const EcalBaseNumber &baseNumber) const override
uint32_t getUnitID(const EcalBaseNumber &baseNumber) const override
void dumpTouch(G4VPhysicalVolume *pv, unsigned int leafDepth)
std::vector< CaloDetInfo > infoVec_
std::vector< std::string > names_
EcalEndcapNumberingScheme eeNumbering_
G4NavigationHistory fHistory_
uint32_t getUnitID(const EcalBaseNumber &baseNumber) const override
EcalBarrelNumberingScheme ebNumbering_
void setSize(const int &size)