CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HGCalGeometry.h
Go to the documentation of this file.
1 #ifndef GeometryHGCalGeometryHGCalGeometry_h
2 #define GeometryHGCalGeometryHGCalGeometry_h
3 
4 /*
5  * Geometry for High Granularity Calorimeter
6  * This geometry is essentially driven by topology,
7  * which is thus encapsulated in this class.
8  * This makes this geometry not suitable to be loaded
9  * by regular CaloGeometryLoader<T>
10  */
11 
21 #include <vector>
22 
23 class FlatTrd;
24 
26 
27 public:
28 
29  typedef std::vector<FlatTrd> CellVec ;
30 
34 
35  typedef std::set<DetId> DetIdSet;
36  typedef std::vector<GlobalPoint> CornersVec ;
37 
38  enum { k_NumberOfParametersPerShape = 12 } ; // FlatTrd
39  enum { k_NumberOfShapes = 50 } ;
40 
42 
43  virtual ~HGCalGeometry();
44 
45  virtual void newCell( const GlobalPoint& f1 ,
46  const GlobalPoint& f2 ,
47  const GlobalPoint& f3 ,
48  const CCGFloat* parm ,
49  const DetId& detId );
50 
52  virtual const CaloCellGeometry* getGeometry( const DetId& id ) const ;
53 
54  GlobalPoint getPosition( const DetId& id ) const;
55 
57  CornersVec getCorners( const DetId& id ) const;
58 
59  // avoid sorting set in base class
60  virtual const std::vector<DetId>& getValidDetIds( DetId::Detector det = DetId::Detector(0), int subdet = 0) const {return m_validIds;}
61 
62  // Get closest cell, etc...
63  virtual DetId getClosestCell( const GlobalPoint& r ) const ;
64 
71  virtual DetIdSet getCells( const GlobalPoint& r, double dR ) const ;
72 
73  virtual void fillNamedParams (DDFilteredView fv);
74  virtual void initializeParms() ;
75 
76  static std::string producerTag() { return "HGCal" ; }
77  std::string cellElement() const;
78 
79  const HGCalTopology& topology () const {return mTopology;}
80 
81 protected:
82 
83  virtual unsigned int indexFor(const DetId& id) const ;
84  virtual unsigned int sizeForDenseIndex() const;
85 
86  virtual const CaloCellGeometry* cellGeomPtr( uint32_t index ) const ;
87 
88  void addValidID(const DetId& id);
89  unsigned int getClosestCellIndex ( const GlobalPoint& r ) const;
90 
91 private:
93 
95  std::vector<DetId> m_validGeomIds;
96  bool m_halfType;
98 };
99 
100 #endif
std::vector< DetId > m_validGeomIds
Definition: HGCalGeometry.h:95
virtual const CaloCellGeometry * cellGeomPtr(uint32_t index) const
#define GCC11_FINAL
A base class to handle the particular shape of HGCal volumes.
Definition: FlatTrd.h:19
virtual DetIdSet getCells(const GlobalPoint &r, double dR) const
Get a list of all cells within a dR of the given cell.
std::string cellElement() const
virtual unsigned int sizeForDenseIndex() const
unsigned int getClosestCellIndex(const GlobalPoint &r) const
static std::string producerTag()
Definition: HGCalGeometry.h:76
std::vector< GlobalPoint > CornersVec
Definition: HGCalGeometry.h:36
GlobalPoint getPosition(const DetId &id) const
std::vector< FlatTrd > CellVec
Definition: HGCalGeometry.h:29
std::vector< Pt3D > Pt3DVec
ForwardSubdetector
CornersVec getCorners(const DetId &id) const
Returns the corner points of this cell&#39;s volume.
virtual void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: HGCalGeometry.h:33
HGCalGeometry(const HGCalTopology &topology)
virtual const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const
Get a list of valid detector ids (for the given subdetector)
Definition: HGCalGeometry.h:60
const HGCalTopology & mTopology
Definition: HGCalGeometry.h:92
std::vector< DetId > m_validIds
const HGCalTopology & topology() const
Definition: HGCalGeometry.h:79
std::set< DetId > DetIdSet
Definition: HGCalGeometry.h:35
CaloCellGeometry::CCGFloat CCGFloat
virtual unsigned int indexFor(const DetId &id) const
Definition: DetId.h:18
ForwardSubdetector m_subdet
Definition: HGCalGeometry.h:97
Detector
Definition: DetId.h:24
HepGeom::Point3D< CCGFloat > Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: HGCalGeometry.h:32
virtual void fillNamedParams(DDFilteredView fv)
virtual void initializeParms()
void addValidID(const DetId &id)
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
CellVec m_cellVec
Definition: HGCalGeometry.h:94
virtual DetId getClosestCell(const GlobalPoint &r) const
virtual ~HGCalGeometry()
CaloCellGeometry::CCGFloat CCGFloat
Definition: HGCalGeometry.h:31