20 std::vector<float> fpar;
21 std::vector<float> gtran;
22 std::vector<float> grmat;
23 std::vector<float> fupar;
24 std::vector<double>::const_iterator it, endIt;
25 const std::vector<DetId>& detids(rig.
detIds());
27 for (
size_t idt = 0; idt < detids.size(); ++idt) {
30 int jring = detid.
ring();
34 for (it = rig.
shapeStart(idt); it != endIt; ++it) {
35 fpar.emplace_back((
float)(*it));
40 for (it = rig.
tranStart(idt); it != endIt; ++it) {
41 gtran.emplace_back((
float)(*it));
45 for (it = rig.
rotStart(idt); it != endIt; ++it) {
46 grmat.emplace_back((
float)(*it));
62 numfuPars = fu + 1 + size_t(cscpars.
pfupars[fu]);
68 <<
" in pfupars and go to " << numfuPars <<
"." << std::endl;
69 for (++fu; fu < numfuPars; ++fu) {
71 fupar.emplace_back(cscpars.
pfupars[fu]);
80 size_t numgrp = static_cast<size_t>(cscpars.
pfupars[fu]);
81 size_t maxFu = fu + 1 + numgrp;
83 for (; fu < maxFu; ++fu) {
87 for (; fu < maxFu; ++fu) {
113 buildChamber(theGeometry, detid, fpar, fupar, gtran, grmat, wg);
120 const std::vector<float>& fpar,
121 const std::vector<float>& fupar,
122 const std::vector<float>& gtran,
123 const std::vector<float>& grmat,
128 int jend = chamberId.
endcap();
129 int jstat = chamberId.
station();
130 int jring = chamberId.
ring();
132 int jlay = chamberId.
layer();
137 const size_t kNpar = 4;
138 if (fpar.size() != kNpar)
139 edm::LogError(
myName) <<
"Error, expected npar=" << kNpar <<
", found npar=" << fpar.size() << std::endl;
141 LogTrace(
myName) <<
myName <<
": E" << jend <<
" S" << jstat <<
" R" << jring <<
" C" << jch <<
" L" << jlay;
142 LogTrace(
myName) <<
myName <<
": npar=" << fpar.size() <<
" hB=" << fpar[0] <<
" hT=" << fpar[1] <<
" hD=" << fpar[2]
143 <<
" hH=" << fpar[3];
144 LogTrace(
myName) <<
myName <<
": gtran[0,1,2]=" << gtran[0] <<
" " << gtran[1] <<
" " << gtran[2];
145 LogTrace(
myName) <<
myName <<
": grmat[0-8]=" << grmat[0] <<
" " << grmat[1] <<
" " << grmat[2] <<
" " << grmat[3]
146 <<
" " << grmat[4] <<
" " << grmat[5] <<
" " << grmat[6] <<
" " << grmat[7] <<
" " << grmat[8];
147 LogTrace(
myName) <<
myName <<
": nupar=" << fupar.size() <<
" upar[0]=" << fupar[0] <<
" upar[" << fupar.size() - 1
148 <<
"]=" << fupar[fupar.size() - 1];
157 if (!fupar.empty() && aSpecs ==
nullptr) {
159 aSpecs = theGeometry.
buildSpecs(chamberType, fpar, fupar, wg);
160 }
else if (fupar.empty() && aSpecs ==
nullptr) {
162 <<
"SHOULD BE THROW? Error, wg and/or fupar size are 0 BUT this Chamber Spec has not been built!";
173 grmat[0], grmat[1], grmat[2], grmat[3], grmat[4], grmat[5], grmat[6], grmat[7], grmat[8]);
199 float frameThickness = fupar[31] / 10.;
200 float gapThickness = fupar[32] / 10.;
201 float panelThickness = fupar[33] / 10.;
202 float zAverageAGVtoAF = fupar[34] / 10.;
204 float layerThickness = gapThickness;
205 float layerSeparation = gapThickness + panelThickness;
207 float chamberThickness = 7. * panelThickness + 6. * gapThickness + 2. * frameThickness;
208 float hChamberThickness = chamberThickness / 2.;
237 LogTrace(
myName) <<
myName <<
": Create chamber E" << jend <<
" S" << jstat <<
" R" << jring <<
" C" << jch
238 <<
" z=" << gtran[2] <<
" t/2=" << fpar[2] <<
" (DDD) or " << hChamberThickness
247 int localZwrtGlobalZ = +1;
248 if ((jend == 1 && jstat < 3) || (jend == 2 && jstat > 2))
249 localZwrtGlobalZ = -1;
254 LogTrace(
myName) <<
myName <<
": layerSeparation=" << layerSeparation <<
", zAF-zAverageAGV=" << zAverageAGVtoAF
255 <<
", localZwrtGlobalZ=" << localZwrtGlobalZ <<
", gtran[2]=" << gtran[2];
257 for (
short j = 1;
j <= 6; ++
j) {
261 const CSCLayer* cLayer = dynamic_cast<const CSCLayer*>(theGeometry.
idToDet(layerId));
263 if (cLayer ==
nullptr) {
271 float zlayer = gtran[2] - globalZ * zAverageAGVtoAF + localZwrtGlobalZ * (3.5 -
j) * layerSeparation;
275 std::array<const float, 4>
const& dims =
geom->parameters();
282 LogTrace(
myName) <<
myName <<
": Create layer E" << jend <<
" S" << jstat <<
" R" << jring <<
" C" << jch
283 <<
" L" <<
j <<
" z=" << zlayer <<
" t=" << layerThickness <<
" or "
284 <<
layer->surface().bounds().thickness() <<
" adr=" <<
layer <<
" layerGeom adr=" <<
geom;
290 <<
" already exists: layer address=" << cLayer <<
" chamber address=" <<
chamber <<
"\n";