#include <IdealZPrism.h>
Public Member Functions | |
double | dEta () const |
double | dPhi () const |
double | dz () const |
double | eta () const |
virtual const CornersVec & | getCorners () const |
IdealZPrism (const GlobalPoint &faceCenter, const CornersMgr *mgr, const double *parm) | |
virtual std::vector < HepGeom::Point3D< double > > | vocalCorners (const double *pv, HepGeom::Point3D< double > &ref) const |
double | z () const |
virtual | ~IdealZPrism () |
Static Public Member Functions | |
static std::vector < HepGeom::Point3D< double > > | localCorners (const double *pv, HepGeom::Point3D< double > &ref) |
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.
Definition at line 29 of file IdealZPrism.h.
calogeom::IdealZPrism::IdealZPrism | ( | const GlobalPoint & | faceCenter, |
const CornersMgr * | mgr, | ||
const double * | parm | ||
) | [inline] |
Definition at line 33 of file IdealZPrism.h.
: CaloCellGeometry ( faceCenter, mgr, parm ) {}
virtual calogeom::IdealZPrism::~IdealZPrism | ( | ) | [inline, virtual] |
Definition at line 38 of file IdealZPrism.h.
{}
double calogeom::IdealZPrism::dEta | ( | ) | const [inline] |
Definition at line 42 of file IdealZPrism.h.
References CaloCellGeometry::param().
Referenced by getCorners(), localCorners(), and calogeom::operator<<().
{ return param()[0] ; }
double calogeom::IdealZPrism::dPhi | ( | ) | const [inline] |
Definition at line 43 of file IdealZPrism.h.
References CaloCellGeometry::param().
Referenced by getCorners(), localCorners(), and calogeom::operator<<().
{ return param()[1] ; }
double calogeom::IdealZPrism::dz | ( | ) | const [inline] |
Definition at line 44 of file IdealZPrism.h.
References CaloCellGeometry::param().
Referenced by getCorners(), localCorners(), and calogeom::operator<<().
{ return param()[2] ; }
double calogeom::IdealZPrism::eta | ( | void | ) | const [inline] |
Definition at line 45 of file IdealZPrism.h.
References CaloCellGeometry::param().
Referenced by getCorners(), and localCorners().
{ return param()[3] ; }
const CaloCellGeometry::CornersVec & calogeom::IdealZPrism::getCorners | ( | ) | const [virtual] |
Implements CaloCellGeometry.
Definition at line 76 of file IdealZPrism.cc.
References dEta(), dPhi(), dz(), PV3DBase< T, PVType, FrameType >::eta(), eta(), calogeom::etaPhiZ(), CaloCellGeometry::getCorners(), CaloCellGeometry::getPosition(), L1TEmulatorMonitor_cff::p, PV3DBase< T, PVType, FrameType >::phi(), phi, CaloCellGeometry::setCorners(), EZArrayFL< T >::uninitialized(), ExpressReco_HICollisions_FallBack::x, ExpressReco_HICollisions_FallBack::y, and PV3DBase< T, PVType, FrameType >::z().
{ const CornersVec& co ( CaloCellGeometry::getCorners() ) ; if( co.uninitialized() ) { CornersVec& corners ( setCorners() ) ; const GlobalPoint p ( getPosition() ) ; const float z_near ( p.z() ) ; const float z_far ( z_near + 2*dz()*p.z()/fabs( p.z() ) ) ; const float eta ( p.eta() ) ; const float phi ( p.phi() ) ; corners[ 0 ] = etaPhiZ( eta + dEta(), phi + dPhi(), z_near ); // (+,+,near) corners[ 1 ] = etaPhiZ( eta + dEta(), phi - dPhi(), z_near ); // (+,-,near) corners[ 2 ] = etaPhiZ( eta - dEta(), phi - dPhi(), z_near ); // (-,-,near) corners[ 3 ] = etaPhiZ( eta - dEta(), phi + dPhi(), z_near ); // (-,+,near) corners[ 4 ] = GlobalPoint( corners[0].x(), corners[0].y(), z_far ); // (+,+,far) corners[ 5 ] = GlobalPoint( corners[1].x(), corners[1].y(), z_far ); // (+,-,far) corners[ 6 ] = GlobalPoint( corners[2].x(), corners[2].y(), z_far ); // (-,-,far) corners[ 7 ] = GlobalPoint( corners[3].x(), corners[3].y(), z_far ); // (-,+,far) } return co ; }
std::vector< HepGeom::Point3D< double > > calogeom::IdealZPrism::localCorners | ( | const double * | pv, |
HepGeom::Point3D< double > & | ref | ||
) | [static] |
Definition at line 34 of file IdealZPrism.cc.
References dEta(), dPhi(), dz(), eta(), calogeom::etaPhiPerp(), calogeom::etaPhiR(), calogeom::etaPhiZ(), i, PV3DBase< T, PVType, FrameType >::mag(), L1TEmulatorMonitor_cff::p, ExpressReco_HICollisions_FallBack::x, ExpressReco_HICollisions_FallBack::y, and z().
Referenced by HcalGeometry::localCorners(), and vocalCorners().
{ if( false ) { GlobalPoint g1 ( etaPhiR(0,0,0) ) ; GlobalPoint g2 ( etaPhiPerp(0,0,0) ) ; } assert( 0 != pv ) ; const double dEta ( pv[0] ) ; const double dPhi ( pv[1] ) ; const double dz ( pv[2] ) ; const double eta ( pv[3] ) ; const double z ( pv[4] ) ; std::vector<GlobalPoint> gc ( 8, GlobalPoint(0,0,0) ) ; std::vector<HepGeom::Point3D<double> > lc ( 8, HepGeom::Point3D<double> ( 0,0,0) ) ; const GlobalPoint p ( etaPhiZ( eta, 0, z ) ) ; const float z_near ( z ) ; const float z_far ( z*( 1 - 2*dz/p.mag() ) ) ; gc[ 0 ] = etaPhiZ( eta + dEta , +dPhi , z_near ) ; // (+,+,near) gc[ 1 ] = etaPhiZ( eta + dEta , -dPhi , z_near ) ; // (+,-,near) gc[ 2 ] = etaPhiZ( eta - dEta , -dPhi , z_near ) ; // (-,-,near) gc[ 3 ] = etaPhiZ( eta - dEta , +dPhi , z_near ) ; // (-,+,far) gc[ 4 ] = GlobalPoint( gc[0].x(), gc[0].y(), z_far ); // (+,+,far) gc[ 5 ] = GlobalPoint( gc[1].x(), gc[1].y(), z_far ); // (+,-,far) gc[ 6 ] = GlobalPoint( gc[2].x(), gc[2].y(), z_far ); // (-,-,far) gc[ 7 ] = GlobalPoint( gc[3].x(), gc[3].y(), z_far ); // (-,+,far) for( unsigned int i ( 0 ) ; i != 8 ; ++i ) { lc[i] = HepGeom::Point3D<double> ( gc[i].x(), gc[i].y(), gc[i].z() ) ; } ref = 0.25*( lc[0] + lc[1] + lc[2] + lc[3] ) ; return lc ; }
virtual std::vector<HepGeom::Point3D<double> > calogeom::IdealZPrism::vocalCorners | ( | const double * | pv, |
HepGeom::Point3D< double > & | ref | ||
) | const [inline, virtual] |
Implements CaloCellGeometry.
Definition at line 51 of file IdealZPrism.h.
References localCorners().
{ return localCorners( pv, ref ) ; }
double calogeom::IdealZPrism::z | ( | ) | const [inline] |
Definition at line 46 of file IdealZPrism.h.
References CaloCellGeometry::param().
Referenced by localCorners().
{ return param()[4] ; }