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 
13 
14 
15 
51 {
52 public:
53 
54  typedef float CCGFloat ;
55  typedef HepGeom::Transform3D Tr3D ;
56  typedef HepGeom::Point3D<CCGFloat> Pt3D ;
57  typedef std::vector<Pt3D> Pt3DVec ;
58 
61 
63  typedef std::vector<ParVec> ParVecVec ;
65 
66  enum CornersSize { k_cornerSize = 8 };
67 
69 
70  virtual ~CaloCellGeometry() ;
71 
73  virtual const CornersVec& getCorners() const = 0 ;
74 
76  const GlobalPoint& getPosition() const {return m_refPoint ; }
77  float etaPos() const { return m_eta;}
78  float phiPos() const { return m_phi;}
79 
80  float etaSpan() const { return m_dEta;}
81  float phiSpan() const { return m_dPhi;}
82 
83 
85  bool inside( const GlobalPoint & point ) const ;
86 
87  bool emptyCorners() const { return m_corners.empty() ;}
88 
89  const CCGFloat* param() const { return m_parms ;}
90 
91  static const CCGFloat* checkParmPtr( const std::vector<CCGFloat>& vd ,
92  ParVecVec& pvv ) ;
93 
94  static const CCGFloat* getParmPtr( const std::vector<CCGFloat>& vd ,
95  ParMgr* mgr ,
96  ParVecVec& pvv ) ;
97 
98 
100  virtual void getTransform( Tr3D& tr, Pt3DVec* lptr ) const ;
101  //------------------------------------------------------------------------
102 
103  virtual void vocalCorners( Pt3DVec& vec ,
104  const CCGFloat* pv ,
105  Pt3D& ref ) const = 0 ;
106 
107 protected:
108 
110  const CornersMgr* mgr,
111  const CCGFloat* par ) ;
112 
114  const CCGFloat* par ) ;
115 
116  CornersVec& setCorners() const ;
117 
118  CaloCellGeometry( void );
119 
120  // MUST be called by children constructors
121  void initSpan() const {
122  m_dEta = std::abs(getCorners()[0].eta()-
123  getCorners()[2].eta());
124  m_dPhi = std::abs(getCorners()[0].phi() -
125  getCorners()[2].phi());
126  }
127 
128 private:
131  const CCGFloat* m_parms ;
132  float m_eta, m_phi;
133  mutable float m_dEta;
134  mutable float m_dPhi;
135 
136 };
137 
138 std::ostream& operator<<( std::ostream& s, const CaloCellGeometry& cell ) ;
139 
140 #endif
EZArrayFL< GlobalPoint > CornersVec
bool emptyCorners() const
EZArrayFL< CCGFloat > ParVec
float etaSpan() const
std::vector< ParVec > ParVecVec
float phiPos() const
const CCGFloat * m_parms
HepGeom::Transform3D Tr3D
std::vector< Pt3D > Pt3DVec
T eta() const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
EZMgrFL< GlobalPoint > CornersMgr
MgrType::const_reference const_reference
Definition: EZArrayFL.h:29
const CCGFloat * param() const
std::vector< DeviationSensor2D * > vd
virtual void getTransform(Tr3D &tr, Pt3DVec *lptr) const
--------— only needed by specific utility; overloaded when needed -—
virtual ~CaloCellGeometry()
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
CaloCellGeometry::CCGFloat CCGFloat
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
GlobalPoint m_refPoint
static const CCGFloat k_ScaleFromDDDtoGeant
virtual void vocalCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const =0
dictionary cv
Definition: cuy.py:362
float phiSpan() const
CaloCellGeometry::Pt3D Pt3D
bool inside(const GlobalPoint &point) const
Returns true if the specified point is inside this cell.
bool empty() const
Definition: EZArrayFL.h:79
void initSpan() const
CaloCellGeometry::Pt3DVec Pt3DVec
HepGeom::Point3D< CCGFloat > Pt3D
Definition: EZMgrFL.h:8
CaloCellGeometry::Tr3D Tr3D
CornersVec & setCorners() const
float etaPos() const
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
*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
Returns the corner points of this cell&#39;s volume.
EZMgrFL< CCGFloat > ParMgr
static const CCGFloat * checkParmPtr(const std::vector< CCGFloat > &vd, ParVecVec &pvv)
Definition: DDAxes.h:10