CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CaloTowerGeometry.cc
Go to the documentation of this file.
3 
7 
9  m_cellVec ( k_NumberOfCellsForCorners )
10 {
11 }
12 
13 
15 {
16 }
17 
18 
19 unsigned int
21 {
22  const CaloGenericDetId gid ( id ) ;
23 
24  assert( gid.isCaloTower() ) ;
25 
26  const CaloTowerDetId cid ( id ) ;
27 
28  const unsigned int iea ( cid.ietaAbs() ) ;
29 
30  const unsigned int ip ( ( cid.iphi() - 1 )/4 ) ;
31 
32  const int izoff ( ( cid.zside() + 1 )/2 ) ;
33 
34  const unsigned int offset ( izoff*3*18) ;
35 
36  return ( offset + ip + ( CaloTowerDetId::kEndIEta < iea ? 36 :
37  ( CaloTowerDetId::kBarIEta < iea ? 18 : 0 ) ) ) ;
38 }
39 
40 unsigned int
42 {
43  return (unsigned int) DetId::Calo - 1 ;
44 }
45 
46 void
48  const CCGFloat* pv ,
49  unsigned int i ,
50  Pt3D& ref )
51 {
52  IdealObliquePrism::localCorners( lc, pv, ref ) ;
53 }
54 
55 void
57  const GlobalPoint& f2 ,
58  const GlobalPoint& f3 ,
59  const CCGFloat* parm ,
60  const DetId& detId )
61 {
62  const CaloGenericDetId cgid ( detId ) ;
63 
64  assert( cgid.isCaloTower() ) ;
65 
66  const unsigned int di ( cgid.denseIndex() ) ;
67 
68  m_cellVec[ di ] = IdealObliquePrism( f1, cornersMgr(), parm ) ;
69  addValidID( detId ) ;
70 }
71 
72 const CaloCellGeometry*
74 {
75  const CaloCellGeometry* cell ( &m_cellVec[ index ] ) ;
76  return ( m_cellVec.size() < index ||
77  0 == cell->param() ? 0 : cell ) ;
78 }
int i
Definition: DBlmapReader.cc:9
bool isCaloTower() const
virtual void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
std::vector< Pt3D > Pt3DVec
static unsigned int alignmentTransformIndexLocal(const DetId &id)
CaloCellGeometry::CCGFloat CCGFloat
const CCGFloat * param() const
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
CaloCellGeometry::Pt3D Pt3D
CaloCellGeometry::CCGFloat CCGFloat
unsigned int offset(bool)
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
uint32_t denseIndex() const
CaloCellGeometry::Pt3D Pt3D
static void localCorners(Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
Definition: DetId.h:18
void addValidID(const DetId &id)
CaloCellGeometry::CornersMgr * cornersMgr()
CaloCellGeometry::Pt3DVec Pt3DVec
HepGeom::Point3D< CCGFloat > Pt3D
virtual ~CaloTowerGeometry()
CaloCellGeometry::Pt3DVec Pt3DVec
virtual const CaloCellGeometry * cellGeomPtr(uint32_t index) const