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 
19 public:
20 
21  friend class HcalDDDGeometryLoader;
22 
23  typedef std::vector<IdealObliquePrism> HBCellVec ;
24  typedef std::vector<IdealObliquePrism> HECellVec ;
25  typedef std::vector<IdealObliquePrism> HOCellVec ;
26  typedef std::vector<IdealZPrism> HFCellVec ;
27 
28  explicit HcalDDDGeometry(const HcalTopology& theTopo);
30  ~HcalDDDGeometry() override;
31 
32  const std::vector<DetId>& getValidDetIds( DetId::Detector det = DetId::Detector ( 0 ) ,
33  int subdet = 0 ) const override;
34 
35  DetId getClosestCell(const GlobalPoint& r) const override ;
36 
37  int insertCell (std::vector<HcalCellType> const & );
38 
39  void newCell( const GlobalPoint& f1 ,
40  const GlobalPoint& f2 ,
41  const GlobalPoint& f3 ,
42  const CCGFloat* parm,
43  const DetId& detId ) override ;
44 
45 protected:
46 
47  // Modify the RawPtr class
48  const CaloCellGeometry* getGeometryRawPtr (uint32_t index) const override;
49 
50 private:
51 
52  void newCellImpl( const GlobalPoint& f1 ,
53  const GlobalPoint& f2 ,
54  const GlobalPoint& f3 ,
55  const CCGFloat* parm,
56  const DetId& detId ) ;
57 
58  //can only be used by friend classes, to ensure sorting is done at the end
59  void newCellFast( const GlobalPoint& f1 ,
60  const GlobalPoint& f2 ,
61  const GlobalPoint& f3 ,
62  const CCGFloat* parm,
63  const DetId& detId ) ;
64 
65  void increaseReserve(unsigned int extra);
66  void sortValidIds();
67 
68  void fillDetIds() const ;
69 
70  std::vector<HcalCellType> hcalCells_;
76 
78  double etaMax_;
79 
80  HBCellVec m_hbCellVec ;
81  HECellVec m_heCellVec ;
82  HOCellVec m_hoCellVec ;
83  HFCellVec m_hfCellVec ;
84  mutable std::atomic<bool> m_filledDetIds;
85 };
86 
87 #endif
88 
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
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
CaloCellGeometry::CCGFloat CCGFloat
std::vector< IdealObliquePrism > HECellVec
DetId getClosestCell(const GlobalPoint &r) const override
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:18
void fillDetIds() const
std::vector< DetId > m_emptyIds
HECellVec m_heCellVec
Detector
Definition: DetId.h:26
HFCellVec m_hfCellVec
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
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)