CMS 3D CMS Logo

DDEcalPreshowerAlgo.cc
Go to the documentation of this file.
1 #include <cmath>
2 #include <algorithm>
3 
8 #include "CLHEP/Units/GlobalSystemOfUnits.h"
9 #include <vector>
10 #include <string>
11 
14 
15 class DDEcalPreshowerAlgo : public DDAlgorithm {
16 public:
17  DDMaterial getMaterial(unsigned int i) const { return DDMaterial(materials_[i]); }
19  std::string getLayName(unsigned int i) const { return layName_[i]; }
20  std::string getLadPrefix(unsigned int i) const { return ladPfx_[i]; }
21 
23  void initialize(const DDNumericArguments& nArgs,
24  const DDVectorArguments& vArgs,
25  const DDMapArguments& mArgs,
26  const DDStringArguments& sArgs,
27  const DDStringVectorArguments& vsArgs) override;
28  void execute(DDCompactView& pos) override;
29 
30 private:
31  void doLayers(DDCompactView& pos);
33  void doSens(DDCompactView& pos);
34 
35  int nmat_; // number of preshower layers
36  double thickness_; // overall thickness of the preshower envelope
37  std::vector<std::string> materials_; // materials of the presh-layers
38  std::vector<std::string> layName_; // names of the presh-layers
39  std::vector<std::string> ladPfx_; // name prefix for ladders
40  std::string LaddMaterial_; // ladd material - air
41  std::vector<double> thickLayers_;
42  std::vector<double> abs1stx;
43  std::vector<double> abs1sty;
44  std::vector<double> abs2ndx;
45  std::vector<double> abs2ndy;
46  std::vector<double> asym_ladd_;
47  std::vector<double> rminVec;
48  std::vector<double> rmaxVec;
49  std::vector<double> noLaddInCol_;
50  std::vector<double> startOfFirstLadd_;
51  std::vector<std::string> types_l5_;
52  std::vector<std::string> types_l4_;
53  std::vector<double> ladd_l5_map_;
54  std::vector<double> ladd_l4_map_;
55  std::vector<std::string> typeOfLaddRow0;
56  std::vector<std::string> typeOfLaddRow1;
57  std::vector<std::string> typeOfLaddRow2;
58  std::vector<std::string> typeOfLaddRow3;
59 
67 };
68 
70  LogDebug("EcalGeom") << "DDEcalPreshowerAlgo info: Creating an instance";
71 }
72 
74  const DDVectorArguments& vArgs,
75  const DDMapArguments& mArgs,
76  const DDStringArguments& sArgs,
77  const DDStringVectorArguments& vsArgs) {
78  LogDebug("EcalGeom") << "DDEcalPreshowerAlgo info: Initialize";
79 
80  asym_ladd_ = vArgs["ASYMETRIC_LADDER"];
81  types_l5_ = vsArgs["TYPES_OF_LADD_L5"];
82  types_l4_ = vsArgs["TYPES_OF_LADD_L4"];
83  ladd_l5_map_ = vArgs["LADD_L5_MAP"];
84  ladd_l4_map_ = vArgs["LADD_L4_MAP"];
85  noLaddInCol_ = vArgs["NUMB_OF_LADD_IN_COL"];
86  startOfFirstLadd_ = vArgs["START_OF_1ST_LADD"];
87  typeOfLaddRow0 = vsArgs["TYPE_OF_LADD_1"];
88  typeOfLaddRow1 = vsArgs["TYPE_OF_LADD_2"];
89  typeOfLaddRow2 = vsArgs["TYPE_OF_LADD_3"];
90  typeOfLaddRow3 = vsArgs["TYPE_OF_LADD_4"];
91  thickLayers_ = vArgs["Layers"];
92  thickness_ = double(nArgs["PRESH_Z_TOTAL"]);
93  materials_ = vsArgs["LayMat"];
94  layName_ = vsArgs["LayName"];
95  rmaxVec = vArgs["R_MAX"]; // inner radii
96  rminVec = vArgs["R_MIN"]; // outer radii
97  waf_intra_col_sep = double(nArgs["waf_intra_col_sep"]);
98  waf_inter_col_sep = double(nArgs["waf_inter_col_sep"]);
99  waf_active = double(nArgs["waf_active"]);
100  wedge_length = double(nArgs["wedge_length"]);
101  wedge_offset = double(nArgs["wedge_offset"]);
102  zwedge_ceramic_diff = double(nArgs["zwedge_ceramic_diff"]);
103  ywedge_ceramic_diff = double(nArgs["ywedge_ceramic_diff"]);
104  ceramic_length = double(nArgs["ceramic_length"]);
105  wedge_angle = double(nArgs["wedge_angle"]);
106  wedge_back_thick = double(nArgs["wedge_back_thick"]);
107  ladder_thick = double(nArgs["ladder_thick"]);
108  ladder_width = double(nArgs["ladder_width"]);
109  micromodule_length = double(nArgs["micromodule_length"]);
110  box_thick = double(nArgs["box_thick"]);
111  abs1stx = vArgs["1ST_ABSX"];
112  abs1sty = vArgs["1ST_ABSY"];
113  abs2ndx = vArgs["2ND_ABSX"];
114  abs2ndy = vArgs["2ND_ABSY"];
115  ladPfx_ = vsArgs["LadPrefix"];
116  LaddMaterial_ = sArgs["LadderMaterial"];
117  LdrFrnt_Length = double(nArgs["LdrFrnt_Length"]);
118  LdrFrnt_Offset = double(nArgs["LdrFrnt_Offset"]);
119  LdrBck_Length = double(nArgs["LdrBck_Length"]);
120  LdrBck_Offset = double(nArgs["LdrBck_Offset"]);
121  dee_separation = double(nArgs["dee_sep"]);
122  In_rad_Abs_Al = double(nArgs["R_MIN_Abs_Al"]);
123  In_rad_Abs_Pb = double(nArgs["R_MIN_Abs_Pb"]);
124  rMax_Abs_Al_ = double(nArgs["R_MAX_Abs_Al"]);
125  absAlX_X_ = double(nArgs["AbsAlX_X"]);
126  absAlX_Y_ = double(nArgs["AbsAlX_Y"]);
127  absAlX_subtr1_Xshift_ = double(nArgs["AbsAlX_subtr1_Xshift"]);
128  absAlX_subtr1_Yshift_ = double(nArgs["AbsAlX_subtr1_Yshift"]);
129  absAlY_X_ = double(nArgs["AbsAlY_X"]);
130  absAlY_Y_ = double(nArgs["AbsAlY_Y"]);
131  absAlY_subtr1_Xshift_ = double(nArgs["AbsAlY_subtr1_Xshift"]);
132  absAlY_subtr1_Yshift_ = double(nArgs["AbsAlY_subtr1_Yshift"]);
133 }
134 
136  LogDebug("EcalGeom") << "******** DDEcalPreshowerAlgo execute!";
137 
138  // creates all the tube-like layers of the preshower
139  doLayers(cpv);
140  // creates and places the ladders
141  doLadders(cpv);
142  // places the slicon strips in active silicon wafers
143  doSens(cpv);
144 }
145 
147  double zpos = -thickness_ / 2., sdx(0), sdy(0), bdx(0), bdy(0);
148  ;
149 
150  for (size_t i = 0; i < thickLayers_.size(); ++i) {
151  int I = int(i) + 1; // FOTRAN I (offset +1)
152 
153  double rIn(0), rOut(0), zHalf(0);
154 
155  // create the name
156  DDName ddname(getLayName(i), "esalgo"); // namespace:name
157 
158  // cone dimensions
159  rIn = rminVec[i];
160  rOut = rmaxVec[i];
161  zHalf = thickLayers_[i] / 2.;
162 
163  // create a logical part representing a single layer in the preshower
164  DDSolid solid = DDSolidFactory::tubs(ddname, zHalf, rIn, rOut, 0., 360. * deg);
165 
166  DDLogicalPart layer = DDLogicalPart(ddname, getMaterial(i), solid);
167 
168  // position the logical part w.r.t. the parent volume
169  zpos += zHalf;
170 
171  // create a logical part representing a single layer in the preshower
172  // skip layers with detectors, front and rear window
173  if (I == 2 || I == 28 || I == 13 || I == 23) {
174  zpos += zHalf;
175  continue;
176  }
177 
178  if (I == 12) {
179  zlead1_ = zpos + zHalf;
180  }
181  if (I == 22) {
182  zlead2_ = zpos + zHalf;
183  }
184 
185  if (I == 10 || I == 20) { // New lead shape
186 
187  int absz = 0;
188  double outalbx, outalby, shiftR, outalbx2, outalby2, shiftR2;
189 
190  absz = int(abs1stx.size());
191  if (I == 20)
192  absz = int(abs2ndx.size());
193  int cutabsx = -1, cutabsy = -1;
194 
195  DDName dd_tmp_name_b(getLayName(i) + "Lcut", "esalgo");
196  DDName dd_tmp_name_c(getLayName(i) + "tmpb", "esalgo");
197  DDName dd_tmp_name_d(getLayName(i) + "LinPb", "esalgo");
198 
199  DDName dd_tmp_name_e(getLayName(i) + "LinAl", "esalgo");
200  DDName dd_tmp_name_f(getLayName(i) + "LOutAl", "esalgo");
201 
202  std::ostringstream tmp_Alname_fin;
203  tmp_Alname_fin << getLayName(i) << "LtmpAl" << absz - 1;
204  DDName dd_Alname_fin(tmp_Alname_fin.str(), "esalgo");
205 
206  DDSolid Outer_Al = DDSolid(dd_Alname_fin);
207 
208  DDLogicalPart layerFinOutAl = DDLogicalPart(dd_tmp_name_f, getMaterial(i - 1), Outer_Al);
209 
210  DDName dd_Alname_f(getLayName(i) + "LOutAl", "esalgo");
211  DDName dd_Alname_g(getLayName(i) + "LOutAl2", "esalgo");
212  DDName dd_Alname_h(getLayName(i) + "LOutAltmp", "esalgo");
213  DDName dd_Alname_i(getLayName(i) + "LOutAltmp2", "esalgo");
214  DDName dd_Alname_j(getLayName(i) + "LOutAltmp3", "esalgo");
215  DDName dd_Alname_k(getLayName(i) + "LOutAltmp4", "esalgo");
216  DDName dd_Alname_l(getLayName(i) + "LOutAltmp5", "esalgo");
217  DDName dd_Alname_m(getLayName(i) + "LOutAltmp6", "esalgo");
218 
219  DDSolid Out_Al =
220  DDSolidFactory::tubs(dd_Alname_f, zHalf - 0.1 * mm, rMax_Abs_Al_ - 20 * cm, rMax_Abs_Al_, 0., 90. * deg);
221 
222  outalbx = absAlX_X_ * 0.1;
223  outalby = rMax_Abs_Al_ + 0.1 * mm - absAlX_subtr1_Yshift_;
224  shiftR = absAlX_subtr1_Yshift_;
225  if (I == 20) {
226  outalbx = absAlY_X_ * 0.1;
227  outalby = rMax_Abs_Al_ + 0.1 * mm - absAlY_subtr1_Yshift_;
228  shiftR = absAlY_subtr1_Xshift_;
229  }
230  DDSolid OutAltmp = DDSolidFactory::box(dd_Alname_h, outalbx / 2 + 0.1 * mm, outalby / 2 + 0.1 * mm, zHalf);
232  dd_Alname_j, Out_Al, OutAltmp, DDTranslation(outalbx / 2, outalby / 2 + shiftR, 0), DDRotation());
233  outalby2 = absAlX_Y_ * 0.1;
234  outalbx2 = rMax_Abs_Al_ + 0.1 * mm - absAlX_subtr1_Xshift_;
235  shiftR2 = absAlX_subtr1_Xshift_;
236  if (I == 20) {
237  outalby2 = absAlY_Y_ * 0.1;
238  outalbx2 = rMax_Abs_Al_ + 0.1 * mm - absAlY_subtr1_Xshift_;
239  shiftR2 = absAlY_subtr1_Xshift_;
240  }
241  DDSolid OutAltmp2 = DDSolidFactory::box(dd_Alname_i, outalbx2 / 2 + 0.1 * mm, outalby2 / 2 + 0.1 * mm, zHalf);
243  dd_Alname_k, Out_Altmp3, OutAltmp2, DDTranslation(outalbx2 / 2 + shiftR2, outalby2 / 2, 0), DDRotation());
244  DDSolid Out_Altmp5 = DDSolidFactory::unionSolid(
245  dd_Alname_l, Out_Altmp4, Out_Altmp4, DDTranslation(0, 0, 0), DDRotation("esalgo:RABS90"));
246  DDSolid Out_Altmp6 = DDSolidFactory::unionSolid(
247  dd_Alname_m, Out_Altmp5, Out_Altmp4, DDTranslation(0, 0, 0), DDRotation("esalgo:RABS180B"));
249  dd_Alname_g, Out_Altmp6, Out_Altmp4, DDTranslation(0, 0, 0), DDRotation("esalgo:R180"));
250 
251  for (int L = 0; L < absz; ++L) {
252  int K = L;
253  std::ostringstream tmp_name_b, tmp_name_b2, tmp_FAl_name_c, tmp_FAl_name_d1, tmp_FAl_name_d2, tmp_FAl_name_d3,
254  tmp_FAl_name_d;
255  tmp_name_b << getLayName(i) << "L" << K;
256  tmp_name_b2 << getLayName(i) << "Lb2" << K;
257 
258  if (L == 0)
259  tmp_FAl_name_c << getLayName(i) << "LOutAl2";
260  if (L > 0)
261  tmp_FAl_name_c << getLayName(i) << "LtmpAl" << K - 1;
262 
263  tmp_FAl_name_d1 << getLayName(i) << "LtmpAl" << K << "_1";
264  tmp_FAl_name_d2 << getLayName(i) << "LtmpAl" << K << "_2";
265  tmp_FAl_name_d3 << getLayName(i) << "LtmpAl" << K << "_3";
266  tmp_FAl_name_d << getLayName(i) << "LtmpAl" << K;
267 
268  DDName dd_tmp_name_b(tmp_name_b.str(), "esalgo");
269  DDName dd_tmp_name_b2(tmp_name_b2.str(), "esalgo");
270  DDName dd_FAl_name_c(tmp_FAl_name_c.str(), "esalgo");
271  DDName dd_FAl_name_d1(tmp_FAl_name_d1.str(), "esalgo");
272  DDName dd_FAl_name_d2(tmp_FAl_name_d2.str(), "esalgo");
273  DDName dd_FAl_name_d3(tmp_FAl_name_d3.str(), "esalgo");
274  DDName dd_FAl_name_d(tmp_FAl_name_d.str(), "esalgo");
275 
276  if (L == 0)
277  bdx = std::abs(abs1stx[K]) / 2;
278  if (L > 0)
279  bdx = std::abs(abs1stx[K] - abs1stx[K - 1]) / 2;
280  bdy = abs1sty[K];
281  if (abs1stx[K] < rIn + 30 * cm) {
282  bdy = abs1sty[K] / 2 - 30 * cm;
283  cutabsx = K;
284  }
285 
286  if (I == 20) {
287  if (L == 0)
288  bdx = std::abs(abs2ndx[K]) / 2;
289  if (L > 0)
290  bdx = std::abs(abs2ndx[K] - abs2ndx[K - 1]) / 2;
291  bdy = abs2ndy[K];
292  }
293 
294  if ((abs2ndx[K] < rIn + 30 * cm) && I == 20) {
295  bdy = abs2ndy[K] / 2 - 30 * cm;
296  cutabsy = K;
297  }
298 
299  DDSolid solid_b = DDSolidFactory::box(dd_tmp_name_b, bdx, bdy, zHalf);
300  DDSolid solid_b2 = DDSolidFactory::box(dd_tmp_name_b2, bdx + 0.1 * mm, bdy + 0.1 * mm, zHalf);
301 
302  sdx = abs1stx[K] - bdx;
303  sdy = 0;
304  if (abs1stx[K] < rIn + 30 * cm)
305  sdy = abs1sty[K] - bdy;
306 
307  if (I == 20) {
308  sdx = abs2ndx[K] - bdx;
309  sdy = 0;
310  }
311  if ((abs2ndx[K] < rIn + 30 * cm) && I == 20)
312  sdy = abs2ndy[K] - bdy;
313 
314  DDLogicalPart layer = DDLogicalPart(dd_tmp_name_b, getMaterial(i), solid_b);
315 
316  cpv.position(layer, layerFinOutAl, 1, DDTranslation(sdx, sdy, 0), DDRotation());
317  cpv.position(layer, layerFinOutAl, 2, DDTranslation(-sdx, sdy, 0), DDRotation());
318  DDSolid solid_c = DDSolid(dd_FAl_name_c);
319  DDSolid solid_d1 =
320  DDSolidFactory::unionSolid(dd_FAl_name_d1, solid_c, solid_b2, DDTranslation(sdx, sdy, 0), DDRotation());
321  DDSolid solid_d2 =
322  DDSolidFactory::unionSolid(dd_FAl_name_d, solid_d1, solid_b2, DDTranslation(-sdx, -sdy, 0), DDRotation());
323 
324  if (((abs1stx[K] < rIn + 30 * cm) && I == 10) || ((abs2ndx[K] < rIn + 30 * cm) && I == 20)) {
325  cpv.position(layer, layerFinOutAl, 3, DDTranslation(sdx, -sdy, 0), DDRotation());
326  cpv.position(layer, layerFinOutAl, 4, DDTranslation(-sdx, -sdy, 0), DDRotation());
327  DDSolid solid_c = DDSolid(dd_FAl_name_c);
328  DDSolid solid_d1 =
329  DDSolidFactory::unionSolid(dd_FAl_name_d1, solid_c, solid_b2, DDTranslation(sdx, sdy, 0), DDRotation());
330  DDSolid solid_d2 =
331  DDSolidFactory::unionSolid(dd_FAl_name_d2, solid_d1, solid_b2, DDTranslation(sdx, -sdy, 0), DDRotation());
332  DDSolid solid_d3 =
333  DDSolidFactory::unionSolid(dd_FAl_name_d3, solid_d2, solid_b2, DDTranslation(-sdx, sdy, 0), DDRotation());
334  DDSolid solid_d4 =
335  DDSolidFactory::unionSolid(dd_FAl_name_d, solid_d3, solid_b2, DDTranslation(-sdx, -sdy, 0), DDRotation());
336  }
337  }
338 
339  bdx = abs1stx[cutabsx];
340  if (I == 20)
341  bdx = abs2ndx[cutabsy];
342  bdy = 2 * 30 * cm;
343 
344  DDSolid solidcut = DDSolidFactory::box(dd_tmp_name_b, bdx, bdy, zHalf);
345 
346  DDSolid iner = DDSolidFactory::tubs(dd_tmp_name_c, zHalf + 0.1 * mm, 0, In_rad_Abs_Pb, 0., 360. * deg);
347 
348  DDSolid final = DDSolidFactory::subtraction(dd_tmp_name_d, solidcut, iner, DDTranslation(0, 0, 0), DDRotation());
349 
350  DDLogicalPart layer = DDLogicalPart(dd_tmp_name_d, getMaterial(i), final);
351  cpv.position(layer, parent(), 1, DDTranslation(0, 0, zpos), DDRotation());
352 
353  DDSolid iner_Al =
354  DDSolidFactory::tubs(dd_tmp_name_e, zHalf, In_rad_Abs_Al, In_rad_Abs_Pb - 0.01 * mm, 0., 360. * deg);
355 
356  DDLogicalPart layerAl = DDLogicalPart(dd_tmp_name_e, getMaterial(i - 1), iner_Al);
357  cpv.position(layerAl, parent(), 1, DDTranslation(0, 0, zpos), DDRotation());
358  cpv.position(layerFinOutAl, parent(), 1, DDTranslation(0, 0, zpos), DDRotation());
359  } else {
360  cpv.position(layer, parent(), 1, DDTranslation(0., 0., zpos), DDRotation());
361 
362  LogDebug("SFGeom") << " debug : tubs, Logical part: " << DDLogicalPart(ddname, getMaterial(i), solid)
363  << "\n translation " << DDTranslation(0., 0., zpos) << " rotation " << DDRotation() << "\n";
364  }
365  zpos += zHalf;
366  }
367 }
368 
370  double xpos(0), ypos(0), zpos(0), sdx(0), sdy(0), sdz(0);
371  double prev_length_(0), ladder_new_length_(0), ladd_shift_(0), ladder_length(0);
372  int enb(0), swed_scopy_glob(0);
373  double sdxe[50] = {0}, sdye[50] = {0}, sdze[50] = {0};
374  double sdxe2[50] = {0}, sdye2[50] = {0}, sdze2[50] = {0}, sdxe3[50] = {0}, sdye3[50] = {0}, sdze3[50] = {0};
375 
376  for (int M = 0; M < int(types_l5_.size() + types_l4_.size()); M++) {
377  int scopy(0);
378  double boxax(0), boxay(0), boxaz(0);
379  int ladd_not_plain(0), ladd_subtr_no(0), ladd_upper(0), ladd_side(0);
380 
381  DDSolid solid_lfront = DDSolidFactory::trap(DDName("LDRFRNT", "esalgo"),
382  LdrFrnt_Length / 2, // pDz
383  -wedge_angle, // pTheta
384  0, // pPhi
385  ladder_width / 2, // pDy1
386  (ladder_thick) / 2, // pDx1
387  (ladder_thick) / 2, // pDx2
388  0, //pAlp1
389  ladder_width / 2, //pDy2
390  (ladder_thick - ceramic_length * sin(wedge_angle * 2)) / 2, // pDx3
391  (ladder_thick - ceramic_length * sin(wedge_angle * 2)) / 2, // pDx4
392  0);
393 
394  DDSolid solid_lbck = DDSolidFactory::trap(DDName("LDRBCK", "esalgo"),
395  LdrBck_Length / 2, // pDz
396  -wedge_angle, // pTheta
397  0, // pPhi
398  ladder_width / 2, // pDy1
399  (box_thick / cos(wedge_angle * 2) + 0.02 * mm) / 2, // pDx1
400  (box_thick / cos(wedge_angle * 2) + 0.02 * mm) / 2, // pDx2
401  0, //pAlp1
402  ladder_width / 2, //pDy2
403  (ladder_thick - wedge_back_thick) / 2, // pDx3
404  (ladder_thick - wedge_back_thick) / 2, // pDx4
405  0);
406 
407  DDSolid solid_lfhalf = DDSolidFactory::trap(DDName("LDRFHALF", "esalgo"),
408  LdrFrnt_Length / 2, // pDz
409  -wedge_angle, // pTheta
410  0, // pPhi
411  (ladder_width / 2) / 2, // pDy1
412  (ladder_thick) / 2, // pDx1
413  (ladder_thick) / 2, // pDx2
414  0, //pAlp1
415  (ladder_width / 2) / 2, //pDy2
416  (ladder_thick - ceramic_length * sin(wedge_angle * 2)) / 2, // pDx3
417  (ladder_thick - ceramic_length * sin(wedge_angle * 2)) / 2, // pDx4
418  0);
419 
420  DDSolid solid_lbhalf = DDSolidFactory::trap(DDName("LDRBHALF", "esalgo"),
421  LdrBck_Length / 2, // pDz
422  -wedge_angle, // pTheta
423  0, // pPhi
424  (ladder_width / 2) / 2, // pDy1
425  (box_thick / cos(wedge_angle * 2) + 0.02 * mm) / 2, // pDx1
426  (box_thick / cos(wedge_angle * 2) + 0.02 * mm) / 2, // pDx2
427  0, //pAlp1
428  (ladder_width / 2) / 2, //pDy2
429  (ladder_thick - wedge_back_thick) / 2, // pDx3
430  (ladder_thick - wedge_back_thick) / 2, // pDx4
431  0);
432 
433  DDSolid solid_lfhtrunc =
434  DDSolidFactory::trap(DDName("LDRFHTR", "esalgo"),
435  (LdrFrnt_Length - waf_active) / 2, // pDz
436  -wedge_angle, // pTheta
437  0, // pPhi
438  (ladder_width / 2) / 2, // pDy1
439  (ladder_thick) / 2, // pDx1
440  (ladder_thick) / 2, // pDx2
441  0, //pAlp1
442  (ladder_width / 2) / 2, //pDy2
443  (ladder_thick - (ceramic_length - waf_active) * sin(wedge_angle * 2)) / 2, // pDx3
444  (ladder_thick - (ceramic_length - waf_active) * sin(wedge_angle * 2)) / 2, // pDx4
445  0);
446 
447  // Creation of ladders with 5 micromodules length
448 
449  if (M < int(types_l5_.size())) {
450  for (int i = 0; i <= 1; i++) {
451  for (int j = 0; j <= 3; j++) {
452  if (ladd_l5_map_[(i + j * 2 + M * 10)] != 1) {
453  ladd_not_plain = 1;
454  ladd_subtr_no++;
455  if (j > 1)
456  ladd_upper = 1;
457  ladd_side = i;
458  }
459  }
460  }
461 
462  DDName ddname(getLadPrefix(0) + types_l5_[M], "esalgo");
463  ladder_length = micromodule_length + 4 * waf_active + 0.1 * mm;
464 
465  if (ladd_not_plain) {
466  // enb++;
467  std::ostringstream tmp_name_5b, tmp_name_5c, tmp_name_5d;
468  if (ladd_upper) {
469  } //upper
470  else {
471  enb++;
472  std::ostringstream tmp_name_5b, tmp_name_5c, tmp_name_5d;
473  DDName dd_tmp_name_5a(getLadPrefix(2), "esalgo");
474  tmp_name_5b << getLadPrefix(3) << enb;
475  DDName dd_tmp_name_5b(tmp_name_5b.str(), "esalgo");
476  tmp_name_5c << getLadPrefix(4) << enb;
477  DDName dd_tmp_name_5c(tmp_name_5c.str(), "esalgo");
478  tmp_name_5d << getLadPrefix(5) << enb;
479  DDName dd_tmp_name_5d(tmp_name_5d.str(), "esalgo");
480 
481  DDName dd_tmp_name_5e(getLadPrefix(6), "esalgo");
482 
484  boxax = ladder_width;
485  boxaz = ladder_thick;
486 
487  DDSolid solid_5a = DDSolidFactory::box(dd_tmp_name_5a, boxax / 2, boxay / 2, boxaz / 2.);
488  if (ladd_side == 0)
489  sdxe[enb] = ladder_width / 4;
490  sdye[enb] = -boxay / 2 - LdrFrnt_Length / 2;
491  sdze[enb] = -ladder_thick / 2. + LdrFrnt_Offset;
492  if (ladd_side == 1)
493  sdxe[enb] = -ladder_width / 4;
494 
495  DDSolid solid_5b = DDSolidFactory::unionSolid(dd_tmp_name_5b,
496  solid_5a,
497  solid_lfhalf,
498  DDTranslation(sdxe[enb], sdye[enb], sdze[enb]),
499  DDRotation("esalgo:RM1299"));
500 
501  if (ladd_side == 0)
502  sdxe2[enb] = -ladder_width / 4;
503  sdye2[enb] = -boxay / 2 - LdrFrnt_Length / 2 + waf_active / 2;
504  sdze2[enb] = -ladder_thick / 2. + LdrFrnt_Offset + (waf_active * sin(wedge_angle * 2)) / 4;
505  if (ladd_side == 1)
506  sdxe2[enb] = ladder_width / 4;
507 
508  DDSolid solid_5c = DDSolidFactory::unionSolid(dd_tmp_name_5c,
509  solid_5b,
510  solid_lfhtrunc,
511  DDTranslation(sdxe2[enb], sdye2[enb], sdze2[enb]),
512  DDRotation("esalgo:RM1299"));
513 
514  sdxe3[enb] = 0;
515  sdye3[enb] = boxay / 2 + LdrBck_Length / 2;
516  sdze3[enb] = -ladder_thick / 2. + LdrBck_Offset;
517  DDSolid solid = DDSolidFactory::unionSolid(ddname,
518  solid_5c,
519  solid_lbck,
520  DDTranslation(sdxe3[enb], sdye3[enb], sdze3[enb]),
521  DDRotation("esalgo:RM1299"));
522 
524  DDName ddname2(getLadPrefix(1) + types_l5_[M], "esalgo");
525  DDLogicalPart ladder2 = DDLogicalPart(ddname2, getLaddMaterial(), solid);
526  }
527 
528  } //end of not plain ladder shape
529  else {
530  DDName dd_tmp_name_5pa(getLadPrefix(2) + "5p", "esalgo");
531  DDName dd_tmp_name_5pb(getLadPrefix(3) + "5p", "esalgo");
532 
534  boxax = ladder_width;
535  boxaz = ladder_thick;
536 
537  DDSolid solid_5pa = DDSolidFactory::box(dd_tmp_name_5pa, boxax / 2, boxay / 2, boxaz / 2.);
538  sdx = 0;
539  sdy = -boxay / 2 - LdrFrnt_Length / 2;
540  sdz = -ladder_thick / 2. + LdrFrnt_Offset;
541 
543  dd_tmp_name_5pb, solid_5pa, solid_lfront, DDTranslation(sdx, sdy, sdz), DDRotation("esalgo:RM1299"));
544 
545  sdx = 0;
546  sdy = boxay / 2 + LdrBck_Length / 2;
547  sdz = -ladder_thick / 2. + LdrBck_Offset;
548 
550  ddname, solid_5pb, solid_lbck, DDTranslation(sdx, sdy, sdz), DDRotation("esalgo:RM1299"));
551 
553  DDName ddname2(getLadPrefix(1) + types_l5_[M], "esalgo");
554  DDLogicalPart ladder2 = DDLogicalPart(ddname2, getLaddMaterial(), solid);
555  }
556  }
557 
558  // Creation of ladders with 4 micromodules length
559 
560  if (M >= int(types_l5_.size())) {
561  int d = M - types_l5_.size();
562 
563  for (int i = 0; i <= 1; i++) {
564  for (int j = 0; j <= 3; j++) {
565  if (ladd_l4_map_[(i + j * 2 + (M - types_l5_.size()) * 8)] != 1) {
566  ladd_not_plain = 1;
567  ladd_subtr_no++;
568  if (j > 1)
569  ladd_upper = 1;
570  ladd_side = i;
571  }
572  }
573  }
574 
575  DDName ddname(getLadPrefix(0) + types_l4_[d], "esalgo");
576  ladder_length = micromodule_length + 3 * waf_active + 0.1 * mm;
577 
578  if (ladd_not_plain) {
579  std::ostringstream tmp_name_b, tmp_name_c, tmp_name_d;
580  if (ladd_upper) {
581  enb++;
582 
583  DDName dd_tmp_name_a(getLadPrefix(7), "esalgo");
584  tmp_name_b << getLadPrefix(8) << enb;
585  DDName dd_tmp_name_b(tmp_name_b.str(), "esalgo");
586  tmp_name_c << getLadPrefix(9) << enb;
587  DDName dd_tmp_name_c(tmp_name_c.str(), "esalgo");
588  tmp_name_d << getLadPrefix(10) << enb;
589  DDName dd_tmp_name_d(tmp_name_d.str(), "esalgo");
590  DDName dd_tmp_name_e(getLadPrefix(11), "esalgo");
591 
593  boxax = ladder_width;
594  boxaz = ladder_thick;
595  DDSolid solid_a = DDSolidFactory::box(dd_tmp_name_a, boxax / 2, boxay / 2, boxaz / 2.);
596 
597  sdxe[enb] = 0;
598  sdye[enb] = -boxay / 2 - LdrFrnt_Length / 2;
599  sdze[enb] = -ladder_thick / 2. + LdrFrnt_Offset;
600  DDSolid solid_b = DDSolidFactory::unionSolid(dd_tmp_name_b,
601  solid_a,
602  solid_lfront,
603  DDTranslation(sdxe[enb], sdye[enb], sdze[enb]),
604  DDRotation("esalgo:RM1299"));
605 
606  if (ladd_side == 0)
607  sdxe2[enb] = ladder_width / 4;
608  sdye2[enb] = boxay / 2 + LdrBck_Length / 2;
609  sdze2[enb] = -ladder_thick / 2. + LdrBck_Offset;
610  if (ladd_side == 1)
611  sdxe2[enb] = -ladder_width / 4;
612  DDSolid solid = DDSolidFactory::unionSolid(ddname,
613  solid_b,
614  solid_lbhalf,
615  DDTranslation(sdxe2[enb], sdye2[enb], sdze2[enb]),
616  DDRotation("esalgo:RM1299"));
617 
619  DDName ddname2(getLadPrefix(1) + types_l4_[d], "esalgo");
620  DDLogicalPart ladder2 = DDLogicalPart(ddname2, getLaddMaterial(), solid);
621 
622  } //upper
623  else {
624  if (ladd_subtr_no > 1) {
625  enb++;
626 
627  DDName dd_tmp_name_a(getLadPrefix(7), "esalgo");
628  tmp_name_b << getLadPrefix(8) << enb;
629  DDName dd_tmp_name_b(tmp_name_b.str(), "esalgo");
630  tmp_name_c << getLadPrefix(9) << enb;
631  DDName dd_tmp_name_c(tmp_name_c.str(), "esalgo");
632  tmp_name_d << getLadPrefix(10) << enb;
633  DDName dd_tmp_name_d(tmp_name_d.str(), "esalgo");
634  DDName dd_tmp_name_e(getLadPrefix(11), "esalgo");
635 
637  boxax = ladder_width;
638  boxaz = ladder_thick;
639 
640  DDSolid solid_a = DDSolidFactory::box(dd_tmp_name_a, boxax / 2, boxay / 2, boxaz / 2.);
641  if (ladd_side == 0)
642  sdxe[enb] = ladder_width / 4;
643  sdye[enb] = -boxay / 2 - LdrFrnt_Length / 2;
644  sdze[enb] = -ladder_thick / 2. + LdrFrnt_Offset;
645  if (ladd_side == 1)
646  sdxe[enb] = -ladder_width / 4;
647 
648  DDSolid solid_b = DDSolidFactory::unionSolid(dd_tmp_name_b,
649  solid_a,
650  solid_lfhalf,
651  DDTranslation(sdxe[enb], sdye[enb], sdze[enb]),
652  DDRotation("esalgo:RM1299"));
653 
654  sdxe2[enb] = 0;
655  sdye2[enb] = boxay / 2 + LdrBck_Length / 2;
656  sdze2[enb] = -ladder_thick / 2. + LdrBck_Offset;
657 
658  DDSolid solid = DDSolidFactory::unionSolid(ddname,
659  solid_b,
660  solid_lbck,
661  DDTranslation(sdxe2[enb], sdye2[enb], sdze2[enb]),
662  DDRotation("esalgo:RM1299"));
663 
665  DDName ddname2(getLadPrefix(1) + types_l4_[d], "esalgo");
666  DDLogicalPart ladder2 = DDLogicalPart(ddname2, getLaddMaterial(), solid);
667  } else {
668  enb++;
669  DDName dd_tmp_name_a(getLadPrefix(7), "esalgo");
670  tmp_name_b << getLadPrefix(8) << enb;
671  DDName dd_tmp_name_b(tmp_name_b.str(), "esalgo");
672  tmp_name_c << getLadPrefix(9) << enb;
673  DDName dd_tmp_name_c(tmp_name_c.str(), "esalgo");
674  tmp_name_d << getLadPrefix(10) << enb;
675  DDName dd_tmp_name_d(tmp_name_d.str(), "esalgo");
676  DDName dd_tmp_name_e(getLadPrefix(11), "esalgo");
677 
679  boxax = ladder_width;
680  boxaz = ladder_thick;
681  DDSolid solid_a = DDSolidFactory::box(dd_tmp_name_a, boxax / 2, boxay / 2, boxaz / 2.);
682  if (ladd_side == 0)
683  sdxe[enb] = ladder_width / 4;
684  sdye[enb] = -boxay / 2 - LdrFrnt_Length / 2;
685  sdze[enb] = -ladder_thick / 2. + LdrFrnt_Offset;
686  if (ladd_side == 1)
687  sdxe[enb] = -ladder_width / 4;
688 
689  DDSolid solid_b = DDSolidFactory::unionSolid(dd_tmp_name_b,
690  solid_a,
691  solid_lfhalf,
692  DDTranslation(sdxe[enb], sdye[enb], sdze[enb]),
693  DDRotation("esalgo:RM1299"));
694 
695  if (ladd_side == 0)
696  sdxe2[enb] = -ladder_width / 4;
697  sdye2[enb] = -boxay / 2 - LdrFrnt_Length / 2 + waf_active / 2;
698  sdze2[enb] = -ladder_thick / 2. + LdrFrnt_Offset + (waf_active * sin(wedge_angle * 2)) / 4;
699  if (ladd_side == 1)
700  sdxe2[enb] = ladder_width / 4;
701 
702  DDSolid solid_c = DDSolidFactory::unionSolid(dd_tmp_name_c,
703  solid_b,
704  solid_lfhtrunc,
705  DDTranslation(sdxe2[enb], sdye2[enb], sdze2[enb]),
706  DDRotation("esalgo:RM1299"));
707 
708  sdxe3[enb] = 0;
709  sdye3[enb] = boxay / 2 + LdrBck_Length / 2;
710  sdze3[enb] = -ladder_thick / 2. + LdrBck_Offset;
711  DDSolid solid = DDSolidFactory::unionSolid(ddname,
712  solid_c,
713  solid_lbck,
714  DDTranslation(sdxe3[enb], sdye3[enb], sdze3[enb]),
715  DDRotation("esalgo:RM1299"));
716 
718  DDName ddname2(getLadPrefix(1) + types_l4_[d], "esalgo");
719  DDLogicalPart ladder2 = DDLogicalPart(ddname2, getLaddMaterial(), solid);
720  }
721  }
722 
723  } //end of not plain ladder shape
724  else {
725  DDName dd_tmp_name_pa(getLadPrefix(2) + "p", "esalgo");
726  DDName dd_tmp_name_pb(getLadPrefix(3) + "p", "esalgo");
727 
729  boxax = ladder_width;
730  boxaz = ladder_thick;
731 
732  DDSolid solid_pa = DDSolidFactory::box(dd_tmp_name_pa, boxax / 2, boxay / 2, boxaz / 2.);
733  sdx = 0;
734  sdy = -boxay / 2 - LdrFrnt_Length / 2;
735  sdz = -ladder_thick / 2. + LdrFrnt_Offset;
736 
738  dd_tmp_name_pb, solid_pa, solid_lfront, DDTranslation(sdx, sdy, sdz), DDRotation("esalgo:RM1299"));
739 
740  sdx = 0;
741  sdy = boxay / 2 + LdrBck_Length / 2;
742  sdz = -ladder_thick / 2. + LdrBck_Offset;
744  ddname, solid_pb, solid_lbck, DDTranslation(sdx, sdy, sdz), DDRotation("esalgo:RM1299"));
746  DDName ddname2(getLadPrefix(1) + types_l4_[d], "esalgo");
747  DDLogicalPart ladder2 = DDLogicalPart(ddname2, getLaddMaterial(), solid);
748  }
749  }
750 
751  // insert SWED, SFBX and SFBY into ladders
752  swed_scopy_glob++;
753  if (M < int(types_l5_.size())) {
754  DDName ddname(getLadPrefix(0) + types_l5_[M], "esalgo");
755  DDName ddname2(getLadPrefix(1) + types_l5_[M], "esalgo");
756  for (int i = 0; i <= 1; i++) {
757  for (int j = 0; j <= 4; j++) {
758  xpos = (i * 2 - 1) * waf_intra_col_sep / 2.;
759  ypos = -ladder_length / 2. + 0.05 * mm - (LdrFrnt_Length - LdrBck_Length) / 2 + wedge_length / 2. +
760  j * waf_active;
761  zpos = -ladder_thick / 2. + 0.005 * mm + wedge_offset;
762  if (ladd_l5_map_[(i + j * 2 + M * 10)] == 1) {
763  scopy++;
764  cpv.position(DDLogicalPart("esalgo:SWED"),
765  ddname,
766  scopy + 1000 * swed_scopy_glob,
767  DDTranslation(xpos, ypos, zpos),
768  DDRotation("esalgo:RM1299"));
769  cpv.position(DDLogicalPart("esalgo:SWED"),
770  ddname2,
771  scopy + 1000 * swed_scopy_glob + 100,
772  DDTranslation(xpos, ypos, zpos),
773  DDRotation("esalgo:RM1299"));
774 
775  ypos = ypos + ywedge_ceramic_diff;
776  zpos = -ladder_thick / 2. + 0.005 * mm + zwedge_ceramic_diff;
777  cpv.position(DDLogicalPart("esalgo:SFBX"),
778  ddname,
779  scopy + 1000 * swed_scopy_glob,
780  DDTranslation(xpos, ypos, zpos),
781  DDRotation("esalgo:RM1298"));
782  cpv.position(DDLogicalPart("esalgo:SFBY"),
783  ddname2,
784  scopy + 1000 * swed_scopy_glob,
785  DDTranslation(xpos, ypos, zpos),
786  DDRotation("esalgo:RM1300A"));
787  }
788  }
789  }
790  } else {
791  int d = M - types_l5_.size();
792  DDName ddname(getLadPrefix(0) + types_l4_[d], "esalgo");
793  DDName ddname2(getLadPrefix(1) + types_l4_[d], "esalgo");
794  for (int i = 0; i <= 1; i++) {
795  for (int j = 0; j <= 3; j++) {
796  xpos = (i * 2 - 1) * waf_intra_col_sep / 2.;
797  ypos = -ladder_length / 2. + 0.05 * mm - (LdrFrnt_Length - LdrBck_Length) / 2 + wedge_length / 2. +
798  j * waf_active;
799  zpos = -ladder_thick / 2. + 0.005 * mm + wedge_offset;
800  if (ladd_l4_map_[(i + j * 2 + (M - types_l5_.size()) * 8)] == 1) {
801  scopy++;
802  cpv.position(DDLogicalPart("esalgo:SWED"),
803  ddname,
804  scopy + 1000 * swed_scopy_glob,
805  DDTranslation(xpos, ypos, zpos),
806  DDRotation("esalgo:RM1299"));
807  cpv.position(DDLogicalPart("esalgo:SWED"),
808  ddname2,
809  scopy + 1000 * swed_scopy_glob + 100,
810  DDTranslation(xpos, ypos, zpos),
811  DDRotation("esalgo:RM1299"));
812 
813  ypos = ypos + ywedge_ceramic_diff;
814  zpos = -ladder_thick / 2. + 0.005 * mm + zwedge_ceramic_diff;
815  cpv.position(DDLogicalPart("esalgo:SFBX"),
816  ddname,
817  scopy + 1000 * swed_scopy_glob,
818  DDTranslation(xpos, ypos, zpos),
819  DDRotation("esalgo:RM1298"));
820  cpv.position(DDLogicalPart("esalgo:SFBY"),
821  ddname2,
822  scopy + 1000 * swed_scopy_glob,
823  DDTranslation(xpos, ypos, zpos),
824  DDRotation("esalgo:RM1300A"));
825  }
826  }
827  }
828  }
829  }
830 
831  // Positioning of ladders
832 
834  int icopy[100] = {0};
835 
836  for (int I = -9; I <= 9; ++I) {
837  prev_length_ = 0;
838  int J = std::abs(I);
839  for (int K = 0; K < noLaddInCol_[J]; K++) {
841 
842  ladder_new_length_ = micromodule_length + 3 * waf_active;
843  ladd_shift_ = 4 * waf_active;
844 
845  if (K == 0)
846  type = typeOfLaddRow0[J];
847  if (K == 1)
848  type = typeOfLaddRow1[J];
849  if (K == 2)
850  type = typeOfLaddRow2[J];
851  if (K == 3)
852  type = typeOfLaddRow3[J];
853 
854  for (const auto& i : types_l5_)
855  if (type == i) {
856  ladder_new_length_ = micromodule_length + 4 * waf_active;
857  ladd_shift_ = 5 * waf_active;
858  }
859 
860  int j = 0;
861 
862  for (int t = 0; t < int(types_l5_.size()); t++)
863  if (type == types_l5_[t]) {
864  j = t;
865  if (I < 0 && asym_ladd_[t] == 1) {
866  j = j + 1;
867  type = types_l5_[j];
868  }
869  }
870  for (int t = 0; t < int(types_l4_.size()); t++)
871  if (type == types_l4_[t]) {
872  j = t + types_l5_.size();
873  if (I < 0 && asym_ladd_[(t + types_l5_.size())] == 1) {
874  j = j + 1;
875  type = types_l4_[j - types_l5_.size()];
876  }
877  }
878 
879  xpos = I * (2 * waf_intra_col_sep + waf_inter_col_sep);
880  if (I > 0)
881  xpos = xpos + dee_separation;
882  if (I < 0)
883  xpos = xpos - dee_separation;
884 
885  int sz = 20;
886  ypos = (sz - int(startOfFirstLadd_[J])) * waf_active - ladder_new_length_ / 2. +
887  (LdrFrnt_Length - LdrBck_Length) / 2 + micromodule_length + 0.05 * cm - prev_length_;
888 
889  prev_length_ += ladd_shift_;
890 
891  zpos = zlead1_ + ladder_thick / 2. + 0.01 * mm;
892  icopy[j] += 1;
893  DDName ddname(getLadPrefix(0) + type, "esalgo");
894 
895  cpv.position(
896  DDLogicalPart(ddname), DDName("SF", "esalgo"), icopy[j], DDTranslation(xpos, ypos, zpos), DDRotation());
897 
898  DDName ddname2(getLadPrefix(1) + type, "esalgo");
899 
900  xpos = I * (2 * waf_intra_col_sep + waf_inter_col_sep);
901 
902  cpv.position(DDLogicalPart(ddname2),
903  DDName("SF", "esalgo"),
904  icopy[j],
905  DDTranslation(ypos, -xpos, zpos - zlead1_ + zlead2_),
906  DDRotation("esalgo:R270"));
907 
908  int changed = 0;
909  for (int t = 0; t < int(types_l5_.size()); t++)
910  if (type == types_l5_[t]) {
911  j = t;
912  if (asym_ladd_[t] == 2 && !changed) {
913  j = j - 1;
914  changed = 1;
915  }
916  if (asym_ladd_[t] == 1 && !changed) {
917  j = j + 1;
918  changed = 1;
919  }
920  type = types_l5_[j];
921  }
922  for (int t = 0; t < int(types_l4_.size()); t++)
923  if (type == types_l4_[t]) {
924  j = t + types_l5_.size();
925  if (asym_ladd_[(t + types_l5_.size())] == 2 && !changed) {
926  j = j - 1;
927  changed = 1;
928  }
929  if (asym_ladd_[(t + types_l5_.size())] == 1 && !changed) {
930  j = j + 1;
931  changed = 1;
932  }
933  type = types_l4_[j - types_l5_.size()];
934  }
935 
936  icopy[j] += 1;
937 
938  if (I > 0)
939  xpos = xpos + dee_separation;
940  if (I < 0)
941  xpos = xpos - dee_separation;
942 
943  DDName ddname3(getLadPrefix(0) + type, "esalgo");
944  cpv.position(DDLogicalPart(ddname3),
945  DDName("SF", "esalgo"),
946  icopy[j],
947  DDTranslation(xpos, -ypos, zpos),
948  DDRotation("esalgo:R180"));
949 
950  DDName ddname4(getLadPrefix(1) + type, "esalgo");
951 
952  xpos = I * (2 * waf_intra_col_sep + waf_inter_col_sep);
953 
954  cpv.position(DDLogicalPart(ddname4),
955  DDName("SF", "esalgo"),
956  icopy[j],
957  DDTranslation(-ypos, -xpos, zpos - zlead1_ + zlead2_),
958  DDRotation("esalgo:R090"));
959  }
960  }
961 }
962 
964  double xpos(0), ypos(0);
965  for (size_t i = 0; i < 32; ++i) {
966  xpos = -waf_active / 2. + i * waf_active / 32. + waf_active / 64.;
967  cpv.position(
968  DDLogicalPart("esalgo:SFSX"), DDName("SFWX", "esalgo"), i + 1, DDTranslation(xpos, 0., 0.), DDRotation());
969 
970  LogDebug("SFGeom") << " debug : SFSX, Logical part: " << DDLogicalPart("esalgo:SFSX") << "\n translation "
971  << DDTranslation(xpos, 0., 0.) << " rotation " << DDRotation() << " copy number= " << i << "\n";
972 
973  ypos = -waf_active / 2. + i * waf_active / 32. + waf_active / 64.;
974  cpv.position(
975  DDLogicalPart("esalgo:SFSY"), DDName("SFWY", "esalgo"), i + 1, DDTranslation(0., ypos, 0.), DDRotation());
976 
977  LogDebug("SFGeom") << " debug : SFSY, Logical part: " << DDLogicalPart("esalgo:SFSY") << "\n translation "
978  << DDTranslation(0., ypos, 0.) << " rotation " << DDRotation() << " copy number= " << i << "\n";
979  }
980 }
981 
983 
984 DEFINE_EDM_PLUGIN(DDAlgorithmFactory, DDEcalPreshowerAlgo, "ecal:DDEcalPreshowerAlgo");
DDEcalPreshowerAlgo::LdrFrnt_Length
double LdrFrnt_Length
Definition: DDEcalPreshowerAlgo.cc:66
DDEcalPreshowerAlgo::doLadders
void doLadders(DDCompactView &pos)
Definition: DDEcalPreshowerAlgo.cc:369
DDEcalPreshowerAlgo::ceramic_length
double ceramic_length
Definition: DDEcalPreshowerAlgo.cc:66
dttmaxenums::L
Definition: DTTMax.h:29
DDEcalPreshowerAlgo::absAlX_Y_
double absAlX_Y_
Definition: DDEcalPreshowerAlgo.cc:64
DDEcalPreshowerAlgo::waf_inter_col_sep
double waf_inter_col_sep
Definition: DDEcalPreshowerAlgo.cc:61
mps_fire.i
i
Definition: mps_fire.py:428
DDEcalPreshowerAlgo::abs1stx
std::vector< double > abs1stx
Definition: DDEcalPreshowerAlgo.cc:42
DDEcalPreshowerAlgo::doSens
void doSens(DDCompactView &pos)
Definition: DDEcalPreshowerAlgo.cc:963
MessageLogger.h
DDName
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
DDEcalPreshowerAlgo::typeOfLaddRow2
std::vector< std::string > typeOfLaddRow2
Definition: DDEcalPreshowerAlgo.cc:57
DDEcalPreshowerAlgo::DDEcalPreshowerAlgo
DDEcalPreshowerAlgo()
Definition: DDEcalPreshowerAlgo.cc:69
DDEcalPreshowerAlgo::absAlX_X_
double absAlX_X_
Definition: DDEcalPreshowerAlgo.cc:64
DDEcalPreshowerAlgo::absAlY_subtr1_Yshift_
double absAlY_subtr1_Yshift_
Definition: DDEcalPreshowerAlgo.cc:65
DDEcalPreshowerAlgo::thickness_
double thickness_
Definition: DDEcalPreshowerAlgo.cc:36
pos
Definition: PixelAliasList.h:18
DDEcalPreshowerAlgo::typeOfLaddRow0
std::vector< std::string > typeOfLaddRow0
Definition: DDEcalPreshowerAlgo.cc:55
DDEcalPreshowerAlgo::getLadPrefix
std::string getLadPrefix(unsigned int i) const
Definition: DDEcalPreshowerAlgo.cc:20
DDEcalPreshowerAlgo::getMaterial
DDMaterial getMaterial(unsigned int i) const
Definition: DDEcalPreshowerAlgo.cc:17
DDEcalPreshowerAlgo::micromodule_length
double micromodule_length
Definition: DDEcalPreshowerAlgo.cc:63
DDEcalPreshowerAlgo::types_l4_
std::vector< std::string > types_l4_
Definition: DDEcalPreshowerAlgo.cc:52
DDEcalPreshowerAlgo::noLaddInCol_
std::vector< double > noLaddInCol_
Definition: DDEcalPreshowerAlgo.cc:49
DDEcalPreshowerAlgo::zlead1_
double zlead1_
Definition: DDEcalPreshowerAlgo.cc:60
DDEcalPreshowerAlgo::nmat_
int nmat_
Definition: DDEcalPreshowerAlgo.cc:35
DDEcalPreshowerAlgo::dee_separation
double dee_separation
Definition: DDEcalPreshowerAlgo.cc:61
DDEcalPreshowerAlgo::layName_
std::vector< std::string > layName_
Definition: DDEcalPreshowerAlgo.cc:38
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
DDEcalPreshowerAlgo::LdrFrnt_Offset
double LdrFrnt_Offset
Definition: DDEcalPreshowerAlgo.cc:66
DDEcalPreshowerAlgo::ladd_l5_map_
std::vector< double > ladd_l5_map_
Definition: DDEcalPreshowerAlgo.cc:53
DDEcalPreshowerAlgo::initialize
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
Definition: DDEcalPreshowerAlgo.cc:73
DDMaterial
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:45
DDSolidFactory::subtraction
static DDSolid subtraction(const DDName &name, const DDSolid &a, const DDSolid &b, const DDTranslation &t, const DDRotation &r)
Definition: DDSolid.cc:585
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Exhume::I
const std::complex< double > I
Definition: I.h:8
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
DDEcalPreshowerAlgo::abs2ndx
std::vector< double > abs2ndx
Definition: DDEcalPreshowerAlgo.cc:44
DDEcalPreshowerAlgo::LdrBck_Offset
double LdrBck_Offset
Definition: DDEcalPreshowerAlgo.cc:66
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
DDEcalPreshowerAlgo::abs1sty
std::vector< double > abs1sty
Definition: DDEcalPreshowerAlgo.cc:43
DDEcalPreshowerAlgo::waf_active
double waf_active
Definition: DDEcalPreshowerAlgo.cc:61
DDSolidFactory::tubs
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
Definition: DDSolid.cc:653
DDSolid.h
DDEcalPreshowerAlgo::zfoam1_
double zfoam1_
Definition: DDEcalPreshowerAlgo.cc:60
DDEcalPreshowerAlgo::LaddMaterial_
std::string LaddMaterial_
Definition: DDEcalPreshowerAlgo.cc:40
DDEcalPreshowerAlgo::types_l5_
std::vector< std::string > types_l5_
Definition: DDEcalPreshowerAlgo.cc:51
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: PluginFactory.h:124
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DDEcalPreshowerAlgo::wedge_offset
double wedge_offset
Definition: DDEcalPreshowerAlgo.cc:61
DDEcalPreshowerAlgo::doLayers
void doLayers(DDCompactView &pos)
Definition: DDEcalPreshowerAlgo.cc:146
DDEcalPreshowerAlgo::ladd_l4_map_
std::vector< double > ladd_l4_map_
Definition: DDEcalPreshowerAlgo.cc:54
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
DDEcalPreshowerAlgo::wedge_length
double wedge_length
Definition: DDEcalPreshowerAlgo.cc:61
DDEcalPreshowerAlgo::typeOfLaddRow1
std::vector< std::string > typeOfLaddRow1
Definition: DDEcalPreshowerAlgo.cc:56
DDEcalPreshowerAlgo::box_thick
double box_thick
Definition: DDEcalPreshowerAlgo.cc:61
DDEcalPreshowerAlgo::zwedge_ceramic_diff
double zwedge_ceramic_diff
Definition: DDEcalPreshowerAlgo.cc:61
DDEcalPreshowerAlgo::absAlX_subtr1_Xshift_
double absAlX_subtr1_Xshift_
Definition: DDEcalPreshowerAlgo.cc:64
DDEcalPreshowerAlgo::ladPfx_
std::vector< std::string > ladPfx_
Definition: DDEcalPreshowerAlgo.cc:39
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
DDEcalPreshowerAlgo::ladder_width
double ladder_width
Definition: DDEcalPreshowerAlgo.cc:63
DDEcalPreshowerAlgo
Definition: DDEcalPreshowerAlgo.cc:15
edmplugin::PluginFactory
Definition: PluginFactory.h:34
DDEcalPreshowerAlgo::yladder_1stwedge_diff
double yladder_1stwedge_diff
Definition: DDEcalPreshowerAlgo.cc:63
DDEcalPreshowerAlgo::typeOfLaddRow3
std::vector< std::string > typeOfLaddRow3
Definition: DDEcalPreshowerAlgo.cc:58
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:39
DDLogicalPart
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
Definition: DDLogicalPart.h:93
DDTypes.h
DDEcalPreshowerAlgo::abs2ndy
std::vector< double > abs2ndy
Definition: DDEcalPreshowerAlgo.cc:45
DDEcalPreshowerAlgo::wedge_back_thick
double wedge_back_thick
Definition: DDEcalPreshowerAlgo.cc:66
DDMaterial.h
DDEcalPreshowerAlgo::zfoam2_
double zfoam2_
Definition: DDEcalPreshowerAlgo.cc:60
createfilelist.int
int
Definition: createfilelist.py:10
DDEcalPreshowerAlgo::rMax_Abs_Al_
double rMax_Abs_Al_
Definition: DDEcalPreshowerAlgo.cc:64
DDEcalPreshowerAlgo::asym_ladd_
std::vector< double > asym_ladd_
Definition: DDEcalPreshowerAlgo.cc:46
DDEcalPreshowerAlgo::absAlY_subtr1_Xshift_
double absAlY_subtr1_Xshift_
Definition: DDEcalPreshowerAlgo.cc:65
DDLogicalPart.h
DDEcalPreshowerAlgo::zlead2_
double zlead2_
Definition: DDEcalPreshowerAlgo.cc:60
DDSolidFactory::unionSolid
static DDSolid unionSolid(const DDName &name, const DDSolid &a, const DDSolid &b, const DDTranslation &t, const DDRotation &r)
Definition: DDSolid.cc:580
DDEcalPreshowerAlgo::absAlX_subtr1_Yshift_
double absAlX_subtr1_Yshift_
Definition: DDEcalPreshowerAlgo.cc:64
ReadMapType< double >
DDEcalPreshowerAlgo::ladder_length
double ladder_length
Definition: DDEcalPreshowerAlgo.cc:63
DDAlgorithm.h
DDEcalPreshowerAlgo::LdrBck_Length
double LdrBck_Length
Definition: DDEcalPreshowerAlgo.cc:66
DDEcalPreshowerAlgo::absAlY_X_
double absAlY_X_
Definition: DDEcalPreshowerAlgo.cc:65
PVValHelper::ladder
Definition: PVValidationHelpers.h:72
DDEcalPreshowerAlgo::rminVec
std::vector< double > rminVec
Definition: DDEcalPreshowerAlgo.cc:47
DDEcalPreshowerAlgo::getLayName
std::string getLayName(unsigned int i) const
Definition: DDEcalPreshowerAlgo.cc:19
DDEcalPreshowerAlgo::thickLayers_
std::vector< double > thickLayers_
Definition: DDEcalPreshowerAlgo.cc:41
DDEcalPreshowerAlgo::waf_intra_col_sep
double waf_intra_col_sep
Definition: DDEcalPreshowerAlgo.cc:61
DDSolid
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
DDEcalPreshowerAlgo::startOfFirstLadd_
std::vector< double > startOfFirstLadd_
Definition: DDEcalPreshowerAlgo.cc:50
DDEcalPreshowerAlgo::execute
void execute(DDCompactView &pos) override
Definition: DDEcalPreshowerAlgo.cc:135
DDEcalPreshowerAlgo::getLaddMaterial
DDMaterial getLaddMaterial() const
Definition: DDEcalPreshowerAlgo.cc:18
ztail.d
d
Definition: ztail.py:151
DDEcalPreshowerAlgo::absAlY_Y_
double absAlY_Y_
Definition: DDEcalPreshowerAlgo.cc:65
DDEcalPreshowerAlgo::In_rad_Abs_Al
double In_rad_Abs_Al
Definition: DDEcalPreshowerAlgo.cc:61
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
DDEcalPreshowerAlgo::ladder_thick
double ladder_thick
Definition: DDEcalPreshowerAlgo.cc:63
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
DDSolidFactory::box
static DDSolid box(const DDName &name, double xHalf, double yHalf, double zHalf)
Creates a box with side length 2*xHalf, 2*yHalf, 2*zHalf.
Definition: DDSolid.cc:533
DDEcalPreshowerAlgo::rmaxVec
std::vector< double > rmaxVec
Definition: DDEcalPreshowerAlgo.cc:48
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
DDAlgorithmFactory.h
DDSolidFactory::trap
static DDSolid trap(const DDName &name, double pDz, double pTheta, double pPhi, double pDy1, double pDx1, double pDx2, double pAlp1, double pDy2, double pDx3, double pDx4, double pAlp2)
Definition: DDSolid.cc:595
DDEcalPreshowerAlgo::wedge_angle
double wedge_angle
Definition: DDEcalPreshowerAlgo.cc:61
class-composition.parent
parent
Definition: class-composition.py:88
DDEcalPreshowerAlgo::materials_
std::vector< std::string > materials_
Definition: DDEcalPreshowerAlgo.cc:37
DDEcalPreshowerAlgo::In_rad_Abs_Pb
double In_rad_Abs_Pb
Definition: DDEcalPreshowerAlgo.cc:61
DDCompactView::position
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
Definition: DDCompactView.cc:76
DDRotation
ROOT::Math::Rotation3D DDRotation
Definition: DDEcalEndcapAlgo.cc:18
DDEcalPreshowerAlgo::ywedge_ceramic_diff
double ywedge_ceramic_diff
Definition: DDEcalPreshowerAlgo.cc:61