18 m_atlasEnvDefSvc(
"AtlasGeometry_EnvelopeDefSvc",
name),
41 if ( m_atlasEnvDefSvc.retrieve().isFailure() ){
42 ATH_MSG_FATAL(
"Could not retrieve EnvelopeDefinition service ('" << m_atlasEnvDefSvc.typeAndName() <<
"'). Abort.");
43 return StatusCode::FAILURE;
55 unsigned int rMinPos = 0;
58 for (
unsigned int curPos=0; curPos<m_rposzInDet.size(); curPos++ ) {
59 double curR = m_rposzInDet[curPos].first;
60 double curZ = m_rposzInDet[curPos].second;
70 ATH_MSG_DEBUG(
"Will shift ID boundary (r,|z|)=("<<rMin<<
","<<zAtRMin<<
") to (r,|z|)=("<<0.<<
","<<zAtRMin<<
")");
71 m_rposzInDet[rMinPos].first = 0.;
76 bool foundShiftPoint =
false;
79 for (
unsigned int curPos=0; curPos<m_rposzBeamPipe.size(); curPos++ ) {
80 double curR = m_rposzBeamPipe[curPos].first;
81 double curZ = m_rposzBeamPipe[curPos].second;
85 if ( (fabs(curR-rMin) < 1
e-4) && (fabs(curZ-zAtRMin)<1
e-4) ) {
86 ATH_MSG_VERBOSE(
"Found boundary point in BeamPipe volume. Shifting (r,|z|)=("<<curR<<
","<<curZ<<
") to (r,|z|)=("<<0.<<
","<<curZ<<
")");
87 foundShiftPoint =
true;
88 m_rposzBeamPipe[curPos].first = 0.;
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;
102 mirrorRZ( m_rposzBeamPipe, m_rzBeamPipe );
103 mirrorRZ( m_rposzInDet , m_rzInDet );
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;
136 else return m_atlasEnvDefSvc->getRZBoundary( region );
147 else return m_atlasEnvDefSvc->getRPositiveZBoundary( region );