29 #include <phgeom/PHGeomUtility.h>
30 #include <phgeom/PHGeomIOTGeo.h>
31 #include <phgeom/PHGeomTGeo.h>
51 #include <ActsExamples/Detector/IBaseDetector.hpp>
52 #include <ActsExamples/EventData/Track.hpp>
53 #include <ActsExamples/Framework/AlgorithmContext.hpp>
54 #include <ActsExamples/Framework/IContextDecorator.hpp>
55 #include <ActsExamples/Framework/WhiteBoard.hpp>
56 #include <ActsExamples/Geometry/CommonGeometry.hpp>
57 #include <ActsExamples/Options/CommonOptions.hpp>
58 #include <ActsExamples/Plugins/Obj/ObjWriterOptions.hpp>
59 #include <ActsExamples/Utilities/Options.hpp>
61 #include <TGeoManager.h>
87 if( child->volumeName() ==
name )
return child;
88 else if(
auto found = find_volume_by_name( child.get(),
name ) )
return found;
130 for(
const auto&
surface:surfaceVector )
141 { std::cout <<
"MakeActsGeometry::InitRun - TPC volume id: " <<
id << std::endl; }
144 { std::cout <<
"MakeActsGeometry::InitRun - Micromegas volume id: " <<
id << std::endl; }
170 std::cout <<
" NOT adding TPC and MMs surfaces" << std::endl;
180 std::cout <<
" WILL add MMs surfaces to ActsSurfaceMap " << std::endl;
222 TGeoVolume *World_vol = geoManager->GetTopVolume();
227 TGeoNode *tpc_envelope_node =
nullptr;
228 TGeoNode *tpc_gas_north_node =
nullptr;
233 std::cout <<
"EditTPCGeometry - searching under volume: ";
236 for (
int i = 0; i < World_vol->GetNdaughters(); i++)
238 TString node_name = World_vol->GetNode(i)->GetName();
240 if (node_name.BeginsWith(
"tpc_envelope"))
243 std::cout <<
"EditTPCGeometry - found " << node_name << std::endl;
245 tpc_envelope_node = World_vol->GetNode(i);
249 assert(tpc_envelope_node);
252 TGeoVolume *tpc_envelope_vol = tpc_envelope_node->GetVolume();
253 assert(tpc_envelope_vol);
256 std::cout <<
"EditTPCGeometry - searching under volume: ";
257 tpc_envelope_vol->Print();
260 for (
int i = 0; i < tpc_envelope_vol->GetNdaughters(); i++)
262 TString node_name = tpc_envelope_vol->GetNode(i)->GetName();
264 if (node_name.BeginsWith(
"tpc_gas_north"))
267 std::cout <<
"EditTPCGeometry - found " << node_name << std::endl;
269 tpc_gas_north_node = tpc_envelope_vol->GetNode(i);
274 assert(tpc_gas_north_node);
275 TGeoVolume *tpc_gas_north_vol = tpc_gas_north_node->GetVolume();
276 assert(tpc_gas_north_vol);
280 std::cout <<
"EditTPCGeometry - gas volume: ";
281 tpc_gas_north_vol->Print();
297 TGeoNode *micromegas_envelope_node =
nullptr;
298 for (
int i = 0; i < World_vol->GetNdaughters(); i++)
300 TString node_name = World_vol->GetNode(i)->GetName();
302 if (node_name.BeginsWith(
"MICROMEGAS"))
305 std::cout <<
"EditTPCGeometry - found micromegas node " << node_name << std::endl;
307 micromegas_envelope_node = World_vol->GetNode(i);
324 TGeoVolume *micromegas_envelope_vol = micromegas_envelope_node->GetVolume();
325 assert(micromegas_envelope_vol);
328 for (
int i = 0; i < micromegas_envelope_vol->GetNdaughters(); i++)
330 TString node_name = micromegas_envelope_vol->GetNode(i)->GetName();
333 if (node_name.BeginsWith(
"MICROMEGAS_55_Gas2"))
336 { std::cout <<
"EditTPCGeometry - found Micromegas node " << node_name << std::endl; }
338 auto micromegas_node = micromegas_envelope_vol->GetNode(i);
339 const int mm_layer = node_name.BeginsWith(
"MICROMEGAS_55_Gas2_inner") ? 0:1;
341 auto micromegas_vol = micromegas_node->GetVolume();
342 assert(micromegas_vol);
350 geoManager->CloseGeometry();
363 TGeoMedium *micromegas_medium = micromegas_vol->GetMedium();
364 assert(micromegas_medium);
374 for(
size_t tileid = 0; tileid < layergeom->get_tiles_count(); ++tileid )
378 const auto& tile = layergeom->
get_tile(tileid);
381 const auto volume_name = Form(
"micromegas_measurement_%i_%zu", mm_layer, tileid );
388 auto micromegas_measurement_vol = geoManager->MakeBox(
391 (layergeom->get_thickness() - 0.1)/2,
395 micromegas_measurement_vol->SetLineColor(kBlack);
396 micromegas_measurement_vol->SetFillColor(kYellow);
397 micromegas_measurement_vol->SetVisibility(kTRUE);
400 const TVector3 global_center = layergeom->get_world_from_local_coords( tileid, { 0, 0, 0 });
403 const auto rotation_name = Form(
"micromegas_rotation_%i_%zu", mm_layer, tileid );
404 auto rotation =
new TGeoRotation(rotation_name);
405 rotation->RotateZ( tile.m_centerPhi*180./
M_PI );
406 auto micromegas_measurement_location =
new TGeoCombiTrans( global_center.x(), global_center.y(), global_center.z(), rotation );
407 micromegas_vol->AddNode(micromegas_measurement_vol, 1, micromegas_measurement_location);
412 TGeoManager *geoManager)
414 TGeoMedium *tpc_gas_medium = tpc_gas_vol->GetMedium();
415 assert(tpc_gas_medium);
420 for(
unsigned int ilayer = 0; ilayer <
m_nTpcLayers; ++ilayer)
424 sprintf(bname,
"tpc_gas_measurement_%u",ilayer);
428 double box_r_phi = 2.0 * tan_half_phi *
431 tpc_gas_measurement_vol[ilayer] = geoManager->MakeBox(bname, tpc_gas_medium,
436 tpc_gas_measurement_vol[ilayer]->SetLineColor(kBlack);
437 tpc_gas_measurement_vol[ilayer]->SetFillColor(kYellow);
438 tpc_gas_measurement_vol[ilayer]->SetVisibility(kTRUE);
442 std::cout <<
Verbosity() <<
" Made box for layer " << ilayer
444 << box_r_phi <<
" ref arc "
447 tpc_gas_measurement_vol[ilayer]->Print();
452 for (
unsigned int iz = 0; iz <
m_nSurfZ; ++iz)
459 for (
unsigned int iphi = 0; iphi <
m_nSurfPhi; ++iphi)
465 double phi_center = min_phi + m_surfStepPhi / 2.0;
466 double phi_center_degrees = phi_center * 180.0 /
M_PI;
468 for (
unsigned int ilayer = 0; ilayer <
m_nTpcLayers; ++ilayer)
478 sprintf(rot_name,
"tpc_gas_rotation_%i", copy);
479 TGeoCombiTrans *tpc_gas_measurement_location
480 =
new TGeoCombiTrans(x_center, y_center, z_center,
481 new TGeoRotation(rot_name,
485 tpc_gas_vol->AddNode(tpc_gas_measurement_vol[ilayer],
486 copy, tpc_gas_measurement_location);
490 std::cout <<
" Made copy " << copy <<
" iz " << iz
491 <<
" imod " << imod <<
" ilayer " << ilayer
492 <<
" iphi " << iphi << std::endl;
493 std::cout <<
" x_center " << x_center
494 <<
" y_center " << y_center
495 <<
" z_center " << z_center
496 <<
" phi_center_degrees " << phi_center_degrees
519 std::string responseFile, materialFile;
523 std::string argstr[argc]{
525 "--response-file", responseFile,
526 "--mat-input-type",
"file",
527 "--mat-input-file", materialFile,
535 if(
m_magField.find(
".root") != std::string::npos)
537 if(
m_magField.find(
"2d") != std::string::npos)
542 m_magField = std::string(getenv(
"CALIBRATIONROOT")) +
543 std::string(
"/Field/Map/sphenix3dbigmapxyz.root");
545 argstr[8] =
"--bf-map";
547 argstr[10]=
"--bf-name";
548 argstr[11] =
"fieldmap";
549 argstr[12] =
"--bf-lscalor";
551 argstr[14] =
"--bf-bscalor";
557 std::cout <<
"Mag field now " <<
m_magField <<
" with rescale "
561 for (
int i = 0; i < argc; ++i)
564 std::cout << argstr[i] <<
", ";
566 arg[i] = strdup(argstr[i].c_str());
575 for(
int i=0; i<argc; i++)
580 std::string& materialFile)
583 responseFile =
"tgeo-sphenix.response";
584 materialFile =
"sphenix-material.json";
586 materialFile =
"sphenix-mm-material.json";
591 file.open(responseFile);
595 responseFile = std::string(getenv(
"OFFLINE_MAIN")) +
596 std::string(
"/share/tgeo-sphenix-mms.response");
598 responseFile = std::string(getenv(
"OFFLINE_MAIN")) +
599 std::string(
"/share/tgeo-sphenix.response");
602 file.open(materialFile);
605 std::cout << materialFile
606 <<
" not found locally, use repo version"
610 materialFile = std::string(getenv(
"CALIBRATIONROOT")) +
611 std::string(
"/ACTS/sphenix-mm-material.json");
613 materialFile = std::string(getenv(
"CALIBRATIONROOT")) +
614 std::string(
"/ACTS/sphenix-material.json");
619 std::cout <<
"using Acts material file : " << materialFile
621 std::cout <<
"Using Acts TGeoResponse file : " << responseFile
640 detector.addOptions(
desc);
655 ActsExamples::WhiteBoard eventStore(
660 ActsExamples::AlgorithmContext
context(ialg, ievt, eventStore);
678 { std::cout <<
"MakeActsGeometry::unpackVolumes - top volume: " << vol->volumeName() << std::endl; }
684 auto mmBarrel = find_volume_by_name( vol,
"MICROMEGAS::Barrel" );
693 auto mvtxBarrel = find_volume_by_name( vol,
"MVTX::Barrel" );
694 assert( mvtxBarrel );
702 auto inttBarrel = find_volume_by_name( vol,
"Silicon::Barrel" );
703 assert( inttBarrel );
711 auto tpcBarrel = find_volume_by_name( vol,
"TPC::Barrel" );
723 { std::cout <<
"MakeActsGeometry::makeTpcMapPairs - tpcVolume: " << tpcVolume->volumeName() << std::endl; }
725 auto tpcLayerArray = tpcVolume->confinedLayers();
726 auto tpcLayerVector = tpcLayerArray->arrayObjects();
729 for(
unsigned int i = 0; i < tpcLayerVector.size(); i++)
731 auto surfaceArray = tpcLayerVector.at(i)->surfaceArray();
732 if(surfaceArray == NULL){
737 auto surfaceVector = surfaceArray->surfaces();
738 for(
unsigned int j = 0; j < surfaceVector.size(); j++)
740 auto surf = surfaceVector.at(j)->getSharedPtr();
744 std::vector<double> world_center = {vec3d(0) / 10.0,
754 std::map<unsigned int, std::vector<Surface>>::iterator mapIter;
760 mapIter->second.push_back(surf);
765 std::vector<Surface> dumvec;
766 dumvec.push_back(surf);
767 std::pair<unsigned int, std::vector<Surface>>
tmp =
768 std::make_pair(layer, dumvec);
781 { std::cout <<
"MakeActsGeometry::makeMmMapPairs - mmVolume: " << mmVolume->volumeName() << std::endl; }
782 const auto mmLayerArray = mmVolume->confinedLayers();
783 const auto mmLayerVector = mmLayerArray->arrayObjects();
786 for(
unsigned int i = 0; i < mmLayerVector.size(); i++)
788 auto surfaceArray = mmLayerVector.at(i)->surfaceArray();
789 if(!surfaceArray)
continue;
793 const auto surfaceVector = surfaceArray->surfaces();
794 for(
unsigned int j = 0; j < surfaceVector.size(); j++)
796 auto surface = surfaceVector.at(j)->getSharedPtr();
800 TVector3 world_center(
810 for(
auto iter = range.first; iter != range.second; ++iter )
813 if(this_layergeom->check_radius(world_center))
816 layergeom = this_layergeom;
823 std::cout <<
"MakeActsGeometry::makeMmMapPairs - could not file CylinderGeomMicromegas matching ACTS surface" << std::endl;
831 std::cout <<
"MakeActsGeometry::makeMmMapPairs - could not file Micromegas tile matching ACTS surface" << std::endl;
850 { std::cout <<
"MakeActsGeometry::makeInttMapPairs - inttVolume: " << inttVolume->volumeName() << std::endl; }
852 auto inttLayerArray = inttVolume->confinedLayers();
854 auto inttLayerVector = inttLayerArray->arrayObjects();
856 for (
unsigned int i = 0; i < inttLayerVector.size(); i++)
859 auto surfaceArray = inttLayerVector.at(i)->surfaceArray();
860 if (surfaceArray == NULL)
864 auto surfaceVector = surfaceArray->surfaces();
866 for (
unsigned int j = 0; j < surfaceVector.size(); j++)
868 auto surf = surfaceVector.at(j)->getSharedPtr();
871 double ref_rad[4] = {7.188, 7.732, 9.680, 10.262};
873 std::vector<double> world_center = {vec3d(0) / 10.0, vec3d(1) / 10.0, vec3d(2) / 10.0};
878 double layer_rad = sqrt(pow(world_center[0], 2) + pow(world_center[1], 2));
880 unsigned int layer = 0;
881 for (
unsigned int i = 0; i < 4; ++i)
883 if (fabs(layer_rad - ref_rad[i]) < 0.1)
890 std::pair<TrkrDefs::hitsetkey, Surface>
tmp = make_pair(hitsetkey, surf);
899 std::cout <<
"Layer radius " << layer_rad <<
" layer " << layer <<
" ladderPhi " << ladderPhi <<
" ladderZ " << ladderZ
900 <<
" recover surface from m_clusterSurfaceMapSilicon " << std::endl;
901 std::cout <<
" surface type " << surf->type() << std::endl;
902 auto assoc_layer = surf->associatedLayer();
903 std::cout << std::endl
904 <<
" Layer type " << assoc_layer->layerType() << std::endl;
906 auto assoc_det_element = surf->associatedDetectorElement();
907 if (assoc_det_element !=
nullptr)
909 std::cout <<
" Associated detElement has non-null pointer "
910 << assoc_det_element << std::endl;
911 std::cout << std::endl
912 <<
" Associated detElement found, thickness = "
913 << assoc_det_element->thickness() << std::endl;
916 std::cout << std::endl
917 <<
" Associated detElement is nullptr " << std::endl;
928 { std::cout <<
"MakeActsGeometry::makeMvtxMapPairs - mvtxVolume: " << mvtxVolume->volumeName() << std::endl; }
931 auto mvtxBarrelLayerArray = mvtxVolume->confinedLayers();
934 auto mvtxLayerVector1 = mvtxBarrelLayerArray->arrayObjects();
938 for (
unsigned int i = 0; i < mvtxLayerVector1.size(); ++i)
941 auto surfaceArray = mvtxLayerVector1.at(i)->surfaceArray();
942 if (surfaceArray == NULL)
945 double ref_rad[3] = {2.556, 3.359, 4.134};
949 auto surfaceVector = surfaceArray->surfaces();
950 for (
unsigned int j = 0; j < surfaceVector.size(); j++)
952 auto surf = surfaceVector.at(j)->getSharedPtr();
954 std::vector<double> world_center = {vec3d(0) / 10.0, vec3d(1) / 10.0, vec3d(2) / 10.0};
955 double layer_rad = sqrt(pow(world_center[0], 2) + pow(world_center[1], 2));
956 unsigned int layer = 0;
957 for (
unsigned int i = 0; i < 3; ++i)
959 if (fabs(layer_rad - ref_rad[i]) < 0.1)
966 std::pair<TrkrDefs::hitsetkey, Surface>
tmp = make_pair(hitsetkey, surf);
976 std::cout <<
"Layer radius " << layer_rad <<
" Layer "
977 << layer <<
" stave " << stave <<
" chip " << chip
978 <<
" recover surface from m_clusterSurfaceMapSilicon "
982 std::cout <<
" surface type " << surf_iter->second->type()
984 auto assoc_layer = surf->associatedLayer();
985 std::cout << std::endl <<
" Layer type "
986 << assoc_layer->layerType() << std::endl;
988 auto assoc_det_element = surf->associatedDetectorElement();
989 if (assoc_det_element !=
nullptr)
991 std::cout <<
" Associated detElement has non-null pointer "
992 << assoc_det_element << std::endl;
993 std::cout << std::endl
994 <<
" Associated detElement found, thickness = "
995 << assoc_det_element->thickness() << std::endl;
998 std::cout << std::endl
999 <<
" Associated detElement is nullptr " << std::endl;
1009 unsigned int layer = 999;
1010 double layer_rad = sqrt(pow(world[0],2) + pow(world[1],2));
1011 for(
unsigned int ilayer=0;ilayer<
m_nTpcLayers;++ilayer)
1013 double tpc_ref_radius_low =
1015 double tpc_ref_radius_high =
1017 if(layer_rad >= tpc_ref_radius_low && layer_rad < tpc_ref_radius_high)
1024 if(layer >= m_nTpcLayers)
1027 <<
"Error: undefined layer, do nothing world = "
1028 << world[0] <<
" " << world[1] <<
" " << world[2]
1029 <<
" layer " << layer << std::endl;
1043 unsigned int readout_mod = 999;
1044 double phi_world = atan2(world[1], world[0]);
1049 if(phi_world >=min_phi && phi_world < max_phi)
1055 if(readout_mod >= m_nTpcModulesPerLayer)
1058 <<
"Error: readout_mod is undefined, do nothing phi_world = "
1059 << phi_world << std::endl;
1066 std::cout <<
" world = " << world[0] <<
" " << world[1]
1067 <<
" " << world[2] <<
" phi_world "
1068 << phi_world*180/3.14159 <<
" layer " << layer
1069 <<
" readout_mod " << readout_mod <<
" side " << side
1070 <<
" hitsetkey " << hitset_key<< std::endl;
1082 std::cout <<
PHWHERE <<
"Did not get layergeom for layer "
1083 << layer << std::endl;
1087 unsigned int stave = 0;
1088 unsigned int chip = 0;
1091 double check_pos[3] = {0, 0, 0};
1096 return mvtx_hitsetkey;
1106 std::cout <<
PHWHERE <<
"Did not get layergeom for layer "
1107 << layer << std::endl;
1111 double location[3] = {world[0], world[1], world[2]};
1112 int segment_z_bin = 0;
1113 int segment_phi_bin = 0;
1115 segment_phi_bin, location);
1117 double check_pos[3] = {0, 0, 0};
1122 return intt_hitsetkey;
1132 std::cout <<
PHWHERE <<
" Did not find TGeoManager, quit! " << std::endl;
1136 TObjArray *nodeArray = topVol->GetNodes();
1138 TIter iObj(nodeArray);
1141 TGeoNode *node =
dynamic_cast<TGeoNode *
>(obj);
1142 std::string node_str = node->GetName();
1144 std::string mvtx(
"MVTX_Wrapper");
1145 std::string intt(
"ladder");
1146 std::string intt_ext(
"ladderext");
1147 std::string tpc(
"tpc_envelope");
1148 std::string micromegas(
"MICROMEGAS_55");
1150 if (node_str.compare(0, mvtx.length(), mvtx) == 0)
1153 std::cout <<
" node " << node->GetName() <<
" is the MVTX wrapper"
1157 TObjArray *mvtxArray = node->GetNodes();
1158 TIter mvtxObj(mvtxArray);
1159 while(
TObject *mvtx = mvtxObj())
1161 TGeoNode *mvtxNode =
dynamic_cast<TGeoNode *
>(mvtx);
1163 std::cout <<
"mvtx node name is " << mvtxNode->GetName()
1165 std::string mvtxav1(
"av_1");
1166 std::string mvtxNodeName = mvtxNode->GetName();
1169 if(mvtxNodeName.compare(0, mvtxav1.length(), mvtxav1) == 0)
1173 else if (node_str.compare(0, intt.length(), intt) == 0)
1176 if (node_str.compare(0, intt_ext.length(), intt_ext) == 0)
1180 std::cout <<
" node " << node->GetName() <<
" is in the INTT"
1186 else if (node_str.compare(0, tpc.length(), tpc) == 0)
1189 std::cout <<
" node " << node->GetName()
1190 <<
" is in the TPC " << std::endl;
1192 else if (node_str.compare(0, micromegas.length(), micromegas) == 0)
1195 std::cout <<
" node " << node->GetName()
1196 <<
" is in the MMs " << std::endl;
1201 bool print_sensor_paths =
false;
1202 if (print_sensor_paths)
1205 std::cout <<
" Top Node is " << node->GetName() <<
" volume name is " << node->GetVolume()->GetName() << std::endl;
1207 int nmax_print = 20;
1217 int ladder_phi = -1;
1221 std::string
s = gnode->GetName();
1222 std::string delimiter =
"_";
1223 std::string posz(
"posz");
1224 std::string negz(
"negz");
1230 while ((pos = s.find(delimiter)) != std::string::npos)
1232 token = s.substr(0, pos);
1234 s.erase(0, pos + delimiter.length());
1236 layer = std::atoi(token.c_str()) + 3;
1238 itype = std::atoi(token.c_str());
1241 ladder_phi = std::atoi(token.c_str());
1242 if (s.compare(0, negz.length(), negz) == 0) zposneg = 0;
1243 if (s.compare(0, posz.length(), posz) == 0) zposneg = 1;
1248 ladder_z = itype + zposneg * 2;
1251 int ndaught = gnode->GetNdaughters();
1254 std::cout <<
PHWHERE <<
"OOPS: Did not find INTT sensor! Quit."
1259 std::string intt_refactive(
"siactive");
1260 TGeoNode *sensor_node = 0;
1261 for (
int i = 0; i < ndaught; ++i)
1263 std::string node_str = gnode->GetDaughter(i)->GetName();
1265 if (node_str.compare(0, intt_refactive.length(), intt_refactive) == 0)
1267 sensor_node = gnode->GetDaughter(i);
1276 std::pair<TrkrDefs::hitsetkey, TGeoNode *>
tmp = std::make_pair(
1277 node_key, sensor_node);
1281 std::cout <<
" INTT layer " << layer <<
" ladder_phi " << ladder_phi
1282 <<
" itype " << itype <<
" zposneg " << zposneg
1283 <<
" ladder_z " << ladder_z <<
" name "
1284 << sensor_node->GetName() << std::endl;
1300 std::string
s = gnode->GetName();
1301 std::string delimiter =
"_";
1306 while ((pos = s.find(delimiter)) != std::string::npos)
1308 token = s.substr(0, pos);
1310 s.erase(0, pos + delimiter.length());
1312 impr = std::atoi(token.c_str());
1327 else if (impr > 11 && impr < 28)
1339 TGeoNode *module_node = gnode->GetDaughter(0);
1340 int mnd = module_node->GetNdaughters();
1341 std::string mvtx_chip(
"MVTXChip");
1342 for (
int i = 0; i < mnd; ++i)
1344 std::string dstr = module_node->GetDaughter(i)->GetName();
1345 if (dstr.compare(0, mvtx_chip.length(), mvtx_chip) == 0)
1348 std::cout <<
"Found MVTX layer " << layer <<
" stave " << stave
1349 <<
" chip " << i <<
" with node name "
1350 << module_node->GetDaughter(i)->GetName() << std::endl;
1357 TGeoNode *sensor_node = module_node->GetDaughter(i)->GetDaughter(0);
1358 std::pair<TrkrDefs::hitsetkey, TGeoNode *>
tmp = std::make_pair(
1359 node_key, sensor_node);
1363 std::cout <<
" MVTX layer " << layer <<
" stave " << stave
1364 <<
" chip " << chip <<
" name "
1365 << sensor_node->GetName() << std::endl;
1377 std::string node_str = gnode->GetName();
1379 std::string intt_refactive(
"siactive");
1380 std::string mvtx_refactive(
"MVTXSensor");
1381 std::string tpc_refactive(
"tpc_gas_measurement");
1382 std::string micromegas_refactive(
"MICROMEGAS_55");
1384 if (node_str.compare(0, intt_refactive.length(), intt_refactive) == 0)
1386 std::cout <<
" ******* Found INTT active volume, node is "
1388 <<
" volume name is " << gnode->GetVolume()->GetName()
1393 else if (node_str.compare(0, mvtx_refactive.length(), mvtx_refactive) == 0)
1395 std::cout <<
" ******* Found MVTX active volume, node is "
1397 <<
" volume name is " << gnode->GetVolume()->GetName()
1402 else if (node_str.compare(0, tpc_refactive.length(), tpc_refactive) == 0)
1406 std::cout <<
" ******* Found TPC active volume, node is "
1408 <<
" volume name is " << gnode->GetVolume()->GetName()
1415 else if (node_str.compare(0, micromegas_refactive.length(), micromegas_refactive) == 0)
1417 std::cout <<
" ******* Found Micromegas active volume, node is "
1419 <<
" volume name is " << gnode->GetVolume()->GetName()
1428 std::cout <<
" ******* Found node "
1430 <<
" volume name is " << gnode->GetVolume()->GetName()
1439 int ndaught = gnode->GetNdaughters();
1441 for (
int i = 0; i < ndaught; ++i)
1443 std::cout <<
" " << gnode->GetVolume()->GetName()
1444 <<
" daughter " << i <<
" has name "
1445 << gnode->GetDaughter(i)->GetVolume()->GetName() << std::endl;
1447 isActive(gnode->GetDaughter(i), nmax_print);
1460 for(
unsigned int isector = 0; isector < 3; ++isector)
1465 for(
unsigned int ilayer =0; ilayer < 16; ++ilayer)
1487 std::cerr <<
"DST Node missing, quitting" << std::endl;
1488 throw std::runtime_error(
"failed to find DST node in PHActsSourceLinks::createNodes");
1501 m_surfMaps = findNode::getClass<ActsSurfaceMaps>(topNode,
1512 m_actsGeometry = findNode::getClass<ActsTrackingGeometry>(topNode,
1513 "ActsTrackingGeometry");
1534 std::cout <<
PHWHERE <<
" Did not find TGeoManager, quit! "
1544 <<
" CYLINDERGEOM_MVTX node not found on node tree"
1550 findNode::getClass<PHG4CylinderCellGeomContainer>(topNode,
"CYLINDERCELLGEOM_SVTX");
1554 <<
"ERROR: Can't find node CYLINDERCELLGEOM_SVTX"
1564 <<
" CYLINDERGEOM_INTT node not found on node tree"
1575 <<
" CYLINDERGEOM_MICROMEGAS_FULL node not found on node tree"