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
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
 
virtual const CornersVecgetCorners () const
 Returns the corner points of this cell's volume. More...
 
 IdealZDCTrapezoid ()
 
 IdealZDCTrapezoid (const IdealZDCTrapezoid &idzt)
 
 IdealZDCTrapezoid (const GlobalPoint &faceCenter, const 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
 
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
 
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)
 

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, const CornersMgr *mgr, const CCGFloat *par)
 
 CaloCellGeometry (const CornersVec &cv, const CCGFloat *par)
 
 CaloCellGeometry (void)
 
CornersVecsetCorners () const
 

Detailed Description

Trapezoid class used for ZDC volumes.

Required parameters for an ideal zdc trapezoid:

Total: 7 parameters

Date:
2011/09/27 09:15:30
Revision:
1.10
Author
E. Garcia - UIC

Definition at line 23 of file IdealZDCTrapezoid.h.

Member Typedef Documentation

Definition at line 27 of file IdealZDCTrapezoid.h.

Definition at line 28 of file IdealZDCTrapezoid.h.

Definition at line 29 of file IdealZDCTrapezoid.h.

Definition at line 30 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,
const CornersMgr mgr,
const CCGFloat parm 
)

Definition at line 26 of file IdealZDCTrapezoid.cc.

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

Definition at line 33 of file IdealZDCTrapezoid.cc.

33 {}

Member Function Documentation

CCGFloat IdealZDCTrapezoid::an ( ) const

Definition at line 36 of file IdealZDCTrapezoid.cc.

References CaloCellGeometry::param().

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

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

Definition at line 63 of file IdealZDCTrapezoid.cc.

References dy(), and ta().

Referenced by localCorners().

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

Definition at line 39 of file IdealZDCTrapezoid.cc.

References CaloCellGeometry::param().

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

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

Definition at line 45 of file IdealZDCTrapezoid.cc.

References CaloCellGeometry::param().

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

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

Definition at line 51 of file IdealZDCTrapezoid.cc.

References CaloCellGeometry::param().

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

52 {
53  return param()[3] ;
54 }
const CCGFloat * param() const
const CaloCellGeometry::CornersVec & IdealZDCTrapezoid::getCorners ( ) const
virtual

Returns the corner points of this cell's volume.

Implements CaloCellGeometry.

Definition at line 104 of file IdealZDCTrapezoid.cc.

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

105 {
106  const CornersVec& co ( CaloCellGeometry::getCorners() ) ;
107  if( co.uninitialized() )
108  {
110  const GlobalPoint& p ( getPosition() ) ;
111  const CCGFloat zsign ( 0 < p.z() ? 1. : -1. ) ;
112  const Pt3D gf ( p.x(), p.y(), p.z() ) ;
113 
114  Pt3D lf ;
115  Pt3DVec lc ( 8, Pt3D(0,0,0) ) ;
116  localCorners( lc, param(), lf ) ;
117  const Pt3D lb ( lf.x() , lf.y() , lf.z() - 2.*dz() ) ;
118  const Pt3D ls ( lf.x() - dx(), lf.y(), lf.z() ) ;
119 
120  const Pt3D gb ( gf.x() , gf.y() , gf.z() + 2.*zsign*dz() ) ;
121 
122  const Pt3D gs ( gf.x() - zsign*dx(),
123  gf.y() ,
124  gf.z() ) ;
125 
126  const HepGeom::Transform3D tr ( lf, lb, ls,
127  gf, gb, gs ) ;
128 
129  for( unsigned int i ( 0 ) ; i != 8 ; ++i )
130  {
131  const Pt3D gl ( tr*lc[i] ) ;
132  corners[i] = GlobalPoint( gl.x(), gl.y(), gl.z() ) ;
133  }
134  }
135  return co ;
136 }
EZArrayFL< GlobalPoint > CornersVec
int i
Definition: DBlmapReader.cc:9
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
CornersVec & setCorners() const
double gf
Definition: hdecay.h:34
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
CaloCellGeometry::Pt3D Pt3D
virtual const CornersVec & getCorners() const =0
Returns the corner points of this cell&#39;s volume.
void IdealZDCTrapezoid::localCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
)
static

Definition at line 77 of file IdealZDCTrapezoid.cc.

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

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

80 {
81  assert( 8 == lc.size() ) ;
82  assert( 0 != pv ) ;
83 
84  const CCGFloat an ( pv[0] ) ;
85  const CCGFloat dx ( pv[1] ) ;
86  const CCGFloat dy ( pv[2] ) ;
87  const CCGFloat dz ( pv[3] ) ;
88  const CCGFloat ta ( tan( an ) ) ;
89  const CCGFloat dt ( dy*ta ) ;
90 
91  lc[0] = Pt3D ( -dx, -dy, +dz+dt ) ;
92  lc[1] = Pt3D ( -dx, +dy, +dz-dt ) ;
93  lc[2] = Pt3D ( +dx, +dy, +dz-dt ) ;
94  lc[3] = Pt3D ( +dx, -dy, +dz+dt ) ;
95  lc[4] = Pt3D ( -dx, -dy, -dz+dt ) ;
96  lc[5] = Pt3D ( -dx, +dy, -dz-dt ) ;
97  lc[6] = Pt3D ( +dx, +dy, -dz-dt ) ;
98  lc[7] = Pt3D ( +dx, -dy, -dz+dt ) ;
99 
100  ref = 0.25*( lc[0] + lc[1] + lc[2] + lc[3] ) ;
101 }
CCGFloat dy() const
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 57 of file IdealZDCTrapezoid.cc.

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

Referenced by dt(), and localCorners().

58 {
59  return tan( an() ) ;
60 }
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 69 of file IdealZDCTrapezoid.cc.

References localCorners().

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