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};
89 std::vector<HcalHardcodeGeometryLoader::HBHOCellParameters>
result;
90 for (
int iring = 1; iring <= 16; ++iring) {
91 std::vector<float> depths;
94 for (
float ring15Depth : ring15Depths)
95 depths.emplace_back(ring15Depth);
96 }
else if (iring == 16) {
97 for (
float ring16Depth : ring16Depths)
98 depths.emplace_back(ring16Depth);
100 for (
float normalDepth : normalDepths)
101 depths.emplace_back(normalDepth);
106 depths.emplace_back(layerDepths[depth]);
112 if (iring != 16 || depth < 3)
113 depths.emplace_back(layerDepths[depth]);
119 depths.emplace_back(HBRMAX);
121 for (
int i = 0;
i < 4; ++
i) {
122 if (iring != 16 ||
i < 3) {
123 depths.emplace_back(slhcDepths[
i]);
128 unsigned int ndepth = depths.size() - 1;
129 unsigned int startingDepth = 1;
130 float etaMin = (iring - 1) * 0.087;
131 float etaMax = iring * 0.087;
134 std::ostringstream st2;
135 st2 <<
"HBRing " << iring <<
" eta " << etaMin <<
":" << etaMax <<
" depths " << ndepth <<
":" << startingDepth;
136 for (
unsigned int i = 0;
i < depths.size(); ++
i)
137 st2 <<
":" << depths[
i];
140 for (
unsigned int idepth = startingDepth; idepth <=
ndepth; ++idepth) {
141 float rmin = depths[idepth - 1];
142 float rmax = depths[idepth];
144 edm::LogVerbatim(
"HCalGeom") <<
"HB " << idepth <<
" R " << rmin <<
":" << rmax;
155 const float HORMIN0 = 390.0;
156 const float HORMIN1 = 412.6;
157 const float HORMAX = 413.6;
177 std::vector<HcalHardcodeGeometryLoader::HBHOCellParameters>
result;
178 result.reserve(nCells);
180 result.emplace_back(cells[
i]);
188 const std::vector<HcalHardcodeGeometryLoader::HBHOCellParameters>& fCells,
191 for (
const auto& param : fCells) {
192 for (
int iPhi = param.phiFirst; iPhi <=
MAX_HCAL_PHI; iPhi += param.phiStep) {
193 for (
int iside = -1; iside <= 1; iside += 2) {
196 float etaCenter = 0.5 * (param.etaMin + param.etaMax);
197 float x = param.rMin *
cos(phiCenter);
198 float y = param.rMin *
sin(phiCenter);
199 float z = iside * param.rMin * sinh(etaCenter);
202 std::vector<CCGFloat> cellParams;
203 cellParams.reserve(5);
204 cellParams.emplace_back(0.5 * (param.etaMax - param.etaMin));
205 cellParams.emplace_back(0.5 * param.dphi *
DEGREE2RAD);
206 cellParams.emplace_back(0.5 * (param.rMax - param.rMin) * cosh(etaCenter));
207 cellParams.emplace_back(fabs(refPoint.
eta()));
208 cellParams.emplace_back(fabs(refPoint.
z()));
210 edm::LogVerbatim(
"HCalGeom") <<
"HcalHardcodeGeometryLoader::fillHBHO-> " << hid << hid.
ieta() <<
'/'
211 << hid.
iphi() <<
'/' << hid.
depth() << refPoint <<
'/' << cellParams[0] <<
'/'
212 << cellParams[1] <<
'/' << cellParams[2];
227 std::vector<HcalHardcodeGeometryLoader::HECellParameters>
result;
228 const float HEZMIN = 400.458;
229 const float HEZMID = 436.168;
230 const float HEZMAX = 549.268;
231 float normalDepths[3] = {HEZMIN, HEZMID, HEZMAX};
232 float tripleDepths[4] = {HEZMIN, 418.768, HEZMID, HEZMAX};
233 float slhcDepths[5] = {HEZMIN, 418.768, HEZMID, 493., HEZMAX};
234 float ring16Depths[2] = {418.768, 470.968};
235 float ring16slhcDepths[3] = {418.768, 450., 470.968};
236 float ring17Depths[2] = {409.698, 514.468};
237 float ring17slhcDepths[5] = {409.698, 435., 460., 495., 514.468};
238 float ring18Depths[3] = {391.883, 427.468, 540.568};
239 float ring18slhcDepths[5] = {391.883, 439., 467., 504., 540.568};
240 float etaBounds[] = {0.087 * 15,
255 float layerDepths[19] = {HEZMIN,
276 for (
int iringm16 = 0; iringm16 <= 13; ++iringm16) {
277 int iring = iringm16 + 16;
278 std::vector<float> depths;
279 unsigned int startingDepth = 1;
282 for (
float ring16Depth : ring16Depths)
283 depths.emplace_back(ring16Depth);
285 }
else if (iring == 17)
286 for (
float ring17Depth : ring17Depths)
287 depths.emplace_back(ring17Depth);
288 else if (iring == 18)
289 for (
float ring18Depth : ring18Depths)
290 depths.emplace_back(ring18Depth);
292 for (
int i = 0;
i < 3; ++
i)
293 depths.emplace_back(tripleDepths[
i]);
295 for (
float tripleDepth : tripleDepths)
296 depths.emplace_back(tripleDepth);
298 for (
float normalDepth : normalDepths)
299 depths.emplace_back(normalDepth);
304 depths.emplace_back(ring16Depths[0]);
305 else if (iring == 17)
306 depths.emplace_back(ring17Depths[0]);
307 else if (iring == 18)
308 depths.emplace_back(ring18Depths[0]);
310 depths.emplace_back(layerDepths[depth]);
312 float lastDepth = depths[0];
317 if (layerDepths[depth] > lastDepth && (iring != 16 || depth > 3)) {
318 depths.emplace_back(layerDepths[depth]);
319 lastDepth = layerDepths[
depth];
324 depths.emplace_back(HEZMAX);
329 for (
float ring16slhcDepth : ring16slhcDepths)
330 depths.emplace_back(ring16slhcDepth);
332 }
else if (iring == 17)
333 for (
float ring17slhcDepth : ring17slhcDepths)
334 depths.emplace_back(ring17slhcDepth);
335 else if (iring == 18)
336 for (
float ring18slhcDepth : ring18slhcDepths)
337 depths.emplace_back(ring18slhcDepth);
339 for (
float slhcDepth : slhcDepths)
340 depths.emplace_back(slhcDepth);
343 float etamin = etaBounds[iringm16];
344 float etamax = etaBounds[iringm16 + 1];
345 unsigned int ndepth = depths.size() - 1;
348 std::ostringstream st3;
349 st3 <<
"HERing " << iring <<
" eta " << etamin <<
":" << etamax <<
" depths " << ndepth <<
":" << startingDepth;
350 for (
unsigned int i = 0;
i < depths.size(); ++
i)
351 st3 <<
":" << depths[
i];
354 for (
unsigned int idepth = 0; idepth <
ndepth; ++idepth) {
355 int depthIndex = (int)(idepth + startingDepth);
356 float zmin = depths[idepth];
357 float zmax = depths[idepth + 1];
358 if (depthIndex <= 7) {
360 edm::LogVerbatim(
"HCalGeom") <<
"HE Depth " << idepth <<
":" << depthIndex <<
" Z " << zmin <<
":" << zmax;
366 edm::LogVerbatim(
"HCalGeom") <<
"HE iEta " << iring <<
" Depth " << depthIndex <<
" Eta " << etamin <<
":"
367 << etaBounds[iringm16 + 2];
370 iring, depthIndex, 1, stepPhi, deltaPhi, zmin, zmax, etamin, etaBounds[iringm16 + 2]));
373 edm::LogVerbatim(
"HCalGeom") <<
"HE iEta " << iring <<
" Depth " << depthIndex <<
" Eta " << etamin <<
":"
377 iring, depthIndex, 1, stepPhi, deltaPhi, zmin, zmax, etamin, etamax));
388 const float HEZMIN_H2 = 400.715;
389 const float HEZMID_H2 = 436.285;
390 const float HEZMAX_H2 = 541.885;
416 std::vector<HcalHardcodeGeometryLoader::HECellParameters>
result;
417 result.reserve(nCells);
419 result.emplace_back(cells[
i]);
425 const float HFZMIN1 = 1115.;
426 const float HFZMIN2 = 1137.;
427 const float HFZMAX = 1280.1;
458 std::vector<HcalHardcodeGeometryLoader::HFCellParameters>
result;
459 result.reserve(nCells);
461 result.emplace_back(cells[
i]);
466 const std::vector<HcalHardcodeGeometryLoader::HECellParameters>& fCells) {
468 for (
const auto& param : fCells) {
469 for (
int iPhi = param.phiFirst; iPhi <=
MAX_HCAL_PHI; iPhi += param.phiStep) {
470 for (
int iside = -1; iside <= 1; iside += 2) {
473 float etaCenter = 0.5 * (param.etaMin + param.etaMax);
475 float perp = param.zMin / sinh(etaCenter);
476 float x = perp *
cos(phiCenter);
477 float y = perp *
sin(phiCenter);
478 float z = iside * param.zMin;
481 std::vector<CCGFloat> cellParams;
482 cellParams.reserve(5);
483 cellParams.emplace_back(0.5 * (param.etaMax - param.etaMin));
484 cellParams.emplace_back(0.5 * param.dphi *
DEGREE2RAD);
485 cellParams.emplace_back(-0.5 * (param.zMax - param.zMin) / tanh(etaCenter));
486 cellParams.emplace_back(fabs(refPoint.
eta()));
487 cellParams.emplace_back(fabs(refPoint.
z()));
489 edm::LogVerbatim(
"HCalGeom") <<
"HcalHardcodeGeometryLoader::fillHE-> " << hid << refPoint <<
'/'
490 << cellParams[0] <<
'/' << cellParams[1] <<
'/' << cellParams[2];
503 const std::vector<HcalHardcodeGeometryLoader::HFCellParameters>& fCells) {
505 for (
const auto& param : fCells) {
506 for (
int iPhi = param.phiFirst; iPhi <=
MAX_HCAL_PHI; iPhi += param.phiStep) {
507 for (
int iside = -1; iside <= 1; iside += 2) {
512 float iEta = inner.
eta();
513 float oEta = outer.
eta();
514 float etaCenter = 0.5 * (iEta + oEta);
516 float perp = param.zMin / sinh(etaCenter);
517 float x = perp *
cos(phiCenter);
518 float y = perp *
sin(phiCenter);
519 float z = iside * param.zMin;
522 std::vector<CCGFloat> cellParams;
523 cellParams.reserve(5);
524 cellParams.emplace_back(0.5 * (iEta - oEta));
525 cellParams.emplace_back(0.5 * param.dphi *
DEGREE2RAD);
526 cellParams.emplace_back(0.5 * (param.zMax - param.zMin));
527 cellParams.emplace_back(fabs(refPoint.
eta()));
528 cellParams.emplace_back(fabs(refPoint.
z()));
530 edm::LogVerbatim(
"HCalGeom") <<
"HcalHardcodeGeometryLoader::fillHF-> " << hid << refPoint <<
'/'
531 << cellParams[0] <<
'/' << cellParams[1] <<
'/' << cellParams[2];
void fillHBHO(HcalGeometry *fGeometry, const std::vector< HBHOCellParameters > &fCells, bool fHB)
Log< level::Info, true > LogVerbatim
unsigned int getHFSize() const
void getDepthSegmentation(const unsigned ring, std::vector< int > &readoutDepths, const bool flag=false) const
std::vector< HFCellParameters > makeHFCells()
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)
constexpr std::array< uint8_t, layerIndexSize > layer
HcalTopologyMode::Mode mode() const
void newCellFast(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
constexpr int iphi() const
get the cell iphi
int firstHETripleDepthRing() const
Cos< T >::type cos(const T &t)
constexpr int ieta() const
get the cell ieta
CaloCellGeometry::CCGFloat CCGFloat
CaloSubdetectorGeometry * load(const HcalTopology &fTopology)
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
int firstHEDoublePhiRing() const
HcalHardcodeGeometryLoader()
unsigned int ncells() const override
return a count of valid cells (for dense indexing use)
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ cells
std::vector< HECellParameters > makeHECells(const HcalTopology &topology)
unsigned int numberOfShapes() const override
CaloCellGeometry::CornersMgr * cornersMgr()
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ uint32_t const *__restrict__ nCells
std::vector< std::vector< int > > m_segmentation
void increaseReserve(unsigned int extra)
T perp() const
Magnitude of transverse component.
void allocateCorners(CaloCellGeometry::CornersVec::size_type n)
constexpr int depth() const
get the tower depth
std::vector< HBHOCellParameters > makeHBCells(const HcalTopology &topology)
void fillHE(HcalGeometry *fGeometry, const std::vector< HECellParameters > &fCells)
std::vector< HECellParameters > makeHECells_H2()