1 #include "P0DGeometryManager.hxx" 3 #include "TGeoManager.h" 4 #include "TGeoVolume.h" 12 TGeoNode* node = gGeoManager->GetCurrentNode();
13 names.push_back(node->GetName());
20 int rootKey = gGeoManager->GetCurrentNodeId();
22 std::map<ND::TGeometryId,int>::iterator g
25 std::cout <<
"ERROR: Duplicate id: " <<
id << std::endl;;
32 for (
int i=0; i<node->GetNdaughters(); ++i) {
33 gGeoManager->CdDown(i);
46 if (!gGeoManager)
return true;
53 if (!gGeoManager->GetCache()->HasIdArray()) {
54 gGeoManager->GetCache()->BuildIdArray();
58 TGeoVolume* top = gGeoManager->GetTopVolume();
59 std::string topName(top->GetName());
60 if (topName !=
"t2k") {
61 top = gGeoManager->GetVolume(
"t2k");
62 gGeoManager->SetTopVolume(top);
70 gGeoManager->PushPath();
73 std::vector<std::string> names(20); names.clear();
77 gGeoManager->PopPath();
79 std::cout <<
"Geometry identifier map with " 92 return TVector3(9E+99,9E+99,9E+99);
94 int nodeId = pair->second;
95 gGeoManager->PushPath();
96 gGeoManager->CdNode(nodeId);
98 double local[3] = {0,0,0};
99 double master[3] = {0,0,0};
100 gGeoManager->LocalToMaster(local,master);
101 gGeoManager->PopPath();
102 return TVector3(master[0],master[1],master[2]);
std::map< ND::TGeometryId, int > gGeometrySetup_GeomIdMap
Bool_t Notify()
Called when the geometry has changed.
void SetupGeometryRecurseGeomId(std::vector< std::string > &names)
Internal function. A routine to recurse through the TGeoManager geometry.
SetupGeometryP0DFinder * gSetupGeometry_P0DFinder
TVector3 GeomIdPosition(int geomId)
std::map< int, ND::TGeometryId > gGeometrySetup_RootIdMap