CMS 3D CMS Logo

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_;
60  CMS_THREAD_GUARD(m_filledDetIds) mutable std::vector<DetId> m_hbIds;
61  CMS_THREAD_GUARD(m_filledDetIds) mutable std::vector<DetId> m_heIds;
62  CMS_THREAD_GUARD(m_filledDetIds) mutable std::vector<DetId> m_hoIds;
63  CMS_THREAD_GUARD(m_filledDetIds) mutable std::vector<DetId> m_hfIds;
64  CMS_THREAD_GUARD(m_filledDetIds) mutable std::vector<DetId> m_emptyIds;
65 
67  double etaMax_;
68 
73  mutable std::atomic<bool> m_filledDetIds;
74 };
75 
76 #endif
IdealObliquePrism.h
HcalDDDGeometry::hcalCells_
std::vector< HcalCellType > hcalCells_
Definition: HcalDDDGeometry.h:59
HcalDDDGeometry::etaMax_
double etaMax_
Definition: HcalDDDGeometry.h:67
HcalDDDGeometry::HBCellVec
std::vector< IdealObliquePrism > HBCellVec
Definition: HcalDDDGeometry.h:21
HcalTopology
Definition: HcalTopology.h:26
HcalDDDGeometry::getGeometryRawPtr
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
Definition: HcalDDDGeometry.cc:181
HcalDDDGeometry::HECellVec
std::vector< IdealObliquePrism > HECellVec
Definition: HcalDDDGeometry.h:22
HcalDDDGeometry::m_heIds
std::vector< DetId > m_heIds
Definition: HcalDDDGeometry.h:61
HcalAlignmentRcd.h
HcalDDDGeometry::increaseReserve
void increaseReserve(unsigned int extra)
Definition: HcalDDDGeometry.cc:200
HcalDDDGeometry::getClosestCell
DetId getClosestCell(const GlobalPoint &r) const override
Definition: HcalDDDGeometry.cc:67
HcalDDDGeometryLoader
Definition: HcalDDDGeometryLoader.h:21
HcalDDDGeometry::newCellFast
void newCellFast(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
Definition: HcalDDDGeometry.cc:175
DetId
Definition: DetId.h:17
CaloSubdetectorGeometry::CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: CaloSubdetectorGeometry.h:25
HcalDDDGeometry::m_hbIds
std::vector< DetId > m_hbIds
Definition: HcalDDDGeometry.h:60
IdealZPrism.h
HcalDDDGeometry::m_hfIds
std::vector< DetId > m_hfIds
Definition: HcalDDDGeometry.h:63
Point3DBase< float, GlobalTag >
HcalDDDGeometry::HFCellVec
std::vector< IdealZPrism > HFCellVec
Definition: HcalDDDGeometry.h:24
HcalDDDGeometry::insertCell
int insertCell(std::vector< HcalCellType > const &)
Definition: HcalDDDGeometry.cc:129
CaloSubdetectorGeometry.h
CaloCellGeometry
Definition: CaloCellGeometry.h:50
DeadROC_duringRun.f2
f2
Definition: DeadROC_duringRun.py:220
HcalDetId.h
thread_safety_macros.h
HcalDDDGeometry::HcalDDDGeometry
HcalDDDGeometry(const HcalTopology &theTopo)
Definition: HcalDDDGeometry.cc:10
HcalDDDGeometry::HOCellVec
std::vector< IdealObliquePrism > HOCellVec
Definition: HcalDDDGeometry.h:23
HcalDDDGeometry::m_hfCellVec
HFCellVec m_hfCellVec
Definition: HcalDDDGeometry.h:72
DetId::Detector
Detector
Definition: DetId.h:24
HcalDDDGeometry::m_filledDetIds
std::atomic< bool > m_filledDetIds
Definition: HcalDDDGeometry.h:73
HcalCellType.h
HcalDDDGeometry::~HcalDDDGeometry
~HcalDDDGeometry() override
The HcalDDDGeometry will delete all its cell geometries at destruction time.
Definition: HcalDDDGeometry.cc:19
alignCSCRings.r
r
Definition: alignCSCRings.py:93
HcalTopology.h
HcalDDDGeometry::m_hoIds
std::vector< DetId > m_hoIds
Definition: HcalDDDGeometry.h:62
HcalDDDGeometry::fillDetIds
void fillDetIds() const
Definition: HcalDDDGeometry.cc:21
HcalDDDGeometry
Definition: HcalDDDGeometry.h:17
HcalDDDGeometry::m_emptyIds
std::vector< DetId > m_emptyIds
Definition: HcalDDDGeometry.h:64
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
HcalDDDGeometry::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: HcalDDDGeometry.cc:55
HcalDDDGeometry::newCellImpl
void newCellImpl(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
Definition: HcalDDDGeometry.cc:142
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
HcalDDDGeometry::newCell
void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override
Definition: HcalDDDGeometry.cc:169
HcalDDDGeometry::m_hoCellVec
HOCellVec m_hoCellVec
Definition: HcalDDDGeometry.h:71
HcalGeometryRecord.h
HcalDDDGeometry::topo_
const HcalTopology & topo_
Definition: HcalDDDGeometry.h:66
DeadROC_duringRun.f1
f1
Definition: DeadROC_duringRun.py:219
HcalDDDGeometry::m_hbCellVec
HBCellVec m_hbCellVec
Definition: HcalDDDGeometry.h:69
CMS_THREAD_GUARD
#define CMS_THREAD_GUARD(_var_)
Definition: thread_safety_macros.h:6
HcalDDDGeometry::m_heCellVec
HECellVec m_heCellVec
Definition: HcalDDDGeometry.h:70
HcalDDDGeometry::sortValidIds
void sortValidIds()
Definition: HcalDDDGeometry.cc:202