30 std::ostringstream st1;
31 st1 <<
"Eta" <<
i + 1;
41 if (
nullptr == hcalGeometry->
parMgr())
61 const float HBRMIN = 181.1;
62 const float HBRMAX = 288.8;
64 float normalDepths[2] = {HBRMIN, HBRMAX};
65 float ring15Depths[3] = {HBRMIN, 258.4, HBRMAX};
66 float ring16Depths[3] = {HBRMIN, 190.4, 232.6};
67 float layerDepths[18] = {HBRMIN,
85 float slhcDepths[4] = {HBRMIN, 214., 239., HBRMAX};
90 std::vector<HcalHardcodeGeometryLoader::HBHOCellParameters>
result;
91 for (
int iring = 1; iring <= 16; ++iring) {
95 for (
float ring15Depth : ring15Depths)
96 depths.emplace_back(ring15Depth);
97 }
else if (iring == 16) {
98 for (
float ring16Depth : ring16Depths)
99 depths.emplace_back(ring16Depth);
101 for (
float normalDepth : normalDepths)
102 depths.emplace_back(normalDepth);
113 if (iring != 16 ||
depth < 3)
120 depths.emplace_back(HBRMAX);
122 for (
int i = 0;
i < 4; ++
i) {
123 if (iring != 16 ||
i < 3) {
124 depths.emplace_back(slhcDepths[
i]);
130 unsigned int startingDepth = 1;
131 float etaMin = (iring - 1) * 0.087;
132 float etaMax = iring * 0.087;
135 std::ostringstream st2;
136 st2 <<
"HBRing " << iring <<
" eta " <<
etaMin <<
":" <<
etaMax <<
" depths " <<
ndepth <<
":" << startingDepth;
137 for (
unsigned int i = 0;
i <
depths.size(); ++
i)
141 for (
unsigned int idepth = startingDepth; idepth <=
ndepth; ++idepth) {
142 float rmin =
depths[idepth - 1];
143 float rmax =
depths[idepth];
145 edm::LogVerbatim(
"HCalGeom") <<
"HB " << idepth <<
" R " << rmin <<
":" << rmax;
156 const float HORMIN0 = 390.0;
157 const float HORMIN1 = 412.6;
158 const float HORMAX = 413.6;
178 std::vector<HcalHardcodeGeometryLoader::HBHOCellParameters>
result;
189 const std::vector<HcalHardcodeGeometryLoader::HBHOCellParameters>& fCells,
192 for (
const auto& param : fCells) {
193 for (
int iPhi = param.phiFirst; iPhi <=
MAX_HCAL_PHI; iPhi += param.phiStep) {
194 for (
int iside = -1; iside <= 1; iside += 2) {
197 float etaCenter = 0.5 * (param.etaMin + param.etaMax);
198 float x = param.rMin *
cos(phiCenter);
199 float y = param.rMin *
sin(phiCenter);
200 float z = iside * param.rMin * sinh(etaCenter);
203 std::vector<CCGFloat> cellParams;
204 cellParams.reserve(5);
205 cellParams.emplace_back(0.5 * (param.etaMax - param.etaMin));
206 cellParams.emplace_back(0.5 * param.dphi *
DEGREE2RAD);
207 cellParams.emplace_back(0.5 * (param.rMax - param.rMin) * cosh(etaCenter));
208 cellParams.emplace_back(fabs(refPoint.
eta()));
209 cellParams.emplace_back(fabs(refPoint.
z()));
211 edm::LogVerbatim(
"HCalGeom") <<
"HcalHardcodeGeometryLoader::fillHBHO-> " << hid << hid.
ieta() <<
'/' 212 << hid.
iphi() <<
'/' << hid.
depth() << refPoint <<
'/' << cellParams[0] <<
'/' 213 << cellParams[1] <<
'/' << cellParams[2];
228 std::vector<HcalHardcodeGeometryLoader::HECellParameters>
result;
229 const float HEZMIN = 400.458;
230 const float HEZMID = 436.168;
231 const float HEZMAX = 549.268;
232 float normalDepths[3] = {HEZMIN, HEZMID, HEZMAX};
233 float tripleDepths[4] = {HEZMIN, 418.768, HEZMID, HEZMAX};
234 float slhcDepths[5] = {HEZMIN, 418.768, HEZMID, 493., HEZMAX};
235 float ring16Depths[2] = {418.768, 470.968};
236 float ring16slhcDepths[3] = {418.768, 450., 470.968};
237 float ring17Depths[2] = {409.698, 514.468};
238 float ring17slhcDepths[5] = {409.698, 435., 460., 495., 514.468};
239 float ring18Depths[3] = {391.883, 427.468, 540.568};
240 float ring18slhcDepths[5] = {391.883, 439., 467., 504., 540.568};
256 float layerDepths[19] = {HEZMIN,
277 for (
int iringm16 = 0; iringm16 <= 13; ++iringm16) {
278 int iring = iringm16 + 16;
279 std::vector<float>
depths;
280 unsigned int startingDepth = 1;
283 for (
float ring16Depth : ring16Depths)
284 depths.emplace_back(ring16Depth);
286 }
else if (iring == 17)
287 for (
float ring17Depth : ring17Depths)
288 depths.emplace_back(ring17Depth);
289 else if (iring == 18)
290 for (
float ring18Depth : ring18Depths)
291 depths.emplace_back(ring18Depth);
292 else if (iring ==
topology.lastHERing())
293 for (
int i = 0;
i < 3; ++
i)
294 depths.emplace_back(tripleDepths[
i]);
295 else if (iring >=
topology.firstHETripleDepthRing())
296 for (
float tripleDepth : tripleDepths)
297 depths.emplace_back(tripleDepth);
299 for (
float normalDepth : normalDepths)
300 depths.emplace_back(normalDepth);
305 depths.emplace_back(ring16Depths[0]);
306 else if (iring == 17)
307 depths.emplace_back(ring17Depths[0]);
308 else if (iring == 18)
309 depths.emplace_back(ring18Depths[0]);
313 float lastDepth =
depths[0];
318 if (layerDepths[
depth] > lastDepth && (iring != 16 ||
depth > 3)) {
320 lastDepth = layerDepths[
depth];
325 depths.emplace_back(HEZMAX);
330 for (
float ring16slhcDepth : ring16slhcDepths)
331 depths.emplace_back(ring16slhcDepth);
333 }
else if (iring == 17)
334 for (
float ring17slhcDepth : ring17slhcDepths)
335 depths.emplace_back(ring17slhcDepth);
336 else if (iring == 18)
337 for (
float ring18slhcDepth : ring18slhcDepths)
338 depths.emplace_back(ring18slhcDepth);
340 for (
float slhcDepth : slhcDepths)
341 depths.emplace_back(slhcDepth);
349 std::ostringstream st3;
350 st3 <<
"HERing " << iring <<
" eta " <<
etamin <<
":" <<
etamax <<
" depths " <<
ndepth <<
":" << startingDepth;
351 for (
unsigned int i = 0;
i <
depths.size(); ++
i)
355 for (
unsigned int idepth = 0; idepth <
ndepth; ++idepth) {
356 int depthIndex = (
int)(idepth + startingDepth);
359 if (depthIndex <= 7) {
363 int stepPhi = (iring >=
topology.firstHEDoublePhiRing() ? 2 : 1);
368 edm::LogVerbatim(
"HCalGeom") <<
"HE iEta " << iring <<
" Depth " << depthIndex <<
" Eta " <<
etamin <<
":" 375 edm::LogVerbatim(
"HCalGeom") <<
"HE iEta " << iring <<
" Depth " << depthIndex <<
" Eta " <<
etamin <<
":" 390 const float HEZMIN_H2 = 400.715;
391 const float HEZMID_H2 = 436.285;
392 const float HEZMAX_H2 = 541.885;
418 std::vector<HcalHardcodeGeometryLoader::HECellParameters>
result;
427 const float HFZMIN1 = 1115.;
428 const float HFZMIN2 = 1137.;
429 const float HFZMAX = 1280.1;
460 std::vector<HcalHardcodeGeometryLoader::HFCellParameters>
result;
468 const std::vector<HcalHardcodeGeometryLoader::HECellParameters>& fCells) {
470 for (
const auto& param : fCells) {
471 for (
int iPhi = param.phiFirst; iPhi <=
MAX_HCAL_PHI; iPhi += param.phiStep) {
472 for (
int iside = -1; iside <= 1; iside += 2) {
475 float etaCenter = 0.5 * (param.etaMin + param.etaMax);
477 float perp = param.zMin / sinh(etaCenter);
480 float z = iside * param.zMin;
483 std::vector<CCGFloat> cellParams;
484 cellParams.reserve(5);
485 cellParams.emplace_back(0.5 * (param.etaMax - param.etaMin));
486 cellParams.emplace_back(0.5 * param.dphi *
DEGREE2RAD);
487 cellParams.emplace_back(-0.5 * (param.zMax - param.zMin) /
tanh(etaCenter));
488 cellParams.emplace_back(fabs(refPoint.
eta()));
489 cellParams.emplace_back(fabs(refPoint.
z()));
491 edm::LogVerbatim(
"HCalGeom") <<
"HcalHardcodeGeometryLoader::fillHE-> " << hid << refPoint <<
'/' 492 << cellParams[0] <<
'/' << cellParams[1] <<
'/' << cellParams[2];
505 const std::vector<HcalHardcodeGeometryLoader::HFCellParameters>& fCells) {
507 for (
const auto& param : fCells) {
508 for (
int iPhi = param.phiFirst; iPhi <=
MAX_HCAL_PHI; iPhi += param.phiStep) {
509 for (
int iside = -1; iside <= 1; iside += 2) {
515 float oEta =
outer.eta();
516 float etaCenter = 0.5 * (
iEta + oEta);
518 float perp = param.zMin / sinh(etaCenter);
521 float z = iside * param.zMin;
524 std::vector<CCGFloat> cellParams;
525 cellParams.reserve(5);
526 cellParams.emplace_back(0.5 * (
iEta - oEta));
527 cellParams.emplace_back(0.5 * param.dphi *
DEGREE2RAD);
528 cellParams.emplace_back(0.5 * (param.zMax - param.zMin));
529 cellParams.emplace_back(fabs(refPoint.
eta()));
530 cellParams.emplace_back(fabs(refPoint.
z()));
532 edm::LogVerbatim(
"HCalGeom") <<
"HcalHardcodeGeometryLoader::fillHF-> " << hid << refPoint <<
'/' 533 << cellParams[0] <<
'/' << cellParams[1] <<
'/' << cellParams[2];
void fillHBHO(HcalGeometry *fGeometry, const std::vector< HBHOCellParameters > &fCells, bool fHB)
Log< level::Info, true > LogVerbatim
std::vector< HFCellParameters > makeHFCells()
void tanh(data_T data[CONFIG_T::n_in], res_T res[CONFIG_T::n_in])
void getDepthSegmentation(const unsigned ring, std::vector< int > &readoutDepths, const bool flag=false) const
std::vector< HBHOCellParameters > makeHOCells()
Sin< T >::type sin(const T &t)
void fillHF(HcalGeometry *fGeometry, const std::vector< HFCellParameters > &fCells)
void allocatePar(ParVec::size_type n, unsigned int m)
void newCellFast(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
constexpr int ieta() const
get the cell ieta
Cos< T >::type cos(const T &t)
HcalTopologyMode::Mode mode() const
CaloCellGeometry::CCGFloat CCGFloat
CaloSubdetectorGeometry * load(const HcalTopology &fTopology)
unsigned int getHFSize() const
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
T perp() const
Magnitude of transverse component.
HcalHardcodeGeometryLoader()
unsigned int ncells() const override
return a count of valid cells (for dense indexing use)
std::vector< HECellParameters > makeHECells(const HcalTopology &topology)
unsigned int numberOfShapes() const override
CaloCellGeometry::CornersMgr * cornersMgr()
std::vector< std::vector< int > > m_segmentation
void increaseReserve(unsigned int extra)
ALPAKA_FN_ACC ALPAKA_FN_INLINE void uint32_t const uint32_t CACellT< TrackerTraits > uint32_t * nCells
void allocateCorners(CaloCellGeometry::CornersVec::size_type n)
std::vector< HBHOCellParameters > makeHBCells(const HcalTopology &topology)
constexpr int iphi() const
get the cell iphi
void fillHE(HcalGeometry *fGeometry, const std::vector< HECellParameters > &fCells)
std::vector< HECellParameters > makeHECells_H2()
constexpr int depth() const
get the tower depth