11 extTopology ( theTopology )
33 std::auto_ptr<CaloSubdetectorGeometry>
46 std::auto_ptr<CaloSubdetectorGeometry>
49 std::auto_ptr<CaloSubdetectorGeometry> hg
65 CastorGeometry::k_NumberOfParametersPerShape ) ;
68 std::vector<HcalCastorDetId> castorIds ;
73 for(
int imodule ( firstCell ) ; imodule <= lastCell ; ++imodule )
75 for(
int isector ( 1 ) ;
88 for( std::vector<HcalCastorDetId>::const_iterator
89 castorIdItr ( castorIds.begin() ) ;
90 castorIdItr != castorIds.end() ; ++castorIdItr )
100 const double zside ( 1.0*detId.
zside() ) ;
103 const int isect ( detId.
sector() ) ;
104 const double sector ( 1.0*isect ) ;
109 const double sign ( 0 == isect%2 ? -1 : 1 ) ;
113 static const double an ( atan( 1.));
114 static const double can (
cos( an ));
115 static const double san (
sin( an ));
116 static const double dxlEM ( 1.55/2. ) ;
117 static const double dxhEM ( 5.73/2. ) ;
118 static const double dhEM ( 14.26/2. );
119 static const double dR ( 0.1 + 2.*dhEM*san*dxlEM/( dxhEM-dxlEM ) ) ;
120 static const double dhHAD ( 19.88/2. );
122 static const double dxhHAD ( dxhEM*( 2.*dhHAD*san + dR )/
123 ( 2.*dhEM*san + dR ) ) ;
124 static const double zm ( 1439.0 ) ;
125 static const double dzEM ( 5.45/2 ) ;
126 static const double dzHAD ( 10.075/2 ) ;
130 const double dxl ( sign*dxlEM ) ;
139 const double delz ( dh*can ) ;
140 const double dy ( dh*san ) ;
141 const double dx ( ( dxl + dxh )/2. ) ;
142 const double leg ( dR + dy ) ;
143 const double len (
sqrt( leg*leg + dx*dx ) ) ;
145 static const double dphi
148 const double fphi ( atan( dx/( dR + dy ) ) ) ;
150 const double phi ( 0==isect%2 ? (sector-1.)*dphi - fphi :
151 sector*dphi - fphi ) ;
153 const double sphi (
sin( phi ) ) ;
154 const double cphi (
cos( phi ) ) ;
156 const double xc ( len*cphi ) ;
157 const double yc ( len*sphi ) ;
158 const double zc ( zside*( zm + delz +
160 4.*dzEM + ( 1.*(
module-2) - 1 )*2.*dzHAD ) ) ) ;
164 std::vector<double> zz ;
166 zz.push_back( dxl ) ;
167 zz.push_back( dxh ) ;
CaloCellGeometry * makeCell(const HcalCastorDetId &detId, CaloSubdetectorGeometry *geom) const
const CastorTopology * extTopology
int sector() const
get the sector (1-16)
CastorHardcodeGeometryLoader()
Sin< T >::type sin(const T &t)
int module() const
get the module (1-2 for EM, 1-12 for HAD)
Section section() const
get the section
void allocatePar(ParVec::size_type n, unsigned int m)
void addCell(const DetId &id, CaloCellGeometry *ccg)
Add a cell to the geometry.
static const double dYHADPlate
void fill(HcalCastorDetId::Section section, CaloSubdetectorGeometry *cg)
Cos< T >::type cos(const T &t)
int zside() const
get the z-side of the cell (1/-1)
static const double dXHADPlate
static const int SubdetectorId
virtual bool valid(const HcalCastorDetId &id) const
std::auto_ptr< CaloSubdetectorGeometry > load()
static const double dYEMPlate
CaloCellGeometry::CornersMgr * cornersMgr()
static const double * getParmPtr(const std::vector< double > &vd, ParMgr *mgr, ParVecVec &pvv)
static const double dXEMPlate
int firstCell(HcalCastorDetId::Section section) const
void allocateCorners(CaloCellGeometry::CornersVec::size_type n)
int lastCell(HcalCastorDetId::Section section) const