ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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 More...
 
 ~ATLFAST_EnvelopeDefSvc ()
 Destructor. More...
 
StatusCode initialize ()
 AthService initialize method. More...
 
StatusCode finalize ()
 AthService finalize method. More...
 
const RZPairVectorgetRZBoundary (AtlasDetDescr::AtlasRegion region) const
 return a vector of (r,z) pairs, defining the respective envelope More...
 
const RZPairVectorgetRPositiveZBoundary (AtlasDetDescr::AtlasRegion region) const
 return a vector of (r,z) pairs, defining the envelope on the z>0 region More...
 

Private Member Functions

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

Private Attributes

ServiceHandle< IEnvelopeDefSvcm_isfEnvDefSvc
 ServiceHandle to the standard ISF envelope definition service. More...
 
double m_tolerance
 internal tolerance on coordinates More...
 
double m_idMaxExtentZ
 maximum desired extent (halfz) of the modified inner detector volume More...
 
RZPairVector m_rzBeamPipe
 internal (r,z) representation for BeamPipe, InnerDetector and calo volumes More...
 
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 More...
 
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.),
24  m_rzBeamPipe(),
25  m_rzInDet(),
27  m_rposzInDet()
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 }

◆ ~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 }

◆ 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 }

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:
ISF::ATLFAST_EnvelopeDefSvc::m_rzInDet
RZPairVector m_rzInDet
Definition: ATLFAST_EnvelopeDefSvc.h:59
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
ISF::ATLFAST_EnvelopeDefSvc::m_rzBeamPipe
RZPairVector m_rzBeamPipe
internal (r,z) representation for BeamPipe, InnerDetector and calo volumes
Definition: ATLFAST_EnvelopeDefSvc.h:58
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
AtlasDetDescr::fAtlasForward
@ fAtlasForward
Definition: AtlasRegion.h:34
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ISF::ATLFAST_EnvelopeDefSvc::m_rposzInDet
RZPairVector m_rposzInDet
Definition: ATLFAST_EnvelopeDefSvc.h:64
RZPairVector
std::vector< RZPair > RZPairVector
Definition: RZPair.h:18
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
AtlasDetDescr::AtlasRegionHelper::getName
static const char * getName(int region)
Definition: AtlasRegionHelper.cxx:13
ISF::ATLFAST_EnvelopeDefSvc::m_tolerance
double m_tolerance
internal tolerance on coordinates
Definition: ATLFAST_EnvelopeDefSvc.h:52
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ISF::ATLFAST_EnvelopeDefSvc::m_idMaxExtentZ
double m_idMaxExtentZ
maximum desired extent (halfz) of the modified inner detector volume
Definition: ATLFAST_EnvelopeDefSvc.h:55
ISF::ATLFAST_EnvelopeDefSvc::m_rposzCalo
RZPairVector m_rposzCalo
Definition: ATLFAST_EnvelopeDefSvc.h:65
ISF::ATLFAST_EnvelopeDefSvc::getShiftedBoundary
RZPairVector getShiftedBoundary(AtlasDetDescr::AtlasRegion region, double shiftFromZ, double shiftToZ) const
return boundary with shifted z values
Definition: ATLFAST_EnvelopeDefSvc.cxx:144
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
min
#define min(a, b)
Definition: cfImp.cxx:40
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AtlasDetDescr::fAtlasID
@ fAtlasID
Definition: AtlasRegion.h:33
ISF::ATLFAST_EnvelopeDefSvc::m_isfEnvDefSvc
ServiceHandle< IEnvelopeDefSvc > m_isfEnvDefSvc
ServiceHandle to the standard ISF envelope definition service.
Definition: ATLFAST_EnvelopeDefSvc.h:49
AtlasDetDescr::fAtlasCalo
@ fAtlasCalo
Definition: AtlasRegion.h:35
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
ISF::ATLFAST_EnvelopeDefSvc::m_rzCalo
RZPairVector m_rzCalo
Definition: ATLFAST_EnvelopeDefSvc.h:60
DeMoScan.first
bool first
Definition: DeMoScan.py:534
ISF::ATLFAST_EnvelopeDefSvc::m_rposzBeamPipe
RZPairVector m_rposzBeamPipe
internal (r,z) representation for the positive z-side only, one RZPairVector for BeamPipe and InnerDe...
Definition: ATLFAST_EnvelopeDefSvc.h:63
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14