19 std::cout <<
"Instantiate HcalHardCodeGeometryLoader" << std::endl;
39 if (
nullptr == hcalGeometry->
parMgr())
59 const float HBRMIN = 181.1;
60 const float HBRMAX = 288.8;
62 float normalDepths[2] = {HBRMIN, HBRMAX};
63 float ring15Depths[3] = {HBRMIN, 258.4, HBRMAX};
64 float ring16Depths[3] = {HBRMIN, 190.4, 232.6};
65 float layerDepths[18] = {HBRMIN,
83 float slhcDepths[4] = {HBRMIN, 214., 239., HBRMAX};
87 std::vector<HcalHardcodeGeometryLoader::HBHOCellParameters>
result;
88 for (
int iring = 1; iring <= 16; ++iring) {
92 for (
float ring15Depth : ring15Depths)
93 depths.emplace_back(ring15Depth);
94 }
else if (iring == 16) {
95 for (
float ring16Depth : ring16Depths)
96 depths.emplace_back(ring16Depth);
98 for (
float normalDepth : normalDepths)
99 depths.emplace_back(normalDepth);
110 if (iring != 16 ||
depth < 3)
117 depths.emplace_back(HBRMAX);
119 for (
int i = 0;
i < 4; ++
i) {
120 if (iring != 16 ||
i < 3) {
121 depths.emplace_back(slhcDepths[
i]);
127 unsigned int startingDepth = 1;
128 float etaMin = (iring - 1) * 0.087;
129 float etaMax = iring * 0.087;
134 for (
unsigned int i = 0;
i <
depths.size(); ++
i)
138 for (
unsigned int idepth = startingDepth; idepth <=
ndepth; ++idepth) {
139 float rmin =
depths[idepth - 1];
140 float rmax =
depths[idepth];
142 std::cout <<
"HB " << idepth <<
" R " << rmin <<
":" << rmax <<
"\n";
153 const float HORMIN0 = 390.0;
154 const float HORMIN1 = 412.6;
155 const float HORMAX = 413.6;
175 std::vector<HcalHardcodeGeometryLoader::HBHOCellParameters>
result;
177 for (
int i = 0;
i < nCells; ++
i)
186 const std::vector<HcalHardcodeGeometryLoader::HBHOCellParameters>& fCells,
189 for (
const auto& param : fCells) {
190 for (
int iPhi = param.phiFirst; iPhi <=
MAX_HCAL_PHI; iPhi += param.phiStep) {
191 for (
int iside = -1; iside <= 1; iside += 2) {
194 float etaCenter = 0.5 * (param.etaMin + param.etaMax);
195 float x = param.rMin *
cos(phiCenter);
196 float y = param.rMin *
sin(phiCenter);
197 float z = iside * param.rMin * sinh(etaCenter);
200 std::vector<CCGFloat> cellParams;
201 cellParams.reserve(5);
202 cellParams.emplace_back(0.5 * (param.etaMax - param.etaMin));
203 cellParams.emplace_back(0.5 * param.dphi *
DEGREE2RAD);
204 cellParams.emplace_back(0.5 * (param.rMax - param.rMin) * cosh(etaCenter));
205 cellParams.emplace_back(fabs(refPoint.
eta()));
206 cellParams.emplace_back(fabs(refPoint.
z()));
208 std::cout <<
"HcalHardcodeGeometryLoader::fillHBHO-> " << hid << hid.
ieta() <<
'/' << hid.
iphi() <<
'/'
209 << hid.
depth() << refPoint <<
'/' << cellParams[0] <<
'/' << cellParams[1] <<
'/' << cellParams[2]
225 std::vector<HcalHardcodeGeometryLoader::HECellParameters>
result;
226 const float HEZMIN = 400.458;
227 const float HEZMID = 436.168;
228 const float HEZMAX = 549.268;
229 float normalDepths[3] = {HEZMIN, HEZMID, HEZMAX};
230 float tripleDepths[4] = {HEZMIN, 418.768, HEZMID, HEZMAX};
231 float slhcDepths[5] = {HEZMIN, 418.768, HEZMID, 493., HEZMAX};
232 float ring16Depths[2] = {418.768, 470.968};
233 float ring16slhcDepths[3] = {418.768, 450., 470.968};
234 float ring17Depths[2] = {409.698, 514.468};
235 float ring17slhcDepths[5] = {409.698, 435., 460., 495., 514.468};
236 float ring18Depths[3] = {391.883, 427.468, 540.568};
237 float ring18slhcDepths[5] = {391.883, 439., 467., 504., 540.568};
238 float etaBounds[] = {0.087 * 15,
253 float layerDepths[19] = {HEZMIN,
274 for (
int iringm16 = 0; iringm16 <= 13; ++iringm16) {
275 int iring = iringm16 + 16;
276 std::vector<float>
depths;
277 unsigned int startingDepth = 1;
280 for (
float ring16Depth : ring16Depths)
281 depths.emplace_back(ring16Depth);
283 }
else if (iring == 17)
284 for (
float ring17Depth : ring17Depths)
285 depths.emplace_back(ring17Depth);
286 else if (iring == 18)
287 for (
float ring18Depth : ring18Depths)
288 depths.emplace_back(ring18Depth);
289 else if (iring ==
topology.lastHERing())
290 for (
int i = 0;
i < 3; ++
i)
291 depths.emplace_back(tripleDepths[
i]);
292 else if (iring >=
topology.firstHETripleDepthRing())
293 for (
float tripleDepth : tripleDepths)
294 depths.emplace_back(tripleDepth);
296 for (
float normalDepth : normalDepths)
297 depths.emplace_back(normalDepth);
302 depths.emplace_back(ring16Depths[0]);
303 else if (iring == 17)
304 depths.emplace_back(ring17Depths[0]);
305 else if (iring == 18)
306 depths.emplace_back(ring18Depths[0]);
310 float lastDepth =
depths[0];
315 if (layerDepths[
depth] > lastDepth && (iring != 16 ||
depth > 3)) {
317 lastDepth = layerDepths[
depth];
322 depths.emplace_back(HEZMAX);
327 for (
float ring16slhcDepth : ring16slhcDepths)
328 depths.emplace_back(ring16slhcDepth);
330 }
else if (iring == 17)
331 for (
float ring17slhcDepth : ring17slhcDepths)
332 depths.emplace_back(ring17slhcDepth);
333 else if (iring == 18)
334 for (
float ring18slhcDepth : ring18slhcDepths)
335 depths.emplace_back(ring18slhcDepth);
337 for (
float slhcDepth : slhcDepths)
338 depths.emplace_back(slhcDepth);
341 float etamin = etaBounds[iringm16];
342 float etamax = etaBounds[iringm16 + 1];
348 for (
unsigned int i = 0;
i <
depths.size(); ++
i)
352 for (
unsigned int idepth = 0; idepth <
ndepth; ++idepth) {
353 int depthIndex = (
int)(idepth + startingDepth);
356 if (depthIndex <= 7) {
358 std::cout <<
"HE Depth " << idepth <<
":" << depthIndex <<
" Z " <<
zmin <<
":" <<
zmax <<
"\n";
360 int stepPhi = (iring >=
topology.firstHEDoublePhiRing() ? 2 : 1);
364 std::cout <<
"HE iEta " << iring <<
" Depth " << depthIndex <<
" Eta " <<
etamin <<
":"
365 << etaBounds[iringm16 + 2] << std::endl;
386 const float HEZMIN_H2 = 400.715;
387 const float HEZMID_H2 = 436.285;
388 const float HEZMAX_H2 = 541.885;
414 std::vector<HcalHardcodeGeometryLoader::HECellParameters>
result;
416 for (
int i = 0;
i < nCells; ++
i)
423 const float HFZMIN1 = 1115.;
424 const float HFZMIN2 = 1137.;
425 const float HFZMAX = 1280.1;
456 std::vector<HcalHardcodeGeometryLoader::HFCellParameters>
result;
458 for (
int i = 0;
i < nCells; ++
i)
464 const std::vector<HcalHardcodeGeometryLoader::HECellParameters>& fCells) {
466 for (
const auto& param : fCells) {
467 for (
int iPhi = param.phiFirst; iPhi <=
MAX_HCAL_PHI; iPhi += param.phiStep) {
468 for (
int iside = -1; iside <= 1; iside += 2) {
471 float etaCenter = 0.5 * (param.etaMin + param.etaMax);
473 float perp = param.zMin / sinh(etaCenter);
476 float z = iside * param.zMin;
479 std::vector<CCGFloat> cellParams;
480 cellParams.reserve(5);
481 cellParams.emplace_back(0.5 * (param.etaMax - param.etaMin));
482 cellParams.emplace_back(0.5 * param.dphi *
DEGREE2RAD);
483 cellParams.emplace_back(-0.5 * (param.zMax - param.zMin) / tanh(etaCenter));
484 cellParams.emplace_back(fabs(refPoint.
eta()));
485 cellParams.emplace_back(fabs(refPoint.
z()));
487 std::cout <<
"HcalHardcodeGeometryLoader::fillHE-> " << hid << refPoint <<
'/' << cellParams[0] <<
'/'
488 << cellParams[1] <<
'/' << cellParams[2] << std::endl;
501 const std::vector<HcalHardcodeGeometryLoader::HFCellParameters>& fCells) {
503 for (
const auto& param : fCells) {
504 for (
int iPhi = param.phiFirst; iPhi <=
MAX_HCAL_PHI; iPhi += param.phiStep) {
505 for (
int iside = -1; iside <= 1; iside += 2) {
511 float oEta =
outer.eta();
512 float etaCenter = 0.5 * (
iEta + oEta);
514 float perp = param.zMin / sinh(etaCenter);
517 float z = iside * param.zMin;
520 std::vector<CCGFloat> cellParams;
521 cellParams.reserve(5);
522 cellParams.emplace_back(0.5 * (
iEta - oEta));
523 cellParams.emplace_back(0.5 * param.dphi *
DEGREE2RAD);
524 cellParams.emplace_back(0.5 * (param.zMax - param.zMin));
525 cellParams.emplace_back(fabs(refPoint.
eta()));
526 cellParams.emplace_back(fabs(refPoint.
z()));
528 std::cout <<
"HcalHardcodeGeometryLoader::fillHF-> " << hid << refPoint <<
'/' << cellParams[0] <<
'/'
529 << cellParams[1] <<
'/' << cellParams[2] << std::endl;