+
+ //Definition of sector 5
+ TGeoVolume *v0ASec5 = new TGeoVolumeAssembly("V0ASec5");
+
+ /// For boolean sustraction
+ double preShape5 = 0.2;
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = -fV0AR0+fV0AFraWd/2.; v0APts[1+8*i] = fV0AFraWd/2.;
+ v0APts[2+8*i] = -fV0AR0+fV0AFraWd/2.; v0APts[3+8*i] = -2*preShape5;
+ v0APts[4+8*i] = -fV0AR4-fV0AFraWd/2.-preShape5; v0APts[5+8*i] = -2*preShape5;
+ v0APts[6+8*i] = -fV0AR4-fV0AFraWd/2.-preShape5; v0APts[7+8*i] = fV0AFraWd/2.;
+ }
+ new TGeoArb8("sV0ACha15",fV0ASciWd/1.5,v0APts);
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = -fV0AR0*cos45+preShape;
+ v0APts[1+8*i] = -(fV0AR0-fV0AFraWd)*sin45+preShape;
+ v0APts[2+8*i] = -(fV0AR0-fV0AFraWd/2.)*cos45+preShape;
+ v0APts[3+8*i] = -(fV0AR0-fV0AFraWd/2.)*sin45;
+ v0APts[4+8*i] = -(fV0AR4+fV0AFraWd/2.)*cos45-preShape;
+ v0APts[5+8*i] = -(fV0AR4+fV0AFraWd/2.)*sin45-2.*preShape;
+ v0APts[6+8*i] = -(fV0AR4+fV0AFraWd)*cos45-preShape;
+ v0APts[7+8*i] = -fV0AR4*sin45-preShape;
+ }
+ new TGeoArb8("sV0ACha25", fV0ASciWd/2.+2.*preShape5, v0APts);
+ new TGeoCompositeShape("sV0ACha125","sV0ACha15+sV0ACha25");
+ new TGeoTube("sV0ANail15Hole", 0.0, 0.4, 1.65);
+ TGeoTranslation *pos15 = new TGeoTranslation("pos15", -42.9, -0.51, 0.0);
+ pos15->RegisterYourself();
+ new TGeoTube("sV0ANail25Hole", 0.0, 0.4, 1.65);
+ TGeoTranslation *pos25 = new TGeoTranslation("pos25",-30.8,-30.04,0.0);
+ pos25->RegisterYourself();
+ TGeoTranslation *pos35 = new TGeoTranslation("pos35",-30.05,-30.79,0.0);
+ pos35->RegisterYourself();
+ new TGeoCompositeShape("sV0ANailsHoles5","sV0ANail15Hole:pos15+sV0ANail25Hole:pos25");
+ new TGeoCompositeShape("sV0ACha5","sV0ACha125+sV0ANailsHoles5");
+ new TGeoTubeSeg("sV0AFicR55", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2. +2*preShape, 180.0, 225.0);
+ new TGeoTube("sV0ANail1PlaInHole5", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.);
+ new TGeoTube("sV0ANail2PlaInHole5", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.);
+ new TGeoTube("sV0ANail3PlaInHole5", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.);
+ new TGeoCompositeShape("sV0ANailsPlaInHoles5","sV0ANail1PlaInHole5:pos15+sV0ANail2PlaInHole5:pos25+sV0ANail3PlaInHole5:pos35");
+ new TGeoTube("sV0ANail1PlaOuHole5", 0.0, 0.4, (fV0APlaAl)/2.);
+ new TGeoTube("sV0ANail2PlaOuHole5", 0.0, 0.4, (fV0APlaAl)/2.);
+ new TGeoTube("sV0ANail3PlaOuHole5", 0.0, 0.4, (fV0APlaAl)/2.);
+ new TGeoCompositeShape("sV0ANailsPlaOuHoles5","sV0ANail1PlaOuHole5:pos15+sV0ANail2PlaOuHole5:pos25+sV0ANail3PlaOuHole5:pos35");
+
+ /// Frame
+ TGeoVolume *v0AFra5 = new TGeoVolumeAssembly("V0AFra5");
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = -fV0AR0+fV0AFraWd/2.; v0APts[1+8*i] = 0.0;
+ v0APts[2+8*i] = -fV0AR0+fV0AFraWd/2.; v0APts[3+8*i] = -fV0AFraWd/8.;
+ v0APts[4+8*i] = -fV0AR4-fV0AFraWd/2.; v0APts[5+8*i] = -fV0AFraWd/8.;
+ v0APts[6+8*i] = -fV0AR4-fV0AFraWd/2.; v0APts[7+8*i] = 0.0;
+ }
+ TGeoArb8 *sV0AFraB15 = new TGeoArb8("sV0AFraB15",fV0ASciWd/2.,v0APts);
+ TGeoVolume *v0AFraB15 = new TGeoVolume("V0AFraB15",sV0AFraB15,medV0AFra);
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = -fV0AR0*cos45;
+ v0APts[1+8*i] = -(fV0AR0-fV0AFraWd)*sin45;
+ v0APts[2+8*i] = -(fV0AR0-fV0AFraWd/2.)*cos45;
+ v0APts[3+8*i] = -(fV0AR0-fV0AFraWd/2.)*sin45;
+ v0APts[4+8*i] = -(fV0AR4+fV0AFraWd/2.)*cos45;
+ v0APts[5+8*i] = -(fV0AR4+fV0AFraWd/2.)*sin45;
+ v0APts[6+8*i] = -(fV0AR4+fV0AFraWd)*cos45;
+ v0APts[7+8*i] = -fV0AR4*sin45;
+ }
+ TGeoArb8 *sV0AFraB25 = new TGeoArb8("sV0AFraB25", fV0ASciWd/2., v0APts);
+ TGeoVolume *v0AFraB25 = new TGeoVolume("V0AFraB25",sV0AFraB25,medV0AFra);
+ v0AFraB15->SetLineColor(kV0AColorFra); v0AFraB25->SetLineColor(kV0AColorFra);
+ v0AFra5->AddNode(v0AFraB15,1);
+ v0AFra5->AddNode(v0AFraB25,1); // Prefer 2 GeoObjects insted of 3 GeoMovements
+ new TGeoTubeSeg( "sV0AFraR1b5", fV0AR0-fV0AFraWd/2.,
+ fV0AR0+fV0AFraWd/2., fV0ASciWd/2., 180.0, 225.0);
+ new TGeoTubeSeg( "sV0AFraR2b5", fV0AR1-fV0AFraWd/2.,
+ fV0AR1+fV0AFraWd/2., fV0ASciWd/2., 180.0, 225.0);
+ new TGeoTubeSeg( "sV0AFraR3b5", fV0AR2-fV0AFraWd/2.,
+ fV0AR2+fV0AFraWd/2., fV0ASciWd/2., 180.0, 225.0);
+ new TGeoTubeSeg( "sV0AFraR4b5", fV0AR3-fV0AFraWd/2.,
+ fV0AR3+fV0AFraWd/2., fV0ASciWd/2., 180.0, 225.0);
+ new TGeoTubeSeg( "sV0AFraR5b5", fV0AR4-fV0AFraWd/2.,
+ fV0AR4+fV0AFraWd/2., fV0ASciWd/2., 180.0, 225.0);
+ TGeoCompositeShape *sV0AFraR15 = new TGeoCompositeShape("sV0AFraR15","sV0AFraR1b5-sV0ACha5");
+ TGeoCompositeShape *sV0AFraR25 = new TGeoCompositeShape("sV0AFraR25","sV0AFraR2b5-sV0ACha5");
+ TGeoCompositeShape *sV0AFraR35 = new TGeoCompositeShape("sV0AFraR35","sV0AFraR3b5-sV0ACha5");
+ TGeoCompositeShape *sV0AFraR45 = new TGeoCompositeShape("sV0AFraR45","sV0AFraR4b5-sV0ACha5");
+ TGeoCompositeShape *sV0AFraR55 = new TGeoCompositeShape("sV0AFraR55","sV0AFraR5b5-sV0ACha5");
+ TGeoVolume *v0AFraR15 = new TGeoVolume("V0AFraR15",sV0AFraR15,medV0AFra);
+ TGeoVolume *v0AFraR25 = new TGeoVolume("V0AFraR25",sV0AFraR25,medV0AFra);
+ TGeoVolume *v0AFraR35 = new TGeoVolume("V0AFraR35",sV0AFraR35,medV0AFra);
+ TGeoVolume *v0AFraR45 = new TGeoVolume("V0AFraR45",sV0AFraR45,medV0AFra);
+ TGeoVolume *v0AFraR55 = new TGeoVolume("V0AFraR55",sV0AFraR55,medV0AFra);
+ v0AFraR15->SetLineColor(kV0AColorFra); v0AFraR25->SetLineColor(kV0AColorFra);
+ v0AFraR35->SetLineColor(kV0AColorFra); v0AFraR45->SetLineColor(kV0AColorFra);
+ v0AFraR55->SetLineColor(kV0AColorFra);
+ v0AFra5->AddNode(v0AFraR15,1);
+ v0AFra5->AddNode(v0AFraR25,1);
+ v0AFra5->AddNode(v0AFraR35,1);
+ v0AFra5->AddNode(v0AFraR45,1);
+ v0AFra5->AddNode(v0AFraR55,1);
+ v0ASec5->AddNode(v0AFra5,1);
+
+ /// Sensitive scintilator
+ TGeoVolume *v0ASci5 = new TGeoVolumeAssembly("V0ASci5");
+ new TGeoTubeSeg( "sV0AR1b5", fV0AR0+fV0AFraWd/2.,
+ fV0AR1-fV0AFraWd/2., fV0ASciWd/2., 180.0, 225.0);
+ new TGeoTubeSeg( "sV0AR2b5", fV0AR1+fV0AFraWd/2.,
+ fV0AR2-fV0AFraWd/2., fV0ASciWd/2., 180.0, 225.0);
+ new TGeoTubeSeg( "sV0AR3b5", fV0AR2+fV0AFraWd/2.,
+ fV0AR3-fV0AFraWd/2., fV0ASciWd/2., 180.0, 225.0);
+ new TGeoTubeSeg( "sV0AR4b5", fV0AR3+fV0AFraWd/2.,
+ fV0AR4-fV0AFraWd/2., fV0ASciWd/2., 180.0, 225.0);
+ TGeoCompositeShape *sV0AR15 = new TGeoCompositeShape("sV0AR15","sV0AR1b5-sV0ACha5");
+ TGeoCompositeShape *sV0AR25 = new TGeoCompositeShape("sV0AR25","sV0AR2b5-sV0ACha5");
+ TGeoCompositeShape *sV0AR35 = new TGeoCompositeShape("sV0AR35","sV0AR3b5-sV0ACha5");
+ TGeoCompositeShape *sV0AR45 = new TGeoCompositeShape("sV0AR45","sV0AR4b5-sV0ACha5");
+ TGeoVolume *v0L15 = new TGeoVolume("V0L15",sV0AR15,medV0ASci);
+ TGeoVolume *v0L25 = new TGeoVolume("V0L25",sV0AR25,medV0ASci);
+ TGeoVolume *v0L35 = new TGeoVolume("V0L35",sV0AR35,medV0ASci);
+ TGeoVolume *v0L45 = new TGeoVolume("V0L45",sV0AR45,medV0ASci);
+ v0L15->SetLineColor(kV0AColorSci); v0L25->SetLineColor(kV0AColorSci);
+ v0L35->SetLineColor(kV0AColorSci); v0L45->SetLineColor(kV0AColorSci);
+ v0ASci5->AddNode(v0L15,1);
+ v0ASci5->AddNode(v0L25,1);
+ v0ASci5->AddNode(v0L35,1);
+ v0ASci5->AddNode(v0L45,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] = -(fV0AR7-fV0AOctH2)*cos654; v0APts[3+8*i] = -(fV0AR7-fV0AOctH2)*sin654;
+ v0APts[4+8*i] = -fV0AR7*cos654; v0APts[5+8*i] = -fV0AR7*sin654;
+ v0APts[6+8*i] = -fV0AR6; v0APts[7+8*i] = 0.;
+ }
+ TGeoArb8 *sV0AOct25 = new TGeoArb8("sV0AOct25", (fV0ASciWd+2*fV0AOctWd)/2., v0APts);
+ TGeoVolume *v0AOct25 = new TGeoVolume("V0AOct25", sV0AOct25,medV0ASup);
+ v0AOct25->SetLineColor(kV0AColorOct);
+ TGeoVolume *v0ASup5 = new TGeoVolumeAssembly("V0ASup5");
+ v0ASup5->AddNode(v0AOct25,1);
+ v0ASec5->AddNode(v0ASup5,1);
+
+ //Bunch of fibers
+ v0APts[ 0] = v0APts[ 2] = -14.0;
+ v0APts[ 1] = v0APts[ 7] = (fV0ASciWd+fV0AOctWd)/2.-0.01;
+ v0APts[ 3] = v0APts[ 5] = (fV0ASciWd+fV0AOctWd)/2.+0.01;
+ v0APts[ 4] = v0APts[ 6] = +14.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("sV0AFib15", 11.8, v0APts);
+ rot = new TGeoRotation("rot");
+ rot->RotateX(-90);
+ rot->RotateZ(90+22.5);
+ TGeoCombiTrans *fib15pos = new TGeoCombiTrans("fib15pos", -(fV0AR6-fV0AOctH2+fV0AR5)*cos225/2. +
+ 3.3, -(fV0AR6-fV0AOctH2+fV0AR5)*sin225/2. + 1.5, 0, rot);
+ fib15pos->RegisterYourself();
+ TGeoCompositeShape *sV0AFib15Hole = new TGeoCompositeShape("sV0AFib15Hole", "sV0AFib15:fib15pos-sV0AFicR55");
+ TGeoVolume *v0AFib15Hole = new TGeoVolume("V0AFib15",sV0AFib15Hole,medV0AFib);
+ v0AFib15Hole->SetLineColor(kV0AColorFib);
+ new TGeoArb8("sV0AFib25", 11.8, v0APts);
+ rot = new TGeoRotation("rot");
+ rot->RotateX(-90);
+ rot->RotateY(180);
+ rot->RotateZ(90+22.5);
+ TGeoCombiTrans *fib25pos = new TGeoCombiTrans("fib25pos", -(fV0AR6-fV0AOctH2+fV0AR5)*cos225/2. +
+ 3.3, -(fV0AR6-fV0AOctH2+fV0AR5)*sin225/2. + 1.5, 0, rot);
+ fib25pos->RegisterYourself();
+ TGeoCompositeShape *sV0AFib25Hole = new TGeoCompositeShape("sV0AFib25Hole","sV0AFib25:fib25pos-sV0AFicR55");
+ TGeoVolume *v0AFib25Hole = new TGeoVolume("V0AFib25Hole",sV0AFib25Hole,medV0AFib);
+ v0AFib25Hole->SetLineColor(kV0AColorFib);
+ TGeoVolume *v0AFib5 = new TGeoVolumeAssembly("V0AFib5");
+ v0AFib5->AddNode(v0AFib15Hole,1);
+ v0AFib5->AddNode(v0AFib25Hole,1);
+ v0ASec5->AddNode(v0AFib5,1);
+
+ /// Non-sensitive scintilator
+ new TGeoTubeSeg("sV0AR5S25", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2.+2*preShape, 180.0, 225.0);
+ TGeoCompositeShape *sV0AR55 = new TGeoCompositeShape("V0AR55","sV0AR5S25 - sV0ACha5");
+ TGeoVolume *v0AR55 = new TGeoVolume("V0AR55",sV0AR55,medV0ASci);
+ v0AR55->SetLineColor(kV0AColorSci);
+ v0ASci5->AddNode(v0AR55,1);
+ v0ASec5->AddNode(v0ASci5,1);
+
+ /// Plates
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = -fV0AR0; v0APts[1+8*i] = 0.;
+ v0APts[2+8*i] = -fV0AR0*cos654; v0APts[3+8*i] = -fV0AR0*sin654;
+ v0APts[4+8*i] = -fV0AR7*cos654; v0APts[5+8*i] = -fV0AR7*sin654;
+ v0APts[6+8*i] = -fV0AR6; v0APts[7+8*i] = 0.;
+ }
+ new TGeoArb8("sV0APlaIn5", (fV0APlaWd-2*fV0APlaAl)/2., v0APts);
+ TGeoCompositeShape *sV0APlaInNailsHoles5 = new TGeoCompositeShape("sV0APlaInNailsHoles5","sV0APlaIn5-sV0ANailsPlaInHoles5");
+ TGeoVolume *v0APlaInNailsHoles5 = new TGeoVolume("V0APlaInNailsHoles5", sV0APlaInNailsHoles5, medV0APlaIn);
+ new TGeoArb8("sV0APlaOu5", fV0APlaAl/2., v0APts);
+ TGeoCompositeShape *sV0APlaOuNailsHoles5 = new TGeoCompositeShape("sV0APlaOuNailsHoles5","sV0APlaOu5-sV0ANailsPlaOuHoles5");
+ TGeoVolume *v0APlaOuNailsHoles5 = new TGeoVolume("V0APlaOuNailsHoles5", sV0APlaOuNailsHoles5, medV0APlaOu);
+ v0APlaInNailsHoles5->SetLineColor(kV0AColorPlaIn); v0APlaOuNailsHoles5->SetLineColor(kV0AColorPlaOu);
+ TGeoVolume *v0APla5 = new TGeoVolumeAssembly("V0APla5");
+ v0APla5->AddNode(v0APlaInNailsHoles5,1);
+ v0APla5->AddNode(v0APlaOuNailsHoles5,1,new TGeoTranslation(0,0,(fV0APlaWd-fV0APlaAl)/2.));
+ v0APla5->AddNode(v0APlaOuNailsHoles5,2,new TGeoTranslation(0,0,-(fV0APlaWd-fV0APlaAl)/2.));
+ v0ASec5->AddNode(v0APla5,1,new TGeoTranslation(0,0,(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.));
+ v0ASec5->AddNode(v0APla5,2,new TGeoTranslation(0,0,-(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.));
+
+ /// PMBox
+ TGeoVolume* v0APM5 = new TGeoVolumeAssembly("V0APM5");
+ new TGeoBBox("sV0APMB15", fV0APMBWd/2., fV0APMBHt/2., fV0APMBTh/2.);
+ new TGeoBBox("sV0APMB25", fV0APMBWd/2.-fV0APMBWdW, fV0APMBHt/2.-fV0APMBHtW, fV0APMBTh/2.-fV0APMBThW);
+ TGeoCompositeShape *sV0APMB5 = new TGeoCompositeShape("sV0APMB5","sV0APMB15-sV0APMB25");
+ TGeoVolume *v0APMB5 = new TGeoVolume("V0APMB5",sV0APMB5, medV0APMAlum);
+ v0APMB5->SetLineColor(kV0AColorPMA);
+ v0APM5->AddNode(v0APMB5,1);
+
+ /// PMTubes
+ TGeoTube *sV0APMT15 = new TGeoTube("sV0APMT15", fV0APMTR1, fV0APMTR2, fV0APMTH/2.);
+ TGeoVolume *v0APMT15 = new TGeoVolume("V0APMT15", sV0APMT15, medV0APMGlass);
+ TGeoTube *sV0APMT25 = new TGeoTube("sV0APMT25", fV0APMTR3, fV0APMTR4, fV0APMTH/2.);
+ TGeoVolume *v0APMT25 = new TGeoVolume("V0APMT25", sV0APMT25, medV0APMAlum);
+ TGeoVolume *v0APMT5 = new TGeoVolumeAssembly("V0APMT5");
+ TGeoTube *sV0APMTT5 = new TGeoTube("sV0APMTT5", 0., fV0APMTR4, fV0APMTB/2.);
+ TGeoVolume *v0APMTT5 = new TGeoVolume("V0APMTT5", sV0APMTT5, medV0APMAlum);
+ v0APMT5->SetLineColor(kV0AColorPMG);
+ v0APMT25->SetLineColor(kV0AColorPMA);
+ v0APMTT5->SetLineColor(kV0AColorPMA);
+ rot = new TGeoRotation("rot", 90, 0, 180, 0, 90, 90);
+ v0APMT5->AddNode(v0APMT15,1,rot);
+ v0APMT5->AddNode(v0APMT25,1,rot);
+ v0APMT5->AddNode(v0APMTT5,1,new TGeoCombiTrans(0,(fV0APMTH+fV0APMTB)/2.,0,rot));
+ double autoShift5 = (fV0APMBWd-2*fV0APMBWdW)/4.;
+ v0APM5->AddNode(v0APMT5, 1, new TGeoTranslation(-1.5*autoShift5, 0, 0));
+ v0APM5->AddNode(v0APMT5, 2, new TGeoTranslation(-0.5*autoShift5, 0, 0));
+ v0APM5->AddNode(v0APMT5, 3, new TGeoTranslation(+0.5*autoShift5, 0, 0));
+ v0APM5->AddNode(v0APMT5, 4, new TGeoTranslation(+1.5*autoShift5, 0, 0));
+
+ /// PM
+ rot = new TGeoRotation("rot");
+ rot->RotateX(-90+30);
+ rot->RotateY(0);
+ rot->RotateZ(-65-3);
+ double cosAngPMB5 = TMath::Cos(fV0APMBAng*TMath::DegToRad());
+ double sinAngPMB5 = TMath::Sin(fV0APMBAng*TMath::DegToRad());
+ double shiftZ5 = fV0APMBHt/2. * cosAngPMB5
+ - ( fV0ASciWd + 2 * fV0AOctWd + 2 * fV0APlaWd )/2. - fV0APMBTh/2. * sinAngPMB5;
+ double shiftR5 = fV0AR6 + fV0AOctH2 + fV0APlaAl;
+ v0ASec5->AddNode(v0APM5,1, new TGeoCombiTrans( -shiftR5*cos225-1.3, -shiftR5*sin225, shiftZ5, rot));
+
+ // Aluminium nails
+ TGeoTube *sV0ANail51 = new TGeoTube("sV0ANail51", 0.0, 0.4, 5.09/2.);
+ TGeoVolume *v0ANail51 = new TGeoVolume("V0ANail51", sV0ANail51, medV0APMAlum);
+ v0ANail51->SetLineColor(kV0AColorPMA);// this is the color for aluminium
+ v0ASec5->AddNode(v0ANail51,1,new TGeoTranslation(-42.9,-0.51,0.0));
+ TGeoTube *sV0ANail52 = new TGeoTube("sV0ANail52", 0.0, 0.4, 5.09/2.);
+ TGeoVolume *v0ANail52 = new TGeoVolume("V0ANail52", sV0ANail52, medV0APMAlum);
+ v0ANail52->SetLineColor(kV0AColorPMA);
+ v0ASec5->AddNode(v0ANail52,1,new TGeoTranslation(-30.8,-30.04,0.0));
+
+ // Adding sector to v0LE volume
+ v0LE->AddNode(v0ASec5, 1);
+
+
+ //Definition of sector 6
+ TGeoVolume *v0ASec6 = new TGeoVolumeAssembly("V0ASec6");
+
+ /// For boolean sustraction
+ double preShape6 = 0.2;
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = -preShape6; v0APts[1+8*i] = -fV0AR0+fV0AFraWd/2.-preShape6;
+ v0APts[2+8*i] = 0.0; v0APts[3+8*i] = -fV0AR0+fV0AFraWd/2.-preShape6;
+ v0APts[4+8*i] = 0.0; v0APts[5+8*i] = -fV0AR4-fV0AFraWd/2.+preShape6;
+ v0APts[6+8*i] = -preShape6; v0APts[7+8*i] = -fV0AR4-fV0AFraWd/2.+preShape6;
+ }
+ new TGeoArb8("sV0ACha16",fV0ASciWd/1.5,v0APts);
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = -fV0AR0*cos45+preShape;
+ v0APts[1+8*i] = -(fV0AR0-fV0AFraWd)*sin45+preShape;
+ v0APts[2+8*i] = -(fV0AR0-fV0AFraWd/2.)*cos45+preShape;
+ v0APts[3+8*i] = -(fV0AR0-fV0AFraWd/2.)*sin45;
+ v0APts[4+8*i] = -(fV0AR4+fV0AFraWd/2.)*cos45-preShape;
+ v0APts[5+8*i] = -(fV0AR4+fV0AFraWd/2.)*sin45-preShape;
+ v0APts[6+8*i] = -(fV0AR4+fV0AFraWd)*cos45-preShape;
+ v0APts[7+8*i] = -fV0AR4*sin45-preShape;
+ }
+ new TGeoArb8("sV0ACha26", fV0ASciWd/2.+2.*preShape, v0APts);
+ new TGeoCompositeShape("sV0ACha126","sV0ACha16+sV0ACha26");
+ new TGeoTube("sV0ANail16Hole", 0.0, 0.4, 1.65);
+ TGeoTranslation *pos16 = new TGeoTranslation("pos16",-0.51,-42.9,0.0);
+ pos16->RegisterYourself();
+ new TGeoTube("sV0ANail26Hole", 0.0, 0.4, 1.65);
+ TGeoTranslation *pos26 = new TGeoTranslation("pos26",-30.05,-30.79,0.0);
+ pos26->RegisterYourself();
+ new TGeoCompositeShape("sV0ANailsHoles6","sV0ANail16Hole:pos16+sV0ANail26Hole:pos26");
+ new TGeoCompositeShape("sV0ACha6","sV0ACha126+sV0ANailsHoles6");
+ new TGeoTubeSeg("sV0AFicR56", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2.+2*preShape, 225, 270.0);
+ new TGeoTube("sV0ANail1PlaInHole6", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.);
+ new TGeoTube("sV0ANail1PlaOuHole6", 0.0, 0.4, (fV0APlaAl)/2.);
+
+ /// Frame
+ TGeoVolume *v0AFra6 = new TGeoVolumeAssembly("V0AFra6");
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = -fV0AFraWd/2.; v0APts[1+8*i] = -fV0AR0-fV0AFraWd/2.;
+ v0APts[2+8*i] = 0.; v0APts[3+8*i] = -fV0AR0-fV0AFraWd/2.;
+ v0APts[4+8*i] = 0.; v0APts[5+8*i] = -fV0AR4+fV0AFraWd/2.;
+ v0APts[6+8*i] = -fV0AFraWd/2.; v0APts[7+8*i] = -fV0AR4+fV0AFraWd/2.;
+ }
+ TGeoArb8 *sV0AFraB16 = new TGeoArb8("sV0AFraB16",fV0ASciWd/2.,v0APts);
+ TGeoVolume *v0AFraB16 = new TGeoVolume("V0AFraB16",sV0AFraB16,medV0AFra);
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = -(fV0AR0+fV0AFraWd/2.)*cos45;
+ v0APts[1+8*i] = -(fV0AR0+fV0AFraWd/2.)*sin45;
+ v0APts[2+8*i] = -fV0AR0*cos45;
+ v0APts[3+8*i] = -(fV0AR0+fV0AFraWd)*sin45;
+ v0APts[4+8*i] = -(fV0AR4-fV0AFraWd/6.)*cos45;
+ v0APts[5+8*i] = -fV0AR4*sin45;
+ v0APts[6+8*i] = -(fV0AR4-fV0AFraWd)*cos45;
+ v0APts[7+8*i] = -(fV0AR4-fV0AFraWd/2.)*sin45;
+ }
+ TGeoArb8 *sV0AFraB26 = new TGeoArb8("sV0AFraB26", fV0ASciWd/2., v0APts);
+ TGeoVolume *v0AFraB26 = new TGeoVolume("V0AFraB26",sV0AFraB26,medV0AFra);
+ v0AFraB16->SetLineColor(kV0AColorFra); v0AFraB26->SetLineColor(kV0AColorFra);
+ v0AFra6->AddNode(v0AFraB16,1);
+ v0AFra6->AddNode(v0AFraB26,1); // Prefer 2 GeoObjects insted of 3 GeoMovements
+ new TGeoTubeSeg( "sV0AFraR1b6", fV0AR0-fV0AFraWd/2.,
+ fV0AR0+fV0AFraWd/2., fV0ASciWd/2., 225.0, 270.0);
+ new TGeoTubeSeg( "sV0AFraR2b6", fV0AR1-fV0AFraWd/2.,
+ fV0AR1+fV0AFraWd/2., fV0ASciWd/2., 225.0, 270.0);
+ new TGeoTubeSeg( "sV0AFraR3b6", fV0AR2-fV0AFraWd/2.,
+ fV0AR2+fV0AFraWd/2., fV0ASciWd/2., 225.0, 270.0);
+ new TGeoTubeSeg( "sV0AFraR4b6", fV0AR3-fV0AFraWd/2.,
+ fV0AR3+fV0AFraWd/2., fV0ASciWd/2., 225.0, 270.0);
+ new TGeoTubeSeg( "sV0AFraR5b6", fV0AR4-fV0AFraWd/2.,
+ fV0AR4+fV0AFraWd/2., fV0ASciWd/2., 225.0, 270.0);
+ TGeoCompositeShape *sV0AFraR16 = new TGeoCompositeShape("sV0AFraR16","sV0AFraR1b6-sV0ACha6");
+ TGeoCompositeShape *sV0AFraR26 = new TGeoCompositeShape("sV0AFraR26","sV0AFraR2b6-sV0ACha6");
+ TGeoCompositeShape *sV0AFraR36 = new TGeoCompositeShape("sV0AFraR36","sV0AFraR3b6-sV0ACha6");
+ TGeoCompositeShape *sV0AFraR46 = new TGeoCompositeShape("sV0AFraR46","sV0AFraR4b6-sV0ACha6");
+ TGeoCompositeShape *sV0AFraR56 = new TGeoCompositeShape("sV0AFraR56","sV0AFraR5b6-sV0ACha6");
+ TGeoVolume *v0AFraR16 = new TGeoVolume("V0AFraR16",sV0AFraR16,medV0AFra);
+ TGeoVolume *v0AFraR26 = new TGeoVolume("V0AFraR26",sV0AFraR26,medV0AFra);
+ TGeoVolume *v0AFraR36 = new TGeoVolume("V0AFraR36",sV0AFraR36,medV0AFra);
+ TGeoVolume *v0AFraR46 = new TGeoVolume("V0AFraR46",sV0AFraR46,medV0AFra);
+ TGeoVolume *v0AFraR56 = new TGeoVolume("V0AFraR56",sV0AFraR56,medV0AFra);
+ v0AFraR16->SetLineColor(kV0AColorFra); v0AFraR26->SetLineColor(kV0AColorFra);
+ v0AFraR36->SetLineColor(kV0AColorFra); v0AFraR46->SetLineColor(kV0AColorFra);
+ v0AFraR56->SetLineColor(kV0AColorFra);
+ v0AFra6->AddNode(v0AFraR16,1);
+ v0AFra6->AddNode(v0AFraR26,1);
+ v0AFra6->AddNode(v0AFraR36,1);
+ v0AFra6->AddNode(v0AFraR46,1);
+ v0AFra6->AddNode(v0AFraR56,1);
+ v0ASec6->AddNode(v0AFra6,1);
+
+ /// Sensitive scintilator
+ TGeoVolume *v0ASci6 = new TGeoVolumeAssembly("V0ASci6");
+ new TGeoTubeSeg( "sV0AR1b6", fV0AR0+fV0AFraWd/2.,
+ fV0AR1-fV0AFraWd/2., fV0ASciWd/2., 225.0, 270.0);
+ new TGeoTubeSeg( "sV0AR2b6", fV0AR1+fV0AFraWd/2.,
+ fV0AR2-fV0AFraWd/2., fV0ASciWd/2., 225.0, 270.0);
+ new TGeoTubeSeg( "sV0AR3b6", fV0AR2+fV0AFraWd/2.,
+ fV0AR3-fV0AFraWd/2., fV0ASciWd/2., 225.0, 270.0);
+ new TGeoTubeSeg( "sV0AR4b6", fV0AR3+fV0AFraWd/2.,
+ fV0AR4-fV0AFraWd/2., fV0ASciWd/2., 225.0, 270.0);
+ TGeoCompositeShape *sV0AR16 = new TGeoCompositeShape("sV0AR16","sV0AR1b6-sV0ACha6");
+ TGeoCompositeShape *sV0AR26 = new TGeoCompositeShape("sV0AR26","sV0AR2b6-sV0ACha6");
+ TGeoCompositeShape *sV0AR36 = new TGeoCompositeShape("sV0AR36","sV0AR3b6-sV0ACha6");
+ TGeoCompositeShape *sV0AR46 = new TGeoCompositeShape("sV0AR46","sV0AR4b6-sV0ACha6");
+ TGeoVolume *v0L16 = new TGeoVolume("V0L16",sV0AR16,medV0ASci);
+ TGeoVolume *v0L26 = new TGeoVolume("V0L26",sV0AR26,medV0ASci);
+ TGeoVolume *v0L36 = new TGeoVolume("V0L36",sV0AR36,medV0ASci);
+ TGeoVolume *v0L46 = new TGeoVolume("V0L46",sV0AR46,medV0ASci);
+ v0L16->SetLineColor(kV0AColorSci); v0L26->SetLineColor(kV0AColorSci);
+ v0L36->SetLineColor(kV0AColorSci); v0L46->SetLineColor(kV0AColorSci);
+ v0ASci6->AddNode(v0L16,1);
+ v0ASci6->AddNode(v0L26,1);
+ v0ASci6->AddNode(v0L36,1);
+ v0ASci6->AddNode(v0L46,1);
+
+ // Bunch of fibers
+ for (int i=0;i<2;i++) {
+ v0APts[0+8*i] = -10.0; v0APts[1+8*i] = 13.1;
+ v0APts[2+8*i] = 10.0; v0APts[3+8*i] = 13.1;
+ v0APts[4+8*i] = 8.0; v0APts[5+8*i] = -29.0;
+ v0APts[6+8*i] = -12.0; v0APts[7+8*i] = -12.0;
+ }
+ new TGeoArb8("sV0AFib16", 0.01, v0APts);
+ rot = new TGeoRotation("rot");
+ rot->RotateX(2.0);
+ rot->RotateY(180.0);
+ rot->RotateZ(90+22.5);
+ TGeoCombiTrans *fib16pos = new TGeoCombiTrans("fib16pos", -40.0 + 3.3, -50.0 + 1.5, 0.5, rot);
+ fib16pos->RegisterYourself();
+ TGeoCompositeShape *sV0AFib16Hole = new TGeoCompositeShape("sV0AFib16Hole", "sV0AFib16:fib16pos-sV0AFicR56");
+ TGeoVolume *v0AFib16Hole = new TGeoVolume("V0AFib16Hole",sV0AFib16Hole,medV0AFib);
+ v0AFib16Hole->SetLineColor(kV0AColorFib);
+ new TGeoArb8("sV0AFib26", 0.01, v0APts);
+ rot = new TGeoRotation("rot");
+ rot->RotateX(-2.0);
+ rot->RotateY(180.0);
+ rot->RotateZ(90+22.5);
+ TGeoCombiTrans *fib26pos = new TGeoCombiTrans("fib26pos", -40.0 + 3.3, -50.0 + 1.5, -0.5, rot);
+ fib26pos->RegisterYourself();
+ TGeoCompositeShape *sV0AFib26Hole = new TGeoCompositeShape("sV0AFib26Hole", "sV0AFib26:fib26pos-sV0AFicR56");
+ TGeoVolume *v0AFib26Hole = new TGeoVolume("V0AFib26Hole",sV0AFib26Hole,medV0AFib);
+ v0AFib26Hole->SetLineColor(kV0AColorFib);
+ TGeoVolume *v0AFib6 = new TGeoVolumeAssembly("V0AFib6");
+ v0AFib6->AddNode(v0AFib16Hole,1);
+ v0AFib6->AddNode(v0AFib26Hole,1);
+ v0ASec6->AddNode(v0AFib6,1);
+
+ /// Non-sensitive scintilator
+ new TGeoTubeSeg("sV0AR5S26", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2.+2*preShape, 225.0, 270.0);
+ TGeoCompositeShape *sV0AR56 = new TGeoCompositeShape("V0AR56","sV0AR5S26 - sV0ACha6");
+ TGeoVolume *v0AR56 = new TGeoVolume("V0AR56",sV0AR56,medV0ASci);
+ v0AR56->SetLineColor(kV0AColorSci);
+ v0ASci6->AddNode(v0AR56,1);
+ v0ASec6->AddNode(v0ASci6,1);
+
+ /// Segment of octagon