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  virtual ~HcalDDDGeometry();
31 
32  virtual const std::vector<DetId>& getValidDetIds( DetId::Detector det = DetId::Detector ( 0 ) ,
33  int subdet = 0 ) const;
34 
35  virtual DetId getClosestCell(const GlobalPoint& r) const ;
36 
37  int insertCell (std::vector<HcalCellType> const & );
38 
39  virtual void newCell( const GlobalPoint& f1 ,
40  const GlobalPoint& f2 ,
41  const GlobalPoint& f3 ,
42  const CCGFloat* parm,
43  const DetId& detId ) ;
44 
45 protected:
46 
47  virtual const CaloCellGeometry* cellGeomPtr( uint32_t index ) const ;
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
virtual const CaloCellGeometry * cellGeomPtr(uint32_t index) const
std::vector< IdealObliquePrism > HOCellVec
std::vector< DetId > m_hfIds
std::vector< IdealZPrism > HFCellVec
std::vector< DetId > m_heIds
std::atomic< bool > m_filledDetIds
virtual void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
CaloCellGeometry::CCGFloat CCGFloat
virtual ~HcalDDDGeometry()
The HcalDDDGeometry will delete all its cell geometries at destruction time.
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
Definition: DetId.h:18
void fillDetIds() const
std::vector< DetId > m_emptyIds
HECellVec m_heCellVec
Detector
Definition: DetId.h:24
HFCellVec m_hfCellVec
virtual const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const
Get a list of valid detector ids (for the given subdetector)
HOCellVec m_hoCellVec
virtual DetId getClosestCell(const GlobalPoint &r) const
std::vector< DetId > m_hoIds