X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=VZERO%2FAliVZEROv7.cxx;h=37ac5c2ca63f7673dd67303f2c920ed7ba13d17e;hb=1f2bb57ebf57a62b46c78d2ec07b163e78df5a86;hp=aab2646872197f06da717c65b0293c3835e23d31;hpb=2ca4471eef2aff757fa83524e25284db74ad39a4;p=u%2Fmrichter%2FAliRoot.git diff --git a/VZERO/AliVZEROv7.cxx b/VZERO/AliVZEROv7.cxx index aab26468721..37ac5c2ca63 100644 --- a/VZERO/AliVZEROv7.cxx +++ b/VZERO/AliVZEROv7.cxx @@ -23,8 +23,8 @@ // All comments should be sent to Brigitte CHEYNIS: // // b.cheynis@ipnl.in2p3.fr // // Geometry of April 2006 done with ROOT geometrical modeler // -// V0R (now V0C) sits between Z values -89.5 and -84.8 cm // -// V0L (now V0A) sits between Z values +338.5 and +342.5 cm // +// V0R (now V0C) sits between Z values -89.5 and -84.8 cm // +// V0L (now V0A) sits between Z values +325.0 and +330.0 cm // // New coordinate system has been implemented in october 2003 // // Revision of the V0A part by Lizardo Valencia in July 2008 // // // @@ -35,9 +35,10 @@ // --- ROOT libraries --- #include +#include #include -#include #include +#include #include #include @@ -57,6 +58,7 @@ #include "AliVZEROhit.h" #include "AliVZEROv7.h" #include "AliLog.h" +#include "AliTrackReference.h" ClassImp(AliVZEROv7) @@ -79,7 +81,7 @@ AliVZEROv7:: AliVZEROv7():AliVZERO(), fV0CLightAttenuation(0.05), fV0CnMeters(15.0), fV0CFibToPhot(0.3), - fV0AR0(4.2), + fV0AR0(4.2), fV0AR1(7.6), fV0AR2(13.8), fV0AR3(22.7), @@ -112,7 +114,7 @@ AliVZEROv7:: AliVZEROv7():AliVZERO(), fV0APMTB(1.0), fV0AnMeters(fV0AR6*0.01), fV0ALightYield(93.75), - fV0ALightAttenuation(0.05), + fV0ALightAttenuation(0.05), fV0AFibToPhot(0.3), fVersion(7) { @@ -237,12 +239,7 @@ AliVZEROv7::AliVZEROv7(const char *name, const char *title):AliVZERO(name,title) // fV0AnMeters = fV0AR6*0.01; // Tentative value, in meters // fV0AFibToPhot = 0.3; // Attenuation at fiber-photocathode interface } -//_____________________________________________________________________________ -void AliVZEROv7::BuildGeometry() -{ -} - //_____________________________________________________________________________ void AliVZEROv7::CreateGeometry() { @@ -401,20 +398,13 @@ void AliVZEROv7::CreateGeometry() double sin45 = TMath::Sin(pi/4.); // lucky: Sin45=Cos45 double cos45 = TMath::Cos(pi/4.); double v0APts[16]; - //double sin6645 = TMath::Sin(1.16); - //double cos6645 = TMath::Cos(1.16); double sin654 = TMath::Sin(1.14); double cos654 = TMath::Cos(1.14); - double sin65 = TMath::Sin(1.13);//65 - double cos65 = TMath::Cos(1.13); - double sin665 = TMath::Sin(1.16); - double cos665 = TMath::Cos(1.16);//66.5 - + //////////////////////////// /// Definition sector 1 TGeoVolume *v0ASec = new TGeoVolumeAssembly("V0ASec"); - //TGeoCompositeShape *sV0AHole = new TGeoCompositeShape("sV0AHole"); - + /// For boolean sustraction double preShape = 0.2; for (int i=0;i<2;i++) { @@ -440,12 +430,12 @@ void AliVZEROv7::CreateGeometry() TGeoTranslation *pos1 = new TGeoTranslation("pos1", 42.9, 0.51, 0.0); pos1->RegisterYourself(); new TGeoTube("sV0ANail2SciHole", 0.0, 0.4, 1.65); - TGeoTranslation *pos2 = new TGeoTranslation("pos2", 30.8,30.04,0.0); + TGeoTranslation *pos2 = new TGeoTranslation("pos2", 30.73,29.98,0.0); pos2->RegisterYourself(); new TGeoCompositeShape("sV0ANailsSciHoles","sV0ANail1SciHole:pos1+sV0ANail2SciHole:pos2"); new TGeoCompositeShape("sV0ACha","sV0ACha12+sV0ANailsSciHoles"); - - + new TGeoTubeSeg("sV0AFicR5", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2.+2*preShape, 0, 45); + /// Frame TGeoVolume *v0AFra = new TGeoVolumeAssembly("V0AFra"); for (int i=0;i<2;i++) { @@ -470,7 +460,7 @@ void AliVZEROv7::CreateGeometry() TGeoVolume *v0AFraB2 = new TGeoVolume("V0AFraB2",sV0AFraB2,medV0AFra); v0AFraB1->SetLineColor(kV0AColorFra); v0AFraB2->SetLineColor(kV0AColorFra); v0AFra->AddNode(v0AFraB1,1); - v0AFra->AddNode(v0AFraB2,1); // Prefer 2 GeoObjects insted of 3 GeoMovements + v0AFra->AddNode(v0AFraB2,1); new TGeoTubeSeg( "sV0AFraR1b", fV0AR0-fV0AFraWd/2., fV0AR0+fV0AFraWd/2., fV0ASciWd/2., 0, 45); new TGeoTubeSeg( "sV0AFraR2b", fV0AR1-fV0AFraWd/2., @@ -494,13 +484,13 @@ void AliVZEROv7::CreateGeometry() v0AFraR1->SetLineColor(kV0AColorFra); v0AFraR2->SetLineColor(kV0AColorFra); v0AFraR3->SetLineColor(kV0AColorFra); v0AFraR4->SetLineColor(kV0AColorFra); v0AFraR5->SetLineColor(kV0AColorFra); - v0AFra->AddNode(v0AFraR1,1); + v0AFra->AddNode(v0AFraR1,1); v0AFra->AddNode(v0AFraR2,1); v0AFra->AddNode(v0AFraR3,1); v0AFra->AddNode(v0AFraR4,1); v0AFra->AddNode(v0AFraR5,1); v0ASec->AddNode(v0AFra,1); - + /// Sensitive scintilator TGeoVolume *v0ASci = new TGeoVolumeAssembly("V0ASci"); new TGeoTubeSeg( "sV0AR1b", fV0AR0+fV0AFraWd/2., @@ -524,21 +514,9 @@ void AliVZEROv7::CreateGeometry() v0ASec->AddNode(v0L1,1); v0ASec->AddNode(v0L2,1); v0ASec->AddNode(v0L3,1); - v0ASec->AddNode(v0L4,1); + v0ASec->AddNode(v0L4,1); - - /// Non-sensitive scintilator - new TGeoTubeSeg("sV0AR5S2", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2.+2*preShape, 0, 45); - TGeoCompositeShape *sV0AR5 = new TGeoCompositeShape("V0AR5","sV0AR5S2 - sV0ACha"); - TGeoVolume *v0AR5 = new TGeoVolume("V0AR5",sV0AR5,medV0ASci); - v0AR5->SetLineColor(kV0AColorSci); - v0ASci->AddNode(v0AR5,1); - v0ASec->AddNode(v0ASci,1); - - /// Segment of innermost octagon - TGeoVolume *v0ASup = new TGeoVolumeAssembly("V0ASup"); - - /// Segment of outtermost octagon + /// 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; @@ -548,36 +526,44 @@ void AliVZEROv7::CreateGeometry() TGeoArb8 *sV0AOct2 = new TGeoArb8("sV0AOct2", (fV0ASciWd+2*fV0AOctWd)/2., v0APts); TGeoVolume *v0AOct2 = new TGeoVolume("V0AOct2", sV0AOct2,medV0ASup); v0AOct2->SetLineColor(kV0AColorOct); + TGeoVolume *v0ASup = new TGeoVolumeAssembly("V0ASup"); v0ASup->AddNode(v0AOct2,1); v0ASec->AddNode(v0ASup,1); - //Bunch of fibers - v0APts[ 0] = v0APts[ 2] = -14.0; + 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] = +14.0; + 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; - TGeoArb8 *sV0AFib = new TGeoArb8("sV0AFib", 9.0, v0APts); - TGeoVolume *v0AFib1 = new TGeoVolume("V0AFib1",sV0AFib,medV0AFib); - TGeoVolume *v0AFib = new TGeoVolumeAssembly("V0AFib"); + new TGeoArb8("sV0AFib1", 11.5, v0APts); TGeoRotation *rot = new TGeoRotation("rot"); rot->RotateX(-90); rot->RotateZ(-90.+22.5); - v0AFib->AddNode(v0AFib1,1,rot); + TGeoCombiTrans *fibpos1 = new TGeoCombiTrans("fibpos1", (fV0AR6-fV0AOctH2+fV0AR5)*cos225/2. - 3.8, (fV0AR6-fV0AOctH2+fV0AR5)*sin225/2.-1.8, 0, rot); + fibpos1->RegisterYourself(); + TGeoCompositeShape *sV0AFib1Hole = new TGeoCompositeShape("sV0AFib1Hole","sV0AFib1:fibpos1-sV0AFicR5"); + TGeoVolume *v0AFib1Hole = new TGeoVolume("V0AFib1Hole",sV0AFib1Hole,medV0AFib); + v0AFib1Hole->SetLineColor(kV0AColorFib); + new TGeoArb8("sV0AFib2", 11.5, v0APts); rot = new TGeoRotation("rot"); rot->RotateX(-90); rot->RotateY(180); rot->RotateZ(-90.+22.5); - v0AFib->SetLineColor(kV0AColorFib); - v0AFib->AddNode(v0AFib1,2,rot); - v0ASec->AddNode(v0AFib,1,new TGeoTranslation((fV0AR6-fV0AOctH2+fV0AR5)*cos225/2. - 1.0, (fV0AR6-fV0AOctH2+fV0AR5)*sin225/2., 0)); + TGeoCombiTrans *fibpos2 = new TGeoCombiTrans("fibpos2", (fV0AR6-fV0AOctH2+fV0AR5)*cos225/2. - 3.8, (fV0AR6-fV0AOctH2+fV0AR5)*sin225/2.-1.8, 0, rot); + fibpos2->RegisterYourself(); + TGeoCompositeShape *sV0AFib2Hole = new TGeoCompositeShape("sV0AFib2Hole","sV0AFib2:fibpos2-sV0AFicR5"); + TGeoVolume *v0AFib2Hole = new TGeoVolume("V0AFib2Hole",sV0AFib2Hole,medV0AFib); + v0AFib2Hole->SetLineColor(kV0AColorFib); + TGeoVolume *v0AFib = new TGeoVolumeAssembly("V0AFib"); + v0AFib->AddNode(v0AFib1Hole,1); + v0AFib->AddNode(v0AFib2Hole,1); + v0ASec->AddNode(v0AFib,1); - - /// Plates + /// Plates new TGeoTube("sV0ANail1PlaInHole", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.); new TGeoTube("sV0ANail2PlaInHole", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.); new TGeoCompositeShape("sV0ANailsPlaInHoles","sV0ANail1PlaInHole:pos1+sV0ANail2PlaInHole:pos2"); @@ -603,6 +589,14 @@ void AliVZEROv7::CreateGeometry() v0APla->AddNode(v0APlaOuNailsHoles,2,new TGeoTranslation(0,0,-(fV0APlaWd-fV0APlaAl)/2.)); v0ASec->AddNode(v0APla,1,new TGeoTranslation(0,0,(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.)); v0ASec->AddNode(v0APla,2,new TGeoTranslation(0,0,-(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.)); + + /// Non-sensitive scintilator + new TGeoTubeSeg("sV0AR5S2", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2.+2*preShape, 0, 45); + TGeoCompositeShape *sV0AR5 = new TGeoCompositeShape("V0AR5","sV0AR5S2 - sV0ACha"); + TGeoVolume *v0AR5 = new TGeoVolume("V0AR5",sV0AR5,medV0ASci); + v0AR5->SetLineColor(kV0AColorSci); + v0ASci->AddNode(v0AR5,1); + v0ASec->AddNode(v0ASci,1); /// PMBox TGeoVolume* v0APM = new TGeoVolumeAssembly("V0APM"); @@ -653,61 +647,59 @@ void AliVZEROv7::CreateGeometry() TGeoTube *sV0ANail2 = new TGeoTube("sV0ANail2", 0.0, 0.4, 5.09/2.); TGeoVolume *v0ANail2 = new TGeoVolume("V0ANail2", sV0ANail2, medV0APMAlum); v0ANail2->SetLineColor(kV0AColorPMA); - v0ASec->AddNode(v0ANail2,1,new TGeoTranslation(30.8,30.04,0.0)); - - - /// Replicate sectors + v0ASec->AddNode(v0ANail2,1,new TGeoTranslation(30.73,29.98,0.0)); + + /// Replicate sectors and adding sector to v0LE volume TGeoVolume *v0LE = new TGeoVolumeAssembly("V0LE"); for(int i=0; i<4; i++) { - TGeoRotation *rot = new TGeoRotation("rot", 90., i*45., 90., 90.+i*45., 0., 0.); - v0LE->AddNode(v0ASec,i+1,rot); /// modificacion +1 anhadido + TGeoRotation *rotation = new TGeoRotation("rotation", 90., i*45., 90., 90.+i*45., 0., 0.); + v0LE->AddNode(v0ASec,i+1,rotation); } //Upper supports for (int i=0;i<2;i++){ - v0APts[0+8*i] = 0.2; v0APts[1+8*i] = 45.5; - v0APts[2+8*i] = 0.2; v0APts[3+8*i] = 70.5; //70.6 + v0APts[0+8*i] = 0.0; v0APts[1+8*i] = 45.5; + v0APts[2+8*i] = 0.0; v0APts[3+8*i] = 70.4; v0APts[4+8*i] = 4.0; v0APts[5+8*i] = 68.9; v0APts[6+8*i] = 4.0; v0APts[7+8*i] = 45.5; } - TGeoArb8 *sV0ASuppur = new TGeoArb8("sV0ASuppur", 2.0, v0APts); + TGeoArb8 *sV0ASuppur = new TGeoArb8("sV0ASuppur", 1.65, v0APts); TGeoVolume *v0ASuppur = new TGeoVolume("V0ASuppur", sV0ASuppur, medV0ASup); v0ASuppur->SetLineColor(kV0AColorOct); v0LE->AddNode(v0ASuppur,1); for (int i=0;i<2;i++){ - v0APts[0+8*i] = -0.2; v0APts[1+8*i] = 45.3; - v0APts[2+8*i] = -0.2; v0APts[3+8*i] = 70.6; - v0APts[4+8*i] = -4.0; v0APts[5+8*i] = 68.9; - v0APts[6+8*i] = -4.0; v0APts[7+8*i] = 45.3; + v0APts[0+8*i] = -0.0; v0APts[1+8*i] = 70.4; + v0APts[2+8*i] = -0.0; v0APts[3+8*i] = 45.5; + v0APts[4+8*i] = -4.0; v0APts[5+8*i] = 45.5; + v0APts[6+8*i] = -4.0; v0APts[7+8*i] = 68.9; } - TGeoArb8 *sV0ASuppul = new TGeoArb8("sV0ASuppul", 2.0, v0APts); + TGeoArb8 *sV0ASuppul = new TGeoArb8("sV0ASuppul", 1.65, v0APts); TGeoVolume *v0ASuppul = new TGeoVolume("V0ASuppul", sV0ASuppul, medV0ASup); v0ASuppul->SetLineColor(kV0AColorOct); v0LE->AddNode(v0ASuppul,1); - //Definition of sector 5 - - TGeoVolume *v0ASec5 = new TGeoVolumeAssembly("V0ASec5"); + //Definition of sector 5 + TGeoVolume *v0ASec5 = new TGeoVolumeAssembly("V0ASec5"); - /// For boolean sustraction + /// For boolean sustraction double preShape5 = 0.2; for (int i=0;i<2;i++) { - v0APts[0+8*i] = -fV0AR0+fV0AFraWd/2.-preShape5; v0APts[1+8*i] = -preShape5; - v0APts[2+8*i] = -fV0AR0+fV0AFraWd/2.-preShape5; v0APts[3+8*i] = fV0AFraWd/2.; - v0APts[4+8*i] = -fV0AR4-fV0AFraWd/2.+preShape5; v0APts[5+8*i] = fV0AFraWd/2.; - v0APts[6+8*i] = -fV0AR4-fV0AFraWd/2.+preShape5; v0APts[7+8*i] = -preShape5; + 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*cos65; - v0APts[1+8*i] = -(fV0AR0-fV0AFraWd)*sin65; - v0APts[2+8*i] = -(fV0AR0-fV0AFraWd/2.)*cos65; - v0APts[3+8*i] = -(fV0AR0-fV0AFraWd/2.)*sin65; - v0APts[4+8*i] = -(fV0AR4+fV0AFraWd/2.)*cos65; - v0APts[5+8*i] = -(fV0AR4+fV0AFraWd/2.)*sin65; - v0APts[6+8*i] = -(fV0AR4+fV0AFraWd)*cos65; - v0APts[7+8*i] = -fV0AR4*sin65; + 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"); @@ -715,33 +707,41 @@ void AliVZEROv7::CreateGeometry() 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); + TGeoTranslation *pos25 = new TGeoTranslation("pos25",-30.8,-30.04,0.0); pos25->RegisterYourself(); - new TGeoTube("sV0ANail35Hole", 0.0, 0.4, 1.65); - TGeoTranslation *pos35 = new TGeoTranslation("pos35", -30.05,-30.79,0.0); + TGeoTranslation *pos35 = new TGeoTranslation("pos35",-30.05,-30.79,0.0); pos35->RegisterYourself(); - new TGeoCompositeShape("sV0ANailsHoles5","sV0ANail15Hole:pos15+sV0ANail25Hole:pos25+sV0ANail35Hole:pos35"); + 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.; - 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.; - } + 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*cos65; - v0APts[1+8*i] = -(fV0AR0-fV0AFraWd)*sin65; - v0APts[2+8*i] = -(fV0AR0-fV0AFraWd/2.)*cos65; - v0APts[3+8*i] = -(fV0AR0-fV0AFraWd/2.)*sin65; - v0APts[4+8*i] = -(fV0AR4+fV0AFraWd/2.)*cos65; - v0APts[5+8*i] = -(fV0AR4+fV0AFraWd/2.)*sin65; - v0APts[6+8*i] = -(fV0AR4+fV0AFraWd)*cos65; - v0APts[7+8*i] = -fV0AR4*sin65; + 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); @@ -749,15 +749,15 @@ void AliVZEROv7::CreateGeometry() 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, 245.4); + fV0AR0+fV0AFraWd/2., fV0ASciWd/2., 180.0, 225.0); new TGeoTubeSeg( "sV0AFraR2b5", fV0AR1-fV0AFraWd/2., - fV0AR1+fV0AFraWd/2., fV0ASciWd/2., 180.0, 245.4); + fV0AR1+fV0AFraWd/2., fV0ASciWd/2., 180.0, 225.0); new TGeoTubeSeg( "sV0AFraR3b5", fV0AR2-fV0AFraWd/2., - fV0AR2+fV0AFraWd/2., fV0ASciWd/2., 180.0, 245.4); + fV0AR2+fV0AFraWd/2., fV0ASciWd/2., 180.0, 225.0); new TGeoTubeSeg( "sV0AFraR4b5", fV0AR3-fV0AFraWd/2., - fV0AR3+fV0AFraWd/2., fV0ASciWd/2., 180.0, 245.4); + fV0AR3+fV0AFraWd/2., fV0ASciWd/2., 180.0, 225.0); new TGeoTubeSeg( "sV0AFraR5b5", fV0AR4-fV0AFraWd/2., - fV0AR4+fV0AFraWd/2., fV0ASciWd/2., 180.0, 245.4); + 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"); @@ -781,13 +781,13 @@ void AliVZEROv7::CreateGeometry() /// Sensitive scintilator TGeoVolume *v0ASci5 = new TGeoVolumeAssembly("V0ASci5"); new TGeoTubeSeg( "sV0AR1b5", fV0AR0+fV0AFraWd/2., - fV0AR1-fV0AFraWd/2., fV0ASciWd/2., 180.0, 245.4); + fV0AR1-fV0AFraWd/2., fV0ASciWd/2., 180.0, 225.0); new TGeoTubeSeg( "sV0AR2b5", fV0AR1+fV0AFraWd/2., - fV0AR2-fV0AFraWd/2., fV0ASciWd/2., 180.0, 245.4); + fV0AR2-fV0AFraWd/2., fV0ASciWd/2., 180.0, 225.0); new TGeoTubeSeg( "sV0AR3b5", fV0AR2+fV0AFraWd/2., - fV0AR3-fV0AFraWd/2., fV0ASciWd/2., 180.0, 245.4); + fV0AR3-fV0AFraWd/2., fV0ASciWd/2., 180.0, 225.0); new TGeoTubeSeg( "sV0AR4b5", fV0AR3+fV0AFraWd/2., - fV0AR4-fV0AFraWd/2., fV0ASciWd/2., 180.0, 245.4); + 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"); @@ -803,19 +803,8 @@ void AliVZEROv7::CreateGeometry() v0ASci5->AddNode(v0L35,1); v0ASci5->AddNode(v0L45,1); - /// Non-sensitive scintilator - new TGeoTubeSeg("sV0AR5S25", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2.+2*preShape, 180.0, 245.4); - 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); - - /// Segment of innermost octagon - TGeoVolume *v0ASup5 = new TGeoVolumeAssembly("V0ASup5"); - -/// Segment of outtermost octagon - for (int i=0;i<2;i++) { + /// 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; @@ -824,6 +813,7 @@ void AliVZEROv7::CreateGeometry() 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); @@ -836,42 +826,41 @@ void AliVZEROv7::CreateGeometry() v0APts[ 9] = v0APts[15] = 0.; v0APts[11] = v0APts[13] = 0.25; v0APts[12] = v0APts[14] = +10.0; - TGeoArb8 *sV0AFiba5 = new TGeoArb8("sV0AFiba5", 9.0, v0APts); - TGeoVolume *v0AFiba15 = new TGeoVolume("V0AFiba15",sV0AFiba5,medV0AFib); - TGeoVolume *v0AFiba5 = new TGeoVolumeAssembly("V0AFiba5"); + new TGeoArb8("sV0AFib15", 11.8, v0APts); rot = new TGeoRotation("rot"); rot->RotateX(-90); rot->RotateZ(90+22.5); - v0AFiba5->AddNode(v0AFiba15,1,rot); + 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); - v0AFiba5->SetLineColor(kV0AColorFib); - v0AFiba5->AddNode(v0AFiba15,2,rot); - v0ASec5->AddNode(v0AFiba5,1,new TGeoTranslation(-(fV0AR6-fV0AOctH2+fV0AR5)*cos225/2. + 1.5, -(fV0AR6-fV0AOctH2+fV0AR5)*sin225/2. - 1.0, 0)); - for (int i=0;i<2;i++) { - v0APts[0+8*i] = -33.47; v0APts[1+8*i] = -35.13; - v0APts[2+8*i] = -50.48; v0APts[3+8*i] = -46.97; - v0APts[4+8*i] = -44.66; v0APts[5+8*i] = -61.92; - v0APts[6+8*i] = -7.9; v0APts[7+8*i] = -47.18; - } - TGeoArb8 *sV0AFibb5 = new TGeoArb8("sV0AFibb8", 1.25, v0APts); - TGeoVolume *v0AFibb15 = new TGeoVolume("V0AFibb15",sV0AFibb5,medV0AFib); - TGeoVolume *v0AFibb5 = new TGeoVolumeAssembly("V0AFibb5"); - v0AFibb5->AddNode(v0AFibb15,1); - v0AFibb5->SetLineColor(kV0AColorFib); - v0ASec5->AddNode(v0AFibb5,1); + 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 - 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"); + /// 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; @@ -882,7 +871,7 @@ void AliVZEROv7::CreateGeometry() 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"); + 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"); @@ -892,7 +881,7 @@ void AliVZEROv7::CreateGeometry() 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 1ero + /// 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); @@ -901,7 +890,7 @@ void AliVZEROv7::CreateGeometry() v0APMB5->SetLineColor(kV0AColorPMA); v0APM5->AddNode(v0APMB5,1); - /// PMTubes 1ero + /// 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.); @@ -922,7 +911,7 @@ void AliVZEROv7::CreateGeometry() v0APM5->AddNode(v0APMT5, 3, new TGeoTranslation(+0.5*autoShift5, 0, 0)); v0APM5->AddNode(v0APMT5, 4, new TGeoTranslation(+1.5*autoShift5, 0, 0)); - /// PM 1ero + /// PM rot = new TGeoRotation("rot"); rot->RotateX(-90+30); rot->RotateY(0); @@ -934,106 +923,75 @@ void AliVZEROv7::CreateGeometry() double shiftR5 = fV0AR6 + fV0AOctH2 + fV0APlaAl; v0ASec5->AddNode(v0APM5,1, new TGeoCombiTrans( -shiftR5*cos225-1.3, -shiftR5*sin225, shiftZ5, rot)); - - /// PMBox 2do - TGeoVolume* v0APM52 = new TGeoVolumeAssembly("V0APM52"); - new TGeoBBox("sV0APMB151", fV0APMBWd/2., fV0APMBHt/2., fV0APMBTh/2.); - new TGeoBBox("sV0APMB252", fV0APMBWd/2.-fV0APMBWdW, fV0APMBHt/2.-fV0APMBHtW, fV0APMBTh/2.-fV0APMBThW); - TGeoCompositeShape *sV0APMB52 = new TGeoCompositeShape("sV0APMB52","sV0APMB151-sV0APMB252"); - TGeoVolume *v0APMB52 = new TGeoVolume("V0APMB52",sV0APMB52, medV0APMAlum); - v0APMB52->SetLineColor(kV0AColorPMA); - v0APM52->AddNode(v0APMB52,1); - - /// PMTubes 2ndo - TGeoTube *sV0APMT152 = new TGeoTube("sV0APMT152", fV0APMTR1, fV0APMTR2, fV0APMTH/2.); - TGeoVolume *v0APMT152 = new TGeoVolume("V0APMT152", sV0APMT152, medV0APMGlass); - TGeoTube *sV0APMT252 = new TGeoTube("sV0APMT252", fV0APMTR3, fV0APMTR4, fV0APMTH/2.); - TGeoVolume *v0APMT252 = new TGeoVolume("V0APMT252", sV0APMT252, medV0APMAlum); - TGeoVolume *v0APMT52 = new TGeoVolumeAssembly("V0APMT52"); // pk si no se confunde con la 752 o con la 794 - TGeoTube *sV0APMTT52 = new TGeoTube("sV0APMTT52", 0., fV0APMTR4, fV0APMTB/2.); - TGeoVolume *v0APMTT52 = new TGeoVolume("V0APMT52", sV0APMTT52, medV0APMAlum); - v0APMT52->SetLineColor(kV0AColorPMG); - v0APMT252->SetLineColor(kV0AColorPMA); - v0APMTT52->SetLineColor(kV0AColorPMA); - rot = new TGeoRotation("rot", 90, 0, 180, 0, 90, 90); - v0APMT52->AddNode(v0APMT152,1,rot); - v0APMT52->AddNode(v0APMT252,1,rot); - v0APMT52->AddNode(v0APMTT52,1,new TGeoCombiTrans(0,(fV0APMTH+fV0APMTB)/2.,0,rot)); - double autoShift52 = (fV0APMBWd-2*fV0APMBWdW)/4.; - v0APM52->AddNode(v0APMT52, 1, new TGeoTranslation(-1.5*autoShift52, 0, 0)); - v0APM52->AddNode(v0APMT52, 2, new TGeoTranslation(-0.5*autoShift52, 0, 0)); - v0APM52->AddNode(v0APMT52, 3, new TGeoTranslation(+0.5*autoShift52, 0, 0)); - v0APM52->AddNode(v0APMT52, 4, new TGeoTranslation(+1.5*autoShift52, 0, 0)); - - /// PM 2ndo - rot = new TGeoRotation("rot"); - rot->RotateX(-90+30); - rot->RotateY(0); - rot->RotateZ(-65-3); - double cosAngPMB52 = TMath::Cos(fV0APMBAng*TMath::DegToRad()); - double sinAngPMB52 = TMath::Sin(fV0APMBAng*TMath::DegToRad()); - double shiftZ52 = fV0APMBHt/2. * cosAngPMB52 - - ( fV0ASciWd + 2 * fV0AOctWd + 2 * fV0APlaWd )/2. - fV0APMBTh/2. * sinAngPMB52; - double shiftR52 = fV0AR6 + fV0AR1 + fV0AOctWd + fV0APlaAl/3.; - v0ASec5->AddNode(v0APM52,1, new TGeoCombiTrans( -shiftR52*cos45-1.3, -shiftR52*sin45, shiftZ52, 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); - // Replicate sectors - //for(int i=0; i<1; i++) { - //TGeoRotation *rot = new TGeoRotation("rot", 90., i*45., 90., 90.+i*45., 0., 0.); - v0LE->AddNode(v0ASec5, 1); //i + 1,rot); - //} - - - //Definition of sector 6 - + //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] = -fV0AFraWd/2.; v0APts[3+8*i] = -fV0AR0+fV0AFraWd/2.-preShape6; - v0APts[4+8*i] = -fV0AFraWd/2.; v0APts[5+8*i] = -fV0AR4-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*cos665; - v0APts[1+8*i] = -(fV0AR0-fV0AFraWd)*sin665; - v0APts[2+8*i] = -(fV0AR0-fV0AFraWd/2.)*cos665; - v0APts[3+8*i] = -(fV0AR0-fV0AFraWd/2.)*sin665; - v0APts[4+8*i] = -(fV0AR4+fV0AFraWd/2.)*cos665; - v0APts[5+8*i] = -(fV0AR4+fV0AFraWd/2.)*sin665; - v0APts[6+8*i] = -(fV0AR4+fV0AFraWd)*cos665; - v0APts[7+8*i] = -fV0AR4*sin665; + 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 TGeoCompositeShape("sV0ACha6","sV0ACha126+sV0ANail16Hole:pos16"); - + 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] = 0.; v0APts[1+8*i] = -fV0AR0+fV0AFraWd/2.; - v0APts[2+8*i] = -fV0AFraWd/2.; v0APts[3+8*i] = -fV0AR0+fV0AFraWd/2.; - v0APts[4+8*i] = -fV0AFraWd/2.; v0APts[5+8*i] = -fV0AR4-fV0AFraWd/2.; - v0APts[6+8*i] = 0.; v0APts[7+8*i] = -fV0AR4-fV0AFraWd/2.; + 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*cos665; - v0APts[1+8*i] = -(fV0AR0-fV0AFraWd)*sin665; - v0APts[2+8*i] = -(fV0AR0-fV0AFraWd/2.)*cos665; - v0APts[3+8*i] = -(fV0AR0-fV0AFraWd/2.)*sin665; - v0APts[4+8*i] = -(fV0AR4+fV0AFraWd/2.)*cos665; - v0APts[5+8*i] = -(fV0AR4+fV0AFraWd/2.)*sin665; - v0APts[6+8*i] = -(fV0AR4+fV0AFraWd)*cos665; - v0APts[7+8*i] = -fV0AR4*sin665; + 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); @@ -1041,15 +999,15 @@ void AliVZEROv7::CreateGeometry() 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., 245.4, 270.0); + fV0AR0+fV0AFraWd/2., fV0ASciWd/2., 225.0, 270.0); new TGeoTubeSeg( "sV0AFraR2b6", fV0AR1-fV0AFraWd/2., - fV0AR1+fV0AFraWd/2., fV0ASciWd/2., 245.4, 270.0); + fV0AR1+fV0AFraWd/2., fV0ASciWd/2., 225.0, 270.0); new TGeoTubeSeg( "sV0AFraR3b6", fV0AR2-fV0AFraWd/2., - fV0AR2+fV0AFraWd/2., fV0ASciWd/2., 245.4, 270.0); + fV0AR2+fV0AFraWd/2., fV0ASciWd/2., 225.0, 270.0); new TGeoTubeSeg( "sV0AFraR4b6", fV0AR3-fV0AFraWd/2., - fV0AR3+fV0AFraWd/2., fV0ASciWd/2., 245.4, 270.0); + fV0AR3+fV0AFraWd/2., fV0ASciWd/2., 225.0, 270.0); new TGeoTubeSeg( "sV0AFraR5b6", fV0AR4-fV0AFraWd/2., - fV0AR4+fV0AFraWd/2., fV0ASciWd/2., 245.4, 270.0); + 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"); @@ -1073,13 +1031,13 @@ void AliVZEROv7::CreateGeometry() /// Sensitive scintilator TGeoVolume *v0ASci6 = new TGeoVolumeAssembly("V0ASci6"); new TGeoTubeSeg( "sV0AR1b6", fV0AR0+fV0AFraWd/2., - fV0AR1-fV0AFraWd/2., fV0ASciWd/2., 245.4, 270.0); + fV0AR1-fV0AFraWd/2., fV0ASciWd/2., 225.0, 270.0); new TGeoTubeSeg( "sV0AR2b6", fV0AR1+fV0AFraWd/2., - fV0AR2-fV0AFraWd/2., fV0ASciWd/2., 245.4, 270.0); + fV0AR2-fV0AFraWd/2., fV0ASciWd/2., 225.0, 270.0); new TGeoTubeSeg( "sV0AR3b6", fV0AR2+fV0AFraWd/2., - fV0AR3-fV0AFraWd/2., fV0ASciWd/2., 245.4, 270.0); + fV0AR3-fV0AFraWd/2., fV0ASciWd/2., 225.0, 270.0); new TGeoTubeSeg( "sV0AR4b6", fV0AR3+fV0AFraWd/2., - fV0AR4-fV0AFraWd/2., fV0ASciWd/2., 245.4, 270.0); + 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"); @@ -1094,19 +1052,48 @@ void AliVZEROv7::CreateGeometry() 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, 245.4, 270.0); + 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 innermost octagon - TGeoVolume *v0ASup6 = new TGeoVolumeAssembly("V0ASup6"); - - /// Segment of outtermost octagon + /// Segment of octagon for (int i=0;i<2;i++) { v0APts[0+8*i] = 0.; v0APts[1+8*i] = -(fV0AR7-fV0AOctH2)*sin654; v0APts[2+8*i] = 0.; v0APts[3+8*i] = -fV0AR7*sin654; @@ -1116,13 +1103,11 @@ void AliVZEROv7::CreateGeometry() TGeoArb8 *sV0AOct26 = new TGeoArb8("sV0AOct26", (fV0ASciWd+2*fV0AOctWd)/2., v0APts); TGeoVolume *v0AOct26 = new TGeoVolume("V0AOct26", sV0AOct26,medV0ASup); v0AOct26->SetLineColor(kV0AColorOct); + TGeoVolume *v0ASup6 = new TGeoVolumeAssembly("V0ASup6"); v0ASup6->AddNode(v0AOct26,1); v0ASec6->AddNode(v0ASup6,1); - /// Plates - new TGeoTube("sV0ANail1PlaInHole6", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.); - new TGeoTube("sV0ANail1PlaOuHole6", 0.0, 0.4, (fV0APlaAl)/2.); for (int i=0;i<2;i++) { v0APts[0+8*i] = 0.; v0APts[1+8*i] = -fV0AR0; v0APts[2+8*i] = 0.; v0APts[3+8*i] = -fV0AR7*sin654; @@ -1143,22 +1128,69 @@ void AliVZEROv7::CreateGeometry() v0ASec6->AddNode(v0APla6,1,new TGeoTranslation(0,0,(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.)); v0ASec6->AddNode(v0APla6,2,new TGeoTranslation(0,0,-(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.)); + /// PMBox + TGeoVolume* v0APM6 = new TGeoVolumeAssembly("V0APM6"); + new TGeoBBox("sV0APMB16", fV0APMBWd/2., fV0APMBHt/2., fV0APMBTh/2.); + new TGeoBBox("sV0APMB26", fV0APMBWd/2.-fV0APMBWdW, fV0APMBHt/2.-fV0APMBHtW, fV0APMBTh/2.-fV0APMBThW); + TGeoCompositeShape *sV0APMB6 = new TGeoCompositeShape("sV0APMB6","sV0APMB16-sV0APMB26"); + TGeoVolume *v0APMB6 = new TGeoVolume("V0APMB6",sV0APMB6, medV0APMAlum); + v0APMB6->SetLineColor(kV0AColorPMA); + v0APM6->AddNode(v0APMB6,1); + + /// PMTubes + TGeoTube *sV0APMT16 = new TGeoTube("sV0APMT16", fV0APMTR1, fV0APMTR2, fV0APMTH/2.); + TGeoVolume *v0APMT16 = new TGeoVolume("V0APMT16", sV0APMT16, medV0APMGlass); + TGeoTube *sV0APMT26 = new TGeoTube("sV0APMT26", fV0APMTR3, fV0APMTR4, fV0APMTH/2.); + TGeoVolume *v0APMT26 = new TGeoVolume("V0APMT26", sV0APMT26, medV0APMAlum); + TGeoVolume *v0APMT6 = new TGeoVolumeAssembly("V0APMT6"); + TGeoTube *sV0APMTT6 = new TGeoTube("sV0APMTT6", 0., fV0APMTR4, fV0APMTB/2.); + TGeoVolume *v0APMTT6 = new TGeoVolume("V0APMTT6", sV0APMTT6, medV0APMAlum); + v0APMT6->SetLineColor(kV0AColorPMG); + v0APMT26->SetLineColor(kV0AColorPMA); + v0APMTT6->SetLineColor(kV0AColorPMA); + rot = new TGeoRotation("rot", 90, 0, 180, 0, 90, 90); + v0APMT6->AddNode(v0APMT16,1,rot); + v0APMT6->AddNode(v0APMT26,1,rot); + v0APMT6->AddNode(v0APMTT6,1,new TGeoCombiTrans(0,(fV0APMTH+fV0APMTB)/2.,0,rot)); + double autoShift6 = (fV0APMBWd-2*fV0APMBWdW)/4.; + v0APM6->AddNode(v0APMT6, 1, new TGeoTranslation(-1.5*autoShift6, 0, 0)); + v0APM6->AddNode(v0APMT6, 2, new TGeoTranslation(-0.5*autoShift6, 0, 0)); + v0APM6->AddNode(v0APMT6, 3, new TGeoTranslation(+0.5*autoShift6, 0, 0)); + v0APM6->AddNode(v0APMT6, 4, new TGeoTranslation(+1.5*autoShift6, 0, 0)); + + /// PM + rot = new TGeoRotation("rot"); + rot->RotateX(-90+30); + rot->RotateY(0); + rot->RotateZ(-65-3); + double cosAngPMB6 = TMath::Cos(fV0APMBAng*TMath::DegToRad()); + double sinAngPMB6 = TMath::Sin(fV0APMBAng*TMath::DegToRad()); + double shiftZ6 = fV0APMBHt/2. * cosAngPMB6 + - ( fV0ASciWd + 2 * fV0AOctWd + 2 * fV0APlaWd )/2. - fV0APMBTh/2. * sinAngPMB6; + double shiftR6 = fV0AR6 + fV0AR1 + fV0AOctWd + fV0APlaAl/3.; + v0ASec6->AddNode(v0APM6,1, new TGeoCombiTrans( -shiftR6*cos45-1.3, -shiftR6*sin45, shiftZ6, rot)); + /// Support - TGeoBBox *sV0ASuppbl = new TGeoBBox("sV0ASuppbl", 2.0, 18.137, 2.0); + TGeoBBox *sV0ASuppbl = new TGeoBBox("sV0ASuppbl", 2.0, 18.13, fV0ASciWd/2.); TGeoVolume *v0ASuppbl = new TGeoVolume("V0ASuppbl", sV0ASuppbl, medV0ASup); v0ASuppbl->SetLineColor(kV0AColorOct); - v0ASec6->AddNode(v0ASuppbl,1,new TGeoTranslation(-2.0,-63.635,0.0)); - - - // Replicate sectors - //for(int i=0; i<1; i++) { - //TGeoRotation *rot = new TGeoRotation("rot", 90., i*45., 90., 90.+i*45., 0., 0.); - v0LE->AddNode(v0ASec6, 1); //i +1, rot); - //} - - - //Definition of sector 7 - + v0ASec6->AddNode(v0ASuppbl,1,new TGeoTranslation(-2.0,-63.64,0.0)); + + // Aluminium nail + TGeoTube *sV0ANail61 = new TGeoTube("sV0ANail61", 0.0, 0.4, 5.09/2.); + TGeoVolume *v0ANail61 = new TGeoVolume("V0ANail61", sV0ANail61, medV0APMAlum); + v0ANail61->SetLineColor(kV0AColorPMA);// this is the color for aluminium + v0ASec6->AddNode(v0ANail61,1,new TGeoTranslation(-0.51,-42.9,0.0)); + TGeoTube *sV0ANail62 = new TGeoTube("sV0ANail62", 0.0, 0.4, 5.09/2.); + TGeoVolume *v0ANail62 = new TGeoVolume("V0ANail62", sV0ANail62, medV0APMAlum); + v0ANail62->SetLineColor(kV0AColorPMA); + v0ASec6->AddNode(v0ANail62,1,new TGeoTranslation(-30.05,-30.79,0.0)); + + // Adding sector to v0LE volume + v0LE->AddNode(v0ASec6, 1); + + + //Definition of sector 7 TGeoVolume *v0ASec7 = new TGeoVolumeAssembly("V0ASec7"); /// For boolean sustraction @@ -1171,21 +1203,28 @@ void AliVZEROv7::CreateGeometry() } new TGeoArb8("sV0ACha17",fV0ASciWd/1.5,v0APts); for (int i=0;i<2;i++) { - v0APts[0+8*i] = fV0AR0*cos654-preShape7; - v0APts[1+8*i] = -(fV0AR0-fV0AFraWd)*sin654-preShape7; - v0APts[2+8*i] = (fV0AR0-fV0AFraWd/2.)*cos654-preShape7; - v0APts[3+8*i] = -(fV0AR0-fV0AFraWd/2.)*sin654; - v0APts[4+8*i] = (fV0AR4+fV0AFraWd/2.)*cos654+preShape7; - v0APts[5+8*i] = -(fV0AR4+fV0AFraWd/2.)*sin654+2.*preShape7; - v0APts[6+8*i] = (fV0AR4+fV0AFraWd)*cos654+preShape7; - v0APts[7+8*i] = -fV0AR4*sin654+preShape7; + v0APts[0+8*i] = (fV0AR0-fV0AFraWd/2.)*cos45-preShape7; + v0APts[1+8*i] = -(fV0AR0-fV0AFraWd/2.)*sin45; + v0APts[2+8*i] = fV0AR0*cos45-preShape7; + v0APts[3+8*i] = -(fV0AR0-fV0AFraWd)*sin45+preShape7; + v0APts[4+8*i] = (fV0AR4+fV0AFraWd)*cos45+preShape7; + v0APts[5+8*i] = -fV0AR4*sin45-preShape7; + v0APts[6+8*i] = (fV0AR4+fV0AFraWd/2.)*cos45+preShape7; + v0APts[7+8*i] = -(fV0AR4+fV0AFraWd/2.)*sin45-2.*preShape7; } new TGeoArb8("sV0ACha27", fV0ASciWd/2.+2.*preShape, v0APts); new TGeoCompositeShape("sV0ACha127","sV0ACha17+sV0ACha27"); new TGeoTube("sV0ANail17Hole", 0.0, 0.4, 1.65); TGeoTranslation *pos17 = new TGeoTranslation("pos17",0.51,-42.9,0.0); pos17->RegisterYourself(); - new TGeoCompositeShape("sV0ACha7","sV0ACha127+sV0ANail17Hole:pos17"); + new TGeoTube("sV0ANail27Hole", 0.0, 0.4, 1.65); + TGeoTranslation *pos27 = new TGeoTranslation("pos27",30.05,-30.79,0.0); + pos27->RegisterYourself(); + new TGeoCompositeShape("sV0ANailsHoles7","sV0ANail17Hole:pos17+sV0ANail27Hole:pos27"); + new TGeoCompositeShape("sV0ACha7","sV0ACha127+sV0ANailsHoles7"); + new TGeoTubeSeg("sV0AFicR57", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2.+2*preShape, 270.0, 315.0); + new TGeoTube("sV0ANail1PlaInHole7", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.); + new TGeoTube("sV0ANail1PlaOuHole7", 0.0, 0.4, (fV0APlaAl)/2.); /// Frame TGeoVolume *v0AFra7 = new TGeoVolumeAssembly("V0AFra7"); @@ -1198,14 +1237,14 @@ void AliVZEROv7::CreateGeometry() TGeoArb8 *sV0AFraB17 = new TGeoArb8("sV0AFraB17",fV0ASciWd/2.,v0APts); TGeoVolume *v0AFraB17 = new TGeoVolume("V0AFraB17",sV0AFraB17,medV0AFra); for (int i=0;i<2;i++) { - v0APts[0+8*i] = fV0AR0*cos654; - v0APts[1+8*i] = -(fV0AR0-fV0AFraWd)*sin654; - v0APts[2+8*i] = (fV0AR0-fV0AFraWd/2.)*cos654; - v0APts[3+8*i] = -(fV0AR0-fV0AFraWd/2.)*sin654; - v0APts[4+8*i] = (fV0AR4+fV0AFraWd/2.)*cos654; - v0APts[5+8*i] = -(fV0AR4+fV0AFraWd/2.)*sin654; - v0APts[6+8*i] = (fV0AR4+fV0AFraWd)*cos654; - v0APts[7+8*i] = -fV0AR4*sin654; + v0APts[0+8*i] = fV0AR0*cos45-fV0AFraWd; + 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/2.; + v0APts[5+8*i] = -fV0AR4*sin45/2.; + v0APts[6+8*i] = (fV0AR4+fV0AFraWd/4.)*cos45/2.; + v0APts[7+8*i] = -(fV0AR4+fV0AFraWd/2.)*sin45/2.; } TGeoArb8 *sV0AFraB27 = new TGeoArb8("sV0AFraB27", fV0ASciWd/2., v0APts); TGeoVolume *v0AFraB27 = new TGeoVolume("V0AFraB27",sV0AFraB27,medV0AFra); @@ -1213,15 +1252,15 @@ void AliVZEROv7::CreateGeometry() v0AFra7->AddNode(v0AFraB17,1); v0AFra7->AddNode(v0AFraB27,1); // Prefer 2 GeoObjects insted of 3 GeoMovements new TGeoTubeSeg( "sV0AFraR1b7", fV0AR0-fV0AFraWd/2., - fV0AR0+fV0AFraWd/2., fV0ASciWd/2., 270.0, 294.52); + fV0AR0+fV0AFraWd/2., fV0ASciWd/2., 270.0, 315.0); new TGeoTubeSeg( "sV0AFraR2b7", fV0AR1-fV0AFraWd/2., - fV0AR1+fV0AFraWd/2., fV0ASciWd/2., 270.0, 294.52); + fV0AR1+fV0AFraWd/2., fV0ASciWd/2., 270.0, 315.0); new TGeoTubeSeg( "sV0AFraR3b7", fV0AR2-fV0AFraWd/2., - fV0AR2+fV0AFraWd/2., fV0ASciWd/2., 270.0, 294.52); + fV0AR2+fV0AFraWd/2., fV0ASciWd/2., 270.0, 315.0); new TGeoTubeSeg( "sV0AFraR4b7", fV0AR3-fV0AFraWd/2., - fV0AR3+fV0AFraWd/2., fV0ASciWd/2., 270.0, 294.52); + fV0AR3+fV0AFraWd/2., fV0ASciWd/2., 270.0, 315.0); new TGeoTubeSeg( "sV0AFraR5b7", fV0AR4-fV0AFraWd/2., - fV0AR4+fV0AFraWd/2., fV0ASciWd/2., 270.0, 294.52); + fV0AR4+fV0AFraWd/2., fV0ASciWd/2., 270.0, 315.0); TGeoCompositeShape *sV0AFraR17 = new TGeoCompositeShape("sV0AFraR17","sV0AFraR1b7-sV0ACha7"); TGeoCompositeShape *sV0AFraR27 = new TGeoCompositeShape("sV0AFraR27","sV0AFraR2b7-sV0ACha7"); TGeoCompositeShape *sV0AFraR37 = new TGeoCompositeShape("sV0AFraR37","sV0AFraR3b7-sV0ACha7"); @@ -1245,13 +1284,13 @@ void AliVZEROv7::CreateGeometry() /// Sensitive scintilator TGeoVolume *v0ASci7 = new TGeoVolumeAssembly("V0ASci7"); new TGeoTubeSeg( "sV0AR1b7", fV0AR0+fV0AFraWd/2., - fV0AR1-fV0AFraWd/2., fV0ASciWd/2., 270.0, 294.52); + fV0AR1-fV0AFraWd/2., fV0ASciWd/2., 270.0, 315.0); new TGeoTubeSeg( "sV0AR2b7", fV0AR1+fV0AFraWd/2., - fV0AR2-fV0AFraWd/2., fV0ASciWd/2., 270.0, 294.52); + fV0AR2-fV0AFraWd/2., fV0ASciWd/2., 270.0, 315.0); new TGeoTubeSeg( "sV0AR3b7", fV0AR2+fV0AFraWd/2., - fV0AR3-fV0AFraWd/2., fV0ASciWd/2., 270.0, 294.52); + fV0AR3-fV0AFraWd/2., fV0ASciWd/2., 270.0, 315.0); new TGeoTubeSeg( "sV0AR4b7", fV0AR3+fV0AFraWd/2., - fV0AR4-fV0AFraWd/2., fV0ASciWd/2., 270.0, 294.52); + fV0AR4-fV0AFraWd/2., fV0ASciWd/2., 270.0, 315.0); TGeoCompositeShape *sV0AR17 = new TGeoCompositeShape("sV0AR17","sV0AR1b7-sV0ACha7"); TGeoCompositeShape *sV0AR27 = new TGeoCompositeShape("sV0AR27","sV0AR2b7-sV0ACha7"); TGeoCompositeShape *sV0AR37 = new TGeoCompositeShape("sV0AR37","sV0AR3b7-sV0ACha7"); @@ -1266,40 +1305,67 @@ void AliVZEROv7::CreateGeometry() v0ASci7->AddNode(v0L27,1); v0ASci7->AddNode(v0L37,1); v0ASci7->AddNode(v0L47,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("sV0AFib17", 0.01, v0APts); + rot = new TGeoRotation("rot"); + rot->RotateX(-2.0); + rot->RotateY(0.0); + rot->RotateZ(248.0); + TGeoCombiTrans *fib17pos = new TGeoCombiTrans("fib17pos", 40.0 - 3.3, -50.0 + 1.5, 0.5, rot); + fib17pos->RegisterYourself(); + TGeoCompositeShape *sV0AFib17Hole = new TGeoCompositeShape("sV0AFib17Hole", "sV0AFib17:fib17pos-sV0AFicR57"); + TGeoVolume *v0AFib17Hole = new TGeoVolume("V0AFib17Hole",sV0AFib17Hole,medV0AFib); + v0AFib17Hole->SetLineColor(kV0AColorFib); + new TGeoArb8("sV0AFib27", 0.01, v0APts); + rot = new TGeoRotation("rot"); + rot->RotateX(2.0); + rot->RotateY(0.0); + rot->RotateZ(248.0); + TGeoCombiTrans *fib27pos = new TGeoCombiTrans("fib27pos", 40.0 - 3.3, -50.0 + 1.5, -0.5, rot); + fib27pos->RegisterYourself(); + TGeoCompositeShape *sV0AFib27Hole = new TGeoCompositeShape("sV0AFib27Hole", "sV0AFib27:fib27pos-sV0AFicR57"); + TGeoVolume *v0AFib27Hole = new TGeoVolume("V0AFib27Hole",sV0AFib27Hole,medV0AFib); + v0AFib27Hole->SetLineColor(kV0AColorFib); + TGeoVolume *v0AFib7 = new TGeoVolumeAssembly("V0AFib7"); + v0AFib7->AddNode(v0AFib17Hole,1); + v0AFib7->AddNode(v0AFib27Hole,1); + v0ASec7->AddNode(v0AFib7,1); /// Non-sensitive scintilator - new TGeoTubeSeg("sV0AR5S27", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2.+2*preShape, 270.0, 294.52); + new TGeoTubeSeg("sV0AR5S27", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2.+2*preShape, 270.0, 315.0); TGeoCompositeShape *sV0AR57 = new TGeoCompositeShape("V0AR57","sV0AR5S27 - sV0ACha7"); TGeoVolume *v0AR57 = new TGeoVolume("V0AR57",sV0AR57,medV0ASci); v0AR57->SetLineColor(kV0AColorSci); v0ASci7->AddNode(v0AR57,1); v0ASec7->AddNode(v0ASci7,1); - /// Segment of innermost octagon - TGeoVolume *v0ASup7 = new TGeoVolumeAssembly("V0ASup7"); - - /// Segment of outtermost octagon + /// Segment of octagon for (int i=0;i<2;i++) { - v0APts[0+8*i] = 0.; v0APts[1+8*i] = -(fV0AR7-fV0AOctH2)*sin654; - v0APts[2+8*i] = 0.; v0APts[3+8*i] = -fV0AR7*sin654; - v0APts[4+8*i] = fV0AR7*cos654; v0APts[5+8*i] = -fV0AR7*sin654; - v0APts[6+8*i] = (fV0AR7-fV0AOctH2)*cos654; v0APts[7+8*i] = -(fV0AR7-fV0AOctH2)*sin654; + v0APts[0+8*i] = 0.; v0APts[1+8*i] = -fV0AR7*sin654; + v0APts[2+8*i] = 0.; v0APts[3+8*i] = -(fV0AR7-fV0AOctH2)*sin654; + v0APts[4+8*i] = (fV0AR7-fV0AOctH2)*cos654; v0APts[5+8*i] = -(fV0AR7-fV0AOctH2)*sin654; + v0APts[6+8*i] = fV0AR7*cos654; v0APts[7+8*i] = -fV0AR7*sin654; } TGeoArb8 *sV0AOct27 = new TGeoArb8("sV0AOct27", (fV0ASciWd+2*fV0AOctWd)/2., v0APts); TGeoVolume *v0AOct27 = new TGeoVolume("V0AOct27", sV0AOct27,medV0ASup); v0AOct27->SetLineColor(kV0AColorOct); + TGeoVolume *v0ASup7 = new TGeoVolumeAssembly("V0ASup7"); v0ASup7->AddNode(v0AOct27,1); v0ASec7->AddNode(v0ASup7,1); - /// Plates - new TGeoTube("sV0ANail1PlaInHole7", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.); - new TGeoTube("sV0ANail1PlaOuHole7", 0.0, 0.4, (fV0APlaAl)/2.); for (int i=0;i<2;i++) { - v0APts[0+8*i] = 0.; v0APts[1+8*i] = -fV0AR0; - v0APts[2+8*i] = 0.; v0APts[3+8*i] = -fV0AR7*sin654; - v0APts[4+8*i] = fV0AR7*cos654; v0APts[5+8*i] = -fV0AR7*sin654; - v0APts[6+8*i] = fV0AR0*cos654; v0APts[7+8*i] = -fV0AR0*sin654; + v0APts[0+8*i] = 0.; v0APts[1+8*i] = -fV0AR7*sin654; + v0APts[2+8*i] = 0.; v0APts[3+8*i] = -fV0AR0; + v0APts[4+8*i] = fV0AR0*cos654; v0APts[5+8*i] = -fV0AR0*sin654; + v0APts[6+8*i] = fV0AR7*cos654; v0APts[7+8*i] = -fV0AR7*sin654; } new TGeoArb8("sV0APlaIn7", (fV0APlaWd-2*fV0APlaAl)/2., v0APts); TGeoCompositeShape *sV0APlaInNailsHoles7 = new TGeoCompositeShape("sV0APlaInNailsHoles7","sV0APlaIn7-sV0ANail1PlaInHole7:pos17"); @@ -1314,43 +1380,86 @@ void AliVZEROv7::CreateGeometry() v0APla7->AddNode(v0APlaOuNailsHoles7,2,new TGeoTranslation(0,0,-(fV0APlaWd-fV0APlaAl)/2.)); v0ASec7->AddNode(v0APla7,1,new TGeoTranslation(0,0,(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.)); v0ASec7->AddNode(v0APla7,2,new TGeoTranslation(0,0,-(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.)); - - /// Support - TGeoBBox *sV0ASuppbr = new TGeoBBox("sV0ASuppbr", 2.0, 18.138, 2.0); + + /// PMBox + TGeoVolume* v0APM7 = new TGeoVolumeAssembly("V0APM7"); + new TGeoBBox("sV0APMB17", fV0APMBWd/2., fV0APMBHt/2., fV0APMBTh/2.); + new TGeoBBox("sV0APMB27", fV0APMBWd/2.-fV0APMBWdW, fV0APMBHt/2.-fV0APMBHtW, fV0APMBTh/2.-fV0APMBThW); + TGeoCompositeShape *sV0APMB7 = new TGeoCompositeShape("sV0APMB7","sV0APMB17-sV0APMB27"); + TGeoVolume *v0APMB7 = new TGeoVolume("V0APMB7",sV0APMB7, medV0APMAlum); + v0APMB7->SetLineColor(kV0AColorPMA); + v0APM7->AddNode(v0APMB7,1); + + /// PMTubes + TGeoTube *sV0APMT17 = new TGeoTube("sV0APMT17", fV0APMTR1, fV0APMTR2, fV0APMTH/2.); + TGeoVolume *v0APMT17 = new TGeoVolume("V0APMT17", sV0APMT17, medV0APMGlass); + TGeoTube *sV0APMT27 = new TGeoTube("sV0APMT27", fV0APMTR3, fV0APMTR4, fV0APMTH/2.); + TGeoVolume *v0APMT27 = new TGeoVolume("V0APMT27", sV0APMT27, medV0APMAlum); + TGeoVolume *v0APMT7 = new TGeoVolumeAssembly("V0APMT7"); // pk si no choca con la 752 o con la 794 + TGeoTube *sV0APMTT7 = new TGeoTube("sV0APMTT7", 0., fV0APMTR4, fV0APMTB/2.); + TGeoVolume *v0APMTT7 = new TGeoVolume("V0APMTT7", sV0APMTT7, medV0APMAlum); + v0APMT7->SetLineColor(kV0AColorPMG); + v0APMT27->SetLineColor(kV0AColorPMA); + v0APMTT7->SetLineColor(kV0AColorPMA); + rot = new TGeoRotation("rot", 90, 0, 180, 0, 90, 90); + v0APMT7->AddNode(v0APMT17,1,rot); + v0APMT7->AddNode(v0APMT27,1,rot); + v0APMT7->AddNode(v0APMTT7,1,new TGeoCombiTrans(0,(fV0APMTH+fV0APMTB)/2.,0,rot)); + v0APM7->AddNode(v0APMT7, 1, new TGeoTranslation(-1.5*autoShift, 0, 0)); + v0APM7->AddNode(v0APMT7, 2, new TGeoTranslation(-0.5*autoShift, 0, 0)); + v0APM7->AddNode(v0APMT7, 3, new TGeoTranslation(+0.5*autoShift, 0, 0)); + v0APM7->AddNode(v0APMT7, 4, new TGeoTranslation(+1.5*autoShift, 0, 0)); + + /// PM + rot = new TGeoRotation("rot"); + rot->RotateX(-90+30); + rot->RotateY(0); + rot->RotateZ(65+3); + double shiftZ7 = fV0APMBHt/2. * cosAngPMB + - ( fV0ASciWd + 2 * fV0AOctWd + 2 * fV0APlaWd )/2. - fV0APMBTh/2. * sinAngPMB; + double shiftR7 = fV0AR6 + fV0AR1 + fV0AOctWd + fV0APlaAl/3.; + v0ASec7->AddNode(v0APM7,1, new TGeoCombiTrans( shiftR7*cos45+1.3, -shiftR7*sin45, shiftZ7, rot)); + + // Aluminium nail + TGeoTube *sV0ANail71 = new TGeoTube("sV0ANail71", 0.0, 0.4, 5.09/2.); + TGeoVolume *v0ANail71 = new TGeoVolume("V0ANail71", sV0ANail71, medV0APMAlum); + v0ANail71->SetLineColor(kV0AColorPMA);// this is the color for aluminium + v0ASec7->AddNode(v0ANail71,1,new TGeoTranslation(0.51,-42.9,0.0)); + TGeoTube *sV0ANail72 = new TGeoTube("sV0ANail72", 0.0, 0.4, 5.09/2.); + TGeoVolume *v0ANail72 = new TGeoVolume("V0ANail72", sV0ANail72, medV0APMAlum); + v0ANail72->SetLineColor(kV0AColorPMA); + v0ASec7->AddNode(v0ANail72,1,new TGeoTranslation(30.05,-30.79,0.0)); + + // Support + TGeoBBox *sV0ASuppbr = new TGeoBBox("sV0ASuppbr", 2.0, 18.13, fV0ASciWd/2.); TGeoVolume *v0ASuppbr = new TGeoVolume("V0ASuppbr", sV0ASuppbr, medV0ASup); v0ASuppbr->SetLineColor(kV0AColorOct); - v0ASec7->AddNode(v0ASuppbr,1,new TGeoTranslation(2.0,-63.639,0.0)); - - // Replicate sectors - for(int i=0; i<1; i++) { - TGeoRotation *rot = new TGeoRotation("rot", 90., i*45., 90., 90.+i*45., 0., 0.); - v0LE->AddNode(v0ASec7,i + 1,rot); - } - - - + v0ASec7->AddNode(v0ASuppbr,1,new TGeoTranslation(2.0,-63.64,0.0)); + + // Adding sector to v0LE volume + v0LE->AddNode(v0ASec7,1); - //Definition of sector 8 - - TGeoVolume *v0ASec8 = new TGeoVolumeAssembly("V0ASec8"); - /// For boolean sustraction + //Definition of sector 8 + TGeoVolume *v0ASec8 = new TGeoVolumeAssembly("V0ASec8"); + + /// For boolean sustraction for (int i=0;i<2;i++) { - v0APts[0+8*i] = fV0AR0-fV0AFraWd/2.-preShape; v0APts[1+8*i] = -preShape; - v0APts[2+8*i] = fV0AR0-fV0AFraWd/2.-preShape; v0APts[3+8*i] = fV0AFraWd/2.; - v0APts[4+8*i] = fV0AR4+fV0AFraWd/2.+preShape; v0APts[5+8*i] = fV0AFraWd/2.; - v0APts[6+8*i] = fV0AR4+fV0AFraWd/2.+preShape; v0APts[7+8*i] = -preShape; + v0APts[0+8*i] = fV0AR0-fV0AFraWd/2.; v0APts[1+8*i] = -2*preShape; + v0APts[2+8*i] = fV0AR0-fV0AFraWd/2.; v0APts[3+8*i] = 0.0; + v0APts[4+8*i] = fV0AR4+fV0AFraWd/2.; v0APts[5+8*i] = 0.0; + v0APts[6+8*i] = fV0AR4+fV0AFraWd/2.; v0APts[7+8*i] = -2*preShape; } new TGeoArb8("sV0ACha18",fV0ASciWd/1.5,v0APts); for (int i=0;i<2;i++) { - v0APts[0+8*i] = fV0AR0*cos654-preShape; - v0APts[1+8*i] = -(fV0AR0-fV0AFraWd)*sin654-preShape; - v0APts[2+8*i] = (fV0AR0-fV0AFraWd/2.)*cos654-preShape; - v0APts[3+8*i] = -(fV0AR0-fV0AFraWd/2.)*sin654; - v0APts[4+8*i] = (fV0AR4+fV0AFraWd/2.)*cos654+preShape; - v0APts[5+8*i] = -(fV0AR4+fV0AFraWd/2.)*sin654+2.*preShape; - v0APts[6+8*i] = (fV0AR4+fV0AFraWd)*cos654+preShape; - v0APts[7+8*i] = -fV0AR4*sin654+preShape; + v0APts[0+8*i] = (fV0AR0-fV0AFraWd/2.)*sin45-preShape; + v0APts[1+8*i] = -(fV0AR0-fV0AFraWd/2.)*sin45; + v0APts[2+8*i] = fV0AR0*sin45-fV0AFraWd/2.-preShape; + v0APts[3+8*i] = -(fV0AR0-fV0AFraWd)*sin45+preShape; + v0APts[4+8*i] = (fV0AR4+3*fV0AFraWd/2.)*sin45+preShape; + v0APts[5+8*i] = -fV0AR4*sin45-preShape; + v0APts[6+8*i] = (fV0AR4+fV0AFraWd)*sin45+preShape; + v0APts[7+8*i] = -(fV0AR4+fV0AFraWd/2.)*sin45-2.*preShape; } new TGeoArb8("sV0ACha28", fV0ASciWd/2.+2.*preShape, v0APts); new TGeoCompositeShape("sV0ACha128","sV0ACha18+sV0ACha28"); @@ -1358,33 +1467,41 @@ void AliVZEROv7::CreateGeometry() TGeoTranslation *pos18 = new TGeoTranslation("pos18",42.9,-.51,0.0); pos18->RegisterYourself(); new TGeoTube("sV0ANail28Hole", 0.0, 0.4, 1.65); - TGeoTranslation *pos28 = new TGeoTranslation("pos28", 30.8,-30.04,0.0); - pos28->RegisterYourself(); - new TGeoTube("sV0ANail38Hole", 0.0, 0.4, 1.65); - TGeoTranslation *pos38 = new TGeoTranslation("pos38",29.8,-31.04,0.0); + TGeoTranslation *pos28 = new TGeoTranslation("pos28",30.8,-30.04,0.0); + pos28->RegisterYourself(); + TGeoTranslation *pos38 = new TGeoTranslation("pos38",30.05,-30.79,0.0); pos38->RegisterYourself(); - new TGeoCompositeShape("sV0ANailsHoles8","sV0ANail18Hole:pos18+sV0ANail28Hole:pos28+sV0ANail38Hole:pos38"); + new TGeoCompositeShape("sV0ANailsHoles8","sV0ANail18Hole:pos18+sV0ANail28Hole:pos28"); new TGeoCompositeShape("sV0ACha8","sV0ACha128+sV0ANailsHoles8"); - - /// Frame - TGeoVolume *v0AFra8 = new TGeoVolumeAssembly("V0AFra8"); + new TGeoTubeSeg("sV0AFicR58", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2. +2*preShape, 315.0, 360.0); + new TGeoTube("sV0ANail1PlaInHole8", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.); + new TGeoTube("sV0ANail2PlaInHole8", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.); + new TGeoTube("sV0ANail3PlaInHole8", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.); + new TGeoCompositeShape("sV0ANailsPlaInHoles8","sV0ANail1PlaInHole8:pos18+sV0ANail2PlaInHole8:pos28+sV0ANail3PlaInHole8:pos38"); + new TGeoTube("sV0ANail1PlaOuHole8", 0.0, 0.4, (fV0APlaAl)/2.); + new TGeoTube("sV0ANail2PlaOuHole8", 0.0, 0.4, (fV0APlaAl)/2.); + new TGeoTube("sV0ANail3PlaOuHole8", 0.0, 0.4, (fV0APlaAl)/2.); + new TGeoCompositeShape("sV0ANailsPlaOuHoles8","sV0ANail1PlaOuHole8:pos18+sV0ANail2PlaOuHole8:pos28+sV0ANail3PlaOuHole8:pos38"); + + /// Frame + TGeoVolume *v0AFra8 = new TGeoVolumeAssembly("V0AFra8"); for (int i=0;i<2;i++) { - v0APts[0+8*i] = fV0AR0-fV0AFraWd/2.; v0APts[1+8*i] = preShape; - 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] = preShape; - } + v0APts[0+8*i] = fV0AR0-fV0AFraWd/2.; v0APts[1+8*i] = 0.0; + v0APts[2+8*i] = fV0AR4+fV0AFraWd/2.; v0APts[3+8*i] = 0.0; + v0APts[4+8*i] = fV0AR4+fV0AFraWd/2.; v0APts[5+8*i] = -fV0AFraWd/8.; + v0APts[6+8*i] = fV0AR0-fV0AFraWd/2.; v0APts[7+8*i] = -fV0AFraWd/8.; + } TGeoArb8 *sV0AFraB18 = new TGeoArb8("sV0AFraB18",fV0ASciWd/2.,v0APts); - TGeoVolume *v0AFraB18 = new TGeoVolume("V0AFraB18",sV0AFraB18,medV0AFra); + TGeoVolume *v0AFraB18 = new TGeoVolume("V0AFraB18",sV0AFraB18,medV0AFra); for (int i=0;i<2;i++) { - v0APts[0+8*i] = fV0AR0*cos654; - v0APts[1+8*i] = -(fV0AR0-fV0AFraWd)*sin654; - v0APts[2+8*i] = (fV0AR0-fV0AFraWd/2.)*cos654; - v0APts[3+8*i] = -(fV0AR0-fV0AFraWd/2.)*sin654; - v0APts[4+8*i] = (fV0AR4+fV0AFraWd/2.)*cos654; - v0APts[5+8*i] = -(fV0AR4+fV0AFraWd/2.)*sin654; - v0APts[6+8*i] = (fV0AR4+fV0AFraWd)*cos654; - v0APts[7+8*i] = -fV0AR4*sin654; + v0APts[0+8*i] = (fV0AR0-fV0AFraWd/4.)*sin45; + v0APts[1+8*i] = -(fV0AR0-fV0AFraWd/2.)*sin45; + v0APts[2+8*i] = fV0AR0*sin45-fV0AFraWd/2.; + v0APts[3+8*i] = -(fV0AR0-fV0AFraWd)*sin45; + v0APts[4+8*i] = (fV0AR4+3*fV0AFraWd/2.)*sin45/2.; + v0APts[5+8*i] = -fV0AR4*sin45/2.; + v0APts[6+8*i] = (fV0AR4+fV0AFraWd)*sin45/2.; + v0APts[7+8*i] = -(fV0AR4+fV0AFraWd/2.)*sin45/2.; } TGeoArb8 *sV0AFraB28 = new TGeoArb8("sV0AFraB28", fV0ASciWd/2., v0APts); TGeoVolume *v0AFraB28 = new TGeoVolume("V0AFraB28",sV0AFraB28,medV0AFra); @@ -1392,15 +1509,15 @@ void AliVZEROv7::CreateGeometry() v0AFra8->AddNode(v0AFraB18,1); v0AFra8->AddNode(v0AFraB28,1); // Prefer 2 GeoObjects insted of 3 GeoMovements new TGeoTubeSeg( "sV0AFraR1b8", fV0AR0-fV0AFraWd/2., - fV0AR0+fV0AFraWd/2., fV0ASciWd/2., 294.52, 359.0); + fV0AR0+fV0AFraWd/2., fV0ASciWd/2., 315.0, 360.0); new TGeoTubeSeg( "sV0AFraR2b8", fV0AR1-fV0AFraWd/2., - fV0AR1+fV0AFraWd/2., fV0ASciWd/2., 294.52, 359.0); + fV0AR1+fV0AFraWd/2., fV0ASciWd/2., 315.0, 360.0); new TGeoTubeSeg( "sV0AFraR3b8", fV0AR2-fV0AFraWd/2., - fV0AR2+fV0AFraWd/2., fV0ASciWd/2., 294.52, 359.0); + fV0AR2+fV0AFraWd/2., fV0ASciWd/2., 315.0, 360.0); new TGeoTubeSeg( "sV0AFraR4b8", fV0AR3-fV0AFraWd/2., - fV0AR3+fV0AFraWd/2., fV0ASciWd/2., 294.52, 359.0); + fV0AR3+fV0AFraWd/2., fV0ASciWd/2., 315.0, 360.0); new TGeoTubeSeg( "sV0AFraR5b8", fV0AR4-fV0AFraWd/2., - fV0AR4+fV0AFraWd/2., fV0ASciWd/2., 294.52, 359.0); + fV0AR4+fV0AFraWd/2., fV0ASciWd/2., 315.0, 360.0); TGeoCompositeShape *sV0AFraR18 = new TGeoCompositeShape("sV0AFraR18","sV0AFraR1b8-sV0ACha8"); TGeoCompositeShape *sV0AFraR28 = new TGeoCompositeShape("sV0AFraR28","sV0AFraR2b8-sV0ACha8"); TGeoCompositeShape *sV0AFraR38 = new TGeoCompositeShape("sV0AFraR38","sV0AFraR3b8-sV0ACha8"); @@ -1424,13 +1541,13 @@ void AliVZEROv7::CreateGeometry() /// Sensitive scintilator TGeoVolume *v0ASci8 = new TGeoVolumeAssembly("V0ASci8"); new TGeoTubeSeg( "sV0AR1b8", fV0AR0+fV0AFraWd/2., - fV0AR1-fV0AFraWd/2., fV0ASciWd/2., 294.52, 359.0); + fV0AR1-fV0AFraWd/2., fV0ASciWd/2., 315.0, 360.0); new TGeoTubeSeg( "sV0AR2b8", fV0AR1+fV0AFraWd/2., - fV0AR2-fV0AFraWd/2., fV0ASciWd/2., 294.52, 359.0); + fV0AR2-fV0AFraWd/2., fV0ASciWd/2., 315.0, 360.0); new TGeoTubeSeg( "sV0AR3b8", fV0AR2+fV0AFraWd/2., - fV0AR3-fV0AFraWd/2., fV0ASciWd/2., 294.52, 359.0); + fV0AR3-fV0AFraWd/2., fV0ASciWd/2., 315.0, 360.0); new TGeoTubeSeg( "sV0AR4b8", fV0AR3+fV0AFraWd/2., - fV0AR4-fV0AFraWd/2., fV0ASciWd/2., 294.52, 359.0); + fV0AR4-fV0AFraWd/2., fV0ASciWd/2., 315.0, 360.0); TGeoCompositeShape *sV0AR18 = new TGeoCompositeShape("sV0AR18","sV0AR1b8-sV0ACha8"); TGeoCompositeShape *sV0AR28 = new TGeoCompositeShape("sV0AR28","sV0AR2b8-sV0ACha8"); TGeoCompositeShape *sV0AR38 = new TGeoCompositeShape("sV0AR38","sV0AR3b8-sV0ACha8"); @@ -1444,29 +1561,19 @@ void AliVZEROv7::CreateGeometry() v0ASci8->AddNode(v0L18,1); v0ASci8->AddNode(v0L28,1); v0ASci8->AddNode(v0L38,1); - v0ASci8->AddNode(v0L48,1); + v0ASci8->AddNode(v0L48,1); - /// Non-sensitive scintilator - new TGeoTubeSeg("sV0AR5S28", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2.+2*preShape, 294.52, 359.0); - TGeoCompositeShape *sV0AR58 = new TGeoCompositeShape("V0AR58","sV0AR5S28 - sV0ACha8"); - TGeoVolume *v0AR58 = new TGeoVolume("V0AR58",sV0AR58,medV0ASci); - v0AR58->SetLineColor(kV0AColorSci); - v0ASci8->AddNode(v0AR58,1); - v0ASec8->AddNode(v0ASci8,1); - - /// Segment of innermost octagon - TGeoVolume *v0ASup8 = new TGeoVolumeAssembly("V0ASup8"); - -/// Segment of outtermost 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.; + /// Segment of octagon + for (int i=0;i<2;i++) { + v0APts[0+8*i] = fV0AR6; v0APts[1+8*i] = 0.; + v0APts[2+8*i] = fV0AR7*cos654; v0APts[3+8*i] = -fV0AR7*sin654; + v0APts[4+8*i] = (fV0AR7-fV0AOctH2)*cos654; v0APts[5+8*i] = -(fV0AR7-fV0AOctH2)*sin654; + v0APts[6+8*i] = fV0AR6-fV0AOctH2; v0APts[7+8*i] = 0.; } TGeoArb8 *sV0AOct28 = new TGeoArb8("sV0AOct28", (fV0ASciWd+2*fV0AOctWd)/2., v0APts); TGeoVolume *v0AOct28 = new TGeoVolume("V0AOct28", sV0AOct28,medV0ASup); v0AOct28->SetLineColor(kV0AColorOct); + TGeoVolume *v0ASup8 = new TGeoVolumeAssembly("V0ASup8"); v0ASup8->AddNode(v0AOct28,1); v0ASec8->AddNode(v0ASup8,1); @@ -1479,56 +1586,44 @@ void AliVZEROv7::CreateGeometry() v0APts[ 9] = v0APts[15] = 0.; v0APts[11] = v0APts[13] = 0.25; v0APts[12] = v0APts[14] = +10.0; - TGeoArb8 *sV0AFiba8 = new TGeoArb8("sV0AFiba8", 9.0, v0APts); - TGeoVolume *v0AFiba18 = new TGeoVolume("V0AFiba18",sV0AFiba8,medV0AFib); - TGeoVolume *v0AFiba8 = new TGeoVolumeAssembly("V0AFiba8"); + new TGeoArb8("sV0AFib18", 11.8, v0APts); rot = new TGeoRotation("rot"); rot->RotateX(-90); rot->RotateZ(-90-22.5); - v0AFiba8->AddNode(v0AFiba18,1,rot); + TGeoCombiTrans *fib18pos = new TGeoCombiTrans("fib18pos", (fV0AR6-fV0AOctH2+fV0AR5)*cos225/2. - 3.3, -(fV0AR6-fV0AOctH2+fV0AR5)*sin225/2. + 1.5, 0, rot); + fib18pos->RegisterYourself(); + TGeoCompositeShape *sV0AFib18Hole = new TGeoCompositeShape("sV0AFib18Hole", "sV0AFib18:fib18pos-sV0AFicR58"); + TGeoVolume *v0AFib18Hole = new TGeoVolume("V0AFib18",sV0AFib18Hole,medV0AFib); + v0AFib18Hole->SetLineColor(kV0AColorFib); + new TGeoArb8("sV0AFib28", 11.8, v0APts); rot = new TGeoRotation("rot"); rot->RotateX(-90); rot->RotateY(180); rot->RotateZ(-90-22.5); - v0AFiba8->SetLineColor(kV0AColorFib); - v0AFiba8->AddNode(v0AFiba18,2,rot); - v0ASec8->AddNode(v0AFiba8,1,new TGeoTranslation((fV0AR6-fV0AOctH2+fV0AR5)*cos225/2. - 1.5, -(fV0AR6-fV0AOctH2+fV0AR5)*sin225/2. - 1.0, 0)); - for (int i=0;i<2;i++) { - v0APts[0+8*i] = 33.47; v0APts[1+8*i] = -35.13; - v0APts[2+8*i] = 50.48; v0APts[3+8*i] = -46.97; - v0APts[4+8*i] = 44.66; v0APts[5+8*i] = -61.92; - v0APts[6+8*i] = 7.9; v0APts[7+8*i] = -47.18; - } - TGeoArb8 *sV0AFibb8 = new TGeoArb8("sV0AFibb8", 1.25, v0APts); - TGeoVolume *v0AFibb18 = new TGeoVolume("V0AFibb18",sV0AFibb8,medV0AFib); - TGeoVolume *v0AFibb8 = new TGeoVolumeAssembly("V0AFibb8"); - //rot = new TGeoRotation("rot"); - //rot->RotateX(-90); - //rot->RotateZ(-90-40); - v0AFibb8->AddNode(v0AFibb18,1);//,rot); - //rot = new TGeoRotation("rot"); - //rot->RotateX(-90); - //rot->RotateY(180); - //rot->RotateZ(-90-40); - v0AFibb8->SetLineColor(kV0AColorFib); - //v0AFibb8->AddNode(v0AFibb18,2,rot); - v0ASec8->AddNode(v0AFibb8,1);//,new TGeoTranslation((fV0AR6-fV0AOctH2+fV0AR5)*cos225/2. - 17.0, -(fV0AR6-fV0AOctH2+fV0AR5)*sin225/2. - 30.0, 0)); + TGeoCombiTrans *fib28pos = new TGeoCombiTrans("fib28pos", (fV0AR6-fV0AOctH2+fV0AR5)*cos225/2. - 3.3, -(fV0AR6-fV0AOctH2+fV0AR5)*sin225/2. + 1.5, 0, rot); + fib28pos->RegisterYourself(); + TGeoCompositeShape *sV0AFib28Hole = new TGeoCompositeShape("sV0AFib28Hole", "sV0AFib28:fib28pos-sV0AFicR58"); + TGeoVolume *v0AFib28Hole = new TGeoVolume("V0AFib28Hole",sV0AFib28Hole,medV0AFib); + v0AFib28Hole->SetLineColor(kV0AColorFib); + TGeoVolume *v0AFib8 = new TGeoVolumeAssembly("V0AFib8"); + v0AFib8->AddNode(v0AFib18Hole,1); + v0AFib8->AddNode(v0AFib28Hole,1); + v0ASec8->AddNode(v0AFib8,1); + + /// Non-sensitive scintilator + new TGeoTubeSeg("sV0AR5S28", fV0AR4+fV0AFraWd/2., fV0AR4 + fV0AR0, fV0ASciWd/2.+2*preShape, 315.0, 360.0); + TGeoCompositeShape *sV0AR58 = new TGeoCompositeShape("V0AR58","sV0AR5S28 - sV0ACha8"); + TGeoVolume *v0AR58 = new TGeoVolume("V0AR58",sV0AR58,medV0ASci); + v0AR58->SetLineColor(kV0AColorSci); + v0ASci8->AddNode(v0AR58,1); + v0ASec8->AddNode(v0ASci8,1); - /// Plates - new TGeoTube("sV0ANail1PlaInHole8", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.); - new TGeoTube("sV0ANail2PlaInHole8", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.); - new TGeoTube("sV0ANail3PlaInHole8", 0.0, 0.4, (fV0APlaWd-2*fV0APlaAl)/2.); - new TGeoCompositeShape("sV0ANailsPlaInHoles8","sV0ANail1PlaInHole8:pos18+sV0ANail2PlaInHole8:pos28+sV0ANail3PlaInHole8:pos38"); - new TGeoTube("sV0ANail1PlaOuHole8", 0.0, 0.4, (fV0APlaAl)/2.); - new TGeoTube("sV0ANail2PlaOuHole8", 0.0, 0.4, (fV0APlaAl)/2.); - new TGeoTube("sV0ANail3PlaOuHole8", 0.0, 0.4, (fV0APlaAl)/2.); - new TGeoCompositeShape("sV0ANailsPlaOuHoles8","sV0ANail1PlaOuHole8:pos18+sV0ANail2PlaOuHole8:pos28+sV0ANail3PlaInHole8:pos38"); 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[2+8*i] = fV0AR6; v0APts[3+8*i] = 0.; v0APts[4+8*i] = fV0AR7*cos654; v0APts[5+8*i] = -fV0AR7*sin654; - v0APts[6+8*i] = fV0AR6; v0APts[7+8*i] = 0.; + v0APts[6+8*i] = fV0AR0*cos654; v0APts[7+8*i] = -fV0AR0*sin654; } new TGeoArb8("sV0APlaIn8", (fV0APlaWd-2*fV0APlaAl)/2., v0APts); TGeoCompositeShape *sV0APlaInNailsHoles8 = new TGeoCompositeShape("sV0APlaInNailsHoles8","sV0APlaIn8-sV0ANailsPlaInHoles8"); @@ -1544,7 +1639,7 @@ void AliVZEROv7::CreateGeometry() v0ASec8->AddNode(v0APla8,1,new TGeoTranslation(0,0,(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.)); v0ASec8->AddNode(v0APla8,2,new TGeoTranslation(0,0,-(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.)); - /// PMBox 1ero + /// PMBox TGeoVolume* v0APM8 = new TGeoVolumeAssembly("V0APM1"); new TGeoBBox("sV0APMB18", fV0APMBWd/2., fV0APMBHt/2., fV0APMBTh/2.); new TGeoBBox("sV0APMB28", fV0APMBWd/2.-fV0APMBWdW, fV0APMBHt/2.-fV0APMBHtW, fV0APMBTh/2.-fV0APMBThW); @@ -1553,7 +1648,7 @@ void AliVZEROv7::CreateGeometry() v0APMB8->SetLineColor(kV0AColorPMA); v0APM8->AddNode(v0APMB8,1); - /// PMTubes 1ero + /// PMTubes TGeoTube *sV0APMT18 = new TGeoTube("sV0APMT18", fV0APMTR1, fV0APMTR2, fV0APMTH/2.); TGeoVolume *v0APMT18 = new TGeoVolume("V0APMT18", sV0APMT18, medV0APMGlass); TGeoTube *sV0APMT28 = new TGeoTube("sV0APMT28", fV0APMTR3, fV0APMTR4, fV0APMTH/2.); @@ -1574,7 +1669,7 @@ void AliVZEROv7::CreateGeometry() v0APM8->AddNode(v0APMT8, 3, new TGeoTranslation(+0.5*autoShift8, 0, 0)); v0APM8->AddNode(v0APMT8, 4, new TGeoTranslation(+1.5*autoShift8, 0, 0)); - /// PM 1ero + /// PM rot = new TGeoRotation("rot"); rot->RotateX(-90+30); rot->RotateY(0); @@ -1582,145 +1677,26 @@ void AliVZEROv7::CreateGeometry() double shiftZ8 = fV0APMBHt/2. * cosAngPMB - ( fV0ASciWd + 2 * fV0AOctWd + 2 * fV0APlaWd )/2. - fV0APMBTh/2. * sinAngPMB; double shiftR8 = fV0AR6 + fV0AOctH2 + fV0APlaAl; - v0ASec8->AddNode(v0APM8,1, new TGeoCombiTrans( shiftR8*cos225, -shiftR8*sin225, shiftZ8, rot)); - - /// PMBox 2do - TGeoVolume* v0APM82 = new TGeoVolumeAssembly("V0APM82"); - new TGeoBBox("sV0APMB82", fV0APMBWd/2., fV0APMBHt/2., fV0APMBTh/2.); - new TGeoBBox("sV0APMB82", fV0APMBWd/2.-fV0APMBWdW, fV0APMBHt/2.-fV0APMBHtW, fV0APMBTh/2.-fV0APMBThW); - TGeoCompositeShape *sV0APMB82 = new TGeoCompositeShape("sV0APMB82","sV0APMB82-sV0APMB82"); - TGeoVolume *v0APMB82 = new TGeoVolume("V0APMB82",sV0APMB82, medV0APMAlum); - v0APMB82->SetLineColor(kV0AColorPMA); - v0APM82->AddNode(v0APMB82,1); - - /// PMTubes 2ndo - TGeoTube *sV0APMT182 = new TGeoTube("sV0APMT182", fV0APMTR1, fV0APMTR2, fV0APMTH/2.); - TGeoVolume *v0APMT182 = new TGeoVolume("V0APMT182", sV0APMT182, medV0APMGlass); - TGeoTube *sV0APMT282 = new TGeoTube("sV0APMT282", fV0APMTR3, fV0APMTR4, fV0APMTH/2.); - TGeoVolume *v0APMT282 = new TGeoVolume("V0APMT282", sV0APMT282, medV0APMAlum); - TGeoVolume *v0APMT82 = new TGeoVolumeAssembly("V0APMT82"); // pk si no choca con la 752 o con la 794 - TGeoTube *sV0APMTT82 = new TGeoTube("sV0APMTT82", 0., fV0APMTR4, fV0APMTB/2.); - TGeoVolume *v0APMTT82 = new TGeoVolume("V0APMT82", sV0APMTT82, medV0APMAlum); - v0APMT82->SetLineColor(kV0AColorPMG); - v0APMT282->SetLineColor(kV0AColorPMA); - v0APMTT82->SetLineColor(kV0AColorPMA); - rot = new TGeoRotation("rot", 90, 0, 180, 0, 90, 90); - v0APMT82->AddNode(v0APMT182,1,rot); - v0APMT82->AddNode(v0APMT282,1,rot); - v0APMT82->AddNode(v0APMTT82,1,new TGeoCombiTrans(0,(fV0APMTH+fV0APMTB)/2.,0,rot)); - v0APM82->AddNode(v0APMT82, 1, new TGeoTranslation(-1.5*autoShift, 0, 0)); - v0APM82->AddNode(v0APMT82, 2, new TGeoTranslation(-0.5*autoShift, 0, 0)); - v0APM82->AddNode(v0APMT82, 3, new TGeoTranslation(+0.5*autoShift, 0, 0)); - v0APM82->AddNode(v0APMT82, 4, new TGeoTranslation(+1.5*autoShift, 0, 0)); - - /// PM 2ndo - rot = new TGeoRotation("rot"); - rot->RotateX(-90+30); - rot->RotateY(0); - rot->RotateZ(65+3); - double shiftZ82 = fV0APMBHt/2. * cosAngPMB - - ( fV0ASciWd + 2 * fV0AOctWd + 2 * fV0APlaWd )/2. - fV0APMBTh/2. * sinAngPMB; - double shiftR82 = fV0AR6 + fV0AR1 + fV0AOctWd + fV0APlaAl/3.; - v0ASec8->AddNode(v0APM82,1, new TGeoCombiTrans( shiftR82*cos45, -shiftR82*sin45, shiftZ82, rot)); - - // Replicate sectors - for(int i=0; i<1; i++) { - TGeoRotation *rot = new TGeoRotation("rot", 90., i*45., 90., 90.+i*45., 0., 0.); - v0LE->AddNode(v0ASec8,i + 1,rot); - } - - - ///Aluminium nails for sectors 5, 6, 7 and 8 - 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 - v0LE->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); - v0LE->AddNode(v0ANail52,1,new TGeoTranslation(-30.8,-30.04,0.0)); - TGeoTube *sV0ANail61 = new TGeoTube("sV0ANail61", 0.0, 0.4, 5.09/2.); - TGeoVolume *v0ANail61 = new TGeoVolume("V0ANail61", sV0ANail61, medV0APMAlum); - v0ANail61->SetLineColor(kV0AColorPMA);// this is the color for aluminium - v0LE->AddNode(v0ANail61,1,new TGeoTranslation(-0.51,-42.9,0.0)); - TGeoTube *sV0ANail53 = new TGeoTube("sV0ANail53", 0.0, 0.4, 5.09/2.); - TGeoVolume *v0ANail53 = new TGeoVolume("V0ANail53", sV0ANail53, medV0APMAlum); - v0ANail53->SetLineColor(kV0AColorPMA); - v0LE->AddNode(v0ANail53,1,new TGeoTranslation(-30.05,-30.79,0.0)); // -29.8,-31.04,0.0 - TGeoTube *sV0ANail71 = new TGeoTube("sV0ANail71", 0.0, 0.4, 5.09/2.); - TGeoVolume *v0ANail71 = new TGeoVolume("V0ANail71", sV0ANail71, medV0APMAlum); - v0ANail71->SetLineColor(kV0AColorPMA);// this is the color for aluminium - v0LE->AddNode(v0ANail71,1,new TGeoTranslation(0.51,-42.9,0.0)); - TGeoTube *sV0ANail83 = new TGeoTube("sV0ANail83", 0.0, 0.4, 5.09/2.); - TGeoVolume *v0ANail83 = new TGeoVolume("V0ANail83", sV0ANail83, medV0APMAlum); - v0ANail83->SetLineColor(kV0AColorPMA); - v0LE->AddNode(v0ANail83,1,new TGeoTranslation(29.8,-31.04,0.0)); + v0ASec8->AddNode(v0APM8,1, new TGeoCombiTrans( shiftR8*cos225 + 1.3, -shiftR8*sin225, shiftZ8, rot)); + + // Aluminium nails TGeoTube *sV0ANail81 = new TGeoTube("sV0ANail81", 0.0, 0.4, 5.09/2.); TGeoVolume *v0ANail81 = new TGeoVolume("V0ANail81", sV0ANail81, medV0APMAlum); v0ANail81->SetLineColor(kV0AColorPMA);// this is the color for aluminium - v0LE->AddNode(v0ANail81,1,new TGeoTranslation(42.9,-.51,0.0)); + v0ASec8->AddNode(v0ANail81,1,new TGeoTranslation(42.9,-.51,0.0)); TGeoTube *sV0ANail82 = new TGeoTube("sV0ANail82", 0.0, 0.4, 5.09/2.); TGeoVolume *v0ANail82 = new TGeoVolume("V0ANail82", sV0ANail82, medV0APMAlum); v0ANail82->SetLineColor(kV0AColorPMA); - v0LE->AddNode(v0ANail82,1,new TGeoTranslation(30.8,-30.04,0.0)); - - - - /* /// Basis Construction - rot = new TGeoRotation("rot"); rot->RotateX(90-fV0APMBAng); rot->RotateZ(-22.5); - TGeoCombiTrans *pos1 = new TGeoCombiTrans("pos1", shiftR*sin225, shiftR*cos225, shiftZ, rot); - pos1->RegisterYourself(); - for (int i=0;i<2;i++) { - v0APts[0+8*i] = fV0AR6/cos225*sin45; v0APts[1+8*i] = fV0AR6/cos225*sin45; - v0APts[2+8*i] = 0; v0APts[3+8*i] = fV0AR6/cos225; - v0APts[4+8*i] = 0; v0APts[5+8*i] = fV0AR6/cos225+fV0APlaEx; - v0APts[6+8*i] = fV0AR6/cos225-(fV0AR6/cos225+fV0APlaEx)/ctg225; - v0APts[7+8*i] = fV0AR6/cos225+fV0APlaEx; - } - new TGeoArb8("sV0APlaExIn1", (fV0APlaWd-2*fV0APlaAl)/2., v0APts); - new TGeoArb8("sV0APlaExOu1", fV0APlaAl/2., v0APts); - TGeoCompositeShape *sV0APlaExIn = new TGeoCompositeShape("sV0APlaExIn","sV0APlaExIn1-sV0APMB1:pos1"); - TGeoVolume *v0APlaExIn = new TGeoVolume("V0APlaExIn", sV0APlaExIn, medV0APlaIn); - TGeoCompositeShape *sV0APlaExOu = new TGeoCompositeShape("sV0APlaExOu","sV0APlaExOu1-sV0APMB1:pos1"); - TGeoVolume *v0APlaExOu = new TGeoVolume("V0APlaExOu", sV0APlaExOu, medV0APlaOu); - v0APlaExIn->SetLineColor(kV0AColorPlaIn); v0APlaExOu->SetLineColor(kV0AColorPlaOu); - TGeoVolume *v0APlaEx = new TGeoVolumeAssembly("V0APlaEx"); - v0APlaEx->AddNode(v0APlaExIn,1); - v0APlaEx->AddNode(v0APlaExOu,1,new TGeoTranslation(0,0,(fV0APlaWd-fV0APlaAl)/2.)); - v0APlaEx->AddNode(v0APlaExOu,2,new TGeoTranslation(0,0,-(fV0APlaWd-fV0APlaAl)/2.)); - for (int i=0;i<2;i++) { - v0APts[0+8*i] = fV0AR6/cos225-(fV0AR6/cos225+fV0APlaEx)/ctg225-fV0ABasHt*sin45; - v0APts[1+8*i] = fV0AR6/cos225+fV0APlaEx-fV0ABasHt*sin45; - v0APts[2+8*i] = 0; v0APts[3+8*i] = fV0AR6/cos225+fV0APlaEx-fV0ABasHt; - v0APts[4+8*i] = 0; v0APts[5+8*i] = fV0AR6/cos225+fV0APlaEx; - v0APts[6+8*i] = fV0AR6/cos225-(fV0AR6/cos225+fV0APlaEx)/ctg225; - v0APts[7+8*i] = fV0AR6/cos225+fV0APlaEx; - } - new TGeoArb8("sV0ABas1", (fV0ASciWd+2*fV0AOctWd)/2., v0APts); - TGeoCompositeShape *sV0ABas = new TGeoCompositeShape("sV0ABas","sV0ABas1-sV0APMB1:pos1"); - TGeoVolume *v0ABas = new TGeoVolume("V0ABas", sV0ABas, medV0ABas); - v0ABas->SetLineColor(kV0AColorBas); - TGeoVolume *v0ABasis = new TGeoVolumeAssembly("V0ABasis"); - rot = new TGeoRotation("rot",90.,180.,90.,90.,0.,0.); - v0ABasis->AddNode(v0APlaEx,1, new TGeoTranslation(0,0,(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.)); - v0ABasis->AddNode(v0APlaEx,2, new TGeoTranslation(0,0,-(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.)); - v0ABasis->AddNode(v0APlaEx,3, new TGeoCombiTrans(0,0,(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.,rot)); - v0ABasis->AddNode(v0APlaEx,4, new TGeoCombiTrans(0,0,-(fV0ASciWd+2*fV0AOctWd+fV0APlaWd)/2.,rot)); - v0ABasis->AddNode(v0ABas,1); - v0ABasis->AddNode(v0ABas,2,rot); - rot = new TGeoRotation("rot"); - rot->RotateZ(180); - v0LE->AddNode(v0ABasis,1,rot); */ - + v0ASec8->AddNode(v0ANail82,1,new TGeoTranslation(30.8,-30.04,0.0)); + + // Adding sector to v0LE volume + v0LE->AddNode(v0ASec8, 1); + + // Adding detectors to top volume TGeoVolume *vZERO = new TGeoVolumeAssembly("VZERO"); vZERO->AddNode(v0RI,1,new TGeoTranslation(0, 0, -zdet)); - // V0A position according to TB decision 13/12/2005 - //rot=new TGeoRotation("rot"); - //rot->RotateX(90); - //rot->RotateY(180); - //rot->RotateZ(270); - vZERO->AddNode(v0LE,1,new TGeoTranslation(0, 0, +327.5));//,rot)); + vZERO->AddNode(v0LE,1,new TGeoTranslation(0, 0, +327.5)); top->AddNode(vZERO,1); } @@ -1752,8 +1728,8 @@ void AliVZEROv7::CreateMaterials() AliDebug(2,"Create materials"); // Parameters for simulation scope - Int_t fieldType = gAlice->Field()->Integ(); // Field type - Double_t maxField = gAlice->Field()->Max(); // Field max. + Int_t fieldType = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ(); // Field type + Double_t maxField = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max(); // Field max. Double_t maxBending = 10; // Max Angle Double_t maxStepSize = 0.01; // Max step size Double_t maxEnergyLoss = 1; // Max Delta E @@ -2033,6 +2009,9 @@ void AliVZEROv7::StepManager() nPhotonsInStep = 0; numStep = 0; } + if( gMC->IsTrackEntering() || gMC->IsTrackExiting() ) { + AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kVZERO); + } } } @@ -2063,8 +2042,8 @@ void AliVZEROv7::MakeBranch(Option_t *option) sprintf(branchname,"%s",GetName()); AliDebug(2,Form("fBufferSize = %d",fBufferSize)); const char *cH = strstr(option,"H"); - if (fHits && TreeH() && cH) { - TreeH()->Branch(branchname,&fHits, fBufferSize); + if (fHits && fLoader->TreeH() && cH) { + fLoader->TreeH()->Branch(branchname,&fHits, fBufferSize); AliDebug(2,Form("Making Branch %s for hits",branchname)); } const char *cD = strstr(option,"D"); @@ -2104,9 +2083,32 @@ Int_t AliVZEROv7::GetCellId(Int_t *vol, Float_t *hits) } fCellId = index; } else if (hits[2] > 0.0) { - index = (index - 7 + 48) + ( ( ringNumber - 1 ) * 8); - fCellId = index; + // cout << " vol[0] = " << vol[0] << " copy : " << vol[1] + // << " called " << gMC->VolName(vol[0]) << endl; + // cout << " vol[2] = " << vol[2] << " copy : " << vol[3] + // << " called " << gMC->VolName(vol[2]) << endl; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L1")) fCellId = vol[1]+47; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L2")) fCellId = 8+vol[1]+47; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L3")) fCellId = 16+vol[1]+47; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L4")) fCellId = 24+vol[1]+47; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L15")) fCellId = 48+4; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L16")) fCellId = 48+5; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L17")) fCellId = 48+6; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L18")) fCellId = 48+7; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L25")) fCellId = 8+48+4; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L26")) fCellId = 8+48+5; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L27")) fCellId = 8+48+6; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L28")) fCellId = 8+48+7; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L35")) fCellId = 16+48+4; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L36")) fCellId = 16+48+5; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L37")) fCellId = 16+48+6; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L38")) fCellId = 16+48+7; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L45")) fCellId = 24+48+4; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L46")) fCellId = 24+48+5; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L47")) fCellId = 24+48+6; + if (gMC->CurrentVolID(vol[2]) == gMC->VolId("V0L48")) fCellId = 24+48+7; } return fCellId; } +