+ /// Definition sector 3
+ TGeoVolume *v0ASec3 = new TGeoVolumeAssembly("V0ASec3");
+
+ /// For boolean sustraction
+ double preShapeSec3 = 0.2;
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = fV0AR0-fV0AFraWd/2.-preShapeSec3; v0APts[1+8*i] = -preShapeSec3;
+ v0APts[2+8*i] = fV0AR0-fV0AFraWd/2.-preShapeSec3; v0APts[3+8*i] = fV0AFraWd/2.;
+ v0APts[4+8*i] = fV0AR4+fV0AFraWd/2.+preShapeSec3; v0APts[5+8*i] = fV0AFraWd/2.;
+ v0APts[6+8*i] = fV0AR4+fV0AFraWd/2.+preShapeSec3; v0APts[7+8*i] = -preShapeSec3;
+ }
+ new TGeoArb8("sV0ACha1Sec3",fV0ASciWd/1.5,v0APts);
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = fV0AR0*sin45-preShapeSec3;
+ v0APts[1+8*i] = (fV0AR0-fV0AFraWd)*sin45-preShapeSec3;
+ v0APts[2+8*i] = (fV0AR0-fV0AFraWd/2.)*sin45-preShapeSec3;
+ v0APts[3+8*i] = (fV0AR0-fV0AFraWd/2.)*sin45;
+ v0APts[4+8*i] = (fV0AR4+fV0AFraWd/2.)*sin45+preShapeSec3;
+ v0APts[5+8*i] = (fV0AR4+fV0AFraWd/2.)*sin45+2.*preShapeSec3;
+ v0APts[6+8*i] = (fV0AR4+fV0AFraWd)*sin45+preShapeSec3;
+ v0APts[7+8*i] = fV0AR4*sin45+preShapeSec3;
+ }
+ new TGeoArb8("sV0ACha2Sec3", fV0ASciWd/2.+2.*preShapeSec3, v0APts);
+ new TGeoCompositeShape("sV0ACha12Sec3","sV0ACha1Sec3+sV0ACha2Sec3");
+ new TGeoTube("sV0ANail1SciHoleSec3", 0.0, 0.4, 1.65);
+ TGeoTranslation *pos1Sec3 = new TGeoTranslation("pos1Sec3", 42.9, 0.51, 0.0);
+ pos1Sec3->RegisterYourself();
+ new TGeoTube("sV0ANail2SciHoleSec3", 0.0, 0.4, 1.65);
+ TGeoTranslation *pos2Sec3 = new TGeoTranslation("pos2Sec3", 30.73,29.98,0.0);
+ pos2Sec3->RegisterYourself();
+ new TGeoCompositeShape("sV0ANailsSciHolesSec3","sV0ANail1SciHoleSec3:pos1Sec3+sV0ANail2SciHoleSec3:pos2Sec3");
+ new TGeoCompositeShape("sV0AChaSec3","sV0ACha12Sec3+sV0ANailsSciHolesSec3");
+ new TGeoTubeSeg("sV0AFicR5Sec3", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2.+2*preShapeSec3, 0, 45);
+ new TGeoBBox("sV0AFicFEEBSec3", fV0AFEEBWd/2., fV0AFEEBHt/2., fV0AFEEBTh/2.);
+ double aFEEshiftR2Sec3 = fV0AR6 + fV0AOctH2 + fV0APlaAl;
+ rot = new TGeoRotation("rot");
+ rot->RotateX(90);
+ rot->RotateZ(-90.0+45.0);
+ TGeoCombiTrans *posFicFEEBSec3 = new TGeoCombiTrans("posFicFEEBSec3", (aFEEshiftR2Sec3*cos225 + 2.0 )*cos45, (aFEEshiftR2Sec3*cos225 + 2.0 )*sin45, 7.5, rot);
+ posFicFEEBSec3->RegisterYourself();
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = fV0AOctH2/2.; v0APts[1+8*i] = fV0AFEEBHt/2. + 2.5;
+ v0APts[2+8*i] = fV0AOctH2/2.; v0APts[3+8*i] = -fV0AFEEBHt/2.- 2.5;
+ v0APts[4+8*i] = -fV0AOctH2/2.; v0APts[5+8*i] = -fV0AFEEBHt/2.- 2.5;
+ v0APts[6+8*i] = -fV0AOctH2/2.; v0APts[7+8*i] = fV0AFEEBHt/2.+ 2.5;
+ }
+ new TGeoArb8("sV0AFicOct2Sec3", (fV0ASciWd+2*fV0AOctWd)/2., v0APts);
+ rot = new TGeoRotation("rot");
+ rot->RotateZ(-90.0+45.0+90.0);
+ TGeoCombiTrans *posFicOct2UpSec3 = new TGeoCombiTrans("posFicOct2UpSec3",((aFEEshiftR2Sec3*cos225 + 2.0) - fV0AFEEBTh/2. - 1.0)*cos45,((aFEEshiftR2Sec3*cos225 + 2.0) - fV0AFEEBTh/2. - 1.0)*sin45,0.0,rot);
+ posFicOct2UpSec3->RegisterYourself();
+
+ /// Frame
+ TGeoVolume *v0AFraSec3 = new TGeoVolumeAssembly("V0AFraSec3");
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = fV0AR0-fV0AFraWd/2.; v0APts[1+8*i] = 0.;
+ v0APts[2+8*i] = fV0AR0-fV0AFraWd/2.; v0APts[3+8*i] = fV0AFraWd/2.;
+ v0APts[4+8*i] = fV0AR4+fV0AFraWd/2.; v0APts[5+8*i] = fV0AFraWd/2.;
+ v0APts[6+8*i] = fV0AR4+fV0AFraWd/2.; v0APts[7+8*i] = 0.;
+ }
+ TGeoArb8 *sV0AFraB1Sec3 = new TGeoArb8("sV0AFraB1Sec3",fV0ASciWd/2.,v0APts);
+ TGeoVolume *v0AFraB1Sec3 = new TGeoVolume("V0AFraB1Sec3",sV0AFraB1Sec3,medV0AFra);
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = fV0AR0*sin45;
+ v0APts[1+8*i] = (fV0AR0-fV0AFraWd)*sin45;
+ v0APts[2+8*i] = (fV0AR0-fV0AFraWd/2.)*sin45;
+ v0APts[3+8*i] = (fV0AR0-fV0AFraWd/2.)*sin45;
+ v0APts[4+8*i] = (fV0AR4+fV0AFraWd/2.)*sin45;
+ v0APts[5+8*i] = (fV0AR4+fV0AFraWd/2.)*sin45;
+ v0APts[6+8*i] = (fV0AR4+fV0AFraWd)*sin45;
+ v0APts[7+8*i] = fV0AR4*sin45;
+ }
+ TGeoArb8 *sV0AFraB2Sec3 = new TGeoArb8("sV0AFraB2Sec3", fV0ASciWd/2., v0APts);
+ TGeoVolume *v0AFraB2Sec3 = new TGeoVolume("V0AFraB2Sec3",sV0AFraB2Sec3,medV0AFra);
+ v0AFraB1Sec3->SetLineColor(kV0AColorFra); v0AFraB2Sec3->SetLineColor(kV0AColorFra);
+ v0AFraSec3->AddNode(v0AFraB1Sec3,1);
+ v0AFraSec3->AddNode(v0AFraB2Sec3,1);
+ new TGeoTubeSeg( "sV0AFraR1bSec3", fV0AR0-fV0AFraWd/2.,
+ fV0AR0+fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ new TGeoTubeSeg( "sV0AFraR2bSec3", fV0AR1-fV0AFraWd/2.,
+ fV0AR1+fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ new TGeoTubeSeg( "sV0AFraR3bSec3", fV0AR2-fV0AFraWd/2.,
+ fV0AR2+fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ new TGeoTubeSeg( "sV0AFraR4bSec3", fV0AR3-fV0AFraWd/2.,
+ fV0AR3+fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ new TGeoTubeSeg( "sV0AFraR5bSec3", fV0AR4-fV0AFraWd/2.,
+ fV0AR4+fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ TGeoCompositeShape *sV0AFraR1Sec3 = new TGeoCompositeShape("sV0AFraR1Sec3","sV0AFraR1bSec3-sV0AChaSec3");
+ TGeoCompositeShape *sV0AFraR2Sec3 = new TGeoCompositeShape("sV0AFraR2Sec3","sV0AFraR2bSec3-sV0AChaSec3");
+ TGeoCompositeShape *sV0AFraR3Sec3 = new TGeoCompositeShape("sV0AFraR3Sec3","sV0AFraR3bSec3-sV0AChaSec3");
+ TGeoCompositeShape *sV0AFraR4Sec3 = new TGeoCompositeShape("sV0AFraR4Sec3","sV0AFraR4bSec3-sV0AChaSec3");
+ TGeoCompositeShape *sV0AFraR5Sec3 = new TGeoCompositeShape("sV0AFraR5Sec3","sV0AFraR5bSec3-sV0AChaSec3");
+ TGeoVolume *v0AFraR1Sec3 = new TGeoVolume("V0AFraR1Sec3",sV0AFraR1Sec3,medV0AFra);
+ TGeoVolume *v0AFraR2Sec3 = new TGeoVolume("V0AFraR2Sec3",sV0AFraR2Sec3,medV0AFra);
+ TGeoVolume *v0AFraR3Sec3 = new TGeoVolume("V0AFraR3Sec3",sV0AFraR3Sec3,medV0AFra);
+ TGeoVolume *v0AFraR4Sec3 = new TGeoVolume("V0AFraR4Sec3",sV0AFraR4Sec3,medV0AFra);
+ TGeoVolume *v0AFraR5Sec3 = new TGeoVolume("V0AFraR5Sec3",sV0AFraR5Sec3,medV0AFra);
+ v0AFraR1Sec3->SetLineColor(kV0AColorFra); v0AFraR2Sec3->SetLineColor(kV0AColorFra);
+ v0AFraR3Sec3->SetLineColor(kV0AColorFra); v0AFraR4Sec3->SetLineColor(kV0AColorFra);
+ v0AFraR5Sec3->SetLineColor(kV0AColorFra);
+ v0AFraSec3->AddNode(v0AFraR1Sec3,1);
+ v0AFraSec3->AddNode(v0AFraR2Sec3,1);
+ v0AFraSec3->AddNode(v0AFraR3Sec3,1);
+ v0AFraSec3->AddNode(v0AFraR4Sec3,1);
+ v0AFraSec3->AddNode(v0AFraR5Sec3,1);
+ v0ASec3->AddNode(v0AFraSec3,1);
+
+ /// Sensitive scintilator
+ TGeoVolume *v0ASciSec3 = new TGeoVolumeAssembly("V0ASciSec3");
+ new TGeoTubeSeg( "sV0AR1bSec3", fV0AR0+fV0AFraWd/2.,
+ fV0AR1-fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ new TGeoTubeSeg( "sV0AR2bSec3", fV0AR1+fV0AFraWd/2.,
+ fV0AR2-fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ new TGeoTubeSeg( "sV0AR3bSec3", fV0AR2+fV0AFraWd/2.,
+ fV0AR3-fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ new TGeoTubeSeg( "sV0AR4bSec3", fV0AR3+fV0AFraWd/2.,
+ fV0AR4-fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ TGeoCompositeShape *sV0AR1Sec3 = new TGeoCompositeShape("sV0AR1Sec3","sV0AR1bSec3-sV0AChaSec3");
+ TGeoCompositeShape *sV0AR2Sec3 = new TGeoCompositeShape("sV0AR2Sec3","sV0AR2bSec3-sV0AChaSec3");
+ TGeoCompositeShape *sV0AR3Sec3 = new TGeoCompositeShape("sV0AR3Sec3","sV0AR3bSec3-sV0AChaSec3");
+ TGeoCompositeShape *sV0AR4Sec3 = new TGeoCompositeShape("sV0AR4Sec3","sV0AR4bSec3-sV0AChaSec3");
+ TGeoVolume *v0L1Sec3 = new TGeoVolume("V0L1Sec3",sV0AR1Sec3,medV0ASci);
+ TGeoVolume *v0L2Sec3 = new TGeoVolume("V0L2Sec3",sV0AR2Sec3,medV0ASci);
+ TGeoVolume *v0L3Sec3 = new TGeoVolume("V0L3Sec3",sV0AR3Sec3,medV0ASci);
+ TGeoVolume *v0L4Sec3 = new TGeoVolume("V0L4Sec3",sV0AR4Sec3,medV0ASci);
+ v0L1Sec3->SetLineColor(kV0AColorSci); v0L2Sec3->SetLineColor(kV0AColorSci);
+ v0L3Sec3->SetLineColor(kV0AColorSci); v0L4Sec3->SetLineColor(kV0AColorSci);
+ v0ASec3->AddNode(v0L1Sec3,1);
+ v0ASec3->AddNode(v0L2Sec3,1);
+ v0ASec3->AddNode(v0L3Sec3,1);
+ v0ASec3->AddNode(v0L4Sec3,1);
+
+ /// Segment of octagon
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = fV0AR6-fV0AOctH2; v0APts[1+8*i] = 0.;
+ v0APts[2+8*i] = (fV0AR6-fV0AOctH2)*sin45; v0APts[3+8*i] = (fV0AR6-fV0AOctH2)*sin45;
+ v0APts[4+8*i] = fV0AR6*sin45; v0APts[5+8*i] = fV0AR6*sin45;
+ v0APts[6+8*i] = fV0AR6; v0APts[7+8*i] = 0.;
+ }
+ new TGeoArb8("sV0AOct2Sec3", (fV0ASciWd+2*fV0AOctWd)/2., v0APts);
+ TGeoCompositeShape *sV0AOct2FEEBSec3 = new TGeoCompositeShape("sV0AOct2FEEBSec3","sV0AOct2Sec3-sV0AFicOct2Sec3:posFicOct2UpSec3-sV0AFicFEEBSec3:posFicFEEBSec3");
+ TGeoVolume *v0AOct2Sec3 = new TGeoVolume("V0AOct2Sec3", sV0AOct2FEEBSec3,medV0ASup);
+ v0AOct2Sec3->SetLineColor(kV0AColorOct);
+ TGeoVolume *v0ASupSec3 = new TGeoVolumeAssembly("V0ASupSec3");
+ v0ASupSec3->AddNode(v0AOct2Sec3,1);
+ v0ASec3->AddNode(v0ASupSec3,1);
+
+ //Bunch of fibers
+ v0APts[ 0] = v0APts[ 2] = -13.0;
+ v0APts[ 1] = v0APts[ 7] = (fV0ASciWd+fV0AOctWd)/2.-0.01;
+ v0APts[ 3] = v0APts[ 5] = (fV0ASciWd+fV0AOctWd)/2.+0.01;
+ v0APts[ 4] = v0APts[ 6] = +13.0;
+ v0APts[ 8] = v0APts[10] = -10.0;
+ v0APts[ 9] = v0APts[15] = 0.;
+ v0APts[11] = v0APts[13] = 0.25;
+ v0APts[12] = v0APts[14] = +10.0;
+ new TGeoArb8("sV0AFib1Sec3", 11.5, v0APts);
+ rot = new TGeoRotation("rot");
+ rot->RotateX(-90);
+ rot->RotateZ(-90.+22.5);
+ TGeoCombiTrans *fibpos1Sec3 = new TGeoCombiTrans("fibpos1Sec3", (fV0AR6-fV0AOctH2+fV0AR5)*cos225/2. - 3.8, (fV0AR6-fV0AOctH2+fV0AR5)*sin225/2.-1.8, 0, rot);
+ fibpos1Sec3->RegisterYourself();
+ TGeoCompositeShape *sV0AFib1HoleSec3 = new TGeoCompositeShape("sV0AFib1HoleSec3","sV0AFib1Sec3:fibpos1Sec3-sV0AFicR5Sec3");
+ TGeoVolume *v0AFib1HoleSec3 = new TGeoVolume("V0AFib1HoleSec3",sV0AFib1HoleSec3,medV0AFib);
+ v0AFib1HoleSec3->SetLineColor(kV0AColorFib);
+ new TGeoArb8("sV0AFib2Sec3", 11.5, v0APts);
+ rot = new TGeoRotation("rot");
+ rot->RotateX(-90);
+ rot->RotateY(180);
+ rot->RotateZ(-90.+22.5);
+ TGeoCombiTrans *fibpos2Sec3 = new TGeoCombiTrans("fibpos2Sec3", (fV0AR6-fV0AOctH2+fV0AR5)*cos225/2. - 3.8, (fV0AR6-fV0AOctH2+fV0AR5)*sin225/2.-1.8, 0, rot);
+ fibpos2Sec3->RegisterYourself();
+ TGeoCompositeShape *sV0AFib2HoleSec3 = new TGeoCompositeShape("sV0AFib2HoleSec3","sV0AFib2Sec3:fibpos2Sec3-sV0AFicR5Sec3");
+ TGeoVolume *v0AFib2HoleSec3 = new TGeoVolume("V0AFib2HoleSec3",sV0AFib2HoleSec3,medV0AFib);
+ v0AFib2HoleSec3->SetLineColor(kV0AColorFib);
+ TGeoVolume *v0AFibSec3 = new TGeoVolumeAssembly("V0AFibSec3");
+ v0AFibSec3->AddNode(v0AFib1HoleSec3,1);
+ v0AFibSec3->AddNode(v0AFib2HoleSec3,1);
+ v0ASec3->AddNode(v0AFibSec3,1);
+
+ /// Plates
+ new TGeoTube("sV0ANail1PlaInHoleSec3", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.);
+ new TGeoTube("sV0ANail2PlaInHoleSec3", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.);
+ new TGeoCompositeShape("sV0ANailsPlaInHolesSec3","sV0ANail1PlaInHoleSec3:pos1Sec3+sV0ANail2PlaInHoleSec3:pos2Sec3");
+ new TGeoTube("sV0ANail1PlaOuHoleSec3", 0.0, 0.4, (fV0APlaAl)/2.);
+ new TGeoTube("sV0ANail2PlaOuHoleSec3", 0.0, 0.4, (fV0APlaAl)/2.);
+ new TGeoCompositeShape("sV0ANailsPlaOuHolesSec3","sV0ANail1PlaOuHoleSec3:pos1Sec3+sV0ANail2PlaOuHoleSec3:pos2Sec3");
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = fV0AR0; v0APts[1+8*i] = 0.;
+ v0APts[2+8*i] = fV0AR0*sin45; v0APts[3+8*i] = fV0AR0*sin45;
+ v0APts[4+8*i] = fV0AR6 * sin45; v0APts[5+8*i] = fV0AR6*sin45;
+ v0APts[6+8*i] = fV0AR6; v0APts[7+8*i] = 0.;
+ }
+ new TGeoArb8("sV0APlaInSec3", (fV0APlaWd-2*fV0APlaAl)/2., v0APts);
+ TGeoCompositeShape *sV0APlaInNailsHolesSec3 = new TGeoCompositeShape("sV0APlaInNailsHolesSec3","sV0APlaInSec3-sV0ANailsPlaInHolesSec3-sV0AFicFEEBSec3:posFicFEEBSec3");
+ TGeoVolume *v0APlaInNailsHolesSec3 = new TGeoVolume("V0APlaInNailsHolesSec3", sV0APlaInNailsHolesSec3, medV0APlaIn);
+ new TGeoArb8("sV0APlaOuSec3", fV0APlaAl/2., v0APts);
+ TGeoCompositeShape *sV0APlaOuNailsHolesSec3 = new TGeoCompositeShape("sV0APlaOuNailsHolesSec3","sV0APlaOuSec3-sV0ANailsPlaOuHolesSec3-sV0AFicFEEBSec3:posFicFEEBSec3");
+ TGeoVolume *v0APlaOuNailsHolesSec3 = new TGeoVolume("V0APlaOuNailsHolesSec3", sV0APlaOuNailsHolesSec3, medV0APlaOu);
+ v0APlaInNailsHolesSec3->SetLineColor(kV0AColorPlaIn); v0APlaOuNailsHolesSec3->SetLineColor(kV0AColorPlaOu);
+ TGeoVolume *v0APlaSec3 = new TGeoVolumeAssembly("V0APlaSec3");
+ v0APlaSec3->AddNode(v0APlaInNailsHolesSec3,1);
+ v0APlaSec3->AddNode(v0APlaOuNailsHolesSec3,1,new TGeoTranslation(0,0,(fV0APlaWd-fV0APlaAl)/2.));
+ v0APlaSec3->AddNode(v0APlaOuNailsHolesSec3,2,new TGeoTranslation(0,0,-(fV0APlaWd-fV0APlaAl)/2.));
+ v0ASec3->AddNode(v0APlaSec3,1,new TGeoTranslation(0,0,(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.));
+ v0ASec3->AddNode(v0APlaSec3,2,new TGeoTranslation(0,0,-(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.));
+
+ /// Non-sensitive scintilator
+ new TGeoTubeSeg("sV0AR5S2Sec3", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2.+2*preShapeSec3, 0, 45);
+ TGeoCompositeShape *sV0AR5Sec3 = new TGeoCompositeShape("V0AR5Sec3","sV0AR5S2Sec3 - sV0AChaSec3");
+ TGeoVolume *v0AR5Sec3 = new TGeoVolume("V0AR5Sec3",sV0AR5Sec3,medV0ASci);
+ v0AR5Sec3->SetLineColor(kV0AColorSci);
+ v0ASciSec3->AddNode(v0AR5Sec3,1);
+ v0ASec3->AddNode(v0ASciSec3,1);
+
+ /// PMBox
+ TGeoVolume* v0APMSec3 = new TGeoVolumeAssembly("V0APMSec3");
+ new TGeoBBox("sV0APMB1Sec3", fV0APMBWd/2., fV0APMBHt/2., fV0APMBTh/2.);
+ new TGeoBBox("sV0APMB2Sec3", fV0APMBWd/2.-fV0APMBWdW, fV0APMBHt/2.-fV0APMBHtW, fV0APMBTh/2.-fV0APMBThW);
+ TGeoCompositeShape *sV0APMBSec3 = new TGeoCompositeShape("sV0APMBSec3","sV0APMB1Sec3-sV0APMB2Sec3");
+ TGeoVolume *v0APMBSec3 = new TGeoVolume("V0APMBSec3",sV0APMBSec3, medV0APMAlum);
+ v0APMBSec3->SetLineColor(kV0AColorPMA);
+ v0APMSec3->AddNode(v0APMBSec3,1);
+
+ /// PMTubes
+ TGeoTube *sV0APMT1Sec3 = new TGeoTube("sV0APMT1Sec3", fV0APMTR1, fV0APMTR2, fV0APMTH/2.);
+ TGeoVolume *v0APMT1Sec3 = new TGeoVolume("V0APMT1Sec3", sV0APMT1Sec3, medV0APMGlass);
+ TGeoTube *sV0APMT2Sec3 = new TGeoTube("sV0APMT2Sec3", fV0APMTR3, fV0APMTR4, fV0APMTH/2.);
+ TGeoVolume *v0APMT2Sec3 = new TGeoVolume("V0APMT2Sec3", sV0APMT2Sec3, medV0APMAlum);
+ TGeoVolume *v0APMTSec3 = new TGeoVolumeAssembly("V0APMTSec3");
+ TGeoTube *sV0APMTTSec3 = new TGeoTube("sV0APMTTSec3", 0., fV0APMTR4, fV0APMTB/2.);
+ TGeoVolume *v0APMTTSec3 = new TGeoVolume("V0APMTTSec3", sV0APMTTSec3, medV0APMAlum);
+ v0APMT1Sec3->SetLineColor(kV0AColorPMG);
+ v0APMT2Sec3->SetLineColor(kV0AColorPMA);
+ v0APMTTSec3->SetLineColor(kV0AColorPMA);
+ rot = new TGeoRotation("rot", 90, 0, 180, 0, 90, 90);
+ v0APMTSec3->AddNode(v0APMT1Sec3,1,rot);
+ v0APMTSec3->AddNode(v0APMT2Sec3,1,rot);
+ v0APMTSec3->AddNode(v0APMTTSec3,1,new TGeoCombiTrans(0,-(fV0APMTH+fV0APMTB)/2.,0,rot));
+ double autoShiftSec3 = (fV0APMBWd-2*fV0APMBWdW)/4.;
+ v0APMSec3->AddNode(v0APMTSec3, 1, new TGeoTranslation(-1.5*autoShiftSec3, 0, 0));
+ v0APMSec3->AddNode(v0APMTSec3, 2, new TGeoTranslation(-0.5*autoShiftSec3, 0, 0));
+ v0APMSec3->AddNode(v0APMTSec3, 3, new TGeoTranslation(+0.5*autoShiftSec3, 0, 0));
+ v0APMSec3->AddNode(v0APMTSec3, 4, new TGeoTranslation(+1.5*autoShiftSec3, 0, 0));
+
+ // PM
+ rot = new TGeoRotation("rot");
+ rot->RotateX(90-fV0APMBAng);
+ rot->RotateZ(-90.+22.5);
+ double cosAngPMBSec3 = TMath::Cos(fV0APMBAng*TMath::DegToRad());
+ double sinAngPMBSec3 = TMath::Sin(fV0APMBAng*TMath::DegToRad());
+ double shiftZSec3 = fV0APMBHt/2. * cosAngPMBSec3
+ - ( fV0ASciWd + 2 * fV0AOctWd + 2 * fV0APlaWd )/2. - fV0APMBTh/2. * sinAngPMBSec3;
+ double shiftRSec3 = fV0AR6 + fV0AOctH2 + fV0APlaAl;
+ v0ASec3->AddNode(v0APMSec3,1, new TGeoCombiTrans( shiftRSec3*cos225+1.07, shiftRSec3*sin225, shiftZSec3, rot));
+
+ // Aluminium nails
+ TGeoTube *sV0ANail1Sec3 = new TGeoTube("sV0ANail1Sec3", 0.0, 0.4, 5.09/2.);
+ TGeoVolume *v0ANail1Sec3 = new TGeoVolume("V0ANail1Sec3", sV0ANail1Sec3, medV0APMAlum);
+ v0ANail1Sec3->SetLineColor(kV0AColorPMA);// this is the color for aluminium
+ v0ASec3->AddNode(v0ANail1Sec3,1,new TGeoTranslation(42.9, 0.51, 0.0));
+ TGeoTube *sV0ANail2Sec3 = new TGeoTube("sV0ANail2Sec3", 0.0, 0.4, 5.09/2.);
+ TGeoVolume *v0ANail2Sec3 = new TGeoVolume("V0ANail2Sec3", sV0ANail2Sec3, medV0APMAlum);
+ v0ANail2Sec3->SetLineColor(kV0AColorPMA);
+ v0ASec3->AddNode(v0ANail2Sec3,1,new TGeoTranslation(30.73,29.98,0.0));
+
+ /// Adding sector to v0LE volume
+ for(int i=2; i<3; i++) {
+ TGeoRotation *rotation = new TGeoRotation("rotation", 90., i*45., 90., 90.+i*45., 0., 0.);
+ v0LE->AddNode(v0ASec3,i+1,rotation);
+ }
+
+ //FEEBox
+ TGeoVolume* v0AFEE3 = new TGeoVolumeAssembly("V0AFEE3");
+ v0AFEE3->AddNode(v0AFEEB,1);
+
+ //Mother and daughter boards
+ v0AFEE3->AddNode(v0AFEEDaughter, 1, new TGeoTranslation(9.0*spacing, fV0AFEEBTh/2.+2.0*fV0APMTB, fV0APMBHtW/2.));
+ v0AFEE3->AddNode(v0AFEEDaughter, 2, new TGeoTranslation(6.0*spacing, fV0AFEEBTh/2.+2.0*fV0APMTB, fV0APMBHtW/2.));
+ v0AFEE3->AddNode(v0AFEEDaughter, 3, new TGeoTranslation(3.0*spacing, fV0AFEEBTh/2.+2.0*fV0APMTB, fV0APMBHtW/2.));
+ v0AFEE3->AddNode(v0AFEEDaughter, 4, new TGeoTranslation(0.0*spacing, fV0AFEEBTh/2.+2.0*fV0APMTB, fV0APMBHtW/2.));
+ v0AFEE3->AddNode(v0AFEEDaughter, 5, new TGeoTranslation(-3.0*spacing, fV0AFEEBTh/2.+2.0*fV0APMTB, fV0APMBHtW/2.));
+ v0AFEE3->AddNode(v0AFEEDaughter, 6, new TGeoTranslation(-6.0*spacing, fV0AFEEBTh/2.+2.0*fV0APMTB, fV0APMBHtW/2.));
+ v0AFEE3->AddNode(v0AFEEDaughter, 7, new TGeoTranslation(-9.0*spacing, fV0AFEEBTh/2.+2.0*fV0APMTB, fV0APMBHtW/2.));
+ v0AFEE3->AddNode(v0AFEEDaughter, 8, new TGeoTranslation(-12.0*spacing, fV0AFEEBTh/2.+2.0*fV0APMTB, fV0APMBHtW/2.));
+ v0AFEE3->AddNode(v0AFEEMother, 1, new TGeoTranslation(0.0, 0.0, -fV0AFEEBTh/2.+fV0APMBThW+fV0APMBHtW));
+ v0AFEE3->AddNode(v0AFEEHalfMother, 1, new TGeoTranslation(0.0, -(fV0AFEEBTh+fV0APMTB)/2., -2.0*spacing));
+
+ //FEE
+ rot = new TGeoRotation("rot");
+ rot->RotateX(90);
+ rot->RotateZ(-90.0+45.0-90);
+ v0LE->AddNode(v0AFEE3,1, new TGeoCombiTrans( -(aFEEshiftR2Sec1*cos225 + 2.0)*cos45, (aFEEshiftR2Sec1*cos225 + 2.0)*sin45, 7.5, rot) );
+ rot = new TGeoRotation("rot");
+ rot->RotateZ(+90.0-45.0-90.0);
+ v0LE->AddNode(v0AFEEOct2,3, new TGeoCombiTrans(-((aFEEshiftR2Sec1*cos225 + 2.0) - fV0AFEEBTh/2. - 1.0)*cos45,((aFEEshiftR2Sec1*cos225 + 2.0) - fV0AFEEBTh/2. - 1.0)*sin45,0.0,rot));
+
+
+ /// Definition sector 4
+ TGeoVolume *v0ASec4 = new TGeoVolumeAssembly("V0ASec4");
+
+ /// For boolean sustraction
+ double preShapeSec4 = 0.2;
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = fV0AR0-fV0AFraWd/2.-preShapeSec4; v0APts[1+8*i] = -preShapeSec4;
+ v0APts[2+8*i] = fV0AR0-fV0AFraWd/2.-preShapeSec4; v0APts[3+8*i] = fV0AFraWd/2.;
+ v0APts[4+8*i] = fV0AR4+fV0AFraWd/2.+preShapeSec4; v0APts[5+8*i] = fV0AFraWd/2.;
+ v0APts[6+8*i] = fV0AR4+fV0AFraWd/2.+preShapeSec4; v0APts[7+8*i] = -preShapeSec4;
+ }
+ new TGeoArb8("sV0ACha1Sec4",fV0ASciWd/1.5,v0APts);
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = fV0AR0*sin45-preShapeSec4;
+ v0APts[1+8*i] = (fV0AR0-fV0AFraWd)*sin45-preShapeSec4;
+ v0APts[2+8*i] = (fV0AR0-fV0AFraWd/2.)*sin45-preShapeSec4;
+ v0APts[3+8*i] = (fV0AR0-fV0AFraWd/2.)*sin45;
+ v0APts[4+8*i] = (fV0AR4+fV0AFraWd/2.)*sin45+preShapeSec4;
+ v0APts[5+8*i] = (fV0AR4+fV0AFraWd/2.)*sin45+2.*preShapeSec4;
+ v0APts[6+8*i] = (fV0AR4+fV0AFraWd)*sin45+preShapeSec4;
+ v0APts[7+8*i] = fV0AR4*sin45+preShapeSec4;
+ }
+ new TGeoArb8("sV0ACha2Sec4", fV0ASciWd/2.+2.*preShapeSec4, v0APts);
+ new TGeoCompositeShape("sV0ACha12Sec4","sV0ACha1Sec4+sV0ACha2Sec4");
+ new TGeoTube("sV0ANail1SciHoleSec4", 0.0, 0.4, 1.65);
+ TGeoTranslation *pos1Sec4 = new TGeoTranslation("pos1Sec4", 42.9, 0.51, 0.0);
+ pos1Sec4->RegisterYourself();
+ new TGeoTube("sV0ANail2SciHoleSec4", 0.0, 0.4, 1.65);
+ TGeoTranslation *pos2Sec4 = new TGeoTranslation("pos2Sec4", 30.73,29.98,0.0);
+ pos2Sec4->RegisterYourself();
+ new TGeoCompositeShape("sV0ANailsSciHolesSec4","sV0ANail1SciHoleSec4:pos1Sec4+sV0ANail2SciHoleSec4:pos2Sec4");
+ new TGeoCompositeShape("sV0AChaSec4","sV0ACha12Sec4+sV0ANailsSciHolesSec4");
+ new TGeoTubeSeg("sV0AFicR5Sec4", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2.+2*preShapeSec4, 0, 45);
+ new TGeoBBox("sV0AFicFEEBSec4", fV0AFEEBWd/2., fV0AFEEBHt/2., fV0AFEEBTh/2.);
+ rot = new TGeoRotation("rot");
+ rot->RotateX(90);
+ rot->RotateZ(-90.0);
+ double aFEEshiftR2Sec4 = fV0AR6 + fV0AOctH2 + fV0APlaAl;
+ TGeoCombiTrans *posFicFEEBSec4 = new TGeoCombiTrans("posFicFEEBSec4", aFEEshiftR2Sec4*cos225 + 2.0, 0, 7.5, rot);
+ posFicFEEBSec4->RegisterYourself();
+ rot = new TGeoRotation("rot");
+ rot->RotateX(90);
+ rot->RotateZ(-90.0+45.0);
+ TGeoCombiTrans *posFicFEEBUpSec4 = new TGeoCombiTrans("posFicFEEBUpSec4", (aFEEshiftR2Sec4*cos225 + 2.0 )*cos45, (aFEEshiftR2Sec4*cos225 + 2.0 )*sin45, 7.5, rot);
+ posFicFEEBUpSec4->RegisterYourself();
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = fV0AOctH2/2.; v0APts[1+8*i] = fV0AFEEBHt/2. + 2.5;
+ v0APts[2+8*i] = fV0AOctH2/2.; v0APts[3+8*i] = -fV0AFEEBHt/2.- 2.5;
+ v0APts[4+8*i] = -fV0AOctH2/2.; v0APts[5+8*i] = -fV0AFEEBHt/2.- 2.5;
+ v0APts[6+8*i] = -fV0AOctH2/2.; v0APts[7+8*i] = fV0AFEEBHt/2.+ 2.5;
+ }
+ new TGeoArb8("sV0AFicOct2Sec4", (fV0ASciWd+2*fV0AOctWd)/2., v0APts);
+ TGeoTranslation *posFicOct2Sec4 = new TGeoTranslation("posFicOct2Sec4",(aFEEshiftR2Sec4*cos225 + 2.0) - fV0AFEEBTh/2. - 1.0,0.0,0.0);
+ posFicOct2Sec4->RegisterYourself();
+ rot = new TGeoRotation("rot");
+ rot->RotateZ(-90.0+45.0+90.0);
+ TGeoCombiTrans *posFicOct2UpSec4 = new TGeoCombiTrans("posFicOct2UpSec4",((aFEEshiftR2Sec4*cos225 + 2.0) - fV0AFEEBTh/2. - 1.0)*cos45,((aFEEshiftR2Sec4*cos225 + 2.0) - fV0AFEEBTh/2. - 1.0)*sin45,0.0,rot);
+ posFicOct2UpSec4->RegisterYourself();
+
+ /// Frame
+ TGeoVolume *v0AFraSec4 = new TGeoVolumeAssembly("V0AFraSec4");
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = fV0AR0-fV0AFraWd/2.; v0APts[1+8*i] = 0.;
+ v0APts[2+8*i] = fV0AR0-fV0AFraWd/2.; v0APts[3+8*i] = fV0AFraWd/2.;
+ v0APts[4+8*i] = fV0AR4+fV0AFraWd/2.; v0APts[5+8*i] = fV0AFraWd/2.;
+ v0APts[6+8*i] = fV0AR4+fV0AFraWd/2.; v0APts[7+8*i] = 0.;
+ }
+ TGeoArb8 *sV0AFraB1Sec4 = new TGeoArb8("sV0AFraB1Sec4",fV0ASciWd/2.,v0APts);
+ TGeoVolume *v0AFraB1Sec4 = new TGeoVolume("V0AFraB1Sec4",sV0AFraB1Sec4,medV0AFra);
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = fV0AR0*sin45;
+ v0APts[1+8*i] = (fV0AR0-fV0AFraWd)*sin45;
+ v0APts[2+8*i] = (fV0AR0-fV0AFraWd/2.)*sin45;
+ v0APts[3+8*i] = (fV0AR0-fV0AFraWd/2.)*sin45;
+ v0APts[4+8*i] = (fV0AR4+fV0AFraWd/2.)*sin45;
+ v0APts[5+8*i] = (fV0AR4+fV0AFraWd/2.)*sin45;
+ v0APts[6+8*i] = (fV0AR4+fV0AFraWd)*sin45;
+ v0APts[7+8*i] = fV0AR4*sin45;
+ }
+ TGeoArb8 *sV0AFraB2Sec4 = new TGeoArb8("sV0AFraB2Sec4", fV0ASciWd/2., v0APts);
+ TGeoVolume *v0AFraB2Sec4 = new TGeoVolume("V0AFraB2Sec4",sV0AFraB2Sec4,medV0AFra);
+ v0AFraB1Sec4->SetLineColor(kV0AColorFra); v0AFraB2Sec4->SetLineColor(kV0AColorFra);
+ v0AFraSec4->AddNode(v0AFraB1Sec4,1);
+ v0AFraSec4->AddNode(v0AFraB2Sec4,1);
+ new TGeoTubeSeg( "sV0AFraR1bSec4", fV0AR0-fV0AFraWd/2.,
+ fV0AR0+fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ new TGeoTubeSeg( "sV0AFraR2bSec4", fV0AR1-fV0AFraWd/2.,
+ fV0AR1+fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ new TGeoTubeSeg( "sV0AFraR3bSec4", fV0AR2-fV0AFraWd/2.,
+ fV0AR2+fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ new TGeoTubeSeg( "sV0AFraR4bSec4", fV0AR3-fV0AFraWd/2.,
+ fV0AR3+fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ new TGeoTubeSeg( "sV0AFraR5bSec4", fV0AR4-fV0AFraWd/2.,
+ fV0AR4+fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ TGeoCompositeShape *sV0AFraR1Sec4 = new TGeoCompositeShape("sV0AFraR1Sec4","sV0AFraR1bSec4-sV0AChaSec4");
+ TGeoCompositeShape *sV0AFraR2Sec4 = new TGeoCompositeShape("sV0AFraR2Sec4","sV0AFraR2bSec4-sV0AChaSec4");
+ TGeoCompositeShape *sV0AFraR3Sec4 = new TGeoCompositeShape("sV0AFraR3Sec4","sV0AFraR3bSec4-sV0AChaSec4");
+ TGeoCompositeShape *sV0AFraR4Sec4 = new TGeoCompositeShape("sV0AFraR4Sec4","sV0AFraR4bSec4-sV0AChaSec4");
+ TGeoCompositeShape *sV0AFraR5Sec4 = new TGeoCompositeShape("sV0AFraR5Sec4","sV0AFraR5bSec4-sV0AChaSec4");
+ TGeoVolume *v0AFraR1Sec4 = new TGeoVolume("V0AFraR1Sec4",sV0AFraR1Sec4,medV0AFra);
+ TGeoVolume *v0AFraR2Sec4 = new TGeoVolume("V0AFraR2Sec4",sV0AFraR2Sec4,medV0AFra);
+ TGeoVolume *v0AFraR3Sec4 = new TGeoVolume("V0AFraR3Sec4",sV0AFraR3Sec4,medV0AFra);
+ TGeoVolume *v0AFraR4Sec4 = new TGeoVolume("V0AFraR4Sec4",sV0AFraR4Sec4,medV0AFra);
+ TGeoVolume *v0AFraR5Sec4 = new TGeoVolume("V0AFraR5Sec4",sV0AFraR5Sec4,medV0AFra);
+ v0AFraR1Sec4->SetLineColor(kV0AColorFra); v0AFraR2Sec4->SetLineColor(kV0AColorFra);
+ v0AFraR3Sec4->SetLineColor(kV0AColorFra); v0AFraR4Sec4->SetLineColor(kV0AColorFra);
+ v0AFraR5Sec4->SetLineColor(kV0AColorFra);
+ v0AFraSec4->AddNode(v0AFraR1Sec4,1);
+ v0AFraSec4->AddNode(v0AFraR2Sec4,1);
+ v0AFraSec4->AddNode(v0AFraR3Sec4,1);
+ v0AFraSec4->AddNode(v0AFraR4Sec4,1);
+ v0AFraSec4->AddNode(v0AFraR5Sec4,1);
+ v0ASec4->AddNode(v0AFraSec4,1);
+
+ /// Sensitive scintilator
+ TGeoVolume *v0ASciSec4 = new TGeoVolumeAssembly("V0ASciSec4");
+ new TGeoTubeSeg( "sV0AR1bSec4", fV0AR0+fV0AFraWd/2.,
+ fV0AR1-fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ new TGeoTubeSeg( "sV0AR2bSec4", fV0AR1+fV0AFraWd/2.,
+ fV0AR2-fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ new TGeoTubeSeg( "sV0AR3bSec4", fV0AR2+fV0AFraWd/2.,
+ fV0AR3-fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ new TGeoTubeSeg( "sV0AR4bSec4", fV0AR3+fV0AFraWd/2.,
+ fV0AR4-fV0AFraWd/2., fV0ASciWd/2., 0, 45);
+ TGeoCompositeShape *sV0AR1Sec4 = new TGeoCompositeShape("sV0AR1Sec4","sV0AR1bSec4-sV0AChaSec4");
+ TGeoCompositeShape *sV0AR2Sec4 = new TGeoCompositeShape("sV0AR2Sec4","sV0AR2bSec4-sV0AChaSec4");
+ TGeoCompositeShape *sV0AR3Sec4 = new TGeoCompositeShape("sV0AR3Sec4","sV0AR3bSec4-sV0AChaSec4");
+ TGeoCompositeShape *sV0AR4Sec4 = new TGeoCompositeShape("sV0AR4Sec4","sV0AR4bSec4-sV0AChaSec4");
+ TGeoVolume *v0L1Sec4 = new TGeoVolume("V0L1Sec4",sV0AR1Sec4,medV0ASci);
+ TGeoVolume *v0L2Sec4 = new TGeoVolume("V0L2Sec4",sV0AR2Sec4,medV0ASci);
+ TGeoVolume *v0L3Sec4 = new TGeoVolume("V0L3Sec4",sV0AR3Sec4,medV0ASci);
+ TGeoVolume *v0L4Sec4 = new TGeoVolume("V0L4Sec4",sV0AR4Sec4,medV0ASci);
+ v0L1Sec4->SetLineColor(kV0AColorSci); v0L2Sec4->SetLineColor(kV0AColorSci);
+ v0L3Sec4->SetLineColor(kV0AColorSci); v0L4Sec4->SetLineColor(kV0AColorSci);
+ v0ASec4->AddNode(v0L1Sec4,1);
+ v0ASec4->AddNode(v0L2Sec4,1);
+ v0ASec4->AddNode(v0L3Sec4,1);
+ v0ASec4->AddNode(v0L4Sec4,1);
+
+ /// Segment of octagon
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = fV0AR6-fV0AOctH2; v0APts[1+8*i] = 0.;
+ v0APts[2+8*i] = (fV0AR6-fV0AOctH2)*sin45; v0APts[3+8*i] = (fV0AR6-fV0AOctH2)*sin45;
+ v0APts[4+8*i] = fV0AR6*sin45; v0APts[5+8*i] = fV0AR6*sin45;
+ v0APts[6+8*i] = fV0AR6; v0APts[7+8*i] = 0.;
+ }
+ new TGeoArb8("sV0AOct2Sec4", (fV0ASciWd+2*fV0AOctWd)/2., v0APts);
+ TGeoCompositeShape *sV0AOct2FEEBSec4 = new TGeoCompositeShape("sV0AOct2FEEBSec4","sV0AOct2Sec4-sV0AFicFEEBSec4:posFicFEEBSec4-sV0AFicFEEBSec4:posFicFEEBUpSec4-sV0AFicOct2Sec4:posFicOct2Sec4-sV0AFicOct2Sec4:posFicOct2UpSec4");
+ TGeoVolume *v0AOct2Sec4 = new TGeoVolume("V0AOct2Sec4", sV0AOct2FEEBSec4,medV0ASup);
+ v0AOct2Sec4->SetLineColor(kV0AColorOct);
+ TGeoVolume *v0ASupSec4 = new TGeoVolumeAssembly("V0ASupSec4");
+ v0ASupSec4->AddNode(v0AOct2Sec4,1);
+ v0ASec4->AddNode(v0ASupSec4,1);
+
+ //Bunch of fibers
+ v0APts[ 0] = v0APts[ 2] = -13.0;
+ v0APts[ 1] = v0APts[ 7] = (fV0ASciWd+fV0AOctWd)/2.-0.01;
+ v0APts[ 3] = v0APts[ 5] = (fV0ASciWd+fV0AOctWd)/2.+0.01;
+ v0APts[ 4] = v0APts[ 6] = +13.0;
+ v0APts[ 8] = v0APts[10] = -10.0;
+ v0APts[ 9] = v0APts[15] = 0.;
+ v0APts[11] = v0APts[13] = 0.25;
+ v0APts[12] = v0APts[14] = +10.0;
+ new TGeoArb8("sV0AFib1Sec4", 11.5, v0APts);
+ rot = new TGeoRotation("rot");
+ rot->RotateX(-90);
+ rot->RotateZ(-90.+22.5);
+ TGeoCombiTrans *fibpos1Sec4 = new TGeoCombiTrans("fibpos1Sec4", (fV0AR6-fV0AOctH2+fV0AR5)*cos225/2. - 3.8, (fV0AR6-fV0AOctH2+fV0AR5)*sin225/2.-1.8, 0, rot);
+ fibpos1Sec4->RegisterYourself();
+ TGeoCompositeShape *sV0AFib1HoleSec4 = new TGeoCompositeShape("sV0AFib1HoleSec4","sV0AFib1Sec4:fibpos1Sec4-sV0AFicR5Sec4");
+ TGeoVolume *v0AFib1HoleSec4 = new TGeoVolume("V0AFib1HoleSec4",sV0AFib1HoleSec4,medV0AFib);
+ v0AFib1HoleSec4->SetLineColor(kV0AColorFib);
+ new TGeoArb8("sV0AFib2Sec4", 11.5, v0APts);
+ rot = new TGeoRotation("rot");
+ rot->RotateX(-90);
+ rot->RotateY(180);
+ rot->RotateZ(-90.+22.5);
+ TGeoCombiTrans *fibpos2Sec4 = new TGeoCombiTrans("fibpos2Sec4", (fV0AR6-fV0AOctH2+fV0AR5)*cos225/2. - 3.8, (fV0AR6-fV0AOctH2+fV0AR5)*sin225/2.-1.8, 0, rot);
+ fibpos2Sec4->RegisterYourself();
+ TGeoCompositeShape *sV0AFib2HoleSec4 = new TGeoCompositeShape("sV0AFib2HoleSec4","sV0AFib2Sec4:fibpos2Sec4-sV0AFicR5Sec4");
+ TGeoVolume *v0AFib2HoleSec4 = new TGeoVolume("V0AFib2HoleSec4",sV0AFib2HoleSec4,medV0AFib);
+ v0AFib2HoleSec4->SetLineColor(kV0AColorFib);
+ TGeoVolume *v0AFibSec4 = new TGeoVolumeAssembly("V0AFibSec4");
+ v0AFibSec4->AddNode(v0AFib1HoleSec4,1);
+ v0AFibSec4->AddNode(v0AFib2HoleSec4,1);
+ v0ASec4->AddNode(v0AFibSec4,1);
+
+ /// Plates
+ new TGeoTube("sV0ANail1PlaInHoleSec4", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.);
+ new TGeoTube("sV0ANail2PlaInHoleSec4", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.);
+ new TGeoCompositeShape("sV0ANailsPlaInHolesSec4","sV0ANail1PlaInHoleSec4:pos1Sec4+sV0ANail2PlaInHoleSec4:pos2Sec4");
+ new TGeoTube("sV0ANail1PlaOuHoleSec4", 0.0, 0.4, (fV0APlaAl)/2.);
+ new TGeoTube("sV0ANail2PlaOuHoleSec4", 0.0, 0.4, (fV0APlaAl)/2.);
+ new TGeoCompositeShape("sV0ANailsPlaOuHolesSec4","sV0ANail1PlaOuHoleSec4:pos1Sec4+sV0ANail2PlaOuHoleSec4:pos2Sec4");
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = fV0AR0; v0APts[1+8*i] = 0.;
+ v0APts[2+8*i] = fV0AR0*sin45; v0APts[3+8*i] = fV0AR0*sin45;
+ v0APts[4+8*i] = fV0AR6 * sin45; v0APts[5+8*i] = fV0AR6*sin45;
+ v0APts[6+8*i] = fV0AR6; v0APts[7+8*i] = 0.;
+ }
+ new TGeoArb8("sV0APlaInSec4", (fV0APlaWd-2*fV0APlaAl)/2., v0APts);
+ TGeoCompositeShape *sV0APlaInNailsHolesSec4 = new TGeoCompositeShape("sV0APlaInNailsHolesSec4","sV0APlaInSec4-sV0ANailsPlaInHolesSec4-sV0AFicFEEBSec4:posFicFEEBSec4-sV0AFicFEEBSec4:posFicFEEBUpSec4");
+ TGeoVolume *v0APlaInNailsHolesSec4 = new TGeoVolume("V0APlaInNailsHolesSec4", sV0APlaInNailsHolesSec4, medV0APlaIn);
+ new TGeoArb8("sV0APlaOuSec4", fV0APlaAl/2., v0APts);
+ TGeoCompositeShape *sV0APlaOuNailsHolesSec4 = new TGeoCompositeShape("sV0APlaOuNailsHolesSec4","sV0APlaOuSec4-sV0ANailsPlaOuHolesSec4-sV0AFicFEEBSec4:posFicFEEBSec4-sV0AFicFEEBSec4:posFicFEEBUpSec4");
+ TGeoVolume *v0APlaOuNailsHolesSec4 = new TGeoVolume("V0APlaOuNailsHolesSec4", sV0APlaOuNailsHolesSec4, medV0APlaOu);
+ v0APlaInNailsHolesSec4->SetLineColor(kV0AColorPlaIn); v0APlaOuNailsHolesSec4->SetLineColor(kV0AColorPlaOu);
+ TGeoVolume *v0APlaSec4 = new TGeoVolumeAssembly("V0APlaSec4");
+ v0APlaSec4->AddNode(v0APlaInNailsHolesSec4,1);
+ v0APlaSec4->AddNode(v0APlaOuNailsHolesSec4,1,new TGeoTranslation(0,0,(fV0APlaWd-fV0APlaAl)/2.));
+ v0APlaSec4->AddNode(v0APlaOuNailsHolesSec4,2,new TGeoTranslation(0,0,-(fV0APlaWd-fV0APlaAl)/2.));
+ v0ASec4->AddNode(v0APlaSec4,1,new TGeoTranslation(0,0,(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.));
+ v0ASec4->AddNode(v0APlaSec4,2,new TGeoTranslation(0,0,-(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.));
+
+ /// Non-sensitive scintilator
+ new TGeoTubeSeg("sV0AR5S2Sec4", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2.+2*preShapeSec4, 0, 45);
+ TGeoCompositeShape *sV0AR5Sec4 = new TGeoCompositeShape("V0AR5Sec4","sV0AR5S2Sec4 - sV0AChaSec4");
+ TGeoVolume *v0AR5Sec4 = new TGeoVolume("V0AR5Sec4",sV0AR5Sec4,medV0ASci);
+ v0AR5Sec4->SetLineColor(kV0AColorSci);
+ v0ASciSec4->AddNode(v0AR5Sec4,1);
+ v0ASec4->AddNode(v0ASciSec4,1);
+
+ /// PMBox
+ TGeoVolume* v0APMSec4 = new TGeoVolumeAssembly("V0APMSec4");
+ new TGeoBBox("sV0APMB1Sec4", fV0APMBWd/2., fV0APMBHt/2., fV0APMBTh/2.);
+ new TGeoBBox("sV0APMB2Sec4", fV0APMBWd/2.-fV0APMBWdW, fV0APMBHt/2.-fV0APMBHtW, fV0APMBTh/2.-fV0APMBThW);
+ TGeoCompositeShape *sV0APMBSec4 = new TGeoCompositeShape("sV0APMBSec4","sV0APMB1Sec4-sV0APMB2Sec4");
+ TGeoVolume *v0APMBSec4 = new TGeoVolume("V0APMBSec4",sV0APMBSec4, medV0APMAlum);
+ v0APMBSec4->SetLineColor(kV0AColorPMA);
+ v0APMSec4->AddNode(v0APMBSec4,1);