43 return StatusCode::FAILURE;
52 double rMin = std::numeric_limits<double>::max();
55 unsigned int rMinPos = 0;
58 for (
unsigned int curPos=0; curPos<
m_rposzInDet.size(); curPos++ ) {
70 ATH_MSG_DEBUG(
"Will shift ID boundary (r,|z|)=("<<rMin<<
","<<zAtRMin<<
") to (r,|z|)=("<<0.<<
","<<zAtRMin<<
")");
76 bool foundShiftPoint =
false;
79 for (
unsigned int curPos=0; curPos<
m_rposzBeamPipe.size(); curPos++ ) {
85 if ( (fabs(curR-rMin) < 1e-4) && (fabs(curZ-zAtRMin)<1e-4) ) {
86 ATH_MSG_VERBOSE(
"Found boundary point in BeamPipe volume. Shifting (r,|z|)=("<<curR<<
","<<curZ<<
") to (r,|z|)=("<<0.<<
","<<curZ<<
")");
87 foundShiftPoint =
true;
95 if ( !foundShiftPoint) {
96 ATH_MSG_ERROR(
"Could not find InDet envelope point (r,z)=("<<rMin<<
","<<zAtRMin<<
") in the BeamPipe/Forward envelope -> Unable to shift it down to r=0.");
97 return StatusCode::FAILURE;
106 if (msgLvl(MSG::VERBOSE)) {
108 for (
unsigned int num = 0; num<
m_rzBeamPipe.size(); num++) {
112 for (
unsigned int num = 0; num<
m_rzInDet.size(); num++) {
119 return StatusCode::SUCCESS;
126 return StatusCode::SUCCESS;
#define ATH_MSG_VERBOSE(x)
std::vector< RZPair > RZPairVector
StatusCode finalize()
AthService finalize method.
StatusCode initialize()
AthService initialize method.
RZPairVector m_rposzInDet
ServiceHandle< IEnvelopeDefSvc > m_atlasEnvDefSvc
ServiceHandle to the common ATLAS envelope definition service.
RZPairVector m_rposzBeamPipe
internal (r,z) representation for the positive z-side only, one RZPairVector for BeamPipe and InnerDe...
RZPairVector m_rzBeamPipe
internal (r,z) representation for BeamPipe and InnerDetector volumes
const RZPairVector & getRPositiveZBoundary(AtlasDetDescr::AtlasRegion region) const
return a vector of (r,z) pairs, defining the envelope on the z>0 region
ISFEnvelopeDefSvc(const std::string &name, ISvcLocator *svc)
public AthService constructor
const RZPairVector & getRZBoundary(AtlasDetDescr::AtlasRegion region) const
return a vector of (r,z) pairs, defining the respective envelope
~ISFEnvelopeDefSvc()
Destructor.
AtlasRegion
A simple enum of ATLAS regions and sub-detectors.