ATLAS Offline Software
Loading...
Searching...
No Matches
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
22class IEnvelopeDefSvc : virtual public IInterface {
32
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
61inline 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
std::vector< RZPair > RZPairVector
Definition RZPair.h:18
std::pair< double, double > RZPair
Definition RZPair.h:15
Define macros for attributes used to control the static checker.
Interface class which is used to retrieve sub-detector envelope definitions in the form of (r,...
virtual const RZPairVector & getRZBoundary(AtlasDetDescr::AtlasRegion region) const =0
return a vector of (r,z) pairs, defining the respective envelope
DeclareInterfaceID(IEnvelopeDefSvc, 1, 0)
const RZPairVector & getBeamPipeRZBoundary() const
wrapper methods
virtual ~IEnvelopeDefSvc()
virtual distructor
const RZPairVector & getInDetRZBoundary() const
virtual const RZPairVector & getRPositiveZBoundary(AtlasDetDescr::AtlasRegion region) const =0
return a vector of (r,z) pairs, defining the envelope in the z>0 region
const RZPairVector & getCaloRZBoundary() const
const RZPairVector & getMuonRZBoundary() const
void mirrorRZ(const RZPairVector &srcRZ, RZPairVector &dstRZ) const
mirror the given srcRZ RZPairVector in the XY-plane to describe all corner points in (r,...
const RZPairVector & getCavernRZBoundary() const
AtlasRegion
A simple enum of ATLAS regions and sub-detectors.
Definition AtlasRegion.h:21