CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
FlatHexagon Class Reference

A base class to handle the hexagonal shape of HGCal silicon volumes. More...

#include <FlatHexagon.h>

Inheritance diagram for FlatHexagon:
CaloCellGeometry

Public Types

typedef CaloCellGeometry::CCGFloat CCGFloat
 
typedef CaloCellGeometry::Pt3D Pt3D
 
typedef CaloCellGeometry::Pt3DVec Pt3DVec
 
typedef CaloCellGeometry::Tr3D Tr3D
 
- Public Types inherited from CaloCellGeometry
typedef float CCGFloat
 
typedef EZMgrFL< GlobalPointCornersMgr
 
typedef EZArrayFL< GlobalPointCornersVec
 
typedef EZMgrFL< CCGFloatParMgr
 
typedef EZArrayFL< CCGFloatParVec
 
typedef std::vector< ParVecParVecVec
 
typedef HepGeom::Point3D< CCGFloatPt3D
 
typedef std::vector< Pt3DPt3DVec
 
using RepCorners = std::array< RhoEtaPhi, k_cornerSize >
 
typedef HepGeom::Transform3D Tr3D
 

Public Member Functions

const GlobalVectoraxis () const
 
virtual float etaPos () const
 
 FlatHexagon (void)
 
 FlatHexagon (const FlatHexagon &tr)
 
 FlatHexagon (CornersMgr *cMgr, const GlobalPoint &fCtr, const GlobalPoint &bCtr, const GlobalPoint &cor1, const CCGFloat *parV)
 
 FlatHexagon (const CornersVec &corn, const CCGFloat *par)
 
 FlatHexagon (const FlatHexagon &tr, const Pt3D &local)
 
Pt3D getLocal (const GlobalPoint &global) const
 
CCGFloat getPhiAxis () const
 
GlobalPoint const & getPosition () const override
 Returns the position of reference for this cell. More...
 
GlobalPoint getPosition (const Pt3D &local) const override
 
CCGFloat getThetaAxis () const
 
void getTransform (Tr3D &tr, Pt3DVec *lptr) const override
 --------— only needed by specific utility; overloaded when needed -— More...
 
FlatHexagonoperator= (const FlatHexagon &tr)
 
virtual float phiPos () const
 
void setPosition (const GlobalPoint &p)
 
void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
 
 ~FlatHexagon () override
 
- Public Member Functions inherited from CaloCellGeometry
bool emptyCorners () const
 
float etaPos () const
 
float etaSpan () const
 
GlobalPoint const & getBackPoint () const
 
CornersVec const & getCorners () const
 Returns the corner points of this cell's volume. More...
 
RepCorners const & getCornersREP () const
 
virtual GlobalPoint getPosition (CCGFloat) const
 
bool inside (const GlobalPoint &point) const
 Returns true if the specified point is inside this cell. More...
 
const CCGFloatparam () const
 
float phiPos () const
 
float phiSpan () const
 
RhoEtaPhi const & repPos () const
 
float rhoPos () const
 
void setBackPoint (const GlobalPoint &pos)
 
virtual ~CaloCellGeometry ()
 

Static Public Member Functions

static void createCorners (const std::vector< CCGFloat > &pv, const Tr3D &tr, std::vector< GlobalPoint > &co)
 
static void localCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
 
- Static Public Member Functions inherited from CaloCellGeometry
static const CCGFloatcheckParmPtr (const std::vector< CCGFloat > &vd, ParVecVec &pvv)
 
static const CCGFloatgetParmPtr (const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
 

Static Public Attributes

static constexpr uint32_t k_dZ = 0
 
static constexpr uint32_t k_r = 1
 
static constexpr uint32_t k_R = 2
 
static constexpr unsigned int ncorner_ = 12
 
static constexpr unsigned int ncornerBy2_ = 6
 
static constexpr double oneBySix_ = 1.0 / 6.0
 
- Static Public Attributes inherited from CaloCellGeometry
static constexpr unsigned int k_cornerSize = 8
 
static const CCGFloat k_ScaleFromDDDtoGeant
 

Private Member Functions

GlobalPoint backCtr (void) const
 
void initCorners (CornersVec &) override
 
GlobalVector makeAxis (void)
 

Private Attributes

GlobalVector m_axis
 
Pt3D m_corOne
 
GlobalPoint m_global
 
Pt3D m_local
 
Tr3D m_tr
 

Additional Inherited Members

- Protected Member Functions inherited from CaloCellGeometry
 CaloCellGeometry (CornersVec::const_reference gp, CornersMgr *mgr, const CCGFloat *par)
 
 CaloCellGeometry (const CornersVec &cv, const CCGFloat *par)
 
 CaloCellGeometry (void)
 
void initSpan ()
 
void setCornerVec (const std::vector< GlobalPoint > &cor)
 
void setRefPoint (const GlobalPoint &pos)
 

Detailed Description

A base class to handle the hexagonal shape of HGCal silicon volumes.

Definition at line 20 of file FlatHexagon.h.

Member Typedef Documentation

Definition at line 22 of file FlatHexagon.h.

Definition at line 23 of file FlatHexagon.h.

Definition at line 24 of file FlatHexagon.h.

Definition at line 25 of file FlatHexagon.h.

Constructor & Destructor Documentation

FlatHexagon::FlatHexagon ( void  )

Definition at line 23 of file FlatHexagon.cc.

24  : CaloCellGeometry(), m_axis(0., 0., 0.), m_corOne(0., 0., 0.), m_local(0., 0., 0.), m_global(0., 0., 0.) {}
Pt3D m_corOne
Definition: FlatHexagon.h:87
GlobalVector m_axis
Definition: FlatHexagon.h:86
Pt3D m_local
Definition: FlatHexagon.h:87
GlobalPoint m_global
Definition: FlatHexagon.h:88
FlatHexagon::FlatHexagon ( const FlatHexagon tr)

Definition at line 26 of file FlatHexagon.cc.

26 : CaloCellGeometry(tr) { *this = tr; }
FlatHexagon::FlatHexagon ( CornersMgr cMgr,
const GlobalPoint fCtr,
const GlobalPoint bCtr,
const GlobalPoint cor1,
const CCGFloat parV 
)

Definition at line 45 of file FlatHexagon.cc.

References etaPos(), getTransform(), glb, m_global, m_local, m_tr, and phiPos().

47  : CaloCellGeometry(fCtr, cMgr, parV),
48  m_axis((bCtr - fCtr).unit()),
49  m_corOne(cor1.x(), cor1.y(), cor1.z()),
50  m_local(0., 0., 0.) {
51  getTransform(m_tr, nullptr);
52  Pt3D glb = m_tr * m_local;
53  m_global = GlobalPoint(glb.x(), glb.y(), glb.z());
54 #ifdef EDM_ML_DEBUG
55  edm::LogVerbatim("CaloGeometry") << "FlatHexagon: Local " << m_local << " Global " << glb << " eta " << etaPos()
56  << " phi " << phiPos() << " Translation " << m_tr.getTranslation()
57  << " and rotation " << m_tr.getRotation();
58 #endif
59 }
Pt3D m_corOne
Definition: FlatHexagon.h:87
double glb
Definition: hdecay.h:103
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
T y() const
Definition: PV3DBase.h:60
GlobalVector m_axis
Definition: FlatHexagon.h:86
Pt3D m_local
Definition: FlatHexagon.h:87
virtual float phiPos() const
Definition: FlatHexagon.h:52
void getTransform(Tr3D &tr, Pt3DVec *lptr) const override
--------— only needed by specific utility; overloaded when needed -—
Definition: FlatHexagon.cc:165
T z() const
Definition: PV3DBase.h:61
virtual float etaPos() const
Definition: FlatHexagon.h:51
CaloCellGeometry::Pt3D Pt3D
T x() const
Definition: PV3DBase.h:59
GlobalPoint m_global
Definition: FlatHexagon.h:88
Basic3DVector unit() const
FlatHexagon::FlatHexagon ( const CornersVec corn,
const CCGFloat par 
)

Definition at line 61 of file FlatHexagon.cc.

References etaPos(), getTransform(), glb, m_axis, m_global, m_local, m_tr, makeAxis(), and phiPos().

62  : CaloCellGeometry(corn, par), m_corOne(corn[0].x(), corn[0].y(), corn[0].z()), m_local(0., 0., 0.) {
63  getTransform(m_tr, nullptr);
64  m_axis = makeAxis();
65  Pt3D glb = m_tr * m_local;
66  m_global = GlobalPoint(glb.x(), glb.y(), glb.z());
67 #ifdef EDM_ML_DEBUG
68  edm::LogVerbatim("CaloGeometry") << "FlatHexagon: Local " << m_local << " Global " << glb << " eta " << etaPos()
69  << " phi " << phiPos() << " Translation " << m_tr.getTranslation()
70  << " and rotation " << m_tr.getRotation();
71 #endif
72 }
Pt3D m_corOne
Definition: FlatHexagon.h:87
double glb
Definition: hdecay.h:103
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
GlobalVector makeAxis(void)
Definition: FlatHexagon.cc:223
GlobalVector m_axis
Definition: FlatHexagon.h:86
Pt3D m_local
Definition: FlatHexagon.h:87
virtual float phiPos() const
Definition: FlatHexagon.h:52
void getTransform(Tr3D &tr, Pt3DVec *lptr) const override
--------— only needed by specific utility; overloaded when needed -—
Definition: FlatHexagon.cc:165
virtual float etaPos() const
Definition: FlatHexagon.h:51
CaloCellGeometry::Pt3D Pt3D
GlobalPoint m_global
Definition: FlatHexagon.h:88
FlatHexagon::FlatHexagon ( const FlatHexagon tr,
const Pt3D local 
)

Definition at line 74 of file FlatHexagon.cc.

References etaPos(), glb, m_global, m_local, m_tr, and phiPos().

75  *this = tr;
76  Pt3D glb = m_tr * m_local;
77  m_global = GlobalPoint(glb.x(), glb.y(), glb.z());
78 #ifdef EDM_ML_DEBUG
79  edm::LogVerbatim("CaloGeometry") << "FlatHexagon: Local " << m_local << " Global " << glb << " eta " << etaPos()
80  << " phi " << phiPos() << " Translation " << m_tr.getTranslation()
81  << " and rotation " << m_tr.getRotation();
82 #endif
83 }
double glb
Definition: hdecay.h:103
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Pt3D m_local
Definition: FlatHexagon.h:87
virtual float phiPos() const
Definition: FlatHexagon.h:52
virtual float etaPos() const
Definition: FlatHexagon.h:51
CaloCellGeometry::Pt3D Pt3D
GlobalPoint m_global
Definition: FlatHexagon.h:88
FlatHexagon::~FlatHexagon ( )
override

Definition at line 85 of file FlatHexagon.cc.

85 {}

Member Function Documentation

const GlobalVector & FlatHexagon::axis ( ) const

Definition at line 112 of file FlatHexagon.cc.

References m_axis.

Referenced by getTransform(), and phiPos().

112 { return m_axis; }
GlobalVector m_axis
Definition: FlatHexagon.h:86
GlobalPoint FlatHexagon::backCtr ( void  ) const
private

Definition at line 225 of file FlatHexagon.cc.

References PVValHelper::dz, CaloCellGeometry::getCorners(), k_dZ, m_local, m_tr, ncornerBy2_, and CaloCellGeometry::param().

Referenced by makeAxis().

225  {
226  float dz =
228  Pt3D local_b(m_local.x(), m_local.y(), m_local.z() + dz);
229  Pt3D global_b = m_tr * local_b;
230  GlobalPoint global(global_b.x(), global_b.y(), global_b.z());
231  return global;
232 }
Pt3D m_local
Definition: FlatHexagon.h:87
const CCGFloat * param() const
CaloCellGeometry::Pt3D Pt3D
static constexpr unsigned int ncornerBy2_
Definition: FlatHexagon.h:78
static constexpr uint32_t k_dZ
Definition: FlatHexagon.h:27
CornersVec const & getCorners() const
Returns the corner points of this cell&#39;s volume.
void FlatHexagon::createCorners ( const std::vector< CCGFloat > &  pv,
const Tr3D tr,
std::vector< GlobalPoint > &  co 
)
static

Definition at line 116 of file FlatHexagon.cc.

References mps_fire::i, localCorners(), ncorner_, AlCaHLTBitMon_ParallelJobs::p, and createJobs::tmp.

Referenced by HGCalGeometryLoader::buildGeom(), phiPos(), and CaloGeometryDBEP< T, U >::produceAligned().

116  {
117  assert(3 == pv.size());
118  assert(ncorner_ == co.size());
119 
120  Pt3DVec ko(ncorner_, Pt3D(0, 0, 0));
121 
122  Pt3D tmp;
123  Pt3DVec to(ncorner_, Pt3D(0, 0, 0));
124  localCorners(to, &pv.front(), tmp);
125 
126  for (unsigned int i(0); i != ncorner_; ++i) {
127  ko[i] = tr * to[i]; // apply transformation
128  const Pt3D& p(ko[i]);
129  co[i] = GlobalPoint(p.x(), p.y(), p.z());
130 #ifdef EDM_ML_DEBUG
131  edm::LogVerbatim("CaloGeometry") << "Corner[" << i << "] = " << co[i];
132 #endif
133  }
134 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: FlatHexagon.cc:136
static constexpr unsigned int ncorner_
Definition: FlatHexagon.h:77
CaloCellGeometry::Pt3D Pt3D
Definition: FlatHexagon.h:23
def pv(vc)
Definition: MetAnalyzer.py:7
CaloCellGeometry::Pt3D Pt3D
CaloCellGeometry::Pt3DVec Pt3DVec
tmp
align.sh
Definition: createJobs.py:716
virtual float FlatHexagon::etaPos ( ) const
inlinevirtual

Definition at line 51 of file FlatHexagon.h.

References PV3DBase< T, PVType, FrameType >::eta(), and m_global.

Referenced by FlatHexagon(), operator<<(), and operator=().

51 { return m_global.eta(); }
T eta() const
Definition: PV3DBase.h:73
GlobalPoint m_global
Definition: FlatHexagon.h:88
Pt3D FlatHexagon::getLocal ( const GlobalPoint global) const

Definition at line 99 of file FlatHexagon.cc.

References DTRecHitClients_cfi::local, m_tr, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by phiPos().

99  {
100  Pt3D local = m_tr.inverse() * Pt3D(global.x(), global.y(), global.z());
101 #ifdef EDM_ML_DEBUG
102  edm::LogVerbatim("CaloGeometry") << "FlatHexagon::Global " << global.x() << ":" << global.y() << ":" << global.z()
103  << " Local " << local.x() << ":" << local.y() << ":" << local.z();
104 #endif
105  return local;
106 }
T y() const
Definition: PV3DBase.h:60
CaloCellGeometry::Pt3D Pt3D
Definition: FlatHexagon.h:23
T z() const
Definition: PV3DBase.h:61
CaloCellGeometry::Pt3D Pt3D
T x() const
Definition: PV3DBase.h:59
CCGFloat FlatHexagon::getPhiAxis ( ) const

Definition at line 110 of file FlatHexagon.cc.

References m_axis, and PV3DBase< T, PVType, FrameType >::phi().

Referenced by operator<<(), and phiPos().

110 { return m_axis.phi(); }
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
GlobalVector m_axis
Definition: FlatHexagon.h:86
GlobalPoint const& FlatHexagon::getPosition ( ) const
inlineoverridevirtual

Returns the position of reference for this cell.

Reimplemented from CaloCellGeometry.

Definition at line 49 of file FlatHexagon.h.

References DTRecHitClients_cfi::local, and m_global.

Referenced by makeAxis(), and operator<<().

49 { return m_global; }
GlobalPoint m_global
Definition: FlatHexagon.h:88
GlobalPoint FlatHexagon::getPosition ( const Pt3D local) const
overridevirtual

Reimplemented from CaloCellGeometry.

Definition at line 87 of file FlatHexagon.cc.

References glb, DTRecHitClients_cfi::local, and m_tr.

87  {
88  Pt3D glb = m_tr * local;
89 #ifdef EDM_ML_DEBUG
90  edm::LogVerbatim("CaloGeometry") << "FlatHexagon::Local " << local.x() << ":" << local.y() << ":" << local.z()
91  << " Global " << glb.x() << ":" << glb.y() << ":" << glb.z() << " TR " << m_tr.xx()
92  << ":" << m_tr.xy() << ":" << m_tr.xz() << ":" << m_tr.yx() << ":" << m_tr.yy()
93  << ":" << m_tr.yz() << ":" << m_tr.zx() << ":" << m_tr.zy() << ":" << m_tr.zz()
94  << ":" << m_tr.dx() << ":" << m_tr.dy() << ":" << m_tr.dz();
95 #endif
96  return GlobalPoint(glb.x(), glb.y(), glb.z());
97 }
double glb
Definition: hdecay.h:103
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
CaloCellGeometry::Pt3D Pt3D
CCGFloat FlatHexagon::getThetaAxis ( ) const

Definition at line 108 of file FlatHexagon.cc.

References m_axis, and PV3DBase< T, PVType, FrameType >::theta().

Referenced by operator<<(), and phiPos().

108 { return m_axis.theta(); }
GlobalVector m_axis
Definition: FlatHexagon.h:86
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
void FlatHexagon::getTransform ( Tr3D tr,
Pt3DVec lptr 
) const
overridevirtual

--------— only needed by specific utility; overloaded when needed -—

Reimplemented from CaloCellGeometry.

Definition at line 165 of file FlatHexagon.cc.

References angle(), axis(), MillePedeFileConverter_cfg::e, CaloCellGeometry::getPosition(), localCorners(), m_corOne, mag(), ncorner_, AlCaHLTBitMon_ParallelJobs::p, CaloCellGeometry::param(), unit(), x, PV3DBase< T, PVType, FrameType >::x(), y, PV3DBase< T, PVType, FrameType >::y(), z, and PV3DBase< T, PVType, FrameType >::z().

Referenced by FlatHexagon(), initCorners(), and phiPos().

165  {
167  const Pt3D gFront(p.x(), p.y(), p.z());
168  const DPt3D dgFront(p.x(), p.y(), p.z());
169 
170  Pt3D lFront;
171  assert(nullptr != param());
172  std::vector<Pt3D> lc(ncorner_, Pt3D(0, 0, 0));
173  localCorners(lc, param(), lFront);
174 
175  // figure out if reflction volume or not
176 
177  Pt3D lBack((lc[6] + lc[7] + lc[8] + lc[9] + lc[10] + lc[11]) / 6.0);
178 
179  const DPt3D dlFront(lFront.x(), lFront.y(), lFront.z());
180  const DPt3D dlBack(lBack.x(), lBack.y(), lBack.z());
181  const DPt3D dlOne(lc[0].x(), lc[0].y(), lc[0].z());
182 
183  const FVec3D dgAxis(axis().x(), axis().y(), axis().z());
184 
185  const DPt3D dmOne(m_corOne.x(), m_corOne.y(), m_corOne.z());
186 
187  const DPt3D dgBack(dgFront + (dlBack - dlFront).mag() * dgAxis);
188  DPt3D dgOne(dgFront + (dlOne - dlFront).mag() * (dmOne - dgFront).unit());
189 
190  const double dlangle((dlBack - dlFront).angle(dlOne - dlFront));
191  const double dgangle((dgBack - dgFront).angle(dgOne - dgFront));
192  const double dangle(dlangle - dgangle);
193 
194  if (1.e-6 < fabs(dangle)) { //guard against precision problems
195  const DPlane3D dgPl(dgFront, dgOne, dgBack);
196  const DPt3D dp2(dgFront + dgPl.normal().unit());
197 
198  DPt3D dgOld(dgOne);
199 
200  dgOne = (dgFront + HepGeom::Rotate3D(-dangle, dgFront, dp2) * DVec3D(dgOld - dgFront));
201  }
202 
203  tr = Tr3D(dlFront, dlBack, dlOne, dgFront, dgBack, dgOne);
204 
205  if (nullptr != lptr)
206  (*lptr) = lc;
207 }
Pt3D m_corOne
Definition: FlatHexagon.h:87
HepGeom::Point3D< double > DPt3D
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
CaloCellGeometry::Tr3D Tr3D
Definition: FlatHexagon.h:25
const GlobalVector & axis() const
Definition: FlatHexagon.cc:112
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: FlatHexagon.cc:136
static constexpr unsigned int ncorner_
Definition: FlatHexagon.h:77
CaloCellGeometry::Pt3D Pt3D
Definition: FlatHexagon.h:23
const CCGFloat * param() const
HepGeom::Vector3D< double > DVec3D
Definition: FlatHexagon.cc:17
CaloCellGeometry::Pt3D Pt3D
HepGeom::Plane3D< double > DPlane3D
HepGeom::Vector3D< CCGFloat > FVec3D
Basic3DVector unit() const
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
void FlatHexagon::initCorners ( CaloCellGeometry::CornersVec co)
overrideprivatevirtual

Implements CaloCellGeometry.

Definition at line 209 of file FlatHexagon.cc.

References getTransform(), mps_fire::i, ncorner_, and EZArrayFL< T >::uninitialized().

209  {
210  if (co.uninitialized()) {
211  CornersVec& corners(co);
212  Pt3DVec lc;
213  Tr3D tr;
214  getTransform(tr, &lc);
215 
216  for (unsigned int i(0); i != ncorner_; ++i) {
217  const Pt3D corn(tr * lc[i]);
218  corners[i] = GlobalPoint(corn.x(), corn.y(), corn.z());
219  }
220  }
221 }
EZArrayFL< GlobalPoint > CornersVec
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
static constexpr unsigned int ncorner_
Definition: FlatHexagon.h:77
void getTransform(Tr3D &tr, Pt3DVec *lptr) const override
--------— only needed by specific utility; overloaded when needed -—
Definition: FlatHexagon.cc:165
CaloCellGeometry::Pt3D Pt3D
CaloCellGeometry::Pt3DVec Pt3DVec
CaloCellGeometry::Tr3D Tr3D
bool uninitialized() const
Definition: EZArrayFL.h:63
void FlatHexagon::localCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
)
static

Definition at line 136 of file FlatHexagon.cc.

References PVValHelper::dz, k_dZ, k_r, k_R, ncorner_, oneBySix_, dttmaxenums::R, and alignCSCRings::r.

Referenced by createCorners(), getTransform(), HGCalGeometry::localCorners(), phiPos(), and vocalCorners().

136  {
137  assert(nullptr != pv);
138  assert(ncorner_ == lc.size());
139 
141  const CCGFloat r(pv[FlatHexagon::k_r]);
142  const CCGFloat R(pv[FlatHexagon::k_R]);
143 
144  lc[0] = Pt3D(0, -2 * R, -dz); // (0,-,-)
145  lc[1] = Pt3D(-r, -R, -dz); // (-,-,-)
146  lc[2] = Pt3D(-r, R, -dz); // (-,+,-)
147  lc[3] = Pt3D(0, 2 * R, -dz); // (0,+,-)
148  lc[4] = Pt3D(r, R, -dz); // (+,+,-)
149  lc[5] = Pt3D(r, -R, -dz); // (+,-,-)
150  lc[6] = Pt3D(0, -2 * R, dz); // (0,-,+)
151  lc[7] = Pt3D(-r, -R, dz); // (-,-,+)
152  lc[8] = Pt3D(-r, R, dz); // (-,+,+)
153  lc[9] = Pt3D(0, 2 * R, dz); // (0,+,+)
154  lc[10] = Pt3D(r, R, dz); // (+,+,+)
155  lc[11] = Pt3D(r, -R, dz); // (+,-,+)
156 
157  ref = oneBySix_ * (lc[0] + lc[1] + lc[2] + lc[3] + lc[4] + lc[5]);
158 #ifdef EDM_ML_DEBUG
159  edm::LogVerbatim("CaloGeometry") << "Ref " << ref << " Local Corners " << lc[0] << "|" << lc[1] << "|" << lc[2] << "|"
160  << lc[3] << "|" << lc[4] << "|" << lc[5] << "|" << lc[6] << "|" << lc[7] << "|"
161  << lc[8] << "|" << lc[9] << "|" << lc[10] << "|" << lc[11];
162 #endif
163 }
static constexpr unsigned int ncorner_
Definition: FlatHexagon.h:77
CaloCellGeometry::Pt3D Pt3D
Definition: FlatHexagon.h:23
static constexpr uint32_t k_R
Definition: FlatHexagon.h:29
static constexpr uint32_t k_r
Definition: FlatHexagon.h:28
def pv(vc)
Definition: MetAnalyzer.py:7
CaloCellGeometry::CCGFloat CCGFloat
static constexpr uint32_t k_dZ
Definition: FlatHexagon.h:27
static constexpr double oneBySix_
Definition: FlatHexagon.h:76
GlobalVector FlatHexagon::makeAxis ( void  )
private

Definition at line 223 of file FlatHexagon.cc.

References backCtr(), getPosition(), and Vector3DBase< T, FrameTag >::unit().

Referenced by FlatHexagon().

223 { return GlobalVector(backCtr() - getPosition()).unit(); }
GlobalPoint const & getPosition() const override
Returns the position of reference for this cell.
Definition: FlatHexagon.h:49
Vector3DBase unit() const
Definition: Vector3DBase.h:54
GlobalPoint backCtr(void) const
Definition: FlatHexagon.cc:225
Global3DVector GlobalVector
Definition: GlobalVector.h:10
FlatHexagon & FlatHexagon::operator= ( const FlatHexagon tr)

Definition at line 28 of file FlatHexagon.cc.

References etaPos(), m_axis, m_corOne, m_global, m_local, m_tr, and phiPos().

28  {
29  CaloCellGeometry::operator=(tr);
30  if (this != &tr) {
31  m_axis = tr.m_axis;
32  m_corOne = tr.m_corOne;
33  m_local = tr.m_local;
34  m_global = tr.m_global;
35  m_tr = tr.m_tr;
36  }
37 #ifdef EDM_ML_DEBUG
38  edm::LogVerbatim("CaloGeometry") << "FlatHexagon(Copy): Local " << m_local << " Global " << m_global << " eta "
39  << etaPos() << " phi " << phiPos() << " Translation " << m_tr.getTranslation()
40  << " and rotation " << m_tr.getRotation();
41 #endif
42  return *this;
43 }
Pt3D m_corOne
Definition: FlatHexagon.h:87
GlobalVector m_axis
Definition: FlatHexagon.h:86
Pt3D m_local
Definition: FlatHexagon.h:87
virtual float phiPos() const
Definition: FlatHexagon.h:52
virtual float etaPos() const
Definition: FlatHexagon.h:51
GlobalPoint m_global
Definition: FlatHexagon.h:88
virtual float FlatHexagon::phiPos ( ) const
inlinevirtual
void FlatHexagon::setPosition ( const GlobalPoint p)
inline

Definition at line 71 of file FlatHexagon.h.

References m_global, AlCaHLTBitMon_ParallelJobs::p, and CaloCellGeometry::setRefPoint().

71  {
72  m_global = p;
73  setRefPoint(p);
74  }
void setRefPoint(const GlobalPoint &pos)
GlobalPoint m_global
Definition: FlatHexagon.h:88
void FlatHexagon::vocalCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
) const
overridevirtual

Implements CaloCellGeometry.

Definition at line 114 of file FlatHexagon.cc.

References localCorners().

Referenced by phiPos().

114 { localCorners(vec, pv, ref); }
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: FlatHexagon.cc:136
def pv(vc)
Definition: MetAnalyzer.py:7

Member Data Documentation

constexpr uint32_t FlatHexagon::k_dZ = 0
static
constexpr uint32_t FlatHexagon::k_r = 1
static
constexpr uint32_t FlatHexagon::k_R = 2
static
GlobalVector FlatHexagon::m_axis
private

Definition at line 86 of file FlatHexagon.h.

Referenced by axis(), FlatHexagon(), getPhiAxis(), getThetaAxis(), and operator=().

Pt3D FlatHexagon::m_corOne
private

Definition at line 87 of file FlatHexagon.h.

Referenced by getTransform(), and operator=().

GlobalPoint FlatHexagon::m_global
private

Definition at line 88 of file FlatHexagon.h.

Referenced by etaPos(), FlatHexagon(), getPosition(), operator=(), phiPos(), and setPosition().

Pt3D FlatHexagon::m_local
private

Definition at line 87 of file FlatHexagon.h.

Referenced by backCtr(), FlatHexagon(), and operator=().

Tr3D FlatHexagon::m_tr
private

Definition at line 89 of file FlatHexagon.h.

Referenced by backCtr(), FlatHexagon(), getLocal(), getPosition(), and operator=().

constexpr unsigned int FlatHexagon::ncorner_ = 12
static
constexpr unsigned int FlatHexagon::ncornerBy2_ = 6
static
constexpr double FlatHexagon::oneBySix_ = 1.0 / 6.0
static