ATLAS Offline Software
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
16 
17 // SubDetectorEnvelopes includes
19 
21 
22 class IEnvelopeDefSvc : virtual public IInterface {
33  public:
34  // interface definition
36 
38  virtual ~IEnvelopeDefSvc() {};
39 
41  virtual const RZPairVector &getRZBoundary( AtlasDetDescr::AtlasRegion region ) const = 0;
42 
45 
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 
RZPair.h
IEnvelopeDefSvc::~IEnvelopeDefSvc
virtual ~IEnvelopeDefSvc()
virtual distructor
Definition: IEnvelopeDefSvc.h:38
IEnvelopeDefSvc::DeclareInterfaceID
DeclareInterfaceID(IEnvelopeDefSvc, 1, 0)
AtlasDetDescr::fAtlasForward
@ fAtlasForward
Definition: AtlasRegion.h:34
RZPairVector
std::vector< RZPair > RZPairVector
Definition: RZPair.h:18
AtlasRegion.h
AtlasDetDescr::AtlasRegion
AtlasRegion
Definition: AtlasRegion.h:27
RZPair
std::pair< double, double > RZPair
Definition: RZPair.h:15
IEnvelopeDefSvc::getBeamPipeRZBoundary
const RZPairVector & getBeamPipeRZBoundary() const
wrapper methods
Definition: IEnvelopeDefSvc.h:47
AtlasDetDescr::fAtlasMS
@ fAtlasMS
Definition: AtlasRegion.h:36
IEnvelopeDefSvc
Definition: IEnvelopeDefSvc.h:22
IEnvelopeDefSvc::getCavernRZBoundary
const RZPairVector & getCavernRZBoundary() const
Definition: IEnvelopeDefSvc.h:51
AtlasDetDescr::fAtlasCavern
@ fAtlasCavern
Definition: AtlasRegion.h:37
AtlasDetDescr::fAtlasID
@ fAtlasID
Definition: AtlasRegion.h:33
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::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
AtlasDetDescr::fAtlasCalo
@ fAtlasCalo
Definition: AtlasRegion.h:35
IEnvelopeDefSvc::getMuonRZBoundary
const RZPairVector & getMuonRZBoundary() const
Definition: IEnvelopeDefSvc.h:50
IEnvelopeDefSvc::getInDetRZBoundary
const RZPairVector & getInDetRZBoundary() const
Definition: IEnvelopeDefSvc.h:48
IEnvelopeDefSvc::getRZBoundary
virtual const RZPairVector & getRZBoundary(AtlasDetDescr::AtlasRegion region) const =0
return a vector of (r,z) pairs, defining the respective envelope
checker_macros.h
Define macros for attributes used to control the static checker.
IEnvelopeDefSvc::getCaloRZBoundary
const RZPairVector & getCaloRZBoundary() const
Definition: IEnvelopeDefSvc.h:49