21 #include "TGeoManager.h"
23 const string filename =
"/home/jasinski/bin/pandaroot/geometry/Luminosity-Detector.root";
28 TGeoManager::Import(
filename.c_str());
36 void Get_List_of_Sensors(vector <string>& list_of_sensors,
bool all_nodes =
false,
bool first_call =
true){
42 string nodename(
gGeoManager->GetCurrentNavigator()->GetCurrentNode()->GetName());
45 int nnodes =
gGeoManager->GetCurrentNode()->GetNdaughters();
46 if (nnodes == 0 || all_nodes){
50 for (
int i = 0;
i < nnodes;
i++){
106 bool Set_matrix(
string path, TGeoHMatrix* matrix,
string uniquename,
int uniqueID){
107 if (!matrix)
return false;
109 cout <<
" Error in PndLmdDim::Set_matrix: path " << path <<
" is not valid " << endl;
113 TGeoPhysicalNode *node;
114 pne =
gGeoManager->GetAlignableEntry(uniquename.c_str());
116 cout <<
" creating alignable entry for " << path << endl;
117 pne =
gGeoManager->SetAlignableEntry(uniquename.c_str(), path.c_str(), uniqueID);
119 node =
new TGeoPhysicalNode(path.c_str());
120 pne->SetPhysicalNode(node);
124 cout <<
" Error: no pn entry (alignable node) at " << path <<
" created " << endl;
127 node = pne->GetPhysicalNode();
129 cout <<
" no node found for pn entry (alignable node) at " << path << endl;
132 return node->Align(matrix);
137 vector <string> list_of_sensors;
140 for (
int inode = 0; inode = list_of_sensors.size(); inode++){
141 cout << list_of_sensors[inode] << endl;
void Get_List_of_Sensors(vector< string > &list_of_sensors, bool all_nodes=false, bool first_call=true)
TGeoManager * gGeoManager
int Modify_root_geometry()
bool Set_matrix(string path, TGeoHMatrix *matrix, string uniquename, int uniqueID)