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
IdealZDCTrapezoid Class Reference

#include <IdealZDCTrapezoid.h>

Inheritance diagram for IdealZDCTrapezoid:
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 dt () const
 
CCGFloat dx () const
 
CCGFloat dy () const
 
CCGFloat dz () const
 
 IdealZDCTrapezoid ()
 
 IdealZDCTrapezoid (const IdealZDCTrapezoid &idzt)
 
 IdealZDCTrapezoid (const GlobalPoint &faceCenter, CornersMgr *mgr, const CCGFloat *parm)
 
IdealZDCTrapezoidoperator= (const IdealZDCTrapezoid &idzt)
 
CCGFloat ta () const
 
virtual void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const
 
virtual ~IdealZDCTrapezoid ()
 
- 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

void initCorners (CaloCellGeometry::CornersVec &)
 

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 ZDC volumes.

Required parameters for an ideal zdc trapezoid:

Total: 7 parameters

Revision:
1.9
Author
E. Garcia - UIC

Definition at line 22 of file IdealZDCTrapezoid.h.

Member Typedef Documentation

Definition at line 26 of file IdealZDCTrapezoid.h.

Definition at line 27 of file IdealZDCTrapezoid.h.

Definition at line 28 of file IdealZDCTrapezoid.h.

Definition at line 29 of file IdealZDCTrapezoid.h.

Constructor & Destructor Documentation

IdealZDCTrapezoid::IdealZDCTrapezoid ( )

Definition at line 8 of file IdealZDCTrapezoid.cc.

10 {
11 }
IdealZDCTrapezoid::IdealZDCTrapezoid ( const IdealZDCTrapezoid idzt)

Definition at line 13 of file IdealZDCTrapezoid.cc.

14  : CaloCellGeometry( idzt )
15 {
16  *this = idzt ;
17 }
IdealZDCTrapezoid::IdealZDCTrapezoid ( const GlobalPoint faceCenter,
CornersMgr mgr,
const CCGFloat parm 
)

Definition at line 26 of file IdealZDCTrapezoid.cc.

References CaloCellGeometry::initSpan().

28  :
29  CaloCellGeometry ( faceCenter, mgr, parm )
30 {initSpan();}
IdealZDCTrapezoid::~IdealZDCTrapezoid ( )
virtual

Definition at line 32 of file IdealZDCTrapezoid.cc.

32 {}

Member Function Documentation

CCGFloat IdealZDCTrapezoid::an ( ) const

Definition at line 35 of file IdealZDCTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by localCorners(), operator<<(), and ta().

35 { return param()[0] ; }
const CCGFloat * param() const
CCGFloat IdealZDCTrapezoid::dt ( ) const

Definition at line 62 of file IdealZDCTrapezoid.cc.

References dy(), and ta().

Referenced by localCorners().

63 {
64  return dy()*ta() ;
65 }
CCGFloat dy() const
CCGFloat ta() const
CCGFloat IdealZDCTrapezoid::dx ( ) const

Definition at line 38 of file IdealZDCTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by initCorners(), localCorners(), and operator<<().

39 {
40  return param()[1] ;
41 }
const CCGFloat * param() const
CCGFloat IdealZDCTrapezoid::dy ( ) const

Definition at line 44 of file IdealZDCTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by dt(), localCorners(), and operator<<().

45 {
46  return param()[2] ;
47 }
const CCGFloat * param() const
CCGFloat IdealZDCTrapezoid::dz ( ) const

Definition at line 50 of file IdealZDCTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by Electron.Electron::cutBasedId(), initCorners(), localCorners(), and operator<<().

51 {
52  return param()[3] ;
53 }
const CCGFloat * param() const
void IdealZDCTrapezoid::initCorners ( CaloCellGeometry::CornersVec corners)
privatevirtual

Implements CaloCellGeometry.

Definition at line 103 of file IdealZDCTrapezoid.cc.

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

104 {
105  if( corners.uninitialized() )
106  {
107  const GlobalPoint& p ( getPosition() ) ;
108  const CCGFloat zsign ( 0 < p.z() ? 1. : -1. ) ;
109  const Pt3D gf ( p.x(), p.y(), p.z() ) ;
110 
111  Pt3D lf ;
112  Pt3DVec lc ( 8, Pt3D(0,0,0) ) ;
113  localCorners( lc, param(), lf ) ;
114  const Pt3D lb ( lf.x() , lf.y() , lf.z() - 2.*dz() ) ;
115  const Pt3D ls ( lf.x() - dx(), lf.y(), lf.z() ) ;
116 
117  const Pt3D gb ( gf.x() , gf.y() , gf.z() + 2.*zsign*dz() ) ;
118 
119  const Pt3D gs ( gf.x() - zsign*dx(),
120  gf.y() ,
121  gf.z() ) ;
122 
123  const HepGeom::Transform3D tr ( lf, lb, ls,
124  gf, gb, gs ) ;
125 
126  for( unsigned int i ( 0 ) ; i != 8 ; ++i )
127  {
128  const Pt3D gl ( tr*lc[i] ) ;
129  corners[i] = GlobalPoint( gl.x(), gl.y(), gl.z() ) ;
130  }
131  }
132 }
int i
Definition: DBlmapReader.cc:9
def ls
Definition: eostools.py:348
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
CCGFloat dx() const
const CCGFloat * param() const
CaloCellGeometry::CCGFloat CCGFloat
CaloCellGeometry::Pt3D Pt3D
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
CaloCellGeometry::Pt3DVec Pt3DVec
CCGFloat dz() const
bool uninitialized() const
Definition: EZArrayFL.h:77
double gf
Definition: hdecay.h:34
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
CaloCellGeometry::Pt3D Pt3D
void IdealZDCTrapezoid::localCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
)
static

Definition at line 76 of file IdealZDCTrapezoid.cc.

References an(), assert(), dt(), dx(), dy(), dz(), ta(), and funct::tan().

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

79 {
80  assert( 8 == lc.size() ) ;
81  assert( 0 != pv ) ;
82 
83  const CCGFloat an ( pv[0] ) ;
84  const CCGFloat dx ( pv[1] ) ;
85  const CCGFloat dy ( pv[2] ) ;
86  const CCGFloat dz ( pv[3] ) ;
87  const CCGFloat ta ( tan( an ) ) ;
88  const CCGFloat dt ( dy*ta ) ;
89 
90  lc[0] = Pt3D ( -dx, -dy, +dz+dt ) ;
91  lc[1] = Pt3D ( -dx, +dy, +dz-dt ) ;
92  lc[2] = Pt3D ( +dx, +dy, +dz-dt ) ;
93  lc[3] = Pt3D ( +dx, -dy, +dz+dt ) ;
94  lc[4] = Pt3D ( -dx, -dy, -dz+dt ) ;
95  lc[5] = Pt3D ( -dx, +dy, -dz-dt ) ;
96  lc[6] = Pt3D ( +dx, +dy, -dz-dt ) ;
97  lc[7] = Pt3D ( +dx, -dy, -dz+dt ) ;
98 
99  ref = 0.25*( lc[0] + lc[1] + lc[2] + lc[3] ) ;
100 }
CCGFloat dy() const
assert(m_qm.get())
CCGFloat dx() const
CCGFloat an() const
CCGFloat ta() const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
CaloCellGeometry::CCGFloat CCGFloat
CCGFloat dt() const
CCGFloat dz() const
CaloCellGeometry::Pt3D Pt3D
IdealZDCTrapezoid & IdealZDCTrapezoid::operator= ( const IdealZDCTrapezoid idzt)

Definition at line 20 of file IdealZDCTrapezoid.cc.

21 {
22  if( &idzt != this ) CaloCellGeometry::operator=( idzt ) ;
23  return *this ;
24 }
CCGFloat IdealZDCTrapezoid::ta ( ) const

Definition at line 56 of file IdealZDCTrapezoid.cc.

References an(), and funct::tan().

Referenced by dt(), and localCorners().

57 {
58  return tan( an() ) ;
59 }
CCGFloat an() const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
void IdealZDCTrapezoid::vocalCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
) const
virtual

Implements CaloCellGeometry.

Definition at line 68 of file IdealZDCTrapezoid.cc.

References localCorners().

71 {
72  localCorners( vec, pv, ref ) ;
73 }
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)