CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CaloCellGeometry.h
Go to the documentation of this file.
1 #ifndef GEOMETRY_CALOGEOMETRY_CALOCELLGEOMETRY_H
2 #define GEOMETRY_CALOGEOMETRY_CALOCELLGEOMETRY_H 1
3 
7 #include <CLHEP/Geometry/Point3D.h>
8 #include <CLHEP/Geometry/Transform3D.h>
9 #include <vector>
10 #include <string>
11 
26 {
27  public:
28 
31 
33  typedef std::vector<ParVec> ParVecVec ;
35 
36  enum CornersSize { k_cornerSize = 8 };
37 
38  static const float k_ScaleFromDDDtoGeant ;
39 
40  virtual ~CaloCellGeometry() {}
41 
42  // Returns the corner points of this cell's volume
43  virtual const CornersVec& getCorners() const = 0 ;
44 
45  // Returns the position of reference for this cell
46  const GlobalPoint& getPosition() const { return m_refPoint ; }
47 
48  // Returns true if the specified point is inside this cell
49  bool inside( const GlobalPoint & point ) const ;
50 
51  bool emptyCorners() const { return m_corners.empty() ; }
52 
53  const double* param() const { return m_parms ; }
54 
55  static const double* checkParmPtr( const std::vector<double>& vd ,
56  ParVecVec& pvv ) ;
57 
58  static const double* getParmPtr( const std::vector<double>& vd ,
59  ParMgr* mgr ,
60  ParVecVec& pvv ) ;
61 
62 
63 //----------- only needed by specific utility; overloaded when needed ----
64  virtual HepGeom::Transform3D getTransform( std::vector<HepGeom::Point3D<double> >* lptr ) const ;
65 //------------------------------------------------------------------------
66 
67  virtual std::vector<HepGeom::Point3D<double> > vocalCorners( const double* pv,
68  HepGeom::Point3D<double> & ref ) const = 0 ;
69 
70  protected:
71 
73  const CornersMgr* mgr,
74  const double* par ) :
75  m_refPoint ( gp ),
76  m_corners ( mgr ),
77  m_parms ( par ) {}
78 
80  const double* par ) :
81  m_refPoint ( GlobalPoint( 0.25*( cv[0].x() + cv[1].x() + cv[2].x() + cv[3].x() ),
82  0.25*( cv[0].y() + cv[1].y() + cv[2].y() + cv[3].y() ),
83  0.25*( cv[0].z() + cv[1].z() + cv[2].z() + cv[3].z() ) ) ),
84  m_corners ( cv ),
85  m_parms ( par ) {}
86 
87  CornersVec& setCorners() const { return m_corners ; }
88 
89  private:
90 
92 
94 
95  const double* m_parms ;
96 };
97 
98 std::ostream& operator<<( std::ostream& s, const CaloCellGeometry& cell ) ;
99 
100 #endif
EZArrayFL< GlobalPoint > CornersVec
CaloCellGeometry(const CornersVec &cv, const double *par)
CornersVec m_corners
bool emptyCorners() const
const double * m_parms
std::vector< ParVec > ParVecVec
EZMgrFL< double > ParMgr
EZArrayFL< double > ParVec
virtual std::vector< HepGeom::Point3D< double > > vocalCorners(const double *pv, HepGeom::Point3D< double > &ref) const =0
const double * param() const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
EZMgrFL< GlobalPoint > CornersMgr
double double double z
virtual HepGeom::Transform3D getTransform(std::vector< HepGeom::Point3D< double > > *lptr) const
CaloCellGeometry(CornersVec::const_reference gp, const CornersMgr *mgr, const double *par)
MgrType::const_reference const_reference
Definition: EZArrayFL.h:29
std::vector< DeviationSensor2D * > vd
static const float k_ScaleFromDDDtoGeant
virtual ~CaloCellGeometry()
bool inside(const GlobalPoint &point) const
bool empty() const
Definition: EZArrayFL.h:76
CornersVec & setCorners() const
static const double * getParmPtr(const std::vector< double > &vd, ParMgr *mgr, ParVecVec &pvv)
static const double * checkParmPtr(const std::vector< double > &vd, ParVecVec &pvv)
Definition: EZMgrFL.h:8
const GlobalPoint m_refPoint
string s
Definition: asciidump.py:422
Definition: DDAxes.h:10
const GlobalPoint & getPosition() const
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
virtual const CornersVec & getCorners() const =0
const double par[8 *NPar][4]