6 std::vector<HepGeom::Point3D<double> >
8 HepGeom::Point3D<double> & ref )
12 const double an ( pv[0] ) ;
13 const double dx ( pv[1] ) ;
14 const double dy ( pv[2] ) ;
15 const double dz ( pv[3] ) ;
16 const double ta (
tan( an ) ) ;
17 const double dt ( dy*ta ) ;
19 std::vector<HepGeom::Point3D<double> > lc ( 8, HepGeom::Point3D<double> ( 0,0,0) ) ;
21 lc[0] = HepGeom::Point3D<double> ( -
dx, -
dy, +dz+
dt ) ;
22 lc[1] = HepGeom::Point3D<double> ( -
dx, +
dy, +dz-
dt ) ;
23 lc[2] = HepGeom::Point3D<double> ( +
dx, +
dy, +dz-
dt ) ;
24 lc[3] = HepGeom::Point3D<double> ( +
dx, -
dy, +dz+
dt ) ;
25 lc[4] = HepGeom::Point3D<double> ( -
dx, -
dy, -dz+
dt ) ;
26 lc[5] = HepGeom::Point3D<double> ( -
dx, +
dy, -dz-
dt ) ;
27 lc[6] = HepGeom::Point3D<double> ( +
dx, +
dy, -dz-
dt ) ;
28 lc[7] = HepGeom::Point3D<double> ( +
dx, -
dy, -dz+
dt ) ;
30 ref = 0.25*( lc[0] + lc[1] + lc[2] + lc[3] ) ;
42 const double zsign ( 0 < p.
z() ? 1. : -1. ) ;
43 const HepGeom::Point3D<double>
gf ( p.
x(), p.
y(), p.
z() ) ;
45 HepGeom::Point3D<double> lf ;
47 const HepGeom::Point3D<double> lb ( lf.x() , lf.y() , lf.z() - 2.*
dz() ) ;
48 const HepGeom::Point3D<double>
ls ( lf.x() -
dx(), lf.y(), lf.z() ) ;
50 const HepGeom::Point3D<double> gb (
gf.x() ,
gf.y() ,
gf.z() + 2.*zsign*
dz() ) ;
52 const HepGeom::Point3D<double> gs (
gf.x() - zsign*
dx(),
56 const HepGeom::Transform3D tr ( lf, lb,
ls,
59 for(
unsigned int i ( 0 ) ;
i != 8 ; ++
i )
61 const HepGeom::Point3D<double> gl ( tr*lc[
i] ) ;
70 s <<
"Center: " << cell.
getPosition() << std::endl ;
71 s <<
"TiltAngle = " << cell.
an()*180./
M_PI <<
" deg, dx = "
73 <<
", dy = " << cell.
dy() <<
", dz = " << cell.
dz() << std::endl ;
Global3DPoint GlobalPoint
const double * param() const
virtual const CornersVec & getCorners() const
Tan< T >::type tan(const T &t)
static std::vector< HepGeom::Point3D< double > > localCorners(const double *pv, HepGeom::Point3D< double > &ref)
CornersVec & setCorners() const
bool uninitialized() const
std::ostream & operator<<(std::ostream &s, const IdealObliquePrism &cell)
const GlobalPoint & getPosition() const
virtual const CornersVec & getCorners() const =0