- Float_t xx = sensLength/2. * (-nPCB5[i]+2*j+1);
- Float_t yy = 0.;
- Float_t zSens = 0.;
- gMC->Gspos("S09G",index,volNam9, xx, yy, zSens , 0, "ONLY");
- gMC->Gspos("S10G",index,volNam10, xx, yy, zSens , 0, "ONLY");
- Float_t zPCB = (sensWidth+pcbWidth)/2.;
- gMC->Gspos("S09P",2*index-1,volNam9, xx, yy, zPCB , 0, "ONLY");
- gMC->Gspos("S09P",2*index ,volNam9, xx, yy,-zPCB , 0, "ONLY");
- gMC->Gspos("S10P",2*index-1,volNam10, xx, yy, zPCB , 0, "ONLY");
- gMC->Gspos("S10P",2*index ,volNam10, xx, yy,-zPCB , 0, "ONLY");
- Float_t zInsu = (insuWidth+pcbWidth)/2. + zPCB;
- gMC->Gspos("S09I",2*index-1,volNam9, xx, yy, zInsu , 0, "ONLY");
- gMC->Gspos("S09I",2*index ,volNam9, xx, yy,-zInsu , 0, "ONLY");
- gMC->Gspos("S10I",2*index-1,volNam10, xx, yy, zInsu , 0, "ONLY");
- gMC->Gspos("S10I",2*index ,volNam10, xx, yy,-zInsu , 0, "ONLY");
- Float_t zPanel1 = (insuWidth+panelWidth)/2. + zInsu;
- gMC->Gspos("S09C",4*index-3,volNam9, xx, yy, zPanel1 , 0, "ONLY");
- gMC->Gspos("S09C",4*index-2,volNam9, xx, yy,-zPanel1 , 0, "ONLY");
- gMC->Gspos("S10C",4*index-3,volNam10, xx, yy, zPanel1 , 0, "ONLY");
- gMC->Gspos("S10C",4*index-2,volNam10, xx, yy,-zPanel1 , 0, "ONLY");
- Float_t zRoha = (rohaWidth+panelWidth)/2. + zPanel1;
- gMC->Gspos("S09R",2*index-1,volNam9, xx, yy, zRoha , 0, "ONLY");
- gMC->Gspos("S09R",2*index ,volNam9, xx, yy,-zRoha , 0, "ONLY");
- gMC->Gspos("S10R",2*index-1,volNam10, xx, yy, zRoha , 0, "ONLY");
- gMC->Gspos("S10R",2*index ,volNam10, xx, yy,-zRoha , 0, "ONLY");
- Float_t zPanel2 = (rohaWidth+panelWidth)/2. + zRoha;
- gMC->Gspos("S09C",4*index-1,volNam9, xx, yy, zPanel2 , 0, "ONLY");
- gMC->Gspos("S09C",4*index ,volNam9, xx, yy,-zPanel2 , 0, "ONLY");
- gMC->Gspos("S10C",4*index-1,volNam10, xx, yy, zPanel2 , 0, "ONLY");
- gMC->Gspos("S10C",4*index ,volNam10, xx, yy,-zPanel2 , 0, "ONLY");
- Float_t yframe = (sensHeight + hFrameHeight)/2.;
- gMC->Gspos("S09H",2*index-1,volNam9, xx, yframe, 0. , 0, "ONLY");
- gMC->Gspos("S09H",2*index ,volNam9, xx,-yframe, 0. , 0, "ONLY");
- gMC->Gspos("S10H",2*index-1,volNam10, xx, yframe, 0. , 0, "ONLY");
- gMC->Gspos("S10H",2*index ,volNam10, xx,-yframe, 0. , 0, "ONLY");
- Float_t yborder = (bFrameHeight + hFrameHeight)/2. + yframe;
- gMC->Gspos("S09B",2*index-1,volNam9, xx, yborder, 0. , 0, "ONLY");
- gMC->Gspos("S09B",2*index ,volNam9, xx,-yborder, 0. , 0, "ONLY");
- gMC->Gspos("S10B",2*index-1,volNam10, xx, yborder, 0. , 0, "ONLY");
- gMC->Gspos("S10B",2*index ,volNam10, xx,-yborder, 0. , 0, "ONLY");
+ Float_t xx = sensLength * (-nPCB5[i]/2.+j+.5);
+
+ Float_t zPanel = spar[2] - panelpar[2];
+ gMC->Gspos("S09C",2*index-1,volNam9, xx, 0., zPanel , 0, "ONLY");
+ gMC->Gspos("S09C",2*index ,volNam9, xx, 0.,-zPanel , 0, "ONLY");
+ gMC->Gspos("S10C",2*index-1,volNam10, xx, 0., zPanel , 0, "ONLY");
+ gMC->Gspos("S10C",2*index ,volNam10, xx, 0.,-zPanel , 0, "ONLY");
+
+ gMC->Gspos("S09I",index,volNam9, xx, 0., 0 , 0, "ONLY");
+ gMC->Gspos("S10I",index,volNam10, xx, 0., 0 , 0, "ONLY");