CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HcalDDDGeometry.h
Go to the documentation of this file.
1 #ifndef Geometry_HcalTowerAlgo_HcalDDDGeometry_h
2 #define Geometry_HcalTowerAlgo_HcalDDDGeometry_h
3 
13 #include <atomic>
14 
16 
18 public:
19  friend class HcalDDDGeometryLoader;
20 
21  typedef std::vector<IdealObliquePrism> HBCellVec;
22  typedef std::vector<IdealObliquePrism> HECellVec;
23  typedef std::vector<IdealObliquePrism> HOCellVec;
24  typedef std::vector<IdealZPrism> HFCellVec;
25 
26  explicit HcalDDDGeometry(const HcalTopology& theTopo);
28  ~HcalDDDGeometry() override;
29 
30  const std::vector<DetId>& getValidDetIds(DetId::Detector det = DetId::Detector(0), int subdet = 0) const override;
31 
32  DetId getClosestCell(const GlobalPoint& r) const override;
33 
34  int insertCell(std::vector<HcalCellType> const&);
35 
36  void newCell(const GlobalPoint& f1,
37  const GlobalPoint& f2,
38  const GlobalPoint& f3,
39  const CCGFloat* parm,
40  const DetId& detId) override;
41 
42 protected:
43  // Modify the RawPtr class
44  const CaloCellGeometry* getGeometryRawPtr(uint32_t index) const override;
45 
46 private:
47  void newCellImpl(
48  const GlobalPoint& f1, const GlobalPoint& f2, const GlobalPoint& f3, const CCGFloat* parm, const DetId& detId);
49 
50  //can only be used by friend classes, to ensure sorting is done at the end
51  void newCellFast(
52  const GlobalPoint& f1, const GlobalPoint& f2, const GlobalPoint& f3, const CCGFloat* parm, const DetId& detId);
53 
54  void increaseReserve(unsigned int extra);
55  void sortValidIds();
56 
57  void fillDetIds() const;
58 
59  std::vector<HcalCellType> hcalCells_;
65 
67  double etaMax_;
68 
73  mutable std::atomic<bool> m_filledDetIds;
74 };
75 
76 #endif
std::vector< IdealObliquePrism > HBCellVec
std::vector< IdealObliquePrism > HOCellVec
std::vector< DetId > m_hfIds
std::vector< IdealZPrism > HFCellVec
std::vector< DetId > m_heIds
std::atomic< bool > m_filledDetIds
DetId getClosestCell(const GlobalPoint &r) const override
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
CaloCellGeometry::CCGFloat CCGFloat
std::vector< IdealObliquePrism > HECellVec
void newCellFast(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
const HcalTopology & topo_
int insertCell(std::vector< HcalCellType > const &)
void increaseReserve(unsigned int extra)
#define CMS_THREAD_GUARD(_var_)
HcalDDDGeometry(const HcalTopology &theTopo)
void newCellImpl(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
std::vector< HcalCellType > hcalCells_
std::vector< DetId > m_hbIds
HBCellVec m_hbCellVec
~HcalDDDGeometry() override
The HcalDDDGeometry will delete all its cell geometries at destruction time.
Definition: DetId.h:17
void fillDetIds() const
std::vector< DetId > m_emptyIds
HECellVec m_heCellVec
Detector
Definition: DetId.h:24
HFCellVec m_hfCellVec
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)
HOCellVec m_hoCellVec
std::vector< DetId > m_hoIds
void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override