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");
515 sdye3[enb] = boxay / 2 + LdrBck_Length / 2;
546 sdy = boxay / 2 + LdrBck_Length / 2;
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");
608 sdye2[enb] = boxay / 2 + LdrBck_Length / 2;
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");
655 sdye2[enb] = boxay / 2 + LdrBck_Length / 2;
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");
709 sdye3[enb] = boxay / 2 + LdrBck_Length / 2;
741 sdy = boxay / 2 + LdrBck_Length / 2;
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) {
862 for (
int t = 0;
t <
int(types_l5_.size());
t++)
863 if (type == types_l5_[
t]) {
872 j = t + types_l5_.size();
873 if (
I < 0 &&
asym_ladd_[(t + types_l5_.size())] == 1) {
889 prev_length_ += ladd_shift_;
909 for (
int t = 0; t <
int(types_l5_.size()); t++)
910 if (type == types_l5_[t]) {
924 j = t + types_l5_.size();
925 if (
asym_ladd_[(t + types_l5_.size())] == 2 && !changed) {
929 if (
asym_ladd_[(t + types_l5_.size())] == 1 && !changed) {
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 "
std::vector< double > startOfFirstLadd_
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
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.
double absAlX_subtr1_Yshift_
A DDSolid represents the shape of a part.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
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_
DDMaterial getMaterial(unsigned int i) const
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_
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
std::vector< double > rminVec
void execute(DDCompactView &pos) override
std::vector< std::string > materials_
std::string getLadPrefix(unsigned int i) const
std::vector< double > ladd_l5_map_
double absAlX_subtr1_Xshift_
DDMaterial getLaddMaterial() const
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::Rotation3D DDRotation
std::vector< double > abs2ndy
std::vector< std::string > types_l5_
std::vector< std::string > layName_
double absAlY_subtr1_Yshift_
double absAlY_subtr1_Xshift_