3   TFile *
out = TFile::Open(
"output.root",
"RECREATE");
 
    5   TGeoManager *
geom = 
new TGeoManager(
"Assembly", 
"");
 
    7   Float_t MDT_barrel_long  = 390.; 
 
    8   Float_t MDT_barrel_short = 362.; 
 
    9   Float_t MDT_barrel_short_up; 
 
   10   Float_t MDT_barrel_short_down; 
 
   11   Float_t MDT_width     =  8.34;
 
   12   Float_t MDT_thickness =  1.23; 
 
   15   Float_t XSize1        =  0.94;
 
   16   Float_t YSize1        =  0.97;
 
   18   TGeoMaterial *mat1 = 
new TGeoMaterial(
"vacuum", 1.e-16, 1.e-16, 1.e-16);
 
   19   TGeoMaterial *mat2 = 
new TGeoMaterial(
"aluminium", 26.98, 13, 2.7);  
 
   20   TGeoMixture  *mat3 = 
new TGeoMixture(
"air", 3, 0.001205);
 
   21   mat3->DefineElement(0, 39.35, 18,  0.01);
 
   22   mat3->DefineElement(1, 16.00,  8,  0.21);
 
   23   mat3->DefineElement(2, 14.01,  7,  0.78);
 
   24   TGeoMixture  *mat4 = 
new TGeoMixture(
"MDTMixture", 3, 0.0019);
 
   25   mat4->DefineElement(0, 39.948,  18,  0.476);
 
   26   mat4->DefineElement(1, 12.010,   6,  0.143);
 
   27   mat4->DefineElement(2, 15.9994,  8,  0.381);
 
   28   TGeoMixture *mat5 = 
new TGeoMixture(
"MDTPlastic", 2, 1.032);
 
   29   mat5->DefineElement(0, 12.01,  6,  9);
 
   30   mat5->DefineElement(1, 1.008,  1,  10);
 
   31   TGeoMaterial *mat6 = 
new TGeoMaterial(
"iron", 55.847, 26, 7.87);  
 
   32   TGeoMixture *mat7 = 
new TGeoMixture(
"G10", 4, 1.7);
 
   33   mat7->DefineElement(0, 12.01,  6,  .259);
 
   34   mat7->DefineElement(1, 1.008,  1,  .288);
 
   35   mat7->DefineElement(2, 16,     8,  .248);
 
   36   mat7->DefineElement(3, 28.09, 14,  .205);
 
   39   TGeoMedium *med1 = 
new TGeoMedium(
"vacuum",     1, mat1);
 
   40   TGeoMedium *med2 = 
new TGeoMedium(
"aluminium",  2, mat2);
 
   41   TGeoMedium *med3 = 
new TGeoMedium(
"Air",        3, mat3);
 
   42   TGeoMedium *med4 = 
new TGeoMedium(
"MDTMixture", 4, mat4);
 
   43   TGeoMedium *med5 = 
new TGeoMedium(
"MDTPlastic", 5, mat5);
 
   44   TGeoMedium *med6 = 
new TGeoMedium(
"iron",       6, mat6);
 
   45   TGeoMedium *med7 = 
new TGeoMedium(
"G10",        7, mat7);
 
   47   TGeoVolume *
top    = 
new TGeoVolumeAssembly(
"top");
 
   48   TGeoVolume *MdtOct0    = 
new TGeoVolumeAssembly(
"MdtBarrelOct0");
 
   49   TGeoVolume *MdtOct2    = 
new TGeoVolumeAssembly(
"MdtBarrelOct2");
 
   50   TGeoVolume *MdtOct6    = 
new TGeoVolumeAssembly(
"MdtBarrelOct6");
 
   52   TGeoVolume *mnk[14], *mnk1[14], *mnk2[14], *mnk3[6], *mnk4[6], *mnk5[18];
 
   53   TGeoVolume *tube[16][3], *tube_en_l0[44][3], *tube_en_l2[68][3], *tube_en_l3[68][3], *tube_en_l4[68][3], 
 
   54               *tube_en_l5[68][3], *tube_en_l6[72][3], *tube_fw[3][3];
 
   56   for(
int i=0;
i<14;
i++) {
 
   57    mnk[
i]  = 
new TGeoVolumeAssembly(Form(
"MdtBarrelOct0Layer%d",
i));
 
   58    mnk1[
i] = 
new TGeoVolumeAssembly(Form(
"MdtBarrelOct2Layer%d",
i));
 
   59    mnk2[
i] = 
new TGeoVolumeAssembly(Form(
"MdtBarrelOct6Layer%d",
i));
 
   62   for(
int i=0;
i<7;
i++) {
 
   63    mnk3[
i]  = 
new TGeoVolumeAssembly(Form(
"MdtEndcapLayer%d",
i));
 
   66   for(
int i=0;
i<4;
i++) {
 
   67    mnk4[
i]  = 
new TGeoVolumeAssembly(Form(
"MdtMFLayer%d",
i));
 
   70   for(
int i=0;
i<18;
i++) {
 
   71    mnk5[
i]  = 
new TGeoVolumeAssembly(Form(
"MdtForwardLayer%d",
i));
 
   75   TGeoRotation *rot0 = 
new TGeoRotation();
 
   77   rot0->RegisterYourself();
 
   78   TGeoRotation *
rot1 = 
new TGeoRotation();
 
   80   rot1->RegisterYourself();
 
   81   TGeoRotation *
rot2 = 
new TGeoRotation();
 
   83   rot2->RegisterYourself();
 
   84   TGeoRotation *
rot3 = 
new TGeoRotation();
 
   86   rot3->RegisterYourself();
 
   87   TGeoRotation *
rot4 = 
new TGeoRotation();
 
   89   rot4->RegisterYourself();
 
   90   TGeoRotation *rot5 = 
new TGeoRotation();
 
   92   rot5->RegisterYourself();
 
   93   TGeoRotation *rot6 = 
new TGeoRotation();
 
   95   rot6->RegisterYourself();
 
   96   TGeoRotation *rot7 = 
new TGeoRotation();
 
   98   rot7->RegisterYourself();
 
  101   geom->SetTopVolume(top);
 
  103    TGeoVolume *pCombi  = 
new TGeoVolumeAssembly(
"MdtBarrel");
 
  104    TGeoVolume *pCombi1  = 
new TGeoVolumeAssembly(
"MdtEndcap");
 
  105    TGeoVolume *pCombi2  = 
new TGeoVolumeAssembly(
"MdtMF");
 
  106    TGeoVolume *pCombi3  = 
new TGeoVolumeAssembly(
"MdtForward");
 
  107    float pos_x, pos_y, pos_z, zl, slotpos_x;
 
  108    float slotpos_y = -0.03;
 
  110     TGeoRotation    *rr1 = 
new TGeoRotation();
 
  115     rr1->RegisterYourself();
 
  117     TGeoRotation    *rr0 = 
new TGeoRotation();
 
  121     rr0->RegisterYourself();
 
  123     float mm[14][3] = { 53.05,0,0,-57.95,0,0,-56.965,-31.45,45.05,59.438,33.938,-42.562,-61.92,-36.42,48.58,
 
  124                        64.4,38.9,-46.1,-66.89,-41.39,52.11,69.38,43.88,-49.62,-71.86,-46.36,55.64,74.35,48.85,
 
  125                        -61.65,-76.83,-51.33,59.17,79.32,53.82,-65.18,-81.8,-56.3,62.7,84.29,58.79,-68.71 };
 
  127     int mm1[14][3] = { 14,0,0,14,0,0,14,2,12,14,2,12,15,2,13,16,2,13,16,2,14,17,2,14, 
 
  128                        17,2,15,18,2,16,19,2,16,19,2,17,20,2,17,20,2,18};
 
  133     float tube_len[16] = { 390, 362, 158.5, 172.5, 68.55, 45.0, 217.5, 127.5, 212.5, 121.5, 165.5, 
 
  134                     179.5, 89.5, 75.5, 217.5, 127.5 };
 
  136    for(
int i=0; 
i<16; 
i++) { 
 
  137      tube[
i][0] = geom->MakeBox(Form(
"BP%d",
i), med5, MDT_width/2, MDT_thickness/2, tube_len[
i]/2); 
 
  138      tube[
i][1] = geom->MakeBox(Form(
"BA%d",
i), med2, XSize/2,     YSize/2,         tube_len[
i]/2);
 
  139      for(
int j = 0; j < 8; j++){
 
  140      float slotpos_x = (-3.5 + 1.*j);
 
  141        tube[
i][2] = geom->MakeBox(Form(
"MDT%ds%dl%db%dw%d",1,0,0,0,0), med4, XSize1/2, YSize1/2, tube_len[
i]/2);
 
  142        tube[
i][1]->AddNode(tube[
i][2], j, 
new TGeoTranslation(slotpos_x, slotpos_y, 0.));
 
  144      tube[
i][0]->AddNode(tube[
i][1],1); 
 
  148   TGeoTranslation* 
tr[14][5];
 
  149   float limx[14][4] = {0.,0.,0.,0.,0.,0.,0.,0., 50.7, -46.7, 50.7, -46.7, 46.6, -50.8, 46.6, -50.8, 55., -50.7, 55., -50.7, 55.2, -55., 55.2, -55.,
 
  150                       59.2, -55.1, 59.2, -55.1, 59.2, -59.2, 59.2, -59.2, 63.5, -59.2, 63.5, -59.2,, 63.6, -67.8, 63.6, -67.8, 68, -67.8, 68, -67.8,
 
  151                       68, -72, 68, -72, 72.1, -72, 72.1, -72, 72.3, -76.3, 72.3, -76.3}; 
 
  152   float limz[3][4] = {0,0,0,0,0,0,0,0, 188, 188, -188, -188 };
 
  154     for(
int i=0; 
i<14; 
i++) {
 
  155      for(
int j=0; j<4; j++) {
 
  156        if(
i<2) {tr[
i][j] = 
new TGeoTranslation(limx[
i][j], 0, 0); }
 
  157        else {tr[
i][j] = 
new TGeoTranslation(limx[
i][j], 0, limz[2][j]);}
 
  158        tr[
i][j]->SetName(Form(
"tr%dL%d",j,
i));
 
  159        tr[
i][j]->RegisterYourself();
 
  163     TGeoBBox *
L[8], *al_L[8];    
 
  164     for(
int i=2; 
i<9 ; 
i++){ 
 
  165      L[
i] = 
new TGeoBBox(Form(
"L%d",
i),   ((12+
i)*8.5-0.6)/2, 0.075,  MDT_barrel_long/2);
 
  166      al_L[
i] = 
new TGeoBBox(Form(
"al_L%d",
i),((12+
i)*8.5-0.6)/2, 0.0175, MDT_barrel_long/2);
 
  169     TGeoBBox* L_1 = 
new TGeoBBox(
"L_1",8.5, 0.08, 7.05); 
 
  170     TGeoBBox* L_2 = 
new TGeoBBox(
"L_2",13, 0.08, 7.05);
 
  171     TGeoBBox* al_L_1 = 
new TGeoBBox(
"al_L_1",8.5, 0.018, 7.05); 
 
  172     TGeoBBox* al_L_2 = 
new TGeoBBox(
"al_L_2",13, 0.018, 7.05);
 
  174     TGeoVolume *G10[16], *ST[16];
 
  175     TGeoCompositeShape *CG10[16], *CST[16]; 
 
  176     float ppos[14] = {-2.5,-2.5,-1.7,4.3,-2.4,0.6,-3.1,1.5,-3.7,2.2,-0.4,2.9,-1.0,3.4};
 
  180   int qqq[12][13]={2,1,0,2,2,1,2,1,2,2,2,3,2,
 
  181                    2,2,0,3,1,1,3,2,2,3,1,3,3,
 
  182                    3,1,0,4,2,1,4,1,2,4,2,3,4,
 
  183                    4,2,0,5,2,1,5,2,2,5,2,3,5,
 
  184                    4,1,0,6,2,1,6,1,2,6,2,3,6,
 
  185                    5,2,0,7,2,1,7,2,2,7,2,3,7,
 
  186                    5,1,0,8,2,1,8,1,2,8,2,3,8,
 
  187                    6,2,0,9,1,1,9,2,2,9,1,3,9,
 
  188                    7,2,0,10,2,1,10,2,2,10,2,3,10,
 
  189                    7,2,0,11,1,1,11,2,2,11,1,3,11,
 
  190                    8,2,0,12,2,1,12,2,2,12,2,3,12,
 
  191                    8,2,0,13,1,1,13,2,2,13,1,3,13}; 
 
  193   for(
int i=2; 
i<14; 
i++){
 
  194     sprintf(longb,
"L%d-(L_%d:tr%dL%d+L_%d:tr%dL%d+L_%d:tr%dL%d+L_%d:tr%dL%d)",
 
  195     qqq[
i-2][0],qqq[
i-2][1],qqq[
i-2][2],qqq[
i-2][3],qqq[
i-2][4],qqq[
i-2][5],qqq[
i-2][6],qqq[
i-2][7],qqq[
i-2][8],
 
  196     qqq[
i-2][9],qqq[
i-2][10],qqq[
i-2][11],qqq[
i-2][12]);
 
  198     sprintf(longb1,
"L%d-(L_%d:tr%dL%d+L_%d:tr%dL%d+L_%d:tr%dL%d+L_%d:tr%dL%d)",
 
  199     qqq[
i-2][0],qqq[
i-2][1],qqq[
i-2][2],qqq[
i-2][3],qqq[
i-2][4],qqq[
i-2][5],qqq[
i-2][6],qqq[
i-2][7],qqq[
i-2][8],
 
  200     qqq[
i-2][9],qqq[
i-2][10],qqq[
i-2][11],qqq[
i-2][12]);
 
  202     CG10[
i] = 
new TGeoCompositeShape(longb);
 
  203     CST[
i]  = 
new TGeoCompositeShape(longb1);
 
  204     G10[
i] = 
new TGeoVolume(Form(
"GP%d_%d_B",
i,0), CG10[
i], med7);
 
  205     ST[
i] = 
new TGeoVolume(Form(
"ST%d_%d_B",i,0), CST[i], med7);
 
  209     TGeoBBox* L01 = 
new TGeoBBox(
"L0",58.9, 0.075, MDT_barrel_short/2);     
 
  210     TGeoBBox* al_L0_1 = 
new TGeoBBox(
"al_L0_1",58.9, 0.0175, MDT_barrel_short/2);    
 
  211     TGeoBBox* al_L0_2 = 
new TGeoBBox(
"al_L0_2",58.9, 0.0175, MDT_barrel_short/2);    
 
  213     G10[1] = 
new TGeoVolume(
"GP01_0",L01, 
gGeoManager->GetMedium(
"G10"));
 
  214     ST[0] = 
new TGeoVolume(
"ST0_0",al_L0_1, 
gGeoManager->GetMedium(
"aluminium"));
 
  215     ST[1] = 
new TGeoVolume(
"ST1_0",al_L0_2, 
gGeoManager->GetMedium(
"aluminium"));
 
  218      for(
int ii = 0; ii < 14; ii++){
 
  219       if(ii == 0) { ST[ii]->SetLineColor(kBlue); } 
 
  221        G10[ii]->SetLineColor(kRed);
 
  222        ST[ii]->SetLineColor(kBlue);
 
  232      for(
int ii = 0; ii < 14; ii++){ 
 
  234       for(
int i = 0; 
i < mm1[ii][0]; 
i++){ 
 
  236         pos_y = 155.715+(ii-2)*6;
 
  238         if(
i <= mm1[ii][1])                   { pos_x = mm[ii][0] + (-1)**ii*8.5*
i;                
 
  239          name(tube[1][0],fl,0,ii,(-1)**ii*(mm1[ii][0]-
i-1)+(ii%2)*(mm1[ii][0]-1),0); 
 
  240          mnk[ii]->AddNode(tube[1][0], (-1)**ii*(mm1[ii][0]-
i-1)+(ii%2)*(mm1[ii][0]-1), 
new TGeoTranslation(pos_x,pos_y,pos_z));
 
  243         if(
i >  mm1[ii][1] && 
i < mm1[ii][2]) { pos_x = mm[ii][1] + (-1)**ii*8.5*(
i-mm1[ii][1]-1); 
 
  244          name(tube[0][0],fl,0,ii,(-1)**ii*(mm1[ii][0]-
i-1)+(ii%2)*(mm1[ii][0]-1),0);  
 
  245          mnk[ii]->AddNode(tube[0][0], (-1)**ii*(mm1[ii][0]-
i-1)+(ii%2)*(mm1[ii][0]-1), 
new TGeoTranslation(pos_x,pos_y,pos_z));}
 
  247         if(
i >= mm1[ii][2])                   { pos_x = mm[ii][2] + (-1)**ii*8.5*(
i-mm1[ii][2]);   
 
  248          name(tube[1][0],fl,0,ii,(-1)**ii*(mm1[ii][0]-
i-1)+(ii%2)*(mm1[ii][0]-1),0);  
 
  249          mnk[ii]->AddNode(tube[1][0], (-1)**ii*(mm1[ii][0]-
i-1)+(ii%2)*(mm1[ii][0]-1), 
new TGeoTranslation(pos_x,pos_y,pos_z));} 
 
  251           pos_y = (147 - MDT_thickness/2 - (MDT_thickness + 0.5)*(ii-1)); 
 
  252           pos_x = (mm[ii][0] - (-1)**ii*
i*8.5);  
 
  253           name(tube[1][0],fl,0,ii,(-1)**(ii+1)*(mm1[ii][0]-i-1)+(mm1[ii][0]-1)*((ii+1)%2),0); 
 
  254           mnk[ii]->AddNode(tube[1][0], (-1)**(ii+1)*(mm1[ii][0]-i-1)+(mm1[ii][0]-1)*((ii+1)%2), 
new TGeoTranslation(pos_x,pos_y,pos_z));
 
  259       mnk[ii]->AddNode(G10[ii], ii, 
new TGeoTranslation(ppos[ii], (pos_y+MDT_thickness/2+0.1), pos_z));
 
  260       mnk[ii]->AddNode(ST[ii], ii, 
new TGeoTranslation(ppos[ii], (pos_y+MDT_thickness/2+0.1+0.0930), pos_z));
 
  261       MdtOct0->AddNode(mnk[ii], ii);
 
  265        mnk[ii]->AddNode(ST[ii], ii, 
new TGeoTranslation(-2.5, (147.25 +0.0930), pos_z));     
 
  266        MdtOct0->AddNode(mnk[ii], ii);
 
  270        mnk[ii]->AddNode(ST[ii], ii, 
new TGeoTranslation(-2.5, (147.25 -0.0930), pos_z));     
 
  271        mnk[ii]->AddNode(G10[ii], ii, 
new TGeoTranslation(-2.5, 147.25, pos_z));
 
  272        MdtOct0->AddNode(mnk[ii], ii);
 
  279   for(
int i = 0; 
i < 26; 
i++){
 
  281     if(
i>=0  && 
i<2)  { pos_z = 146.75;    pos_x = (53.55  - 8.5*
i);      
name(tube[2][0],fl,2,2,
i,0); mnk1[2]->AddNode(tube[2][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  282     if(
i>=2  && 
i<11) { pos_z = 153.75;    pos_x = (36.55  - 8.5*(
i-2));  
name(tube[3][0],fl,2,2,
i,0); mnk1[2]->AddNode(tube[3][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  283     if(
i>=11 && 
i<14) { pos_z = 146.75;    pos_x = (-39.95 - 8.5*(
i-11)); 
name(tube[2][0],fl,2,2,
i,0); mnk1[2]->AddNode(tube[2][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  284     if(
i>=14 && 
i<18) { pos_z = (-101.75); pos_x = (-56.95 + 8.5*(
i-14)); 
name(tube[4][0],fl,2,2,
i,0); mnk1[2]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  285     if(
i>=18 && 
i<22) { pos_z = (-90);     pos_x = (-14.75 + 8.5*(
i-18)); 
name(tube[5][0],fl,2,2,
i,0); mnk1[2]->AddNode(tube[5][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  286     if(
i>=22)         { pos_z = (-101.75); pos_x = (31.45  + 8.5*(
i-22)); 
name(tube[4][0],fl,2,2,
i,0); mnk1[2]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  289   for(
int i = 0; 
i < 24; 
i++){
 
  291     if(
i>=0  && 
i<1)  { pos_z =  45;       pos_x = (59.348  - 8.5*
i);      
name(tube[1][0],fl,2,3,
i,0); mnk1[3]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  292     if(
i>=1  && 
i<3)  { pos_z = 146.75;    pos_x = (50.938  - 8.5*(
i-1));  
name(tube[2][0],fl,2,3,
i,0); mnk1[3]->AddNode(tube[2][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  293     if(
i>=3  && 
i<12) { pos_z = 153.75;    pos_x = (33.938  - 8.5*(
i-3));  
name(tube[3][0],fl,2,3,
i,0); mnk1[3]->AddNode(tube[3][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  294     if(
i>=12 && 
i<13) { pos_z = 146.75;    pos_x = (-42.562 - 8.5*(
i-12)); 
name(tube[2][0],fl,2,3,
i,0); mnk1[3]->AddNode(tube[2][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  295     if(
i>=13 && 
i<14) { pos_z = 45;        pos_x = (-59.438 - 8.5*(
i-13)); 
name(tube[1][0],fl,2,3,
i,0); mnk1[3]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  296     if(
i>=14 && 
i<17) { pos_z = (-101.75); pos_x = (-50.938 + 8.5*(
i-14)); 
name(tube[4][0],fl,2,3,
i,0); mnk1[3]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  297     if(
i>=17 && 
i<21) { pos_z = (-90.);    pos_x = (-10.75  + 8.5*(
i-17)); 
name(tube[5][0],fl,2,3,
i,0); mnk1[3]->AddNode(tube[5][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  298     if(
i>=21)         { pos_z = (-101.75); pos_x = (33.938  + 8.5*(
i-21)); 
name(tube[4][0],fl,2,3,
i,0); mnk1[3]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  301   for(
int i = 0; 
i < 27; 
i++){
 
  303     if(
i>=0  && 
i<1)  { pos_z =  45;       pos_x = (61.92  - 8.5*
i);      
name(tube[1][0],fl,2,4,
i,0); mnk1[4]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  304     if(
i>=1  && 
i<2)  { pos_z = 146.75;   pos_x = (48.58  - 8.5*(
i-1));  
name(tube[2][0],fl,2,4,
i,0); mnk1[4]->AddNode(tube[2][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  305     if(
i>=2  && 
i<12) { pos_z = 153.75;    pos_x = (40.08  - 8.5*(
i-2));  
name(tube[3][0],fl,2,4,
i,0); mnk1[4]->AddNode(tube[3][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  306     if(
i>=12 && 
i<14) { pos_z = 146.75;    pos_x = (-44.92 - 8.5*(
i-12)); 
name(tube[2][0],fl,2,4,
i,0); mnk1[4]->AddNode(tube[2][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  307     if(
i>=14 && 
i<15) { pos_z = 45;        pos_x = (-61.92 - 8.5*(
i-14)); 
name(tube[1][0],fl,2,4,
i,0); mnk1[4]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  308     if(
i>=15 && 
i<19) { pos_z = (-101.75); pos_x = (-53.42 + 8.5*(
i-15)); 
name(tube[4][0],fl,2,4,
i,0); mnk1[4]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  309     if(
i>=19 && 
i<23) { pos_z = (-90);     pos_x = (-14.75 + 8.5*(
i-19)); 
name(tube[5][0],fl,2,4,
i,0); mnk1[4]->AddNode(tube[5][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  310     if(
i>=23)         { pos_z = (-101.75); pos_x = (27.92  + 8.5*(
i-23)); 
name(tube[4][0],fl,2,4,
i,0); mnk1[4]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  313   for(
int i = 0; 
i < 28; 
i++){
 
  315     if(
i>=0  && 
i<1)  { pos_z =  45;       pos_x = (64.40  - 8.5*
i);      
name(tube[1][0],fl,2,5,
i,0); mnk1[5]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  316     if(
i>=1  && 
i<3)  { pos_z = 146.75;    pos_x = (55.90  - 8.5*(
i-1));  
name(tube[2][0],fl,2,5,
i,0); mnk1[5]->AddNode(tube[2][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  317     if(
i>=3  && 
i<13) { pos_z = 153.75;    pos_x = (38.90  - 8.5*(
i-3));  
name(tube[3][0],fl,2,5,
i,0); mnk1[5]->AddNode(tube[3][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  318     if(
i>=13 && 
i<15) { pos_z = 146.75;    pos_x = (-46.10 - 8.5*(
i-13)); 
name(tube[2][0],fl,2,5,
i,0); mnk1[5]->AddNode(tube[2][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  319     if(
i>=15 && 
i<16) { pos_z = 45;        pos_x = (-64.40 - 8.5*(
i-15)); 
name(tube[1][0],fl,2,5,
i,0); mnk1[5]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  320     if(
i>=16 && 
i<20) { pos_z = (-101.75); pos_x = (-55.90 + 8.5*(
i-16)); 
name(tube[4][0],fl,2,5,
i,0); mnk1[5]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  321     if(
i>=20 && 
i<24) { pos_z = (-90);     pos_x = (-10.75 + 8.5*(
i-20)); 
name(tube[5][0],fl,2,5,
i,0); mnk1[5]->AddNode(tube[5][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  322     if(
i>=24)         { pos_z = (-101.75); pos_x = (30.40  + 8.5*(
i-24)); 
name(tube[4][0],fl,2,5,
i,0); mnk1[5]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  325   for(
int i = 0; 
i < 26; 
i++){
 
  327     if(
i>=0  && 
i<2)  { pos_z = 45;        pos_x = (66.89  - 8.5*
i);      
name(tube[1][0],fl,2,6,
i,0); mnk1[6]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  328     if(
i>=2  && 
i<13) { pos_z = 153.75;    pos_x = (43.61  - 8.5*(
i-2));  
name(tube[3][0],fl,2,6,
i,0); mnk1[6]->AddNode(tube[3][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  329     if(
i>=13  && 
i<14){ pos_z = (146.75);  pos_x = (-49.89 - 8.5*(
i-13)); 
name(tube[2][0],fl,2,6,
i,0); mnk1[6]->AddNode(tube[2][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}  
 
  330     if(
i>=14 && 
i<16) { pos_z = 45;        pos_x = (-58.39 - 8.5*(
i-14)); 
name(tube[1][0],fl,2,6,
i,0); mnk1[6]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  331     if(
i>=16 && 
i<19) { pos_z = (-101.75); pos_x = (-49.89 + 8.5*(
i-16)); 
name(tube[4][0],fl,2,6,
i,0); mnk1[6]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  332     if(
i>=19 && 
i<23) { pos_z = (-90);     pos_x = (-14.75 + 8.5*(
i-19)); 
name(tube[5][0],fl,2,6,
i,0); mnk1[6]->AddNode(tube[5][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  333     if(
i>=23)         { pos_z = (-101.75); pos_x = (32.89  + 8.5*(
i-23)); 
name(tube[4][0],fl,2,6,
i,0); mnk1[6]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  336   for(
int i = 0; 
i < 29; 
i++){
 
  338     if(
i>=0  && 
i<2)  { pos_z = 45;        pos_x = (69.38  - 8.5*
i);      
name(tube[1][0],fl,2,7,
i,0); mnk1[7]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  339     if(
i>=2  && 
i<3)  { pos_z = 146.75;    pos_x = (52.38  - 8.5*(
i-2));  
name(tube[2][0],fl,2,7,
i,0); mnk1[7]->AddNode(tube[2][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  340     if(
i>=3  && 
i<=13){ pos_z = 153.75;    pos_x = (43.88  - 8.5*(
i-3));  
name(tube[3][0],fl,2,7,
i,0); mnk1[7]->AddNode(tube[3][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  341     if(
i>=14 && 
i<15) { pos_z = 146.75;    pos_x = (-49.62 - 8.5*(
i-14)); 
name(tube[2][0],fl,2,7,
i,0); mnk1[7]->AddNode(tube[2][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  342     if(
i>=15 && 
i<17) { pos_z = 45;        pos_x = (-60.88 - 8.5*(
i-15)); 
name(tube[1][0],fl,2,7,
i,0); mnk1[7]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  343     if(
i>=17 && 
i<21) { pos_z = (-101.75); pos_x = (-52.38 + 8.5*(
i-17)); 
name(tube[4][0],fl,2,7,
i,0); mnk1[7]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  344     if(
i>=21 && 
i<25) { pos_z = (-90);     pos_x = (-10.75 + 8.5*(
i-21)); 
name(tube[5][0],fl,2,7,
i,0); mnk1[7]->AddNode(tube[5][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  345     if(
i>=25)         { pos_z = (-101.75); pos_x = (26.88  + 8.5*(
i-25)); 
name(tube[4][0],fl,2,7,
i,0); mnk1[7]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  348   for(
int i = 0; 
i < 29; 
i++){
 
  350     if(
i>=0  && 
i<2)  { pos_z = 45;        pos_x = (71.86  - 8.5*
i);      
name(tube[1][0],fl,2,8,
i,0); mnk1[8]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  351     if(
i>=2  && 
i<14) { pos_z = 153.75;    pos_x = (47.14  - 8.5*(
i-2));  
name(tube[3][0],fl,2,8,
i,0); mnk1[8]->AddNode(tube[3][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  352     if(
i>=14 && 
i<15) { pos_z = 146.75;    pos_x = (-54.86 - 8.5*(
i-14)); 
name(tube[2][0],fl,2,8,
i,0); mnk1[8]->AddNode(tube[2][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  353     if(
i>=15 && 
i<17) { pos_z = 45;        pos_x = (-63.36 - 8.5*(
i-15)); 
name(tube[1][0],fl,2,8,
i,0); mnk1[8]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  354     if(
i>=17 && 
i<21) { pos_z = (-101.75); pos_x = (-54.86 + 8.5*(
i-17)); 
name(tube[4][0],fl,2,8,
i,0); mnk1[8]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  355     if(
i>=21 && 
i<25) { pos_z = (-90);     pos_x = (-14.75 + 8.5*(
i-21)); 
name(tube[5][0],fl,2,8,
i,0); mnk1[8]->AddNode(tube[5][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  356     if(
i>=25)         { pos_z = (-101.75); pos_x = (29.36  + 8.5*(
i-25)); 
name(tube[4][0],fl,2,8,
i,0); mnk1[8]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  359  for(
int i = 0; 
i < 28; 
i++){
 
  361     if(
i>=0  && 
i<3)  { pos_z = 45;        pos_x = (74.35  - 8.5*
i);      
name(tube[1][0],fl,2,9,
i,0); mnk1[9]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  362     if(
i>=3  && 
i<15) { pos_z = 153.75;    pos_x = (48.85  - 8.5*(
i-3));  
name(tube[3][0],fl,2,9,
i,0); mnk1[9]->AddNode(tube[3][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  363     if(
i>=15 && 
i<18) { pos_z = 45;        pos_x = (-57.35 - 8.5*(
i-15)); 
name(tube[1][0],fl,2,9,
i,0); mnk1[9]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  364     if(
i>=18 && 
i<21) { pos_z = (-101.75); pos_x = (-48.85 + 8.5*(
i-18)); 
name(tube[4][0],fl,2,9,
i,0); mnk1[9]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  365     if(
i>=21 && 
i<25) { pos_z = (-90);     pos_x = (-10.75 + 8.5*(
i-21)); 
name(tube[5][0],fl,2,9,
i,0); mnk1[9]->AddNode(tube[5][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  366     if(
i>=25)         { pos_z = (-101.75); pos_x = (31.85  + 8.5*(
i-25)); 
name(tube[4][0],fl,2,9,
i,0); mnk1[9]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  369   for(
int i = 0; 
i < 29; 
i++){
 
  371     if(
i>=0  && 
i<3)  { pos_z = 45;        pos_x = (76.83  - 8.5*
i);      
name(tube[1][0],fl,2,10,
i,0); mnk1[10]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  372     if(
i>=3  && 
i<16) { pos_z = 153.75;    pos_x = (50.67  - 8.5*(
i-3));  
name(tube[3][0],fl,2,10,
i,0); mnk1[10]->AddNode(tube[3][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  373     if(
i>=16 && 
i<19) { pos_z = 45;        pos_x = (-59.83 - 8.5*(
i-16)); 
name(tube[1][0],fl,2,10,
i,0); mnk1[10]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  374     if(
i>=19 && 
i<22) { pos_z = (-101.75); pos_x = (-51.33 + 8.5*(
i-19)); 
name(tube[4][0],fl,2,10,
i,0); mnk1[10]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  375     if(
i>=22 && 
i<26) { pos_z = (-90);     pos_x = (-14.75 + 8.5*(
i-22)); 
name(tube[5][0],fl,2,10,
i,0); mnk1[10]->AddNode(tube[5][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  376     if(
i>=26)         { pos_z = (-101.75); pos_x = (34.33  + 8.5*(
i-26)); 
name(tube[4][0],fl,2,10,
i,0); mnk1[10]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  379   for(
int i = 0; 
i < 29; 
i++){
 
  381     if(
i>=0  && 
i<3)  { pos_z = 45;        pos_x = (79.32  - 8.5*
i);      
name(tube[1][0],fl,2,11,
i,0); mnk1[11]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  382     if(
i>=3  && 
i<16) { pos_z = 153.75;    pos_x = (53.82  - 8.5*(
i-3));  
name(tube[3][0],fl,2,11,
i,0); mnk1[11]->AddNode(tube[3][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  383     if(
i>=16 && 
i<19) { pos_z = 45;        pos_x = (-62.32 - 8.5*(
i-16)); 
name(tube[1][0],fl,2,11,
i,0); mnk1[11]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  384     if(
i>=19 && 
i<23) { pos_z = (-101.75); pos_x = (-53.82 + 8.5*(
i-19)); 
name(tube[4][0],fl,2,11,
i,0); mnk1[11]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  385     if(
i>=23 && 
i<27) { pos_z = (-90);     pos_x = (-10.75 + 8.5*(
i-23)); 
name(tube[5][0],fl,2,11,
i,0); mnk1[11]->AddNode(tube[5][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  386     if(
i>=27)         { pos_z = (-101.75); pos_x = (28.32  + 8.5*(
i-27)); 
name(tube[4][0],fl,2,11,
i,0); mnk1[11]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}  
 
  389   for(
int i = 0; 
i < 32; 
i++){
 
  391     if(
i>=0  && 
i<3)  { pos_z = 45;        pos_x = (81.80  - 8.5*
i);      
name(tube[1][0],fl,2,12,
i,0); mnk1[12]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  392     if(
i>=3  && 
i<17) { pos_z = 153.75;    pos_x = (54.20  - 8.5*(
i-3));  
name(tube[3][0],fl,2,12,
i,0); mnk1[12]->AddNode(tube[3][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  393     if(
i>=17 && 
i<20) { pos_z = 45;        pos_x = (-64.80 - 8.5*(
i-17)); 
name(tube[1][0],fl,2,12,
i,0); mnk1[12]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  394     if(
i>=20 && 
i<24) { pos_z = (-101.75); pos_x = (-56.30 + 8.5*(
i-20)); 
name(tube[4][0],fl,2,12,
i,0); mnk1[12]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  395     if(
i>=24 && 
i<28) { pos_z = (-90);     pos_x = (-14.75 + 8.5*(
i-24)); 
name(tube[5][0],fl,2,12,
i,0); mnk1[12]->AddNode(tube[5][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  396     if(
i>=28)         { pos_z = (-101.75); pos_x = (30.80  + 8.5*(
i-28)); 
name(tube[4][0],fl,2,12,
i,0); mnk1[12]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  399   for(
int i = 0; 
i < 32; 
i++){
 
  401     if(
i>=0  && 
i<3)  { pos_z = 45;        pos_x = (84.29  - 8.5*
i);      
name(tube[1][0],fl,2,13,
i,0); mnk1[13]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  402     if(
i>=3  && 
i<17) { pos_z = 153.75;    pos_x = (58.79  - 8.5*(
i-3));  
name(tube[3][0],fl,2,13,
i,0); mnk1[13]->AddNode(tube[3][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  403     if(
i>=17 && 
i<20) { pos_z = 45;        pos_x = (-67.29 - 8.5*(
i-17)); 
name(tube[1][0],fl,2,13,
i,0); mnk1[13]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  404     if(
i>=20 && 
i<24) { pos_z = (-101.75); pos_x = (-58.79 + 8.5*(
i-20)); 
name(tube[4][0],fl,2,13,
i,0); mnk1[13]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  405     if(
i>=24 && 
i<28) { pos_z = (-90);     pos_x = (-10.75 + 8.5*(
i-24)); 
name(tube[5][0],fl,2,13,
i,0); mnk1[13]->AddNode(tube[5][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  406     if(
i>=28)         { pos_z = (-101.75); pos_x = (33.29  + 8.5*(
i-28)); 
name(tube[4][0],fl,2,13,
i,0); mnk1[13]->AddNode(tube[4][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  412  for(
int ii = 0; ii < 2; ii++){
 
  413   for(
int i = 0; 
i < 16; 
i++){
 
  414     pos_y = (149.-2.-MDT_thickness/2-(MDT_thickness + 0.5)*(ii-1)); 
 
  416      if(
i < 14)  { pos_x = (53.05 - 
i*8.5); }  
 
  417      if(
i >= 14) { pos_x = (53.05 - (
i-8)*8.5); }
 
  419        if(
i < 14)  { pos_x = (-57.95 + 
i*8.5); }  
 
  420        if(
i >= 14) { pos_x = (-57.95 + (
i-8)*8.5); }      
 
  423     if((i<6 || i>=8) && 
i<14 ) { pos_z = 45.;     
name(tube[1][0],fl,2,ii,
i,0); mnk1[ii]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z)); } 
 
  424     if(
i>=6 && 
i<8)            { pos_z = 117.55;  
name(tube[6][0],fl,2,ii,
i,0); mnk1[ii]->AddNode(tube[6][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z)); }  
 
  425     if(
i>=14)                  { pos_z = (-72.6); 
name(tube[7][0],fl,2,ii,
i,0); mnk1[ii]->AddNode(tube[7][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z)); } 
 
  431   TGeoBBox* L_3 = 
new TGeoBBox(
"L_3",18.4, 0.08, 7.05);
 
  432   TGeoBBox* al_L_3 = 
new TGeoBBox(
"al_L_3",18.4, 0.018, 7.05);
 
  434   int qqq1[12][6]={3,0,2,2,1,2,  
 
  437                   3,0,5,3,1,5,    3,0,6,3,1,6,    3,0,7,3,1,7,
 
  438                   3,0,8,3,1,8,    3,0,9,3,1,9,    3,0,10,3,1,10,
 
  439                   3,0,11,3,1,11,  3,0,12,3,1,12,  3,0,13,3,1,13}; 
 
  441   TGeoTranslation* trs[14][5];
 
  442   float limx1[12][2] = {61.0,-46.3,   55.9,-56.2,   61.9,-59.0,  61.4,-59.7, 
 
  443                         65.9,-63.5,   66.4,-63.4,   69.4,-68.6,  71.4,-67.2, 
 
  444                         72.8,-73.8,   76.2,-70.8,   76.2,-78.8,  81.2, -74.}; 
 
  446     for(
int i=0; 
i<12; 
i++) {
 
  447      for(
int j=0; j<2; j++) {
 
  448        trs[
i][j] = 
new TGeoTranslation(limx1[
i][j], 0, 181);
 
  449        trs[
i][j]->SetName(Form(
"trs%dL%d",j,
i+2));
 
  450        trs[
i][j]->RegisterYourself();
 
  454     TGeoBBox *K[14], *al_K[14], *K_h[14], *al_K_h[14];
 
  455     TGeoTranslation* trr[15];    
 
  456     trr_h = 
new TGeoTranslation(0, 0, -52);
 
  457     trr_h->SetName(Form(
"trr_h"));
 
  458     trr_h->RegisterYourself();
 
  460     float ln[12]  = {14.,15,15.5,16,16.8,17.2,18,18.5,19,19.7,20.2,20.9};
 
  461     float ln2[12] = {14.2,13,13.6,14.2,12.8,13.4,13.9,12.6,13.1,13.8,14.2,14.8};
 
  464     float ppos1[12] = {-2.1, 0.2, 0.2, 0, 0, 0, 0, 0, 0, 0, 0, 0}; 
 
  465     TGeoVolume *G10_2[16], *ST_2[16];
 
  466     TGeoCompositeShape *CG10_2[16], *CST_2[16];  
 
  468    for(
int i=2; 
i<14; 
i++){
 
  469     K[
i] = 
new TGeoBBox(Form(
"K%d",
i),           (ln[
i-2]*8.5-0.6)/2, 0.075,  (390-14)/2);     
 
  470     K_h[
i] = 
new TGeoBBox(Form(
"K_h%d",
i),       (ln2[
i-2]*8.5/2), 0.125,     15.9*8.5/2);
 
  471     al_K[
i] = 
new TGeoBBox(Form(
"al_K%d",
i),     (ln[
i-2]*8.5-0.6)/2, 0.0175, (390-14)/2);     
 
  472     al_K_h[
i] = 
new TGeoBBox(Form(
"al_K_h%d",
i), (ln2[
i-2]*8.5/2), 0.04,      15.9*8.5/2);
 
  474     sprintf(llongb,
"K%d-K_h%d:trr_h-L_%d:trs%dL%d-L_%d:trs%dL%d",
i,
i,qqq1[
i-2][0],qqq1[
i-2][1],qqq1[
i-2][2],qqq1[
i-2][3],qqq1[
i-2][4],qqq1[
i-2][5]);
 
  475     sprintf(llongb1,
"K%d-K_h%d:trr_h-L_%d:trs%dL%d-L_%d:trs%dL%d",
i,
i,qqq1[
i-2][0],qqq1[
i-2][1],qqq1[
i-2][2],qqq1[
i-2][3],qqq1[
i-2][4],qqq1[
i-2][5]);
 
  477     CG10_2[
i] = 
new TGeoCompositeShape(llongb);
 
  478     G10_2[
i] = 
new TGeoVolume(Form(
"GP%d_%d_B",
i,2), CG10_2[
i], med7);
 
  479     G10_2[
i]->SetLineColor(kRed);
 
  480     CST_2[
i] = 
new TGeoCompositeShape(llongb1);
 
  481     ST_2[
i] = 
new TGeoVolume(Form(
"ST%d_%d_B",i,2), CST_2[i], med7);
 
  482     ST_2[
i]->SetLineColor(kBlue);
 
  483     mnk1[
i]->AddNode(G10_2[i], 1, 
new TGeoTranslation(ppos1[i-2], 156.43+6*(i-2), 52));
 
  484     mnk1[
i]->AddNode(ST_2[i], 1, 
new TGeoTranslation(ppos1[i-2], 156.43+6*(i-2)+0.093, 52));
 
  488     K[0] = 
new TGeoBBox(Form(
"K%d",0),       118.4/2, 0.15/2,  MDT_barrel_short/2);
 
  489     al_K[0] = 
new TGeoBBox(Form(
"al_K%d",0), 118.4/2, 0.035/2,  MDT_barrel_short/2);
 
  490     TGeoBBox* K_h0 = 
new TGeoBBox(
"K_h0",       8.5,0.125,8.5);
 
  491     TGeoBBox* al_K_h0 = 
new TGeoBBox(
"al_K_h0", 8.5,0.04, 8.5);
 
  492     trrr = 
new TGeoTranslation(0, 0, -45);
 
  493        trrr->SetName(
"trrr");
 
  494        trrr->RegisterYourself();
 
  495     CG10_2[0] = 
new TGeoCompositeShape(
"K0-K_h0:trrr");
 
  496     CST_2[0] = 
new TGeoCompositeShape(
"al_K0-K_h0:trrr");
 
  497     CST_2[1] = 
new TGeoCompositeShape(
"al_K0-al_K_h0:trrr");
 
  498     G10_2[0] = 
new TGeoVolume(Form(
"GP%d_%d_B",0,2), CG10_2[0], med7);
 
  499     ST_2[0] = 
new TGeoVolume(Form(
"ST%d_%d_B",0,2), CST_2[0], med7);
 
  500     ST_2[1] = 
new TGeoVolume(Form(
"ST%d_%d_B",1,2), CST_2[1], med7);
 
  501     G10_2[0]->SetLineColor(kRed);
 
  502     ST_2[0]->SetLineColor(kBlue);
 
  503     ST_2[1]->SetLineColor(kBlue);
 
  505     mnk1[0]->AddNode(G10_2[0], 1, 
new TGeoTranslation(-2.5, (149. - 2. - MDT_thickness + (MDT_thickness+0.5/2)), 45.));
 
  506     mnk1[0]->AddNode(ST_2[0], 0, 
new TGeoTranslation(-2.5, (149. - 2. - MDT_thickness + (MDT_thickness+0.5/2) -0.0930), 45));     
 
  507     mnk1[1]->AddNode(ST_2[1], 1, 
new TGeoTranslation(-2.5, (149. - 2. - MDT_thickness + (MDT_thickness+0.5/2) +0.0930), 45));     
 
  509   for(
int i = 0; 
i < 14; 
i++) {MdtOct2->AddNode(mnk1[
i], i);}
 
  514   for(
int i = 0; 
i < 20; 
i++){
 
  516     if(
i>=0  && 
i<=1)  { pos_z = 45;     pos_x = (56.95  - 8.5*
i);      
name(tube[1][0],fl,6,2,
i,0); mnk2[2]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  517     if(
i>=2  && 
i<=3)  { pos_z = 45;     pos_x = (39.95  - 8.5*(
i-2));  
name(tube[0][0],fl,6,2,
i,0); mnk2[2]->AddNode(tube[0][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  518     if(
i>=4  && 
i<=9)  { pos_z = 133.75; pos_x = (19.55  - 8.5*(
i-4));  
name(tube[8][0],fl,6,2,
i,0); mnk2[2]->AddNode(tube[8][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  519     if(
i>=10 && 
i<=11) { pos_z = 45;     pos_x = (-31.45 - 8.5*(
i-10)); 
name(tube[0][0],fl,6,2,
i,0); mnk2[2]->AddNode(tube[0][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  520     if(
i>=12 && 
i<=13) { pos_z = 45;     pos_x = (-48.45 - 8.5*(
i-12)); 
name(tube[1][0],fl,6,2,
i,0); mnk2[2]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  521     if(
i>=14)          { pos_z = -89.25; pos_x = (-22.95 + 8.5*(
i-14)); 
name(tube[9][0],fl,6,2,
i,0); mnk2[2]->AddNode(tube[9][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  524   for(
int i = 0; 
i < 20; 
i++){
 
  526     if(
i>=0  && 
i<=1)  { pos_z = 45;     pos_x = (59.438  - 8.5*
i);      
name(tube[1][0],fl,6,3,
i,0); mnk2[3]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  527     if(
i>=2  && 
i<=4)  { pos_z = 45;     pos_x = (42.438  - 8.5*(
i-2));  
name(tube[0][0],fl,6,3,
i,0); mnk2[3]->AddNode(tube[0][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  528     if(
i>=5  && 
i<=9)  { pos_z = 133.75; pos_x = (16.938  - 8.5*(
i-5));  
name(tube[8][0],fl,6,3,
i,0); mnk2[3]->AddNode(tube[8][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  529     if(
i>=10 && 
i<=12) { pos_z = 45;     pos_x = (-25.438 - 8.5*(
i-10)); 
name(tube[0][0],fl,6,3,
i,0); mnk2[3]->AddNode(tube[0][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  530     if(
i>=13 && 
i<=14) { pos_z = 45;     pos_x = (-50.938 - 8.5*(
i-13)); 
name(tube[1][0],fl,6,3,
i,0); mnk2[3]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  531     if(
i>=15)          { pos_z = -89.25; pos_x = (-17.062 + 8.5*(
i-15)); 
name(tube[9][0],fl,6,3,
i,0); mnk2[3]->AddNode(tube[9][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  534   for(
int i = 0; 
i < 20; 
i++){
 
  536     if(
i>=0  && 
i<=1)  { pos_z = 45;     pos_x = (61.92  - 8.5*
i);      
name(tube[1][0],fl,6,4,
i,0); mnk2[4]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  537     if(
i>=2  && 
i<=4)  { pos_z = 45;     pos_x = (44.92  - 8.5*(
i-2));  
name(tube[0][0],fl,6,4,
i,0); mnk2[4]->AddNode(tube[0][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  538     if(
i>=5  && 
i<=9)  { pos_z = 133.75; pos_x = (14.858 - 8.5*(
i-5));  
name(tube[8][0],fl,6,4,
i,0); mnk2[4]->AddNode(tube[8][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  539     if(
i>=10 && 
i<=12) { pos_z = 45;     pos_x = (-27.92 - 8.5*(
i-10)); 
name(tube[0][0],fl,6,4,
i,0); mnk2[4]->AddNode(tube[0][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  540     if(
i>=13 && 
i<=14) { pos_z = 45;     pos_x = (-53.42 - 8.5*(
i-13)); 
name(tube[1][0],fl,6,4,
i,0); mnk2[4]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  541     if(
i>=15)          { pos_z = -89.25; pos_x = (-19.42 + 8.5*(
i-15)); 
name(tube[9][0],fl,6,4,
i,0); mnk2[4]->AddNode(tube[9][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  544   for(
int i = 0; 
i < 22; 
i++){
 
  546     if(
i>=0  && 
i<=1)  { pos_z = 45;     pos_x = (64.40  - 8.5*
i);      
name(tube[1][0],fl,6,5,
i,0); mnk2[5]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  547     if(
i>=2  && 
i<=4)  { pos_z = 45;     pos_x = (47.40  - 8.5*(
i-2));  
name(tube[0][0],fl,6,5,
i,0); mnk2[5]->AddNode(tube[0][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  548     if(
i>=5  && 
i<=10) { pos_z = 133.75; pos_x = (21.90  - 8.5*(
i-5));  
name(tube[8][0],fl,6,5,
i,0); mnk2[5]->AddNode(tube[8][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  549     if(
i>=11 && 
i<=13) { pos_z = 45;     pos_x = (-30.40 - 8.5*(
i-11)); 
name(tube[0][0],fl,6,5,
i,0); mnk2[5]->AddNode(tube[0][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  550     if(
i>=14 && 
i<=15) { pos_z = 45;     pos_x = (-55.90 - 8.5*(
i-14)); 
name(tube[1][0],fl,6,5,
i,0); mnk2[5]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  551     if(
i>=16)          { pos_z = -89.25; pos_x = (-20.60 + 8.5*(
i-16)); 
name(tube[9][0],fl,6,5,
i,0); mnk2[5]->AddNode(tube[9][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  554   for(
int i = 0; 
i < 28; 
i++){
 
  556     if(
i>=0  && 
i<=1)  { pos_z = 45;     pos_x = (66.89  - 8.5*
i);      
name(tube[1][0],fl,6,6,
i,0);  mnk2[6]->AddNode(tube[1][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  557     if(
i>=2  && 
i<3)   { pos_z = 143.25; pos_x = (49.89  - 8.5*(
i-2));  
name(tube[10][0],fl,6,6,
i,0); mnk2[6]->AddNode(tube[10][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  558     if(
i>=3  && 
i<=13) { pos_z = 150.25; pos_x = (41.39  - 8.5*(
i-3));  
name(tube[11][0],fl,6,6,
i,0); mnk2[6]->AddNode(tube[11][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  559     if(
i>=14 && 
i<=15) { pos_z = 45;     pos_x = (-58.39 - 8.5*(
i-14)); 
name(tube[1][0],fl,6,6,
i,0);  mnk2[6]->AddNode(tube[1][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  560     if(
i>=16 && 
i<=26) { pos_z = -105.2; pos_x = (-43.61 + 8.5*(
i-16)); 
name(tube[12][0],fl,6,6,
i,0); mnk2[6]->AddNode(tube[12][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  561     if(
i>=27)          { pos_z = -98.2;  pos_x = (49.89  + 8.5*(
i-27)); 
name(tube[13][0],fl,6,6,
i,0); mnk2[6]->AddNode(tube[13][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  564   for(
int i = 0; 
i < 30; 
i++){
 
  566     if(
i>=0  && 
i<=1)  { pos_z = 45;     pos_x = (69.38  - 8.5*
i);      
name(tube[1][0],fl,6,7,
i,0);  mnk2[7]->AddNode(tube[1][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  567     if(
i>=2  && 
i<3)   { pos_z = 143.25; pos_x = (52.38  - 8.5*(
i-2));  
name(tube[10][0],fl,6,7,
i,0); mnk2[7]->AddNode(tube[10][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  568     if(
i>=3  && 
i<=13) { pos_z = 150.25; pos_x = (43.88  - 8.5*(
i-3));  
name(tube[11][0],fl,6,7,
i,0); mnk2[7]->AddNode(tube[11][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  569     if(
i>=14  && 
i<15) { pos_z = 143.25; pos_x = (-49.62 - 8.5*(
i-14)); 
name(tube[10][0],fl,6,7,
i,0); mnk2[7]->AddNode(tube[10][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  570     if(
i>=15  && 
i<=16){ pos_z = 45.;    pos_x = (-60.88 - 8.5*(
i-15)); 
name(tube[1][0],fl,6,7,
i,0);  mnk2[7]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  571     if(
i>=17 && 
i<18)  { pos_z = -98.2;  pos_x = (-49.62 + 8.5*(
i-17)); 
name(tube[13][0],fl,6,7,
i,0); mnk2[7]->AddNode(tube[13][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}  
 
  572     if(
i>=18 && 
i<=28) { pos_z = -105.2; pos_x = (-41.12 + 8.5*(
i-18)); 
name(tube[12][0],fl,6,7,
i,0); mnk2[7]->AddNode(tube[12][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  573     if(
i>=29)          { pos_z = -98.2;  pos_x = (52.38  + 8.5*(
i-29)); 
name(tube[13][0],fl,6,7,
i,0); mnk2[7]->AddNode(tube[13][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  576   for(
int i = 0; 
i < 28; 
i++){
 
  578     if(
i>=0  && 
i<=2)  { pos_z = 45;     pos_x = (71.18  - 8.5*
i);      
name(tube[1][0],fl,6,8,
i,0);  mnk2[8]->AddNode(tube[1][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  579     if(
i>=3  && 
i<=13) { pos_z = 150.25; pos_x = (38.64  - 8.5*(
i-3));  
name(tube[11][0],fl,6,8,
i,0); mnk2[8]->AddNode(tube[11][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  580     if(
i>=14 && 
i<=16) { pos_z = 45.;    pos_x = (-54.86 - 8.5*(
i-14)); 
name(tube[1][0],fl,6,8,
i,0);  mnk2[8]->AddNode(tube[1][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  581     if(
i>=17)          { pos_z = -105.2; pos_x = (-46.36 + 8.5*(
i-17)); 
name(tube[12][0],fl,6,8,
i,0); mnk2[8]->AddNode(tube[12][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  584   for(
int i = 0; 
i < 30; 
i++){
 
  586     if(
i>=0  && 
i<=2)  { pos_z = 45;     pos_x = (74.35  - 8.5*
i);      
name(tube[1][0],fl,6,9,
i,0);  mnk2[9]->AddNode(tube[1][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  587     if(
i>=3  && 
i<=14) { pos_z = 150.25; pos_x = (48.85  - 8.5*(
i-3));  
name(tube[11][0],fl,6,9,
i,0); mnk2[9]->AddNode(tube[11][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  588     if(
i>=15 && 
i<=17) { pos_z = 45.;    pos_x = (-57.35 - 8.5*(
i-15)); 
name(tube[1][0],fl,6,9,
i,0);  mnk2[9]->AddNode(tube[1][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  589     if(
i>=18)          { pos_z = -105.2; pos_x = (-44.65 + 8.5*(
i-18)); 
name(tube[12][0],fl,6,9,
i,0); mnk2[9]->AddNode(tube[12][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  592   for(
int i = 0; 
i < 32; 
i++){
 
  594     if(
i>=0  && 
i<=2)  { pos_z = 45;     pos_x = (76.83  - 8.5*
i);      
name(tube[1][0],fl,6,10,
i,0);  mnk2[10]->AddNode(tube[1][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  595     if(
i>=3  && 
i<=15) { pos_z = 150.25; pos_x = (50.67  - 8.5*(
i-3));  
name(tube[11][0],fl,6,10,
i,0); mnk2[10]->AddNode(tube[11][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  596     if(
i>=16 && 
i<=18) { pos_z = 45.;    pos_x = (-59.83 - 8.5*(
i-16)); 
name(tube[1][0],fl,6,10,
i,0);  mnk2[10]->AddNode(tube[1][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  597     if(
i>=19)          { pos_z = -105.2; pos_x = (-51.33 + 8.5*(
i-19)); 
name(tube[12][0],fl,6,10,
i,0); mnk2[10]->AddNode(tube[12][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  600   for(
int i = 0; 
i < 32; 
i++){
 
  602     if(
i>=0  && 
i<=2)  { pos_z = 45;     pos_x = (79.32  - 8.5*
i);      
name(tube[1][0],fl,6,11,
i,0);  mnk2[11]->AddNode(tube[1][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  603     if(
i>=3  && 
i<=15) { pos_z = 150.25; pos_x = (53.82  - 8.5*(
i-3));  
name(tube[11][0],fl,6,11,
i,0); mnk2[11]->AddNode(tube[11][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  604     if(
i>=16 && 
i<=18) { pos_z = 45.;    pos_x = (-62.32 - 8.5*(
i-16)); 
name(tube[1][0],fl,6,11,
i,0);  mnk2[11]->AddNode(tube[1][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  605     if(
i>=19)          { pos_z = -105.2; pos_x = (-48.18 + 8.5*(
i-19)); 
name(tube[12][0],fl,6,11,
i,0); mnk2[11]->AddNode(tube[12][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  608   for(
int i = 0; 
i < 34; 
i++){
 
  610     if(
i>=0  && 
i<=2)  { pos_z = 45;     pos_x = (81.80  - 8.5*
i);      
name(tube[1][0],fl,6,12,
i,0);  mnk2[12]->AddNode(tube[1][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  611     if(
i>=3  && 
i<=16) { pos_z = 150.25; pos_x = (54.20  - 8.5*(
i-3));  
name(tube[11][0],fl,6,12,
i,0); mnk2[12]->AddNode(tube[11][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  612     if(
i>=17 && 
i<=19) { pos_z = 45.;    pos_x = (-64.80 - 8.5*(
i-17)); 
name(tube[1][0],fl,6,12,
i,0);  mnk2[12]->AddNode(tube[1][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  613     if(
i>=20)          { pos_z = -105.2; pos_x = (-56.30 + 8.5*(
i-20)); 
name(tube[12][0],fl,6,12,
i,0); mnk2[12]->AddNode(tube[12][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  617   for(
int i = 0; 
i < 32; 
i++){
 
  619     if(
i>=0  && 
i<=2)  { pos_z = 45;     pos_x = (84.29  - 8.5*
i);      
name(tube[1][0],fl,6,13,
i,0);  mnk2[13]->AddNode(tube[1][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  620     if(
i>=3  && 
i<4)   { pos_z = 45;     pos_x = (58.79  - 8.5*(
i-3));  
name(tube[0][0],fl,6,13,
i,0);  mnk2[13]->AddNode(tube[0][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  621     if(
i>=4  && 
i<=15) { pos_z = 150.25; pos_x = (50.29  - 8.5*(
i-4));  
name(tube[11][0],fl,6,13,
i,0); mnk2[13]->AddNode(tube[11][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  622     if(
i>=16 && 
i<17)  { pos_z = 45.;    pos_x = (-58.79 - 8.5*(
i-16)); 
name(tube[0][0],fl,6,13,
i,0);  mnk2[13]->AddNode(tube[0][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  623     if(
i>=17 && 
i<=19) { pos_z = 45.;    pos_x = (-67.29 - 8.5*(
i-17)); 
name(tube[1][0],fl,6,13,
i,0);  mnk2[13]->AddNode(tube[1][0],  
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  624     if(
i>=20)          { pos_z = -105.2; pos_x = (-50.29 + 8.5*(
i-20)); 
name(tube[12][0],fl,6,13,
i,0); mnk2[13]->AddNode(tube[12][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z));}   
 
  628   float lln[12]  = {14.4,15,15.5,16,16.8,17.2,18,18.5,19,19.7,20.2,20.9};
 
  629   float lln2[12] = {6.5,5.1,5.7,6.2,12.9,13.4,11.8,12.6,13.1,13.8,14.3,12.7};
 
  630   float ppos1[12] = {-0.2, 0.2, 0.2, 0, 0, 0, 0, 0, 0, 0, 0, 0}; 
 
  632     TGeoTranslation* trr[15];    
 
  633     ttrr_h = 
new TGeoTranslation(0, 0, -46);
 
  634     ttrr_h->SetName(Form(
"ttrr_h"));
 
  635     ttrr_h->RegisterYourself();
 
  637   TGeoBBox *KK[14], *al_KK[14], *KK_h[14], *al_KK_h[14];
 
  638   TGeoTranslation* trss[14][5];
 
  639   float limx2[12][4] = {62.8,-62,62.8,-62,
 
  640                        64.2,-64.4,64.2,-64.4,
 
  642                        69.4,-69.4,69.4,-69.4,
 
  643                        64.5,-66.4,64.5,-66.4,
 
  645                        61.5,-68.4,61.5,-68.4,
 
  646                        70.7,-67.1,70.7,-67.1,
 
  647                        72.7,-73.6,72.7,-73.6,
 
  648                        75.8,-70.8,75.8,-70.8,
 
  649                        76.2,-78.5,76.2,-78.5,
 
  650                        82.2,-80.9,82.2,-80.9};
 
  652   float limz2[1][4] = {188, 188, -188, -188}; 
 
  653     for(
int i=0; 
i<12; 
i++) {
 
  654      for(
int j=0; j<4; j++) {
 
  655        trss[
i][j] = 
new TGeoTranslation(limx2[
i][j], 0, limz2[0][j]);
 
  656        trss[
i][j]->SetName(Form(
"trss%dL%d",j,
i+2));
 
  657        trss[
i][j]->RegisterYourself();
 
  661     TGeoVolume *G10_6[16], *ST_6[16];
 
  662     TGeoCompositeShape *CG10_6[16], *CST_6[16];  
 
  665    for(
int i=2; 
i<14; 
i++){
 
  666     KK[
i] = 
new TGeoBBox(Form(
"KK%d",
i),         (lln[
i-2]*8.5-0.6)/2, 0.075,  390/2);     
 
  667     al_KK[
i] = 
new TGeoBBox(Form(
"al_KK%d",
i),    (lln[
i-2]*8.5-0.6)/2, 0.0175, 390/2);     
 
  668     if(
i>1 && 
i<6) { sll=6.6*8.5/2; }
 
  669     else { sll = 14.2*8.5/2; }
 
  670     KK_h[
i] = 
new TGeoBBox(Form(
"KK_h%d",
i),       (lln2[
i-2]*8.5/2), 0.125,   sll);
 
  671     al_KK_h[
i] = 
new TGeoBBox(Form(
"al_KK_h%d",
i), (lln2[
i-2]*8.5/2), 0.04,     sll);
 
  673     sprintf(llongb,
"KK%d-KK_h%d:ttrr_h-L_3:trss0L%d-L_3:trss1L%d-L_3:trss2L%d-L_3:trss3L%d", 
i,
i,
i,
i,
i,
i);
 
  674     sprintf(llongb1,
"al_KK%d-al_KK_h%d:ttrr_h-L_3:trss0L%d-L_3:trss1L%d-L_3:trss2L%d-L_3:trss3L%d", 
i,
i,
i,
i,
i,
i);
 
  676     CG10_6[
i] = 
new TGeoCompositeShape(llongb);
 
  677     G10_6[
i] = 
new TGeoVolume(Form(
"GP%d_%d_B",
i,6), CG10_6[
i], med7);
 
  678     G10_6[
i]->SetLineColor(kRed);
 
  679     CST_6[
i] = 
new TGeoCompositeShape(llongb1);
 
  680     ST_6[
i] = 
new TGeoVolume(Form(
"ST%d_%d_B",i,6), CST_6[i], med7);
 
  681     ST_6[
i]->SetLineColor(kBlue);
 
  682     mnk2[
i]->AddNode(G10_6[i], i, 
new TGeoTranslation(ppos1[i-2], 156.43+6*(i-2), 45));
 
  683     mnk2[
i]->AddNode(ST_6[i], i, 
new TGeoTranslation(ppos1[i-2],  156.43+6*(i-2)+0.093, 45));
 
  690  for(
int ii = 0; ii < 2; ii++){
 
  691   for(
int i = 0; 
i < 16; 
i++){
 
  692     pos_y = (149.-2.-MDT_thickness/2-(MDT_thickness + 0.5)*(ii-1)); 
 
  694      if(
i < 14) { pos_x = (53.05 - 
i*8.5); }  
 
  695      if(
i >= 14) { pos_x = (53.05 - (
i-8)*8.5); }
 
  697        if(
i < 14) { pos_x = (-61.7 + 8.5/2 +
i*8.5 - 0.5); }  
 
  698        if(
i >= 14) { pos_x = (-61.7 + 8.5/2 +(
i-8)*8.5 - 0.5); }      
 
  701     if((i<6 || i>=8) && 
i<14 ) { pos_z = 45.;     
name(tube[1][0],fl,6,ii,
i,0); mnk2[ii]->AddNode(tube[1][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z)); } 
 
  702     if(
i>=6 && 
i<8)            { pos_z = 117.55;  
name(tube[6][0],fl,6,ii,
i,0); mnk2[ii]->AddNode(tube[6][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z)); }  
 
  703     if(
i>=14)                  { pos_z = (-72.6); 
name(tube[7][0],fl,6,ii,
i,0); mnk2[ii]->AddNode(tube[7][0], 
i, 
new TGeoTranslation(pos_x,pos_y,pos_z)); } 
 
  709     K[0] = 
new TGeoBBox(Form(
"K%d",0),       118.4/2, 0.15/2,  MDT_barrel_short/2);
 
  710     al_K[0] = 
new TGeoBBox(Form(
"al_K%d",0), 118.4/2, 0.035/2,  MDT_barrel_short/2);
 
  711     TGeoBBox* K_h0 = 
new TGeoBBox(
"K_h0",       8.5,0.125,8.5);
 
  712     TGeoBBox* al_K_h0 = 
new TGeoBBox(
"al_K_h0", 8.5,0.04, 8.5);
 
  713     trrr = 
new TGeoTranslation(0, 0, -45);
 
  714        trrr->SetName(
"trrr");
 
  715        trrr->RegisterYourself();
 
  716     CG10_6[0] = 
new TGeoCompositeShape(
"K0-K_h0:trrr");
 
  717     CST_6[0] = 
new TGeoCompositeShape(
"al_K0-K_h0:trrr");
 
  718     CST_6[1] = 
new TGeoCompositeShape(
"al_K0-al_K_h0:trrr");
 
  719     G10_6[0] = 
new TGeoVolume(Form(
"GP%d_%d_B",0,6), CG10_6[0], med7);
 
  720     ST_6[0] = 
new TGeoVolume(Form(
"ST%d_%d_B",0,6), CST_6[0], med7);
 
  721     ST_6[1] = 
new TGeoVolume(Form(
"ST%d_%d_B",1,6), CST_6[1], med7);
 
  722     G10_6[0]->SetLineColor(kRed);
 
  723     ST_6[0]->SetLineColor(kBlue);
 
  724     ST_6[1]->SetLineColor(kBlue);
 
  726     mnk2[0]->AddNode(G10_2[0], 1, 
new TGeoTranslation(-2.5, (149. - 2. - MDT_thickness + (MDT_thickness+0.5/2)), 45.));
 
  727     mnk2[0]->AddNode(ST_2[0], 0, 
new TGeoTranslation(-2.5, (149. - 2. - MDT_thickness + (MDT_thickness+0.5/2) -0.0930), 45));     
 
  728     mnk2[1]->AddNode(ST_2[1], 1, 
new TGeoTranslation(-2.5, (149. - 2. - MDT_thickness + (MDT_thickness+0.5/2) +0.0930), 45));     
 
  732   for(
int i = 0; 
i < 14; 
i++) MdtOct6->AddNode(mnk2[
i], i); 
 
  772  float tube_len_en_l0[36]  = {121.5,154.6,171.6,188.6,205.6,222.6,74.1,74.1,74.1,74.1,74.1,74.1,74.1,74.1,74.1,74.1,74.1,74.1,
 
  773                               222.6,205.6,188.6,171.6,154.6,121.5,89.5,89.5,89.5,89.5,89.5,89.5,89.5,89.5,89.5,89.5,89.5,89.5};
 
  775  float tube_len_en_l2[68] = {164.8,225,216.5,205,196.5,188,179.5,171,162.5,154,145.5,137,128.5,120,111.5,103,94.5,
 
  776                              164.8,225,216.5,205,196.5,188,179.5,171,162.5,154,145.5,137,128.5,120,111.5,103,94.5,
 
  777                              164.8,205,196.5,185,176.5,168,159.5,151,142.5,134,125.5,117,108.5,100,91.5,83,74.5,
 
  778                              164.8,205,196.5,185,176.5,168,159.5,151,142.5,134,125.5,117,108.5,100,91.5,83,74.5};
 
  780  float tube_len_en_l3[68] = {164.8,225,216.5,205,196.5,188,179.5,171,162.5,154,145.5,137,128.5,120,111.5,103,94.5,
 
  781                              164.8,225,216.5,205,196.5,188,179.5,171,162.5,154,145.5,137,128.5,120,111.5,103,94.5,
 
  782                              164.8,205,196.5,185,176.5,168,159.5,151,142.5,134,125.5,117,108.5,100,91.5,83,74.5,
 
  783                              164.8,205,196.5,185,176.5,168,159.5,151,142.5,134,125.5,117,108.5,100,91.5,83,74.5};
 
  785  float tube_len_en_l4[68] = {164.8,205,196.5,188,176.5,168,159.5,151,142.5,134,125.5,117,108.5,100,91.5,83,74.5,
 
  786                              164.8,205,196.5,185,176.5,168,159.5,151,142.5,134,125.5,117,108.5,100,91.5,83,74.5,
 
  787                              164.8,205,196.5,188,176.5,168,159.5,151,142.5,134,125.5,117,108.5,100,91.5,83,74.5,
 
  788                              164.8,205,196.5,185,176.5,168,159.5,151,142.5,134,125.5,117,108.5,100,91.5,83,74.5};
 
  790  float tube_len_en_l5[68] = {135,205,196.5,185,176.5,168,159.5,151,142.5,134,125.5,117,108.5,100,91.5,83,74.5,
 
  791                              135,205,196.5,185,176.5,168,159.5,151,142.5,134,125.5,117,108.5,100,91.5,83,74.5,
 
  792                              135,225,216.5,205,196.5,188,179.5,171,162.5,154,145.5,134,128.5,120,111.5,103,94.5,
 
  793                              135,225,216.5,205,196.5,188,179.5,171,162.5,154,145.5,134,128.5,120,111.5,103,94.5};
 
  795  float tube_len_en_l6[72] = {142,212,203.5,192,183.5,175,166.5,158,149.5,141,132.5,124,115.5,107,98.5,90,81.5,73,
 
  796                              142,212,203.5,192,183.5,175,166.5,158,149.5,141,132.5,124,115.5,107,98.5,90,81.5,73,
 
  797                              142,232,223.5,212,203.5,195,186.5,178,169.5,161,152.5,144,135.5,127,118.5,110,101.5,93,
 
  798                              142,232,223.5,212,203.5,195,186.5,178,169.5,161,152.5,144,135.5,127,118.5,110,101.5,93};
 
  800    for(
int i=0; i<36; i++) {
 
  801      tube_en_l0[
i][0] = geom->MakeBox(Form(
"BP%d",i), med5, MDT_width/2, MDT_thickness/2, tube_len_en_l0[i]/2); 
 
  802      tube_en_l0[
i][1] = geom->MakeBox(Form(
"BA%d",i), med2, XSize/2,     YSize/2,         tube_len_en_l0[i]/2);
 
  803      for(
int j = 0; j < 8; j++){
 
  804      float slotpos_x = (-3.5 + 1.*j);
 
  805        tube_en_l0[
i][2] = geom->MakeBox(Form(
"MDT%ds%dl%db%dw%d",2,0,0,0,0), med4, XSize1/2, YSize1/2, tube_len_en_l0[i]/2);
 
  806        tube_en_l0[
i][1]->AddNode(tube_en_l0[i][2], j, 
new TGeoTranslation(slotpos_x, slotpos_y, 0.));
 
  807        tube_en_l0[
i][1]->SetLineColor(kBlue);
 
  808        tube_en_l0[
i][2]->SetLineColor(kBlue);
 
  810      tube_en_l0[
i][0]->AddNode(tube_en_l0[i][1],1); 
 
  811      tube_en_l0[
i][0]->SetLineColor(kBlue);
 
  814    for(
int i=0; i<68; i++) {
 
  815      tube_en_l2[
i][0] = geom->MakeBox(Form(
"BP%d",i), med5, MDT_width/2, MDT_thickness/2, tube_len_en_l2[i]/2); 
 
  816      tube_en_l2[
i][1] = geom->MakeBox(Form(
"BA%d",i), med2, XSize/2,     YSize/2,         tube_len_en_l2[i]/2);
 
  817      tube_en_l3[
i][0] = geom->MakeBox(Form(
"BP%d",i), med5, MDT_width/2, MDT_thickness/2, tube_len_en_l3[i]/2); 
 
  818      tube_en_l3[
i][1] = geom->MakeBox(Form(
"BA%d",i), med2, XSize/2,     YSize/2,         tube_len_en_l3[i]/2);
 
  819      tube_en_l4[
i][0] = geom->MakeBox(Form(
"BP%d",i), med5, MDT_width/2, MDT_thickness/2, tube_len_en_l4[i]/2); 
 
  820      tube_en_l4[
i][1] = geom->MakeBox(Form(
"BA%d",i), med2, XSize/2,     YSize/2,         tube_len_en_l4[i]/2);
 
  821      tube_en_l5[
i][0] = geom->MakeBox(Form(
"BP%d",i), med5, MDT_width/2, MDT_thickness/2, tube_len_en_l5[i]/2); 
 
  822      tube_en_l5[
i][1] = geom->MakeBox(Form(
"BA%d",i), med2, XSize/2,     YSize/2,         tube_len_en_l5[i]/2);
 
  823      for(
int j = 0; j < 8; j++){
 
  824      float slotpos_x = (-3.5 + 1.*j);
 
  825        tube_en_l2[
i][2] = geom->MakeBox(Form(
"MDT%ds%dl%db%dw%d",2,0,0,0,0), med4, XSize1/2, YSize1/2, tube_len_en_l2[i]/2);
 
  826        tube_en_l2[
i][1]->AddNode(tube_en_l2[i][2], j, 
new TGeoTranslation(slotpos_x, slotpos_y, 0.));
 
  827        tube_en_l3[
i][2] = geom->MakeBox(Form(
"MDT%ds%dl%db%dw%d",2,0,0,0,0), med4, XSize1/2, YSize1/2, tube_len_en_l3[i]/2);
 
  828        tube_en_l3[
i][1]->AddNode(tube_en_l3[i][2], j, 
new TGeoTranslation(slotpos_x, slotpos_y, 0.));
 
  829        tube_en_l4[
i][2] = geom->MakeBox(Form(
"MDT%ds%dl%db%dw%d",2,0,0,0,0), med4, XSize1/2, YSize1/2, tube_len_en_l4[i]/2);
 
  830        tube_en_l4[
i][1]->AddNode(tube_en_l4[i][2], j, 
new TGeoTranslation(slotpos_x, slotpos_y, 0.));
 
  831        tube_en_l5[
i][2] = geom->MakeBox(Form(
"MDT%ds%dl%db%dw%d",2,0,0,0,0), med4, XSize1/2, YSize1/2, tube_len_en_l5[i]/2);
 
  832        tube_en_l5[
i][1]->AddNode(tube_en_l5[i][2], j, 
new TGeoTranslation(slotpos_x, slotpos_y, 0.));
 
  834        tube_en_l2[
i][1]->SetLineColor(kBlue);
 
  835        tube_en_l2[
i][2]->SetLineColor(kBlue);
 
  836        tube_en_l3[
i][1]->SetLineColor(kBlue);
 
  837        tube_en_l3[
i][2]->SetLineColor(kBlue);
 
  838        tube_en_l4[
i][1]->SetLineColor(kBlue);
 
  839        tube_en_l4[
i][2]->SetLineColor(kBlue);
 
  840        tube_en_l5[
i][1]->SetLineColor(kBlue);
 
  841        tube_en_l5[
i][2]->SetLineColor(kBlue);
 
  843      tube_en_l2[
i][0]->AddNode(tube_en_l2[i][1],1); 
 
  844      tube_en_l3[
i][0]->AddNode(tube_en_l3[i][1],1); 
 
  845      tube_en_l4[
i][0]->AddNode(tube_en_l4[i][1],1); 
 
  846      tube_en_l5[
i][0]->AddNode(tube_en_l5[i][1],1); 
 
  848       tube_en_l2[
i][0]->SetLineColor(kBlue);
 
  849       tube_en_l3[
i][0]->SetLineColor(kBlue);
 
  850       tube_en_l4[
i][0]->SetLineColor(kBlue);
 
  851       tube_en_l5[
i][0]->SetLineColor(kBlue);
 
  854    for(
int i=0; i<72; i++) {
 
  855      tube_en_l6[
i][0] = geom->MakeBox(Form(
"BP%d",i), med5, MDT_width/2, MDT_thickness/2, tube_len_en_l6[i]/2); 
 
  856      tube_en_l6[
i][1] = geom->MakeBox(Form(
"BA%d",i), med2, XSize/2,     YSize/2,         tube_len_en_l6[i]/2);
 
  857      for(
int j = 0; j < 8; j++){
 
  858      float slotpos_x = (-3.5 + 1.*j);
 
  859        tube_en_l6[
i][2] = geom->MakeBox(Form(
"MDT%ds%dl%db%dw%d",2,0,0,0,0), med4, XSize1/2, YSize1/2, tube_len_en_l6[i]/2);
 
  860        tube_en_l6[
i][1]->AddNode(tube_en_l6[i][2], j, 
new TGeoTranslation(slotpos_x, slotpos_y, 0.));
 
  862      tube_en_l6[
i][0]->AddNode(tube_en_l6[i][1],1); 
 
  865     TGeoRotation    *rrr0 = 
new TGeoRotation();
 
  870     rrr0->RegisterYourself();
 
  872     TGeoRotation    *rrr1 = 
new TGeoRotation();
 
  874     rrr1->RegisterYourself();
 
  876     TGeoRotation    *rrr2 = 
new TGeoRotation();
 
  879     rrr2->RegisterYourself();
 
  883   for(
int l = 0; l < 2; l++) {
 
  884    for(
int i = 0; i < 53; i++) {
 
  886      if(i<=12)          { pos_y=(-10.75-i*8.5);}
 
  887      if(i>=13 && i<26)  { pos_y=(-13.75-i*8.5.);}
 
  888      if(i>=26 && i<39)  { pos_y=(0.75+(i-26)*8.5);}
 
  889      if(i>=39)          { pos_y=(3.75+(i-26)*8.5);}
 
  891      if(i<3)            { pos_x=(-1)**l*(146.6-1.5-3.5);                    
name(tube_en_l2[l*34][0],2,l,2,25-i,0);     
 
  892                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z);  mnk3[2]->AddNode(tube_en_l2[l*34][0],25-i,
new TGeoCombiTrans(*tr0, *rrr0));}                    
 
  893      if(i>=3 && i<11)   { pos_x=(-1)**l*(10*l+116.5-1.5-3.5);               
name(tube_en_l2[1+l*34][0],2,l,2,25-i,0);   
 
  894                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z);  mnk3[2]->AddNode(tube_en_l2[1+l*34][0],25-i,
new TGeoCombiTrans(*tr0, *rrr0));    }    
 
  895      if(i==11)          { pos_x=(-1)**l*(10*l+112.25-(i-11)*8.5/2-1.5-3.5); 
name(tube_en_l2[i-9+l*34][0],2,l,2,25-i,0); 
 
  896                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z);  mnk3[2]->AddNode(tube_en_l2[i-9+l*34][0],25-i,
new TGeoCombiTrans(*tr0, *rrr0));  }  
 
  897      if(i>=12 && i<26)  { pos_x=(-1)**l*(10*l+110.75-(i-11)*8.5/2-1.5-3.5); 
name(tube_en_l2[i-9+l*34][0],2,l,2,25-i,0); 
 
  898                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z);  mnk3[2]->AddNode(tube_en_l2[i-9+l*34][0],25-i,
new TGeoCombiTrans(*tr0, *rrr0));  }  
 
  899      if(i>=26 && i<30)  { pos_x=(-1)**l*(146.6-1.5-3.5);                    
name(tube_en_l2[17+l*34][0],2,l,2,i,0);     
 
  900                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z);  mnk3[2]->AddNode(tube_en_l2[17+l*34][0],i,
new TGeoCombiTrans(*tr0, *rrr0));      }   
 
  901      if(i>=30 && i<=37) { pos_x=(-1)**l*(10*l+116.5-1.5-3.5);               
name(tube_en_l2[18+l*34][0],2,l,2,i,0);     
 
  902                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z);  mnk3[2]->AddNode(tube_en_l2[18+l*34][0],i,
new TGeoCombiTrans(*tr0, *rrr0));      }   
 
  903      if(i==38)          { pos_x=(-1)**l*(10*l+112.25-(i-38)*8.5/2-1.5-3.5); 
name(tube_en_l2[19+l*34][0],2,l,2,i,0);     
 
  904                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z);  mnk3[2]->AddNode(tube_en_l2[19+l*34][0],i,
new TGeoCombiTrans(*tr0, *rrr0));      }   
 
  905      if(i>38)           { pos_x=(-1)**l*(10*l+110.75-(i-38)*8.5/2-1.5-3.5); 
name(tube_en_l2[i-19+l*34][0],2,l,2,i,0);   
 
  906                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z);  mnk3[2]->AddNode(tube_en_l2[i-19+l*34][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }     
 
  915   for(
int l = 0; l < 2; l++) {
 
  916    for(
int i = 0; i < 53; i++) {
 
  918      if(i<=12)          { pos_y=(2.25-i*8.5);}
 
  919      if(i>=13 && i<27)  { pos_y=(-0.75-i*8.5.);}
 
  920      if(i>=27 && i<40)  { pos_y=(13.75+(i-27)*8.5);}
 
  921      if(i>=40)          { pos_y=(16.75+(i-27)*8.5);}
 
  923      if(i<4)            { pos_x=(-1)**l*(146.6-1.5-3.5);                    
name(tube_en_l3[l*34][0],2,l,3,26-i,0);        
 
  924                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[3]->AddNode(tube_en_l3[l*34][0],26-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
  925      if(i>=4 && i<12)   { pos_x=(-1)**l*(10*l+116.5-1.5-3.5);               
name(tube_en_l3[1+l*34][0],2,l,3,26-i,0);      
 
  926                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[3]->AddNode(tube_en_l3[1+l*34][0],26-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
  927      if(i==12 || i ==13){ pos_x=(-1)**l*(10*l+112.25-(i-12)*8.5/2-1.5-3.5); 
name(tube_en_l3[(i-10)+l*34][0],2,l,3,26-i,0); 
 
  928                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[3]->AddNode(tube_en_l3[(i-10)+l*34][0],26-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
  929      if(i>=14 && i<27)  { pos_x=(-1)**l*(10*l+110.75-(i-12)*8.5/2-1.5-3.5); 
name(tube_en_l3[(i-10)+l*34][0],2,l,3,26-i,0); 
 
  930                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[3]->AddNode(tube_en_l3[(i-10)+l*34][0],26-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
  931      if(i>=27 && i<30)  { pos_x=(-1)**l*(146.6-1.5-3.5);                    
name(tube_en_l3[17+l*34][0],2,l,3,i,0);        
 
  932                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[3]->AddNode(tube_en_l3[17+l*34][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }
 
  933      if(i>=30 && i<38)  { pos_x=(-1)**l*(10*l+116.5-1.5-3.5);               
name(tube_en_l3[18+l*34][0],2,l,3,i,0);        
 
  934                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[3]->AddNode(tube_en_l3[18+l*34][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }
 
  935      if(i==38)          { pos_x=(-1)**l*(10*l+112.25-(i-38)*8.5/2-1.5-3.5); 
name(tube_en_l3[(i-19)+l*34][0],2,l,3,i,0);    
 
  936                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[3]->AddNode(tube_en_l3[(i-19)+l*34][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }
 
  937      if(i>=39 )         { pos_x=(-1)**l*(10*l+110.75-(i-38)*8.5/2-1.5-3.5); 
name(tube_en_l3[(i-19)+l*34][0],2,l,3,i,0);    
 
  938                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[3]->AddNode(tube_en_l3[(i-19)+l*34][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }     
 
  945   for(
int l = 0; l < 2; l++) {
 
  946    for(
int i = 0; i < 53; i++) {
 
  948      if(i<=12)          { pos_y=(-10.75-i*8.5);}
 
  949      if(i>=13 && i<26)  { pos_y=(-13.75-i*8.5.);}
 
  950      if(i>=26 && i<39)  { pos_y=(0.75+(i-26)*8.5);}
 
  951      if(i>= 39)         { pos_y=(3.75+(i-26)*8.5);}
 
  953      if(i<3)            { pos_x=(-1)**l*(146.6-1.5-3.5);               
name(tube_en_l4[34*l][0],2,l,4,25-i,0);       
 
  954                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[4]->AddNode(tube_en_l4[l*34][0],25-i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
  955      if(i>=3 && i<11)   { pos_x=(-1)**l*(126.5-1.5-3.5);               
name(tube_en_l4[1+34*l][0],2,l,4,25-i,0);     
 
  956                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[4]->AddNode(tube_en_l4[1+l*34][0],25-i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
  957      if(i==11 || i==12) { pos_x=(-1)**l*(122.25-(i-11)*8.5/2-1.5-3.5); 
name(tube_en_l4[(i-9)+34*l][0],2,l,4,25-i,0); 
 
  958                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[4]->AddNode(tube_en_l4[(i-9)+l*34][0],25-i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
  959      if(i>=13 && i<26)  { pos_x=(-1)**l*(120.75-(i-11)*8.5/2-1.5-3.5); 
name(tube_en_l4[(i-9)+34*l][0],2,l,4,25-i,0); 
 
  960                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[4]->AddNode(tube_en_l4[(i-9)+l*34][0],25-i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
  961      if(i>=26 && i<30)  { pos_x=(-1)**l*(146.6-1.5-3.5);               
name(tube_en_l4[17+34*l][0],2,l,4,i,0);       
 
  962                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[4]->AddNode(tube_en_l4[17+l*34][0], i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
  963      if(i>=30 && i<38)  { pos_x=(-1)**l*(126.5-1.5-3.5);               
name(tube_en_l4[18+34*l][0],2,l,4,i,0);       
 
  964                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[4]->AddNode(tube_en_l4[18+l*34][0], i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
  965      if(i==38)          { pos_x=(-1)**l*(122.25-(i-38)*8.5/2-1.5-3.5); 
name(tube_en_l4[19+34*l][0],2,l,4,i,0);       
 
  966                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[4]->AddNode(tube_en_l4[19+l*34][0], i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
  967      if(i>38)           { pos_x=(-1)**l*(120.75-(i-38)*8.5/2-1.5-3.5); 
name(tube_en_l4[(i-19)+34*l][0],2,l,4,i,0);   
 
  968                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[4]->AddNode(tube_en_l4[(i-19)+l*34][0], i,
new TGeoCombiTrans(*tr0, *rrr0));}    
 
  975   pos_z = (255.215+27);
 
  976   for(
int l = 0; l < 2; l++) {
 
  977    for(
int i = 0; i < 53; i++) {
 
  979      if(i<=12)          { pos_y=(2.25-i*8.5);}
 
  980      if(i>=13 && i<27)  { pos_y=(-0.75-i*8.5.);}
 
  981      if(i>=27 && i<40)  { pos_y=(13.75+(i-27)*8.5);}
 
  982      if(i>=40)          { pos_y=(16.75+(i-27)*8.5);}
 
  984      if(i<8)            { pos_x=(-1)**l*(161.5-1.5-3.5);                     
name(tube_en_l5[l*34][0],2,l,5,26-i,0);        
 
  985                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[5]->AddNode(tube_en_l5[l*34][0],26-i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
  986      if(i>=8 && i<12)   { pos_x=(-1)**l*(-10*l+126.5-1.5-3.5);               
name(tube_en_l5[1+l*34][0],2,l,5,26-i,0);      
 
  987                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[5]->AddNode(tube_en_l5[1+l*34][0],26-i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
  988      if(i==12)          { pos_x=(-1)**l*(-10*l+122.25-(i-12)*8.5/2-1.5-3.5); 
name(tube_en_l5[2+l*34][0],2,l,5,26-i,0);      
 
  989                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[5]->AddNode(tube_en_l5[2+l*34][0],26-i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
  990      if(i>=13 && i<27)  { pos_x=(-1)**l*(-10*l+120.75-(i-12)*8.5/2-1.5-3.5); 
name(tube_en_l5[(i-10)+l*34][0],2,l,5,26-i,0); 
 
  991                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[5]->AddNode(tube_en_l5[(i-10)+l*34][0],26-i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
  992      if(i>=27 && i<34)  { pos_x=(-1)**l*(161.5-1.5-3.5);                     
name(tube_en_l5[17+l*34][0],2,l,5,i,0);        
 
  993                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[5]->AddNode(tube_en_l5[17+l*34][0], i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
  994      if(i>=34 && i<38)  { pos_x=(-1)**l*(-10*l+126.5-1.5-3.5);               
name(tube_en_l5[18+l*34][0],2,l,5,i,0);        
 
  995                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[5]->AddNode(tube_en_l5[18+l*34][0], i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
  996      if(i==38)          { pos_x=(-1)**l*(-10*l+122.25-(i-38)*8.5/2-1.5-3.5); 
name(tube_en_l5[(i-19)+l*34][0],2,l,5,i,0);    
 
  997                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[5]->AddNode(tube_en_l5[(i-19)+l*34][0], i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
  998      if(i>=39)          { pos_x=(-1)**l*(-10*l+120.75-(i-38)*8.5/2-1.5-3.5); 
name(tube_en_l5[(i-19)+l*34][0],2,l,5,i,0);    
 
  999                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[5]->AddNode(tube_en_l5[(i-19)+l*34][0], i,
new TGeoCombiTrans(*tr0, *rrr0));}         
 
 1006   pos_z = (255.215+36);
 
 1007   for(
int l = 0; l < 2; l++) {
 
 1008    for(
int i = 0; i < 53; i++) {
 
 1010      if(i<=12)         { pos_y=(-10.75-i*8.5); }
 
 1011      if(i>=13 && i<26) { pos_y=(-13.75-i*8.5.); } 
 
 1012      if(i>=26 && i<39) { pos_y=(0.75+(i-26)*8.5); }
 
 1013      if(i>=39)         { pos_y=(3.75+(i-26)*8.5); }
 
 1015      if(i<8)            { pos_x=(-1)**l*(161.5-1.5-3.5);                     
name(tube_en_l5[l*34][0],2,l,6,25-i,0);        
 
 1016                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[6]->AddNode(tube_en_l5[l*34][0], 25-i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
 1017      if(i>=8 && i<12)   { pos_x=(-1)**l*(-10*l+126.5-1.5-3.5);               
name(tube_en_l5[1+l*34][0],2,l,6,25-i,0);      
 
 1018                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[6]->AddNode(tube_en_l5[1+l*34][0], 25-i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
 1019      if(i==12)          { pos_x=(-1)**l*(-10*l+122.25-(i-12)*8.5/2-1.5-3.5); 
name(tube_en_l5[2+l*34][0],2,l,6,25-i,0);      
 
 1020                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[6]->AddNode(tube_en_l5[2+l*34][0], 25-i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
 1021      if(i>=13 && i<26)  { pos_x=(-1)**l*(-10*l+120.75-(i-12)*8.5/2-1.5-3.5); 
name(tube_en_l5[(i-10)+l*34][0],2,l,6,25-i,0); 
 
 1022                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[6]->AddNode(tube_en_l5[(i-10)+l*34][0], 25-i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
 1024      if(i>=26 && i<34)  { pos_x=(-1)**l*(161.5-1.5-3.5);                     
name(tube_en_l5[17+l*34][0],2,l,6,i,0);        
 
 1025                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[6]->AddNode(tube_en_l5[17+l*34][0], i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
 1026      if(i>=34 && i<=37) { pos_x=(-1)**l*(-10*l+126.5-1.5-3.5);               
name(tube_en_l5[18+l*34][0],2,l,6,i,0);        
 
 1027                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[6]->AddNode(tube_en_l5[18+l*34][0], i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
 1028      if(i==38)          { pos_x=(-1)**l*(-10*l+122.25-(i-38)*8.5/2-1.5-3.5); 
name(tube_en_l5[(i-19)+l*34][0],2,l,6,i,0);    
 
 1029                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[6]->AddNode(tube_en_l5[(i-19)+l*34][0], i,
new TGeoCombiTrans(*tr0, *rrr0));}
 
 1030      if(i>=39)          { pos_x=(-1)**l*(-10*l+120.75-(i-38)*8.5/2-1.5-3.5); 
name(tube_en_l5[(i-19)+l*34][0],2,l,6,i,0);    
 
 1031                         TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk3[6]->AddNode(tube_en_l5[(i-19)+l*34][0], i,
new TGeoCombiTrans(*tr0, *rrr0));}    
 
 1038    for(
int l = 0; l < 2; l++) {
 
 1039     for(
int i = 0; i < 36; i++) {
 
 1040      pos_z =243.5+MDT_thickness/2+3*l; 
 
 1041      if(i<1)           { pos_x=(-12*8.5 + 8.5/2 -0.25*(-1)**l);            pos_y=(-5+10);              
name(tube_en_l0[i][0],2,0,l,i,0);}
 
 1042      if(i>=1 && i<6)   { pos_x=(-12*8.5 + 8.5/2 -0.25*(-1)**l+8.5*i);      pos_y=(-17.8/2+10/2);       
name(tube_en_l0[i][0],2,0,l,i,0);}
 
 1043      if(i>=6 && i<18)  { pos_x=(-12*8.5 + 8.5/2 -0.25*(-1)**l+8.5*i);      pos_y=(26+6+74.1/2);        
name(tube_en_l0[i][0],2,0,l,i,0);}
 
 1044      if(i>=18 && i<23) { pos_x=(-12*8.5 + 8.5/2 -0.25*(-1)**l+8.5*i);      pos_y=(-17.8/2+10/2);       
name(tube_en_l0[i][0],2,0,l,i,0);}
 
 1045      if(i==23)         { pos_x=(-12*8.5 + 8.5/2 -0.25*(-1)**l+8.5*i);      pos_y=(-5+10);              
name(tube_en_l0[i][0],2,0,l,i,0);}    
 
 1046      if(i>23 && i<36)  { pos_x=(-12*8.5 + 8.5/2 -0.25*(-1)**l+8.5*(i-18)); pos_y=(-26-6-(111.5-22)/2); 
name(tube_en_l0[i][0],2,0,l,i,0);}
 
 1048     TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z);
 
 1049     if(l==0) mnk3[0]->AddNode(tube_en_l0[i][0], i, 
new TGeoCombiTrans(*tr0, *rrr2));
 
 1050     if(l==1) mnk3[1]->AddNode(tube_en_l0[i][0], i, 
new TGeoCombiTrans(*tr0, *rrr1));
 
 1056   float ttr[22][3] = {0,0,0, -9.8,0,0, 0,-5,0, 0,-118.5,0, 0,108.4,0, 0,5.4,0, 0,-108.1,0, 0,118.8,0, 0,3.7,0, 0,-109.8,0, 0,117.1,0, 10.1,0,0,
 
 1057                       0,-2,0, 0,4,0, 0,8,0, 0,122,0, 0,-106,0, 10.5,0,0, 0,121.2,0, -122.6,0,0, 122.6,0,0, 0,120,0};
 
 1059   TGeoRotation *
rot = 
new TGeoRotation();
 
 1061   rot->SetName(
"rot");
 
 1062   rot->RegisterYourself();
 
 1064   TGeoTranslation *
trans[22];
 
 1065   for(
int i=0; i<22; i++) {
 
 1066        trans[
i] = 
new TGeoTranslation(ttr[i][0], ttr[i][1], ttr[i][2] );
 
 1067        trans[
i]->SetName(Form(
"trans%d",i));
 
 1068        trans[
i]->RegisterYourself();
 
 1071   TGeoTranslation *trans_l0;
 
 1072   trans_l0 = 
new TGeoTranslation(0, -3.4, 0);
 
 1073   trans_l0->SetName(Form(
"trans_l%d",0));
 
 1074   trans_l0->RegisterYourself();
 
 1076   TGeoCombiTrans *combl0   = 
new TGeoCombiTrans(*trans_l0, *rot);
 
 1077   combl0->SetName(
"combl0");
 
 1078   combl0->RegisterYourself();
 
 1081   TGeoCombiTrans *comb0   = 
new TGeoCombiTrans(*trans[0], *rot);
 
 1082   comb0->SetName(
"comb0");
 
 1083   comb0->RegisterYourself();
 
 1085   TGeoCombiTrans *comb1   = 
new TGeoCombiTrans(*trans[13], *rot);
 
 1086   comb1->SetName(
"comb1");
 
 1087   comb1->RegisterYourself();
 
 1089   TGeoVolume *G10_endcap[6], *ST_endcap[6];
 
 1091   TGeoBBox* bar1 = 
new TGeoBBox(
"bar1", 10.5, 240, 0.175);    
 
 1092   TGeoBBox* bar2 = 
new TGeoBBox(
"bar2", 231,  1.8, 0.175);    
 
 1093   TGeoBBox* bar3 = 
new TGeoBBox(
"bar3", 219,  1.8, 0.175);    
 
 1094   TGeoBBox* bar4 = 
new TGeoBBox(
"bar4", 20.5, 232, 0.175);    
 
 1095   TGeoBBox* bar5 = 
new TGeoBBox(
"bar5", 200., 10,  0.175);    
 
 1097   TGeoPgon *ppgon_l0 = 
new TGeoPgon(
"ppg_l0", 0., 360., 8, 2);
 
 1100   ppgon_l0->DefineSection(0, 0, 0, 120.);
 
 1101   ppgon_l0->DefineSection(1, 0.15, 0, 120.);
 
 1102   TGeoVolume *ppgon1_l0 = 
new TGeoVolume(
"ppgon1_l0", ppgon_l0, med7);
 
 1104   TGeoVolume *hhole_l0 = geom->MakeBox(
"hhole_l0", med1, 51, 32, 0.16);
 
 1106   TGeoPgon *ppgon_al_l0 = 
new TGeoPgon(
"ppg_al_l0", 0., 360., 8, 2);
 
 1109   ppgon_al_l0->DefineSection(0, 0, 0, 120.);
 
 1110   ppgon_al_l0->DefineSection(1, 0.035, 0, 120.);
 
 1111   TGeoVolume *ppgon1_al_l0 = 
new TGeoVolume(
"ppgon1_al_l0", ppgon_al_l0, med2);
 
 1113   TGeoPgon *ppgon_l2 = 
new TGeoPgon(
"ppg_l2", 0., 360., 8, 2);
 
 1116   ppgon_l2->DefineSection(0, 0, 0, 224.);
 
 1117   ppgon_l2->DefineSection(1, 0.15, 0, 224.);
 
 1118   TGeoVolume *ppgon1_l2 = 
new TGeoVolume(
"ppgon1_l2", ppgon_l2, med7);
 
 1119   TGeoVolume *hhole_l2 = geom->MakeBox(
"hhole_l2", med1, 60.75, 31.9, 0.16);
 
 1121   TGeoPgon *ppgon_al_l2 = 
new TGeoPgon(
"ppg_al_l2", 0., 360., 8, 2);
 
 1124   ppgon_al_l2->DefineSection(0, 0, 0, 224.);
 
 1125   ppgon_al_l2->DefineSection(1, 0.035, 0, 224.);
 
 1126   TGeoVolume *ppgon1_al_l2 = 
new TGeoVolume(
"ppgon1_al_l2", ppgon_al_l2, med2);
 
 1128   TGeoVolume *hhole_l5 = geom->MakeBox(
"hhole_l5", med1, 90.5, 65.0, 0.16);
 
 1129   TGeoVolume *hhole_l6 = geom->MakeBox(
"hhole_l6", med1, 90.5, 70.5, 0.16);
 
 1130   TGeoVolume *hhole_l7 = geom->MakeBox(
"hhole_l7", med1, 90.5, 57.5, 0.16);
 
 1131   TGeoVolume *hhole_l8 = geom->MakeBox(
"hhole_l8", med1, 90.5, 56.5, 0.16);
 
 1133   TGeoCompositeShape *LEndcap[7], *MEndcap[7]; 
 
 1139   TGeoCompositeShape *L0_endcap = 
new TGeoCompositeShape(
"(ppg_l0:combl0 - hhole_l0:trans0 - bar4:trans19 - bar4:trans20 - bar5:trans21)"); 
 
 1140   TGeoCompositeShape *L0_endcap_al = 
new TGeoCompositeShape(
"(ppg_al_l0:combl0 - hhole_l0:trans0 - bar4:trans19 - bar4:trans20 - bar5:trans21)"); 
 
 1142   G10_endcap[0] = 
new TGeoVolume(
"GP0_E", L0_endcap, med7);
 
 1143   ST_endcap[0] = 
new TGeoVolume(
"ST0_E", L0_endcap_al, med2);
 
 1144   ST_endcap[1] = 
new TGeoVolume(
"ST1_E", L0_endcap_al, med2);
 
 1148   char longbuffer[250];
 
 1149   char longbuffer1[250];
 
 1151   int qq[5][10]={2,0,1,1,2,2,3,3,3,4,
 
 1152                  2,0,1,1,2,5,3,6,3,7,
 
 1153                  2,0,4,0,2,2,3,3,3,4,
 
 1154                  5,0,1,11,2,8,3,9,3,10,
 
 1155                  6,2,1,11,2,2,3,3,3,4}; 
 
 1156   for(
int i=2; i<7; i++){
 
 1157     sprintf(longbuffer,
"ppg_l2:comb0 - hhole_l%d:trans%d - bar%d:trans%d - bar%d:trans%d - bar%d:trans%d - bar%d:trans%d",
 
 1158     qq[i-2][0],qq[i-2][1],qq[i-2][2],qq[i-2][3],qq[i-2][4],qq[i-2][5],qq[i-2][6],qq[i-2][7],qq[i-2][8],qq[i-2][9]);
 
 1159     sprintf(longbuffer1,
"ppg_al_l2:comb0 - hhole_l%d:trans%d - bar%d:trans%d - bar%d:trans%d - bar%d:trans%d - bar%d:trans%d",
 
 1160     qq[i-2][0],qq[i-2][1],qq[i-2][2],qq[i-2][3],qq[i-2][4],qq[i-2][5],qq[i-2][6],qq[i-2][7],qq[i-2][8],qq[i-2][9]);
 
 1162     LEndcap[
i] = 
new TGeoCompositeShape(longbuffer);
 
 1163     MEndcap[
i] = 
new TGeoCompositeShape(longbuffer1);
 
 1164     G10_endcap[
i] = 
new TGeoVolume(Form(
"GP%d_E",i), LEndcap[i], med7);
 
 1165     ST_endcap[
i] = 
new TGeoVolume(Form(
"ST%d_E",i), MEndcap[i], med7);
 
 1167     for(
int ii = 0; ii < 7; ii++){
 
 1168       if(ii == 1) { ST_endcap[ii]->SetLineColor(kGreen); } 
 
 1170        G10_endcap[ii]->SetLineColor(kRed);
 
 1171        ST_endcap[ii]->SetLineColor(kGreen);
 
 1178   for(
int l = 0; l < 2; l++) {
 
 1179    for(
int i = 0; i < 53; i++) {
 
 1181     if(i <= 12)            { pos_y=(2.25-i*8.5); }
 
 1182     if(i >= 13 && i < 27)  { pos_y=(-0.75-i*8.5.); }
 
 1183     if(i >= 27 && i <= 39) { pos_y=(13.75+(i-27)*8.5); }
 
 1184     if(i >= 40)            { pos_y=(16.75+(i-27)*8.5); }
 
 1186      if(i<7)            { pos_x=(-1)**l*161.5;                        
name(tube_en_l6[l*36][0],3,l,3,26-i,0);        TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[3]->AddNode(tube_en_l6[l*36][0],26-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
 1187      if(i>=7 && i<=10)  { pos_x=(-1)**l*(-10*l+126.5);                
name(tube_en_l6[1+l*36][0],3,l,3,26-i,0);      TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[3]->AddNode(tube_en_l6[1+l*36][0],26-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
 1188      if(i==11)          { pos_x=(-1)**l*(-10*l+122.25-(i-11)*8.5/2);  
name(tube_en_l6[2+l*36][0],3,l,3,26-i,0);      TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[3]->AddNode(tube_en_l6[2++l*36][0],26-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
 1189      if(i>=12 && i<=26) { pos_x=(-1)**l*(-10*l+120.75-(i-11)*8.5/2);  
name(tube_en_l6[(i-9)+l*36][0],3,l,3,26-i,0);  TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[3]->AddNode(tube_en_l6[(i-9)+l*36][0],26-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
 1191      if(i>=27 && i<=32) { pos_x=(-1)**l*161.5;                        
name(tube_en_l6[18+l*36][0],3,l,3,i,0);        TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[3]->AddNode(tube_en_l6[18+l*36][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }
 
 1192      if(i>=33 && i<=36) { pos_x=(-1)**l*(-10.*l+126.5);               
name(tube_en_l6[19+l*36][0],3,l,3,i,0);        TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[3]->AddNode(tube_en_l6[19+l*36][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }
 
 1193      if(i==37 || i==38) { pos_x=(-1)**l*(-10.*l+122.25-(i-37)*8.5/2); 
name(tube_en_l6[(i-17)+l*36][0],3,l,3,i,0);    TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[3]->AddNode(tube_en_l6[(i-17)+l*36][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }
 
 1194      if(i>=39)          { pos_x=(-1)**l*(-10.*l+120.75-(i-37)*8.5/2); 
name(tube_en_l6[(i-17)+l*36][0],3,l,3,i,0);    TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[3]->AddNode(tube_en_l6[(i-17)+l*36][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }     
 
 1200   for(
int l = 0; l < 2; l++) {
 
 1201    for(
int i = 0; i < 53; i++) {
 
 1203     if(i<=12)          { pos_y=(-10.75-i*8.5); }
 
 1204     if(i>=13 && i<26)  { pos_y=(-13.75-i*8.5.); }
 
 1205     if(i>=26 && i<=38) { pos_y=(0.75+(i-26)*8.5); }
 
 1206     if(i>=39)          { pos_y=(3.75+(i-26)*8.5); }
 
 1208      if(i<6)            { pos_x=(-1)**l*161.5;                        
name(tube_en_l6[l*36][0],3,l,2,25-i,0);        TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[2]->AddNode(tube_en_l6[l*36][0],25-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
 1209      if(i>=6 && i<=9)   { pos_x=(-1)**l*(-10*l+126.5);                
name(tube_en_l6[1+l*36][0],3,l,2,25-i,0);      TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[2]->AddNode(tube_en_l6[1+l*36][0],25-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
 1210      if(i==10)          { pos_x=(-1)**l*(-10*l+122.25-(i-10)*8.5/2);  
name(tube_en_l6[2+l*36][0],3,l,2,25-i,0);      TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[2]->AddNode(tube_en_l6[2+l*36][0],25-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
 1211      if(i>=11 && i<26)  { pos_x=(-1)**l*(-10*l+120.75-(i-10)*8.5/2);   
name(tube_en_l6[(i-8)+l*36][0],3,l,2,25-i,0);  TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[2]->AddNode(tube_en_l6[(i-8)+l*36][0],25-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
 1212      if(i>=26 && i<=32) { pos_x=(-1)**l*161.5;                        
name(tube_en_l6[18+l*36][0],3,l,2,i,0);        TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[2]->AddNode(tube_en_l6[18+l*36][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }
 
 1213      if(i>=33 && i<=37) { pos_x=(-1)**l*(-10.*l+126.5);               
name(tube_en_l6[19+l*36][0],3,l,2,i,0);        TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[2]->AddNode(tube_en_l6[19+l*36][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }
 
 1214      if(i==38 || i==39) { pos_x=(-1)**l*(-10.*l+122.25-(i-38)*8.5/2); 
name(tube_en_l6[(i-18)+l*36][0],3,l,2,i,0);    TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[2]->AddNode(tube_en_l6[(i-18)+l*36][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }
 
 1215      if(i>=40)          { pos_x=(-1)**l*(-10.*l+120.75-(i-38)*8.5/2);  
name(tube_en_l6[(i-18)+l*36][0],3,l,2,i,0);    TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[2]->AddNode(tube_en_l6[(i-18)+l*36][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }     
 
 1221   for(
int l = 0; l < 2; l++) {
 
 1222    for(
int i = 0; i < 53; i++) {
 
 1224     if(i<=12)          { pos_y=(2.25-i*8.5); }
 
 1225     if(i>=13 && i<27)  { pos_y=(-0.75-i*8.5.); }
 
 1226     if(i>=27 && i<=39) { pos_y=(13.75+(i-27)*8.5); }
 
 1227     if(i>=40)          { pos_y=(16.75+(i-27)*8.5); }
 
 1229      if(i<7)            { pos_x=(-1)**(l+1)*161.5;                        
name(tube_en_l6[l*36][0],3,(1-l),1,26-i,0);        TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[1]->AddNode(tube_en_l6[l*36][0],26-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
 1230      if(i>=7 && i<=10)  { pos_x=(-1)**(l+1)*(-10*l+126.5);                
name(tube_en_l6[1+l*36][0],3,(1-l),1,26-i,0);      TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[1]->AddNode(tube_en_l6[1+l*36][0],26-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
 1231      if(i==11)          { pos_x=(-1)**(l+1)*(-10*l+122.25-(i-11)*8.5/2);  
name(tube_en_l6[2+l*36][0],3,(1-l),1,26-i,0);      TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[1]->AddNode(tube_en_l6[2+l*36][0],26-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
 1232      if(i>=12 && i<=26) { pos_x=(-1)**(l+1)*(-10*l+120.75-(i-11)*8.5/2);  
name(tube_en_l6[(i-9)+l*36][0],3,(1-l),1,26-i,0);  TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[1]->AddNode(tube_en_l6[(i-9)+l*36][0],26-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
 1233      if(i>=27 && i<=32) { pos_x=(-1)**(l+1)*161.5;                        
name(tube_en_l6[18+l*36][0],3,(1-l),1,i,0);        TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[1]->AddNode(tube_en_l6[18+l*36][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }
 
 1234      if(i>=33 && i<=36) { pos_x=(-1)**(l+1)*(-10.*l+126.5);               
name(tube_en_l6[19+l*36][0],3,(1-l),1,i,0);        TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[1]->AddNode(tube_en_l6[19+l*36][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }
 
 1235      if(i==37 || i==38) { pos_x=(-1)**(l+1)*(-10.*l+122.25-(i-37)*8.5/2); 
name(tube_en_l6[(i-17)+l*36][0],3,(1-l),1,i,0);    TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[1]->AddNode(tube_en_l6[(i-17)+l*36][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }
 
 1236      if(i>=39)          { pos_x=(-1)**(l+1)*(-10.*l+120.75-(i-37)*8.5/2); 
name(tube_en_l6[(i-17)+l*36][0],3,(1-l),1,i,0);    TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[1]->AddNode(tube_en_l6[(i-17)+l*36][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }     
 
 1243   for(
int l = 0; l < 2; l++) {
 
 1244    for(
int i = 0; i < 53; i++) {
 
 1246     if(i<=12)          { pos_y=(-10.75-i*8.5); }
 
 1247     if(i>=13 && i<26)  { pos_y=(-13.75-i*8.5.); }
 
 1248     if(i>=26 && i<=38) { pos_y=(-0.75+(i-26)*8.5); }
 
 1249     if(i>=39)          { pos_y=(3.75+(i-26)*8.5); }
 
 1251      if(i<6)            { pos_x=(-1)**(l+1)*161.5;                        
name(tube_en_l6[l*36][0],3,(1-l),0,25-i,0);        TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[0]->AddNode(tube_en_l6[l*36][0],25-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
 1252      if(i>=6 && i<=9)   { pos_x=(-1)**(l+1)*(-10*l+126.5);                
name(tube_en_l6[1+l*36][0],3,(1-l),0,25-i,0);      TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[0]->AddNode(tube_en_l6[1+l*36][0],25-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
 1253      if(i==10)          { pos_x=(-1)**(l+1)*(-10*l+122.25-(i-10)*8.5/2);  
name(tube_en_l6[2+l*36][0],3,(1-l),0,25-i,0);      TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[0]->AddNode(tube_en_l6[2+l*36][0],25-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
 1254      if(i>=11 && i<26)  { pos_x=(-1)**(l+1)*(-10*l+120.75-(i-10)*8.5/2);  
name(tube_en_l6[(i-8)+l*36][0],3,(1-l),0,25-i,0);  TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[0]->AddNode(tube_en_l6[(i-8)+l*36][0],25-i,
new TGeoCombiTrans(*tr0, *rrr0)); }
 
 1255      if(i>=26 && i<=32) { pos_x=(-1)**(l+1)*161.5;                        
name(tube_en_l6[18+l*36][0],3,(1-l),0,i,0);        TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[0]->AddNode(tube_en_l6[18+l*36][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }
 
 1256      if(i>=33 && i<=37) { pos_x=(-1)**(l+1)*(-10.*l+126.5);               
name(tube_en_l6[19+l*36][0],3,(1-l),0,i,0);        TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[0]->AddNode(tube_en_l6[19+l*36][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }
 
 1257      if(i==38 || i==39) { pos_x=(-1)**(l+1)*(-10.*l+122.25-(i-38)*8.5/2); 
name(tube_en_l6[(i-18)+l*36][0],3,(1-l),0,i,0);    TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[0]->AddNode(tube_en_l6[(i-18)+l*36][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }
 
 1258      if(i>=40)          { pos_x=(-1)**(l+1)*(-10.*l+120.75-(i-38)*8.5/2); 
name(tube_en_l6[(i-18)+l*36][0],3,(1-l),0,i,0);    TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); mnk4[0]->AddNode(tube_en_l6[(i-18)+l*36][0],i,
new TGeoCombiTrans(*tr0, *rrr0));    }     
 
 1265   TGeoTranslation *ftr[4]; 
 
 1267   TGeoPgon *pgon = 
new TGeoPgon(
"pg", 0., 360., 8, 2);
 
 1268   pgon->DefineSection(0, 0, 0, 240);
 
 1269   pgon->DefineSection(1, 6, 0, 240);
 
 1271   TGeoVolume *pgon1 = 
new TGeoVolume(
"pgon1", pgon, med6);
 
 1272   TGeoVolume *hole = geom->MakeBox(
"hole", med1, 77, 52, 7.5);
 
 1274   TGeoCompositeShape *cs = 
new TGeoCompositeShape(
"ccs", 
"(pg:comb0 - hole:trans0)"); 
 
 1276   for(
int i=0; i<4; i++) {
 
 1277     fmf[
i] = 
new TGeoVolume(Form(
"FeMFLayer%d",i), cs, med6);
 
 1278     ftr[
i] = 
new TGeoTranslation(0,0,296+9*i);
 
 1279     ftr[
i]->SetName(
"ftr%d");
 
 1280     ftr[
i]->RegisterYourself();
 
 1284   TGeoVolume *G10_mf[4], *ST_mf[4];
 
 1285   TGeoCompositeShape *G10mf[4], *STmf[4]; 
 
 1289   int qq2[4][11]={0,7,12,1,1,2,2,3,4,3,3,
 
 1290                   1,7,12,1,1,2,2,3,4,3,3,
 
 1291                   0,8,0,1,17,2,2,3,4,4,3,
 
 1292                   1,8,8,1,17,2,14,3,18,3,16}; 
 
 1294   for(
int i=0; i<4; i++){
 
 1295     sprintf(longbb,
"ppg_l2:comb%d - hhole_l%d:trans%d - bar%d:trans%d - bar%d:trans%d - bar%d:trans%d - bar%d:trans%d",
 
 1296     qq2[i][0],qq2[i][1],qq2[i][2],qq2[i][3],qq2[i][4],qq2[i][5],qq2[i][6],qq2[i][7],qq2[i][8],qq2[i][9],qq2[i][10]);
 
 1297     sprintf(longbb1,
"ppg_al_l2:comb%d - hhole_l%d:trans%d - bar%d:trans%d - bar%d:trans%d - bar%d:trans%d - bar%d:trans%d",
 
 1298     qq2[i][0],qq2[i][1],qq2[i][2],qq2[i][3],qq2[i][4],qq2[i][5],qq2[i][6],qq2[i][7],qq2[i][8],qq2[i][9],qq2[i][10]);
 
 1300     G10mf[
i] = 
new TGeoCompositeShape(longbb);
 
 1301     STmf[
i] = 
new TGeoCompositeShape(longbb1);
 
 1302     G10_mf[
i] = 
new TGeoVolume(Form(
"GP%d_MF",i), G10mf[i], med7);
 
 1303     ST_mf[
i] = 
new TGeoVolume(Form(
"ST%d_MF",i), STmf[i], med7);
 
 1306     for(
int ii = 0; ii <4; ii++){
 
 1307       G10_mf[ii]->SetLineColor(kRed);
 
 1308       ST_mf[ii]->SetLineColor(kBlue); 
 
 1316    char fe[12], hl[12], ffe[12];
 
 1317    TGeoTranslation *frot[16];
 
 1318    TGeoVolume *FeForward[16];
 
 1320     TGeoVolume *vol =  geom->MakeBox(
"fe", med6, 380/2, 252.5/2, 6/2);
 
 1321     TGeoVolume *vol1 = geom->MakeBox(
"hl", med1,  30/2,    34/2, 7.5/2);
 
 1322     TGeoTranslation *vv = 
new TGeoTranslation((15+1.8), 0, 0);
 
 1324     vv->RegisterYourself();    
 
 1325     TGeoCompositeShape *csq = 
new TGeoCompositeShape(
"ffe", 
"(fe - (hl:vv))"); 
 
 1328    for (
int i=0; i<16; i++) {
 
 1332      frot[
i] = 
new TGeoTranslation(kk*1.45, 0, 873+9*i); 
 
 1333      FeForward[
i] = 
new TGeoVolume(Form(
"FeForwardLayer%d",i),csq,med6);
 
 1335     else { frot[
i] = 
new TGeoTranslation(4.35, 0, 866.5-4*(i-16)); }
 
 1336     frot[
i]->SetName(Form(
"frot%d",i));
 
 1337     frot[
i]->RegisterYourself();
 
 1340    for(
int i=0; i<16; i++) pCombi3->AddNode(FeForward[i], i, frot[i]);     
 
 1343   float tube_len_fw[3] = { 350.5, 135.95, 169.55 };
 
 1345    for(
int i=0; i<3; i++) { 
 
 1346      tube_fw[
i][0] = geom->MakeBox(Form(
"BP%d",i), med5, MDT_width/2, MDT_thickness/2, tube_len_fw[i]/2); 
 
 1347      tube_fw[
i][1] = geom->MakeBox(Form(
"BA%d",i), med2, XSize/2,     YSize/2,         tube_len_fw[i]/2);
 
 1348      for(
int j = 0; j < 8; j++){
 
 1349      float slotpos_x = (-3.5 + 1.*j);
 
 1350        tube_fw[
i][2] = geom->MakeBox(Form(
"MDT%ds%dl%db%dw%d",4,0,0,0,0), med4, XSize1/2, YSize1/2, tube_len_fw[i]/2);
 
 1351        tube_fw[
i][1]->AddNode(tube_fw[i][2], j, 
new TGeoTranslation(slotpos_x, slotpos_y, 0.));
 
 1353      tube_fw[
i][0]->AddNode(tube_fw[i][1],1); 
 
 1357   for(
int l = 0; l < 18; l++){      
 
 1358    for(
int i = 0; i < 32; i++){  
 
 1359     dd = (l/4); dd1=(l%2); 
 
 1360     if(l<16) { pos_z = (876.1 + MDT_thickness/2 + l*9); }
 
 1361     else { pos_z = (870 - 0.1 - MDT_thickness/2 - (l-16)*(MDT_thickness+0.45)); dd=0; }
 
 1363     if((i<12 || i>15) && i<28) { pos_x = 1.45*dd;  pos_y = (-114.75+8.5*i+0.5*dd1); 
name(tube_fw[0][0],4,0,l,i,0); 
 
 1364                                  TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); 
 
 1365                                  mnk5[l]->AddNode(tube_fw[0][0], i, 
new TGeoCombiTrans(*tr0, *rr0));}   
 
 1366     if(i>=12 && i<=15)         { pos_x = (107.275+1.45*dd); pos_y = (-12.75+8.5*(i-12)+0.5*dd1); 
name(tube_fw[1][0],4,0,l,i,0); 
 
 1367                                  TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); 
 
 1368                                  mnk5[l]->AddNode(tube_fw[1][0], i, 
new TGeoCombiTrans(*tr0,*rr0));}   
 
 1369     if(i>=28)                  { pos_x = (-90.475+1.45*dd); pos_y = (-12.75+8.5*(i-28)+0.5*dd1); 
name(tube_fw[2][0],4,0,l,i,0);
 
 1370                                  TGeoTranslation *tr0 = 
new TGeoTranslation(pos_x, pos_y, pos_z); 
 
 1371                                  mnk5[l]->AddNode(tube_fw[2][0], i, 
new TGeoCombiTrans(*tr0,*rr0));}                                    
 
 1376    for(
int i=0; i<18; i++) { 
 
 1377     if(i<16) { pCombi3->AddNode(mnk5[i], i+2); }
 
 1378     else { pCombi3->AddNode(mnk5[i], 17-i); }     
 
 1381   TGeoVolume *G10_fs[18], *ST_fs[18];
 
 1382   TGeoCompositeShape *G10fs[18], *STfs[18]; 
 
 1383   TGeoTranslation *fsrot[18], *fsrot1[18];
 
 1387   TGeoVolume *vols =  geom->MakeBox(
"shl",  med7,  351.2/2,  238/2, 0.15/2);
 
 1388   TGeoVolume *vols1 = geom->MakeBox(
"shl1", med7,  44.8/2,    34/2, 0.25/2);
 
 1389   TGeoVolume *vols2 = geom->MakeBox(
"shl2", med2,  351.2/2,  238/2, 0.035/2);
 
 1390   TGeoVolume *vols3 = geom->MakeBox(
"shl3", med2,  44.8/2,    34/2, 0.055/2);
 
 1391   TGeoTranslation *vv1 = 
new TGeoTranslation(17.7, 0, 0);
 
 1392   vv1->SetName(
"vv1");
 
 1393   vv1->RegisterYourself();    
 
 1396   for(
int i=0; i<17; i++) {
 
 1399     sprintf(longbbs,
"shl - shl1:vv1",i);
 
 1400     sprintf(longbbs1,
"shl2 - shl3:vv1",i);
 
 1401      G10fs[
i] = 
new TGeoCompositeShape(longbbs);
 
 1402      STfs[
i] = 
new TGeoCompositeShape(longbbs1);
 
 1405      fsrot[
i] = 
new TGeoTranslation(kk*1.45-2, 0, 873+3+1.23+0.1+9*i); 
 
 1406      fsrot1[
i] = 
new TGeoTranslation(kk*1.45-2, 0, 873+3+1.23+0.26+9*i); 
 
 1407      G10_fs[
i] = 
new TGeoVolume(Form(
"GP%d_FS",i+2), G10fs[i], med7);
 
 1408      ST_fs[
i] = 
new TGeoVolume(Form(
"ST%d_FS",i+2), STfs[i], med7);
 
 1410         fsrot[
i] = 
new TGeoTranslation(-2, 0, 873-3-1.23-0.1-0.26); 
 
 1411         fsrot1[
i] = 
new TGeoTranslation(-2, 0, 873-3-1.23-0.1-0.16);    
 
 1414         ST_fs[
i] = 
new TGeoVolume(Form(
"ST%d_FS",17-i), STfs[i], med7);
 
 1417     ST_fs[
i]->SetLineColor(kBlue);
 
 1421    for(
int i=0; i<17; i++) { 
 
 1422     if(i<16) { pCombi3->AddNode(G10_fs[i], i+2, fsrot[i]); pCombi3->AddNode(ST_fs[i], i+2, fsrot1[i]); }
 
 1423     else { pCombi3->AddNode(G10_fs[i], 17-i, fsrot[i]); pCombi3->AddNode(ST_fs[i], 17-i, fsrot1[i]); }
 
 1430   pCombi->AddNode(MdtOct0, 0, 
new TGeoCombiTrans(0., 0., 0., rot0));
 
 1431   pCombi->AddNode(MdtOct0, 1, 
new TGeoCombiTrans(0., 0., 0., rot1));
 
 1432   pCombi->AddNode(MdtOct2, 2, 
new TGeoCombiTrans(0., 0., 0., rot2));
 
 1433   pCombi->AddNode(MdtOct0, 3, 
new TGeoCombiTrans(0., 0., 0., rot3));
 
 1434   pCombi->AddNode(MdtOct0, 4, 
new TGeoCombiTrans(0., 0., 0., rot4));
 
 1435   pCombi->AddNode(MdtOct0, 5, 
new TGeoCombiTrans(0., 0., 0., rot5));
 
 1436   pCombi->AddNode(MdtOct6, 6, 
new TGeoCombiTrans(0., 0., 0., rot6));
 
 1437   pCombi->AddNode(MdtOct0, 7, 
new TGeoCombiTrans(0., 0., 0., rot7));
 
 1442   pCombi1->AddNode(mnk3[0], 1);
 
 1443   pCombi1->AddNode(mnk3[1], 2);
 
 1444   pCombi1->AddNode(mnk3[2], 3);
 
 1445   pCombi1->AddNode(mnk3[3], 4);
 
 1446   pCombi1->AddNode(mnk3[4], 5);
 
 1447   pCombi1->AddNode(mnk3[5], 6);
 
 1448   pCombi1->AddNode(mnk3[6], 7);
 
 1451    for(
int i = 0; i < 7; i++){
 
 1453        pCombi1->AddNode(ST_endcap[i], i, 
new TGeoTranslation(0, 0, 245.657));     
 
 1454        pCombi1->AddNode(G10_endcap[i], i, 
new TGeoTranslation(0, 0, 245.695));     
 
 1456      if(i==1){pCombi1->AddNode(ST_endcap[i], 0, 
new TGeoTranslation(0, 0, 245.848)); }    
 
 1458        pCombi1->AddNode(G10_endcap[i], i, 
new TGeoTranslation(0, 0., (255.215 + 9*(i-2) +MDT_thickness/2+0.1)));     
 
 1459        pCombi1->AddNode(ST_endcap[i], i, 
new TGeoTranslation(0, 0, (255.215 + 9*(i-2) + MDT_thickness/2+0.26)));          
 
 1466   pCombi2->AddNode(mnk4[0], 1);
 
 1467   pCombi2->AddNode(mnk4[1], 2);
 
 1468   pCombi2->AddNode(mnk4[2], 3);
 
 1469   pCombi2->AddNode(mnk4[3], 4);
 
 1471    for(
int i = 0; i < 4; i++){
 
 1472        pCombi2->AddNode(ST_mf[i], i, 
new TGeoTranslation(0, 0, 302.715+9*i+0.715));     
 
 1473        pCombi2->AddNode(G10_mf[i], i, 
new TGeoTranslation(0, 0, 302.715+9*i+0.875));     
 
 1476   pCombi2->AddNode(fmf[0], 1, ftr[0]);
 
 1477   pCombi2->AddNode(fmf[1], 2, ftr[1]);
 
 1478   pCombi2->AddNode(fmf[2], 3, ftr[2]);
 
 1479   pCombi2->AddNode(fmf[3], 4, ftr[3]);
 
 1485   top->AddNode(pCombi1, 0);
 
 1491   geom->CloseGeometry();
 
 1492   geom->SetVisLevel(50);
 
 1493   geom->SetVisOption(1);
 
 1503 int name(TGeoVolume* &vol, 
int n1, 
int n2, 
int n3, 
int n4, 
int n5)
 
 1507   TObjArray* nodes = vol->GetNodes();
 
 1508   vol->SetName(Form(
"BP%ds%dl%db%dw%d",n1,n2,n3,n4,n5));
 
TGeoManager * gGeoManager
int muon_barrel_strip_5bis()