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 | Static Private Member Functions
IdealZPrism Class Reference

#include <IdealZPrism.h>

Inheritance diagram for IdealZPrism:
CaloCellGeometry

Public Types

typedef CaloCellGeometry::CCGFloat CCGFloat
 
typedef CaloCellGeometry::Pt3D Pt3D
 
typedef CaloCellGeometry::Pt3DVec Pt3DVec
 
- 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 dEta () const
 
CCGFloat dPhi () const
 
CCGFloat dz () const
 
CCGFloat eta () const
 
virtual const CornersVecgetCorners () const
 Returns the corner points of this cell's volume. More...
 
 IdealZPrism ()
 
 IdealZPrism (const IdealZPrism &idzp)
 
 IdealZPrism (const GlobalPoint &faceCenter, const CornersMgr *mgr, const CCGFloat *parm)
 
IdealZPrismoperator= (const IdealZPrism &idzp)
 
virtual void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const
 
CCGFloat z () const
 
virtual ~IdealZPrism ()
 
- 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)
 

Static Private Member Functions

static GlobalPoint etaPhiPerp (float eta, float phi, float perp)
 
static GlobalPoint etaPhiR (float eta, float phi, float rad)
 
static GlobalPoint etaPhiZ (float eta, float phi, float z)
 

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

Prism class used for HF volumes. HF volumes are prisms with axes along the Z direction whose face shapes are set by

Required parameters for an ideal Z prism:

Total: 6 parameters

Internally, the "point of reference" is the center (eta/phi) of the front face of the prism. Therefore, the only internally stored parameters are eta and phi HALF-widths and the tower z thickness.

Date:
2011/05/29 18:06:58
Revision:
1.9
Author
J. Mans - Minnesota

Definition at line 27 of file IdealZPrism.h.

Member Typedef Documentation

Definition at line 31 of file IdealZPrism.h.

Definition at line 32 of file IdealZPrism.h.

Definition at line 33 of file IdealZPrism.h.

Constructor & Destructor Documentation

IdealZPrism::IdealZPrism ( )

Definition at line 8 of file IdealZPrism.cc.

10 {}
IdealZPrism::IdealZPrism ( const IdealZPrism idzp)

Definition at line 12 of file IdealZPrism.cc.

13  : CaloCellGeometry( idzp )
14 {
15  *this = idzp ;
16 }
IdealZPrism::IdealZPrism ( const GlobalPoint faceCenter,
const CornersMgr mgr,
const CCGFloat parm 
)

Definition at line 25 of file IdealZPrism.cc.

28  : CaloCellGeometry ( faceCenter, mgr, parm )
29 {}
IdealZPrism::~IdealZPrism ( )
virtual

Definition at line 31 of file IdealZPrism.cc.

32 {}

Member Function Documentation

CCGFloat IdealZPrism::dEta ( ) const

Definition at line 35 of file IdealZPrism.cc.

References CaloCellGeometry::param().

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

36 {
37  return param()[0] ;
38 }
const CCGFloat * param() const
CCGFloat IdealZPrism::dPhi ( ) const

Definition at line 41 of file IdealZPrism.cc.

References CaloCellGeometry::param().

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

42 {
43  return param()[1] ;
44 }
const CCGFloat * param() const
CCGFloat IdealZPrism::dz ( ) const

Definition at line 47 of file IdealZPrism.cc.

References CaloCellGeometry::param().

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

48 {
49  return param()[2] ;
50 }
const CCGFloat * param() const
CCGFloat IdealZPrism::eta ( void  ) const

Definition at line 53 of file IdealZPrism.cc.

References CaloCellGeometry::param().

Referenced by getCorners(), and localCorners().

54 {
55  return param()[3] ;
56 }
const CCGFloat * param() const
GlobalPoint IdealZPrism::etaPhiPerp ( float  eta,
float  phi,
float  perp 
)
staticprivate

Definition at line 83 of file IdealZPrism.cc.

Referenced by localCorners().

86 {
87  return GlobalPoint( perp*cosf( phi ) ,
88  perp*sinf( phi ) ,
89  perp*sinhf( eta ) );
90 }
CCGFloat eta() const
Definition: IdealZPrism.cc:53
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
T perp() const
Magnitude of transverse component.
Definition: DDAxes.h:10
GlobalPoint IdealZPrism::etaPhiR ( float  eta,
float  phi,
float  rad 
)
staticprivate

Definition at line 73 of file IdealZPrism.cc.

Referenced by localCorners().

76 {
77  return GlobalPoint( rad*cosf( phi )/coshf( eta ) ,
78  rad*sinf( phi )/coshf( eta ) ,
79  rad*tanhf( eta ) ) ;
80 }
CCGFloat eta() const
Definition: IdealZPrism.cc:53
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Definition: DDAxes.h:10
GlobalPoint IdealZPrism::etaPhiZ ( float  eta,
float  phi,
float  z 
)
staticprivate

Definition at line 93 of file IdealZPrism.cc.

Referenced by getCorners(), and localCorners().

96 {
97  return GlobalPoint( z*cosf( phi )/sinhf( eta ) ,
98  z*sinf( phi )/sinhf( eta ) ,
99  z ) ;
100 }
CCGFloat eta() const
Definition: IdealZPrism.cc:53
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
CCGFloat z() const
Definition: IdealZPrism.cc:59
Definition: DDAxes.h:10
const CaloCellGeometry::CornersVec & IdealZPrism::getCorners ( ) const
virtual

Returns the corner points of this cell's volume.

Implements CaloCellGeometry.

Definition at line 145 of file IdealZPrism.cc.

References dEta(), dPhi(), dz(), eta(), PV3DBase< T, PVType, FrameType >::eta(), etaPhiZ(), CaloCellGeometry::getCorners(), CaloCellGeometry::getPosition(), AlCaHLTBitMon_ParallelJobs::p, phi, PV3DBase< T, PVType, FrameType >::phi(), CaloCellGeometry::setCorners(), EZArrayFL< T >::uninitialized(), x, detailsBasic3DVector::y, and PV3DBase< T, PVType, FrameType >::z().

146 {
147  const CornersVec& co ( CaloCellGeometry::getCorners() ) ;
148  if( co.uninitialized() )
149  {
150  CornersVec& corners ( setCorners() ) ;
151 
152  const GlobalPoint p ( getPosition() ) ;
153  const CCGFloat z_near ( p.z() ) ;
154  const CCGFloat z_far ( z_near + 2*dz()*p.z()/fabs( p.z() ) ) ;
155  const CCGFloat eta ( p.eta() ) ;
156  const CCGFloat phi ( p.phi() ) ;
157 
158  corners[ 0 ] = etaPhiZ( eta + dEta(), phi + dPhi(), z_near ); // (+,+,near)
159  corners[ 1 ] = etaPhiZ( eta + dEta(), phi - dPhi(), z_near ); // (+,-,near)
160  corners[ 2 ] = etaPhiZ( eta - dEta(), phi - dPhi(), z_near ); // (-,-,near)
161  corners[ 3 ] = etaPhiZ( eta - dEta(), phi + dPhi(), z_near ); // (-,+,near)
162  corners[ 4 ] = GlobalPoint( corners[0].x(), corners[0].y(), z_far ); // (+,+,far)
163  corners[ 5 ] = GlobalPoint( corners[1].x(), corners[1].y(), z_far ); // (+,-,far)
164  corners[ 6 ] = GlobalPoint( corners[2].x(), corners[2].y(), z_far ); // (-,-,far)
165  corners[ 7 ] = GlobalPoint( corners[3].x(), corners[3].y(), z_far ); // (-,+,far)
166  }
167  return co ;
168 }
EZArrayFL< GlobalPoint > CornersVec
CCGFloat eta() const
Definition: IdealZPrism.cc:53
static GlobalPoint etaPhiZ(float eta, float phi, float z)
Definition: IdealZPrism.cc:93
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
CCGFloat dz() const
Definition: IdealZPrism.cc:47
CaloCellGeometry::CCGFloat CCGFloat
CCGFloat dEta() const
Definition: IdealZPrism.cc:35
CCGFloat dPhi() const
Definition: IdealZPrism.cc:41
CornersVec & setCorners() const
Definition: DDAxes.h:10
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
virtual const CornersVec & getCorners() const =0
Returns the corner points of this cell&#39;s volume.
Definition: DDAxes.h:10
void IdealZPrism::localCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
)
static

Definition at line 103 of file IdealZPrism.cc.

References dEta(), dPhi(), dz(), eta(), etaPhiPerp(), etaPhiR(), etaPhiZ(), diffTwoXMLs::g1, diffTwoXMLs::g2, i, PV3DBase< T, PVType, FrameType >::mag(), AlCaHLTBitMon_ParallelJobs::p, x, detailsBasic3DVector::y, and z().

Referenced by HcalGeometry::localCorners(), and vocalCorners().

106 {
107  assert( 8 == lc.size() ) ;
108  if( false )
109  {
110  GlobalPoint g1 ( etaPhiR(0,0,0) ) ;
111  GlobalPoint g2 ( etaPhiPerp(0,0,0) ) ;
112  }
113  assert( 0 != pv ) ;
114 
115  const CCGFloat dEta ( pv[0] ) ;
116  const CCGFloat dPhi ( pv[1] ) ;
117  const CCGFloat dz ( pv[2] ) ;
118  const CCGFloat eta ( pv[3] ) ;
119  const CCGFloat z ( pv[4] ) ;
120 
121  std::vector<GlobalPoint> gc ( 8, GlobalPoint(0,0,0) ) ;
122 
123  const GlobalPoint p ( etaPhiZ( eta, 0, z ) ) ;
124 
125  const float z_near ( z ) ;
126  const float z_far ( z*( 1 - 2*dz/p.mag() ) ) ;
127  gc[ 0 ] = etaPhiZ( eta + dEta , +dPhi , z_near ) ; // (+,+,near)
128  gc[ 1 ] = etaPhiZ( eta + dEta , -dPhi , z_near ) ; // (+,-,near)
129  gc[ 2 ] = etaPhiZ( eta - dEta , -dPhi , z_near ) ; // (-,-,near)
130  gc[ 3 ] = etaPhiZ( eta - dEta , +dPhi , z_near ) ; // (-,+,far)
131  gc[ 4 ] = GlobalPoint( gc[0].x(), gc[0].y(), z_far ); // (+,+,far)
132  gc[ 5 ] = GlobalPoint( gc[1].x(), gc[1].y(), z_far ); // (+,-,far)
133  gc[ 6 ] = GlobalPoint( gc[2].x(), gc[2].y(), z_far ); // (-,-,far)
134  gc[ 7 ] = GlobalPoint( gc[3].x(), gc[3].y(), z_far ); // (-,+,far)
135 
136  for( unsigned int i ( 0 ) ; i != 8 ; ++i )
137  {
138  lc[i] = Pt3D( gc[i].x(), gc[i].y(), gc[i].z() ) ;
139  }
140 
141  ref = 0.25*( lc[0] + lc[1] + lc[2] + lc[3] ) ;
142 }
int i
Definition: DBlmapReader.cc:9
CCGFloat eta() const
Definition: IdealZPrism.cc:53
static GlobalPoint etaPhiZ(float eta, float phi, float z)
Definition: IdealZPrism.cc:93
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
static GlobalPoint etaPhiR(float eta, float phi, float rad)
Definition: IdealZPrism.cc:73
CCGFloat dz() const
Definition: IdealZPrism.cc:47
CaloCellGeometry::CCGFloat CCGFloat
CCGFloat dEta() const
Definition: IdealZPrism.cc:35
CaloCellGeometry::Pt3D Pt3D
Definition: IdealZPrism.h:32
CCGFloat dPhi() const
Definition: IdealZPrism.cc:41
static GlobalPoint etaPhiPerp(float eta, float phi, float perp)
Definition: IdealZPrism.cc:83
Definition: DDAxes.h:10
CCGFloat z() const
Definition: IdealZPrism.cc:59
IdealZPrism & IdealZPrism::operator= ( const IdealZPrism idzp)

Definition at line 19 of file IdealZPrism.cc.

20 {
21  if( &idzp != this ) CaloCellGeometry::operator=( idzp ) ;
22  return *this ;
23 }
void IdealZPrism::vocalCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
) const
virtual

Implements CaloCellGeometry.

Definition at line 65 of file IdealZPrism.cc.

References localCorners().

68 {
69  localCorners( vec, pv, ref ) ;
70 }
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: IdealZPrism.cc:103
CCGFloat IdealZPrism::z ( ) const

Definition at line 59 of file IdealZPrism.cc.

References CaloCellGeometry::param().

Referenced by localCorners(), and geometryXMLparser.Alignable::pos().

60 {
61  return param()[4] ;
62 }
const CCGFloat * param() const