14 : numberingFromDDD_(hcn),
flag_(flag) {
20 for (
const auto& lvname : names)
22 edm::LogVerbatim(
"HCalGeom") <<
" Testmode: " << test <<
" with " << names.size() <<
" LVs: " << ss.str();
23 const std::vector<std::string> namg = {
"HBS",
"HES",
"HTS",
"HVQ"};
24 for (
const auto&
name : names) {
26 if (
std::find(namg.begin(), namg.end(), namex) != namg.end()) {
28 names_.emplace_back(namex);
31 edm::LogVerbatim(
"HCalGeom") <<
"HcalDumpGeometry:: dump geometry information for Hcal with " <<
names_.size()
33 for (
unsigned int k = 0;
k <
names_.size(); ++
k)
38 G4VPhysicalVolume* theTopPV =
39 G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume();
40 edm::LogVerbatim(
"HCalGeom") <<
"HcalDumpGeometry entered with entry of top PV at " << theTopPV;
49 if (info.flag() && (info.solid() !=
nullptr)) {
50 info.solid()->DumpInfo();
61 fHistory_.NewLevel(pv, kNormal, pv->GetCopyNo());
63 G4ThreeVector globalpoint =
fHistory_.GetTopTransform().Inverse().TransformPoint(G4ThreeVector(0, 0, 0));
64 G4LogicalVolume* lv = pv->GetLogicalVolume();
68 for (
unsigned int k = 0;
k <
names_.size(); ++
k) {
74 int lay = (
fHistory_.GetVolume(theSize)->GetCopyNo() / 10) % 100 + 1;
75 int det = (
fHistory_.GetVolume(theSize - 1)->GetCopyNo()) / 1000;
77 det,
math::XYZVectorD(globalpoint.x(), globalpoint.y(), globalpoint.z()), depth, lay);
80 edm::LogVerbatim(
"HCalGeom") <<
"Det " << det <<
" Layer " << lay <<
":" << depth <<
" Volume "
81 <<
fHistory_.GetVolume(theSize)->GetName() <<
":"
82 <<
fHistory_.GetVolume(theSize - 1)->GetName() <<
" ID " << std::hex <<
id
86 G4VSolid* solid = lv->GetSolid();
93 int NoDaughters = lv->GetNoDaughters();
94 while ((NoDaughters--) > 0) {
95 G4VPhysicalVolume* pvD = lv->GetDaughter(NoDaughters);
96 if (!pvD->IsReplicated())
105 if (name.find(
':') == std::string::npos) {
108 auto n1 = name.find(
':') + 1;
109 return name.substr(n1, (name.size() - n1));
Log< level::Info, true > LogVerbatim
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const std::string names[nVars_]
std::vector< std::string > names_
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
std::string getNameNoNS(const std::string &name)
std::vector< CaloDetInfo > infoVec_
HcalID unitID(int det, const math::XYZVectorD &pos, int depth, int lay=-1) const
G4NavigationHistory fHistory_
HcalDumpGeometry(const std::vector< std::string_view > &, const HcalNumberingFromDDD *, bool, bool flag=false)
const HcalNumberingFromDDD * numberingFromDDD_
std::unique_ptr< HcalNumberingScheme > numberingScheme_
void dumpTouch(G4VPhysicalVolume *pv, unsigned int leafDepth)