ATLAS Offline Software
BoundarySurface.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // BoundarySurface.h, (c) ATLAS Detector software
8 
9 #ifndef TRKVOLUMES_BOUNDARYSURFACE_H
10 #define TRKVOLUMES_BOUNDARYSURFACE_H
11 
12 // Trk
17 #include "TrkVolumes/Volume.h"
18 // Gaudi
20 #include "GaudiKernel/MsgStream.h"
22 
23 namespace Trk {
24 
25 // class TrackParameters;
26 class Surface;
27 
49 template <class Tvol>
53  public:
56  : m_insideVolume(0),
57  m_outsideVolume(0),
60 
62  BoundarySurface(const Tvol* inside, const Tvol* outside)
67 
70  SharedObject<VolumeArray> outsideArray)
71  : m_insideVolume(),
73  m_insideVolumeArray(insideArray),
74  m_outsideVolumeArray(outsideArray) {}
75 
78  virtual const Tvol* attachedVolume(const TrackParameters& parms,
79  PropDirection dir) const = 0;
80 
84  virtual const Tvol* attachedVolume(const Amg::Vector3D& pos,
85  const Amg::Vector3D& mom,
86  PropDirection dir) const = 0;
87 
89  template <class T>
90  bool onBoundary(const T& pars) const {
92  }
93 
95  virtual const Surface& surfaceRepresentation() const = 0;
97 
99  virtual ~BoundarySurface() {}
100 
102  void debugInfo(MsgStream& msg) const;
103 
105  Tvol const* insideVolume() const;
106  void setInsideVolume(const Tvol*);
107 
108  Tvol const* outsideVolume() const;
109  void setOutsideVolume(const Tvol*);
110 
116 
117  protected:
118  const Tvol* m_insideVolume;
119  const Tvol* m_outsideVolume;
122 };
123 
124 template <class Tvol>
126  return m_insideVolume;
127 }
128 template <class Tvol>
130  m_insideVolume = vol;
131 }
132 
133 template <class Tvol>
135  return m_outsideVolume;
136 }
137 template <class Tvol>
139  m_outsideVolume = vol;
140 }
141 
142 template <class Tvol>
145  return m_insideVolumeArray;
146 }
147 template <class Tvol>
149  const SharedObject<BinnedArray<Tvol>>& volArray) {
150  m_insideVolumeArray = volArray;
151 }
152 
153 template <class Tvol>
156  return m_outsideVolumeArray;
157 }
158 template <class Tvol>
160  const SharedObject<BinnedArray<Tvol>>& volArray) {
161  m_outsideVolumeArray = volArray;
162 }
163 
164 template <class Tvol>
165 inline void BoundarySurface<Tvol>::debugInfo(MsgStream& msg) const {
166  msg << "BoundarySurface debug information: " << std::endl;
167  msg << " -> pointer to insideVolume = " << m_insideVolume
168  << std::endl;
169  msg << " -> pointer to insideVolumeArray = "
170  << m_insideVolumeArray.get() << std::endl;
171  msg << " -> pointer to outsideVolume = " << m_outsideVolume
172  << std::endl;
173  msg << " -> pointer to outsideVolumeArray = "
174  << m_outsideVolumeArray.get() << endmsg;
175 }
176 
177 } // end of namespace Trk
178 
179 #endif // TRKVOLUMES_BOUNDARYSURFACE_H
180 
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
Trk::BoundarySurface
Definition: BoundarySurface.h:50
Trk::BoundarySurface::outsideVolume
Tvol const * outsideVolume() const
Definition: BoundarySurface.h:134
Trk::BoundarySurface::m_insideVolumeArray
SharedObject< VolumeArray > m_insideVolumeArray
Definition: BoundarySurface.h:120
Trk::BoundarySurface::surfaceRepresentation
virtual Surface & surfaceRepresentation()=0
TrackParameters.h
Trk::BoundarySurface::~BoundarySurface
virtual ~BoundarySurface()
Virtual Destructor.
Definition: BoundarySurface.h:99
Trk::BoundarySurface::attachedVolume
virtual const Tvol * attachedVolume(const Amg::Vector3D &pos, const Amg::Vector3D &mom, PropDirection dir) const =0
Get the next Volume depending on GlobalPosition, GlobalMomentum, dir on the TrackParameters and the r...
BinnedArray.h
Trk::BoundarySurface::insideVolume
Tvol const * insideVolume() const
getters/setters for inside/outside Volume
Definition: BoundarySurface.h:125
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:7
PropDirection.h
Trk::BoundarySurface::attachedVolume
virtual const Tvol * attachedVolume(const TrackParameters &parms, PropDirection dir) const =0
Get the next Volume depending on the TrackParameters and the requested direction.
Trk::BoundarySurface::outsideVolumeArray
const SharedObject< VolumeArray > & outsideVolumeArray() const
Definition: BoundarySurface.h:155
Trk::BoundarySurface::BoundarySurface
BoundarySurface(const Tvol *inside, const Tvol *outside)
Constructor for a Boundary with exact two Volumes attached to it.
Definition: BoundarySurface.h:62
Trk::BoundarySurface::setOutsideVolumeArray
void setOutsideVolumeArray(const SharedObject< VolumeArray > &)
Definition: BoundarySurface.h:159
Trk::BoundarySurface::VolumeArray
BinnedArray< Tvol > VolumeArray
typedef the BinnedArray
Definition: BoundarySurface.h:52
GeoPrimitives.h
Trk::BoundarySurface::onBoundary
bool onBoundary(const T &pars) const
templated onBoundary method
Definition: BoundarySurface.h:90
Volume.h
Trk::PropDirection
PropDirection
Definition: PropDirection.h:19
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
Trk::BoundarySurface::surfaceRepresentation
virtual const Surface & surfaceRepresentation() const =0
The Surface Representation of this.
Trk::BoundarySurface::BoundarySurface
BoundarySurface()
Default Constructor - needed for pool and inherited classes.
Definition: BoundarySurface.h:55
Trk::BoundarySurface::BoundarySurface
BoundarySurface(SharedObject< VolumeArray > insideArray, SharedObject< VolumeArray > outsideArray)
Constructor for a Boundary with exact two Volumes attached to it.
Definition: BoundarySurface.h:69
Trk::BoundarySurface::setInsideVolumeArray
void setInsideVolumeArray(const SharedObject< VolumeArray > &)
Definition: BoundarySurface.h:148
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Trk::BoundarySurface::setOutsideVolume
void setOutsideVolume(const Tvol *)
Definition: BoundarySurface.h:138
Trk::ParametersBase
Definition: ParametersBase.h:55
SharedObject.h
beamspotman.dir
string dir
Definition: beamspotman.py:623
Trk::BoundarySurface::m_outsideVolumeArray
SharedObject< VolumeArray > m_outsideVolumeArray
Definition: BoundarySurface.h:121
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::inside
@ inside
Definition: PropDirection.h:29
Trk::SharedObject
std::shared_ptr< T > SharedObject
Definition: SharedObject.h:24
Trk::Surface::onSurface
bool onSurface(const T &parameters, const BoundaryCheck &bchk=BoundaryCheck(true)) const
The templated Parameters OnSurface method - checks on surface pointer first.
Trk::BoundarySurface::setInsideVolume
void setInsideVolume(const Tvol *)
Definition: BoundarySurface.h:129
Trk::outside
@ outside
Definition: PropDirection.h:29
Trk::BoundarySurface::debugInfo
void debugInfo(MsgStream &msg) const
output debug information
Definition: BoundarySurface.h:165
Trk::BinnedArray
Definition: BinnedArray.h:38
Trk::BoundarySurface::insideVolumeArray
const SharedObject< VolumeArray > & insideVolumeArray() const
getters/setters for inside/outside Volume arrays
Definition: BoundarySurface.h:144
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
checker_macros.h
Define macros for attributes used to control the static checker.
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
Trk::BoundarySurface::m_outsideVolume
const Tvol * m_outsideVolume
Definition: BoundarySurface.h:119
Trk::BoundarySurface::m_insideVolume
const Tvol * m_insideVolume
Definition: BoundarySurface.h:118