11 #ifndef DDDETECTORS_OTHERDETECTORHELPERS_H
12 #define DDDETECTORS_OTHERDETECTORHELPERS_H 1
45 static ECrossType getCrossType( std::string
const & type) {
47 std::map< std::string, ODH::ECrossType > CrossTypes;
67 std::map < std::string, ODH::ECrossType>::const_iterator ct = CrossTypes.find(type);
68 if ( ct == CrossTypes.end() ) {
69 throw std::runtime_error(
"Unknown Crossing Type for this geometry");
74 static bool checkForSensibleGeometry(
double crossingAngle,
ECrossType crossType) {
75 if (crossingAngle == 0 && crossType !=
kCenter) {
76 printout(dd4hep::ERROR,
"Mask/Beampip",
"You are trying to build a crossing geometry without a crossing angle.\n" );
77 printout(dd4hep::ERROR,
"Mask/Beampip",
"This is probably not what you want - better check your geometry data!");
84 static double getCurrentAngle(
double crossingAngle,
ECrossType crossType ) {
95 tmpAngle = -crossingAngle;
break;
104 tmpAngle = +crossingAngle;
break;
114 #endif // DDDETECTORS_OTHERDETECTORHELPERS_H