CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
IdealZPrism Class Referencefinal

#include <IdealZPrism.h>

Inheritance diagram for IdealZPrism:
CaloCellGeometry

Public Types

typedef CaloCellGeometry::CCGFloat CCGFloat
 
enum  DEPTH { None, EM, HADR }
 
typedef CaloCellGeometry::Pt3D Pt3D
 
typedef CaloCellGeometry::Pt3DVec Pt3DVec
 
- Public Types inherited from CaloCellGeometry
typedef float CCGFloat
 
typedef EZMgrFL< GlobalPointCornersMgr
 
typedef EZArrayFL< GlobalPointCornersVec
 
typedef EZMgrFL< CCGFloatParMgr
 
typedef EZArrayFL< CCGFloatParVec
 
typedef std::vector< ParVecParVecVec
 
typedef HepGeom::Point3D< CCGFloatPt3D
 
typedef std::vector< Pt3DPt3DVec
 
using RepCorners = std::array< RhoEtaPhi, k_cornerSize >
 
typedef HepGeom::Transform3D Tr3D
 

Public Member Functions

CCGFloat dEta () const
 
CCGFloat dPhi () const
 
CCGFloat dz () const
 
CCGFloat eta () const
 
IdealZPrism const * forPF () const
 
 IdealZPrism ()
 
 IdealZPrism (const IdealZPrism &idzp)
 
 IdealZPrism (const GlobalPoint &faceCenter, CornersMgr *mgr, const CCGFloat *parm, IdealZPrism::DEPTH depth)
 
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
 
CornersVec const & getCorners () const
 Returns the corner points of this cell's volume. More...
 
RepCorners const & getCornersREP () 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
 
float phiSpan () const
 
RhoEtaPhi const & repPos () const
 
float rhoPos () 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)
 

Private Attributes

std::unique_ptr< IdealZPrismm_geoForPF
 

Additional Inherited Members

- Static Public Attributes inherited from CaloCellGeometry
static constexpr unsigned int k_cornerSize = 8
 
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 26 of file IdealZPrism.h.

Member Typedef Documentation

Definition at line 32 of file IdealZPrism.h.

Definition at line 33 of file IdealZPrism.h.

Definition at line 34 of file IdealZPrism.h.

Member Enumeration Documentation

Enumerator
None 
EM 
HADR 

Definition at line 30 of file IdealZPrism.h.

Constructor & Destructor Documentation

IdealZPrism::IdealZPrism ( )
IdealZPrism::IdealZPrism ( const IdealZPrism idzp)

Definition at line 26 of file IdealZPrism.cc.

References forPF(), and m_geoForPF.

27  : CaloCellGeometry( idzp )
28 {
29  if (idzp.forPF()) m_geoForPF.reset(new IdealZPrism(*idzp.forPF()));
30 }
std::unique_ptr< IdealZPrism > m_geoForPF
Definition: IdealZPrism.h:88
IdealZPrism const * forPF() const
Definition: IdealZPrism.h:67
IdealZPrism::IdealZPrism ( const GlobalPoint faceCenter,
CornersMgr mgr,
const CCGFloat parm,
IdealZPrism::DEPTH  depth 
)

Definition at line 42 of file IdealZPrism.cc.

References CaloCellGeometry::initSpan().

46  : CaloCellGeometry ( faceCenter, mgr, parm ),
47  m_geoForPF(depth==None ? nullptr : new IdealZPrism(correct(faceCenter,depth), mgr, parm, None ))
48 {initSpan();}
std::unique_ptr< IdealZPrism > m_geoForPF
Definition: IdealZPrism.h:88
IdealZPrism::~IdealZPrism ( )
virtual

Definition at line 50 of file IdealZPrism.cc.

51 {}

Member Function Documentation

CCGFloat IdealZPrism::dEta ( ) const

Definition at line 54 of file IdealZPrism.cc.

References CaloCellGeometry::param().

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

55 {
56  return param()[0] ;
57 }
const CCGFloat * param() const
CCGFloat IdealZPrism::dPhi ( ) const

Definition at line 60 of file IdealZPrism.cc.

References CaloCellGeometry::param().

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

61 {
62  return param()[1] ;
63 }
const CCGFloat * param() const
CCGFloat IdealZPrism::dz ( ) const

Definition at line 66 of file IdealZPrism.cc.

References CaloCellGeometry::param().

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

67 {
68  return param()[2] ;
69 }
const CCGFloat * param() const
CCGFloat IdealZPrism::eta ( void  ) const

Definition at line 72 of file IdealZPrism.cc.

References CaloCellGeometry::param().

Referenced by Particle.Particle::__str__(), forPF(), initCorners(), Jet.Jet::jetID(), localCorners(), and Jet.Jet::puJetId().

73 {
74  return param()[3] ;
75 }
const CCGFloat * param() const
GlobalPoint IdealZPrism::etaPhiPerp ( float  eta,
float  phi,
float  perp 
)
staticprivate

Definition at line 102 of file IdealZPrism.cc.

Referenced by forPF().

105 {
106  return GlobalPoint( perp*cosf( phi ) ,
107  perp*sinf( phi ) ,
108  perp*sinhf( eta ) );
109 }
CCGFloat eta() const
Definition: IdealZPrism.cc:72
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 92 of file IdealZPrism.cc.

Referenced by forPF().

95 {
96  return GlobalPoint( rad*cosf( phi )/coshf( eta ) ,
97  rad*sinf( phi )/coshf( eta ) ,
98  rad*tanhf( eta ) ) ;
99 }
CCGFloat eta() const
Definition: IdealZPrism.cc:72
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
GlobalPoint IdealZPrism::etaPhiZ ( float  eta,
float  phi,
float  z 
)
staticprivate

Definition at line 112 of file IdealZPrism.cc.

Referenced by forPF(), initCorners(), and localCorners().

115 {
116  return GlobalPoint( z*cosf( phi )/sinhf( eta ) ,
117  z*sinf( phi )/sinhf( eta ) ,
118  z ) ;
119 }
CCGFloat eta() const
Definition: IdealZPrism.cc:72
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
CCGFloat z() const
Definition: IdealZPrism.cc:78
IdealZPrism const* IdealZPrism::forPF ( ) const
inline

Definition at line 67 of file IdealZPrism.h.

References eta(), etaPhiPerp(), etaPhiR(), etaPhiZ(), initCorners(), m_geoForPF, perp(), phi, and z().

Referenced by IdealZPrism(), and operator=().

67 { return m_geoForPF.get();}
std::unique_ptr< IdealZPrism > m_geoForPF
Definition: IdealZPrism.h:88
void IdealZPrism::initCorners ( CaloCellGeometry::CornersVec co)
overrideprivatevirtual

Implements CaloCellGeometry.

Definition at line 159 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().

Referenced by forPF().

160 {
161  if( co.uninitialized() )
162  {
163  CornersVec& corners ( co ) ;
164 
165  const GlobalPoint p ( getPosition() ) ;
166  const CCGFloat z_near ( p.z() ) ;
167  const CCGFloat z_far ( z_near + 2*dz()*p.z()/fabs( p.z() ) ) ;
168  const CCGFloat eta ( p.eta() ) ;
169  const CCGFloat phi ( p.phi() ) ;
170 
171  corners[ 0 ] = etaPhiZ( eta + dEta(), phi + dPhi(), z_near ); // (+,+,near)
172  corners[ 1 ] = etaPhiZ( eta + dEta(), phi - dPhi(), z_near ); // (+,-,near)
173  corners[ 2 ] = etaPhiZ( eta - dEta(), phi - dPhi(), z_near ); // (-,-,near)
174  corners[ 3 ] = etaPhiZ( eta - dEta(), phi + dPhi(), z_near ); // (-,+,near)
175  corners[ 4 ] = GlobalPoint( corners[0].x(), corners[0].y(), z_far ); // (+,+,far)
176  corners[ 5 ] = GlobalPoint( corners[1].x(), corners[1].y(), z_far ); // (+,-,far)
177  corners[ 6 ] = GlobalPoint( corners[2].x(), corners[2].y(), z_far ); // (-,-,far)
178  corners[ 7 ] = GlobalPoint( corners[3].x(), corners[3].y(), z_far ); // (-,+,far)
179  }
180 }
EZArrayFL< GlobalPoint > CornersVec
CCGFloat eta() const
Definition: IdealZPrism.cc:72
static GlobalPoint etaPhiZ(float eta, float phi, float z)
Definition: IdealZPrism.cc:112
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
CCGFloat dz() const
Definition: IdealZPrism.cc:66
CaloCellGeometry::CCGFloat CCGFloat
CCGFloat dEta() const
Definition: IdealZPrism.cc:54
CCGFloat dPhi() const
Definition: IdealZPrism.cc:60
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 122 of file IdealZPrism.cc.

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

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

125 {
126  assert( 8 == lc.size() ) ;
127  assert( 0 != pv ) ;
128 
129  const CCGFloat dEta ( pv[0] ) ;
130  const CCGFloat dPhi ( pv[1] ) ;
131  const CCGFloat dz ( pv[2] ) ;
132  const CCGFloat eta ( pv[3] ) ;
133  const CCGFloat z ( pv[4] ) ;
134 
135  std::vector<GlobalPoint> gc ( 8, GlobalPoint(0,0,0) ) ;
136 
137  const GlobalPoint p ( etaPhiZ( eta, 0, z ) ) ;
138 
139  const float z_near ( z ) ;
140  const float z_far ( z*( 1 - 2*dz/p.mag() ) ) ;
141  gc[ 0 ] = etaPhiZ( eta + dEta , +dPhi , z_near ) ; // (+,+,near)
142  gc[ 1 ] = etaPhiZ( eta + dEta , -dPhi , z_near ) ; // (+,-,near)
143  gc[ 2 ] = etaPhiZ( eta - dEta , -dPhi , z_near ) ; // (-,-,near)
144  gc[ 3 ] = etaPhiZ( eta - dEta , +dPhi , z_near ) ; // (-,+,far)
145  gc[ 4 ] = GlobalPoint( gc[0].x(), gc[0].y(), z_far ); // (+,+,far)
146  gc[ 5 ] = GlobalPoint( gc[1].x(), gc[1].y(), z_far ); // (+,-,far)
147  gc[ 6 ] = GlobalPoint( gc[2].x(), gc[2].y(), z_far ); // (-,-,far)
148  gc[ 7 ] = GlobalPoint( gc[3].x(), gc[3].y(), z_far ); // (-,+,far)
149 
150  for( unsigned int i ( 0 ) ; i != 8 ; ++i )
151  {
152  lc[i] = Pt3D( gc[i].x(), gc[i].y(), gc[i].z() ) ;
153  }
154 
155  ref = 0.25*( lc[0] + lc[1] + lc[2] + lc[3] ) ;
156 }
int i
Definition: DBlmapReader.cc:9
CCGFloat eta() const
Definition: IdealZPrism.cc:72
static GlobalPoint etaPhiZ(float eta, float phi, float z)
Definition: IdealZPrism.cc:112
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
CCGFloat dz() const
Definition: IdealZPrism.cc:66
def pv(vc)
Definition: MetAnalyzer.py:6
CaloCellGeometry::CCGFloat CCGFloat
CCGFloat dEta() const
Definition: IdealZPrism.cc:54
CaloCellGeometry::Pt3D Pt3D
Definition: IdealZPrism.h:33
CCGFloat dPhi() const
Definition: IdealZPrism.cc:60
CCGFloat z() const
Definition: IdealZPrism.cc:78
IdealZPrism & IdealZPrism::operator= ( const IdealZPrism idzp)

Definition at line 33 of file IdealZPrism.cc.

References forPF(), and m_geoForPF.

34 {
35  if( &idzp != this ) {
36  CaloCellGeometry::operator=( idzp ) ;
37  if (idzp.forPF()) m_geoForPF.reset(new IdealZPrism(*idzp.forPF()));
38  }
39  return *this ;
40 }
std::unique_ptr< IdealZPrism > m_geoForPF
Definition: IdealZPrism.h:88
IdealZPrism const * forPF() const
Definition: IdealZPrism.h:67
void IdealZPrism::vocalCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
) const
overridevirtual

Implements CaloCellGeometry.

Definition at line 84 of file IdealZPrism.cc.

References localCorners().

87 {
88  localCorners( vec, pv, ref ) ;
89 }
def pv(vc)
Definition: MetAnalyzer.py:6
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: IdealZPrism.cc:122
CCGFloat IdealZPrism::z ( ) const

Definition at line 78 of file IdealZPrism.cc.

References CaloCellGeometry::param().

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

79 {
80  return param()[4] ;
81 }
const CCGFloat * param() const

Member Data Documentation

std::unique_ptr<IdealZPrism> IdealZPrism::m_geoForPF
private

Definition at line 88 of file IdealZPrism.h.

Referenced by forPF(), IdealZPrism(), and operator=().