CMS 3D CMS Logo

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

#include <IdealCastorTrapezoid.h>

Inheritance diagram for IdealCastorTrapezoid:
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

CCGFloat an () const
 
CCGFloat dh () const
 
CCGFloat dhz () const
 
CCGFloat dR () const
 
CCGFloat dx () const
 
CCGFloat dxh () const
 
CCGFloat dxl () const
 
CCGFloat dy () const
 
CCGFloat dz () const
 
CCGFloat dzb () const
 
CCGFloat dzs () const
 
 IdealCastorTrapezoid ()
 
 IdealCastorTrapezoid (const IdealCastorTrapezoid &idct)
 
 IdealCastorTrapezoid (const GlobalPoint &faceCenter, CornersMgr *mgr, const CCGFloat *parm)
 
IdealCastorTrapezoidoperator= (const IdealCastorTrapezoid &idct)
 
virtual void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const=0
 
void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
 
 ~IdealCastorTrapezoid () override
 
- Public Member Functions inherited from CaloCellGeometry
bool emptyCorners () const
 
virtual float etaPos () const
 
virtual 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 const GlobalPointgetPosition () const
 Returns the position of reference for this cell. More...
 
virtual GlobalPoint getPosition (CCGFloat) const
 
virtual GlobalPoint getPosition (const Pt3D &) const
 
virtual void getTransform (Tr3D &tr, Pt3DVec *lptr) const
 --------— only needed by specific utility; overloaded when needed -— More...
 
bool inside (const GlobalPoint &point) const
 Returns true if the specified point is inside this cell. More...
 
const CCGFloatparam () const
 
virtual float phiPos () const
 
virtual float phiSpan () const
 
RhoEtaPhi const & repPos () const
 
virtual float rhoPos () const
 
void setBackPoint (const GlobalPoint &pos)
 
virtual ~CaloCellGeometry ()
 

Static Public Member Functions

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)
 

Private Member Functions

void initCorners (CornersVec &) override
 

Additional Inherited Members

- Static Public Attributes inherited from CaloCellGeometry
static constexpr unsigned int k_cornerSize = 8
 
static const CCGFloat k_ScaleFromDDDtoGeant
 
- 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

Trapezoid class used for CASTOR volumes.
Required parameters for an ideal trapezoid:

Total: 6+3 parameters

Revision
1.12
Author
P. Katsas - UoA

Definition at line 32 of file IdealCastorTrapezoid.h.

Member Typedef Documentation

◆ CCGFloat

Definition at line 34 of file IdealCastorTrapezoid.h.

◆ Pt3D

Definition at line 35 of file IdealCastorTrapezoid.h.

◆ Pt3DVec

Definition at line 36 of file IdealCastorTrapezoid.h.

◆ Tr3D

Definition at line 37 of file IdealCastorTrapezoid.h.

Constructor & Destructor Documentation

◆ IdealCastorTrapezoid() [1/3]

IdealCastorTrapezoid::IdealCastorTrapezoid ( )

Definition at line 11 of file IdealCastorTrapezoid.cc.

◆ IdealCastorTrapezoid() [2/3]

IdealCastorTrapezoid::IdealCastorTrapezoid ( const IdealCastorTrapezoid idct)

Definition at line 13 of file IdealCastorTrapezoid.cc.

13 : CaloCellGeometry(idct) { *this = idct; }

◆ IdealCastorTrapezoid() [3/3]

IdealCastorTrapezoid::IdealCastorTrapezoid ( const GlobalPoint faceCenter,
CornersMgr mgr,
const CCGFloat parm 
)

Definition at line 21 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::initSpan().

22  : CaloCellGeometry(faceCenter, mgr, parm) {
23  initSpan();
24 }

◆ ~IdealCastorTrapezoid()

IdealCastorTrapezoid::~IdealCastorTrapezoid ( )
override

Definition at line 26 of file IdealCastorTrapezoid.cc.

26 {}

Member Function Documentation

◆ an()

CCGFloat IdealCastorTrapezoid::an ( ) const

Definition at line 46 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by dhz(), dy(), and localCorners().

46 { return param()[4]; }
const CCGFloat * param() const

◆ dh()

CCGFloat IdealCastorTrapezoid::dh ( ) const

Definition at line 34 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by dhz(), dy(), and localCorners().

34 { return param()[2]; }
const CCGFloat * param() const

◆ dhz()

CCGFloat IdealCastorTrapezoid::dhz ( ) const

Definition at line 40 of file IdealCastorTrapezoid.cc.

References an(), funct::cos(), and dh().

Referenced by dzb(), dzs(), and localCorners().

40 { return dh() * cos(an()); }
Cos< T >::type cos(const T &t)
Definition: Cos.h:22

◆ dR()

CCGFloat IdealCastorTrapezoid::dR ( ) const

Definition at line 48 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by initCorners().

48 { return param()[5]; }
const CCGFloat * param() const

◆ dx()

CCGFloat IdealCastorTrapezoid::dx ( ) const

Definition at line 32 of file IdealCastorTrapezoid.cc.

References dxh(), and dxl().

Referenced by initCorners(), and localCorners().

32 { return (dxl() + dxh()) / 2.; }

◆ dxh()

CCGFloat IdealCastorTrapezoid::dxh ( ) const

Definition at line 30 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by dx(), and localCorners().

30 { return param()[1]; }
const CCGFloat * param() const

◆ dxl()

CCGFloat IdealCastorTrapezoid::dxl ( ) const

Definition at line 28 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by dx(), and localCorners().

28 { return param()[0]; }
const CCGFloat * param() const

◆ dy()

CCGFloat IdealCastorTrapezoid::dy ( ) const

Definition at line 36 of file IdealCastorTrapezoid.cc.

References an(), dh(), and funct::sin().

Referenced by initCorners(), and localCorners().

36 { return dh() * sin(an()); }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22

◆ dz()

CCGFloat IdealCastorTrapezoid::dz ( ) const

Definition at line 38 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by Electron.Electron::cutBasedId(), dzb(), ntupleDataFormat.Track::dzPull(), dzs(), initCorners(), and localCorners().

38 { return param()[3]; }
const CCGFloat * param() const

◆ dzb()

CCGFloat IdealCastorTrapezoid::dzb ( ) const

Definition at line 42 of file IdealCastorTrapezoid.cc.

References dhz(), and dz().

Referenced by localCorners().

42 { return dz() + dhz(); }

◆ dzs()

CCGFloat IdealCastorTrapezoid::dzs ( ) const

Definition at line 44 of file IdealCastorTrapezoid.cc.

References dhz(), and dz().

Referenced by localCorners().

44 { return dz() - dhz(); }

◆ initCorners()

void IdealCastorTrapezoid::initCorners ( CaloCellGeometry::CornersVec corners)
overrideprivatevirtual

Implements CaloCellGeometry.

Definition at line 83 of file IdealCastorTrapezoid.cc.

References funct::cos(), dR(), dx(), dy(), dz(), CaloCellGeometry::getPosition(), gf, mps_fire::i, localCorners(), eostools::ls(), AlCaHLTBitMon_ParallelJobs::p, CaloCellGeometry::param(), phi, rho, funct::sin(), and EZArrayFL< T >::uninitialized().

83  {
84  if (corners.uninitialized()) {
85  const GlobalPoint& p(getPosition());
86  const CCGFloat zsign(0 < p.z() ? 1. : -1.);
87  const Pt3D gf(p.x(), p.y(), p.z());
88 
89  Pt3D lf;
90  Pt3DVec lc(8, Pt3D(0, 0, 0));
91  localCorners(lc, param(), lf);
92  const Pt3D lb(lf.x(), lf.y(), lf.z() - 2. * dz());
93  const Pt3D ls(lf.x() - dx(), lf.y(), lf.z());
94 
95  const CCGFloat fphi(atan(dx() / (dR() + dy())));
96  const Pt3D gb(gf.x(), gf.y(), gf.z() + 2. * zsign * dz());
97 
98  const CCGFloat rho(dR() + dy());
99  const CCGFloat phi(gf.phi() + fphi);
100  const Pt3D gs(rho * cos(phi), rho * sin(phi), gf.z());
101 
102  const Tr3D tr(lf, lb, ls, gf, gb, gs);
103 
104  for (unsigned int i(0); i != 8; ++i) {
105  const Pt3D gl(tr * lc[i]);
106  corners[i] = GlobalPoint(gl.x(), gl.y(), gl.z());
107  }
108  }
109 }
CaloCellGeometry::Pt3D Pt3D
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
CaloCellGeometry::CCGFloat CCGFloat
CaloCellGeometry::Pt3D Pt3D
def ls(path, rec=False)
Definition: eostools.py:349
CaloCellGeometry::Pt3DVec Pt3DVec
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
CaloCellGeometry::Tr3D Tr3D
double gf
Definition: hdecay.h:34
Definition: AbsArchive.cc:46
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
bool uninitialized() const
Definition: EZArrayFL.h:61
const CCGFloat * param() const

◆ localCorners()

void IdealCastorTrapezoid::localCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
)
static

Definition at line 54 of file IdealCastorTrapezoid.cc.

References an(), cms::cuda::assert(), funct::cos(), dh(), dhz(), dx(), dxh(), dxl(), dy(), dz(), dzb(), dzs(), and funct::sin().

Referenced by initCorners(), CastorGeometry::localCorners(), and vocalCorners().

54  {
55  assert(8 == lc.size());
56  assert(nullptr != pv);
57 
58  const CCGFloat dxl(pv[0]);
59  const CCGFloat dxh(pv[1]);
60  const CCGFloat dh(pv[2]);
61  const CCGFloat dz(pv[3]);
62  const CCGFloat an(pv[4]);
63  const CCGFloat dx((dxl + dxh) / 2.);
64  const CCGFloat dy(dh * sin(an));
65  const CCGFloat dhz(dh * cos(an));
66  const CCGFloat dzb(dz + dhz);
67  const CCGFloat dzs(dz - dhz);
68 
69  assert(0 < (dxl * dxh));
70 
71  lc[0] = Pt3D(-dx, -dy, dzb);
72  lc[1] = Pt3D(-dx, +dy, dzs);
73  lc[2] = Pt3D(+2 * dxh - dx, +dy, dzs);
74  lc[3] = Pt3D(+2 * dxl - dx, -dy, dzb);
75  lc[4] = Pt3D(-dx, -dy, -dzs);
76  lc[5] = Pt3D(-dx, +dy, -dzb);
77  lc[6] = Pt3D(+2 * dxh - dx, +dy, -dzb);
78  lc[7] = Pt3D(+2 * dxl - dx, -dy, -dzs);
79 
80  ref = 0.25 * (lc[0] + lc[1] + lc[2] + lc[3]);
81 }
CaloCellGeometry::Pt3D Pt3D
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
assert(be >=bs)
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
CaloCellGeometry::CCGFloat CCGFloat

◆ operator=()

IdealCastorTrapezoid & IdealCastorTrapezoid::operator= ( const IdealCastorTrapezoid idct)

Definition at line 15 of file IdealCastorTrapezoid.cc.

15  {
16  if (&idct != this)
17  CaloCellGeometry::operator=(idct);
18  return *this;
19 }

◆ vocalCorners() [1/2]

virtual void CaloCellGeometry::vocalCorners

◆ vocalCorners() [2/2]

void IdealCastorTrapezoid::vocalCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
) const
overridevirtual

Implements CaloCellGeometry.

Definition at line 50 of file IdealCastorTrapezoid.cc.

References localCorners().

50  {
51  localCorners(vec, pv, ref);
52 }
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)