10 #include "CLHEP/Units/GlobalSystemOfUnits.h"
13 LogDebug(
"EcalGeom") <<
"DDEcalPreshowerAlgo info: Creating an instance" ;
24 LogDebug(
"EcalGeom") <<
"DDEcalPreshowerAlgo info: Initialize" ;
84 LogDebug(
"EcalGeom") <<
"******** DDEcalPreshowerAlgo execute!";
98 double zpos = -
thickness_/2., sdx(0), sdy(0), bdx(0),bdy(0);;
104 double rIn(0), rOut(0), zHalf(0);
124 if (I==2 || I==28 || I==13 || I==23) {
136 if (I==10 || I==20) {
138 int absz=0;
double outalbx, outalby, shiftR, outalbx2, outalby2, shiftR2;
141 if ( I==20) absz = int(
abs2ndx.size());
142 int cutabsx=-1, cutabsy=-1;
162 for (
int L=0;
L<absz; ++
L) {
164 std::ostringstream tmp_name_b, tmp_name_b2, tmp_FAl_name_c, tmp_FAl_name_d;
169 if(
L>0) tmp_FAl_name_c <<
getLayName(
i) <<
"LtmpAl" << K-1;
173 DDName dd_tmp_name_b(tmp_name_b.str(),
"esalgo");
174 DDName dd_tmp_name_b2(tmp_name_b2.str(),
"esalgo");
175 DDName dd_FAl_name_c(tmp_FAl_name_c.str(),
"esalgo");
176 DDName dd_FAl_name_d(tmp_FAl_name_d.str(),
"esalgo");
181 if(
abs1stx[K] < rIn+30*cm) { bdy=
abs1sty[K]/2 - 30*cm; cutabsx = K;}
187 if((
abs2ndx[K] < rIn+30*cm) && I==20) { bdy=
abs2ndy[K]/2 - 30*cm; cutabsy = K;}
192 sdx =
abs1stx[K]-bdx ; sdy = 0;
195 if(I==20) {sdx =
abs2ndx[K]-bdx ; sdy = 0;}
204 if(((
abs1stx[K] < rIn+30*cm) && I==10) || ((
abs2ndx[K] < rIn+30*cm) && I==20) ) {
224 bdx =
abs1stx[cutabsx]; bdy=2*30*cm;
225 if(I==20) bdx =
abs2ndx[cutabsy]; bdy=2*30*cm;
242 std::ostringstream tmp_Alname_fin;
243 tmp_Alname_fin <<
getLayName(
i) <<
"LtmpAl" << absz-1;
244 DDName dd_Alname_fin(tmp_Alname_fin.str(),
"esalgo");
271 double xpos(0), ypos(0), zpos(0), sdx(0), sdy(0), sdz(0);
272 double prev_length_(0), ladder_new_length_(0), ladd_shift_(0),
ladder_length (0);
273 int enb(0), swed_scopy_glob(0);
double sdxe[50] = {0}, sdye[50] = {0}, sdze[50] = {0};
274 double sdxe2[50] = {0}, sdye2[50] = {0}, sdze2[50] = {0}, sdxe3[50] = {0}, sdye3[50] = {0}, sdze3[50] = {0};
277 int scopy(0);
double boxax(0), boxay(0), boxaz(0);
278 int ladd_not_plain(0), ladd_subtr_no(0), ladd_upper(0), ladd_side(0);
351 for (
int i=0;
i<=1;
i++) {
352 for (
int j=0;
j<=3;
j++) {
354 ladd_not_plain=1; ladd_subtr_no++;
if(
j>1) ladd_upper=1; ladd_side=
i;
365 std::ostringstream tmp_name_5b, tmp_name_5c, tmp_name_5d;
372 std::ostringstream tmp_name_5b, tmp_name_5c, tmp_name_5d;
375 DDName dd_tmp_name_5b(tmp_name_5b.str(),
"esalgo");
377 DDName dd_tmp_name_5c(tmp_name_5c.str(),
"esalgo");
379 DDName dd_tmp_name_5d(tmp_name_5d.str(),
"esalgo");
437 for (
int i=0;
i<=1;
i++) {
438 for (
int j=0;
j<=3;
j++) {
440 ladd_not_plain=1; ladd_subtr_no++;
if(
j>1) ladd_upper=1; ladd_side=
i;
449 std::ostringstream tmp_name_b, tmp_name_c, tmp_name_d;
455 DDName dd_tmp_name_b(tmp_name_b.str(),
"esalgo");
457 DDName dd_tmp_name_c(tmp_name_c.str(),
"esalgo");
459 DDName dd_tmp_name_d(tmp_name_d.str(),
"esalgo");
478 if(ladd_subtr_no>1) {
483 DDName dd_tmp_name_b(tmp_name_b.str(),
"esalgo");
485 DDName dd_tmp_name_c(tmp_name_c.str(),
"esalgo");
487 DDName dd_tmp_name_d(tmp_name_d.str(),
"esalgo");
509 DDName dd_tmp_name_b(tmp_name_b.str(),
"esalgo");
511 DDName dd_tmp_name_c(tmp_name_c.str(),
"esalgo");
513 DDName dd_tmp_name_d(tmp_name_d.str(),
"esalgo");
564 for (
int i=0;
i<=1;
i++) {
565 for (
int j=0;
j<=4;
j++) {
585 for (
int i=0;
i<=1;
i++) {
586 for (
int j=0;
j<=3;
j++) {
606 int icopy[100] = {0};
608 for(
int I=-9;
I<=9;++
I) {
637 prev_length_ += ladd_shift_;
675 double xpos(0), ypos(0);
676 for(
size_t i = 0;
i<32; ++
i)
std::vector< double > startOfFirstLadd_
std::vector< std::string > types_l4_
std::vector< std::string > typeOfLaddRow2
std::string getLayName(unsigned int i) const
double micromodule_length
void execute(DDCompactView &pos)
std::vector< double > abs1stx
Sin< T >::type sin(const T &t)
void position(const DDLogicalPart &self, const DDLogicalPart &parent, std::string copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=NULL)
DDName is used to identify DDD entities uniquely.
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs)
std::vector< double > rmaxVec
double zwedge_ceramic_diff
std::vector< double > ladd_l4_map_
void doLayers(DDCompactView &pos)
type of data representation of DDCompactView
double absAlX_subtr1_Yshift_
A DDSolid represents the shape of a part.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
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_
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_
std::vector< double > rminVec
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
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_
std::vector< double > abs2ndy
std::vector< std::string > types_l5_
std::vector< std::string > layName_
double absAlY_subtr1_Yshift_
double absAlY_subtr1_Xshift_