ATLAS Offline Software
PrismVolumeBounds.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // PrismVolumeBounds.h, (c) ATLAS Detector software
8 
9 #ifndef TRKVOLUMES_PRISMVOLUMEBOUNDS_H
10 #define TRKVOLUMES_PRISMVOLUMEBOUNDS_H
11 
12 // Trk
13 #include "CxxUtils/CachedValue.h"
17 class MsgStream;
18 
19 namespace Trk {
20 
21 class Surface;
22 class PlaneSurface;
23 class TriangleBounds;
24 
44 class PrismVolumeBounds final: public VolumeBounds {
45  public:
48 
50  PrismVolumeBounds(std::vector<std::pair<float, float> > xyvtx,
51  float hlengthz);
52 
54  PrismVolumeBounds(std::vector<std::pair<double, double> > xyvtx,
55  double hlengthz);
56 
59 
61  virtual ~PrismVolumeBounds();
62 
65 
67  PrismVolumeBounds* clone() const override final;
68 
71  bool inside(const Amg::Vector3D&, double tol = 0.) const override final;
72 
75  (const Amg::Transform3D& transform) override final;
76 
80  bool forceInside = false) const override final;
81 
83  std::vector<std::pair<double, double> > xyVertices() const;
84 
86  double halflengthZ() const;
87 
89  MsgStream& dump(MsgStream& sl) const override final;
90 
92  std::ostream& dump(std::ostream& sl) const override final;
93 
94  private:
96  Trk::PlaneSurface* sideSurf(const Amg::Transform3D&, unsigned int,
97  unsigned int) const;
98 
100  std::vector<std::pair<double, double> > mirror_xyVtx() const;
101 
103  int ordering() const;
104 
105  std::vector<std::pair<double, double> > m_xyVtx;
106  double m_halfZ;
108  CxxUtils::CachedValue<int> m_ordering;
109 
114 };
115 
117  return new PrismVolumeBounds(*this);
118 }
119 
120 inline std::vector<std::pair<double, double> > PrismVolumeBounds::xyVertices()
121  const {
122  return m_xyVtx;
123 }
124 
125 inline double PrismVolumeBounds::halflengthZ() const { return m_halfZ; }
126 
128  const Amg::Vector3D&, const Amg::Vector3D&, bool) const {
130 }
131 
132 } // namespace Trk
133 
134 #endif // TRKVOLUMES_PRISMVOLUMEBOUNDS_H
135 
Trk::PrismVolumeBounds::PrismVolumeBounds
PrismVolumeBounds(std::vector< std::pair< double, double > > xyvtx, double hlengthz)
Constructor - generic case from (double)
Trk::PrismVolumeBounds::m_ordering
CxxUtils::CachedValue< int > m_ordering
cache vertex ordering
Definition: PrismVolumeBounds.h:108
Trk::EightObjectsAccessor
std::array< ObjectAccessor::value_type, 8 > EightObjectsAccessor
Definition: ObjectsAccessor.h:18
Trk::PrismVolumeBounds::PrismVolumeBounds
PrismVolumeBounds(std::vector< std::pair< float, float > > xyvtx, float hlengthz)
Constructor - generic case (from float)
Trk::PrismVolumeBounds::m_objectAccessor
Trk::EightObjectsAccessor m_objectAccessor
There's only one single object Acessor for the moment has to be implemented if Cuboids are used more ...
Definition: PrismVolumeBounds.h:113
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:7
VolumeBounds.h
ObjectsAccessor.h
Trk::PrismVolumeBounds::m_halfZ
double m_halfZ
halflength in z
Definition: PrismVolumeBounds.h:106
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
Trk::PrismVolumeBounds::clone
PrismVolumeBounds * clone() const override final
Virtual constructor.
Definition: PrismVolumeBounds.h:116
GeoPrimitives.h
Trk::VolumeBounds
Definition: VolumeBounds.h:45
Trk::TriangleBounds
Definition: TriangleBounds.h:39
vector
Definition: MultiHisto.h:13
Trk::PrismVolumeBounds::PrismVolumeBounds
PrismVolumeBounds()
Default Constructor.
Definition: PrismVolumeBounds.cxx:24
Trk::PrismVolumeBounds::halflengthZ
double halflengthZ() const
This method returns the halflength in local z.
Definition: PrismVolumeBounds.h:125
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
CxxUtils
Definition: aligned_vector.h:29
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
Trk::PrismVolumeBounds
Definition: PrismVolumeBounds.h:44
beamspotman.dir
string dir
Definition: beamspotman.py:623
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
CachedValue.h
Cached value with atomic update.
Trk::PrismVolumeBounds::sideSurf
Trk::PlaneSurface * sideSurf(const Amg::Transform3D &, unsigned int, unsigned int) const
method to construct side boundary planes
Definition: PrismVolumeBounds.cxx:132
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
Trk::PrismVolumeBounds::inside
bool inside(const Amg::Vector3D &, double tol=0.) const override final
This method checks if position in the 3D volume frame is inside the volume.
Definition: PrismVolumeBounds.cxx:199
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::PrismVolumeBounds::xyVertices
std::vector< std::pair< double, double > > xyVertices() const
This method returns the set of xy generating vertices.
Definition: PrismVolumeBounds.h:120
Trk::PrismVolumeBounds::dump
MsgStream & dump(MsgStream &sl) const override final
Output Method for MsgStream.
Definition: PrismVolumeBounds.cxx:260
Trk::PrismVolumeBounds::operator=
PrismVolumeBounds & operator=(const PrismVolumeBounds &bobo)
Assignment operator.
Definition: PrismVolumeBounds.cxx:82
Trk::PrismVolumeBounds::~PrismVolumeBounds
virtual ~PrismVolumeBounds()
Destructor.
Definition: PrismVolumeBounds.cxx:76
Trk::ObjectAccessor
Definition: ObjectAccessor.h:15
Trk::PrismVolumeBounds::boundarySurfaceAccessor
ObjectAccessor boundarySurfaceAccessor(const Amg::Vector3D &gp, const Amg::Vector3D &dir, bool forceInside=false) const override final
Provide accessor for BoundarySurfaces.
Definition: PrismVolumeBounds.h:127
Trk::PrismVolumeBounds::m_xyVtx
std::vector< std::pair< double, double > > m_xyVtx
generating xy vertices
Definition: PrismVolumeBounds.h:105
Trk::PlaneSurface
Definition: PlaneSurface.h:64
Trk::PrismVolumeBounds::mirror_xyVtx
std::vector< std::pair< double, double > > mirror_xyVtx() const
mirror the input vertices for down-side boundary
Definition: PrismVolumeBounds.cxx:209
Trk::PrismVolumeBounds::ordering
int ordering() const
assess ordering of vertices
Definition: PrismVolumeBounds.cxx:222
Trk::PrismVolumeBounds::decomposeToSurfaces
const std::vector< const Trk::Surface * > * decomposeToSurfaces(const Amg::Transform3D &transform) override final
Method to decompose the Bounds into Surfaces.
Definition: PrismVolumeBounds.cxx:99
Trk::PrismVolumeBounds::m_baseBounds
Trk::TriangleBounds * m_baseBounds
base xy bounds
Definition: PrismVolumeBounds.h:107
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75