#include <IdealCastorTrapezoid.h>
Public Member Functions | |
const double | an () const |
const double | dh () const |
const double | dhz () const |
const double | dR () const |
const double | dx () const |
const double | dxh () const |
const double | dxl () const |
const double | dy () const |
const double | dz () const |
const double | dzb () const |
const double | dzs () const |
virtual const CornersVec & | getCorners () const |
IdealCastorTrapezoid (const GlobalPoint &faceCenter, const CornersMgr *mgr, const double *parm) | |
virtual std::vector < HepGeom::Point3D< double > > | vocalCorners (const double *pv, HepGeom::Point3D< double > &ref) const |
virtual | ~IdealCastorTrapezoid () |
Static Public Member Functions | |
static std::vector < HepGeom::Point3D< double > > | localCorners (const double *pv, HepGeom::Point3D< double > &ref) |
Trapezoid class used for CASTOR volumes.
Required parameters for an ideal trapezoid:
Total: 6+3 parameters
Definition at line 34 of file IdealCastorTrapezoid.h.
calogeom::IdealCastorTrapezoid::IdealCastorTrapezoid | ( | const GlobalPoint & | faceCenter, |
const CornersMgr * | mgr, | ||
const double * | parm | ||
) | [inline] |
Definition at line 38 of file IdealCastorTrapezoid.h.
: CaloCellGeometry ( faceCenter, mgr, parm ) {}
virtual calogeom::IdealCastorTrapezoid::~IdealCastorTrapezoid | ( | ) | [inline, virtual] |
Definition at line 43 of file IdealCastorTrapezoid.h.
{}
const double calogeom::IdealCastorTrapezoid::an | ( | ) | const [inline] |
Definition at line 56 of file IdealCastorTrapezoid.h.
References CaloCellGeometry::param().
Referenced by dhz(), dy(), and localCorners().
{ return param()[4] ; }
const double calogeom::IdealCastorTrapezoid::dh | ( | ) | const [inline] |
Definition at line 50 of file IdealCastorTrapezoid.h.
References CaloCellGeometry::param().
Referenced by dhz(), dy(), and localCorners().
{ return param()[2] ; }
const double calogeom::IdealCastorTrapezoid::dhz | ( | ) | const [inline] |
Definition at line 53 of file IdealCastorTrapezoid.h.
References an(), funct::cos(), and dh().
Referenced by dzb(), dzs(), and localCorners().
const double calogeom::IdealCastorTrapezoid::dR | ( | ) | const [inline] |
Definition at line 57 of file IdealCastorTrapezoid.h.
References CaloCellGeometry::param().
Referenced by getCorners().
{ return param()[5] ; }
const double calogeom::IdealCastorTrapezoid::dx | ( | ) | const [inline] |
Definition at line 49 of file IdealCastorTrapezoid.h.
Referenced by getCorners(), and localCorners().
const double calogeom::IdealCastorTrapezoid::dxh | ( | ) | const [inline] |
Definition at line 48 of file IdealCastorTrapezoid.h.
References CaloCellGeometry::param().
Referenced by dx(), and localCorners().
{ return param()[1] ; }
const double calogeom::IdealCastorTrapezoid::dxl | ( | ) | const [inline] |
Definition at line 47 of file IdealCastorTrapezoid.h.
References CaloCellGeometry::param().
Referenced by dx(), and localCorners().
{ return param()[0] ; }
const double calogeom::IdealCastorTrapezoid::dy | ( | ) | const [inline] |
Definition at line 51 of file IdealCastorTrapezoid.h.
References an(), dh(), and funct::sin().
Referenced by getCorners(), and localCorners().
const double calogeom::IdealCastorTrapezoid::dz | ( | ) | const [inline] |
Definition at line 52 of file IdealCastorTrapezoid.h.
References CaloCellGeometry::param().
Referenced by dzb(), dzs(), getCorners(), and localCorners().
{ return param()[3] ; }
const double calogeom::IdealCastorTrapezoid::dzb | ( | ) | const [inline] |
Definition at line 54 of file IdealCastorTrapezoid.h.
Referenced by localCorners().
const double calogeom::IdealCastorTrapezoid::dzs | ( | ) | const [inline] |
Definition at line 55 of file IdealCastorTrapezoid.h.
Referenced by localCorners().
const CaloCellGeometry::CornersVec & calogeom::IdealCastorTrapezoid::getCorners | ( | ) | const [virtual] |
Implements CaloCellGeometry.
Definition at line 43 of file IdealCastorTrapezoid.cc.
References funct::cos(), dR(), dx(), dy(), dz(), CaloCellGeometry::getCorners(), CaloCellGeometry::getPosition(), gf, i, localCorners(), python::rootplot::utilities::ls(), L1TEmulatorMonitor_cff::p, CaloCellGeometry::param(), phi, rho, CaloCellGeometry::setCorners(), funct::sin(), EZArrayFL< T >::uninitialized(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
{ const CornersVec& co ( CaloCellGeometry::getCorners() ) ; if( co.uninitialized() ) { CaloCellGeometry::CornersVec& corners ( setCorners() ) ; const GlobalPoint& p ( getPosition() ) ; const double zsign ( 0 < p.z() ? 1. : -1. ) ; const HepGeom::Point3D<double> gf ( p.x(), p.y(), p.z() ) ; HepGeom::Point3D<double> lf ; const std::vector<HepGeom::Point3D<double> > lc ( localCorners( param(), lf ) ) ; const HepGeom::Point3D<double> lb ( lf.x() , lf.y() , lf.z() - 2.*dz() ) ; const HepGeom::Point3D<double> ls ( lf.x() - dx(), lf.y(), lf.z() ) ; const double fphi ( atan( dx()/( dR() + dy() ) ) ) ; const HepGeom::Point3D<double> gb ( gf.x() , gf.y() , gf.z() + 2.*zsign*dz() ) ; const double rho ( dR() + dy() ) ; const double phi ( gf.phi() + fphi ) ; const HepGeom::Point3D<double> gs ( rho*cos(phi) , rho*sin(phi) , gf.z() ) ; const HepGeom::Transform3D tr ( lf, lb, ls, gf, gb, gs ) ; for( unsigned int i ( 0 ) ; i != 8 ; ++i ) { const HepGeom::Point3D<double> gl ( tr*lc[i] ) ; corners[i] = GlobalPoint( gl.x(), gl.y(), gl.z() ) ; } } return co ; }
std::vector< HepGeom::Point3D< double > > calogeom::IdealCastorTrapezoid::localCorners | ( | const double * | pv, |
HepGeom::Point3D< double > & | ref | ||
) | [static] |
Definition at line 9 of file IdealCastorTrapezoid.cc.
References an(), funct::cos(), dh(), dhz(), dx(), dxh(), dxl(), dy(), dz(), dzb(), dzs(), and funct::sin().
Referenced by getCorners(), CastorGeometry::localCorners(), and vocalCorners().
{ assert( 0 != pv ) ; const double dxl ( pv[0] ) ; const double dxh ( pv[1] ) ; const double dh ( pv[2] ) ; const double dz ( pv[3] ) ; const double an ( pv[4] ) ; const double dx ( ( dxl +dxh )/2. ) ; const double dy ( dh*sin(an) ) ; const double dhz ( dh*cos(an) ) ; const double dzb ( dz + dhz ) ; const double dzs ( dz - dhz ) ; assert( 0 < (dxl*dxh) ) ; std::vector<HepGeom::Point3D<double> > lc ( 8, HepGeom::Point3D<double> ( 0,0,0) ) ; lc[ 0 ] = HepGeom::Point3D<double> ( -dx, -dy , dzb ) ; lc[ 1 ] = HepGeom::Point3D<double> ( -dx, +dy , dzs ) ; lc[ 2 ] = HepGeom::Point3D<double> ( +2*dxh -dx, +dy , dzs ) ; lc[ 3 ] = HepGeom::Point3D<double> ( +2*dxl -dx, -dy , dzb ) ; lc[ 4 ] = HepGeom::Point3D<double> ( -dx, -dy , -dzs ) ; lc[ 5 ] = HepGeom::Point3D<double> ( -dx, +dy , -dzb ) ; lc[ 6 ] = HepGeom::Point3D<double> ( +2*dxh -dx, +dy , -dzb ) ; lc[ 7 ] = HepGeom::Point3D<double> ( +2*dxl -dx, -dy , -dzs ) ; ref = 0.25*( lc[0] + lc[1] + lc[2] + lc[3] ) ; return lc ; }
virtual std::vector<HepGeom::Point3D<double> > calogeom::IdealCastorTrapezoid::vocalCorners | ( | const double * | pv, |
HepGeom::Point3D< double > & | ref | ||
) | const [inline, virtual] |
Implements CaloCellGeometry.
Definition at line 59 of file IdealCastorTrapezoid.h.
References localCorners().
{ return localCorners( pv, ref ) ; }