2 #include <CLHEP/Geometry/Plane3D.h> 9 typedef HepGeom::Vector3D<CCGFloat>
FVec3D;
10 typedef HepGeom::Plane3D<CCGFloat>
Plane3D;
12 typedef HepGeom::Vector3D<double>
DVec3D;
14 typedef HepGeom::Point3D<double>
DPt3D;
20 : m_refPoint(0., 0., 0.), m_corners(), m_parms((
CCGFloat*)nullptr), m_dEta(0), m_dPhi(0) {}
25 : m_refPoint(
gp), m_corners(mgr), m_parms(par), m_rep(
gp.
perp(),
gp.
eta(),
gp.
barePhi()), m_dEta(0), m_dPhi(0) {}
28 : m_refPoint(0.25 * (
cv[0].
x() +
cv[1].
x() +
cv[2].
x() +
cv[3].
x()),
41 s <<
"Corners vector is empty." << std::endl;
44 for (
unsigned int i(0);
i != corners.size(); ++
i) {
45 s <<
"Corner: " << corners[
i] << std::endl;
53 const Pt3D gFront(
p.x(),
p.y(),
p.z());
54 const DPt3D dgFront(
p.x(),
p.y(),
p.z());
61 DPt3D dlFront(lFront.x(), lFront.y(), lFront.z());
63 const Pt3D lBack(0.25 * (lc[4] + lc[5] + lc[6] + lc[7]));
64 const DPt3D dlBack(lBack.x(), lBack.y(), lBack.z());
66 const Pt3D dlOne(lc[0].
x(), lc[0].
y(), lc[0].
z());
70 for (
unsigned int i(0);
i != 8; ++
i) {
74 DPt3D dgBack(0.25 * (dkor[4] + dkor[5] + dkor[6] + dkor[7]));
76 const DVec3D dgAxis((dgBack - dgFront).
unit());
78 dgBack = (dgFront + (dlBack - dlFront).
mag() * dgAxis);
79 const DPt3D dgOneT(dgFront + (dlOne - dlFront).
mag() * (dkor[0] - dgFront).
unit());
81 const double dlangle((dlBack - dlFront).
angle(dlOne - dlFront));
82 const double dgangle((dgBack - dgFront).
angle(dgOneT - dgFront));
83 const double ddangle(dlangle - dgangle);
85 const DPlane3D dgPl(dgFront, dgOneT, dgBack);
86 const DPt3D dp2(dgFront + dgPl.normal().unit());
88 const DPt3D dgOne(dgFront + HepGeom::Rotate3D(-ddangle, dgFront, dp2) *
DVec3D(dgOneT - dgFront));
90 tr =
Tr3D(dlFront, dlBack, dlOne, dgFront, dgBack, dgOne);
97 const float* pP(
nullptr);
99 for (
unsigned int ii(0);
ii != pvv.size(); ++
ii) {
104 for (
unsigned int j(0);
j != vv.size(); ++
j) {
105 same = same && (fabs(vv[
j] -
v[
j]) < 1.e-6);
123 pvv.emplace_back(
ParVec(mgr));
125 for (
unsigned int i(0);
i != vv.size(); ++
i) {
128 pP = &(*back.begin());
138 for (
unsigned int i(0);
i != 8; ++
i) {
145 if (AA.distance(
p) * BB.distance(
p) >= 0) {
148 if (CC.distance(
p) *
DD.distance(
p) >= 0) {
151 if (
EE.distance(
p) * FF.distance(
p) >= 0) {
std::ostream & operator<<(std::ostream &s, const CaloCellGeometry &cell)
EZArrayFL< CCGFloat > ParVec
std::vector< ParVec > ParVecVec
HepGeom::Point3D< double > DPt3D
HepGeom::Transform3D Tr3D
std::vector< Pt3D > Pt3DVec
__host__ __device__ VT * co
virtual ~CaloCellGeometry()
HepGeom::Vector3D< double > DVec3D
CaloCellGeometry::CCGFloat CCGFloat
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
static const CCGFloat k_ScaleFromDDDtoGeant
virtual void vocalCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const =0
T perp() const
Magnitude of transverse component.
Basic3DVector unit() const
CaloCellGeometry::Pt3D Pt3D
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
HepGeom::Plane3D< double > DPlane3D
bool emptyCorners() const
CaloCellGeometry::Pt3DVec Pt3DVec
HepGeom::Point3D< CCGFloat > Pt3D
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
DD
single HTRIG enabling on first/second tracks
CaloCellGeometry::Tr3D Tr3D
bool inside(const GlobalPoint &point) const
Returns true if the specified point is inside this cell.
std::vector< DPt3D > DPt3DVec
HepGeom::Plane3D< CCGFloat > Plane3D
CornersVec const & getCorners() const
Returns the corner points of this cell's volume.
virtual void getTransform(Tr3D &tr, Pt3DVec *lptr) const
--------— only needed by specific utility; overloaded when needed -—
HepGeom::Vector3D< CCGFloat > FVec3D
ROOT::Math::Plane3D Plane3D
const CCGFloat * param() const
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
static const CCGFloat * checkParmPtr(const std::vector< CCGFloat > &vd, ParVecVec &pvv)
T angle(T x1, T y1, T z1, T x2, T y2, T z2)