8 #include <CLHEP/Units/SystemOfUnits.h> 76 edm::LogVerbatim(
"EcalGeom") <<
"DDEcalPreshowerAlgo info: Creating an instance";
155 double zpos = -
thickness_ / 2., sdx(0), sdy(0), bdx(0), bdy(0);
160 double rIn(0), rOut(0), zHalf(0);
173 edm::LogVerbatim(
"SFGeomX") << ddname <<
" Tubs " << zHalf <<
":" << rIn <<
":" << rOut <<
":0:360";
182 if (
I == 2 ||
I == 28 ||
I == 13 ||
I == 23) {
194 if (
I == 10 ||
I == 20) {
197 double outalbx, outalby, shiftR, outalbx2, outalby2, shiftR2;
202 int cutabsx = -1, cutabsy = -1;
210 std::ostringstream tmp_Alname_fin;
211 tmp_Alname_fin <<
getLayName(
i) <<
"LtmpAl" << absz - 1;
212 DDName dd_Alname_fin(tmp_Alname_fin.str(),
"esalgo");
246 edm::LogVerbatim(
"SFGeomX") << dd_Alname_h <<
" Box " << (outalbx / 2 + 0.1 * mm) <<
":" 247 << (outalby / 2 + 0.1 * mm) <<
":" << zHalf;
249 <<
DDTranslation(outalbx / 2, outalby / 2 + shiftR, 0) <<
" no rotation";
269 edm::LogVerbatim(
"SFGeomX") << dd_Alname_i <<
" Box " << (outalbx2 / 2 + 0.1 * mm) <<
":" 270 << (outalby2 / 2 + 0.1 * mm) <<
":" << zHalf;
272 <<
" at " <<
DDTranslation(outalbx2 / 2 + shiftR2, outalby2 / 2, 0) <<
" no rotation";
282 for (
int L = 0;
L < absz; ++
L) {
284 std::ostringstream tmp_name_b, tmp_name_b2, tmp_FAl_name_c, tmp_FAl_name_d1, tmp_FAl_name_d2, tmp_FAl_name_d3,
292 tmp_FAl_name_c <<
getLayName(
i) <<
"LtmpAl" << K - 1;
294 tmp_FAl_name_d1 <<
getLayName(
i) <<
"LtmpAl" << K <<
"_1";
295 tmp_FAl_name_d2 <<
getLayName(
i) <<
"LtmpAl" << K <<
"_2";
296 tmp_FAl_name_d3 <<
getLayName(
i) <<
"LtmpAl" << K <<
"_3";
299 DDName dd_tmp_name_b(tmp_name_b.str(),
"esalgo");
300 DDName dd_tmp_name_b2(tmp_name_b2.str(),
"esalgo");
301 DDName dd_FAl_name_c(tmp_FAl_name_c.str(),
"esalgo");
302 DDName dd_FAl_name_d1(tmp_FAl_name_d1.str(),
"esalgo");
303 DDName dd_FAl_name_d2(tmp_FAl_name_d2.str(),
"esalgo");
304 DDName dd_FAl_name_d3(tmp_FAl_name_d3.str(),
"esalgo");
305 DDName dd_FAl_name_d(tmp_FAl_name_d.str(),
"esalgo");
312 if (
abs1stx[K] < rIn + 30 * cm) {
313 bdy =
abs1sty[K] / 2 - 30 * cm;
325 if ((
abs2ndx[K] < rIn + 30 * cm) &&
I == 20) {
326 bdy =
abs2ndy[K] / 2 - 30 * cm;
333 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_b <<
" Box " << bdx <<
":" << bdy <<
":" << zHalf;
334 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_b2 <<
" Box " << (bdx + 0.1 * mm) <<
":" << (bdy + 0.1 * mm) <<
":" 340 if (
abs1stx[K] < rIn + 30 * cm)
347 if ((
abs2ndx[K] < rIn + 30 * cm) &&
I == 20)
371 if (((
abs1stx[K] < rIn + 30 * cm) &&
I == 10) || ((
abs2ndx[K] < rIn + 30 * cm) &&
I == 20)) {
413 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_b <<
" Box " << bdx <<
":" << bdy <<
":" << zHalf;
417 <<
" at (0,0,0) no rotation";
454 double xpos(0), ypos(0), zpos(0), sdx(0), sdy(0), sdz(0);
455 double prev_length_(0), ladder_new_length_(0), ladd_shift_(0),
ladder_length(0);
456 int enb(0), swed_scopy_glob(0);
457 double sdxe[50] = {0}, sdye[50] = {0}, sdze[50] = {0};
458 double sdxe2[50] = {0}, sdye2[50] = {0}, sdze2[50] = {0}, sdxe3[50] = {0}, sdye3[50] = {0}, sdze3[50] = {0};
462 double boxax(0), boxay(0), boxaz(0);
463 int ladd_not_plain(0), ladd_subtr_no(0), ladd_upper(0), ladd_side(0);
564 for (
int i = 0;
i <= 1;
i++) {
565 for (
int j = 0;
j <= 3;
j++) {
576 edm::LogVerbatim(
"SFGeomX") <<
"Side " << ladd_side <<
":" << ladd_upper <<
":" << ladd_subtr_no <<
":" 577 << ladd_not_plain <<
" Index " << M <<
":" <<
types_l5_.size();
582 if (ladd_not_plain) {
584 std::ostringstream tmp_name_5b, tmp_name_5c, tmp_name_5d;
589 std::ostringstream tmp_name_5b, tmp_name_5c, tmp_name_5d;
592 DDName dd_tmp_name_5b(tmp_name_5b.str(),
"esalgo");
594 DDName dd_tmp_name_5c(tmp_name_5c.str(),
"esalgo");
596 DDName dd_tmp_name_5d(tmp_name_5d.str(),
"esalgo");
606 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_5a <<
" Box " << (boxax / 2) <<
":" << (boxay / 2) <<
":" 624 <<
" rotation esalgo:RM1299";
641 <<
" at " <<
DDTranslation(sdxe2[enb], sdye2[enb], sdze2[enb])
642 <<
" rotation esalgo:RM1299";
655 <<
DDTranslation(sdxe3[enb], sdye3[enb], sdze3[enb]) <<
" rotation esalgo:RM1299";
674 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_5pa <<
" Box " << (boxax / 2) <<
":" << (boxay / 2) <<
":" 685 <<
" at " <<
DDTranslation(sdx, sdy, sdz) <<
" rotation esalgo:RM1299";
696 <<
DDTranslation(sdx, sdy, sdz) <<
" rotation esalgo:RM1299";
710 for (
int i = 0;
i <= 1;
i++) {
711 for (
int j = 0;
j <= 3;
j++) {
722 edm::LogVerbatim(
"SFGeomX") <<
"Side " << ladd_side <<
":" << ladd_upper <<
":" << ladd_subtr_no <<
":" 723 << ladd_not_plain <<
" Index " << M <<
":" <<
types_l5_.size();
728 if (ladd_not_plain) {
729 std::ostringstream tmp_name_b, tmp_name_c, tmp_name_d;
735 DDName dd_tmp_name_b(tmp_name_b.str(),
"esalgo");
737 DDName dd_tmp_name_c(tmp_name_c.str(),
"esalgo");
739 DDName dd_tmp_name_d(tmp_name_d.str(),
"esalgo");
747 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_a <<
" Box " << (boxax / 2) <<
":" << (boxay / 2) <<
":" 762 <<
" rotation esalgo:RM1299";
778 <<
DDTranslation(sdxe2[enb], sdye2[enb], sdze2[enb]) <<
" rotation esalgo:RM1299";
787 if (ladd_subtr_no > 1) {
792 DDName dd_tmp_name_b(tmp_name_b.str(),
"esalgo");
794 DDName dd_tmp_name_c(tmp_name_c.str(),
"esalgo");
796 DDName dd_tmp_name_d(tmp_name_d.str(),
"esalgo");
805 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_a <<
" Box " << (boxax / 2) <<
":" << (boxay / 2) <<
":" 823 <<
" rotation esalgo:RM1299";
838 <<
" rotation esalgo:RM1299";
848 DDName dd_tmp_name_b(tmp_name_b.str(),
"esalgo");
850 DDName dd_tmp_name_c(tmp_name_c.str(),
"esalgo");
852 DDName dd_tmp_name_d(tmp_name_d.str(),
"esalgo");
860 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_a <<
" Box " << (boxax / 2) <<
":" << (boxay / 2) <<
":" 878 <<
" rotation esalgo:RM1299";
895 <<
" at " <<
DDTranslation(sdxe2[enb], sdye2[enb], sdze2[enb])
896 <<
" rotation esalgo:RM1299";
910 <<
" rotation esalgo:RM1299";
930 edm::LogVerbatim(
"SFGeomX") << dd_tmp_name_pa <<
" Box " << (boxax / 2) <<
":" << (boxay / 2) <<
":" 941 <<
" at " <<
DDTranslation(sdx, sdy, sdz) <<
" rotation esalgo:RM1299";
951 <<
DDTranslation(sdx, sdy, sdz) <<
" rotation esalgo:RM1299";
964 for (
int i = 0;
i <= 1;
i++) {
965 for (
int j = 0;
j <= 4;
j++) {
974 scopy + 1000 * swed_scopy_glob,
979 scopy + 1000 * swed_scopy_glob + 100,
984 << (scopy + 1000 * swed_scopy_glob) <<
" in " << ddname <<
" at " 985 <<
DDTranslation(xpos, ypos, zpos) <<
" rotation esalgo:RM1299";
987 << (scopy + 1000 * swed_scopy_glob + 100) <<
" in " << ddname2 <<
" at " 988 <<
DDTranslation(xpos, ypos, zpos) <<
" rotation esalgo:RM1299";
994 scopy + 1000 * swed_scopy_glob,
999 scopy + 1000 * swed_scopy_glob,
1004 << (scopy + 1000 * swed_scopy_glob) <<
" in " << ddname <<
" at " 1005 <<
DDTranslation(xpos, ypos, zpos) <<
" rotation esalgo:RM1298";
1007 << (scopy + 1000 * swed_scopy_glob) <<
" in " << ddname2 <<
" at " 1008 <<
DDTranslation(xpos, ypos, zpos) <<
" rotation esalgo:RM1300A";
1017 for (
int i = 0;
i <= 1;
i++) {
1018 for (
int j = 0;
j <= 3;
j++) {
1027 scopy + 1000 * swed_scopy_glob,
1032 scopy + 1000 * swed_scopy_glob + 100,
1037 << (scopy + 1000 * swed_scopy_glob) <<
" in " << ddname <<
" at " 1038 <<
DDTranslation(xpos, ypos, zpos) <<
" rotation esalgo:RM1299";
1040 << (scopy + 1000 * swed_scopy_glob + 100) <<
" in " << ddname2 <<
" at " 1041 <<
DDTranslation(xpos, ypos, zpos) <<
" rotation esalgo:RM1299";
1047 scopy + 1000 * swed_scopy_glob,
1052 scopy + 1000 * swed_scopy_glob,
1057 << (scopy + 1000 * swed_scopy_glob) <<
" in " << ddname <<
" at " 1058 <<
DDTranslation(xpos, ypos, zpos) <<
" rotation esalgo:RM1298";
1060 << (scopy + 1000 * swed_scopy_glob) <<
" in " << ddname2 <<
" at " 1061 <<
DDTranslation(xpos, ypos, zpos) <<
" rotation esalgo:RM1300A";
1072 int icopy[100] = {0};
1074 for (
int I = -9;
I <= 9; ++
I) {
1127 prev_length_ += ladd_shift_;
1151 <<
DDName(
"SF",
"esalgo") <<
" at " 1198 <<
" rotation esalgo:R180";
1211 <<
DDName(
"SF",
"esalgo") <<
" at " 1219 double xpos(0), ypos(0);
1220 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.
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_