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  const CaloCellGeometry* cellGeomPtr( uint32_t index ) const override ;
48 
49 private:
50 
51  void newCellImpl( const GlobalPoint& f1 ,
52  const GlobalPoint& f2 ,
53  const GlobalPoint& f3 ,
54  const CCGFloat* parm,
55  const DetId& detId ) ;
56 
57  //can only be used by friend classes, to ensure sorting is done at the end
58  void newCellFast( const GlobalPoint& f1 ,
59  const GlobalPoint& f2 ,
60  const GlobalPoint& f3 ,
61  const CCGFloat* parm,
62  const DetId& detId ) ;
63 
64  void increaseReserve(unsigned int extra);
65  void sortValidIds();
66 
67  void fillDetIds() const ;
68 
69  std::vector<HcalCellType> hcalCells_;
75 
77  double etaMax_;
78 
79  HBCellVec m_hbCellVec ;
80  HECellVec m_heCellVec ;
81  HOCellVec m_hoCellVec ;
82  HFCellVec m_hfCellVec ;
83  mutable std::atomic<bool> m_filledDetIds;
84 };
85 
86 #endif
87 
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
CaloCellGeometry::CCGFloat CCGFloat
std::vector< IdealObliquePrism > HECellVec
DetId getClosestCell(const GlobalPoint &r) const override
const CaloCellGeometry * cellGeomPtr(uint32_t index) 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:24
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)