|
|
Go to the documentation of this file.
14 typedef HepGeom::Vector3D<CCGFloat>
FVec3D;
15 typedef HepGeom::Plane3D<CCGFloat>
Plane3D;
17 typedef HepGeom::Vector3D<double>
DVec3D;
19 typedef HepGeom::Point3D<double>
DPt3D;
25 :
CaloCellGeometry(), m_axis(0., 0., 0.), m_corOne(0., 0., 0.), m_local(0., 0., 0.), m_global(0., 0., 0.) {}
30 CaloCellGeometry::operator=(tr);
40 <<
etaPos() <<
" phi " <<
phiPos() <<
" Translation " <<
m_tr.getTranslation()
41 <<
" and rotation " <<
m_tr.getRotation();
49 m_axis((bCtr - fCtr).
unit()),
50 m_corOne(cor1.
x(), cor1.
y(), cor1.
z()),
57 <<
" phi " <<
phiPos() <<
" Translation " <<
m_tr.getTranslation()
58 <<
" and rotation " <<
m_tr.getRotation();
63 :
CaloCellGeometry(corn, par), m_corOne(corn[0].
x(), corn[0].
y(), corn[0].
z()), m_local(0., 0., 0.) {
70 <<
" phi " <<
phiPos() <<
" Translation " <<
m_tr.getTranslation()
71 <<
" and rotation " <<
m_tr.getRotation();
81 <<
" phi " <<
phiPos() <<
" Translation " <<
m_tr.getTranslation()
82 <<
" and rotation " <<
m_tr.getRotation();
92 <<
" Global " <<
glb.x() <<
":" <<
glb.y() <<
":" <<
glb.z() <<
" TR " <<
m_tr.xx()
93 <<
":" <<
m_tr.xy() <<
":" <<
m_tr.xz() <<
":" <<
m_tr.yx() <<
":" <<
m_tr.yy()
94 <<
":" <<
m_tr.yz() <<
":" <<
m_tr.zx() <<
":" <<
m_tr.zy() <<
":" <<
m_tr.zz()
95 <<
":" <<
m_tr.dx() <<
":" <<
m_tr.dy() <<
":" <<
m_tr.dz();
119 edm::LogVerbatim(
"CaloGeometry") <<
"FlatTrd::Global " << global.
x() <<
":" << global.
y() <<
":" << global.
z()
165 lc[0] =
Pt3D(-
h * ta1 - bl, -
h, -
dz);
166 lc[1] =
Pt3D(+
h * ta1 - tl, +
h, -
dz);
167 lc[2] =
Pt3D(+
h * ta1 + tl, +
h, -
dz);
168 lc[3] =
Pt3D(-
h * ta1 + bl, -
h, -
dz);
169 lc[4] =
Pt3D(-
h * ta1 - bl, -
h,
dz);
170 lc[5] =
Pt3D(+
h * ta1 - tl, +
h,
dz);
171 lc[6] =
Pt3D(+
h * ta1 + tl, +
h,
dz);
172 lc[7] =
Pt3D(-
h * ta1 + bl, -
h,
dz);
174 ref = 0.25 * (lc[0] + lc[1] + lc[2] + lc[3]);
176 edm::LogVerbatim(
"CaloGeometry") <<
"Ref " << ref <<
" Local Corners " << lc[0] <<
"|" << lc[1] <<
"|" << lc[2] <<
"|"
177 << lc[3] <<
"|" << lc[4] <<
"|" << lc[5] <<
"|" << lc[6] <<
"|" << lc[7];
183 const Pt3D gFront(
p.x(),
p.y(),
p.z());
184 const DPt3D dgFront(
p.x(),
p.y(),
p.z());
193 Pt3D lBack(0.25 * (lc[4] + lc[5] + lc[6] + lc[7]));
195 const DPt3D dlFront(lFront.x(), lFront.y(), lFront.z());
196 const DPt3D dlBack(lBack.x(), lBack.y(), lBack.z());
197 const DPt3D dlOne(lc[0].
x(), lc[0].
y(), lc[0].
z());
203 const DPt3D dgBack(dgFront + (dlBack - dlFront).
mag() * dgAxis);
204 DPt3D dgOne(dgFront + (dlOne - dlFront).
mag() * (dmOne - dgFront).
unit());
206 const double dlangle((dlBack - dlFront).
angle(dlOne - dlFront));
207 const double dgangle((dgBack - dgFront).
angle(dgOne - dgFront));
208 const double dangle(dlangle - dgangle);
210 if (1.
e-6 < fabs(dangle)) {
211 const DPlane3D dgPl(dgFront, dgOne, dgBack);
212 const DPt3D dp2(dgFront + dgPl.normal().unit());
216 dgOne = (dgFront + HepGeom::Rotate3D(-dangle, dgFront, dp2) *
DVec3D(dgOld - dgFront));
219 tr =
Tr3D(dlFront, dlBack, dlOne, dgFront, dgBack, dgOne);
226 if (
co.uninitialized()) {
233 const Pt3D corn(tr * lc[
i]);
245 GlobalPoint global(global_b.x(), global_b.y(), global_b.z());
256 for (
unsigned int i = 0;
i != corners.size(); ++
i) {
257 s <<
"Corner: " << corners[
i] << std::endl;
HepGeom::Transform3D Tr3D
std::vector< Pt3D > Pt3DVec
static void createCorners(const std::vector< CCGFloat > &pv, const Tr3D &tr, std::vector< GlobalPoint > &co)
GlobalVector makeAxis(void)
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
FlatTrd::CCGFloat CCGFloat
A base class to handle the particular shape of HGCal volumes.
HepGeom::Plane3D< CCGFloat > Plane3D
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Geom::Theta< T > theta() const
GlobalPoint const & getPosition() const override
Returns the position of reference for this cell.
CornersVec const & getCorners() const
Returns the corner points of this cell's volume.
HepGeom::Point3D< double > DPt3D
Global3DVector GlobalVector
Pt3D getLocal(const GlobalPoint &global) const
void getTransform(Tr3D &tr, Pt3DVec *lptr) const override
--------— only needed by specific utility; overloaded when needed -—
static const float tolmin
HepGeom::Vector3D< CCGFloat > FVec3D
static constexpr uint32_t k_dX1
Vector3DBase unit() const
static constexpr uint32_t k_Alp1
Global3DPoint GlobalPoint
HepGeom::Point3D< CCGFloat > Pt3D
CaloCellGeometry::Tr3D Tr3D
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
HepGeom::Point3D< double > DPt3D
static constexpr unsigned int ncornerBy2_
HepGeom::Plane3D< double > DPlane3D
FlatTrd & operator=(const FlatTrd &tr)
const CCGFloat * param() const
Tan< T >::type tan(const T &t)
float etaPos() const override
static constexpr uint32_t k_dX2
HepGeom::Vector3D< CCGFloat > FVec3D
CCGFloat getPhiAxis() const
void vocalCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
std::ostream & operator<<(std::ostream &s, const FlatTrd &cell)
float phiSpan() const override
Basic3DVector unit() const
HepGeom::Vector3D< double > DVec3D
float phiPos() const override
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
HepGeom::Plane3D< double > DPlane3D
CCGFloat getThetaAxis() const
Log< level::Info, true > LogVerbatim
CaloCellGeometry::Pt3D Pt3D
const GlobalVector & axis() const
GlobalPoint backCtr(void) const
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
float etaSpan() const override
void initCorners(CornersVec &) override
Abs< T >::type abs(const T &t)
CaloCellGeometry::CCGFloat CCGFloat
static constexpr unsigned int ncorner_
static constexpr uint32_t k_dY1
Geom::Phi< T > phi() const
static constexpr uint32_t k_dZ
CaloCellGeometry::Pt3DVec Pt3DVec