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 
20 #include <vector>
21 
22 class FlatTrd;
23 
25 public:
26  typedef std::vector<FlatTrd> CellVec;
27 
31 
32  typedef std::set<DetId> DetIdSet;
33  typedef std::vector<GlobalPoint> CornersVec;
34 
35  typedef FastTimeGeometryRecord AlignedRecord; // NOTE: not aligned yet
37 
38  enum { k_NumberOfParametersPerShape = 12 }; // FlatTrd
39  enum { k_NumberOfShapes = 50 };
40 
41  static std::string dbString() { return "PFastTimeRcd"; }
42 
44 
45  ~FastTimeGeometry() override;
46 
47  void localCorners(Pt3DVec& lc, const CCGFloat* pv, unsigned int i, Pt3D& ref);
48 
49  void newCell(const GlobalPoint& f1,
50  const GlobalPoint& f2,
51  const GlobalPoint& f3,
52  const CCGFloat* parm,
53  const DetId& detId) override;
54 
56  std::shared_ptr<const CaloCellGeometry> getGeometry(const DetId& id) const override;
57 
58  bool present(const DetId& id) const override;
59 
63  CaloSubdetectorGeometry::IVec& dinsVector) const override;
64 
65  GlobalPoint getPosition(const DetId& id) const;
66 
68  CornersVec getCorners(const DetId& id) const;
69 
70  // avoid sorting set in base class
71  const std::vector<DetId>& getValidDetIds(DetId::Detector det = DetId::Detector(0), int subdet = 0) const override {
72  return m_validIds;
73  }
74  const std::vector<DetId>& getValidGeomDetIds(void) const { return m_validGeomIds; }
75 
76  // Get closest cell, etc...
77  DetId getClosestCell(const GlobalPoint& r) const override;
78 
85  DetIdSet getCells(const GlobalPoint& r, double dR) const override;
86 
87  virtual void fillNamedParams(DDFilteredView fv);
88  void initializeParms() override;
89 
90  static std::string producerTag() { return "FastTime"; }
91  std::string cellElement() const;
92 
93  const FastTimeTopology& topology() const { return m_topology; }
94  void sortDetIds();
95 
96 protected:
97  unsigned int indexFor(const DetId& id) const override;
99  unsigned int sizeForDenseIndex() const;
100 
101  // Modify the RawPtr class
102  const CaloCellGeometry* getGeometryRawPtr(uint32_t index) const override;
103  std::shared_ptr<const CaloCellGeometry> cellGeomPtr(uint32_t index) const override;
104 
105  void addValidID(const DetId& id);
106 
107 private:
108  std::shared_ptr<const CaloCellGeometry> cellGeomPtr(uint32_t index, const GlobalPoint& p) const;
109 
111 
113  std::vector<DetId> m_validGeomIds;
114  int m_Type;
116 };
117 
118 #endif
CaloCellGeometry::Pt3DVec
std::vector< Pt3D > Pt3DVec
Definition: CaloCellGeometry.h:55
FastTimeGeometry::Pt3DVec
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: FastTimeGeometry.h:30
FastTimeTopology.h
FastTimeGeometry::getValidDetIds
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)
Definition: FastTimeGeometry.h:71
mps_fire.i
i
Definition: mps_fire.py:428
CaloCellGeometry::CCGFloat
float CCGFloat
Definition: CaloCellGeometry.h:52
FastTimeGeometry::DetIdSet
std::set< DetId > DetIdSet
Definition: FastTimeGeometry.h:32
FastTimeGeometry::getGeometryRawPtr
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
Definition: FastTimeGeometry.cc:158
FastTimeGeometry::producerTag
static std::string producerTag()
Definition: FastTimeGeometry.h:90
CaloSubdetectorGeometry::DimVec
std::vector< CCGFloat > DimVec
Definition: CaloSubdetectorGeometry.h:35
ForwardSubdetector
ForwardSubdetector
Definition: ForwardSubdetector.h:4
FlatTrd
A base class to handle the particular shape of HGCal volumes.
Definition: FlatTrd.h:19
FastTimeGeometry::Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: FastTimeGeometry.h:29
FastTimeGeometry::localCorners
void localCorners(Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
Definition: FastTimeGeometry.cc:33
FastTimeGeometry::m_topology
const FastTimeTopology & m_topology
Definition: FastTimeGeometry.h:110
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: CaloCellGeometry.cc:4
FastTimeGeometry::k_NumberOfShapes
Definition: FastTimeGeometry.h:39
FastTimeGeometry::cellGeomPtr
std::shared_ptr< const CaloCellGeometry > cellGeomPtr(uint32_t index) const override
Definition: FastTimeGeometry.cc:164
CaloSubdetectorGeometry::TrVec
std::vector< CCGFloat > TrVec
Definition: CaloSubdetectorGeometry.h:33
PFastTimeRcd
Definition: PFastTimeRcd.h:5
CaloSubdetectorGeometry::IVec
std::vector< unsigned int > IVec
Definition: CaloSubdetectorGeometry.h:34
FastTimeGeometry::indexFor
unsigned int indexFor(const DetId &id) const override
Definition: FastTimeGeometry.cc:143
FastTimeGeometry::~FastTimeGeometry
~FastTimeGeometry() override
Definition: FastTimeGeometry.cc:27
Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: CaloCellGeometry.cc:5
DetId
Definition: DetId.h:17
FastTimeGeometry::getCorners
CornersVec getCorners(const DetId &id) const
Returns the corner points of this cell's volume.
Definition: FastTimeGeometry.cc:97
DDFilteredView.h
FastTimeGeometry::addValidID
void addValidID(const DetId &id)
Definition: FastTimeGeometry.cc:189
FastTimeGeometry::CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: FastTimeGeometry.h:28
CaloSubdetectorGeometry::m_validIds
std::vector< DetId > m_validIds
Definition: CaloSubdetectorGeometry.h:115
FastTimeGeometry::present
bool present(const DetId &id) const override
is this detid present in the geometry?
Definition: FastTimeGeometry.cc:83
Point3DBase< float, GlobalTag >
CaloCellGeometry::Pt3D
HepGeom::Point3D< CCGFloat > Pt3D
Definition: CaloCellGeometry.h:54
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CaloSubdetectorGeometry.h
FastTimeGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Definition: FastTimeGeometry.cc:91
FastTimeGeometry::AlignedRecord
FastTimeGeometryRecord AlignedRecord
Definition: FastTimeGeometry.h:35
FastTimeGeometry
Definition: FastTimeGeometry.h:24
CaloCellGeometry
Definition: CaloCellGeometry.h:50
DeadROC_duringRun.f2
f2
Definition: DeadROC_duringRun.py:220
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
FastTimeGeometry::CellVec
std::vector< FlatTrd > CellVec
Definition: FastTimeGeometry.h:26
FastTimeGeometry::newCell
void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override
Definition: FastTimeGeometry.cc:37
FastTimeGeometry::initializeParms
void initializeParms() override
Definition: FastTimeGeometry.cc:31
FastTimeGeometry::getCells
DetIdSet getCells(const GlobalPoint &r, double dR) const override
Get a list of all cells within a dR of the given cell.
Definition: FastTimeGeometry.cc:129
IdealGeometryRecord.h
DetId::Detector
Detector
Definition: DetId.h:24
FastTimeGeometryRecord.h
AtomicPtrCache.h
FastTimeGeometry::PGeometryRecord
PFastTimeRcd PGeometryRecord
Definition: FastTimeGeometry.h:36
FastTimeGeometry::k_NumberOfParametersPerShape
Definition: FastTimeGeometry.h:38
FastTimeGeometry::getGeometry
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const override
Get the cell geometry of a given detector id. Should return false if not found.
Definition: FastTimeGeometry.cc:74
alignCSCRings.r
r
Definition: alignCSCRings.py:93
FastTimeGeometry::m_validGeomIds
std::vector< DetId > m_validGeomIds
Definition: FastTimeGeometry.h:113
FastTimeGeometry::m_Type
int m_Type
Definition: FastTimeGeometry.h:114
FastTimeGeometry::sortDetIds
void sortDetIds()
Definition: FastTimeGeometry.cc:200
FastTimeGeometry::m_subdet
ForwardSubdetector m_subdet
Definition: FastTimeGeometry.h:115
FastTimeGeometry::getSummary
void getSummary(CaloSubdetectorGeometry::TrVec &trVector, CaloSubdetectorGeometry::IVec &iVector, CaloSubdetectorGeometry::DimVec &dimVector, CaloSubdetectorGeometry::IVec &dinsVector) const override
Definition: FastTimeGeometry.cc:205
FastTimeGeometry::sizeForDenseIndex
unsigned int sizeForDenseIndex() const
Definition: FastTimeGeometry.cc:156
FastTimeTopology
Definition: FastTimeTopology.h:11
FastTimeGeometry::topology
const FastTimeTopology & topology() const
Definition: FastTimeGeometry.h:93
FastTimeGeometry::getValidGeomDetIds
const std::vector< DetId > & getValidGeomDetIds(void) const
Definition: FastTimeGeometry.h:74
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
FlatTrd.h
FastTimeGeometry::cellElement
std::string cellElement() const
Definition: FastTimeGeometry.cc:134
FastTimeGeometryRecord
Definition: FastTimeGeometryRecord.h:11
FastTimeGeometry::dbString
static std::string dbString()
Definition: FastTimeGeometry.h:41
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
FastTimeGeometry::m_cellVec
CellVec m_cellVec
Definition: FastTimeGeometry.h:112
Pt3DVec
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: CaloCellGeometry.cc:6
DDFilteredView
Definition: DDFilteredView.h:20
FastTimeGeometry::getClosestCell
DetId getClosestCell(const GlobalPoint &r) const override
Definition: FastTimeGeometry.cc:107
FastTimeGeometry::FastTimeGeometry
FastTimeGeometry(const FastTimeTopology &topology)
Definition: FastTimeGeometry.cc:15
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
DeadROC_duringRun.f1
f1
Definition: DeadROC_duringRun.py:219
GlobalPoint.h
FastTimeGeometry::fillNamedParams
virtual void fillNamedParams(DDFilteredView fv)
Definition: FastTimeGeometry.cc:29
CaloSubdetectorGeometry::sizeForDenseIndex
virtual unsigned int sizeForDenseIndex(const DetId &id) const
Definition: CaloSubdetectorGeometry.cc:256
FastTimeGeometry::CornersVec
std::vector< GlobalPoint > CornersVec
Definition: FastTimeGeometry.h:33