CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
enum  CornersSize { k_cornerSize = 8 }
 
typedef EZArrayFL< GlobalPointCornersVec
 
typedef EZMgrFL< CCGFloatParMgr
 
typedef EZArrayFL< CCGFloatParVec
 
typedef std::vector< ParVecParVecVec
 
typedef HepGeom::Point3D
< CCGFloat
Pt3D
 
typedef std::vector< Pt3DPt3DVec
 
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
 
virtual ~IdealCastorTrapezoid ()
 
- Public Member Functions inherited from CaloCellGeometry
bool emptyCorners () const
 
float etaPos () const
 
float etaSpan () const
 
const GlobalPointgetBackPoint () const
 
const CornersVecgetCorners () const
 Returns the corner points of this cell's volume. More...
 
const GlobalPointgetPosition () const
 Returns the position of reference for this cell. More...
 
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
 
float phiPos () const
 
float phiSpan () const
 
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

virtual void initCorners (CornersVec &) override
 

Additional Inherited Members

- Static Public Attributes inherited from CaloCellGeometry
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 ()
 

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

Definition at line 36 of file IdealCastorTrapezoid.h.

Definition at line 37 of file IdealCastorTrapezoid.h.

Definition at line 38 of file IdealCastorTrapezoid.h.

Definition at line 39 of file IdealCastorTrapezoid.h.

Constructor & Destructor Documentation

IdealCastorTrapezoid::IdealCastorTrapezoid ( )

Definition at line 11 of file IdealCastorTrapezoid.cc.

13 {
14 }
IdealCastorTrapezoid::IdealCastorTrapezoid ( const IdealCastorTrapezoid idct)

Definition at line 16 of file IdealCastorTrapezoid.cc.

17  : CaloCellGeometry( idct )
18 {
19  *this = idct ;
20 }
IdealCastorTrapezoid::IdealCastorTrapezoid ( const GlobalPoint faceCenter,
CornersMgr mgr,
const CCGFloat parm 
)

Definition at line 29 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::initSpan().

32  : CaloCellGeometry ( faceCenter, mgr, parm )
33 {initSpan();}
IdealCastorTrapezoid::~IdealCastorTrapezoid ( )
virtual

Definition at line 35 of file IdealCastorTrapezoid.cc.

36 {
37 }

Member Function Documentation

CCGFloat IdealCastorTrapezoid::an ( ) const

Definition at line 94 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

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

95 {
96  return param()[4] ;
97 }
const CCGFloat * param() const
CCGFloat IdealCastorTrapezoid::dh ( ) const

Definition at line 58 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

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

59 {
60  return param()[2] ;
61 }
const CCGFloat * param() const
CCGFloat IdealCastorTrapezoid::dhz ( ) const

Definition at line 76 of file IdealCastorTrapezoid.cc.

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

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

77 {
78  return dh()*cos(an()) ;
79 }
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
CCGFloat IdealCastorTrapezoid::dR ( ) const

Definition at line 100 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by initCorners().

101 {
102  return param()[5] ;
103 }
const CCGFloat * param() const
CCGFloat IdealCastorTrapezoid::dx ( ) const

Definition at line 52 of file IdealCastorTrapezoid.cc.

References dxh(), and dxl().

Referenced by initCorners(), and localCorners().

53 {
54  return ( dxl()+dxh() )/2. ;
55 }
CCGFloat IdealCastorTrapezoid::dxh ( ) const

Definition at line 46 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by dx(), and localCorners().

47 {
48  return param()[1] ;
49 }
const CCGFloat * param() const
CCGFloat IdealCastorTrapezoid::dxl ( ) const

Definition at line 40 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by dx(), and localCorners().

41 {
42  return param()[0] ;
43 }
const CCGFloat * param() const
CCGFloat IdealCastorTrapezoid::dy ( ) const

Definition at line 64 of file IdealCastorTrapezoid.cc.

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

Referenced by initCorners(), and localCorners().

65 {
66  return dh()*sin(an()) ;
67 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
CCGFloat IdealCastorTrapezoid::dz ( ) const

Definition at line 70 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

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

71 {
72  return param()[3] ;
73 }
const CCGFloat * param() const
CCGFloat IdealCastorTrapezoid::dzb ( ) const

Definition at line 82 of file IdealCastorTrapezoid.cc.

References dhz(), and dz().

Referenced by localCorners().

83 {
84  return dz() + dhz() ;
85 }
CCGFloat IdealCastorTrapezoid::dzs ( ) const

Definition at line 88 of file IdealCastorTrapezoid.cc.

References dhz(), and dz().

Referenced by localCorners().

89 {
90  return dz() - dhz() ;
91 }
void IdealCastorTrapezoid::initCorners ( CaloCellGeometry::CornersVec corners)
overrideprivatevirtual

Implements CaloCellGeometry.

Definition at line 147 of file IdealCastorTrapezoid.cc.

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

148 {
149  if( corners.uninitialized() )
150  {
151  const GlobalPoint& p ( getPosition() ) ;
152  const CCGFloat zsign ( 0 < p.z() ? 1. : -1. ) ;
153  const Pt3D gf ( p.x(), p.y(), p.z() ) ;
154 
155  Pt3D lf ;
156  Pt3DVec lc ( 8, Pt3D(0,0,0) ) ;
157  localCorners( lc, param(), lf ) ;
158  const Pt3D lb ( lf.x() , lf.y() , lf.z() - 2.*dz() ) ;
159  const Pt3D ls ( lf.x() - dx(), lf.y(), lf.z() ) ;
160 
161 
162  const CCGFloat fphi ( atan( dx()/( dR() + dy() ) ) ) ;
163  const Pt3D gb ( gf.x() , gf.y() , gf.z() + 2.*zsign*dz() ) ;
164 
165  const CCGFloat rho ( dR() + dy() ) ;
166  const CCGFloat phi ( gf.phi() + fphi ) ;
167  const Pt3D gs ( rho*cos(phi) ,
168  rho*sin(phi) ,
169  gf.z() ) ;
170 
171  const Tr3D tr ( lf, lb, ls,
172  gf, gb, gs ) ;
173 
174  for( unsigned int i ( 0 ) ; i != 8 ; ++i )
175  {
176  const Pt3D gl ( tr*lc[i] ) ;
177  corners[i] = GlobalPoint( gl.x(), gl.y(), gl.z() ) ;
178  }
179  }
180 }
int i
Definition: DBlmapReader.cc:9
CaloCellGeometry::Pt3D Pt3D
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
def ls
Definition: eostools.py:348
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
const CCGFloat * param() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
CaloCellGeometry::CCGFloat CCGFloat
CaloCellGeometry::Pt3D Pt3D
CaloCellGeometry::Pt3DVec Pt3DVec
CaloCellGeometry::Tr3D Tr3D
bool uninitialized() const
Definition: EZArrayFL.h:77
double gf
Definition: hdecay.h:34
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
void IdealCastorTrapezoid::localCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
)
static

Definition at line 114 of file IdealCastorTrapezoid.cc.

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

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

117 {
118  assert( 8 == lc.size() ) ;
119  assert( 0 != pv ) ;
120 
121  const CCGFloat dxl ( pv[0] ) ;
122  const CCGFloat dxh ( pv[1] ) ;
123  const CCGFloat dh ( pv[2] ) ;
124  const CCGFloat dz ( pv[3] ) ;
125  const CCGFloat an ( pv[4] ) ;
126  const CCGFloat dx ( ( dxl +dxh )/2. ) ;
127  const CCGFloat dy ( dh*sin(an) ) ;
128  const CCGFloat dhz ( dh*cos(an) ) ;
129  const CCGFloat dzb ( dz + dhz ) ;
130  const CCGFloat dzs ( dz - dhz ) ;
131 
132  assert( 0 < (dxl*dxh) ) ;
133 
134  lc[ 0 ] = Pt3D ( -dx, -dy , dzb ) ;
135  lc[ 1 ] = Pt3D ( -dx, +dy , dzs ) ;
136  lc[ 2 ] = Pt3D ( +2*dxh -dx, +dy , dzs ) ;
137  lc[ 3 ] = Pt3D ( +2*dxl -dx, -dy , dzb ) ;
138  lc[ 4 ] = Pt3D ( -dx, -dy , -dzs ) ;
139  lc[ 5 ] = Pt3D ( -dx, +dy , -dzb ) ;
140  lc[ 6 ] = Pt3D ( +2*dxh -dx, +dy , -dzb ) ;
141  lc[ 7 ] = Pt3D ( +2*dxl -dx, -dy , -dzs ) ;
142 
143  ref = 0.25*( lc[0] + lc[1] + lc[2] + lc[3] ) ;
144 }
CaloCellGeometry::Pt3D Pt3D
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
assert(m_qm.get())
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
CaloCellGeometry::CCGFloat CCGFloat
IdealCastorTrapezoid & IdealCastorTrapezoid::operator= ( const IdealCastorTrapezoid idct)

Definition at line 23 of file IdealCastorTrapezoid.cc.

24 {
25  if( &idct != this ) CaloCellGeometry::operator=( idct ) ;
26  return *this ;
27 }
void IdealCastorTrapezoid::vocalCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
) const
virtual

Implements CaloCellGeometry.

Definition at line 106 of file IdealCastorTrapezoid.cc.

References localCorners().

109 {
110  localCorners( vec, pv, ref ) ;
111 }
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)