CMS 3D CMS Logo

FlatTrd.h
Go to the documentation of this file.
1 #ifndef GeometryCaloGeometryFlatTrd_h
2 #define GeometryCaloGeometryFlatTrd_h
3 
5 #include <CLHEP/Geometry/Point3D.h>
6 #include <CLHEP/Geometry/Plane3D.h>
7 #include <CLHEP/Geometry/Vector3D.h>
8 #include <CLHEP/Geometry/Transform3D.h>
9 #include <vector>
10 
19 class FlatTrd : public CaloCellGeometry {
20 public:
25 
26  static constexpr uint32_t k_dZ = 0; //Half-length along the z-axis
27  static constexpr uint32_t k_Theta = 1; //Polar angle of the line joining the
28  //centres of the faces at -/+ dZ
29  static constexpr uint32_t k_Phi = 2; //Azimuthal angle of the line joing the
30  //centres of the faces at -/+ dZ
31  static constexpr uint32_t k_dY1 = 3; //Half-length along y of the face at -dZ
32  static constexpr uint32_t k_dX1 = 4; //Half-length along x of the side at
33  //y=-dY1 of the face at -dZ
34  static constexpr uint32_t k_dX2 = 5; //Half-length along x of the side at
35  //y=+dY1 of the face at -dZ
36  static constexpr uint32_t k_Alp1 = 6; //Angle w.r.t the y axis from the center
37  //of the sides at y=-dY1 to at y=+dY1
38  static constexpr uint32_t k_dY2 = 7; //Half-length along y of the face at +dZ
39  static constexpr uint32_t k_dX3 = 8; //Half-length along x of the side at
40  //y=-dY2 of the face at +dZ
41  static constexpr uint32_t k_dX4 = 9; //Half-length along x of the side at
42  //y=+dY2 of the face at +dZ
43  static constexpr uint32_t k_Alp2 = 10; //Angle w.r.t the y axis from the center
44  //of the sides at y=-dY2 to at y=+dY2
45  static constexpr uint32_t k_Cell = 11; //Cell size
46  //Assumes dY2=dY1; dX3=dX1; dX4=dX2; Alp2=Alp1=Theta=Phi=0
47 
48  FlatTrd(void);
49 
50  FlatTrd(const FlatTrd& tr);
51 
52  FlatTrd& operator=(const FlatTrd& tr);
53 
54  FlatTrd(CornersMgr* cMgr,
55  const GlobalPoint& fCtr,
56  const GlobalPoint& bCtr,
57  const GlobalPoint& cor1,
58  const CCGFloat* parV);
59 
60  FlatTrd(const CornersVec& corn, const CCGFloat* par);
61 
62  FlatTrd(const FlatTrd& tr, const Pt3D& local);
63 
64  ~FlatTrd() override;
65 
66  GlobalPoint const& getPosition() const override { return m_global; }
67  GlobalPoint getPosition(const Pt3D& local) const override;
68  float etaPos() const override { return m_global.eta(); }
69  float phiPos() const override { return m_global.phi(); }
70  float etaSpan() const override;
71  float phiSpan() const override;
72  float zPos() const { return m_global.z(); }
73  float dz() const { return param()[k_dZ]; }
74  Pt3D getLocal(const GlobalPoint& global) const;
75 
76  // Return thetaAxis polar angle of axis of the crystal
77  CCGFloat getThetaAxis() const;
78 
79  // Return phiAxis azimuthal angle of axis of the crystal
80  CCGFloat getPhiAxis() const;
81 
82  void vocalCorners(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref) const override;
83 
84  const GlobalVector& axis() const;
85 
86  static void createCorners(const std::vector<CCGFloat>& pv, const Tr3D& tr, std::vector<GlobalPoint>& co);
87 
88  static void localCorners(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref);
89 
90  void getTransform(Tr3D& tr, Pt3DVec* lptr) const override;
91 
92  void setPosition(const GlobalPoint& p) {
93  m_global = p;
94  setRefPoint(p);
95  }
96 
97  static constexpr unsigned int ncorner_ = 8;
98  static constexpr unsigned int ncornerBy2_ = 4;
99 
100 private:
101  void initCorners(CornersVec&) override;
102 
103  GlobalVector makeAxis(void);
104 
105  GlobalPoint backCtr(void) const;
110 };
111 
112 std::ostream& operator<<(std::ostream& s, const FlatTrd& cell);
113 
114 #endif
CaloCellGeometry::Tr3D
HepGeom::Transform3D Tr3D
Definition: CaloCellGeometry.h:53
Vector3DBase
Definition: Vector3DBase.h:8
CaloCellGeometry::Pt3DVec
std::vector< Pt3D > Pt3DVec
Definition: CaloCellGeometry.h:55
FlatTrd::createCorners
static void createCorners(const std::vector< CCGFloat > &pv, const Tr3D &tr, std::vector< GlobalPoint > &co)
Definition: FlatTrd.cc:133
FlatTrd::makeAxis
GlobalVector makeAxis(void)
Definition: FlatTrd.cc:239
CaloCellGeometry::CCGFloat
float CCGFloat
Definition: CaloCellGeometry.h:52
FlatTrd::localCorners
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: FlatTrd.cc:153
FlatTrd
A base class to handle the particular shape of HGCal volumes.
Definition: FlatTrd.h:19
FlatTrd::k_Cell
static constexpr uint32_t k_Cell
Definition: FlatTrd.h:45
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
FlatTrd::getPosition
GlobalPoint const & getPosition() const override
Returns the position of reference for this cell.
Definition: FlatTrd.h:66
CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: CaloCellGeometry.cc:4
FlatTrd::k_Phi
static constexpr uint32_t k_Phi
Definition: FlatTrd.h:29
FlatTrd::getLocal
Pt3D getLocal(const GlobalPoint &global) const
Definition: FlatTrd.cc:116
EZArrayFL< GlobalPoint >
FlatTrd::k_Theta
static constexpr uint32_t k_Theta
Definition: FlatTrd.h:27
FlatTrd::getTransform
void getTransform(Tr3D &tr, Pt3DVec *lptr) const override
--------— only needed by specific utility; overloaded when needed -—
Definition: FlatTrd.cc:181
operator<<
std::ostream & operator<<(std::ostream &s, const FlatTrd &cell)
Definition: FlatTrd.cc:252
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: CaloCellGeometry.cc:5
FlatTrd::k_dX1
static constexpr uint32_t k_dX1
Definition: FlatTrd.h:32
alignCSCRings.s
s
Definition: alignCSCRings.py:92
FlatTrd::k_Alp1
static constexpr uint32_t k_Alp1
Definition: FlatTrd.h:36
FlatTrd::k_dY2
static constexpr uint32_t k_dY2
Definition: FlatTrd.h:38
FlatTrd::k_dX4
static constexpr uint32_t k_dX4
Definition: FlatTrd.h:41
Tr3D
CaloCellGeometry::Tr3D Tr3D
Definition: CaloCellGeometry.cc:7
FlatTrd::m_corOne
Pt3D m_corOne
Definition: FlatTrd.h:107
Point3DBase< float, GlobalTag >
CaloCellGeometry::Pt3D
HepGeom::Point3D< CCGFloat > Pt3D
Definition: CaloCellGeometry.h:54
FlatTrd::Tr3D
CaloCellGeometry::Tr3D Tr3D
Definition: FlatTrd.h:24
FlatTrd::k_dX3
static constexpr uint32_t k_dX3
Definition: FlatTrd.h:39
FlatTrd::~FlatTrd
~FlatTrd() override
Definition: FlatTrd.cc:86
FlatTrd::ncornerBy2_
static constexpr unsigned int ncornerBy2_
Definition: FlatTrd.h:98
CaloCellGeometry
Definition: CaloCellGeometry.h:50
FlatTrd::m_global
GlobalPoint m_global
Definition: FlatTrd.h:108
FlatTrd::operator=
FlatTrd & operator=(const FlatTrd &tr)
Definition: FlatTrd.cc:29
CaloCellGeometry::param
const CCGFloat * param() const
Definition: CaloCellGeometry.h:99
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
FlatTrd::etaPos
float etaPos() const override
Definition: FlatTrd.h:68
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
FlatTrd::k_dX2
static constexpr uint32_t k_dX2
Definition: FlatTrd.h:34
FlatTrd::getPhiAxis
CCGFloat getPhiAxis() const
Definition: FlatTrd.cc:127
FlatTrd::FlatTrd
FlatTrd(void)
Definition: FlatTrd.cc:24
FlatTrd::vocalCorners
void vocalCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
Definition: FlatTrd.cc:131
FlatTrd::phiSpan
float phiSpan() const override
Definition: FlatTrd.cc:110
FlatTrd::phiPos
float phiPos() const override
Definition: FlatTrd.h:69
CaloCellGeometry.h
FlatTrd::m_local
Pt3D m_local
Definition: FlatTrd.h:107
FlatTrd::getThetaAxis
CCGFloat getThetaAxis() const
Definition: FlatTrd.cc:125
CaloCellGeometry::setRefPoint
void setRefPoint(const GlobalPoint &pos)
Definition: CaloCellGeometry.h:130
FlatTrd::Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: FlatTrd.h:22
FlatTrd::axis
const GlobalVector & axis() const
Definition: FlatTrd.cc:129
FlatTrd::dz
float dz() const
Definition: FlatTrd.h:73
FlatTrd::backCtr
GlobalPoint backCtr(void) const
Definition: FlatTrd.cc:241
Pt3DVec
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: CaloCellGeometry.cc:6
FlatTrd::etaSpan
float etaSpan() const override
Definition: FlatTrd.cc:100
EZMgrFL
Definition: EZMgrFL.h:8
FlatTrd::k_Alp2
static constexpr uint32_t k_Alp2
Definition: FlatTrd.h:43
cms::cuda::co
VT * co
Definition: prefixScan.h:46
FlatTrd::initCorners
void initCorners(CornersVec &) override
Definition: FlatTrd.cc:225
DTRecHitClients_cfi.local
local
Definition: DTRecHitClients_cfi.py:10
FlatTrd::CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: FlatTrd.h:21
FlatTrd::ncorner_
static constexpr unsigned int ncorner_
Definition: FlatTrd.h:97
FlatTrd::m_axis
GlobalVector m_axis
Definition: FlatTrd.h:106
FlatTrd::zPos
float zPos() const
Definition: FlatTrd.h:72
FlatTrd::m_tr
Tr3D m_tr
Definition: FlatTrd.h:109
FlatTrd::k_dY1
static constexpr uint32_t k_dY1
Definition: FlatTrd.h:31
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
FlatTrd::setPosition
void setPosition(const GlobalPoint &p)
Definition: FlatTrd.h:92
FlatTrd::k_dZ
static constexpr uint32_t k_dZ
Definition: FlatTrd.h:26
FlatTrd::Pt3DVec
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: FlatTrd.h:23