18 for (
const auto& lvname :
names)
20 G4cout <<
" Testmode: " <<
test <<
" with " <<
names.size() <<
" LVs: " <<
ss.str() << G4endl;
21 const std::vector<std::string> namg = {
"HBS",
"HES",
"HTS",
"HVQ"};
24 if (
std::find(namg.begin(), namg.end(), namex) != namg.end()) {
26 names_.emplace_back(namex);
29 G4cout <<
"HcalDumpGeometry:: dump geometry information for Hcal with " <<
names_.size() <<
" elements:" << G4endl;
30 for (
unsigned int k = 0;
k <
names_.size(); ++
k)
35 G4VPhysicalVolume* theTopPV =
36 G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume();
37 G4cout <<
"HcalDumpGeometry entered with entry of top PV at " << theTopPV << G4endl;
41 G4cout <<
"HcalDumpGeometry finds " <<
infoVec_.size() <<
" touchables" << G4endl;
46 if (
info.flag() && (
info.solid() !=
nullptr)) {
47 info.solid()->DumpInfo();
60 G4ThreeVector globalpoint =
fHistory_.GetTopTransform().Inverse().TransformPoint(G4ThreeVector(0, 0, 0));
61 G4LogicalVolume* lv =
pv->GetLogicalVolume();
65 for (
unsigned int k = 0;
k <
names_.size(); ++
k) {
71 int lay = (
fHistory_.GetVolume(theSize)->GetCopyNo() / 10) % 100 + 1;
72 int det = (
fHistory_.GetVolume(theSize - 1)->GetCopyNo()) / 1000;
76 G4cout <<
"Det " << det <<
" Layer " << lay <<
":" <<
depth <<
" Volume " 77 <<
fHistory_.GetVolume(theSize)->GetName() <<
":" <<
fHistory_.GetVolume(theSize - 1)->GetName()
78 <<
" ID " << std::hex <<
id <<
std::dec << G4endl;
80 G4VSolid* solid = lv->GetSolid();
87 int NoDaughters = lv->GetNoDaughters();
88 while ((NoDaughters--) > 0) {
89 G4VPhysicalVolume* pvD = lv->GetDaughter(NoDaughters);
90 if (!pvD->IsReplicated())
99 if (
name.find(
':') == std::string::npos) {
102 auto n1 =
name.find(
':') + 1;
103 return name.substr(n1, (
name.size() - n1));
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_
G4NavigationHistory fHistory_
HcalDumpGeometry(const std::vector< std::string_view > &, const HcalNumberingFromDDD *, bool, bool flag=false)
HcalID unitID(int det, const math::XYZVectorD &pos, int depth, int lay=-1) const
const HcalNumberingFromDDD * numberingFromDDD_
std::unique_ptr< HcalNumberingScheme > numberingScheme_
void dumpTouch(G4VPhysicalVolume *pv, unsigned int leafDepth)