- //Create interactoin point in center path with Be
- Double_t origIPHlength = 57.25; // from drawing
- Double_t ro=fIpPipeRo, width=fIpPipeWidth, zLength = origIPHlength*2;
- TGeoVolume *ipPipe = gGeoManager->MakeTube("IP_PIPE",(TGeoMedium*)kMedBe,ro-width,ro,zLength/2.);
- ipPipe->SetLineColor(kBe);
- voCp1Mo->AddNode(ipPipe,3,new TGeoTranslation(0,dyS,dzS));
-
- //Create C-side section Length 24.65 cm
- Double_t cyl1Length = 15.6;
- Double_t cylLength = 2.0;
- Double_t bellowLength = 3.8;
- // TGeoVolume* voCylVac = new TGeoVolume("cylVAC", new TGeoTube(0., ro-width,cylLength / 2.), kMedVac);
- // voCylVac->SetLineColor(kVac);
- TGeoVolume* cyl = new TGeoVolume("cyl", new TGeoTube(ro-width, ro, cylLength / 2.), kMedAlu);
- // cyl->AddNode(voCylVac, 1, gGeoIdentity);
- cyl->SetLineColor(kAlu);
- voCp1Mo->AddNode(cyl,1,new TGeoTranslation(0.,dyS,dzS+zLength/2+cylLength/2));
- voCp1Mo->AddNode(cyl,2,new TGeoTranslation(0.,dyS,dzS+zLength/2+cylLength+bellowLength + cylLength/2));
- voCp1Mo->AddNode(cyl,3,new TGeoTranslation(0.,dyS,dzS+zLength/2+cyl1Length-cylLength/2 -bellowLength -cylLength));
- voCp1Mo->AddNode(cyl,4,new TGeoTranslation(0.,dyS,dzS+zLength/2+cyl1Length-cylLength/2));
-
-
- Double_t cyl2Length = 1.0;
- Double_t cone1Length = 9.05-cyl2Length;
- TGeoVolume *cone1 = gGeoManager->MakeCone("cone1",(TGeoMedium*)kMedAlu, cone1Length/2, 3.-width,3., ro-width,ro);
- cone1->SetLineColor(kAlu);
- TGeoRotation *rot1 = new TGeoRotation("rot1",0.,180.,0.); // not needed
- TGeoCombiTrans *combi1 = new TGeoCombiTrans(0,dyS,dzS+zLength/2+cyl1Length+cone1Length/2,rot1);
- voCp1Mo->AddNode(cone1,2,combi1);
+ if (fIpHLength>63.5) AliFatal("Chosen half length of the Be part at the IP is too large (>63.5cm)");
+ if (fIpHLength<20.) AliFatal("Chosen half length of the Be part at the IP is too small. (<20cm). Most likely hits the ITS upgrade structure");
+
+
+ // ++++++++++++++++++++++++++++++++++++++
+ //Create IP (interactoin point) in center path with Be
+
+ Double_t ro=fIpPipeRo, width=fIpPipeWidth, ipLengthZ = fIpHLength*2;
+ TGeoVolume *ipPipe = gGeoManager->MakeTube("IP_PIPE",(TGeoMedium*)kMedBe,ro-width,ro,ipLengthZ/2.);
+ ipPipe->SetLineColor(kBe);
+ voCp1bMo->AddNode(ipPipe,3,new TGeoTranslation(0,dyS,dzS));
+
+ // ++++++++++++++++++++++++++++++++++++++
+ // Create A-side section
+ Double_t lengthFromIp = 468.0;
+
+ dzS = +(468.0-fIpHLength)/2+fIpHLength;
+
+
+ // Flansh in A side
+ Double_t cylFALength = 1.4, coneFALength = 1.87;
+ TGeoVolume *cylFA = gGeoManager->MakeTube("cylFA",(TGeoMedium*)kMedAlu,3.0-width,3.5, cylFALength/2);
+ cylFA->SetLineColor(kAlu);
+ TGeoVolume *coneFA = gGeoManager->MakeCone("coneFA",(TGeoMedium*)kMedAlu,coneFALength/2, 3.-width,3.,2.5-width,2.5);
+ coneFA->SetLineColor(kAlu);
+
+ voCp1aMo->AddNode(cylFA,2,new TGeoTranslation(0.,dyS,dzS- lengthFromIp + cylFALength/2));
+ voCp1aMo->AddNode(coneFA,3,new TGeoTranslation(0,dyS,dzS- lengthFromIp + cylFALength + coneFALength/2));
+
+ // rest
+
+ TGeoMedium *med = (TGeoMedium*)kMedAlu; if (fConeIsBe) med = (TGeoMedium*)kMedBe;
+
+ Double_t cylSmallALength = 2.0;
+ Double_t coneALength = 2.61;
+ Double_t cylLargeALength = lengthFromIp - ipLengthZ/2 - cylSmallALength - coneALength - cylFALength - coneFALength;
+
+ TGeoVolume *coneA = gGeoManager->MakeCone("coneA",med,coneALength/2,2.5-width,2.5,ro-width,ro);
+ TGeoVolume *cylLargeA = new TGeoVolume("cylLargeA", new TGeoTube(2.5-width, 2.5, cylLargeALength/2),med);
+ TGeoVolume *cylSmallA = new TGeoVolume("cylSmallA", new TGeoTube(ro-width, ro, cylSmallALength/2),med);
+
+ if (fConeIsBe) {
+ coneA->SetLineColor(kBe);
+ cylSmallA->SetLineColor(kBe);
+ cylLargeA->SetLineColor(kBe);
+ } else {
+ coneA->SetLineColor(kAlu);
+ cylSmallA->SetLineColor(kAlu);
+ cylLargeA->SetLineColor(kAlu);
+ }
+
+ voCp1aMo->AddNode(cylLargeA,4,new TGeoTranslation(0,dyS,dzS-lengthFromIp+cylFALength+coneFALength + cylLargeALength/2));
+ voCp1aMo->AddNode(coneA, 5,new TGeoTranslation(0,dyS,dzS-lengthFromIp+cylFALength+coneFALength + cylLargeALength +coneALength/2 ));
+ voCp1aMo->AddNode(cylSmallA,6,new TGeoTranslation(0,dyS,dzS-lengthFromIp+cylFALength+coneFALength + cylLargeALength +coneALength + cylSmallALength/2));