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