52 art::ServiceHandle<geo::Geometry const> geoService;
54 std::cout <<
"Number of CRT AuxDets is " << geoService->NAuxDets() << std::endl;
56 assert(geoService->NAuxDets() > 0);
59 std::vector<int> used_copynumbers_auxdet;
60 std::vector<int> used_copynumbers_sensitiveauxdet;
62 for (
size_t i = 0; i < geoService->NAuxDets(); i++) {
65 std::set<std::string> volNames = { adGeo.
TotalVolume()->GetName() };
66 std::vector<std::vector<TGeoNode const*> > paths =
67 geoService->FindAllVolumePaths(volNames);
69 std::string
path =
"";
70 for (
size_t inode=0; inode<paths.at(0).size(); inode++) {
71 path += paths.at(0).at(inode)->GetName();
72 if (inode < paths.at(0).size() - 1) {
77 TGeoManager* manager = geoService->ROOTGeoManager();
78 manager->cd(path.c_str());
84 TGeoNode* nodeArray = manager->GetCurrentNode();
85 TGeoNode* nodeModule = manager->GetMother(1);
86 TGeoNode* nodeTagger = manager->GetMother(2);
90 assert(i == (
size_t)nodeModule->GetNumber());
93 auto iter = std::find(used_copynumbers_auxdet.begin(), used_copynumbers_auxdet.end(),
94 nodeModule->GetNumber());
95 assert(iter == used_copynumbers_auxdet.end());
97 used_copynumbers_auxdet.push_back(nodeModule->GetNumber());
101 assert(nodeArray->GetNdaughters() > 0);
106 assert((
int)geoService->NAuxDetSensitive(i) == nodeArray->GetNdaughters());
108 std::cout <<
"Auxiliary detector ID " << i
109 <<
" with copynumber " << nodeModule->GetNumber()
110 <<
"\n\t strip array name: " << nodeArray->GetName()
111 <<
"\n\t module name: " << nodeModule->GetName()
112 <<
"\n\t tagger name: " << nodeTagger->GetName() << std::endl;
115 for (
int adsid = 0; adsid < nodeArray->GetNdaughters(); adsid++) {
117 TGeoNode* nodeStrip = nodeArray->GetDaughter(adsid);
119 std::cout <<
"\t\t has sensitive detector (strip) with ID " << adsid
120 <<
", name: " << nodeStrip->GetName()
121 <<
" (copynumber " << nodeStrip->GetNumber() <<
")" << std::endl;
124 auto iter2 = std::find(used_copynumbers_sensitiveauxdet.begin(), used_copynumbers_sensitiveauxdet.end(),
125 nodeStrip->GetNumber());
126 assert(iter2 == used_copynumbers_sensitiveauxdet.end());
128 used_copynumbers_sensitiveauxdet.push_back(nodeStrip->GetNumber());
BEGIN_PROLOG triggeremu_data_config_icarus settings PMTADCthresholds sequence::icarus_stage0_multiTPC_TPC physics sequence::icarus_stage0_EastHits_TPC physics sequence::icarus_stage0_WestHits_TPC physics producers purityana0 caloskimCalorimetryCryoE physics caloskimCalorimetryCryoW physics path
const TGeoVolume * TotalVolume() const
BEGIN_PROLOG could also be cout