22 #include <unordered_set>
52 std::map<int, HGCalGeomParameters::layerParameters>
layers;
53 std::vector<HGCalParameters::hgtrform> trforms;
54 std::vector<bool> trformUse;
61 int lay = (nsiz > 0) ?
copy[nsiz - 1] : 0;
62 int zp = (nsiz > 2) ?
copy[nsiz - 3] : -1;
66 throw cms::Exception(
"DDException") <<
"Funny layer # " << lay <<
" zp " << zp <<
" in " << nsiz <<
" components";
69 php.
layer_.emplace_back(lay);
72 double rin(0), rout(0);
75 const DDPolyhedra& polyhedra = static_cast<DDPolyhedra>(sol);
76 const std::vector<double>& rmin = polyhedra.
rMinVec();
77 const std::vector<double>& rmax = polyhedra.
rMaxVec();
81 const DDTubs& tube = static_cast<DDTubs>(sol);
90 const CLHEP::HepRep3x3
rotation(
x.X(),
y.X(),
z.X(),
x.Y(),
y.Y(),
z.Y(),
x.Z(),
y.Z(),
z.Z());
91 const CLHEP::HepRotation hr(
rotation);
99 const CLHEP::Hep3Vector h3v(
xx,
yy,
zz);
107 trforms.emplace_back(mytrf);
108 trformUse.emplace_back(
false);
117 std::unordered_map<int32_t, int32_t> copies;
119 std::vector<int32_t> wafer2copy;
120 std::vector<HGCalGeomParameters::cellParameters> wafers;
122 DDValue val1(attribute, sdTag2, 0.0);
127 throw cms::Exception(
"DDException") <<
"Attribute " << val1 <<
" not found but needed.";
130 std::unordered_set<std::string>
names;
136 int wafer = (nsiz > 0) ?
copy[nsiz - 1] : 0;
137 int layer = (nsiz > 1) ?
copy[nsiz - 2] : 0;
139 throw cms::Exception(
"DDException") <<
"Funny wafer # " << wafer <<
" in " << nsiz <<
" components";
140 }
else if (layer > (
int)(
layers.size())) {
141 edm::LogWarning(
"HGCalGeom") <<
"Funny wafer # " << wafer <<
" Layer " << layer <<
":" <<
layers.size()
142 <<
" among " << nsiz <<
" components";
144 auto itr = copies.find(wafer);
145 auto cpy = copiesInLayers[layer].find(wafer);
146 if (
itr != copies.end() && cpy == copiesInLayers[layer].end()) {
147 copiesInLayers[layer][wafer] =
itr->second;
149 if (
itr == copies.end()) {
150 copies[wafer] = wafer2copy.size();
151 copiesInLayers[layer][wafer] = wafer2copy.size();
158 wafer2copy.emplace_back(wafer);
161 wafers.emplace_back(cell);
163 std::vector<double> zv, rv;
165 const DDPolyhedra& polyhedra = static_cast<DDPolyhedra>(sol);
166 zv = polyhedra.
zVec();
198 std::map<int, int> wafertype;
199 std::map<int, HGCalGeomParameters::cellParameters> cellsf, cellsc;
200 DDValue val2(attribute, sdTag3, 0.0);
205 throw cms::Exception(
"DDException") <<
"Attribute " << val2 <<
" not found but needed.";
213 int cellx = (nsiz > 0) ?
copy[nsiz - 1] : 0;
214 int wafer = (nsiz > 1) ?
copy[nsiz - 2] : 0;
215 int cell = cellx % 1000;
216 int type = cellx / 1000;
219 <<
"Funny cell # " << cell <<
" type " <<
type <<
" in " << nsiz <<
" components";
221 auto ktr = wafertype.find(wafer);
222 if (ktr == wafertype.end())
223 wafertype[wafer] =
type;
225 std::map<int, HGCalGeomParameters::cellParameters>::iterator
itr;
228 itr = cellsf.find(cell);
229 newc = (
itr == cellsf.end());
231 itr = cellsc.find(cell);
232 newc = (
itr == cellsc.end());
236 bool half = (
name.find(
"Half") != std::string::npos);
249 edm::LogVerbatim(
"HGCalGeom") <<
"Wafer " << wafer <<
" Type " <<
type <<
" Cell " << cellx <<
" local "
250 <<
xx <<
":" <<
yy <<
" new " <<
p1 <<
":" <<
p2;
266 layers, trforms, trformUse, copies, copiesInLayers, wafer2copy, wafers, wafertype, cellsf, cellsc, php);
277 std::map<int, HGCalGeomParameters::layerParameters>
layers;
278 std::vector<HGCalParameters::hgtrform> trforms;
279 std::vector<bool> trformUse;
280 std::vector<std::pair<int, int> > trused;
283 const std::vector<double>& pars = fv.
parameters();
287 int lay = (nsiz > 0) ?
copy[0] : 0;
288 int zp = (nsiz > 2) ?
copy[2] : -1;
292 throw cms::Exception(
"DDException") <<
"Funny layer # " << lay <<
" zp " << zp <<
" in " << nsiz <<
" components";
295 php.
layer_.emplace_back(lay);
299 double rin(0), rout(0);
311 std::pair<int, int> layz(lay, zp);
312 if (
std::find(trused.begin(), trused.end(), layz) == trused.end()) {
313 trused.emplace_back(layz);
316 const CLHEP::HepRep3x3
rotation(
x.X(),
y.X(),
z.X(),
x.Y(),
y.Y(),
z.Y(),
x.Z(),
y.Z(),
z.Z());
317 const CLHEP::HepRotation hr(
rotation);
325 const CLHEP::Hep3Vector h3v(
xx,
yy,
zz);
333 trforms.emplace_back(mytrf);
334 trformUse.emplace_back(
false);
343 std::unordered_map<int32_t, int32_t> copies;
345 std::vector<int32_t> wafer2copy;
346 std::vector<HGCalGeomParameters::cellParameters> wafers;
351 throw cms::Exception(
"DDException") <<
"Attribute " << sdTag2 <<
" not found but needed.";
354 std::unordered_set<std::string>
names;
359 int wafer = (nsiz > 0) ?
copy[0] : 0;
360 int layer = (nsiz > 1) ?
copy[1] : 0;
362 throw cms::Exception(
"DDException") <<
"Funny wafer # " << wafer <<
" in " << nsiz <<
" components";
363 }
else if (layer > (
int)(
layers.size())) {
364 edm::LogWarning(
"HGCalGeom") <<
"Funny wafer # " << wafer <<
" Layer " << layer <<
":" <<
layers.size()
365 <<
" among " << nsiz <<
" components";
367 auto itr = copies.find(wafer);
368 auto cpy = copiesInLayers[layer].find(wafer);
369 if (
itr != copies.end() && cpy == copiesInLayers[layer].end()) {
370 copiesInLayers[layer][wafer] =
itr->second;
372 if (
itr == copies.end()) {
373 copies[wafer] = wafer2copy.size();
374 copiesInLayers[layer][wafer] = wafer2copy.size();
381 wafer2copy.emplace_back(wafer);
384 wafers.emplace_back(cell);
387 const std::vector<double>& pars = fv1.
parameters();
422 std::map<int, int> wafertype;
423 std::map<int, HGCalGeomParameters::cellParameters> cellsf, cellsc;
428 throw cms::Exception(
"DDException") <<
"Attribute " << sdTag3 <<
" not found but needed.";
435 int cellx = (nsiz > 0) ?
copy[0] : 0;
436 int wafer = (nsiz > 1) ?
copy[1] : 0;
437 int cell = cellx % 1000;
438 int type = cellx / 1000;
441 <<
"Funny cell # " << cell <<
" type " <<
type <<
" in " << nsiz <<
" components";
443 auto ktr = wafertype.find(wafer);
444 if (ktr == wafertype.end())
445 wafertype[wafer] =
type;
447 std::map<int, HGCalGeomParameters::cellParameters>::iterator
itr;
450 itr = cellsf.find(cell);
451 newc = (
itr == cellsf.end());
453 itr = cellsc.find(cell);
454 newc = (
itr == cellsc.end());
458 bool half = (
name.find(
"Half") != std::string::npos);
471 edm::LogVerbatim(
"HGCalGeom") <<
"Wafer " << wafer <<
" Type " <<
type <<
" Cell " << cellx <<
" local "
472 <<
xx <<
":" <<
yy <<
" new " <<
p1 <<
":" <<
p2;
488 layers, trforms, trformUse, copies, copiesInLayers, wafer2copy, wafers, wafertype, cellsf, cellsc, php);
492 std::vector<HGCalParameters::hgtrform>& trforms,
493 std::vector<bool>& trformUse,
494 const std::unordered_map<int32_t, int32_t>& copies,
496 const std::vector<int32_t>& wafer2copy,
497 const std::vector<HGCalGeomParameters::cellParameters>& wafers,
498 const std::map<int, int>& wafertype,
499 const std::map<int, HGCalGeomParameters::cellParameters>& cellsf,
500 const std::map<int, HGCalGeomParameters::cellParameters>& cellsc,
502 if (((cellsf.size() + cellsc.size()) == 0) || (wafers.empty()) || (
layers.empty())) {
503 throw cms::Exception(
"DDException") <<
"HGCalGeomParameters: mismatch between geometry and specpar: cells "
504 << cellsf.size() <<
":" << cellsc.size() <<
" wafers " << wafers.size()
505 <<
" layers " <<
layers.size();
508 for (
unsigned int i = 0;
i <
layers.size(); ++
i) {
509 for (
auto& layer :
layers) {
514 php.
zLayerHex_.emplace_back(layer.second.zpos);
520 for (
unsigned int i = 0;
i < php.
layer_.size(); ++
i) {
521 for (
unsigned int i1 = 0;
i1 < trforms.size(); ++
i1) {
522 if (!trformUse[
i1] && php.
layerGroup_[trforms[
i1].lay - 1] == (
int)(
i + 1)) {
524 trforms[
i1].lay = (
i + 1);
525 trformUse[
i1] =
true;
528 for (
unsigned int i2 =
i1 + 1;
i2 < trforms.size(); ++
i2) {
529 if (!trformUse[
i2] && trforms[
i2].zp == trforms[
i1].zp &&
533 trformUse[
i2] =
true;
544 for (
unsigned i = 0;
i < wafer2copy.size(); ++
i) {
548 auto ktr = wafertype.find(wafer2copy[
i]);
549 int typet = (ktr == wafertype.end()) ? 0 : (ktr->second);
551 double r = wafers[
i].xyz.perp();
553 for (
int k = 1;
k < 4; ++
k) {
564 std::vector<HGCalGeomParameters::cellParameters>::const_iterator itrf = wafers.end();
565 for (
unsigned int i = 0;
i < cellsf.size(); ++
i) {
566 auto itr = cellsf.find(
i);
567 if (
itr == cellsf.end()) {
568 throw cms::Exception(
"DDException") <<
"HGCalGeomParameters: missing info for fine cell number " <<
i;
570 double xx = (
itr->second).xyz.x();
571 double yy = (
itr->second).xyz.y();
572 int waf = (
itr->second).wafer;
580 for (
unsigned int i = 0;
i < cellsc.size(); ++
i) {
581 auto itr = cellsc.find(
i);
582 if (
itr == cellsc.end()) {
583 throw cms::Exception(
"DDException") <<
"HGCalGeomParameters: missing info for coarse cell number " <<
i;
585 double xx = (
itr->second).xyz.x();
586 double yy = (
itr->second).xyz.y();
587 int waf = (
itr->second).wafer;
600 php.
depth_.emplace_back(
i + 1);
640 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalGeomParameters: wafer radius " << php.
waferR_ <<
" and dimensions of the "
654 <<
" coarse cells in a wafer";
673 for (std::unordered_map<int, int>::const_iterator
itr = theModules.begin();
itr != theModules.end(); ++
itr, ++k2) {
683 std::map<int, HGCalGeomParameters::layerParameters>
layers;
695 if (nsiz < levelTop) {
696 int lay =
copy[nsiz - 1];
703 <<
" lay " << lay <<
" z " <<
zside;
707 <<
"Funny layer # " << lay <<
" zp " <<
zside <<
" in " << nsiz <<
" components";
710 php.
layer_.emplace_back(lay);
713 const DDTubs& tube = static_cast<DDTubs>(sol);
720 if (trforms.find(std::make_pair(lay,
zside)) == trforms.end()) {
723 const CLHEP::HepRep3x3
rotation(
x.X(),
y.X(),
z.X(),
x.Y(),
y.Y(),
z.Y(),
x.Z(),
y.Z(),
z.Z());
724 const CLHEP::HepRotation hr(
rotation);
739 trforms[std::make_pair(lay,
zside)] = mytrf;
757 std::map<int, HGCalGeomParameters::layerParameters>
layers;
769 int nsiz = static_cast<int>(
copy.size());
770 if (nsiz < levelTop) {
777 <<
" size " << nsiz <<
":" << levelTop <<
" lay " << lay <<
" z " <<
zside <<
":"
782 <<
"Funny layer # " << lay <<
" zp " <<
zside <<
" in " << nsiz <<
" components";
785 php.
layer_.emplace_back(lay);
788 const std::vector<double>& pars = fv.
parameters();
795 if (trforms.find(std::make_pair(lay,
zside)) == trforms.end()) {
798 const CLHEP::HepRep3x3
rotation(
x.X(),
y.X(),
z.X(),
x.Y(),
y.Y(),
z.Y(),
x.Z(),
y.Z(),
z.Z());
799 const CLHEP::HepRotation hr(
rotation);
814 trforms[std::make_pair(lay,
zside)] = mytrf;
827 const int& firstLayer,
829 double rmin(0), rmax(0);
830 for (
unsigned int i = 0;
i <
layers.size(); ++
i) {
831 for (
auto& layer :
layers) {
832 if (layer.first == (
int)(
i + firstLayer)) {
836 php.
zLayerHex_.emplace_back(layer.second.zpos);
838 rmin = layer.second.rmin;
839 rmax = layer.second.rmax;
841 if (rmin > layer.second.rmin)
842 rmin = layer.second.rmin;
843 if (rmax < layer.second.rmax)
844 rmax = layer.second.rmax;
850 php.
rLimit_.emplace_back(rmin);
851 php.
rLimit_.emplace_back(rmax);
856 for (
unsigned int i = 0;
i < php.
layer_.size(); ++
i) {
857 for (
auto& trform : trforms) {
858 if (trform.first.first == (
int)(
i + firstLayer)) {
931 php.
boundR_ = fv.
get<std::vector<double> >(sdTag4,
"RadiusBound");
933 php.
rLimit_ = fv.
get<std::vector<double> >(sdTag4,
"RadiusLimits");
941 php.
slopeMin_ = fv.
get<std::vector<double> >(sdTag4,
"Slope");
946 const auto&
dummy = fv.
get<std::vector<double> >(sdTag2,
"WaferSize");
950 php.
cellSize_ = fv.
get<std::vector<double> >(sdTag3,
"CellSize");
959 <<
" for cell grouping " << php.
boundR_[0] <<
":" << php.
boundR_[1] <<
":"
964 <<
"for the 3 ranges:";
1037 const auto&
dummy = fv.
get<std::vector<double> >(sdTag1,
"RadiusCuts");
1038 if (
dummy.size() > 3) {
1047 php.
slopeMin_ = fv.
get<std::vector<double> >(sdTag1,
"SlopeBottom");
1048 php.
zFrontMin_ = fv.
get<std::vector<double> >(sdTag1,
"ZFrontBottom");
1050 php.
rMinFront_ = fv.
get<std::vector<double> >(sdTag1,
"RMinFront");
1053 php.
slopeTop_ = fv.
get<std::vector<double> >(sdTag1,
"SlopeTop");
1054 php.
zFrontTop_ = fv.
get<std::vector<double> >(sdTag1,
"ZFrontTop");
1056 php.
rMaxFront_ = fv.
get<std::vector<double> >(sdTag1,
"RMaxFront");
1059 for (
unsigned int k = 0;
k < kmax; ++
k)
1062 const auto& dummy2 = fv.
get<std::vector<double> >(sdTag1,
"LayerOffset");
1063 if (!dummy2.empty()) {
1069 for (
auto const& it : vmap) {
1071 for (
const auto&
i : it.second)
1074 for (
const auto&
i : it.second)
1077 for (
const auto&
i : it.second)
1084 for (
auto const& it : vmap) {
1086 for (
const auto&
i : it.second)
1089 for (
const auto&
i : it.second)
1092 for (
const auto&
i : it.second)
1095 for (
const auto&
i : it.second)
1100 for (
auto const& it : vmap) {
1102 for (
const auto&
i : it.second)
1105 for (
const auto&
i : it.second)
1108 for (
const auto&
i : it.second)
1111 for (
const auto&
i : it.second)
1125 <<
"parameters for 120 to 200 micron "
1130 <<
"parameters for 200 to 300 micron "
1228 for (
auto const& it : vmap) {
1230 for (
const auto&
i : it.second)
1233 for (
const auto&
i : it.second)
1236 for (
const auto&
i : it.second)
1243 php.
rMinLayerBH_ = fv.
get<std::vector<double> >(sdTag1,
"RMinLayerBH");
1250 php.
slopeMin_ = fv.
get<std::vector<double> >(sdTag1,
"SlopeBottom");
1251 php.
zFrontMin_ = fv.
get<std::vector<double> >(sdTag1,
"ZFrontBottom");
1253 php.
rMinFront_ = fv.
get<std::vector<double> >(sdTag1,
"RMinFront");
1256 php.
slopeTop_ = fv.
get<std::vector<double> >(sdTag1,
"SlopeTop");
1257 php.
zFrontTop_ = fv.
get<std::vector<double> >(sdTag1,
"ZFrontTop");
1259 php.
rMaxFront_ = fv.
get<std::vector<double> >(sdTag1,
"RMaxFront");
1262 for (
unsigned int k = 0;
k < kmax; ++
k)
1265 const auto& dummy2 = fv.
get<std::vector<double> >(sdTag1,
"LayerOffset");
1270 for (
auto const& it : vmap) {
1272 for (
const auto&
i : it.second)
1275 for (
const auto&
i : it.second)
1278 for (
const auto&
i : it.second)
1281 for (
const auto&
i : it.second)
1284 for (
const auto&
i : it.second)
1287 for (
const auto&
i : it.second)
1290 for (
const auto&
i : it.second)
1293 for (
const auto&
i : it.second)
1296 for (
const auto&
i : it.second)
1299 for (
const auto&
i : it.second)
1302 for (
const auto&
i : it.second)
1382 edm::LogVerbatim(
"HGCalGeom") <<
"Input waferWidth " << waferW <<
":" << rmin <<
" R Limits: " << rin <<
":" << rout
1383 <<
" Fine " << rMaxFine;
1391 double dx = 0.5 * waferW;
1392 double dy = 3.0 *
dx *
tan(30._deg);
1393 double rr = 2.0 *
dx *
tan(30._deg);
1394 int ncol = (
int)(2.0 * rout / waferW) + 1;
1395 int nrow = (
int)(rout / (waferW *
tan(30._deg))) + 1;
1396 int ns2 = (2 * ncol + 1) * (2 * nrow + 1) * php.
layer_.size();
1397 int incm(0), inrm(0), kount(0), ntot(0);
1403 for (
int nr = -nrow;
nr <= nrow; ++
nr) {
1404 int inr = (
nr >= 0) ?
nr : -
nr;
1405 for (
int nc = -ncol; nc <= ncol; ++nc) {
1406 int inc = (nc >= 0) ? nc : -nc;
1407 if (inr % 2 == inc % 2) {
1408 double xpos = nc *
dx;
1409 double ypos =
nr *
dy;
1411 double rpos =
std::sqrt(xpos * xpos + ypos * ypos);
1412 int typet = (rpos < rMaxFine) ? 1 : 2;
1414 for (
int k = 1;
k < 4; ++
k) {
1415 if ((rpos + rmin) <= php.
boundR_[
k]) {
1422 int copy = inr * 100 + inc;
1433 edm::LogVerbatim(
"HGCalGeom") << kount <<
":" << ntot <<
" Copy " <<
copy <<
" Type " << typel <<
":" << typet
1434 <<
" Location " <<
corner.first <<
" Position " << xpos <<
":" << ypos
1435 <<
" Layers " << php.
layer_.size();
1442 for (
unsigned int il = 0; il < php.
layer_.size(); ++il) {
1443 std::pair<int, int>
corner =
1446 auto cpy = copiesInLayers[php.
layer_[il]].find(
copy);
1447 if (cpy == copiesInLayers[php.
layer_[il]].end())
1465 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalWaferHexagon: # of columns " << incm <<
" # of rows " << inrm <<
" and "
1466 << kount <<
":" << ntot <<
" wafers; R " << rin <<
":" << rout;
1468 for (
unsigned int k = 0;
k < copiesInLayers.size(); ++
k) {
1469 const auto& theModules = copiesInLayers[
k];
1472 for (std::unordered_map<int, int>::const_iterator
itr = theModules.begin();
itr != theModules.end(); ++
itr, ++k2) {
1492 edm::LogVerbatim(
"HGCalGeom") <<
"Input waferWidth " << waferW <<
":" << waferS <<
" R Max: " << rout;
1500 double r = 0.5 * (waferW + waferS);
1502 double dy = 0.75 *
R;
1503 double r1 = 0.5 * waferW;
1505 int N = (
r == 0) ? 3 : ((
int)(0.5 * rout /
r) + 3);
1506 int ns1 = (2 *
N + 1) * (2 *
N + 1);
1509 edm::LogVerbatim(
"HGCalGeom") <<
"wafer " << waferW <<
":" << waferS <<
" r " <<
r <<
" dy " <<
dy <<
" N " <<
N
1510 <<
" sizes " << ns1 <<
":" << ns2;
1511 std::vector<int> indtypes(ns1 + 1);
1517 int ipos(0), lpos(0), uvmax(0);
1518 std::vector<int> uvmx(php.
zLayerHex_.size(), 0);
1519 for (
int v = -
N;
v <=
N; ++
v) {
1520 for (
int u = -
N; u <=
N; ++u) {
1522 int nc = -2 * u +
v;
1523 double xpos = nc *
r;
1524 double ypos =
nr *
dy;
1529 wafersInLayers[indx] = ipos;
1539 double xpos0 = xpos + xyoff.first;
1540 double ypos0 = ypos + xyoff.second;
1547 typesInLayers[kndx] = lpos;
1550 indtypes.emplace_back(kndx);
1552 std::pair<int, int>
corner =
1557 <<
" u " << u <<
" v " <<
v <<
" with " <<
corner.first <<
" corners";
1565 edm::LogVerbatim(
"HGCalGeom") <<
"Layer " << lay <<
" u|v " << u <<
":" <<
v <<
" with corner "
1572 waferTypes[
wl] = corner0;
1575 <<
"Layer " << lay <<
" u|v " << u <<
":" <<
v <<
" Index " << std::hex <<
wl <<
std::dec <<
" pos "
1576 << xpos0 <<
":" << ypos0 <<
" R " <<
r1 <<
":" << R1 <<
" Range " << php.
rMinLayHex_[
i] <<
":"
1578 <<
corner.second <<
" croner0 " << corner0.first <<
":" << corner0.second;
1583 edm::LogVerbatim(
"HGCalGeom") <<
"Layer " << lay <<
" u|v " << u <<
":" <<
v <<
" with corner "
1628 int id = indtypes[
k];
1649 << xyoff.first <<
":" << xyoff.second;
1670 for (
auto const& it : vmap) {
1672 for (
const auto&
i : it.second)
1675 for (
const auto&
i : it.second)
1686 for (
unsigned int k = 0;
k < php.
cellFine_.size(); ++
k)
1708 for (
unsigned k = 0;
k < 2; ++
k) {
1718 <<
"\n[0] new R = " << rv <<
" Eta = " <<
eta;
1735 std::vector<double>::iterator
low,
high;
1752 edm::LogVerbatim(
"HGCalGeom") <<
"Modified irlow " << irlow <<
" dr " << drlow;
1771 edm::LogVerbatim(
"HGCalGeom") <<
"Modified irhigh " << irhigh <<
" dr " << drhigh;
1777 edm::LogVerbatim(
"HGcalGeom") <<
"Layer " <<
k <<
" Type " <<
kk <<
" Low edge " << irlow <<
":" << drlow
1778 <<
" Top edge " << irhigh <<
":" << drhigh;
1801 mytr.
h = 0.5 * (rmax - rmin);
1830 const std::vector<double>& fvec =
value.doubles();
1831 int nval = fvec.size();
1835 <<
"HGCalGeomParameters: # of " <<
str <<
" bins " << nval <<
" < " << nmin <<
" ==> illegal";
1838 if (nval < 1 && nmin == 0) {
1840 <<
"HGCalGeomParameters: # of " <<
str <<
" bins " << nval <<
" < 1 ==> illegal"
1841 <<
" (nmin=" << nmin <<
")";
1847 throw cms::Exception(
"DDException") <<
"HGCalGeomParameters: cannot get array " <<
str;
1849 std::vector<double> fvec;
1855 const std::vector<HGCalGeomParameters::cellParameters>& wafers,
1856 std::vector<HGCalGeomParameters::cellParameters>::const_iterator& itrf,
1860 if (itrf == wafers.end()) {
1861 for (std::vector<HGCalGeomParameters::cellParameters>::const_iterator
itr = wafers.begin();
itr != wafers.end();
1863 if (
itr->wafer == wafer) {
1869 double dx(0),
dy(0);
1870 if (itrf != wafers.end()) {
1871 dx = (
xx - itrf->xyz.x());
1874 dy = (
yy - itrf->xyz.y());
1878 return std::make_pair(
dx,
dy);
1882 std::for_each(
v.begin(),
v.end(), [
s](
double&
n) {
n *=
s; });