test
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 | 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
 
 IdealZPrism ()
 
 IdealZPrism (const IdealZPrism &idzp)
 
 IdealZPrism (const GlobalPoint &faceCenter, CornersMgr *mgr, const CCGFloat *parm)
 
IdealZPrismoperator= (const IdealZPrism &idzp)
 
virtual void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
 
CCGFloat z () const
 
virtual ~IdealZPrism ()
 
- 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
 

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

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.

Author
J. Mans - Minnesota

Definition at line 25 of file IdealZPrism.h.

Member Typedef Documentation

Definition at line 29 of file IdealZPrism.h.

Definition at line 30 of file IdealZPrism.h.

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

Definition at line 25 of file IdealZPrism.cc.

References CaloCellGeometry::initSpan().

28  : CaloCellGeometry ( faceCenter, mgr, parm )
29 {initSpan();}
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 initCorners(), 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 initCorners(), 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 Electron.Electron::cutBasedId(), initCorners(), 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 Particle.Particle::__str__(), initCorners(), Jet.Jet::jetID(), localCorners(), and Jet.Jet::puJetId().

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.

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.
GlobalPoint IdealZPrism::etaPhiR ( float  eta,
float  phi,
float  rad 
)
staticprivate

Definition at line 73 of file IdealZPrism.cc.

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
GlobalPoint IdealZPrism::etaPhiZ ( float  eta,
float  phi,
float  z 
)
staticprivate

Definition at line 93 of file IdealZPrism.cc.

Referenced by initCorners(), 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
void IdealZPrism::initCorners ( CaloCellGeometry::CornersVec co)
overrideprivatevirtual

Implements CaloCellGeometry.

Definition at line 140 of file IdealZPrism.cc.

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

141 {
142  if( co.uninitialized() )
143  {
144  CornersVec& corners ( co ) ;
145 
146  const GlobalPoint p ( getPosition() ) ;
147  const CCGFloat z_near ( p.z() ) ;
148  const CCGFloat z_far ( z_near + 2*dz()*p.z()/fabs( p.z() ) ) ;
149  const CCGFloat eta ( p.eta() ) ;
150  const CCGFloat phi ( p.phi() ) ;
151 
152  corners[ 0 ] = etaPhiZ( eta + dEta(), phi + dPhi(), z_near ); // (+,+,near)
153  corners[ 1 ] = etaPhiZ( eta + dEta(), phi - dPhi(), z_near ); // (+,-,near)
154  corners[ 2 ] = etaPhiZ( eta - dEta(), phi - dPhi(), z_near ); // (-,-,near)
155  corners[ 3 ] = etaPhiZ( eta - dEta(), phi + dPhi(), z_near ); // (-,+,near)
156  corners[ 4 ] = GlobalPoint( corners[0].x(), corners[0].y(), z_far ); // (+,+,far)
157  corners[ 5 ] = GlobalPoint( corners[1].x(), corners[1].y(), z_far ); // (+,-,far)
158  corners[ 6 ] = GlobalPoint( corners[2].x(), corners[2].y(), z_far ); // (-,-,far)
159  corners[ 7 ] = GlobalPoint( corners[3].x(), corners[3].y(), z_far ); // (-,+,far)
160  }
161 }
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
bool uninitialized() const
Definition: EZArrayFL.h:77
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
void IdealZPrism::localCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
)
static

Definition at line 103 of file IdealZPrism.cc.

References assert(), dEta(), dPhi(), dz(), eta(), etaPhiZ(), i, PV3DBase< T, PVType, FrameType >::mag(), AlCaHLTBitMon_ParallelJobs::p, x, y, and z().

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

106 {
107  assert( 8 == lc.size() ) ;
108  assert( 0 != pv ) ;
109 
110  const CCGFloat dEta ( pv[0] ) ;
111  const CCGFloat dPhi ( pv[1] ) ;
112  const CCGFloat dz ( pv[2] ) ;
113  const CCGFloat eta ( pv[3] ) ;
114  const CCGFloat z ( pv[4] ) ;
115 
116  std::vector<GlobalPoint> gc ( 8, GlobalPoint(0,0,0) ) ;
117 
118  const GlobalPoint p ( etaPhiZ( eta, 0, z ) ) ;
119 
120  const float z_near ( z ) ;
121  const float z_far ( z*( 1 - 2*dz/p.mag() ) ) ;
122  gc[ 0 ] = etaPhiZ( eta + dEta , +dPhi , z_near ) ; // (+,+,near)
123  gc[ 1 ] = etaPhiZ( eta + dEta , -dPhi , z_near ) ; // (+,-,near)
124  gc[ 2 ] = etaPhiZ( eta - dEta , -dPhi , z_near ) ; // (-,-,near)
125  gc[ 3 ] = etaPhiZ( eta - dEta , +dPhi , z_near ) ; // (-,+,far)
126  gc[ 4 ] = GlobalPoint( gc[0].x(), gc[0].y(), z_far ); // (+,+,far)
127  gc[ 5 ] = GlobalPoint( gc[1].x(), gc[1].y(), z_far ); // (+,-,far)
128  gc[ 6 ] = GlobalPoint( gc[2].x(), gc[2].y(), z_far ); // (-,-,far)
129  gc[ 7 ] = GlobalPoint( gc[3].x(), gc[3].y(), z_far ); // (-,+,far)
130 
131  for( unsigned int i ( 0 ) ; i != 8 ; ++i )
132  {
133  lc[i] = Pt3D( gc[i].x(), gc[i].y(), gc[i].z() ) ;
134  }
135 
136  ref = 0.25*( lc[0] + lc[1] + lc[2] + lc[3] ) ;
137 }
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
assert(m_qm.get())
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
CCGFloat dz() const
Definition: IdealZPrism.cc:47
CaloCellGeometry::CCGFloat CCGFloat
CCGFloat dEta() const
Definition: IdealZPrism.cc:35
CaloCellGeometry::Pt3D Pt3D
Definition: IdealZPrism.h:30
CCGFloat dPhi() const
Definition: IdealZPrism.cc:41
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
overridevirtual

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