50 if (geom->
parMgr() ==
nullptr)
52 CastorGeometry::k_NumberOfParametersPerShape);
55 std::vector<HcalCastorDetId> castorIds;
60 for (
int imodule(firstCell); imodule <= lastCell; ++imodule) {
64 castorIds.emplace_back(
id);
73 for (std::vector<HcalCastorDetId>::const_iterator castorIdItr(castorIds.begin()); castorIdItr != castorIds.end();
83 const int isect(detId.
sector());
84 const double sector(1.0 * isect);
88 const double sign(0 == isect % 2 ? -1 : 1);
92 static const double an(atan(1.));
93 static const double can(
cos(an));
94 static const double san(
sin(an));
95 static const double dxlEM(1.55 / 2.);
96 static const double dxhEM(5.73 / 2.);
97 static const double dhEM(14.26 / 2.);
98 static const double dR(0.1 + 2. * dhEM * san * dxlEM / (dxhEM - dxlEM));
99 static const double dhHAD(19.88 / 2.);
101 static const double dxhHAD(dxhEM * (2. * dhHAD * san + dR) /
102 (2. * dhEM * san + dR));
103 static const double zm(1439.0);
104 static const double dzEM(5.45 / 2);
105 static const double dzHAD(10.075 / 2);
109 const double dxl(sign * dxlEM);
115 const double delz(dh * can);
116 const double dy(dh * san);
117 const double dx((dxl + dxh) / 2.);
118 const double leg(dR + dy);
119 const double len(
sqrt(leg * leg + dx * dx));
123 const double fphi(atan(dx / (dR + dy)));
125 const double phi(0 == isect % 2 ? (sector - 1.) * dphi - fphi : sector * dphi - fphi);
127 const double sphi(
sin(phi));
128 const double cphi(
cos(phi));
130 const double xc(len * cphi);
131 const double yc(len * sphi);
134 (zm + delz + (
module < 3 ? (1. *
module - 1.0) * 2. * dzEM : 4. * dzEM + (1. * (
module - 2) - 1) * 2. * dzHAD)));
138 std::vector<CCGFloat>
zz;
140 zz.emplace_back(dxl);
141 zz.emplace_back(dxh);
const CastorTopology * extTopology
int sector() const
get the sector (1-16)
CastorHardcodeGeometryLoader()
virtual void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)=0
Sin< T >::type sin(const T &t)
CaloCellGeometry::CCGFloat CCGFloat
int module() const
get the module (1-2 for EM, 1-12 for HAD)
void makeCell(const HcalCastorDetId &detId, CaloSubdetectorGeometry *geom) const
Section section() const
get the section
void allocatePar(ParVec::size_type n, unsigned int m)
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)
CastorTopology * theTopology
static const double dXHADPlate
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
static const int SubdetectorId
virtual bool valid(const HcalCastorDetId &id) const
std::unique_ptr< CaloSubdetectorGeometry > load()
static const double dYEMPlate
CaloCellGeometry::CornersMgr * cornersMgr()
static const double dXEMPlate
int firstCell(HcalCastorDetId::Section section) const
void allocateCorners(CaloCellGeometry::CornersVec::size_type n)
int lastCell(HcalCastorDetId::Section section) const