CMS 3D CMS Logo

DDEcalPreshowerAlgoTB.cc

Go to the documentation of this file.
00001 #include "Geometry/HcalTestBeamData/interface/DDEcalPreshowerAlgoTB.h"
00002 
00003 #include <cmath>
00004 #include <algorithm>
00005 #include <ostream>
00006 
00007 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00008 #include "DetectorDescription/Base/interface/DDTypes.h"
00009 #include "DetectorDescription/Base/interface/DDutils.h"
00010 #include "DetectorDescription/Core/interface/DDPosPart.h"
00011 #include "DetectorDescription/Core/interface/DDLogicalPart.h"
00012 #include "DetectorDescription/Core/interface/DDSolid.h"
00013 #include "DetectorDescription/Core/interface/DDMaterial.h"
00014 #include "DetectorDescription/Core/interface/DDCurrentNamespace.h"
00015 #include "DetectorDescription/Core/interface/DDSplit.h"
00016 #include "DetectorDescription/Core/interface/DDVector.h"
00017 #include "CLHEP/Units/PhysicalConstants.h"
00018 #include "CLHEP/Units/SystemOfUnits.h"
00019 
00020 DDEcalPreshowerAlgoTB::DDEcalPreshowerAlgoTB() : DDAlgorithm() {
00021   LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB info: Creating an instance" ;
00022 
00023 }
00024 
00025 void DDEcalPreshowerAlgoTB::initialize(const DDNumericArguments & nArgs,
00026                                        const DDVectorArguments & vArgs,
00027                                        const DDMapArguments & mArgs,
00028                                        const DDStringArguments & sArgs,
00029                                        const DDStringVectorArguments & vsArgs){
00030 
00031   LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB info: Initialize" ;
00032   quadMin_ = vArgs["IQUAD_MIN"];
00033   LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB IQUAD_MIN";
00034   quadMax_ = vArgs["IQUAD_MAX"];  
00035   LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB IQUAD_MAX";
00036   thickLayers_ = vArgs["Layers"];
00037   LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB Layers";
00038   thickness_ = double(nArgs["PRESH_Z_TOTAL"]);
00039   LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB PRESH_Z_TOTAL";
00040   materials_ = vsArgs["LayMat"];
00041   LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB material";
00042   rmaxVec = vArgs["R_MAX"]; // inner radii
00043   LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB R_MAX";
00044   rminVec = vArgs["R_MIN"]; // outer radii
00045   LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB R_MIN";
00046   waf_intra_col_sep = double(nArgs["waf_intra_col_sep"]);
00047   LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB waf_intra_col_sep";
00048   waf_inter_col_sep = double(nArgs["waf_inter_col_sep"]);
00049   LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB waf_intra_col_sep = "<<waf_inter_col_sep;
00050   waf_active = double(nArgs["waf_active"]);
00051   LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB waf_active = " << waf_active;
00052   wedge_length = double(nArgs["wedge_length"]);
00053   LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB wedge_length = " 
00054                        << wedge_length;
00055   wedge_offset = double(nArgs["wedge_offset"]);
00056   zwedge_ceramic_diff = double(nArgs["zwedge_ceramic_diff"]);
00057   ywedge_ceramic_diff = double(nArgs["ywedge_ceramic_diff"]);
00058   micromodulesx = vArgs["MicromodulesX"]; // micromodules in X plane
00059   micromodulesy = vArgs["MicromodulesY"]; // micromodules in Y plane
00060   absorbx = double(nArgs["absorbx"]);
00061   absorby = double(nArgs["absorby"]);
00062   trabsorbx = double(nArgs["trabsorbx"]);
00063   trabsorby = double(nArgs["trabsorby"]);
00064   ScndplaneXshift = double(nArgs["2ndPlaneXshift"]);
00065   ScndplaneYshift = double(nArgs["2ndPlaneYshift"]);
00066   TotSFXshift = double(nArgs["SF07vsSF_Xshift"]);
00067   TotSFYshift = double(nArgs["SF07vsSF_Yshift"]);
00068   dummyMaterial = sArgs["DummyMaterial"];
00069   LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB Dummy Material = "
00070                        << dummyMaterial;
00071 
00072   idNameSpace = DDCurrentNamespace::ns();
00073 
00074   LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB info: end initialize" ;
00075 }
00076 
00077 void DDEcalPreshowerAlgoTB::execute() {
00078 
00079   LogDebug("HCalGeom") << "******** DDEcalPreshowerAlgoTB execute!";
00080 
00081   // creates all the tube-like layers of the preshower
00082   doLayers();
00083   // places the wedges and silicon strip detectors in their x and y layer
00084   doWedges();
00085   // places the slicon strips in active silicon wafers
00086   doSens();
00087   
00088 }
00089 
00090 void DDEcalPreshowerAlgoTB::doLayers() {
00091   //double sum_z=0;
00092   double zpos = -thickness_/2.;
00093   for(size_t i = 0; i<rminVec.size(); ++i) {
00094     int I = int(i)+1; // FOTRAN I (offset +1)
00095     
00096     double rIn(0),rOut(0),zHalf(0);
00097       
00098     // create the name
00099     std::ostringstream name;
00100     name << "SF" << int((50+I)/10) << I-int(I/10)*10;
00101     DDName ddname(name.str(), idNameSpace); // namespace:name
00102       
00103     // tube dimensions
00104     rIn = rmaxVec[i];
00105     rOut = rminVec[i];
00106     zHalf = thickLayers_[i]/2.;
00107 
00108     // position the logical part w.r.t. the parent volume
00109     zpos += zHalf;
00110     //sum_z += thickLayers_[i];
00111     if (I==7 || I==15) { // skip layers with detectors
00112       zpos += zHalf;
00113       continue;
00114     }
00115     if ( I==2 ) {
00116       zfoam1_ = zpos;
00117     }
00118     if ( I==6 ) {
00119       zlead1_ = zpos + zHalf;
00120     }
00121     if ( I==14 ) {
00122       zlead2_ = zpos + zHalf;
00123     }
00124       
00125     if (getMaterial(i) != dummyMaterial ) {
00126       // create a logical part representing a single layer in the preshower
00127       //DDSolid solid = DDSolidFactory::tubs(ddname,zHalf,rIn,rOut,0.,360.*deg);
00128 
00129       DDSolid solid = DDSolidFactory::box(ddname,absorbx,absorby,zHalf);
00130     
00131       DDName        matname(getMaterial(i),"materials"); 
00132       DDMaterial    material(matname);
00133       DDLogicalPart layer = DDLogicalPart(ddname,material,solid);
00134 
00135       DDTranslation tran=DDTranslation(trabsorbx+TotSFXshift,trabsorby+TotSFYshift, zpos);
00136       DDpos(layer, parent(), 1, tran, DDRotation());
00137       LogDebug("HCalGeom") <<"DDEcalPreshowerAlgoTB debug : Child "
00138                            << layer << " Copy 1 in " << parent().name()
00139                            << " with translation " << tran
00140                            << " and rotation " << DDRotation();
00141     }
00142     zpos += zHalf;
00143   }
00144   
00145 }
00146 
00147 void DDEcalPreshowerAlgoTB::doWedges() {
00148 
00149   LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : doWedges()";
00150   int nx(0), ny(0), icopy(0), icopyt(0);
00151   double xpos(0), ypos(0), zpos(0);// zposY(0);
00152   int sz = int(quadMax_.size());
00153 
00154   DDTranslation tran;
00155   DDRotation    rot1, rot2;
00156   DDName        name1, name2;
00157   name1 = DDName("SWED", idNameSpace);
00158   name2 = DDName("SFBX", idNameSpace);
00159   rot1 = DDRotation("rotations:RM1299");
00160   rot2 = DDRotation("rotations:RM1298");
00161   // Do Plane X
00162   for(int I=1; I<=sz;++I) {
00163     for(int J=int(quadMax_[I-1]); J>=int(quadMin_[I-1]); --J) {
00164       //LogDebug("HCalGeom") <<"DDEcalPreshowerAlgoTB::I=" << I << " J="  << J;
00165       nx += 1;
00166       icopy += 1;
00167       go=0; 
00168       for (unsigned int m=0; m<micromodulesx.size(); m++) 
00169         if (micromodulesx[m]==icopy) {go=1; icopyt +=1; }
00170       xpos = -1.*(J*waf_intra_col_sep + (int(J/2))*waf_inter_col_sep 
00171                   - waf_intra_col_sep/2.);
00172       ypos = (sz-int(I))*waf_active + wedge_length/2. + 0.05*cm;
00173       xpos = xpos + TotSFXshift; ypos = ypos + TotSFYshift;
00174       zpos = zlead1_ + wedge_offset;
00175       // place the wedge
00176       if (go==1) {
00177         tran = DDTranslation(xpos,ypos,zpos);
00178         DDpos(DDLogicalPart(name1), parent(), icopyt, tran, rot1);
00179         LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " 
00180                              << name1 << " copy = " << icopy << " (" 
00181                              << icopyt << ") in Mother " << parent().name()
00182                              << " translation " <<tran  << " rotation " <<rot1;
00183       }
00184       zpos = zlead1_ + zwedge_ceramic_diff;
00185       ypos = ypos + ywedge_ceramic_diff;
00186       if (go==1) {
00187         tran = DDTranslation(xpos,ypos,zpos);
00188         DDpos(DDLogicalPart(name2), parent(), icopyt, tran, rot2);
00189         LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " 
00190                              << name2 << " copy = " << icopy << " (" 
00191                              << icopyt << ") in Mother " << parent().name()
00192                              << " translation " <<tran << " rotation " <<rot2;
00193       }
00194     }
00195     
00196     for(int J=int(quadMin_[I-1]); J<=int(quadMax_[I-1]); ++J) {
00197       nx += 1;
00198       icopy += 1;
00199       go=0; 
00200       for (unsigned int m=0; m<micromodulesx.size(); m++) 
00201         if (micromodulesx[m]==icopy) {go=1; icopyt +=1;}
00202       xpos = 1.*(J*waf_intra_col_sep + (int(J/2))*waf_inter_col_sep 
00203                  - waf_intra_col_sep/2.);
00204       ypos = (sz-int(I))*waf_active + wedge_length/2. + 0.05*cm;
00205       xpos = xpos + TotSFXshift; ypos = ypos + TotSFYshift;
00206       zpos = zlead1_ + wedge_offset;      
00207       if(go==1) {
00208         tran = DDTranslation(xpos,ypos,zpos);
00209         DDpos(DDLogicalPart(name1), parent(), icopyt, tran, rot1);
00210         LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " 
00211                              << name1 << " copy = " << icopy << " (" 
00212                              << icopyt << ") in Mother " << parent().name()
00213                              << " translation " <<tran << " rotation " <<rot1;
00214       }
00215       zpos = zlead1_ + zwedge_ceramic_diff;
00216       ypos = ypos + ywedge_ceramic_diff;
00217       if (go==1) {
00218         tran =  DDTranslation(xpos,ypos,zpos);
00219         DDpos(DDLogicalPart(name2), parent(), icopyt, tran, rot2);
00220         LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " 
00221                              << name2 << " copy = " << icopy << " (" 
00222                              << icopyt << ") in Mother " << parent().name()
00223                              << " translation " <<tran << " rotation " <<rot2;
00224       }
00225     }
00226     
00227   }
00228   
00229   // mirror image system
00230   rot1 = DDRotation("rotations:RM1303");
00231   rot2 = DDRotation("rotations:RM1302");
00232   for(int I=sz; I>=1;--I) {
00233     for(int J=int(quadMax_[I-1]); J>=int(quadMin_[I-1]); --J) {
00234       nx += 1;
00235       icopy += 1;
00236       go=0; 
00237       for (unsigned int m=0; m<micromodulesx.size(); m++) 
00238         if (micromodulesx[m]==icopy) {go=1; icopyt +=1;}
00239       //LogDebug("HCalGeom") <<"DDEcalPreshowerAlgoTB::I=" << I << " J="  << J;
00240       xpos = -1.*(J*waf_intra_col_sep + (int(J/2))*waf_inter_col_sep 
00241                   - waf_intra_col_sep/2.);
00242       ypos = -1.*(sz-int(I))*waf_active - wedge_length/2. - 0.05*cm;
00243       xpos = xpos + TotSFXshift; ypos = ypos + TotSFYshift;
00244       zpos = zlead1_ + wedge_offset;
00245       if (go==1) {
00246         tran =  DDTranslation(xpos,ypos,zpos);
00247         DDpos(DDLogicalPart(name1), parent(), icopyt, tran, rot1);
00248         LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " 
00249                              << name1 << " copy = " << icopy << " (" 
00250                              << icopyt << ") in Mother " << parent().name()
00251                              << " translation " <<tran << " rotation " << rot1;
00252       }
00253       zpos = zlead1_ + zwedge_ceramic_diff;
00254       ypos = ypos - ywedge_ceramic_diff;
00255       if (go==1) {
00256         tran =  DDTranslation(xpos,ypos,zpos);
00257         DDpos(DDLogicalPart(name2), parent(), icopyt, tran, rot2);
00258         LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " 
00259                              << name2 << " copy = " << icopy << " (" 
00260                              << icopyt << ") in Mother " << parent().name()
00261                              << " translation " <<tran << " rotation "<<rot2;
00262       }
00263     }
00264 
00265     for(int J=int(quadMin_[I-1]); J<=int(quadMax_[I-1]); ++J) {
00266       nx += 1;
00267       icopy += 1;
00268       go=0; 
00269       for (unsigned int m=0; m<micromodulesx.size(); m++) 
00270         if (micromodulesx[m]==icopy) {go=1; icopyt +=1;}
00271       xpos = 1.*(J*waf_intra_col_sep + (int(J/2))*waf_inter_col_sep 
00272                  - waf_intra_col_sep/2.);
00273       ypos = -1.*(sz-int(I))*waf_active - wedge_length/2. - 0.05*cm;
00274       xpos = xpos + TotSFXshift; ypos = ypos + TotSFYshift;
00275       zpos = zlead1_ + wedge_offset;      
00276       if (go==1) {
00277         tran =  DDTranslation(xpos,ypos,zpos);
00278         DDpos(DDLogicalPart(name1), parent(), icopyt, tran, rot1);
00279         LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " 
00280                              << name1 << " copy = " << icopy << " (" 
00281                              << icopyt << ") in Mother " << parent().name()
00282                              << " translation " <<tran << " rotation " <<rot1;
00283       }
00284       zpos = zlead1_ + zwedge_ceramic_diff;
00285       ypos = ypos - ywedge_ceramic_diff;
00286       if (go==1) {
00287         tran =  DDTranslation(xpos,ypos,zpos);
00288         DDpos(DDLogicalPart(name2), parent(), icopyt, tran, rot2);
00289         LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " 
00290                              << name2 << " copy = " << icopy << " (" 
00291                              << icopyt << ") in Mother " << parent().name()
00292                              << " translation " <<tran << " rotation " <<rot2;
00293       }
00294     }
00295   }
00296 
00297   // Do Plane Y
00298   icopy =  0; 
00299   int nxt = micromodulesy.size();
00300   name1 = DDName("SWED", idNameSpace);
00301   name2 = DDName("SFBY", idNameSpace);
00302   rot1 = DDRotation(DDName("RM1301B",idNameSpace));
00303   rot2 = DDRotation(DDName("RM1300B",idNameSpace));
00304   for(int I=1; I<=sz;++I) {
00305     for(int J=int(quadMax_[I-1]); J>=int(quadMin_[I-1]); --J) {
00306       ny += 1;
00307       icopy += 1;
00308       go=0; 
00309       for (unsigned int m=0; m<micromodulesy.size(); m++) 
00310         if (micromodulesy[m]==icopy) {go=1; icopyt +=1;}
00311       //LogDebug("HCalGeom") <<"DDEcalPreshowerAlgoTB::I=" << I << " J="  << J;
00312       ypos = -1.*(J*waf_intra_col_sep + (int(J/2))*waf_inter_col_sep 
00313                   - waf_intra_col_sep/2.);
00314       xpos = (sz-int(I))*waf_active + wedge_length/2. + 0.05*cm + ScndplaneXshift;
00315       xpos = xpos + TotSFXshift; ypos = ypos + TotSFYshift;
00316       zpos = zlead2_ + wedge_offset;
00317       if (go==1) {
00318         tran =  DDTranslation(xpos,ypos,zpos);
00319         DDpos(DDLogicalPart(name1), parent(), icopy+nxt, tran, rot1);
00320         LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " 
00321                              << name1 << " copy = " << icopy << " (" 
00322                              << icopyt+nxt << ") in Mother " << parent().name()
00323                              << " translation " <<tran << " rotation " <<rot1;
00324       }
00325       zpos = zlead2_ + zwedge_ceramic_diff;
00326       xpos = xpos - ywedge_ceramic_diff;
00327       if (go==1) {
00328         tran =  DDTranslation(xpos,ypos,zpos);
00329         DDpos(DDLogicalPart(name2), parent(), icopyt, tran, rot2);
00330         LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " 
00331                              << name2 << " copy = " << icopy << " (" 
00332                              << icopyt << ") in Mother " << parent().name()
00333                              << " translation " <<tran << " rotation " <<rot2;
00334       }
00335     }
00336 
00337     for(int J=int(quadMin_[I-1]); J<=int(quadMax_[I-1]); ++J) {
00338       ny += 1;
00339       icopy += 1;
00340       go=0; 
00341       for (unsigned int m=0; m<micromodulesy.size(); m++) 
00342         if (micromodulesy[m]==icopy) {go=1; icopyt +=1;}
00343       //LogDebug("HCalGeom") <<"DDEcalPreshowerAlgoTB::I=" << I << " J="  << J;
00344       ypos = 1.*(J*waf_intra_col_sep + (int(J/2))*waf_inter_col_sep 
00345                  - waf_intra_col_sep/2.);
00346       xpos = (sz-int(I))*waf_active + wedge_length/2. + 0.05*cm + ScndplaneXshift;
00347       xpos = xpos + TotSFXshift; ypos = ypos + TotSFYshift;
00348       zpos = zlead2_ + wedge_offset;
00349       if (go==1) {
00350         tran =  DDTranslation(xpos,ypos,zpos);
00351         DDpos(DDLogicalPart(name1), parent(), icopyt+nxt, tran, rot1);
00352         LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " 
00353                              << name1 << " copy = " << icopy << " (" 
00354                              << icopyt+nxt << ") in Mother " << parent().name()
00355                              << " translation " <<tran << " rotation " <<rot1;
00356       }
00357       zpos = zlead2_ + zwedge_ceramic_diff;
00358       xpos = xpos - ywedge_ceramic_diff;
00359       if (go==1) {
00360         tran =  DDTranslation(xpos,ypos,zpos);
00361         DDpos(DDLogicalPart(name2), parent(), icopyt, tran, rot2);
00362         LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " 
00363                              << name2 << " copy = " << icopy << " (" 
00364                              << icopyt << ") in Mother " << parent().name()
00365                              << " translation " <<tran << " rotation " <<rot2;
00366       }
00367     }
00368   }
00369 
00370   // mirror image system
00371   rot1 = DDRotation(DDName("RM1305B",idNameSpace));
00372   rot2 = DDRotation(DDName("RM1304B",idNameSpace));
00373   for(int I=sz; I>=1;--I) {
00374     for(int J=int(quadMax_[I-1]); J>=int(quadMin_[I-1]); --J) {
00375       ny += 1;
00376       icopy += 1;
00377       go=0; 
00378       for (unsigned int m=0; m<micromodulesy.size(); m++) 
00379         if (micromodulesy[m]==icopy) {go=1; icopyt +=1;}
00380       //LogDebug("HCalGeom") <<"DDEcalPreshowerAlgoTB::I=" << I << " J="  << J;
00381       ypos = -1.*(J*waf_intra_col_sep + (int(J/2))*waf_inter_col_sep 
00382                   - waf_intra_col_sep/2.);
00383       xpos = -1.*(sz-int(I))*waf_active - wedge_length/2. - 0.05*cm + ScndplaneXshift;
00384       xpos = xpos + TotSFXshift; ypos = ypos + TotSFYshift;
00385       zpos = zlead2_ + wedge_offset;
00386       if (go==1) {
00387         tran =  DDTranslation(xpos,ypos,zpos);
00388         DDpos(DDLogicalPart(name1), parent(), icopyt+nxt, tran, rot1);
00389         LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " 
00390                              << name1 << " copy = " << icopy << " (" 
00391                              << icopyt+nxt << ") in Mother " << parent().name()
00392                              << " translation " <<tran << " rotation " <<rot1;
00393       }      
00394       zpos = zlead2_ + zwedge_ceramic_diff;
00395       xpos = xpos + ywedge_ceramic_diff;
00396       if (go==1) {
00397         tran =  DDTranslation(xpos,ypos,zpos);
00398         DDpos(DDLogicalPart(name2), parent(), icopyt, tran, rot2);
00399         LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " 
00400                              << name2 << " copy = " << icopy << " (" 
00401                              << icopyt << ") in Mother " << parent().name()
00402                              << " translation " <<tran << " rotation " <<rot2;
00403       }
00404     }
00405 
00406     for(int J=int(quadMin_[I-1]); J<=int(quadMax_[I-1]); ++J) {
00407       ny += 1;
00408       icopy += 1;
00409       go=0; 
00410       for (unsigned int m=0; m<micromodulesy.size(); m++) 
00411         if (micromodulesy[m]==icopy) {go=1; icopyt +=1;}
00412       //LogDebug("HCalGeom") <<"DDEcalPreshowerAlgoTB::I=" << I << " J="  << J;
00413       ypos = 1.*(J*waf_intra_col_sep + (int(J/2))*waf_inter_col_sep 
00414                  - waf_intra_col_sep/2.);
00415       xpos = -1.*(sz-int(I))*waf_active - wedge_length/2. - 0.05*cm + ScndplaneXshift;
00416       xpos = xpos + TotSFXshift; ypos = ypos + TotSFYshift;
00417       zpos = zlead2_ + wedge_offset;
00418       if (go==1) {
00419         tran =  DDTranslation(xpos,ypos,zpos);
00420         DDpos(DDLogicalPart(name1), parent(), icopyt+nxt, tran, rot1);
00421         LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " 
00422                              << name1 << " copy = " << icopy << " (" 
00423                              << icopyt+nxt << ") in Mother " << parent().name()
00424                              << " translation " <<tran << " rotation " <<rot1;
00425       }
00426       zpos = zlead2_ + zwedge_ceramic_diff;
00427       xpos = xpos + ywedge_ceramic_diff;
00428       if (go==1) {
00429         tran =  DDTranslation(xpos,ypos,zpos);
00430         DDpos(DDLogicalPart(name2), parent(), icopyt, tran, rot2);
00431         LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " 
00432                              << name2 << " copy = " << icopy << " (" 
00433                              << icopyt << ") in Mother " << parent().name()
00434                              << " translation " <<tran << " rotation " <<rot2;
00435       }
00436     }
00437   }
00438 
00439 }
00440 
00441 void DDEcalPreshowerAlgoTB::doSens() {
00442 
00443   double xpos(0), ypos(0);
00444   DDTranslation tran;
00445   DDName        child1  = DDName("SFSX", idNameSpace);
00446   DDName        child2  = DDName("SFSY", idNameSpace);
00447   DDName        mother1 = DDName("SFAX", idNameSpace);
00448   DDName        mother2 = DDName("SFAY", idNameSpace);
00449   DDRotation    rot;
00450   for(size_t i = 0; i<32; ++i) {
00451     xpos = -waf_active/2. + i*waf_active/32. + waf_active/64.;
00452     tran = DDTranslation(xpos,0., 0.);
00453     DDpos(DDLogicalPart(child1), mother1, i+1, tran, rot);
00454     LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " << child1
00455                          << "\ncopy number " << i+1 << " in " << mother1
00456                          << " translation "<< tran << " rotation " << rot;
00457       
00458     ypos = -waf_active/2. + i*waf_active/32. + waf_active/64.;
00459     tran = DDTranslation(0.,ypos, 0.);
00460     DDpos(DDLogicalPart(child2), mother2, i+1, tran, rot);
00461     LogDebug("HCalGeom") << "DDEcalPreshowerAlgoTB::debug : Child " << child2
00462                          << "\ncopy number " << i+1 << " in " << mother2
00463                          << " translation "<< tran << " rotation " << rot;
00464     
00465   }
00466 }

Generated on Tue Jun 9 17:37:31 2009 for CMSSW by  doxygen 1.5.4