1 #ifndef SetupGeometry_H_Seen 2 #define SetupGeometry_H_Seen 4 #include <ND280GeomId.hxx> 15 : fSP0Dule(-1), fP0Dule(-1), fLayer(-1), fBar(-1), fTarget(-1),
16 fECalRadiator(-1), fTargetRadiator(-1) {}
20 bool Search(
const std::vector<std::string>& names, ND::TGeometryId&
id) {
22 if (names.size()<5)
return false;
23 if (names[4].find(
"P0D_")==std::string::npos)
return false;
25 #ifdef DEBUG_P0DFinder 26 for (std::vector<std::string>::const_iterator s = names.begin();
28 ++s) std::cout <<
" " << *s;
29 std::cout << std::endl;
32 if (names.back().find(
"P0D_")!=std::string::npos) {
38 if (names.back().find(
"USECal_")!=std::string::npos) {
43 else if (names.back().find(
"USTarget_")!=std::string::npos) {
48 else if (names.back().find(
"CTarget_")!=std::string::npos) {
53 else if (names.back().find(
"CECal_")!=std::string::npos) {
60 if (names.back().find(
"P0Dule_")!=std::string::npos) {
69 if (names.back().find(
"Target_") == 0) {
76 if (names.back().find(
"Radiator_") !=std::string::npos) {
77 if (fSP0Dule == 0 || fSP0Dule==3) {
89 if (names.back().find(
"X_")!=std::string::npos) {
94 else if (names.back().find(
"Y_")!=std::string::npos) {
100 if (names.back().find(
"Bar_")!=std::string::npos) {
139 void SetupGeometryRecurseGeomId(std::vector<std::string>& names);
147 TVector3 GeomIdPosition(
int geomId);
TGeometryId Bar(int p0dule, int layer, int bar)
std::map< ND::TGeometryId, int > gGeometrySetup_GeomIdMap
TGeometryId ECalRadiator(int radiator)
SetupGeometryP0DFinder * gSetupGeometry_P0DFinder
TGeometryId Target(int target)
TGeometryId TargetRadiator(int radiator)
std::map< int, ND::TGeometryId > gGeometrySetup_RootIdMap
TGeometryId SuperP0Dule(int sP0Dule)
TGeometryId Detector()
Define a geometry identifier to the entire P0D detector.
TGeometryId P0Dule(int p0dule)