CMS 3D CMS Logo

DDEcalEndcapAlgo.cc
Go to the documentation of this file.
1 #include "DD4hep/DetFactoryHelper.h"
6 // Header files for endcap supercrystal geometry
8 #include <CLHEP/Geometry/Transform3D.h>
9 
10 #include <string>
11 #include <vector>
12 
13 using namespace angle_units::operators;
14 
15 using DDTranslation = ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double> >;
16 using DDRotation = ROOT::Math::Rotation3D;
17 
18 //#define EDM_ML_DEBUG
19 
20 namespace {
21  struct Endcap {
22  std::string mat;
23  double zOff;
24 
25  std::string quaName;
26  std::string quaMat;
27 
28  std::string crysMat;
29  std::string wallMat;
30 
31  double crysLength;
32  double crysRear;
33  double crysFront;
34  double sCELength;
35  double sCERear;
36  double sCEFront;
37  double sCALength;
38  double sCARear;
39  double sCAFront;
40  double sCAWall;
41  double sCHLength;
42  double sCHSide;
43 
44  double nSCTypes;
45  std::vector<double> vecEESCProf;
46  double nColumns;
47  std::vector<double> vecEEShape;
48  double nSCCutaway;
49  std::vector<double> vecEESCCutaway;
50  double nSCquad;
51  std::vector<double> vecEESCCtrs;
52  double nCRSC;
53  std::vector<double> vecEECRCtrs;
54 
55  std::array<double, 3> cutParms;
56  std::string cutBoxName;
57 
58  std::string envName;
59  std::string alvName;
60  std::string intName;
61  std::string cryName;
62 
63  DDTranslation cryFCtr[5][5];
64  DDTranslation cryRCtr[5][5];
65  DDTranslation scrFCtr[10][10];
66  DDTranslation scrRCtr[10][10];
67 
68  double pFHalf;
69  double pFFifth;
70  double pF45;
71 
72  std::vector<double> vecEESCLims;
73 
74  double iLength;
75  double iXYOff;
76  double cryZOff;
77  double zFront;
78  };
79 
80  const DDRotation& myrot(cms::DDNamespace& ns, const std::string& nam, const DDRotation& r) {
81  ns.addRotation(nam, r);
82  return ns.rotation(ns.prepend(nam));
83  }
84 
85  std::string_view mynamespace(std::string_view input) {
86  std::string_view v = input;
87  auto trim_pos = v.find(':');
88  if (trim_pos != v.npos)
89  v.remove_suffix(v.size() - (trim_pos + 1));
90  return v;
91  }
92 } // namespace
93 
94 static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext& ctxt, xml_h e) {
95  BenchmarkGrd counter("DDEcalEndcapAlgo");
96  cms::DDNamespace ns(ctxt, e, true);
98 
99  // TRICK!
100  std::string myns{mynamespace(args.parentName()).data(), mynamespace(args.parentName()).size()};
101 
102  Endcap ee;
103  ee.mat = args.str("EEMat");
104  ee.zOff = args.dble("EEzOff");
105 
106  ee.quaName = args.str("EEQuaName");
107  ee.quaMat = args.str("EEQuaMat");
108  ee.crysMat = args.str("EECrysMat");
109  ee.wallMat = args.str("EEWallMat");
110  ee.crysLength = args.dble("EECrysLength");
111  ee.crysRear = args.dble("EECrysRear");
112  ee.crysFront = args.dble("EECrysFront");
113  ee.sCELength = args.dble("EESCELength");
114  ee.sCERear = args.dble("EESCERear");
115  ee.sCEFront = args.dble("EESCEFront");
116  ee.sCALength = args.dble("EESCALength");
117  ee.sCARear = args.dble("EESCARear");
118  ee.sCAFront = args.dble("EESCAFront");
119  ee.sCAWall = args.dble("EESCAWall");
120  ee.sCHLength = args.dble("EESCHLength");
121  ee.sCHSide = args.dble("EESCHSide");
122  ee.nSCTypes = args.dble("EEnSCTypes");
123  ee.nColumns = args.dble("EEnColumns");
124  ee.nSCCutaway = args.dble("EEnSCCutaway");
125  ee.nSCquad = args.dble("EEnSCquad");
126  ee.nCRSC = args.dble("EEnCRSC");
127  ee.vecEESCProf = args.vecDble("EESCProf");
128  ee.vecEEShape = args.vecDble("EEShape");
129  ee.vecEESCCutaway = args.vecDble("EESCCutaway");
130  ee.vecEESCCtrs = args.vecDble("EESCCtrs");
131  ee.vecEECRCtrs = args.vecDble("EECRCtrs");
132 
133  ee.cutBoxName = args.str("EECutBoxName");
134 
135  ee.envName = args.str("EEEnvName");
136  ee.alvName = args.str("EEAlvName");
137  ee.intName = args.str("EEIntName");
138  ee.cryName = args.str("EECryName");
139 
140  ee.pFHalf = args.dble("EEPFHalf");
141  ee.pFFifth = args.dble("EEPFFifth");
142  ee.pF45 = args.dble("EEPF45");
143 
144  ee.vecEESCLims = args.vecDble("EESCLims");
145  ee.iLength = args.dble("EEiLength");
146  ee.iXYOff = args.dble("EEiXYOff");
147  ee.cryZOff = args.dble("EECryZOff");
148  ee.zFront = args.dble("EEzFront");
149 
150  // Position supercrystals in EE Quadrant
151 
152  //********************************* cutbox for trimming edge SCs
153  const double cutWid(ee.sCERear / sqrt(2.));
154  ee.cutParms[0] = cutWid;
155  ee.cutParms[1] = cutWid;
156  ee.cutParms[2] = ee.sCELength / sqrt(2.);
157  dd4hep::Solid eeCutBox = dd4hep::Box(ee.cutBoxName, ee.cutParms[0], ee.cutParms[1], ee.cutParms[2]);
158  //**************************************************************
159 
160  const double zFix(ee.zFront - 3172 * dd4hep::mm); // fix for changing z offset
161 
162  //** fill supercrystal front and rear center positions from xml input
163  for (unsigned int iC(0); iC != (unsigned int)ee.nSCquad; ++iC) {
164  const unsigned int iOff(8 * iC);
165  const unsigned int ix((unsigned int)ee.vecEESCCtrs[iOff + 0]);
166  const unsigned int iy((unsigned int)ee.vecEESCCtrs[iOff + 1]);
167 
168  assert(ix > 0 && ix < 11 && iy > 0 && iy < 11);
169 
170  ee.scrFCtr[ix - 1][iy - 1] =
171  DDTranslation(ee.vecEESCCtrs[iOff + 2], ee.vecEESCCtrs[iOff + 4], ee.vecEESCCtrs[iOff + 6] + zFix);
172 
173  ee.scrRCtr[ix - 1][iy - 1] =
174  DDTranslation(ee.vecEESCCtrs[iOff + 3], ee.vecEESCCtrs[iOff + 5], ee.vecEESCCtrs[iOff + 7] + zFix);
175  }
176 
177  //** fill crystal front and rear center positions from xml input
178  for (unsigned int iC(0); iC != 25; ++iC) {
179  const unsigned int iOff(8 * iC);
180  const unsigned int ix((unsigned int)ee.vecEECRCtrs[iOff + 0]);
181  const unsigned int iy((unsigned int)ee.vecEECRCtrs[iOff + 1]);
182 
183  assert(ix > 0 && ix < 6 && iy > 0 && iy < 6);
184 
185  ee.cryFCtr[ix - 1][iy - 1] =
186  DDTranslation(ee.vecEECRCtrs[iOff + 2], ee.vecEECRCtrs[iOff + 4], ee.vecEECRCtrs[iOff + 6]);
187 
188  ee.cryRCtr[ix - 1][iy - 1] =
189  DDTranslation(ee.vecEECRCtrs[iOff + 3], ee.vecEECRCtrs[iOff + 5], ee.vecEECRCtrs[iOff + 7]);
190  }
191 
192  dd4hep::Solid eeCRSolid = dd4hep::Trap(ee.cryName,
193  0.5 * ee.crysLength,
194  atan((ee.crysRear - ee.crysFront) / (sqrt(2.) * ee.crysLength)),
195  45._deg,
196  0.5 * ee.crysFront,
197  0.5 * ee.crysFront,
198  0.5 * ee.crysFront,
199  0._deg,
200  0.5 * ee.crysRear,
201  0.5 * ee.crysRear,
202  0.5 * ee.crysRear,
203  0._deg);
204 #ifdef EDM_ML_DEBUG
205  edm::LogVerbatim("EcalGeom") << eeCRSolid.name() << " Trap with parameters: " << cms::convert2mm(0.5 * ee.crysLength)
206  << ":" << (atan((ee.crysRear - ee.crysFront) / (sqrt(2.) * ee.crysLength))) << ":"
207  << 45._deg << ":" << cms::convert2mm(0.5 * ee.crysFront) << ":"
208  << cms::convert2mm(0.5 * ee.crysFront) << ":" << cms::convert2mm(0.5 * ee.crysFront)
209  << ":" << 0._deg << ":" << cms::convert2mm(0.5 * ee.crysRear) << ":"
210  << cms::convert2mm(0.5 * ee.crysRear) << ":" << cms::convert2mm(0.5 * ee.crysRear) << ":"
211  << 0._deg;
212 #endif
213  dd4hep::Volume eeCRLog = dd4hep::Volume(myns + ee.cryName, eeCRSolid, ns.material(ee.crysMat));
214 
215  for (unsigned int isc(0); isc < ee.nSCTypes; ++isc) {
216  unsigned int iSCType = isc + 1;
217  const std::string anum(std::to_string(iSCType));
218  const double eFront(0.5 * ee.sCEFront);
219  const double eRear(0.5 * ee.sCERear);
220  const double eAng(atan((ee.sCERear - ee.sCEFront) / (sqrt(2.) * ee.sCELength)));
221  const double ffived(45_deg);
222  const double zerod(0_deg);
223  std::string eeSCEnvName(1 == iSCType ? ee.envName + std::to_string(iSCType)
224  : (ee.envName + std::to_string(iSCType) + "Tmp"));
225  dd4hep::Solid eeSCEnv = ns.addSolidNS(
226  eeSCEnvName,
227  dd4hep::Trap(
228  eeSCEnvName, 0.5 * ee.sCELength, eAng, ffived, eFront, eFront, eFront, zerod, eRear, eRear, eRear, zerod));
229 #ifdef EDM_ML_DEBUG
230  edm::LogVerbatim("EcalGeom") << eeSCEnv.name() << " Trap with parameters: " << cms::convert2mm(0.5 * ee.sCELength)
231  << ":" << eAng << ":" << ffived << ":" << cms::convert2mm(eFront) << ":"
232  << cms::convert2mm(eFront) << ":" << cms::convert2mm(eFront) << ":" << zerod << ":"
233  << cms::convert2mm(eRear) << ":" << cms::convert2mm(eRear) << ":"
234  << cms::convert2mm(eRear) << ":" << zerod;
235 #endif
236 
237  const double aFront(0.5 * ee.sCAFront);
238  const double aRear(0.5 * ee.sCARear);
239  const double aAng(atan((ee.sCARear - ee.sCAFront) / (sqrt(2.) * ee.sCALength)));
240  std::string eeSCAlvName(
241  (1 == iSCType ? ee.alvName + std::to_string(iSCType) : (ee.alvName + std::to_string(iSCType) + "Tmp")));
242  dd4hep::Solid eeSCAlv = ns.addSolidNS(
243  eeSCAlvName,
244  dd4hep::Trap(
245  eeSCAlvName, 0.5 * ee.sCALength, aAng, ffived, aFront, aFront, aFront, zerod, aRear, aRear, aRear, zerod));
246 #ifdef EDM_ML_DEBUG
247  edm::LogVerbatim("EcalGeom") << eeSCAlv.name() << " Trap with parameters: " << cms::convert2mm(0.5 * ee.sCALength)
248  << ":" << aAng << ":" << ffived << ":" << cms::convert2mm(aFront) << ":"
249  << cms::convert2mm(aFront) << ":" << cms::convert2mm(aFront) << ":" << zerod << ":"
250  << cms::convert2mm(aRear) << ":" << cms::convert2mm(aRear) << ":"
251  << cms::convert2mm(aRear) << ":" << zerod;
252 #endif
253 
254  const double dwall(ee.sCAWall);
255  const double iFront(aFront - dwall);
256  const double iRear(iFront);
257  const double iLen(ee.iLength);
258  std::string eeSCIntName(1 == iSCType ? ee.intName + std::to_string(iSCType)
259  : (ee.intName + std::to_string(iSCType) + "Tmp"));
260  dd4hep::Solid eeSCInt = ns.addSolidNS(eeSCIntName,
261  dd4hep::Trap(eeSCIntName,
262  iLen / 2.,
263  atan((ee.sCARear - ee.sCAFront) / (sqrt(2.) * ee.sCALength)),
264  ffived,
265  iFront,
266  iFront,
267  iFront,
268  zerod,
269  iRear,
270  iRear,
271  iRear,
272  zerod));
273 #ifdef EDM_ML_DEBUG
274  edm::LogVerbatim("EcalGeom") << eeSCAlv.name() << " Trap with parameters: " << cms::convert2mm(iLen / 2.) << ":"
275  << (atan((ee.sCARear - ee.sCAFront) / (sqrt(2.) * ee.sCALength))) << ":" << ffived
276  << ":" << cms::convert2mm(iFront) << ":" << cms::convert2mm(iFront) << ":"
277  << cms::convert2mm(iFront) << ":" << zerod << ":" << cms::convert2mm(iRear) << ":"
278  << cms::convert2mm(iRear) << ":" << cms::convert2mm(iRear) << ":" << zerod;
279 #endif
280 
281  const double dz(-0.5 * (ee.sCELength - ee.sCALength));
282  const double dxy(0.5 * dz * (ee.sCERear - ee.sCEFront) / ee.sCELength);
283  const double zIOff(-(ee.sCALength - iLen) / 2.);
284  const double xyIOff(ee.iXYOff);
285 
286  dd4hep::Volume eeSCELog;
287  dd4hep::Volume eeSCALog;
288  dd4hep::Volume eeSCILog;
289 
290  if (1 == iSCType) { // standard SC in this block
291  eeSCELog =
292  ns.addVolumeNS(dd4hep::Volume(myns + ee.envName + std::to_string(iSCType), eeSCEnv, ns.material(ee.mat)));
293  eeSCALog = dd4hep::Volume(myns + ee.alvName + std::to_string(iSCType), eeSCAlv, ns.material(ee.wallMat));
294  eeSCILog = dd4hep::Volume(myns + ee.intName + std::to_string(iSCType), eeSCInt, ns.material(ee.mat));
295  } else { // partial SCs this block: create subtraction volumes as appropriate
296  const double half(ee.cutParms[0] - ee.pFHalf * ee.crysRear);
297  const double fifth(ee.cutParms[0] + ee.pFFifth * ee.crysRear);
298  const double fac(ee.pF45);
299 
300  const double zmm(0 * dd4hep::mm);
301 
302  DDTranslation cutTra(
303  2 == iSCType ? DDTranslation(zmm, half, zmm)
304  : (3 == iSCType ? DDTranslation(half, zmm, zmm)
305  : (4 == iSCType ? DDTranslation(zmm, -fifth, zmm)
306  : (5 == iSCType ? DDTranslation(-half * fac, -half * fac, zmm)
307  : DDTranslation(-fifth, zmm, zmm)))));
308 
309  const CLHEP::HepRotationZ cutm(ffived);
310 
311  DDRotation cutRot(5 != iSCType ? DDRotation()
312  : myrot(ns,
313  "EECry5Rot",
314  DDRotation(cutm.xx(),
315  cutm.xy(),
316  cutm.xz(),
317  cutm.yx(),
318  cutm.yy(),
319  cutm.yz(),
320  cutm.zx(),
321  cutm.zy(),
322  cutm.zz())));
323 
324  dd4hep::Solid eeCutEnv = dd4hep::SubtractionSolid(ee.envName + std::to_string(iSCType),
325  ns.solid(ee.envName + std::to_string(iSCType) + "Tmp"),
326  eeCutBox,
327  dd4hep::Transform3D(cutRot, cutTra));
328 #ifdef EDM_ML_DEBUG
329  edm::LogVerbatim("EcalGeom") << eeCutEnv.name() << " Subtracted by " << cms::convert2mm(ee.cutParms[0]) << ":"
330  << cms::convert2mm(ee.cutParms[1]) << ":" << cms::convert2mm(ee.cutParms[2]);
331 #endif
332 
333  const DDTranslation extra(dxy, dxy, dz);
334 
335  dd4hep::Solid eeCutAlv = dd4hep::SubtractionSolid(ee.alvName + std::to_string(iSCType),
336  ns.solid(ee.alvName + std::to_string(iSCType) + "Tmp"),
337  eeCutBox,
338  dd4hep::Transform3D(cutRot, cutTra - extra));
339 #ifdef EDM_ML_DEBUG
340  edm::LogVerbatim("EcalGeom") << eeCutAlv.name() << " Subtracted by " << cms::convert2mm(ee.cutParms[0]) << ":"
341  << cms::convert2mm(ee.cutParms[1]) << ":" << cms::convert2mm(ee.cutParms[2]);
342 #endif
343 
344  const double mySign(iSCType < 4 ? +1. : -1.);
345 
346  const DDTranslation extraI(xyIOff + mySign * 2 * dd4hep::mm, xyIOff + mySign * 2 * dd4hep::mm, zIOff);
347 
348  dd4hep::Solid eeCutInt = dd4hep::SubtractionSolid(ee.intName + std::to_string(iSCType),
349  ns.solid(ee.intName + std::to_string(iSCType) + "Tmp"),
350  eeCutBox,
351  dd4hep::Transform3D(cutRot, cutTra - extraI));
352 #ifdef EDM_ML_DEBUG
353  edm::LogVerbatim("EcalGeom") << eeCutInt.name() << " Subtracted by " << cms::convert2mm(ee.cutParms[0]) << ":"
354  << cms::convert2mm(ee.cutParms[1]) << ":" << cms::convert2mm(ee.cutParms[2]);
355 #endif
356 
357  eeSCELog =
358  ns.addVolumeNS(dd4hep::Volume(myns + ee.envName + std::to_string(iSCType), eeCutEnv, ns.material(ee.mat)));
359  eeSCALog = dd4hep::Volume(myns + ee.alvName + std::to_string(iSCType), eeCutAlv, ns.material(ee.wallMat));
360  eeSCILog = dd4hep::Volume(myns + ee.intName + std::to_string(iSCType), eeCutInt, ns.material(ee.mat));
361  }
362  eeSCELog.placeVolume(eeSCALog, iSCType * 100 + 1, dd4hep::Position(dxy, dxy, dz));
363  eeSCALog.placeVolume(eeSCILog, iSCType * 100 + 1, dd4hep::Position(xyIOff, xyIOff, zIOff));
364 #ifdef EDM_ML_DEBUG
365  edm::LogVerbatim("EEGeom") << eeSCALog.name() << " " << (iSCType * 100 + 1) << " in " << eeSCELog.name();
366  edm::LogVerbatim("EEGeom") << eeSCILog.name() << " " << (iSCType * 100 + 1) << " in " << eeSCALog.name();
367  edm::LogVerbatim("EcalGeom") << eeSCALog.name() << " " << (iSCType * 100 + 1) << " in " << eeSCELog.name()
368  << " at (" << cms::convert2mm(dxy) << ", " << cms::convert2mm(dxy) << ", "
369  << cms::convert2mm(dz) << ")";
370  edm::LogVerbatim("EcalGeom") << eeSCILog.name() << " " << (iSCType * 100 + 1) << " in " << eeSCALog.name()
371  << " at (" << cms::convert2mm(xyIOff) << ", " << cms::convert2mm(xyIOff) << ", "
372  << cms::convert2mm(zIOff) << ")";
373 #endif
374  DDTranslation croffset(0., 0., 0.);
375 
376  // Position crystals within parent supercrystal interior volume
377  static const unsigned int ncol(5);
378 
379  if (iSCType > 0 && iSCType <= ee.nSCTypes) {
380  const unsigned int icoffset((iSCType - 1) * ncol - 1);
381 
382  // Loop over columns of SC
383  for (unsigned int icol(1); icol <= ncol; ++icol) {
384  // Get column limits for this SC type from xml input
385  const int ncrcol((int)ee.vecEESCProf[icoffset + icol]);
386 
387  const int imin(0 < ncrcol ? 1 : (0 > ncrcol ? ncol + ncrcol + 1 : 0));
388  const int imax(0 < ncrcol ? ncrcol : (0 > ncrcol ? ncol : 0));
389 
390  if (imax > 0) {
391  // Loop over crystals in this row
392  for (int irow(imin); irow <= imax; ++irow) {
393  // Create crystal as a DDEcalEndcapTrap object and calculate rotation and
394  // translation required to position it in the SC.
395  DDEcalEndcapTrap crystal(1, ee.crysFront, ee.crysRear, ee.crysLength);
396 
397  crystal.moveto(ee.cryFCtr[icol - 1][irow - 1], ee.cryRCtr[icol - 1][irow - 1]);
398 
399  std::string rname("EECrRoC" + std::to_string(icol) + "R" + std::to_string(irow));
400 
401  eeSCALog.placeVolume(eeCRLog,
402  100 * iSCType + 10 * (icol - 1) + (irow - 1),
403  dd4hep::Transform3D(myrot(ns, rname, crystal.rotation()),
404  dd4hep::Position(crystal.centrePos().x(),
405  crystal.centrePos().y(),
406  crystal.centrePos().z() - ee.cryZOff)));
407 #ifdef EDM_ML_DEBUG
408  edm::LogVerbatim("EEGeom") << eeCRLog.name() << " " << (100 * iSCType + 10 * (icol - 1) + (irow - 1))
409  << " in " << eeSCALog.name();
410  edm::LogVerbatim("EcalGeom") << eeCRLog.name() << " " << (100 * iSCType + 10 * (icol - 1) + (irow - 1))
411  << " in " << eeSCALog.name() << " at ("
412  << cms::convert2mm(crystal.centrePos().x()) << ", "
413  << cms::convert2mm(crystal.centrePos().y()) << ", "
414  << cms::convert2mm((crystal.centrePos().z() - ee.cryZOff)) << ")";
415 #endif
416  }
417  }
418  }
419  }
420  }
421 
422  //** Loop over endcap columns
423  for (int icol = 1; icol <= int(ee.nColumns); icol++) {
424  //** Loop over SCs in column, using limits from xml input
425  for (int irow = int(ee.vecEEShape[2 * icol - 2]); irow <= int(ee.vecEEShape[2 * icol - 1]); ++irow) {
426  if (ee.vecEESCLims[0] <= icol && ee.vecEESCLims[1] >= icol && ee.vecEESCLims[2] <= irow &&
427  ee.vecEESCLims[3] >= irow) {
428  // Find SC type (complete or partial) for this location
429  unsigned int isctype = 1;
430 
431  for (unsigned int ii = 0; ii < (unsigned int)(ee.nSCCutaway); ++ii) {
432  if ((ee.vecEESCCutaway[3 * ii] == icol) && (ee.vecEESCCutaway[3 * ii + 1] == irow)) {
433  isctype = int(ee.vecEESCCutaway[3 * ii + 2]);
434  }
435  }
436 
437  // Create SC as a DDEcalEndcapTrap object and calculate rotation and
438  // translation required to position it in the endcap.
439  DDEcalEndcapTrap scrys(1, ee.sCEFront, ee.sCERear, ee.sCELength);
440  scrys.moveto(ee.scrFCtr[icol - 1][irow - 1], ee.scrRCtr[icol - 1][irow - 1]);
441  scrys.translate(DDTranslation(0., 0., -ee.zOff));
442 
443  std::string rname(ee.envName + std::to_string(isctype) + std::to_string(icol) + "R" + std::to_string(irow));
444  // Position SC in endcap
445  dd4hep::Volume quaLog = ns.volume(ee.quaName);
446  dd4hep::Volume childEnvLog = ns.volume(myns + ee.envName + std::to_string(isctype));
447  quaLog.placeVolume(childEnvLog,
448  100 * isctype + 10 * (icol - 1) + (irow - 1),
449  dd4hep::Transform3D(scrys.rotation(), scrys.centrePos()));
450 #ifdef EDM_ML_DEBUG
451  edm::LogVerbatim("EEGeom") << childEnvLog.name() << " " << (100 * isctype + 10 * (icol - 1) + (irow - 1))
452  << " in " << quaLog.name();
453  edm::LogVerbatim("EcalGeom") << childEnvLog.name() << " " << (100 * isctype + 10 * (icol - 1) + (irow - 1))
454  << " in " << quaLog.name() << " at (" << cms::convert2mm(scrys.centrePos().x())
455  << ", " << cms::convert2mm(scrys.centrePos().y()) << ", "
456  << cms::convert2mm(scrys.centrePos().z()) << ")";
457 #endif
458  }
459  }
460  }
461 
462  return 1;
463 }
464 
465 DECLARE_DDCMS_DETELEMENT(DDCMS_ecal_DDEcalEndcapAlgo, algorithm)
DDEcalEndcapTrap::rotation
DDRotationMatrix rotation()
Definition: DDEcalEndcapTrap.h:35
writedatasetfile.args
args
Definition: writedatasetfile.py:18
input
static const std::string input
Definition: EdmProvDump.cc:48
cms::DDNamespace::addRotation
void addRotation(const std::string &name, const dd4hep::Rotation3D &rot) const
Definition: DDNamespace.cc:120
reco::HaloData::Endcap
Endcap
Definition: HaloData.h:14
cms::DDNamespace::solid
dd4hep::Solid solid(const std::string &name) const
Definition: DDNamespace.cc:240
DECLARE_DDCMS_DETELEMENT
#define DECLARE_DDCMS_DETELEMENT(name, func)
Definition: DDPlugins.h:25
cms::DDNamespace::material
dd4hep::Material material(const std::string &name) const
Definition: DDNamespace.cc:116
cms::DDParsingContext
Definition: DDParsingContext.h:13
cms::DDNamespace
Definition: DDNamespace.h:16
cms::cuda::assert
assert(be >=bs)
findQualityFiles.v
v
Definition: findQualityFiles.py:179
algorithm
static long algorithm(dd4hep::Detector &, cms::DDParsingContext &ctxt, xml_h e)
Definition: DDEcalEndcapAlgo.cc:94
DDEcalEndcapTrap
Definition: DDEcalEndcapTrap.h:11
DDEcalEndcapTrap.h
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
cms::DDNamespace::prepend
std::string prepend(const std::string &) const
Definition: DDNamespace.cc:60
PixelTestBeamValidation_cfi.Position
Position
Definition: PixelTestBeamValidation_cfi.py:75
cms::DDNamespace::rotation
const dd4hep::Rotation3D & rotation(const std::string &name) const
Definition: DDNamespace.cc:125
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cms::Volume
dd4hep::Volume Volume
Definition: DDFilteredView.h:47
rname
const G4String rname[NREG]
Definition: ParametrisedEMPhysics.cc:48
angle_units::operators
Definition: angle_units.h:11
DDPlugins.h
createfilelist.int
int
Definition: createfilelist.py:10
cms::convert2mm
constexpr NumType convert2mm(NumType length)
Definition: DDutils.h:7
cms::DDNamespace::addSolidNS
dd4hep::Solid addSolidNS(const std::string &name, dd4hep::Solid solid) const
Definition: DDNamespace.cc:221
cms::DDAlgoArguments
Definition: DDAlgoArguments.h:28
counter
static std::atomic< unsigned int > counter
Definition: SharedResourceNames.cc:18
BenchmarkGrd.h
cms::DDNamespace::addVolumeNS
dd4hep::Volume addVolumeNS(dd4hep::Volume vol) const
Definition: DDNamespace.cc:145
alignCSCRings.r
r
Definition: alignCSCRings.py:93
align::Detector
Definition: StructureType.h:92
PVValHelper::dxy
Definition: PVValidationHelpers.h:48
PVValHelper::dz
Definition: PVValidationHelpers.h:51
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
BenchmarkGrd
Definition: BenchmarkGrd.h:9
DDEcalEndcapTrap::translate
void translate(const DDTranslation &trans)
Definition: DDEcalEndcapTrap.cc:118
DDRotation
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
DDEcalEndcapTrap::centrePos
DDTranslation centrePos()
Definition: DDEcalEndcapTrap.cc:220
angle_units.h
DDEcalEndcapTrap::moveto
void moveto(const DDTranslation &frontCentre, const DDTranslation &rearCentre)
Definition: DDEcalEndcapTrap.cc:132
cuy.ii
ii
Definition: cuy.py:590
cms::DDNamespace::volume
dd4hep::Volume volume(const std::string &name, bool exc=true) const
Definition: DDNamespace.cc:205
DDutils.h
DDRotation
ROOT::Math::Rotation3D DDRotation
Definition: DDEcalEndcapAlgo.cc:16
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDEcalEndcapAlgo.cc:15