ATLAS Offline Software
Loading...
Searching...
No Matches
ISF::ATLFAST_EnvelopeDefSvc Class Reference

#include <ATLFAST_EnvelopeDefSvc.h>

Inheritance diagram for ISF::ATLFAST_EnvelopeDefSvc:
Collaboration diagram for ISF::ATLFAST_EnvelopeDefSvc:

Public Member Functions

 ATLFAST_EnvelopeDefSvc (const std::string &name, ISvcLocator *svc)
 public AthService constructor
 ~ATLFAST_EnvelopeDefSvc ()
 Destructor.
StatusCode initialize ()
 AthService initialize method.
StatusCode finalize ()
 AthService finalize method.
const RZPairVectorgetRZBoundary (AtlasDetDescr::AtlasRegion region) const
 return a vector of (r,z) pairs, defining the respective envelope
const RZPairVectorgetRPositiveZBoundary (AtlasDetDescr::AtlasRegion region) const
 return a vector of (r,z) pairs, defining the envelope on the z>0 region

Private Member Functions

RZPairVector getShiftedBoundary (AtlasDetDescr::AtlasRegion region, double shiftFromZ, double shiftToZ) const
 return boundary with shifted z values

Private Attributes

ServiceHandle< IEnvelopeDefSvcm_isfEnvDefSvc
 ServiceHandle to the standard ISF envelope definition service.
double m_tolerance
 internal tolerance on coordinates
double m_idMaxExtentZ
 maximum desired extent (halfz) of the modified inner detector volume
RZPairVector m_rzBeamPipe
 internal (r,z) representation for BeamPipe, InnerDetector and calo volumes
RZPairVector m_rzInDet
RZPairVector m_rzCalo
RZPairVector m_rposzBeamPipe
 internal (r,z) representation for the positive z-side only, one RZPairVector for BeamPipe and InnerDetector each
RZPairVector m_rposzInDet
RZPairVector m_rposzCalo

Detailed Description

Definition at line 24 of file ATLFAST_EnvelopeDefSvc.h.

Constructor & Destructor Documentation

◆ ATLFAST_EnvelopeDefSvc()

ISF::ATLFAST_EnvelopeDefSvc::ATLFAST_EnvelopeDefSvc ( const std::string & name,
ISvcLocator * svc )

public AthService constructor

Constructor.

Definition at line 19 of file ATLFAST_EnvelopeDefSvc.cxx.

19 :
20 base_class(name,svc),
21 m_isfEnvDefSvc("ISF_ISFEnvelopeDefSvc", name),
22 m_tolerance(1e-4),
23 m_idMaxExtentZ(3550.),
25 m_rzInDet(),
28{
29 declareProperty( "ISFEnvelopeDefSvc",
31 "The ISF EnvelopeDefinition Service");
32
33 declareProperty( "Tolerance",
35 "Tolerance on coordinates.");
36
37 declareProperty( "InDetMaxExtentZ",
39 "The desired InnerDetector maximum extension in |z|");
40}
RZPairVector m_rzBeamPipe
internal (r,z) representation for BeamPipe, InnerDetector and calo volumes
ServiceHandle< IEnvelopeDefSvc > m_isfEnvDefSvc
ServiceHandle to the standard ISF envelope definition service.
double m_tolerance
internal tolerance on coordinates
RZPairVector m_rposzBeamPipe
internal (r,z) representation for the positive z-side only, one RZPairVector for BeamPipe and InnerDe...
double m_idMaxExtentZ
maximum desired extent (halfz) of the modified inner detector volume

◆ ~ATLFAST_EnvelopeDefSvc()

ISF::ATLFAST_EnvelopeDefSvc::~ATLFAST_EnvelopeDefSvc ( )

Destructor.

Definition at line 43 of file ATLFAST_EnvelopeDefSvc.cxx.

44{
45 // free memory
46 // TODO :)
47}

Member Function Documentation

◆ finalize()

StatusCode ISF::ATLFAST_EnvelopeDefSvc::finalize ( )

AthService finalize method.

Athena AthService finalize hook.

Definition at line 114 of file ATLFAST_EnvelopeDefSvc.cxx.

115{
116 return StatusCode::SUCCESS;
117}

◆ getRPositiveZBoundary()

const RZPairVector & ISF::ATLFAST_EnvelopeDefSvc::getRPositiveZBoundary ( AtlasDetDescr::AtlasRegion region) const

return a vector of (r,z) pairs, defining the envelope on the z>0 region

Definition at line 133 of file ATLFAST_EnvelopeDefSvc.cxx.

133 {
134
135 // treat Forward/BeamPipe and InnerDetector regions separately
136 if ( region == AtlasDetDescr::fAtlasForward ) return m_rposzBeamPipe;
137 else if ( region == AtlasDetDescr::fAtlasID ) return m_rposzInDet;
138 else if ( region == AtlasDetDescr::fAtlasCalo ) return m_rposzCalo;
139 else return m_isfEnvDefSvc->getRPositiveZBoundary( region );
140}

◆ getRZBoundary()

const RZPairVector & ISF::ATLFAST_EnvelopeDefSvc::getRZBoundary ( AtlasDetDescr::AtlasRegion region) const

return a vector of (r,z) pairs, defining the respective envelope

Definition at line 121 of file ATLFAST_EnvelopeDefSvc.cxx.

121 {
122
123 // treat Forward/BeamPipe and InnerDetector regions separately
124 if ( region == AtlasDetDescr::fAtlasForward ) return m_rzBeamPipe;
125 else if ( region == AtlasDetDescr::fAtlasID ) return m_rzInDet;
126 else if ( region == AtlasDetDescr::fAtlasCalo ) return m_rzCalo;
127 else return m_isfEnvDefSvc->getRZBoundary( region );
128
129}

◆ getShiftedBoundary()

RZPairVector ISF::ATLFAST_EnvelopeDefSvc::getShiftedBoundary ( AtlasDetDescr::AtlasRegion region,
double shiftFromZ,
double shiftToZ ) const
private

return boundary with shifted z values

Definition at line 144 of file ATLFAST_EnvelopeDefSvc.cxx.

146 {
147
148 const char *volName = AtlasDetDescr::AtlasRegionHelper::getName(region);
149 ATH_MSG_DEBUG("Will shift '" << volName << "' boundary at |z|="<<shiftFromZ<<" to |z|="<<shiftToZ<<"");
150
151 RZPairVector rposzPairs = m_isfEnvDefSvc->getRPositiveZBoundary(region);
152
153 for ( unsigned int curPos=0; curPos<rposzPairs.size(); curPos++ ) {
154 double curR = rposzPairs[curPos].first;
155 double curZ = rposzPairs[curPos].second;
156
157 // is current boundary point to be shifted?
158 if ( fabs(curZ-shiftFromZ) < m_tolerance ) {
159
160 ATH_MSG_VERBOSE("Found boundary point in '" << volName <<"' volume." <<
161 " Shifting (r,|z|)=("<<curR<<","<<curZ<<") to (r,|z|)=("<<curR<<","<<shiftToZ<<")");
162
163 rposzPairs[curPos].second = shiftToZ;
164 }
165 }
166
167 return rposzPairs;
168}
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
std::vector< RZPair > RZPairVector
Definition RZPair.h:18
static const char * getName(int region)

◆ initialize()

StatusCode ISF::ATLFAST_EnvelopeDefSvc::initialize ( )

AthService initialize method.

Athena AthService initialize hook.

Definition at line 51 of file ATLFAST_EnvelopeDefSvc.cxx.

52{
53 ATH_MSG_INFO("Initializing ...");
54
55 // retrieve ATLAS common envelope definition service
56 if ( m_isfEnvDefSvc.retrieve().isFailure() ){
57 ATH_MSG_FATAL( "Could not retrieve EnvelopeDefinition service ('" << m_isfEnvDefSvc.typeAndName() << "'). Abort.");
58 return StatusCode::FAILURE;
59 }
60
61 //
62 // identify highest z extent in the ID volume
63 //
64 m_rposzInDet = m_isfEnvDefSvc->getRPositiveZBoundary( AtlasDetDescr::fAtlasID );
65 double zMax = std::numeric_limits<double>::min();
66 {
67 // find the greatest z value of the ID volume
68 for ( unsigned int curPos=0; curPos<m_rposzInDet.size(); curPos++ ) {
69 double curZ = m_rposzInDet[curPos].second;
70
71 if (curZ > zMax) {
72 zMax = curZ;
73 }
74 }
75 }
76
77 //
78 // shift ID/BeamPipe/Calo boundaries according to the desired new ID extent
79 //
83
84 // mirror the RZPairs provided in m_rposz to describe all corner points
85 // in (r,z) space for the BeamPipe/Forward and the InnerDetector envelopes
86 mirrorRZ( m_rposzBeamPipe, m_rzBeamPipe );
87 mirrorRZ( m_rposzInDet , m_rzInDet );
88 mirrorRZ( m_rposzCalo , m_rzCalo );
89
90
91 // debugging output: print volume definitions
92 if (msgLvl(MSG::VERBOSE)) {
93 ATH_MSG_VERBOSE( "Envelope: complete region=" << AtlasDetDescr::fAtlasForward);
94 for ( unsigned int num = 0; num<m_rzBeamPipe.size(); num++) {
95 ATH_MSG_VERBOSE(" pos=" << num << " r=" << m_rzBeamPipe[num].first << " z="<< m_rzBeamPipe[num].second);
96 }
97 ATH_MSG_VERBOSE( "Envelope: complete region=" << AtlasDetDescr::fAtlasID);
98 for ( unsigned int num = 0; num<m_rzInDet.size(); num++) {
99 ATH_MSG_VERBOSE(" pos=" << num << " r=" << m_rzInDet[num].first << " z="<< m_rzInDet[num].second);
100 }
101 ATH_MSG_VERBOSE( "Envelope: complete region=" << AtlasDetDescr::fAtlasCalo);
102 for ( unsigned int num = 0; num<m_rzCalo.size(); num++) {
103 ATH_MSG_VERBOSE(" pos=" << num << " r=" << m_rzCalo[num].first << " z="<< m_rzCalo[num].second);
104 }
105 }
106
107 ATH_MSG_INFO("Initialize successful.");
108
109 return StatusCode::SUCCESS;
110}
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
RZPairVector getShiftedBoundary(AtlasDetDescr::AtlasRegion region, double shiftFromZ, double shiftToZ) const
return boundary with shifted z values

Member Data Documentation

◆ m_idMaxExtentZ

double ISF::ATLFAST_EnvelopeDefSvc::m_idMaxExtentZ
private

maximum desired extent (halfz) of the modified inner detector volume

Definition at line 55 of file ATLFAST_EnvelopeDefSvc.h.

◆ m_isfEnvDefSvc

ServiceHandle<IEnvelopeDefSvc> ISF::ATLFAST_EnvelopeDefSvc::m_isfEnvDefSvc
private

ServiceHandle to the standard ISF envelope definition service.

Definition at line 49 of file ATLFAST_EnvelopeDefSvc.h.

◆ m_rposzBeamPipe

RZPairVector ISF::ATLFAST_EnvelopeDefSvc::m_rposzBeamPipe
private

internal (r,z) representation for the positive z-side only, one RZPairVector for BeamPipe and InnerDetector each

Definition at line 63 of file ATLFAST_EnvelopeDefSvc.h.

◆ m_rposzCalo

RZPairVector ISF::ATLFAST_EnvelopeDefSvc::m_rposzCalo
private

Definition at line 65 of file ATLFAST_EnvelopeDefSvc.h.

◆ m_rposzInDet

RZPairVector ISF::ATLFAST_EnvelopeDefSvc::m_rposzInDet
private

Definition at line 64 of file ATLFAST_EnvelopeDefSvc.h.

◆ m_rzBeamPipe

RZPairVector ISF::ATLFAST_EnvelopeDefSvc::m_rzBeamPipe
private

internal (r,z) representation for BeamPipe, InnerDetector and calo volumes

Definition at line 58 of file ATLFAST_EnvelopeDefSvc.h.

◆ m_rzCalo

RZPairVector ISF::ATLFAST_EnvelopeDefSvc::m_rzCalo
private

Definition at line 60 of file ATLFAST_EnvelopeDefSvc.h.

◆ m_rzInDet

RZPairVector ISF::ATLFAST_EnvelopeDefSvc::m_rzInDet
private

Definition at line 59 of file ATLFAST_EnvelopeDefSvc.h.

◆ m_tolerance

double ISF::ATLFAST_EnvelopeDefSvc::m_tolerance
private

internal tolerance on coordinates

Definition at line 52 of file ATLFAST_EnvelopeDefSvc.h.


The documentation for this class was generated from the following files: