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) {
std::vector< double > startOfFirstLadd_
Log< level::Info, true > LogVerbatim
std::vector< std::string > types_l4_
std::vector< std::string > typeOfLaddRow2
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
std::string getLayName(unsigned int i) const
double micromodule_length
std::vector< double > abs1stx
DDMaterial is used to define and access material information.
Sin< T >::type sin(const T &t)
DDName is used to identify DDD entities uniquely.
double yladder_1stwedge_diff
std::vector< double > rmaxVec
double zwedge_ceramic_diff
std::vector< double > ladd_l4_map_
void doLayers(DDCompactView &pos)
Compact representation of the geometrical detector hierarchy.
DDMaterial getLaddMaterial() const
double absAlX_subtr1_Yshift_
A DDSolid represents the shape of a part.
constexpr std::array< uint8_t, layerIndexSize > layer
Represents a uniquely identifyable rotation matrix.
std::vector< double > asym_ladd_
std::vector< std::string > typeOfLaddRow1
Cos< T >::type cos(const T &t)
double ywedge_ceramic_diff
Abs< T >::type abs(const T &t)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
const std::complex< double > I
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
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)
void doLadders(DDCompactView &pos)
static DDSolid box(const DDName &name, double xHalf, double yHalf, double zHalf)
Creates a box with side length 2*xHalf, 2*yHalf, 2*zHalf.
void doSens(DDCompactView &pos)
std::string LaddMaterial_
std::vector< double > abs1sty
std::vector< std::string > typeOfLaddRow3
static DDSolid subtraction(const DDName &name, const DDSolid &a, const DDSolid &b, const DDTranslation &t, const DDRotation &r)
std::vector< double > thickLayers_
DDMaterial getMaterial(unsigned int i) const
std::string getLadPrefix(unsigned int i) const
std::vector< double > rminVec
void execute(DDCompactView &pos) override
std::vector< std::string > materials_
std::vector< double > ladd_l5_map_
double absAlX_subtr1_Xshift_
std::vector< std::string > typeOfLaddRow0
#define DEFINE_EDM_PLUGIN(factory, type, name)
static DDSolid unionSolid(const DDName &name, const DDSolid &a, const DDSolid &b, const DDTranslation &t, const DDRotation &r)
std::vector< double > abs2ndx
std::vector< double > noLaddInCol_
std::vector< std::string > ladPfx_
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
std::vector< double > abs2ndy
std::vector< std::string > types_l5_
std::vector< std::string > layName_
double absAlY_subtr1_Yshift_
double absAlY_subtr1_Xshift_