CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions
calogeom::IdealZDCTrapezoid Class Reference

#include <IdealZDCTrapezoid.h>

Inheritance diagram for calogeom::IdealZDCTrapezoid:
CaloCellGeometry

Public Member Functions

const double an () const
 
const double dt () const
 
const double dx () const
 
const double dy () const
 
const double dz () const
 
virtual const CornersVecgetCorners () const
 
 IdealZDCTrapezoid (const GlobalPoint &faceCenter, const CornersMgr *mgr, const double *parm)
 
const double ta () const
 
virtual std::vector
< HepGeom::Point3D< double > > 
vocalCorners (const double *pv, HepGeom::Point3D< double > &ref) const
 
virtual ~IdealZDCTrapezoid ()
 
- Public Member Functions inherited from CaloCellGeometry
bool emptyCorners () const
 
const GlobalPointgetPosition () const
 
virtual HepGeom::Transform3D getTransform (std::vector< HepGeom::Point3D< double > > *lptr) const
 
bool inside (const GlobalPoint &point) const
 
const double * param () const
 
virtual ~CaloCellGeometry ()
 

Static Public Member Functions

static std::vector
< HepGeom::Point3D< double > > 
localCorners (const double *pv, HepGeom::Point3D< double > &ref)
 
- Static Public Member Functions inherited from CaloCellGeometry
static const double * checkParmPtr (const std::vector< double > &vd, ParVecVec &pvv)
 
static const double * getParmPtr (const std::vector< double > &vd, ParMgr *mgr, ParVecVec &pvv)
 

Additional Inherited Members

- Public Types inherited from CaloCellGeometry
typedef EZMgrFL< GlobalPointCornersMgr
 
enum  CornersSize { k_cornerSize = 8 }
 
typedef EZArrayFL< GlobalPointCornersVec
 
typedef EZMgrFL< double > ParMgr
 
typedef EZArrayFL< double > ParVec
 
typedef std::vector< ParVecParVecVec
 
- Static Public Attributes inherited from CaloCellGeometry
static const float k_ScaleFromDDDtoGeant
 
- Protected Member Functions inherited from CaloCellGeometry
 CaloCellGeometry (CornersVec::const_reference gp, const CornersMgr *mgr, const double *par)
 
 CaloCellGeometry (const CornersVec &cv, const double *par)
 
CornersVecsetCorners () const
 

Detailed Description

Trapezoid class used for ZDC volumes.

Required parameters for an ideal zdc trapezoid:

Total: 7 parameters

Date:
2009/05/25 09:34:16
Revision:
1.7
Author
E. Garcia - UIC

Definition at line 23 of file IdealZDCTrapezoid.h.

Constructor & Destructor Documentation

calogeom::IdealZDCTrapezoid::IdealZDCTrapezoid ( const GlobalPoint faceCenter,
const CornersMgr mgr,
const double *  parm 
)
inline

Definition at line 27 of file IdealZDCTrapezoid.h.

29  :
30  CaloCellGeometry ( faceCenter, mgr, parm ) {}
CaloCellGeometry(CornersVec::const_reference gp, const CornersMgr *mgr, const double *par)
virtual calogeom::IdealZDCTrapezoid::~IdealZDCTrapezoid ( )
inlinevirtual

Definition at line 32 of file IdealZDCTrapezoid.h.

32 {}

Member Function Documentation

const double calogeom::IdealZDCTrapezoid::an ( ) const
inline

Definition at line 36 of file IdealZDCTrapezoid.h.

References CaloCellGeometry::param().

Referenced by localCorners(), calogeom::operator<<(), and ta().

36 { return param()[0] ; }
const double * param() const
const double calogeom::IdealZDCTrapezoid::dt ( ) const
inline

Definition at line 41 of file IdealZDCTrapezoid.h.

References dy(), and ta().

Referenced by localCorners().

41 { return dy()*ta() ; }
const double ta() const
const double dy() const
const double calogeom::IdealZDCTrapezoid::dx ( ) const
inline

Definition at line 37 of file IdealZDCTrapezoid.h.

References CaloCellGeometry::param().

Referenced by getCorners(), localCorners(), and calogeom::operator<<().

37 { return param()[1] ; }
const double * param() const
const double calogeom::IdealZDCTrapezoid::dy ( ) const
inline

Definition at line 38 of file IdealZDCTrapezoid.h.

References CaloCellGeometry::param().

Referenced by dt(), localCorners(), and calogeom::operator<<().

38 { return param()[2] ; }
const double * param() const
const double calogeom::IdealZDCTrapezoid::dz ( ) const
inline

Definition at line 39 of file IdealZDCTrapezoid.h.

References CaloCellGeometry::param().

Referenced by getCorners(), localCorners(), and calogeom::operator<<().

39 { return param()[3] ; }
const double * param() const
const CaloCellGeometry::CornersVec & calogeom::IdealZDCTrapezoid::getCorners ( ) const
virtual

Implements CaloCellGeometry.

Definition at line 35 of file IdealZDCTrapezoid.cc.

References dx(), dz(), CaloCellGeometry::getCorners(), CaloCellGeometry::getPosition(), gf, i, localCorners(), python.rootplot.utilities::ls(), L1TEmulatorMonitor_cff::p, CaloCellGeometry::param(), CaloCellGeometry::setCorners(), EZArrayFL< T >::uninitialized(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

36  {
38  if( co.uninitialized() )
39  {
41  const GlobalPoint& p ( getPosition() ) ;
42  const double zsign ( 0 < p.z() ? 1. : -1. ) ;
43  const HepGeom::Point3D<double> gf ( p.x(), p.y(), p.z() ) ;
44 
45  HepGeom::Point3D<double> lf ;
46  const std::vector<HepGeom::Point3D<double> > lc ( localCorners( param(), 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() ) ;
49 
50  const HepGeom::Point3D<double> gb ( gf.x() , gf.y() , gf.z() + 2.*zsign*dz() ) ;
51 
52  const HepGeom::Point3D<double> gs ( gf.x() - zsign*dx(),
53  gf.y() ,
54  gf.z() ) ;
55 
56  const HepGeom::Transform3D tr ( lf, lb, ls,
57  gf, gb, gs ) ;
58 
59  for( unsigned int i ( 0 ) ; i != 8 ; ++i )
60  {
61  const HepGeom::Point3D<double> gl ( tr*lc[i] ) ;
62  corners[i] = GlobalPoint( gl.x(), gl.y(), gl.z() ) ;
63  }
64  }
65  return co ;
66  }
EZArrayFL< GlobalPoint > CornersVec
int i
Definition: DBlmapReader.cc:9
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
const double * param() const
const double dz() const
static std::vector< HepGeom::Point3D< double > > localCorners(const double *pv, HepGeom::Point3D< double > &ref)
const double dx() const
CornersVec & setCorners() const
double gf
Definition: hdecay.h:34
const GlobalPoint & getPosition() const
virtual const CornersVec & getCorners() const =0
std::vector< HepGeom::Point3D< double > > calogeom::IdealZDCTrapezoid::localCorners ( const double *  pv,
HepGeom::Point3D< double > &  ref 
)
static

Definition at line 7 of file IdealZDCTrapezoid.cc.

References an(), dt(), dx(), dy(), dz(), ta(), and funct::tan().

Referenced by getCorners(), ZdcGeometry::localCorners(), and vocalCorners().

9  {
10  assert( 0 != pv ) ;
11 
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 ) ;
18 
19  std::vector<HepGeom::Point3D<double> > lc ( 8, HepGeom::Point3D<double> ( 0,0,0) ) ;
20 
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 ) ;
29 
30  ref = 0.25*( lc[0] + lc[1] + lc[2] + lc[3] ) ;
31  return lc ;
32  }
const double an() const
const double dz() const
const double ta() const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
const double dx() const
const double dt() const
const double dy() const
const double calogeom::IdealZDCTrapezoid::ta ( ) const
inline

Definition at line 40 of file IdealZDCTrapezoid.h.

References an(), and funct::tan().

Referenced by dt(), and localCorners().

40 { return tan( an() ) ; }
const double an() const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
virtual std::vector<HepGeom::Point3D<double> > calogeom::IdealZDCTrapezoid::vocalCorners ( const double *  pv,
HepGeom::Point3D< double > &  ref 
) const
inlinevirtual

Implements CaloCellGeometry.

Definition at line 43 of file IdealZDCTrapezoid.h.

References localCorners().

45  { return localCorners( pv, ref ) ; }
static std::vector< HepGeom::Point3D< double > > localCorners(const double *pv, HepGeom::Point3D< double > &ref)