ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
AtlasGeometryCommon
SubDetectorEnvelopes
SubDetectorEnvelopes
IEnvelopeDefSvc.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// IEnvelopeDefSvc.h, (c) ATLAS Detector software
8
#ifndef IENVELOPEDEFSVC_H
9
#define IENVELOPEDEFSVC_H
10
11
// Gaudi
12
#include "GaudiKernel/IInterface.h"
13
14
// Atlas Regions
15
#include "
AtlasDetDescr/AtlasRegion.h
"
16
17
// SubDetectorEnvelopes includes
18
#include "
SubDetectorEnvelopes/RZPair.h
"
19
20
#include "
CxxUtils/checker_macros.h
"
21
22
class
IEnvelopeDefSvc
:
virtual
public
IInterface {
32
33
public
:
34
// interface definition
35
DeclareInterfaceID
(
IEnvelopeDefSvc
, 1, 0);
36
38
virtual
~IEnvelopeDefSvc
() {};
39
41
virtual
const
RZPairVector
&
getRZBoundary
(
AtlasDetDescr::AtlasRegion
region )
const
= 0;
42
44
virtual
const
RZPairVector
&
getRPositiveZBoundary
(
AtlasDetDescr::AtlasRegion
region )
const
= 0;
45
47
const
RZPairVector
&
getBeamPipeRZBoundary
()
const
{
return
getRZBoundary
(
AtlasDetDescr::fAtlasForward
); }
48
const
RZPairVector
&
getInDetRZBoundary
()
const
{
return
getRZBoundary
(
AtlasDetDescr::fAtlasID
); }
49
const
RZPairVector
&
getCaloRZBoundary
()
const
{
return
getRZBoundary
(
AtlasDetDescr::fAtlasCalo
); }
50
const
RZPairVector
&
getMuonRZBoundary
()
const
{
return
getRZBoundary
(
AtlasDetDescr::fAtlasMS
); }
51
const
RZPairVector
&
getCavernRZBoundary
()
const
{
return
getRZBoundary
(
AtlasDetDescr::fAtlasCavern
); }
52
53
protected
:
56
inline
void
mirrorRZ
(
const
RZPairVector
&srcRZ,
RZPairVector
&dstRZ )
const
;
57
58
};
59
61
inline
void
IEnvelopeDefSvc::mirrorRZ
(
const
RZPairVector
&srcRZ,
RZPairVector
&dstRZ )
const
62
{
63
int
numPosPairs = srcRZ.size();
64
// the mirrored envelope will have exactly twice as many entries as the given srcRZ
65
dstRZ.resize(2*numPosPairs);
66
67
// loop over all positive (r,z) pairs
68
for
(
int
curNum = 0; curNum<numPosPairs; curNum++) {
69
double
curR = srcRZ[curNum].first;
70
double
curZ = srcRZ[curNum].second;
71
72
// debugging output:
73
//std::cout << "Envelope: pos=" << curNum << " r=" << curR << " z="<< curZ << std::endl;
74
75
// fill in the z<0 side
76
dstRZ[numPosPairs-curNum-1] =
RZPair
(curR, -curZ);
77
// fill in the z>0 side
78
dstRZ[numPosPairs+curNum] =
RZPair
(curR, curZ);
79
}
80
81
return
;
82
}
83
84
#endif
// IENVELOPEDEFSVC_H
85
AtlasRegion.h
RZPair.h
RZPairVector
std::vector< RZPair > RZPairVector
Definition
RZPair.h:18
RZPair
std::pair< double, double > RZPair
Definition
RZPair.h:15
checker_macros.h
Define macros for attributes used to control the static checker.
IEnvelopeDefSvc
Interface class which is used to retrieve sub-detector envelope definitions in the form of (r,...
Definition
IEnvelopeDefSvc.h:22
IEnvelopeDefSvc::getRZBoundary
virtual const RZPairVector & getRZBoundary(AtlasDetDescr::AtlasRegion region) const =0
return a vector of (r,z) pairs, defining the respective envelope
IEnvelopeDefSvc::DeclareInterfaceID
DeclareInterfaceID(IEnvelopeDefSvc, 1, 0)
IEnvelopeDefSvc::getBeamPipeRZBoundary
const RZPairVector & getBeamPipeRZBoundary() const
wrapper methods
Definition
IEnvelopeDefSvc.h:47
IEnvelopeDefSvc::~IEnvelopeDefSvc
virtual ~IEnvelopeDefSvc()
virtual distructor
Definition
IEnvelopeDefSvc.h:38
IEnvelopeDefSvc::getInDetRZBoundary
const RZPairVector & getInDetRZBoundary() const
Definition
IEnvelopeDefSvc.h:48
IEnvelopeDefSvc::getRPositiveZBoundary
virtual const RZPairVector & getRPositiveZBoundary(AtlasDetDescr::AtlasRegion region) const =0
return a vector of (r,z) pairs, defining the envelope in the z>0 region
IEnvelopeDefSvc::getCaloRZBoundary
const RZPairVector & getCaloRZBoundary() const
Definition
IEnvelopeDefSvc.h:49
IEnvelopeDefSvc::getMuonRZBoundary
const RZPairVector & getMuonRZBoundary() const
Definition
IEnvelopeDefSvc.h:50
IEnvelopeDefSvc::mirrorRZ
void mirrorRZ(const RZPairVector &srcRZ, RZPairVector &dstRZ) const
mirror the given srcRZ RZPairVector in the XY-plane to describe all corner points in (r,...
Definition
IEnvelopeDefSvc.h:61
IEnvelopeDefSvc::getCavernRZBoundary
const RZPairVector & getCavernRZBoundary() const
Definition
IEnvelopeDefSvc.h:51
AtlasDetDescr::AtlasRegion
AtlasRegion
A simple enum of ATLAS regions and sub-detectors.
Definition
AtlasRegion.h:21
AtlasDetDescr::fAtlasCalo
@ fAtlasCalo
Definition
AtlasRegion.h:29
AtlasDetDescr::fAtlasID
@ fAtlasID
Definition
AtlasRegion.h:27
AtlasDetDescr::fAtlasMS
@ fAtlasMS
Definition
AtlasRegion.h:30
AtlasDetDescr::fAtlasForward
@ fAtlasForward
Definition
AtlasRegion.h:28
AtlasDetDescr::fAtlasCavern
@ fAtlasCavern
Definition
AtlasRegion.h:31
Generated on
for ATLAS Offline Software by
1.17.0