8 #include "CLHEP/Units/GlobalSystemOfUnits.h"
73 edm::LogVerbatim(
"EcalGeom") <<
"DDEcalPreshowerAlgo info: Creating an instance";
152 double zpos = -
thickness_ / 2., sdx(0), sdy(0), bdx(0), bdy(0);
157 double rIn(0), rOut(0), zHalf(0);
170 edm::LogVerbatim(
"SFGeomX") << ddname <<
" Tubs " << zHalf <<
":" << rIn <<
":" << rOut <<
":0:360";
179 if (
I == 2 ||
I == 28 ||
I == 13 ||
I == 23) {
191 if (
I == 10 ||
I == 20) {
194 double outalbx, outalby, shiftR, outalbx2, outalby2, shiftR2;
199 int cutabsx = -1, cutabsy = -1;
207 std::ostringstream tmp_Alname_fin;
208 tmp_Alname_fin <<
getLayName(
i) <<
"LtmpAl" << absz - 1;
209 DDName dd_Alname_fin(tmp_Alname_fin.str(),
"esalgo");
243 edm::LogVerbatim(
"SFGeomX") << dd_Alname_h <<
" Box " << (outalbx / 2 + 0.1 * mm) <<
":"
244 << (outalby / 2 + 0.1 * mm) <<
":" << zHalf;
246 <<
DDTranslation(outalbx / 2, outalby / 2 + shiftR, 0) <<
" no rotation";
266 edm::LogVerbatim(
"SFGeomX") << dd_Alname_i <<
" Box " << (outalbx2 / 2 + 0.1 * mm) <<
":"
267 << (outalby2 / 2 + 0.1 * mm) <<
":" << zHalf;
269 <<
" at " <<
DDTranslation(outalbx2 / 2 + shiftR2, outalby2 / 2, 0) <<
" no rotation";
279 for (
int L = 0;
L < absz; ++
L) {
281 std::ostringstream tmp_name_b, tmp_name_b2, tmp_FAl_name_c, tmp_FAl_name_d1, tmp_FAl_name_d2, tmp_FAl_name_d3,
289 tmp_FAl_name_c <<
getLayName(
i) <<
"LtmpAl" << K - 1;
291 tmp_FAl_name_d1 <<
getLayName(
i) <<
"LtmpAl" << K <<
"_1";
292 tmp_FAl_name_d2 <<
getLayName(
i) <<
"LtmpAl" << K <<
"_2";
293 tmp_FAl_name_d3 <<
getLayName(
i) <<
"LtmpAl" << K <<
"_3";
296 DDName dd_tmp_name_b(tmp_name_b.str(),
"esalgo");
297 DDName dd_tmp_name_b2(tmp_name_b2.str(),
"esalgo");
298 DDName dd_FAl_name_c(tmp_FAl_name_c.str(),
"esalgo");
299 DDName dd_FAl_name_d1(tmp_FAl_name_d1.str(),
"esalgo");
300 DDName dd_FAl_name_d2(tmp_FAl_name_d2.str(),
"esalgo");
301 DDName dd_FAl_name_d3(tmp_FAl_name_d3.str(),
"esalgo");
302 DDName dd_FAl_name_d(tmp_FAl_name_d.str(),
"esalgo");
309 if (
abs1stx[K] < rIn + 30 * cm) {
310 bdy =
abs1sty[K] / 2 - 30 * cm;
322 if ((
abs2ndx[K] < rIn + 30 * cm) &&
I == 20) {
323 bdy =
abs2ndy[K] / 2 - 30 * cm;
330 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_b <<
" Box " << bdx <<
":" << bdy <<
":" << zHalf;
331 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_b2 <<
" Box " << (bdx + 0.1 * mm) <<
":" << (bdy + 0.1 * mm) <<
":"
337 if (
abs1stx[K] < rIn + 30 * cm)
344 if ((
abs2ndx[K] < rIn + 30 * cm) &&
I == 20)
368 if (((
abs1stx[K] < rIn + 30 * cm) &&
I == 10) || ((
abs2ndx[K] < rIn + 30 * cm) &&
I == 20)) {
410 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_b <<
" Box " << bdx <<
":" << bdy <<
":" << zHalf;
414 <<
" at (0,0,0) no rotation";
451 double xpos(0), ypos(0), zpos(0), sdx(0), sdy(0), sdz(0);
452 double prev_length_(0), ladder_new_length_(0), ladd_shift_(0),
ladder_length(0);
453 int enb(0), swed_scopy_glob(0);
454 double sdxe[50] = {0}, sdye[50] = {0}, sdze[50] = {0};
455 double sdxe2[50] = {0}, sdye2[50] = {0}, sdze2[50] = {0}, sdxe3[50] = {0}, sdye3[50] = {0}, sdze3[50] = {0};
459 double boxax(0), boxay(0), boxaz(0);
460 int ladd_not_plain(0), ladd_subtr_no(0), ladd_upper(0), ladd_side(0);
561 for (
int i = 0;
i <= 1;
i++) {
562 for (
int j = 0;
j <= 3;
j++) {
573 edm::LogVerbatim(
"SFGeomX") <<
"Side " << ladd_side <<
":" << ladd_upper <<
":" << ladd_subtr_no <<
":"
574 << ladd_not_plain <<
" Index " << M <<
":" <<
types_l5_.size();
579 if (ladd_not_plain) {
581 std::ostringstream tmp_name_5b, tmp_name_5c, tmp_name_5d;
586 std::ostringstream tmp_name_5b, tmp_name_5c, tmp_name_5d;
589 DDName dd_tmp_name_5b(tmp_name_5b.str(),
"esalgo");
591 DDName dd_tmp_name_5c(tmp_name_5c.str(),
"esalgo");
593 DDName dd_tmp_name_5d(tmp_name_5d.str(),
"esalgo");
603 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_5a <<
" Box " << (boxax / 2) <<
":" << (boxay / 2) <<
":"
621 <<
" rotation esalgo:RM1299";
638 <<
" at " <<
DDTranslation(sdxe2[enb], sdye2[enb], sdze2[enb])
639 <<
" rotation esalgo:RM1299";
652 <<
DDTranslation(sdxe3[enb], sdye3[enb], sdze3[enb]) <<
" rotation esalgo:RM1299";
671 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_5pa <<
" Box " << (boxax / 2) <<
":" << (boxay / 2) <<
":"
682 <<
" at " <<
DDTranslation(sdx, sdy, sdz) <<
" rotation esalgo:RM1299";
693 <<
DDTranslation(sdx, sdy, sdz) <<
" rotation esalgo:RM1299";
707 for (
int i = 0;
i <= 1;
i++) {
708 for (
int j = 0;
j <= 3;
j++) {
719 edm::LogVerbatim(
"SFGeomX") <<
"Side " << ladd_side <<
":" << ladd_upper <<
":" << ladd_subtr_no <<
":"
720 << ladd_not_plain <<
" Index " << M <<
":" <<
types_l5_.size();
725 if (ladd_not_plain) {
726 std::ostringstream tmp_name_b, tmp_name_c, tmp_name_d;
732 DDName dd_tmp_name_b(tmp_name_b.str(),
"esalgo");
734 DDName dd_tmp_name_c(tmp_name_c.str(),
"esalgo");
736 DDName dd_tmp_name_d(tmp_name_d.str(),
"esalgo");
744 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_a <<
" Box " << (boxax / 2) <<
":" << (boxay / 2) <<
":"
759 <<
" rotation esalgo:RM1299";
775 <<
DDTranslation(sdxe2[enb], sdye2[enb], sdze2[enb]) <<
" rotation esalgo:RM1299";
784 if (ladd_subtr_no > 1) {
789 DDName dd_tmp_name_b(tmp_name_b.str(),
"esalgo");
791 DDName dd_tmp_name_c(tmp_name_c.str(),
"esalgo");
793 DDName dd_tmp_name_d(tmp_name_d.str(),
"esalgo");
802 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_a <<
" Box " << (boxax / 2) <<
":" << (boxay / 2) <<
":"
820 <<
" rotation esalgo:RM1299";
835 <<
" rotation esalgo:RM1299";
845 DDName dd_tmp_name_b(tmp_name_b.str(),
"esalgo");
847 DDName dd_tmp_name_c(tmp_name_c.str(),
"esalgo");
849 DDName dd_tmp_name_d(tmp_name_d.str(),
"esalgo");
857 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_a <<
" Box " << (boxax / 2) <<
":" << (boxay / 2) <<
":"
875 <<
" rotation esalgo:RM1299";
892 <<
" at " <<
DDTranslation(sdxe2[enb], sdye2[enb], sdze2[enb])
893 <<
" rotation esalgo:RM1299";
907 <<
" rotation esalgo:RM1299";
927 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_pa <<
" Box " << (boxax / 2) <<
":" << (boxay / 2) <<
":"
938 <<
" at " <<
DDTranslation(sdx, sdy, sdz) <<
" rotation esalgo:RM1299";
948 <<
DDTranslation(sdx, sdy, sdz) <<
" rotation esalgo:RM1299";
961 for (
int i = 0;
i <= 1;
i++) {
962 for (
int j = 0;
j <= 4;
j++) {
971 scopy + 1000 * swed_scopy_glob,
976 scopy + 1000 * swed_scopy_glob + 100,
981 << (scopy + 1000 * swed_scopy_glob) <<
" in " << ddname <<
" at "
982 <<
DDTranslation(xpos, ypos, zpos) <<
" rotation esalgo:RM1299";
984 << (scopy + 1000 * swed_scopy_glob + 100) <<
" in " << ddname2 <<
" at "
985 <<
DDTranslation(xpos, ypos, zpos) <<
" rotation esalgo:RM1299";
991 scopy + 1000 * swed_scopy_glob,
996 scopy + 1000 * swed_scopy_glob,
1001 << (scopy + 1000 * swed_scopy_glob) <<
" in " << ddname <<
" at "
1002 <<
DDTranslation(xpos, ypos, zpos) <<
" rotation esalgo:RM1298";
1004 << (scopy + 1000 * swed_scopy_glob) <<
" in " << ddname2 <<
" at "
1005 <<
DDTranslation(xpos, ypos, zpos) <<
" rotation esalgo:RM1300A";
1014 for (
int i = 0;
i <= 1;
i++) {
1015 for (
int j = 0;
j <= 3;
j++) {
1024 scopy + 1000 * swed_scopy_glob,
1029 scopy + 1000 * swed_scopy_glob + 100,
1034 << (scopy + 1000 * swed_scopy_glob) <<
" in " << ddname <<
" at "
1035 <<
DDTranslation(xpos, ypos, zpos) <<
" rotation esalgo:RM1299";
1037 << (scopy + 1000 * swed_scopy_glob + 100) <<
" in " << ddname2 <<
" at "
1038 <<
DDTranslation(xpos, ypos, zpos) <<
" rotation esalgo:RM1299";
1044 scopy + 1000 * swed_scopy_glob,
1049 scopy + 1000 * swed_scopy_glob,
1054 << (scopy + 1000 * swed_scopy_glob) <<
" in " << ddname <<
" at "
1055 <<
DDTranslation(xpos, ypos, zpos) <<
" rotation esalgo:RM1298";
1057 << (scopy + 1000 * swed_scopy_glob) <<
" in " << ddname2 <<
" at "
1058 <<
DDTranslation(xpos, ypos, zpos) <<
" rotation esalgo:RM1300A";
1069 int icopy[100] = {0};
1071 for (
int I = -9;
I <= 9; ++
I) {
1124 prev_length_ += ladd_shift_;
1148 <<
DDName(
"SF",
"esalgo") <<
" at "
1195 <<
" rotation esalgo:R180";
1208 <<
DDName(
"SF",
"esalgo") <<
" at "
1216 double xpos(0), ypos(0);
1217 for (
size_t i = 0;
i < 32; ++
i) {