CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalGeometry.h
Go to the documentation of this file.
1 #ifndef HcalGeometry_h
2 #define HcalGeometry_h
3 
11 
13 
14 public:
15 
16  typedef std::vector<IdealObliquePrism> HBCellVec ;
17  typedef std::vector<IdealObliquePrism> HECellVec ;
18  typedef std::vector<IdealObliquePrism> HOCellVec ;
19  typedef std::vector<IdealZPrism> HFCellVec ;
20 
24 
28  typedef HcalDetId DetIdType ;
29 
30 
32 
33  static std::string dbString() { return "PHcalRcd" ; }
34 
35  virtual unsigned int numberOfShapes() const { return theTopology.getNumberOfShapes() ; }
36  virtual unsigned int numberOfParametersPerShape() const { return k_NumberOfParametersPerShape ; }
37 
38  explicit HcalGeometry(const HcalTopology& topology);
39 
41  virtual ~HcalGeometry();
42 
43  virtual const std::vector<DetId>& getValidDetIds(DetId::Detector det = DetId::Detector ( 0 ),
44  int subdet = 0 ) const;
45 
46  virtual DetId getClosestCell(const GlobalPoint& r) const ;
47 
49  double dR ) const ;
50 
51 
52  static std::string producerTag() { return "HCAL" ; }
53 
54  static unsigned int numberOfBarrelAlignments() { return 36 ; }
55 
56  static unsigned int numberOfEndcapAlignments() { return 36 ; }
57 
58  static unsigned int numberOfForwardAlignments() { return 36 ; }
59 
60  static unsigned int numberOfOuterAlignments() { return 60 ; }
61 
62 
63 
64  static unsigned int numberOfAlignments()
65  { return ( numberOfBarrelAlignments() +
69 
70  static unsigned int alignmentBarrelIndexLocal( const DetId& id ) ;
71  static unsigned int alignmentEndcapIndexLocal( const DetId& id ) ;
72  static unsigned int alignmentForwardIndexLocal( const DetId& id ) ;
73  static unsigned int alignmentOuterIndexLocal( const DetId& id ) ;
74  static unsigned int alignmentTransformIndexLocal( const DetId& id ) ;
75 
76  static unsigned int alignmentBarEndForIndexLocal( const DetId& id,unsigned int nD ) ;
77 
78  static unsigned int alignmentTransformIndexGlobal( const DetId& id ) ;
79 
80  static DetId detIdFromLocalAlignmentIndex( unsigned int i ) ;
81  static DetId detIdFromBarrelAlignmentIndex( unsigned int i ) ;
82  static DetId detIdFromEndcapAlignmentIndex( unsigned int i ) ;
83  static DetId detIdFromForwardAlignmentIndex( unsigned int i ) ;
84  static DetId detIdFromOuterAlignmentIndex( unsigned int i ) ;
85 
86  void localCorners( Pt3DVec& lc ,
87  const CCGFloat* pv ,
88  unsigned int i ,
89  Pt3D& ref ) ;
90 
91  virtual void newCell( const GlobalPoint& f1 ,
92  const GlobalPoint& f2 ,
93  const GlobalPoint& f3 ,
94  const CCGFloat* parm,
95  const DetId& detId ) ;
96 
97  virtual const CaloCellGeometry* getGeometry( const DetId& id ) const {
98  return cellGeomPtr( theTopology.detId2denseId( id ) ) ;
99  }
100 
101  virtual void getSummary( CaloSubdetectorGeometry::TrVec& trVector,
104  CaloSubdetectorGeometry::IVec& dinsVector ) const ;
105 protected:
106 
107  virtual const CaloCellGeometry* cellGeomPtr( unsigned int index ) const ;
108 
109  virtual unsigned int indexFor(const DetId& id) const { return theTopology.detId2denseId(id); }
110  virtual unsigned int sizeForDenseIndex(const DetId& id) const { return theTopology.ncells(); }
111 
112 private:
113 
114  void fillDetIds() const ;
115 
116  void init() ;
117 
119  int etaRing(HcalSubdetector bc, double abseta) const;
120  int phiBin(double phi, int etaring) const;
121 
122 
124 
125  mutable std::vector<DetId> m_hbIds ;
126  mutable std::vector<DetId> m_heIds ;
127  mutable std::vector<DetId> m_hoIds ;
128  mutable std::vector<DetId> m_hfIds ;
129  mutable std::vector<DetId> m_emptyIds ;
131 
136 };
137 
138 
139 #endif
140 
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:54
std::vector< DetId > m_heIds
Definition: HcalGeometry.h:126
virtual void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
int i
Definition: DBlmapReader.cc:9
virtual DetId getClosestCell(const GlobalPoint &r) const
Definition: HcalGeometry.cc:91
static unsigned int alignmentTransformIndexLocal(const DetId &id)
virtual unsigned int detId2denseId(const DetId &id) const
return a linear packed id
std::vector< CCGFloat > DimVec
static unsigned int alignmentEndcapIndexLocal(const DetId &id)
std::vector< DetId > m_emptyIds
Definition: HcalGeometry.h:129
virtual void getSummary(CaloSubdetectorGeometry::TrVec &trVector, CaloSubdetectorGeometry::IVec &iVector, CaloSubdetectorGeometry::DimVec &dimVector, CaloSubdetectorGeometry::IVec &dinsVector) const
static DetId detIdFromOuterAlignmentIndex(unsigned int i)
static std::string producerTag()
Definition: HcalGeometry.h:52
std::vector< unsigned int > IVec
std::vector< CCGFloat > TrVec
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
Definition: HcalGeometry.h:97
HcalAlignmentRcd AlignmentRecord
Definition: HcalGeometry.h:25
std::vector< IdealObliquePrism > HECellVec
Definition: HcalGeometry.h:17
std::vector< Pt3D > Pt3DVec
virtual unsigned int numberOfParametersPerShape() const
Definition: HcalGeometry.h:36
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)
Definition: HcalGeometry.cc:79
virtual CaloSubdetectorGeometry::DetIdSet getCells(const GlobalPoint &r, double dR) const
Get a list of all cells within a dR of the given cell.
const HcalTopology & theTopology
Definition: HcalGeometry.h:123
std::vector< DetId > m_hbIds
Definition: HcalGeometry.h:125
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: HcalGeometry.h:23
std::vector< DetId > m_hoIds
Definition: HcalGeometry.h:127
HBCellVec m_hbCellVec
Definition: HcalGeometry.h:132
PHcalRcd PGeometryRecord
Definition: HcalGeometry.h:27
HOCellVec m_hoCellVec
Definition: HcalGeometry.h:134
unsigned int getNumberOfShapes() const
Definition: HcalTopology.h:132
HFCellVec m_hfCellVec
Definition: HcalGeometry.h:135
std::vector< IdealObliquePrism > HOCellVec
Definition: HcalGeometry.h:18
static unsigned int numberOfOuterAlignments()
Definition: HcalGeometry.h:60
static DetId detIdFromForwardAlignmentIndex(unsigned int i)
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
static unsigned int alignmentBarrelIndexLocal(const DetId &id)
virtual unsigned int sizeForDenseIndex(const DetId &id) const
Definition: HcalGeometry.h:110
HcalSubdetector
Definition: HcalAssistant.h:31
CaloCellGeometry::CCGFloat CCGFloat
static DetId detIdFromBarrelAlignmentIndex(unsigned int i)
std::vector< DetId > m_hfIds
Definition: HcalGeometry.h:128
static DetId detIdFromLocalAlignmentIndex(unsigned int i)
int etaRing(HcalSubdetector bc, double abseta) const
helper methods for getClosestCell
CaloSubdetectorGeometry::IVec m_dins
Definition: HcalGeometry.h:130
HcalGeometry(const HcalTopology &topology)
Definition: HcalGeometry.cc:15
HcalGeometryRecord AlignedRecord
Definition: HcalGeometry.h:26
void localCorners(Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
static unsigned int alignmentOuterIndexLocal(const DetId &id)
CaloCellGeometry::Pt3D Pt3D
std::vector< IdealZPrism > HFCellVec
Definition: HcalGeometry.h:19
Definition: DetId.h:18
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:56
static std::string dbString()
Definition: HcalGeometry.h:33
virtual ~HcalGeometry()
The HcalGeometry will delete all its cell geometries at destruction time.
Definition: HcalGeometry.cc:21
Detector
Definition: DetId.h:24
CaloCellGeometry::CCGFloat CCGFloat
Definition: HcalGeometry.h:21
CaloCellGeometry::Pt3DVec Pt3DVec
HepGeom::Point3D< CCGFloat > Pt3D
std::vector< IdealObliquePrism > HBCellVec
Definition: HcalGeometry.h:16
virtual const CaloCellGeometry * cellGeomPtr(unsigned int index) const
HECellVec m_heCellVec
Definition: HcalGeometry.h:133
virtual unsigned int indexFor(const DetId &id) const
Definition: HcalGeometry.h:109
virtual unsigned int numberOfShapes() const
Definition: HcalGeometry.h:35
void fillDetIds() const
Definition: HcalGeometry.cc:38
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:58
static unsigned int alignmentForwardIndexLocal(const DetId &id)
HcalDetId DetIdType
Definition: HcalGeometry.h:28
static DetId detIdFromEndcapAlignmentIndex(unsigned int i)
static unsigned int alignmentBarEndForIndexLocal(const DetId &id, unsigned int nD)
CaloCellGeometry::Pt3D Pt3D
Definition: HcalGeometry.h:22
int phiBin(double phi, int etaring) const
static unsigned int numberOfAlignments()
Definition: HcalGeometry.h:64
virtual unsigned int ncells() const
return a count of valid cells (for dense indexing use)
Definition: DDAxes.h:10