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 GlobalPoint &faceCenter, CornersMgr *mgr, const CCGFloat *parm)
 
 IdealCastorTrapezoid (const IdealCastorTrapezoid &idct)
 
IdealCastorTrapezoidoperator= (const IdealCastorTrapezoid &idct)
 
void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
 
virtual void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const=0
 
 ~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 (const CornersVec &cv, const CCGFloat *par)
 
 CaloCellGeometry (CornersVec::const_reference gp, CornersMgr *mgr, 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.

11 : CaloCellGeometry() {}

◆ 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.

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

References CaloCellGeometry::initSpan().

◆ ~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.

46 { return param()[4]; }

References CaloCellGeometry::param().

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

◆ dh()

CCGFloat IdealCastorTrapezoid::dh ( ) const

Definition at line 34 of file IdealCastorTrapezoid.cc.

34 { return param()[2]; }

References CaloCellGeometry::param().

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

◆ dhz()

CCGFloat IdealCastorTrapezoid::dhz ( ) const

Definition at line 40 of file IdealCastorTrapezoid.cc.

40 { return dh() * cos(an()); }

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

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

◆ dR()

CCGFloat IdealCastorTrapezoid::dR ( ) const

Definition at line 48 of file IdealCastorTrapezoid.cc.

48 { return param()[5]; }

References CaloCellGeometry::param().

Referenced by initCorners().

◆ dx()

CCGFloat IdealCastorTrapezoid::dx ( ) const

Definition at line 32 of file IdealCastorTrapezoid.cc.

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

References dxh(), and dxl().

Referenced by initCorners(), and localCorners().

◆ dxh()

CCGFloat IdealCastorTrapezoid::dxh ( ) const

Definition at line 30 of file IdealCastorTrapezoid.cc.

30 { return param()[1]; }

References CaloCellGeometry::param().

Referenced by dx(), and localCorners().

◆ dxl()

CCGFloat IdealCastorTrapezoid::dxl ( ) const

Definition at line 28 of file IdealCastorTrapezoid.cc.

28 { return param()[0]; }

References CaloCellGeometry::param().

Referenced by dx(), and localCorners().

◆ dy()

CCGFloat IdealCastorTrapezoid::dy ( ) const

Definition at line 36 of file IdealCastorTrapezoid.cc.

36 { return dh() * sin(an()); }

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

Referenced by initCorners(), and localCorners().

◆ dz()

CCGFloat IdealCastorTrapezoid::dz ( ) const

◆ dzb()

CCGFloat IdealCastorTrapezoid::dzb ( ) const

Definition at line 42 of file IdealCastorTrapezoid.cc.

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

References dhz(), and dz().

Referenced by localCorners().

◆ dzs()

CCGFloat IdealCastorTrapezoid::dzs ( ) const

Definition at line 44 of file IdealCastorTrapezoid.cc.

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

References dhz(), and dz().

Referenced by localCorners().

◆ initCorners()

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

Implements CaloCellGeometry.

Definition at line 83 of file IdealCastorTrapezoid.cc.

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 }

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().

◆ localCorners()

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

Definition at line 54 of file IdealCastorTrapezoid.cc.

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 }

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

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

◆ 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]

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

Implements CaloCellGeometry.

Definition at line 50 of file IdealCastorTrapezoid.cc.

50  {
51  localCorners(vec, pv, ref);
52 }

References localCorners(), and MetAnalyzer::pv().

◆ vocalCorners() [2/2]

virtual void CaloCellGeometry::vocalCorners
eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
gf
double gf
Definition: hdecay.h:34
mps_fire.i
i
Definition: mps_fire.py:428
IdealCastorTrapezoid::dhz
CCGFloat dhz() const
Definition: IdealCastorTrapezoid.cc:40
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: CaloCellGeometry.cc:4
cms::cuda::assert
assert(be >=bs)
IdealCastorTrapezoid::dx
CCGFloat dx() const
Definition: IdealCastorTrapezoid.cc:32
gs
Definition: AbsArchive.cc:45
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: CaloCellGeometry.cc:5
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
IdealCastorTrapezoid::dh
CCGFloat dh() const
Definition: IdealCastorTrapezoid.cc:34
IdealCastorTrapezoid::dR
CCGFloat dR() const
Definition: IdealCastorTrapezoid.cc:48
IdealCastorTrapezoid::dxh
CCGFloat dxh() const
Definition: IdealCastorTrapezoid.cc:30
Tr3D
CaloCellGeometry::Tr3D Tr3D
Definition: CaloCellGeometry.cc:7
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, GlobalTag >
CaloCellGeometry::initSpan
void initSpan()
Definition: CaloCellGeometry.h:120
DDAxes::rho
CaloCellGeometry::getPosition
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
Definition: CaloCellGeometry.h:80
IdealCastorTrapezoid::localCorners
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: IdealCastorTrapezoid.cc:54
IdealCastorTrapezoid::dzb
CCGFloat dzb() const
Definition: IdealCastorTrapezoid.cc:42
CaloCellGeometry::param
const CCGFloat * param() const
Definition: CaloCellGeometry.h:99
IdealCastorTrapezoid::an
CCGFloat an() const
Definition: IdealCastorTrapezoid.cc:46
IdealCastorTrapezoid::dz
CCGFloat dz() const
Definition: IdealCastorTrapezoid.cc:38
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
IdealCastorTrapezoid::dy
CCGFloat dy() const
Definition: IdealCastorTrapezoid.cc:36
DDAxes::phi
IdealCastorTrapezoid::dxl
CCGFloat dxl() const
Definition: IdealCastorTrapezoid.cc:28
IdealCastorTrapezoid::Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: IdealCastorTrapezoid.h:35
Pt3DVec
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: CaloCellGeometry.cc:6
IdealCastorTrapezoid::dzs
CCGFloat dzs() const
Definition: IdealCastorTrapezoid.cc:44
CaloCellGeometry::CaloCellGeometry
CaloCellGeometry(void)
Definition: CaloCellGeometry.cc:19
EZArrayFL::uninitialized
bool uninitialized() const
Definition: EZArrayFL.h:63