8 #include "CLHEP/Units/GlobalSystemOfUnits.h"
70 LogDebug(
"EcalGeom") <<
"DDEcalPreshowerAlgo info: Creating an instance";
78 LogDebug(
"EcalGeom") <<
"DDEcalPreshowerAlgo info: Initialize";
136 LogDebug(
"EcalGeom") <<
"******** DDEcalPreshowerAlgo execute!";
147 double zpos = -
thickness_ / 2., sdx(0), sdy(0), bdx(0), bdy(0);
153 double rIn(0), rOut(0), zHalf(0);
173 if (
I == 2 ||
I == 28 ||
I == 13 ||
I == 23) {
185 if (
I == 10 ||
I == 20) {
188 double outalbx, outalby, shiftR, outalbx2, outalby2, shiftR2;
193 int cutabsx = -1, cutabsy = -1;
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");
251 for (
int L = 0;
L < absz; ++
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,
261 tmp_FAl_name_c <<
getLayName(
i) <<
"LtmpAl" << K - 1;
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";
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");
281 if (
abs1stx[K] < rIn + 30 * cm) {
282 bdy =
abs1sty[K] / 2 - 30 * cm;
294 if ((
abs2ndx[K] < rIn + 30 * cm) &&
I == 20) {
295 bdy =
abs2ndy[K] / 2 - 30 * cm;
304 if (
abs1stx[K] < rIn + 30 * cm)
311 if ((
abs2ndx[K] < rIn + 30 * cm) &&
I == 20)
324 if (((
abs1stx[K] < rIn + 30 * cm) &&
I == 10) || ((
abs2ndx[K] < rIn + 30 * cm) &&
I == 20)) {
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};
378 double boxax(0), boxay(0), boxaz(0);
379 int ladd_not_plain(0), ladd_subtr_no(0), ladd_upper(0), ladd_side(0);
450 for (
int i = 0;
i <= 1;
i++) {
451 for (
int j = 0;
j <= 3;
j++) {
465 if (ladd_not_plain) {
467 std::ostringstream tmp_name_5b, tmp_name_5c, tmp_name_5d;
472 std::ostringstream tmp_name_5b, tmp_name_5c, tmp_name_5d;
475 DDName dd_tmp_name_5b(tmp_name_5b.str(),
"esalgo");
477 DDName dd_tmp_name_5c(tmp_name_5c.str(),
"esalgo");
479 DDName dd_tmp_name_5d(tmp_name_5d.str(),
"esalgo");
563 for (
int i = 0;
i <= 1;
i++) {
564 for (
int j = 0;
j <= 3;
j++) {
578 if (ladd_not_plain) {
579 std::ostringstream tmp_name_b, tmp_name_c, tmp_name_d;
585 DDName dd_tmp_name_b(tmp_name_b.str(),
"esalgo");
587 DDName dd_tmp_name_c(tmp_name_c.str(),
"esalgo");
589 DDName dd_tmp_name_d(tmp_name_d.str(),
"esalgo");
624 if (ladd_subtr_no > 1) {
629 DDName dd_tmp_name_b(tmp_name_b.str(),
"esalgo");
631 DDName dd_tmp_name_c(tmp_name_c.str(),
"esalgo");
633 DDName dd_tmp_name_d(tmp_name_d.str(),
"esalgo");
671 DDName dd_tmp_name_b(tmp_name_b.str(),
"esalgo");
673 DDName dd_tmp_name_c(tmp_name_c.str(),
"esalgo");
675 DDName dd_tmp_name_d(tmp_name_d.str(),
"esalgo");
756 for (
int i = 0;
i <= 1;
i++) {
757 for (
int j = 0;
j <= 4;
j++) {
766 scopy + 1000 * swed_scopy_glob,
771 scopy + 1000 * swed_scopy_glob + 100,
779 scopy + 1000 * swed_scopy_glob,
784 scopy + 1000 * swed_scopy_glob,
794 for (
int i = 0;
i <= 1;
i++) {
795 for (
int j = 0;
j <= 3;
j++) {
804 scopy + 1000 * swed_scopy_glob,
809 scopy + 1000 * swed_scopy_glob + 100,
817 scopy + 1000 * swed_scopy_glob,
822 scopy + 1000 * swed_scopy_glob,
834 int icopy[100] = {0};
836 for (
int I = -9;
I <= 9; ++
I) {
889 prev_length_ += ladd_shift_;
964 double xpos(0), ypos(0);
965 for (
size_t i = 0;
i < 32; ++
i) {
970 LogDebug(
"SFGeom") <<
" debug : SFSX, Logical part: " <<
DDLogicalPart(
"esalgo:SFSX") <<
"\n translation "
977 LogDebug(
"SFGeom") <<
" debug : SFSY, Logical part: " <<
DDLogicalPart(
"esalgo:SFSY") <<
"\n translation "