CMS 3D CMS Logo

FastTimeGeometry.h
Go to the documentation of this file.
1 #ifndef GeometryHGCalGeometryFastTimeGeometry_h
2 #define GeometryHGCalGeometryFastTimeGeometry_h
3 
4 /*
5  * Geometry for Fast Timing Layer
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 
22 #include <vector>
23 
24 class FlatTrd;
25 
27 
28 public:
29 
30  typedef std::vector<FlatTrd> CellVec ;
31 
35 
36  typedef std::set<DetId> DetIdSet;
37  typedef std::vector<GlobalPoint> CornersVec ;
38 
39  typedef FastTimeGeometryRecord AlignedRecord ; // NOTE: not aligned yet
41 
42  enum { k_NumberOfParametersPerShape = 12 } ; // FlatTrd
43  enum { k_NumberOfShapes = 50 } ;
44 
45  static std::string dbString() { return "PFastTimeRcd" ; }
46 
48 
49  ~FastTimeGeometry() override;
50 
51  void localCorners(Pt3DVec& lc,
52  const CCGFloat* pv,
53  unsigned int i,
54  Pt3D& ref) ;
55 
56  void newCell(const GlobalPoint& f1 ,
57  const GlobalPoint& f2 ,
58  const GlobalPoint& f3 ,
59  const CCGFloat* parm ,
60  const DetId& detId) override;
61 
63  const CaloCellGeometry* getGeometry(const DetId& id) const override;
64 
68  CaloSubdetectorGeometry::IVec& dinsVector ) const override;
69 
70  GlobalPoint getPosition(const DetId& id) const;
71 
73  CornersVec getCorners(const DetId& id) const;
74 
75  // avoid sorting set in base class
76  const std::vector<DetId>& getValidDetIds( DetId::Detector det = DetId::Detector(0), int subdet = 0) const override { return m_validIds; }
77  const std::vector<DetId>& getValidGeomDetIds( void ) const { return m_validGeomIds; }
78 
79  // Get closest cell, etc...
80  DetId getClosestCell(const GlobalPoint& r) const override;
81 
88  DetIdSet getCells(const GlobalPoint& r, double dR) const override;
89 
90  virtual void fillNamedParams (DDFilteredView fv);
91  void initializeParms() override;
92 
93  static std::string producerTag() { return "FastTime" ; }
94  std::string cellElement() const;
95 
96  const FastTimeTopology& topology () const {return m_topology;}
97  void sortDetIds();
98 
99 protected:
100 
101  unsigned int indexFor(const DetId& id) const override;
103  unsigned int sizeForDenseIndex() const;
104 
105  const CaloCellGeometry* cellGeomPtr( uint32_t index ) const override;
106 
107  void addValidID(const DetId& id);
108 
109 private:
111 
112  CellVec m_cellVec ;
113  std::vector<DetId> m_validGeomIds;
114  int m_Type;
116 };
117 
118 #endif
void localCorners(Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
std::set< DetId > DetIdSet
A base class to handle the particular shape of HGCal volumes.
Definition: FlatTrd.h:19
std::vector< CCGFloat > DimVec
const CaloCellGeometry * getGeometry(const DetId &id) const override
Get the cell geometry of a given detector id. Should return false if not found.
DetId getClosestCell(const GlobalPoint &r) const override
std::vector< GlobalPoint > CornersVec
CaloCellGeometry::Pt3DVec Pt3DVec
void getSummary(CaloSubdetectorGeometry::TrVec &trVector, CaloSubdetectorGeometry::IVec &iVector, CaloSubdetectorGeometry::DimVec &dimVector, CaloSubdetectorGeometry::IVec &dinsVector) const override
CaloCellGeometry::CCGFloat CCGFloat
static std::string dbString()
std::vector< unsigned int > IVec
virtual void fillNamedParams(DDFilteredView fv)
const FastTimeTopology & topology() const
void addValidID(const DetId &id)
std::vector< CCGFloat > TrVec
std::vector< Pt3D > Pt3DVec
FastTimeGeometryRecord AlignedRecord
ForwardSubdetector
GlobalPoint getPosition(const DetId &id) const
CaloCellGeometry::Pt3D Pt3D
const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const override
Get a list of valid detector ids (for the given subdetector)
FastTimeGeometry(const FastTimeTopology &topology)
PFastTimeRcd PGeometryRecord
DetIdSet getCells(const GlobalPoint &r, double dR) const override
Get a list of all cells within a dR of the given cell.
~FastTimeGeometry() override
std::vector< FlatTrd > CellVec
std::string cellElement() const
std::vector< DetId > m_validIds
def pv(vc)
Definition: MetAnalyzer.py:6
Definition: DetId.h:18
const CaloCellGeometry * cellGeomPtr(uint32_t index) const override
unsigned int indexFor(const DetId &id) const override
void initializeParms() override
Detector
Definition: DetId.h:24
HepGeom::Point3D< CCGFloat > Pt3D
static std::string producerTag()
void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override
ForwardSubdetector m_subdet
virtual unsigned int sizeForDenseIndex(const DetId &id) const
const std::vector< DetId > & getValidGeomDetIds(void) const
std::vector< DetId > m_validGeomIds
unsigned int sizeForDenseIndex() const
const FastTimeTopology & m_topology
CornersVec getCorners(const DetId &id) const
Returns the corner points of this cell&#39;s volume.