From 0141fa8a312d22555e7630db366b97e6c5f8ea90 Mon Sep 17 00:00:00 2001 From: carlos-soncco Date: Sat, 26 Jan 2019 17:38:38 -0500 Subject: [PATCH 01/22] change-new-cone --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 1587 ++++++++++++-------- 1 file changed, 965 insertions(+), 622 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 3660b21a0bdc3..68267d3728665 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -11,7 +11,10 @@ /// \file HalfCone.cxx /// \brief Class building geometry of one half of one MFT half-cone /// \author sbest@pucp.pe, eric.endress@gmx.de, franck.manso@clermont.in2p3.fr -/// \date 15/12/2016 + +/// Carlos csoncco@pucp.edu.pe +/// \date 20/01/2019 + #include "TGeoManager.h" #include "TGeoMatrix.h" @@ -25,6 +28,7 @@ #include "TGeoTube.h" #include "TGeoTrd1.h" #include "TMath.h" +#include "TGeoXtru.h" #include "MFTBase/HalfCone.h" @@ -46,625 +50,964 @@ HalfCone::~HalfCone() = default; TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) { - auto* HalfConeVolume = new TGeoVolumeAssembly("HalfConeVolume"); - - // Left Support Rail - auto* Half_0 = new TGeoVolumeAssembly("Half_0"); - - TGeoMedium* kMedAlu = gGeoManager->GetMedium("MFT_Alu$"); - - // Dimensions - - // Lower Piece (6 holes) - // Float_t Lower_x = 2.0; // to avoid overlap with disks, fm, largeur des barres horizontales - Float_t Lower_x = 1.6; - Float_t Lower_y = 1.15; - Float_t Lower_z = 10.7; - - // Middle Piece - // Float_t Middle_x = 2.0; // to avoid overlap with disks, fm - Float_t Middle_x = 1.6; - Float_t Middle_y = 1.15 + 0.00001; - Float_t Middle_z = 14.45; - - // Upper Piece (8 holes) - // Float_t Upper_x = 2.0; // to avoid overlap with disks, fm - Float_t Upper_x = 0.2; - Float_t Upper_y = 1.15; - Float_t Upper_z = 15.291; - - // Upper piece cut - Float_t Upper_cut_x = 4.0; - Float_t Upper_cut_y = 1.15; - Float_t Upper_cut_z = 3.0; - - // Lower piece cut - Float_t Lower_cut_x = 2.0; - Float_t Lower_cut_y = 1.15 + 0.0001; - Float_t Lower_cut_z = 0.6; - - // Trapezoid - Float_t trap_xmax = 2.2; - Float_t trap_xmin = 1.2; - Float_t trap_y = 1.15; - Float_t trap_z = 1.0; - - // Angle of the Middle Piece - auto* MiddleAngle = new TGeoRotation("MiddleAngle", 90., 40., 90.); - - // X distance from the center - Float_t z_Upper_distance = (Upper_z + 9.759) / 2.; // Upper z-length and the distance from Upper to Lower borders - Float_t z_Lower_distance = -(Lower_z + 9.759) / 2.; // Lower z-length and the distance from Upper to Lower borders - // Distance from upper to lower piece - Float_t UpperLowerDistance = 8.8; - - // Upper center Distance - auto* TUpper = new TGeoTranslation("TUpper", UpperLowerDistance / 2., 0., z_Upper_distance); - // Lower center Distance - auto* TLower = new TGeoTranslation("TLower", -UpperLowerDistance / 2., 0., z_Lower_distance); - // Lower cut distance coordinates - auto* TCutUpper = - new TGeoTranslation("TCutUpper", 4.0, .8 + 0.000001, (z_Upper_distance + Upper_z / 2.) + (Upper_cut_z / 2.) - 1.2); - // Upper cut distance coordinates - auto* TCutLower = - new TGeoTranslation("TCutLower", -4.4 - 1.5, 0., (z_Lower_distance + Lower_z / 2.) - (Lower_cut_z / 2.)); - // Trapezoid center Distance (the trapezoid for the upper piece is defined in two parts) - auto* TTrap_0 = new TGeoTranslation("TTrap_0", 2.9, 0., z_Upper_distance + Upper_z / 2. - (trap_xmax / 2.)); - auto* TTrap_1 = - new TGeoTranslation("TTrap_1", 2.9, 0., z_Upper_distance + Upper_z / 2. - (trap_xmax + trap_xmin) / 4.); - - // Rotations - auto* Ry90 = new TGeoRotation("Ry90", 90., 90., 90.); - - // Combined transformations for the trapezoid - auto* cTrap_0 = new TGeoCombiTrans(*TTrap_0, *Ry90); - auto* cTrap_1 = new TGeoCombiTrans(*TTrap_1, *Ry90); - - MiddleAngle->RegisterYourself(); - TUpper->RegisterYourself(); - TLower->RegisterYourself(); - TCutUpper->RegisterYourself(); - TCutLower->RegisterYourself(); - TTrap_0->RegisterYourself(); - TTrap_1->RegisterYourself(); - Ry90->RegisterYourself(); - cTrap_0->SetName("cTrap_0"); - cTrap_0->RegisterYourself(); - cTrap_1->SetName("cTrap_1"); - cTrap_1->RegisterYourself(); - - // Basic Forms for Half_0 - TGeoShape* Half_0_Upper = new TGeoBBox("Half_0_Upper", Upper_x / 2., Upper_y / 2., Upper_z / 2.); - TGeoShape* Half_0_Lower = new TGeoBBox("Half_0_Lower", Lower_x / 2., Lower_y / 2., Lower_z / 2.); - TGeoShape* Half_0_Middle = new TGeoBBox("Half_0_Middle", Middle_x / 2., Middle_y / 2., Middle_z / 2.); - TGeoShape* Half_0_Trap_0 = new TGeoTrd1("Half_0_Trap_0", trap_xmin / 2., trap_xmax / 2., trap_y / 2., trap_z / 2.); - TGeoShape* Half_0_Trap_1 = new TGeoBBox("Half_0_Trap_1", (trap_xmax + trap_xmin) / 4. + 0.00001, - trap_y / 2. + 0.00001, trap_z / 2. + 0.000001); - TGeoShape* Half_0_UpperCut = new TGeoBBox("Half_0_UpperCut", Upper_cut_x / 2., Upper_cut_y / 2., Upper_cut_z / 2.); - TGeoShape* Half_0_LowerCut = new TGeoBBox("Half_0_LowerCut", Lower_cut_x / 2., Lower_cut_y / 2., Lower_cut_z / 2.); - - // Composite shapes for Half_0 - auto* Half_0_Shape_0 = - new TGeoCompositeShape("Half_0_Shape_0", "Half_0_Middle:MiddleAngle+Half_0_Lower:TLower+Half_0_Upper:TUpper"); - auto* Half_0_Shape_1 = - new TGeoCompositeShape("Half_0_Shape_1", "Half_0_Shape_0+Half_0_Trap_0:cTrap_0+Half_0_Trap_1:cTrap_1"); - auto* Half_0_Shape_2 = - new TGeoCompositeShape("Half_0_Shape_2", "Half_0_Shape_1-(Half_0_UpperCut:TCutUpper+Half_0_LowerCut:TCutLower)"); - /* - //Holes - - Float_t hole_distance = 250.5-152.91; - - TGeoRotation *Rx90 = new TGeoRotation("Rx90",0.,90.,0.); - TGeoTranslation *THalf_0_Hole0 = new TGeoTranslation("THalf_0_Hole0",0.,0.,hole_distance-6.); - TGeoTranslation *THalf_0_Hole1 = new TGeoTranslation("THalf_0_Hole1",0.,0.,hole_distance-6.); - TGeoTranslation *THalf_0_Hole2 = new TGeoTranslation("THalf_0_Hole2",0.,0.,hole_distance-32.); - TGeoTranslation *THalf_0_Hole3 = new TGeoTranslation("THalf_0_Hole3",0.,0.,hole_distance-32.-13.5); - TGeoTranslation *THalf_0_Hole4 = new TGeoTranslation("THalf_0_Hole4",0.,0.,hole_distance-74.); - TGeoTranslation *THalf_0_Hole5 = new TGeoTranslation("THalf_0_Hole5",0.,0.,hole_distance-74.-13.5); - TGeoTranslation *THalf_0_Hole6 = new TGeoTranslation("THalf_0_Hole6",0.,0.,hole_distance-116.); - TGeoTranslation *THalf_0_Hole7 = new TGeoTranslation("THalf_0_Hole7",0.,0.,hole_distance-116.-13.5); - - TGeoTranslation *THalf_0_Hole8 = new TGeoTranslation("THalf_0_Hole8",0.,0.,0.); - TGeoTranslation *THalf_0_Hole9 = new TGeoTranslation("THalf_0_Hole9",0.,0.,0.); - TGeoTranslation *THalf_0_Hole10 = new TGeoTranslation("THalf_0_Hole10",0.,0.,0.); - TGeoTranslation *THalf_0_Hole11 = new TGeoTranslation("THalf_0_Hole11",0.,0.,0.); - TGeoTranslation *THalf_0_Hole12 = new TGeoTranslation("THalf_0_Hole12",0.,0.,0.); - TGeoTranslation *THalf_0_Hole13 = new TGeoTranslation("THalf_0_Hole13",0.,0.,0.); - - TGeoCombiTrans *cHalf_0_Hole0 = new TGeoCombiTrans(*THalf_0_Hole0, *Rx90); - TGeoCombiTrans *cHalf_0_Hole1 = new TGeoCombiTrans(*THalf_0_Hole1, *Rx90); - TGeoCombiTrans *cHalf_0_Hole2 = new TGeoCombiTrans(*THalf_0_Hole2, *Rx90); - TGeoCombiTrans *cHalf_0_Hole3 = new TGeoCombiTrans(*THalf_0_Hole3, *Rx90); - TGeoCombiTrans *cHalf_0_Hole4 = new TGeoCombiTrans(*THalf_0_Hole4, *Rx90); - TGeoCombiTrans *cHalf_0_Hole5 = new TGeoCombiTrans(*THalf_0_Hole5, *Rx90); - TGeoCombiTrans *cHalf_0_Hole6 = new TGeoCombiTrans(*THalf_0_Hole6, *Rx90); - TGeoCombiTrans *cHalf_0_Hole7 = new TGeoCombiTrans(*THalf_0_Hole7, *Rx90); - TGeoCombiTrans *cHalf_0_Hole8 = new TGeoCombiTrans(*THalf_0_Hole8, *Rx90); - TGeoCombiTrans *cHalf_0_Hole9 = new TGeoCombiTrans(*THalf_0_Hole9, *Rx90); - TGeoCombiTrans *cHalf_0_Hole10 = new TGeoCombiTrans(*THalf_0_Hole10, *Rx90); - TGeoCombiTrans *cHalf_0_Hole11 = new TGeoCombiTrans(*THalf_0_Hole11, *Rx90); - TGeoCombiTrans *cHalf_0_Hole12 = new TGeoCombiTrans(*THalf_0_Hole12, *Rx90); - TGeoCombiTrans *cHalf_0_Hole13 = new TGeoCombiTrans(*THalf_0_Hole13, *Rx90); - - cHalf_0_Hole0->SetName("cHalf_0_Hole0"); - cHalf_0_Hole1->SetName("cHalf_0_Hole1"); - cHalf_0_Hole2->SetName("cHalf_0_Hole2"); - cHalf_0_Hole3->SetName("cHalf_0_Hole3"); - cHalf_0_Hole4->SetName("cHalf_0_Hole4"); - cHalf_0_Hole5->SetName("cHalf_0_Hole5"); - cHalf_0_Hole6->SetName("cHalf_0_Hole6"); - cHalf_0_Hole7->SetName("cHalf_0_Hole7"); - cHalf_0_Hole8->SetName("cHalf_0_Hole8"); - cHalf_0_Hole9->SetName("cHalf_0_Hole9"); - cHalf_0_Hole10->SetName("cHalf_0_Hole10"); - cHalf_0_Hole11->SetName("cHalf_0_Hole11"); - cHalf_0_Hole12->SetName("cHalf_0_Hole12"); - cHalf_0_Hole13->SetName("cHalf_0_Hole13"); - - cHalf_0_Hole0->RegisterYourself(); - cHalf_0_Hole1->RegisterYourself(); - cHalf_0_Hole2->RegisterYourself(); - cHalf_0_Hole3->RegisterYourself(); - cHalf_0_Hole4->RegisterYourself(); - cHalf_0_Hole5->RegisterYourself(); - cHalf_0_Hole6->RegisterYourself(); - cHalf_0_Hole7->RegisterYourself(); - cHalf_0_Hole8->RegisterYourself(); - cHalf_0_Hole9->RegisterYourself(); - cHalf_0_Hole10->RegisterYourself(); - cHalf_0_Hole11->RegisterYourself(); - cHalf_0_Hole12->RegisterYourself(); - cHalf_0_Hole13->RegisterYourself(); - - Float_t Half_0_r0 = 4./2.; - Float_t Half_0_r1 = 5./2.; - Float_t Half_0_r2 = 6./2.; - Float_t Half_0_r3 = 6.5/2.; - - TGeoShape * Half_0_Hole0 = new TGeoTube("Half_0_Hole0",0.,Half_0_r3,Upper_y+0.00001); - TGeoShape * Half_0_Hole1 = new TGeoTube("Half_0_Hole1",0.,Half_0_r2,Upper_y+0.00001); - TGeoShape * Half_0_Hole2 = new TGeoTube("Half_0_Hole2",0.,Half_0_r1,Upper_y+0.00001); - TGeoShape * Half_0_Hole3 = new TGeoTube("Half_0_Hole3",0.,Half_0_r0,Upper_y+0.00001); - TGeoShape * Half_0_Hole4 = new TGeoTube("Half_0_Hole4",0.,Half_0_r1,Upper_y+0.00001); - TGeoShape * Half_0_Hole5 = new TGeoTube("Half_0_Hole5",0.,Half_0_r0,Upper_y+0.00001); - TGeoShape * Half_0_Hole6 = new TGeoTube("Half_0_Hole6",0.,Half_0_r1,Upper_y+0.00001); - TGeoShape * Half_0_Hole7 = new TGeoTube("Half_0_Hole7",0.,Half_0_r0,Upper_y+0.00001); - - TGeoShape * Half_0_Hole8 = new TGeoTube("Half_ -0_Hole8",0.,Half_0_r1,Lower_y+0.00001); - TGeoShape * Half_0_Hole9 = new TGeoTube("Half_0_Hole9",0.,Half_0_r0,Lower_y+0.00001); - TGeoShape * Half_0_Hole10 = new TGeoTube("Half_0_Hole10",0.,Half_0_r1,Lower_y+0.00001); - TGeoShape * Half_0_Hole11 = new TGeoTube("Half_0_Hole11",0.,Half_0_r0,Lower_y+0.00001); - TGeoShape * Half_0_Hole12 = new TGeoTube("Half_0_Hole12",0.,Half_0_r1,Lower_y+0.00001); - TGeoShape * Half_0_Hole13 = new TGeoTube("Half_0_Hole13",0.,Half_0_r0,Lower_y+0.00001); - - TGeoCompositeShape * Half_0_Holes = new -TGeoCompositeShape("Half_0_Holes","Half_0_Hole0:cHalf_0_Hole0+Half_0_Hole1:cHalf_0_Hole1+Half_0_Hole2:cHalf_0_Hole2+Half_0_Hole3:cHalf_0_Hole3+Half_0_Hole4:cHalf_0_Hole4+Half_0_Hole5:cHalf_0_Hole5+Half_0_Hole6:cHalf_0_Hole6+Half_0_Hole7:cHalf_0_Hole7+Half_0_Hole8:cHalf_0_Hole8+Half_0_Hole9:cHalf_0_Hole9+Half_0_Hole10:cHalf_0_Hole10+Half_0_Hole11:cHalf_0_Hole11+Half_0_Hole12:cHalf_0_Hole12+Half_0_Hole13:cHalf_0_Hole13"); - TGeoCompositeShape * Half_0_Shape_3 = new TGeoCompositeShape("Half_0_Shape_3","Half_0_Shape_2+Half_0_Holes"); - */ - auto* Half_0_Volume = new TGeoVolume("Half_0_Volume", Half_0_Shape_2, kMedAlu); - // Position of the piece relative to the origin which for this code is the center of the the Framework piece (See - // Half_2) - Half_0->AddNode(Half_0_Volume, 1, - new TGeoTranslation(25.6 - 5.4 - .05, -1.15 / 2. + 7.3 + .35, -34.55 / 2. - 4.591 / 2. - .25)); - - // Right Support Rail (the distances and rotations are the same, just mirrored with respect to the yz-plane) - // See the definition of the distances in the Half_0 piece - auto* Half_1 = new TGeoVolumeAssembly("Half_1"); - - // Angle of the Middle Piece - auto* MiddleAngle_inv = new TGeoRotation("MiddleAngle_inv", 90., -40., 90.); - - // X distance from the center - Float_t z_Upper_distance_inv = -(Upper_z + 9.759) / 2.; // Upper x-length and the distance from Upper to Lower borders - Float_t z_Lower_distance_inv = (Lower_z + 9.759) / 2.; // Lower x-length and the distance from Upper to Lower borders - - // Upper center Distance - auto* TUpper_inv = new TGeoTranslation("TUpper_inv", -4.4, 0., z_Upper_distance); - // Lower center Distance - auto* TLower_inv = new TGeoTranslation("TLower_inv", 4.4, 0., z_Lower_distance); - // Lower cut distance - auto* TCutUpper_inv = new TGeoTranslation("TCutUpper_inv", -4.0, .8 + 0.000001, - (z_Upper_distance + Upper_z / 2.) + (Upper_cut_z / 2.) - 1.2); - // Upper cut distance - auto* TCutLower_inv = - new TGeoTranslation("TCutLower_inv", 4.4 + 1.5, 0., (z_Lower_distance + Lower_z / 2.) - (Lower_cut_z / 2.)); - // Trapezoid center Distance (the trapezoid for the upper piece is defined in two parts) - auto* TTrap_0_inv = new TGeoTranslation("TTrap_0_inv", -2.9, 0., z_Upper_distance + Upper_z / 2. - (trap_xmax / 2.)); - auto* TTrap_1_inv = - new TGeoTranslation("TTrap_1_inv", -2.9, 0., z_Upper_distance + Upper_z / 2. - (trap_xmax + trap_xmin) / 4.); - - // Rotations - auto* Ry90_inv = new TGeoRotation("Ry90_inv", 90., -90., 90.); - - // Combined transformations for the trapezoid - auto* cTrap_0_inv = new TGeoCombiTrans(*TTrap_0_inv, *Ry90_inv); - auto* cTrap_1_inv = new TGeoCombiTrans(*TTrap_1_inv, *Ry90_inv); - - MiddleAngle_inv->RegisterYourself(); - TUpper_inv->RegisterYourself(); - TLower_inv->RegisterYourself(); - TCutUpper_inv->RegisterYourself(); - TCutLower_inv->RegisterYourself(); - TTrap_0_inv->RegisterYourself(); - TTrap_1_inv->RegisterYourself(); - Ry90_inv->RegisterYourself(); - cTrap_0_inv->SetName("cTrap_0_inv"); - cTrap_0_inv->RegisterYourself(); - cTrap_1_inv->SetName("cTrap_1_inv"); - cTrap_1_inv->RegisterYourself(); - - // Composite shapes for Half_1 - auto* Half_1_Shape_0 = new TGeoCompositeShape( - "Half_1_Shape_0", "Half_0_Middle:MiddleAngle_inv+Half_0_Lower:TLower_inv+Half_0_Upper:TUpper_inv"); - auto* Half_1_Shape_1 = - new TGeoCompositeShape("Half_1_Shape_1", "Half_1_Shape_0+Half_0_Trap_0:cTrap_0_inv+Half_0_Trap_1:cTrap_1_inv"); - auto* Half_1_Shape_2 = new TGeoCompositeShape( - "Half_1_Shape_2", "Half_1_Shape_1-(Half_0_UpperCut:TCutUpper_inv+Half_0_LowerCut:TCutLower_inv)"); - - auto* Half_1_Volume = new TGeoVolume("Half_1_Volume", Half_1_Shape_2, kMedAlu); - // Position of the piece relative to the origin which for this code is the center of the the Framework piece (See - // Half_2) - Half_1->AddNode(Half_1_Volume, 1, - new TGeoTranslation(-25.6 + 5.4 + .05, -1.15 / 2. + 7.3 + .35, -34.55 / 2. - 4.591 / 2. - .25)); - - // Framework - auto* Half_2 = new TGeoVolumeAssembly("Half_2"); - - // Definitions - Float_t Framework_rmin = 23.6; - Float_t Framework_rmax = 30.3; - Float_t Framework_z = .6; - // - Float_t Framework_Bottom_z = 1.35; - - // Holes definition - - // Radii - Float_t Hole_rmin_0 = 25.5; - Float_t Hole_rmax_0 = 28.0; - Float_t Hole_rmax_1 = 27.5; - Float_t Hole_rmin_2 = 29.0; - Float_t Hole_z = 1.8; - - // Angles - Float_t Framework_Angle = 12.3838; - // Holes maximum and minimum angles - Float_t angle_0_min = 20.; - Float_t angle_0_max = 70.; - Float_t angle_1_min = 80.; - Float_t angle_1_max = 100.; - Float_t angle_2_min = 110.; - Float_t angle_2_max = 160.; - Float_t angle_3_min = 75.; - Float_t angle_3_max = 105.; - // Middle step - Float_t Step_Angle = 2.; - - // Translations - // Distances for the cuts of the upper central hole. - auto* tHole3 = new TGeoTranslation("tHole3", 8.0, 30., 0.); - auto* tHole3m = new TGeoTranslation("tHole3m", -8.0, 30., 0.); - // Distances for the bottom and bottom limit cuts. - auto* tLimit = new TGeoTranslation("tLimit", 0., 9.3 + 6.5, - -(Framework_z + Hole_z + 2.) / 2. - 0.00001); // Half the y-direction of the box - auto* tLimit_2 = new TGeoTranslation("tLimit_2", 0., 9.3, - (Framework_z + Hole_z + 2.) / 2. - 0.00001); // Half the y-direction of the box - auto* tLimitm = new TGeoTranslation("tLimitm", 0., 9.3 + 6.5, - (Framework_z + Hole_z + 2.) / 2. + 0.00001); // Half the y-direction of the box - auto* tBottom = new TGeoTranslation("tBottom", 0., 0., -.175); - // Distance for the steps - auto* tStep_0 = new TGeoTranslation("tStep_0", 0., 0., -.3); - auto* tStep_1 = new TGeoTranslation("tStep_1", 0., 0., .15 / 2.); - - tHole3m->RegisterYourself(); - tHole3->RegisterYourself(); - tLimit->RegisterYourself(); - tLimit_2->RegisterYourself(); - tLimitm->RegisterYourself(); - tBottom->RegisterYourself(); - tStep_0->RegisterYourself(); - tStep_1->RegisterYourself(); - - // Basic shapes for Half_2 - - TGeoShape* Framework = new TGeoTubeSeg("Framework", Framework_rmin, Framework_rmax, Framework_z / 2., Framework_Angle, - 180. - Framework_Angle); - // This are the elevations at the ends of the framework arc, this number (15) doesn't matter, it just has to be big - // enough for the cut. - TGeoShape* Framework_Bottom_0 = new TGeoTubeSeg("Framework_Bottom_0", Framework_rmin, Framework_rmax, - Framework_Bottom_z / 2., Framework_Angle, 15. + Framework_Angle); - // Same for the 165 here. - TGeoShape* Framework_Bottom_1 = - new TGeoTubeSeg("Framework_Bottom_1", Framework_rmin, Framework_rmax, Framework_Bottom_z / 2., - 165. - Framework_Angle, 180. - Framework_Angle); - // This is the elevation at the center of the framework arc. The extra in the z-length is the length of the steps. - TGeoShape* Framework_Step_0 = new TGeoTubeSeg("Framework_Step_0", Hole_rmax_1, Framework_rmax, - (Framework_z + .6) / 2. + 0.00001, 90. - Step_Angle, 90. + Step_Angle); - TGeoShape* Framework_Step_1 = new TGeoTubeSeg("Framework_Step_1", Hole_rmax_1, Hole_rmin_2, - (Framework_z + .15) / 2. + 0.00001, 90. - Step_Angle, 90. + Step_Angle); - // This three are the holes in the framework arc - TGeoShape* Hole_Framework_0 = - new TGeoTubeSeg("Hole_Framework_0", Hole_rmin_0, Hole_rmax_0, Hole_z / 2., angle_0_min, angle_0_max); - TGeoShape* Hole_Framework_1 = - new TGeoTubeSeg("Hole_Framework_1", Hole_rmin_0, Hole_rmax_1, Hole_z / 2., angle_1_min, angle_1_max); - TGeoShape* Hole_Framework_2 = - new TGeoTubeSeg("Hole_Framework_2", Hole_rmin_0, Hole_rmax_0, Hole_z / 2., angle_2_min, angle_2_max); - - // This is the hole in the upper middle of the framework arc (the .005 is to make a good cut) - TGeoShape* Hole_Framework_3 = - new TGeoTubeSeg("Hole_Framework_3", Hole_rmin_2, Framework_rmax + .005, Hole_z / 2., angle_3_min, angle_3_max); - // The upper central hole is not just an arc, its limits are straigth lines. - TGeoShape* Hole3_Limit = new TGeoBBox("Hole3_Limit", 2. / 2., 5. / 2., (Hole_z + 0.0001) / 2.); - // This are the cuts for the bottom parts of the framework. - TGeoShape* Framework_Limit_0 = new TGeoBBox("Framework_Limit_0", 60. / 2., 13. / 2., Hole_z / 2. + 1.); - TGeoShape* Framework_Limit_1 = new TGeoBBox("Framework_Limit_1", 51.2 / 2., 14.6 / 2., Hole_z / 2. + 1.); - - // Composite shapes for Half_2 - // The first term is the framework arc and the bottom limits - // The second term is the three other holes in the arc. - // The third term is just the upper center hole. I also include here the limits to shape the ends of the framework - // arc. - // This can be done with smaller pieces, but more of them. I don't know which is better. - auto* Half_2_Shape_0 = - new TGeoCompositeShape("Half_2_Shape_0", "Hole_Framework_3-(Hole3_Limit:tHole3m+Hole3_Limit:tHole3)"); - auto* Half_2_Shape_1 = new TGeoCompositeShape("Half_2_Shape_1", - "(Framework+Framework_Bottom_0:tBottom+Framework_Bottom_1:tBottom) - " - "(Hole_Framework_0+Hole_Framework_1+Hole_Framework_2)-(Half_2_Shape_0+" - "Framework_Limit_1:tLimit_2+Framework_Limit_0:tLimit+Framework_Limit_0:" - "tLimitm+Framework_Limit_0+Framework_Limit_1) "); - // Add square behind the step in the middle - auto* Half_2_Shape_2 = - new TGeoCompositeShape("Half_2_Shape_2", "Half_2_Shape_1+Framework_Step_0:tStep_0+Framework_Step_1:tStep_1"); - - auto* Half_2_Volume = new TGeoVolume("Half_2_Volume", Half_2_Shape_2, kMedAlu); - - Half_2->AddNode(Half_2_Volume, 1, new TGeoTranslation(0., 0., 0.)); - - // Shell - // This piece is not coded exactly, - - auto* Half_3 = new TGeoVolumeAssembly("Half_3"); - - // Shell radii - Float_t Shell_rmax = 60.6 + .7; - Float_t Shell_rmin = 37.5 + .7; - - // Rotations and translations - auto* tShell_0 = new TGeoTranslation("tShell_0", 0., 0., 3.1 + (25.15 + 1.) / 2.); - auto* tShell_1 = new TGeoTranslation("tShell_1", 0., 0., -1.6 - (25.15 + 1.) / 2.); - auto* tShellHole = new TGeoTranslation("tShellHole", 0., 0., 2. / 2. + (25.15 + 1.) / 2.); - auto* tShellHole_0 = new TGeoTranslation("tShellHole_0", 0., -6.9, -26.1 / 2. - 6.2 / 2. - .1); - auto* tShellHole_1 = new TGeoTranslation("tShellHole_1", 0., 0., -26.1 / 2. - 6.2 / 2. - .1); - auto* tShell_Cut = new TGeoTranslation("tShell_Cut", 0., 25. / 2., 0.); - auto* tShell_Cut_1 = new TGeoTranslation("tShell_Cut_1", -23., 0., -8.); - auto* tShell_Cut_1_inv = new TGeoTranslation("tShell_Cut_1_inv", 23., 0., -8.); - auto* Rz = new TGeoRotation("Rz", 50., 0., 0.); - auto* Rz_inv = new TGeoRotation("Rz_inv", -50., 0., 0.); - auto* RShell_Cut = new TGeoRotation("RShell_Cut", 90., 90. - 24., -7.5); - auto* RShell_Cut_inv = new TGeoRotation("RShell_Cut_inv", 90., 90. + 24., -7.5); - - auto* cShell_Cut = new TGeoCombiTrans(*tShell_Cut_1, *RShell_Cut); - auto* cShell_Cut_inv = new TGeoCombiTrans(*tShell_Cut_1_inv, *RShell_Cut_inv); - - tShell_0->RegisterYourself(); - tShell_1->RegisterYourself(); - tShellHole->RegisterYourself(); - tShellHole_0->RegisterYourself(); - tShellHole_1->RegisterYourself(); - tShell_Cut->RegisterYourself(); - Rz->RegisterYourself(); - Rz_inv->RegisterYourself(); - RShell_Cut->RegisterYourself(); - cShell_Cut->SetName("cShell_Cut"); - cShell_Cut->RegisterYourself(); - cShell_Cut_inv->SetName("cShell_Cut_inv"); - cShell_Cut_inv->RegisterYourself(); - - // Basic shapes for Half_3 - TGeoShape* Shell_0 = new TGeoTubeSeg("Shell_0", Shell_rmax / 2. - .1, Shell_rmax / 2., 6.2 / 2., 12., 168.); - TGeoShape* Shell_1 = new TGeoTubeSeg("Shell_1", Shell_rmin / 2. - .1, Shell_rmin / 2., 3.2 / 2., 0., 180.); - TGeoShape* Shell_2 = new TGeoConeSeg("Shell_2", (25.15 + 1.0) / 2., Shell_rmin / 2. - .1, Shell_rmin / 2., - Shell_rmax / 2. - .1, Shell_rmax / 2., 0., 180.); - TGeoShape* Shell_3 = new TGeoTube("Shell_3", 0., Shell_rmin / 2. + .1, .1 / 2.); - TGeoShape* ShellHole_0 = new TGeoTrd1("ShellHole_0", 17.5 / 4., 42.5 / 4., 80. / 2., (25.15 + 1.) / 2.); - TGeoShape* ShellHole_1 = new TGeoBBox("ShellHole_1", 42.5 / 4., 80. / 2., 2. / 2. + 0.00001); - TGeoShape* ShellHole_2 = new TGeoBBox("ShellHole_2", 58.9 / 4., (Shell_rmin - 2.25) / 2., .4 / 2. + 0.00001); - TGeoShape* ShellHole_3 = new TGeoBBox("ShellHole_3", 80. / 4., (Shell_rmin - 11.6) / 2., .4 / 2. + 0.00001); - - // For the extra cut, not sure if this is the shape (apprx. distances) - TGeoShape* Shell_Cut_0 = new TGeoTube("Shell_Cut_0", 0., 3.5, 5. / 2.); - TGeoShape* Shell_Cut_1 = new TGeoBBox("Shell_Cut_1", 7. / 2., 25. / 2., 5. / 2.); - - // Composite shapes for Half_3 - auto* Half_3_Shape_0 = new TGeoCompositeShape("Half_3_Shape_0", "Shell_Cut_0+Shell_Cut_1:tShell_Cut"); - auto* Half_3_Shape_1 = - new TGeoCompositeShape("Half_3_Shape_1", "Shell_2-Half_3_Shape_0:cShell_Cut-Half_3_Shape_0:cShell_Cut_inv"); - auto* Half_3_Shape_2 = new TGeoCompositeShape("Half_3_Shape_2", "ShellHole_0+ShellHole_1:tShellHole"); - auto* Half_3_Shape_3 = new TGeoCompositeShape( - "Half_3_Shape_3", "Shell_3:tShellHole_1 - (ShellHole_2:tShellHole_1+ShellHole_3:tShellHole_0)"); - auto* Half_3_Shape_4 = - new TGeoCompositeShape("Half_3_Shape_4", - "(Shell_0:tShell_0 + Half_3_Shape_1+ Shell_1:tShell_1) - (Half_3_Shape_2 + " - "Half_3_Shape_2:Rz + Half_3_Shape_2:Rz_inv)+Half_3_Shape_3"); - - auto* Half_3_Volume = new TGeoVolume("Half_3_Volume", Half_3_Shape_4, kMedAlu); - // Position of the piece relative to the origin which for this code is the center of the the Framework piece (See - // Half_2) - Half_3->AddNode(Half_3_Volume, 1, new TGeoTranslation(0., 0., -19.)); - - // Half_4 - // Front Framework - - // The part is the arc, the two legs of the sides, and 4 cuts. - - auto* Half_4 = new TGeoVolumeAssembly("Half_4"); - - // Front dimensions - Float_t Front_rmin = 19.7; - Float_t Front_rmax = 21.5; - Float_t Front_z = .6; - Float_t Front_Angle = 38.612; - - // Legs dimensions - Float_t Leg_x = 2.; - Float_t Leg_y = 6.917; - Float_t Leg_z = .6; - Float_t Distance_Leg_x = 14.8; - Float_t Distance_Leg_y = 6.5; - - // Lateral legs cut dimensions - Float_t Leg_Lateral_Cut_x = 1.5; - Float_t Leg_Lateral_Cut_y = 1.15; - - // Translations - // The position of the legs - auto* tLeg_Right = new TGeoTranslation("tLeg_Right", Distance_Leg_x + Leg_x / 2., Distance_Leg_y + Leg_y / 2., 0.); - auto* tLeg_Left = new TGeoTranslation("tLeg_Left", -Distance_Leg_x - Leg_x / 2., Distance_Leg_y + Leg_y / 2., 0.); - // Distances to the center of the piece to make the cut. - auto* tLeg_Cut_Right = - new TGeoTranslation("tLeg_Cut_Right", -Distance_Leg_x - (Leg_x - Leg_Lateral_Cut_x) - Leg_Lateral_Cut_x / 2., - Distance_Leg_y + Leg_Lateral_Cut_y / 2., 0.); - auto* tLeg_Cut_Left = - new TGeoTranslation("tLeg_Cut_Left", Distance_Leg_x + (Leg_x - Leg_Lateral_Cut_x) + Leg_Lateral_Cut_x / 2., - Distance_Leg_y + Leg_Lateral_Cut_y / 2., 0.); - // y-length to the upper cut, plus half the y-length of the leg_Upper_Cut - auto* tLeg_Cut_Upper = new TGeoTranslation("tLeg_Cut_Upper", 0., 21.4 + .25, 0.); - - tLeg_Right->RegisterYourself(); - tLeg_Left->RegisterYourself(); - tLeg_Cut_Right->RegisterYourself(); - tLeg_Cut_Left->RegisterYourself(); - tLeg_Cut_Upper->RegisterYourself(); - - // Basic shapes of Half_4 - - TGeoShape* Front = new TGeoTubeSeg("Front", Front_rmin, Front_rmax, Front_z / 2., Front_Angle, 180. - Front_Angle); - TGeoShape* leg = new TGeoBBox("leg", Leg_x / 2., Leg_y / 2., Leg_z / 2.); - // The lateral cut is used twice, so there are 4 cuts. The z dimension is just a bit bigger so it cuts completly the - // piece. - // To avoid another translation, the y length is made so that it reaches the piece and cuts the needed. - TGeoShape* leg_Central_Cut = new TGeoBBox("leg_Central_Cut", 1.8 / 2., 40.4 / 2., Leg_z / 2. + 0.001); - TGeoShape* leg_Lateral_Cut = - new TGeoBBox("leg_Lateral_Cut", (1.5 + 0.0001) / 2., (1.15 + 0.0001) / 2., Leg_z / 2. + 0.001); - // This shape only has to be bigger than the section to cut. - TGeoShape* leg_Upper_Cut = new TGeoBBox("leg_Upper_Cut", 4. / 2., .5 / 2., Leg_z / 2. + 0.001); - - // The front piece + the 2 legs, and then making the 4 cuts - auto* Half_4_Shape_0 = - new TGeoCompositeShape("Half_4_Shape_0", - "(Front+leg:tLeg_Right+leg:tLeg_Left)-(leg_Central_Cut+leg_Lateral_Cut:tLeg_Cut_Right+leg_" - "Lateral_Cut:tLeg_Cut_Left+leg_Upper_Cut:tLeg_Cut_Upper)"); - - auto* Half_4_Volume = new TGeoVolume("Half_4_Volume", Half_4_Shape_0, kMedAlu); - // Position of the piece relative to the origin which for this code is the center of the the Framework piece (See - // Half_2) - Half_4->AddNode(Half_4_Volume, 1, new TGeoTranslation(0., 0., -25.)); - - // Half_5 - - // Support PCB - auto* Half_5 = new TGeoVolumeAssembly("Half_5"); - - // Dimensions - - Float_t PCB_Angle = 24.3838; - - // Float_t PCB_Central_Projection = 25.15; // overlap issue, fm - Float_t PCB_Central_Projection = 24.00; - - Float_t PCB_Central_x = .8; - Float_t PCB_Central_y = .5; - Float_t PCB_Central_z = PCB_Central_Projection / cos(PCB_Angle * TMath::Pi() / 180.); - - Float_t PCB_Right_x = .8; - Float_t PCB_Right_y = .5; - Float_t PCB_Right_z = 3.2; - - Float_t PCB_Left_x = .8; - Float_t PCB_Left_y = .5; - Float_t PCB_Left_z = 6.2; - - // Translations, rotations and combinations - - auto* RxPCB = new TGeoRotation("RxPCB", 0., -PCB_Angle, 0.); - // Distance of one support to the other one. (this refers to the whole piece) - auto* tPCB = new TGeoTranslation("tPCB", .6, 0., 0.); - auto* tPCB_inv = new TGeoTranslation("tPCB_inv", -.6, 0., 0.); - // Distance of the Left and Right piece from the center piece. (this refers to parts of the piece) - auto* tPCB_Right = new TGeoTranslation("tPCB_Right", 0., -(12.4 - (PCB_Right_y + PCB_Left_y)) / 2., - -(PCB_Central_Projection + PCB_Right_z) / 2.); - auto* tPCB_Left = new TGeoTranslation("tPCB_Left", 0., (12.4 - (PCB_Right_y + PCB_Left_y)) / 2., - (PCB_Central_Projection + PCB_Left_z) / 2.); - // Distance of the cut - auto* tPCB_Cut = new TGeoTranslation("tPCB_Cut", 0., -(12.4 / 2. - 3.6 + 2. / 2.), - -(PCB_Central_Projection / 2. - (10.1 - PCB_Right_z) - 2. / 2.)); - - RxPCB->RegisterYourself(); - tPCB->RegisterYourself(); - tPCB_inv->RegisterYourself(); - tPCB_Right->RegisterYourself(); - tPCB_Left->RegisterYourself(); - tPCB_Cut->RegisterYourself(); - - TGeoShape* Central_PCB = new TGeoBBox("Central_PCB", PCB_Central_x / 2., PCB_Central_y / 2., PCB_Central_z / 2.); - TGeoShape* Right_PCB = new TGeoBBox("Right_PCB", PCB_Right_x / 2., PCB_Right_y / 2., PCB_Right_z / 2.); - TGeoShape* Left_PCB = new TGeoBBox("Left_PCB", PCB_Left_x / 2., PCB_Left_y / 2., PCB_Left_z / 2.); - - TGeoShape* Cut_PCB = new TGeoBBox("Cut_PCB", 4. / 2., 2. / 2., 2. / 2.); - - auto* Half_5_Shape_0 = - new TGeoCompositeShape("Half_5_Shape_0", "Central_PCB:RxPCB+Right_PCB:tPCB_Right+Left_PCB:tPCB_Left"); - auto* Half_5_Shape_1 = new TGeoCompositeShape("Half_5_Shape_1", "Half_5_Shape_0:tPCB + Half_5_Shape_0:tPCB_inv"); - auto* Half_5_Shape_2 = new TGeoCompositeShape("Half_5_Shape_2", "Half_5_Shape_1 - Cut_PCB:tPCB_Cut"); - - auto* Half_5_Volume = new TGeoVolume("Half_5_Volume", Half_5_Shape_2, kMedAlu); - Half_5->AddNode(Half_5_Volume, 1, new TGeoTranslation(0., 30.283 - 6.2, -(28.35 / 2. + 3.2) - .9 - .6 - .5)); - - // The final translation and rotation of the Half Cone to its final position, this are the parameters of the function - - // Position of the radius center of the Framework (See Half_2) - Float_t tTotal_x; - Float_t tTotal_y; - Float_t tTotal_z; - - // Angle of the Half Cone, the z-axis is pointing in the beam axis, and the y-axis in the uppward direction. (It is in - // Euler angles) - Float_t rTotal_x; - Float_t rTotal_y; - Float_t rTotal_z; - - if (half == 0) { - rTotal_x = 90.; - rTotal_y = 180.; - rTotal_z = 90.; - tTotal_x = 0.; - // tTotal_y = -0.1; // to be defined - tTotal_y = -0.5; // to avoid overlap with disks, fm, vertical position of the total - tTotal_z = -80.0; // position still to be defined - } - if (half == 1) { - rTotal_x = 90.; - rTotal_y = 180.; - rTotal_z = -90.; - tTotal_x = 0.; - // tTotal_y = 0.1; // to be defined - tTotal_y = 0.5; // to avoid overlap with disks, fm, vertical position of the total - tTotal_z = -80.0; // position still to be defined - } - - auto* tTotal = new TGeoTranslation("tTotal", tTotal_x, tTotal_y, tTotal_z); - auto* rTotal = new TGeoRotation("rTotal", rTotal_x, rTotal_y, rTotal_z); - auto* cTotal = new TGeoCombiTrans(*tTotal, *rTotal); - - // overlap problem - HalfConeVolume->AddNode(Half_0, 0, cTotal); // barres intérieures horizontales fm - HalfConeVolume->AddNode(Half_1, 0, cTotal); // barres intérieures horizontales fm - HalfConeVolume->AddNode(Half_2, 0, cTotal); - HalfConeVolume->AddNode(Half_3, 0, cTotal); - HalfConeVolume->AddNode(Half_4, 0, cTotal); // support milieu perpendiculaire - HalfConeVolume->AddNode(Half_5, 0, cTotal); // barre médiane - - return HalfConeVolume; + auto *HalfConeVolume = new TGeoVolumeAssembly("HalfConeVolume"); + + TGeoMedium *kMedAlu = gGeoManager->GetMedium("MFT_Alu$"); + //--- define some materials + TGeoMaterial *matVacuum = new TGeoMaterial("Vacuum", 0,0,0); + TGeoMaterial *matAl = new TGeoMaterial("Al", 26.98,13,2.7); + // //--- define some media + TGeoMedium *Vacuum = new TGeoMedium("Vacuum",1, matVacuum); + TGeoMedium *Al = new TGeoMedium("Root Material",2, matAl); + /////Rotation //// + + TGeoRotation *rot1 = new TGeoRotation("rot1", 180,-180,0); + + rot1->RegisterYourself(); + TGeoRotation *rot2 = new TGeoRotation("rot2", 90,-90,0); + + rot2->RegisterYourself(); + + TGeoRotation *rot3 = new TGeoRotation("rot3", 0,90,0); + rot3->RegisterYourself(); + + TGeoRotation *rot_90x = new TGeoRotation("rot_90x", 0,-90,0); // half0 + + rot_90x->RegisterYourself(); + + TGeoRotation *rot_base = new TGeoRotation("rot_base", 180,180,0); // rail_r + rot_base->RegisterYourself(); + + + TGeoCombiTrans *combi1 = new TGeoCombiTrans(0, -10.3, 1.29, rot1); //y=-10.80 belt + combi1->RegisterYourself(); + TGeoCombiTrans *combi2 = new TGeoCombiTrans(-16.8, 0., 0., rot2); + + combi2->RegisterYourself(); + TGeoRotation *r0 = new TGeoRotation("r0",10.,0.,0.); + r0->RegisterYourself(); + + ///// 1st piece --------- Cross_beam_MB0----------------------/// + + auto *Cross_mb0 = new TGeoVolumeAssembly("Cross_mb0"); + /// variables + // rectangular box + Double_t x_box_mb0 =14.4; // dx= 7.2 cm + Double_t y_box_mb0 =0.6; + Double_t z_box_mb0 =0.6; + + ///// holes tub 1hole tranversal + Double_t radin_1hole_mb0=0.; + Double_t radout_1hole_mb0=0.175;// diameter 3.5 H9 (0.35cm) + Double_t high_1hole_mb0=0.7;/// + + TGeoRotation *rot_1hole_mb0 = new TGeoRotation("rot_1hole_mb0", 0,90,0); + rot_1hole_mb0->RegisterYourself(); + /// h= hole + TGeoCombiTrans *acombi_1h_mb0 = new TGeoCombiTrans(5.2,0, 0,rot_1hole_mb0); + acombi_1h_mb0->SetName("acombi_1h_mb0"); + acombi_1h_mb0->RegisterYourself(); + TGeoCombiTrans *bcombi_1h_mb0 = new TGeoCombiTrans(-5.2,0, 0,rot_1hole_mb0);//y= + bcombi_1h_mb0->SetName("bcombi_1h_mb0"); + bcombi_1h_mb0->RegisterYourself(); + + ///// 2hole coaxial + Double_t radin_2hole_mb0=0.; + Double_t radout_2hole_mb0=0.15;// diameter M3 + Double_t high_2hole_mb0=1.2;/// 12 + + TGeoRotation *rot_2hole_mb0 = new TGeoRotation("rot_2hole_mb0", 90,90,0); + rot_2hole_mb0->SetName("rot_2hole_mb0"); + rot_2hole_mb0->RegisterYourself(); + + TGeoCombiTrans *combi_2hole_mb0 = new TGeoCombiTrans(6.7,0, 0,rot_2hole_mb0); + combi_2hole_mb0->SetName("combi_2hole_mb0"); + combi_2hole_mb0->RegisterYourself(); + + TGeoCombiTrans *combi_2hole_mb0_b = new TGeoCombiTrans(-6.7,0, 0,rot_2hole_mb0);//y= + combi_2hole_mb0_b->SetName("combi_2hole_mb0_b"); + combi_2hole_mb0_b->RegisterYourself(); + + // shape for cross_mb0 + + auto *s_box_mb0 =new TGeoBBox("S_BOX_MB0", x_box_mb0/2,y_box_mb0/2,z_box_mb0/2); + auto *s_1hole_mb0=new TGeoTube("S_1HOLE_MB0",radin_1hole_mb0,radout_1hole_mb0,high_1hole_mb0/2); + auto *s_2hole_mb0=new TGeoTube("S_2HOLE_MB0",radin_2hole_mb0,radout_2hole_mb0,high_2hole_mb0/2); + + ///composite shape for mb0 + + auto * c_mb0_Shape_0 = new TGeoCompositeShape("c_mb0_Shape_0","S_BOX_MB0 - S_1HOLE_MB0:acombi_1h_mb0 - S_1HOLE_MB0:bcombi_1h_mb0 - S_2HOLE_MB0:combi_2hole_mb0 -S_2HOLE_MB0:combi_2hole_mb0_b"); + + /////////////////// + auto * cross_mb0_Volume = new TGeoVolume("cross_mb0_Volume",c_mb0_Shape_0,kMedAlu); + + Cross_mb0->AddNode(cross_mb0_Volume,1); + +//////////////////////////////////////////// + + ///// 2nd piece ------ cross beam--MFT---------(cbeam)----- + + auto *Cross_mft = new TGeoVolumeAssembly("Cross_mft"); + /// variables + + // using the same "box" of the 1 piece + ////////// 2hole coaxial + Double_t radin_hole_cbeam=0.; + Double_t radout_hole_cbeam=0.15;// diameter M3 + Double_t high_hole_cbeam=0.91;/// + + // same rotation in tub aximatAl "rot_2hole_mb0" + + TGeoCombiTrans *combi_hole_1cbeam = new TGeoCombiTrans(6.8,0, 0,rot_2hole_mb0); + combi_hole_1cbeam->SetName("combi_hole_1cbeam"); + combi_hole_1cbeam->RegisterYourself(); + + TGeoCombiTrans *combi_hole_2cbeam = new TGeoCombiTrans(-6.8,0, 0,rot_2hole_mb0); + combi_hole_2cbeam->SetName("combi_hole_2cbeam"); + combi_hole_2cbeam->RegisterYourself(); + + // shape for shape cross beam + + auto *s_hole_cbeam=new TGeoTube("S_HOLE_CBEAM",radin_hole_cbeam,radout_hole_cbeam,high_hole_cbeam/2); + + /// composite shape for cross beam (using the same box of mb0) + auto * c_cbeam_Shape = new TGeoCompositeShape("c_cbeam_Shape","S_BOX_MB0 - S_HOLE_CBEAM:combi_hole_1cbeam - S_HOLE_CBEAM:combi_hole_2cbeam"); + + /////////////////// + auto * Cross_mft_Volume = new TGeoVolume("Cross_mft_Volume",c_cbeam_Shape,kMedAlu); + + Cross_mft->AddNode(Cross_mft_Volume,1); +//////////////////////////////////////////// + + + ////3th piece -------- Framework front ------------ + + auto *Fra_front = new TGeoVolumeAssembly("Fra_front"); + auto *Fra_front_L = new TGeoVolumeAssembly("Fra_front_L"); + auto *Fra_front_R = new TGeoVolumeAssembly("Fra_front_R"); + + Double_t x_box_up =0.6; // cm + Double_t y_box_up =0.605; + Double_t z_box_up =2.84; + //hole up // + Double_t dia_tub_up=0.35; + Double_t high_tub_up=0.65; + //hole down//// + Double_t dia_tubdown =0.35; + Double_t high_tubdown =0.68; + // + Double_t x_boxA_down=0.8; + Double_t y_boxA_down=0.6; + Double_t z_boxA_down=0.6; + // + Double_t x_boxB_down=0.6; + Double_t y_boxB_down=0.605; + Double_t z_boxB_down=1.26; // 12.6 + //seg tub + Double_t radin_segtub=16.9; + Double_t radout_segtub=17.5; + Double_t high_segtub=0.6; + Double_t ang_in_segtub=212.1; + Double_t ang_fin_segtub=241.92; // + + /////// trans. rot. + TGeoCombiTrans *combi_3a = new TGeoCombiTrans(-7.4, 0, 8.975,rot2); + combi_3a->SetName("combi_3a"); + combi_3a->RegisterYourself(); + + TGeoTranslation *tr1_up = new TGeoTranslation("tr1_up",-7.4,0,8.28); // + + tr1_up->RegisterYourself(); + + TGeoTranslation *tr1_tub1 = new TGeoTranslation("tr1_tub1",0,0.,3.075); + tr1_tub1->RegisterYourself(); + + TGeoCombiTrans *combi_3b = new TGeoCombiTrans(7.118, 0, 16.16,rot3); + combi_3b->SetName("combi_3b"); + combi_3b->RegisterYourself(); + + TGeoTranslation *tr_2_box = new TGeoTranslation("tr_2_box",-0.4,0,0.7); // + tr_2_box->RegisterYourself(); + + TGeoTranslation *tr3_box = new TGeoTranslation("tr3_box",-1.1,0,0.63); // + tr3_box->RegisterYourself(); + + TGeoTranslation *tr_tubdown = new TGeoTranslation("tr_tubdown",-0.4,0,0.7); // + tr_tubdown->RegisterYourself(); + + /////// shape for framewor front + + TGeoShape *s_box_up = new TGeoBBox("BOX_UP", x_box_up/2,y_box_up/2,z_box_up/2); + + TGeoShape *s_tub_up=new TGeoTube("TUB_UP",0.,dia_tub_up/2,high_tub_up/2); // + TGeoShape *s_seg_tub=new TGeoTubeSeg("SEG_TUB",radin_segtub,radout_segtub,high_segtub/2,ang_in_segtub,ang_fin_segtub);//r_in,r_out,dZ,ang,ang + + TGeoShape *s_boxB_down = new TGeoBBox("BOXB_DOWN", x_boxB_down/2,y_boxB_down/2,z_boxB_down/2); + + TGeoShape * s_boxA_down = new TGeoBBox("BOXA_DOWN", x_boxA_down/2,y_boxA_down/2,z_boxA_down/2); + + TGeoShape *s_tubdown=new TGeoTube("S_TUBDOWN",0.,dia_tubdown/2,high_tubdown/2); + + //Composite shapes for Fra_front + auto * Fra_front_Shape_0 = new TGeoCompositeShape("Fra_front_Shape_0","BOX_UP:tr1_up +SEG_TUB:combi_3b+ BOXB_DOWN:tr3_box + BOXA_DOWN:tr_2_box"); + + auto * Fra_front_Shape_1 = new TGeoCompositeShape("Fra_front_Shape_1","Fra_front_Shape_0 - S_TUBDOWN:tr_tubdown -TUB_UP:combi_3a"); + auto * Fra_front_Shape_2 = new TGeoCompositeShape("Fra_front_Shape_2","Fra_front_Shape_1:rot_90x -TUB_UP:combi_3a"); //- + + TGeoRotation *rot_z180x90 = new TGeoRotation("rot_z180x90", 180,90,0);//half0_R + rot_z180x90->RegisterYourself(); + + + TGeoRotation *rot_halfR = new TGeoRotation("rot_halfR", 180,180,0);//half0_R + rot_halfR->RegisterYourself(); + TGeoCombiTrans *combi_front_L = new TGeoCombiTrans(-7.1, -16.2, 32.5+0.675,rot_90x);//x=7.35, y=0, z=15.79 + combi_front_L->SetName("combi_front_L"); + combi_front_L->RegisterYourself(); + + TGeoCombiTrans *combi_front_R = new TGeoCombiTrans(7.1, -16.2, 32.5+0.675,rot_z180x90);//x=7.35, y=0, z=15.79 + combi_front_R->SetName("combi_front_R"); + combi_front_R->RegisterYourself(); + + + auto * Fra_front_Shape_3 = new TGeoCompositeShape("Fra_front_Shape_3","Fra_front_Shape_2:rot_halfR "); + + auto * Fra_front_Volume = new TGeoVolume("Fra_front_Volume",Fra_front_Shape_1,kMedAlu); + + Fra_front_L->AddNode(Fra_front_Volume,1,combi_front_L); + Fra_front_R->AddNode(Fra_front_Volume,1,combi_front_R); + + Fra_front->AddNode(Fra_front_L,1); + Fra_front->AddNode(Fra_front_R,2); + + ///////////////////////////////////////////////----- + + //4th piece ------------------"BASE" framework half support ------ + + auto *base = new TGeoVolumeAssembly("base"); + + //seg tub disc + Double_t radin_disc=23.6; + Double_t radout_disc=30.3; + Double_t high_disc=1.35; + Double_t ang_in_disc=180; + Double_t ang_fin_disc=360; + + ///// holes tub 1hole tranversal o3.5 + Double_t radin_holeB=0.; + Double_t radout_holeB=0.175;// diameter 3.5 H11 + Double_t high_holeB=1.5;/// + TGeoTranslation *tr1_holeB = new TGeoTranslation("tr1_holeB",-7.5,-28.8,0); + tr1_holeB->RegisterYourself(); + + TGeoTranslation *tr2_holeB = new TGeoTranslation("tr2_holeB",7.5,-28.8,0); + tr2_holeB->RegisterYourself(); + + //box 1 + Double_t x_1box=61.0; + Double_t y_1box=13.0; + Double_t z_1box=1.4; + //box 2 + Double_t x_2box=51.2; + Double_t y_2box=14.6; + Double_t z_2box=1.4; + //box 3 + Double_t x_3box=45.1; + Double_t y_3box=23.812; + Double_t z_3box=1.4; + //seg tub hole + Double_t radin_1hole=29.3; + Double_t radout_1hole=30.3; + Double_t high_1hole=1.4; + Double_t ang_in_1hole=205; + Double_t ang_fin_1hole=225; + //seg tub 2 hole + Double_t radin_2hole=23.0; + Double_t radout_2hole=25.5; + Double_t high_2hole=1.4; + Double_t ang_in_2hole=207.83; + Double_t ang_fin_2hole=249.998; + //seg tub 3 ARC central xy SEG_3ARC U + Double_t radin_3hole=25.5; + Double_t radout_3hole=27.5;//304 + Double_t high_3hole=1.35; + Double_t ang_in_3hole=255.253; + Double_t ang_fin_3hole=284.746; //284.746 + //// hole central down |_| since x=-70 to 0 + Double_t xc_box= 7.0 ; + Double_t yc_box= 5.772; + Double_t zc_box= 1.4; + + TGeoTranslation *tr_cbox = new TGeoTranslation("tr_cbox",-xc_box/2,-radout_disc+0.888,0); // + tr_cbox->RegisterYourself(); + //box 4 lamine 1 + Double_t x_labox=60.0; + Double_t y_labox=30.3; + Double_t z_labox=0.305; + TGeoTranslation *tr_la = new TGeoTranslation("tr_la",0,-y_labox/2-9.3,high_disc/2); // + tr_la->RegisterYourself(); + + /////box 5 lamin 2 + Double_t x_2labox=51.2; + Double_t y_2labox=2.8; //C-B + Double_t z_2labox=0.303; + TGeoTranslation *tr_2la = new TGeoTranslation("tr_2la",0,-8.1,high_disc/2); // + tr_2la->RegisterYourself(); + + ///////// circular border C //--SEG_BORD ---- + //seg tub 3 xy + Double_t radin_bord=0.5; + Double_t radout_bord=0.9;//304 + Double_t high_bord=1.355;///13.5 + Double_t ang_in_bord=0; + Double_t ang_fin_bord=90; + /////TGeoRotation *rot_bord1 = new TGeoRotation("rot_bord1", ang_in_1hole +0.0167,0,0); + TGeoRotation *rot1_bord1 = new TGeoRotation("rot1_bord1", 14.8,0,0); + rot1_bord1->RegisterYourself(); + TGeoCombiTrans *combi_bord1 = new TGeoCombiTrans(-26.7995,-13.0215, 0,rot1_bord1);//y= + combi_bord1->SetName("combi_bord1"); + combi_bord1->RegisterYourself(); + + TGeoRotation *rot2_bord1 = new TGeoRotation("rot2_bord1", -50,0,0); + rot2_bord1->RegisterYourself(); + TGeoCombiTrans *combi2_bord1 = new TGeoCombiTrans(-21.3795,-20.7636, 0,rot2_bord1);//y= + combi2_bord1->SetName("combi2_bord1"); + combi2_bord1->RegisterYourself(); + //////// /__0/ + TGeoRotation *rot1_bord2 = new TGeoRotation("rot1_bord2", 250,0,0); + rot1_bord2->RegisterYourself(); + TGeoCombiTrans *combi1_bord2 = new TGeoCombiTrans(-9.0527,-23.3006, 0,rot1_bord2);//y= + combi1_bord2->SetName("combi1_bord2"); + combi1_bord2->RegisterYourself(); + /////// |°____°| + TGeoRotation *rot_cent_bord = new TGeoRotation("rot_cent_bord", 90,0,0); + rot_cent_bord->RegisterYourself(); + TGeoCombiTrans *combi_cent_bord = new TGeoCombiTrans(-6.5,-27.094, 0,rot_cent_bord);//y= + combi_cent_bord->SetName("combi_cent_bord"); + combi_cent_bord->RegisterYourself(); + ///////////////// box tonge + Double_t x_tong=2.0; + Double_t y_tong=2.81; + Double_t z_tong=1.35; + TGeoTranslation *tr_tong= new TGeoTranslation("tr_tong",0,-28.6,0); // + tr_tong->RegisterYourself(); + //// circular central hole1 to conexion with other parts + Double_t radin_hole1=0; + Double_t radout_hole1=0.4;// + Double_t high_hole1=1.36;/// + TGeoTranslation *tr_hole1= new TGeoTranslation("tr_hole1",0,-28.0,0); //tonge + tr_hole1->RegisterYourself(); + + TGeoTranslation *tr2_hole1= new TGeoTranslation("tr2_hole1",-26.5,-8.5,0); //left + tr2_hole1->RegisterYourself(); + + TGeoTranslation *tr3_hole1= new TGeoTranslation("tr3_hole1",26.5,-8.5,0); //right + tr3_hole1->RegisterYourself(); + ///////////////////////////////////////// + /// circular hole2 ; hole2 r=6.7 + Double_t radin_hole2=0; + Double_t radout_hole2=0.335;// diameter 6.7 + Double_t high_hole2=1.36;///13.5 + TGeoTranslation *tr1_hole2= new TGeoTranslation("tr1_hole2",-28.0,-8.5,0); // + tr1_hole2->RegisterYourself(); + + TGeoTranslation *tr2_hole2= new TGeoTranslation("tr2_hole2",28.0,-8.5,0); // + tr2_hole2->RegisterYourself(); + + +//////////// hole "0" two tubs together + Double_t radin_T1=0.325; // diam 0.65cm + Double_t radout_T1=0.55;// dia 1.1 + Double_t high_T1=1.2;/// dz 6 + + Double_t radin_T2=0; + Double_t radout_T2=1.1;// + Double_t high_T2=1.2;/// dz 6 + ///...................................... ..... + + ///////// shape for base -- + + auto *s_disc=new TGeoTubeSeg("S_DISC",radin_disc,radout_disc,high_disc/2,ang_in_disc,ang_fin_disc); + + auto *s_1box =new TGeoBBox("BOX1", x_1box/2,y_1box/2,z_1box/2); + auto *s_2box =new TGeoBBox("BOX2", x_2box/2,y_2box/2,z_2box/2); + auto *s_3box =new TGeoBBox("BOX3", x_3box/2,y_3box/2,z_3box/2); + auto *s_labox =new TGeoBBox("LA_BOX", x_labox/2,y_labox/2,z_labox/2); + auto *s_2labox =new TGeoBBox("LA_2BOX", x_2labox/2,y_2labox/2,z_2labox/2); + auto *s_cbox =new TGeoBBox("CENTRAL_BOX", xc_box/2,yc_box/2,zc_box/2); + auto *s_tongbox =new TGeoBBox("TONG_BOX", x_tong/2,y_tong/2,z_tong/2); + + TGeoShape *s_seg_1hole=new TGeoTubeSeg("SEG_1HOLE",radin_1hole,radout_1hole,high_1hole/2,ang_in_1hole,ang_fin_1hole);//r_in,r_out,dZ,ang,ang + TGeoShape *s_seg_2hole=new TGeoTubeSeg("SEG_2HOLE",radin_2hole,radout_2hole,high_2hole/2,ang_in_2hole,ang_fin_2hole); + TGeoShape *s_seg_3hole=new TGeoTubeSeg("SEG_3ARC",radin_3hole,radout_3hole,high_3hole/2,ang_in_3hole,ang_fin_3hole);// |u| + TGeoShape *s_seg_bord=new TGeoTubeSeg("SEG_BORD",radin_bord,radout_bord,high_bord/2,ang_in_bord,ang_fin_bord); + + auto *s_circ_hole=new TGeoTube("S_CIRC_HOLE1",radin_hole1,radout_hole1,high_hole1/2); + + auto *s_circ_hole2=new TGeoTube("S_CIRC_HOLE2",radin_hole2,radout_hole2,high_hole2/2); + + auto *s_circ_holeB=new TGeoTube("S_CIRC_HOLEB",radin_holeB,radout_holeB,high_holeB/2); + + //// composite shape for base ---- + + auto * base_Shape_0 = new TGeoCompositeShape("base_Shape_0","S_DISC -BOX1 -BOX2 -BOX3 - S_CIRC_HOLEB:tr1_holeB- S_CIRC_HOLEB:tr2_holeB "); + auto * base_Shape_1 = new TGeoCompositeShape("base_Shape_1","(SEG_1HOLE -SEG_BORD:combi_bord1 -SEG_BORD:combi2_bord1) + SEG_2HOLE-SEG_BORD:combi1_bord2 + CENTRAL_BOX:tr_cbox "); + + auto * base_Shape_2 = new TGeoCompositeShape("base_Shape_2"," SEG_3ARC +SEG_BORD:combi_cent_bord "); //-SEG_BORD:combi_cent_bord + + auto * base_Shape_3 = new TGeoCompositeShape("base_Shape_3"," LA_BOX:tr_la+ LA_2BOX:tr_2la "); + + auto * base_Shape_4 = new TGeoCompositeShape("base_Shape_4","base_Shape_0 -base_Shape_1 - base_Shape_1:rot1 + base_Shape_2 +TONG_BOX:tr_tong -S_CIRC_HOLE1:tr_hole1 -S_CIRC_HOLE1:tr2_hole1 -S_CIRC_HOLE1:tr3_hole1 -S_CIRC_HOLE2:tr1_hole2-S_CIRC_HOLE2:tr2_hole2 -base_Shape_3 "); + + + auto * base_Shape_5 = new TGeoCompositeShape("base_Shape_5","S_DISC-BOX1 -BOX2 -BOX3 -SEG_1HOLE -SEG_2HOLE +SEG_3ARC -SEG_1HOLE:rot1-SEG_2HOLE:rot1 - CENTRAL_BOX:tr_cbox - LA_BOX:tr_la - LA_2BOX:tr_2la + SEG_BORD "); + + auto * base0_Volume = new TGeoVolume("base0_Volume",base_Shape_0,kMedAlu); + auto * base1_Volume = new TGeoVolume("base1_Volume",base_Shape_1,kMedAlu); + auto * base2_Volume = new TGeoVolume("base2_Volume",base_Shape_2,kMedAlu); + auto * base3_Volume = new TGeoVolume("base3_Volume",base_Shape_3,kMedAlu); + auto * base4_Volume = new TGeoVolume("base4_Volume",base_Shape_4,kMedAlu); + + + base->AddNode(base4_Volume,2,rot_base); + //base->AddNode(base4_Volume,2); + ////////////////////////////////////////// + + + ///5th piece MIDLE ------ Framework midle-------------------- + + auto *midle = new TGeoVolumeAssembly("Midle"); + + auto *midle_L = new TGeoVolumeAssembly("Midle_L"); + auto *midle_R = new TGeoVolumeAssembly("Midle_R"); + + + ////box up to quit and to join + Double_t x_midle=0.8; //dx=4 + Double_t y_midle=3.495; //y=34.9 + Double_t z_midle=0.62; //z=6 + // tr1 to join with arc + TGeoTranslation *tr1_midle_box= new TGeoTranslation("tr1_midle_box",-14.4,-0.745,0); //-152,-17.45,0 + tr1_midle_box->RegisterYourself(); + //tr2 to quiet + TGeoTranslation *tr2_midle_box= new TGeoTranslation("tr2_midle_box",-15.2,-0.745,0); //-152,-17.45,0 + tr2_midle_box->RegisterYourself(); + + /////////////////////////// + ////box down_1 + Double_t x_midle_d1box=0.4; //dx=4 + Double_t y_midle_d1box=0.28; + Double_t z_midle_d1box=0.66; + TGeoTranslation *tr_midle_d1box= new TGeoTranslation("tr_midle_d1box",-7.3,-11.96,0.); //81 + tr_midle_d1box->RegisterYourself(); + + /////////////////////////// + ////box down_2 + Double_t x_midle_d2box=0.8; //dx=4 + Double_t y_midle_d2box=1.0; + Double_t z_midle_d2box=0.66; // 6.5 -> 6.6 to quit + TGeoTranslation *tr_midle_d2box= new TGeoTranslation("tr_midle_d2box",-7.5,-12.6249,0); //81 + tr_midle_d2box->RegisterYourself(); + + /////////////////// + //arc circ part + Double_t radin_midle=14.0; + Double_t radout_midle=15.0;// + Double_t high_midle=0.6;/// + Double_t ang_in_midle=180; + Double_t ang_fin_midle=238.21; //alfa=57.60 .(first 237.31) + + ///////////////////////////////////////// + /// circular hole1 ; hole_midle d=3.5 + Double_t radin_mid_1hole=0.; + Double_t radout_mid_1hole=0.175;// diameter 3.5 + Double_t high_mid_1hole=1.5;/// 2.4 + + TGeoRotation *rot_mid_1hole = new TGeoRotation("rot_mid_1hole", 90,90,0); + rot_mid_1hole->RegisterYourself(); + TGeoCombiTrans *combi_mid_1tubhole = new TGeoCombiTrans(-14.2,0.325, 0,rot_mid_1hole);// + combi_mid_1tubhole->SetName("combi_mid_1tubhole"); + combi_mid_1tubhole->RegisterYourself(); + + ///////////////////////////////////////// + /// circular hole2 ; hole_midle d=3 + Double_t radin_mid_2hole=0.; + Double_t radout_mid_2hole=0.15;// diameter 3 + Double_t high_mid_2hole=1.8;/// + + TGeoCombiTrans *combi_mid_2tubhole = new TGeoCombiTrans(-7.7,-12.355, 0,rot_mid_1hole);//x=81 + combi_mid_2tubhole->SetName("combi_mid_2tubhole"); + combi_mid_2tubhole->RegisterYourself(); + + ////////////////////////////////////////////////////// + + + ///////// shape for midle + + auto *s_midle_box =new TGeoBBox("S_MIDLE_BOX", x_midle/2,y_midle/2,z_midle/2); + + auto *s_midle_d1box =new TGeoBBox("S_MIDLE_D1BOX", x_midle_d1box/2,y_midle_d1box/2,z_midle_d1box/2); + + auto *s_midle_d2box =new TGeoBBox("S_MIDLE_D2BOX", x_midle_d2box/2,y_midle_d2box/2,z_midle_d2box/2); + + auto *s_arc_midle=new TGeoTubeSeg("S_ARC_MIDLE",radin_midle,radout_midle,high_midle/2,ang_in_midle,ang_fin_midle); + + auto *s_mid_1tubhole=new TGeoTube("S_MID_1TUBHOLE",radin_mid_1hole,radout_mid_1hole,high_mid_1hole/2); + + auto *s_mid_2tubhole=new TGeoTube("S_MID_2TUBHOLE",radin_mid_2hole,radout_mid_2hole,high_mid_2hole/2); + + //////////////////////////////////////////composite shape for midle + + auto * midle_Shape_0 = new TGeoCompositeShape("midle_Shape_0"," S_ARC_MIDLE + S_MIDLE_BOX:tr1_midle_box-S_MIDLE_BOX:tr2_midle_box-S_MIDLE_D1BOX:tr_midle_d1box-S_MIDLE_D2BOX:tr_midle_d2box "); + + auto * midle_Shape_1 = new TGeoCompositeShape("midle_Shape_1"," midle_Shape_0 -S_MID_1TUBHOLE:combi_mid_1tubhole-S_MID_2TUBHOLE:combi_mid_2tubhole"); + + TGeoRotation *rot_midlez = new TGeoRotation("rot_midley", 180,180,0);//half0_R + rot_midlez->RegisterYourself(); + TGeoCombiTrans *combi_midle_L = new TGeoCombiTrans(0, -7.625, 24.15+0.675,rot_90x);//x=7.35, y=0, z=15.79 -- 0,-7.625,24.15+0.675-80) + combi_midle_L->SetName("combi_midle_L"); + combi_midle_L->RegisterYourself(); + + TGeoTranslation *tr_midle_L= new TGeoTranslation("tr_midle_L",0,-7.625,24.15+0.675); //-152,-17.45,0 + tr_midle_L->RegisterYourself(); + + TGeoCombiTrans *combi_midle_R = new TGeoCombiTrans(0, -7.625,24.15+0.675,rot_midlez);//x=7.35, y=0, z=15.79 + combi_midle_R->SetName("combi_midle_R"); + combi_midle_R->RegisterYourself(); + + auto * midle_Volume = new TGeoVolume("midle_Volume",midle_Shape_1,kMedAlu); + + midle_L->AddNode(midle_Volume,1,tr_midle_L); + midle_R->AddNode(midle_Volume,1,combi_midle_R); + + //midle->AddNode(midle_Volume,1); + midle->AddNode(midle_L,1); + midle->AddNode(midle_R,2); + + //////////////////////////////////////new piece ... _/ \_ + /// Support_rail_L & Support_rail_R + + auto *rail_L_R = new TGeoVolumeAssembly("rail_L_R"); + + //6 piece RAIL LEFT --RL---0000------ + auto *rail_L = new TGeoVolumeAssembly("rail_L"); + + /////////////////VARIAb + ////box down_2 + Double_t x_RL_1box=3.0; //dx=15 + Double_t y_RL_1box=1.21; // dy=6, -dy=6 + Double_t z_RL_1box=0.8; // dz=4 to quit + TGeoTranslation *tr_RL_1box= new TGeoTranslation(0,y_RL_1box/2,1.825); //81 + tr_RL_1box->SetName("tr_RL_1box"); + tr_RL_1box->RegisterYourself(); + //////////////////////////////7 + + TGeoXtru *xtru_RL1 = new TGeoXtru(2); + xtru_RL1->SetName("S_XTRU_RL1"); + + Double_t x_RL1[5]={-1.5,1.5,0.5,0.5,-1.5 };//93,93,73,73,-15};//vertices + Double_t y_RL1[5]={1.2,1.2,2.2,8.2,8.2};//357.5,357.5,250.78,145.91}; + xtru_RL1->DefinePolygon(5,x_RL1,y_RL1); + xtru_RL1->DefineSection(0,-2.225,0.,0.,1); //(plane,-zplane/ +zplane, x0, y0,(x/y)) + xtru_RL1->DefineSection(1,2.225,0.,0.,1); + ////////////// \// + + TGeoXtru *xtru_RL2 = new TGeoXtru(2); + xtru_RL2->SetName("S_XTRU_RL2"); + + Double_t x_RL2[8]={-1.5,0.5,0.5,9.3,9.3,7.3,7.3,-1.5}; //vertices + Double_t y_RL2[8]={8.2,8.2,13.863,24.35,35.75,35.75,25.078,14.591}; + + xtru_RL2->DefinePolygon(8,x_RL2,y_RL2); + + xtru_RL2->DefineSection(0,0.776,0,0,1);//(plane,-zplane/+zplane, x0, y0,(x/y)) + xtru_RL2->DefineSection(1,2.225 ,0,0,1); + +///////////////////////// //////////////////// + ////box knee + Double_t x_RL_kneebox=1.5; //dx=7.5 + Double_t y_RL_kneebox=3.5; // dy=17.5 + Double_t z_RL_kneebox=1.5; // dz=7.5 to quit + TGeoTranslation *tr_RL_kneebox= new TGeoTranslation(0,0,0); //81 x =-2.5, y=145.91 + tr_RL_kneebox->SetName("tr_RL_kneebox"); + tr_RL_kneebox->RegisterYourself(); + + TGeoRotation *rot_knee = new TGeoRotation("rot_knee", -40,0,0); + rot_knee->SetName("rot_knee"); + rot_knee->RegisterYourself(); + TGeoCombiTrans *combi_knee = new TGeoCombiTrans(0.96,1.75+0.81864, 0,rot_knee);//y= + combi_knee->SetName("combi_knee"); + combi_knee->RegisterYourself(); + ///////////////////////////////// quit diagona-> qdi///////////////// + Double_t x_qdi_box=3.1; // + Double_t y_qdi_box=7.159; // + Double_t z_qdi_box=3.005; // + + TGeoRotation *rot_qdi = new TGeoRotation("rot_qdi", 0,24.775,0); + rot_qdi->RegisterYourself(); + TGeoCombiTrans *combi_qdi = new TGeoCombiTrans(0,5.579, -2.087,rot_qdi);//y= + combi_qdi->SetName("combi_qdi"); + combi_qdi->RegisterYourself(); + ////////////// knee small + + TGeoXtru *xtru3_RL = new TGeoXtru(2); + xtru3_RL->SetName("S_XTRU3_RL"); + + Double_t x_3RL[6]={-0.75,0.75,0.75,2.6487,1.4997,-0.75}; //vertices + Double_t y_3RL[6]={-1.75,-1.75,1.203,3.465,4.4311,1.75}; + + xtru3_RL->DefinePolygon(6,x_3RL,y_3RL); + xtru3_RL->DefineSection(0,-0.75,0,0,1);//(plane,-zplane/+zplane, x0, y0,(x/y)) + xtru3_RL->DefineSection(1,0.76,0,0,1); + + TGeoTranslation *tr_vol3_RL= new TGeoTranslation(-0.25,12.66,0); // + tr_vol3_RL->SetName("tr_vol3_RL"); + tr_vol3_RL->RegisterYourself(); +///////////////////////////////////////////// + //// circular holes could be for rail R and L .. + /// circular hole1_RL (a(6,22)); hole_midle d=6.5 H11 + Double_t radin_RL1hole=0.; + Double_t radout_RL1hole=0.325;// diameter 3.5 + Double_t high_RL1hole=1.0;/// + + TGeoRotation *rot_RL1hole = new TGeoRotation("rot_RL1hole", 0,0,0); + rot_RL1hole->RegisterYourself(); + TGeoCombiTrans *combi_RL1hole = new TGeoCombiTrans(0.7,0.6, 1.85,rot_RL1hole);//y= + combi_RL1hole->SetName("combi_RL1hole"); + combi_RL1hole->RegisterYourself(); +//////////////////////////////// similar hole for R -- Join. + /// circular hole_ir. diameter=M3 (3 mm)) prof trou:8, tar:6mm + Double_t radin_ir_railL=0.; + Double_t radout_ir_railL=0.15;// diameter 0.3cm + Double_t high_ir_railL=3.9;// + TGeoRotation *rot_ir_RL = new TGeoRotation("rot_ir_RL", 90,90,0); + rot_ir_RL->RegisterYourself(); + //// in y = l_253.5 - 6. enter in (0,6,0) + TGeoCombiTrans *combi_ir1_RL = new TGeoCombiTrans(8.62,24.75, 1.5,rot_ir_RL); + combi_ir1_RL->SetName("combi_ir1_RL"); + combi_ir1_RL->RegisterYourself(); + + TGeoCombiTrans *combi_ir2_RL = new TGeoCombiTrans(8.6,33.15, 1.5,rot_ir_RL); + combi_ir2_RL->SetName("combi_ir2_RL"); + combi_ir2_RL->RegisterYourself(); + +/////////////////////// shape for Rail L geom///////// + auto *s_RL_1box =new TGeoBBox("S_RL_1BOX", x_RL_1box/2,y_RL_1box/2,z_RL_1box/2); + auto *s_RL_kneebox =new TGeoBBox("S_RL_KNEEBOX", x_RL_kneebox/2,y_RL_kneebox/2,z_RL_kneebox/2); + auto *s_qdi_box =new TGeoBBox("S_QDI_BOX", x_qdi_box/2,y_qdi_box/2,z_qdi_box/2); + auto *s_RL1hole=new TGeoTube("S_RL1HOLE",radin_RL1hole,radout_RL1hole,high_RL1hole/2); + //-auto *s_irL_hole=new TGeoTube("S_irL_HOLE",radin_ir_railL,radout_ir_railL,high_ir_railL/2); + + +////////////////////// composite shape for rail L ////////////////////// + + auto * RL_Shape_0 = new TGeoCompositeShape("RL_Shape_0"," S_XTRU3_RL:tr_vol3_RL +S_XTRU_RL1 + S_XTRU_RL2 +S_RL_1BOX:tr_RL_1box -S_QDI_BOX:combi_qdi"); // + + //////////////////////////////////////-------//////// + + TGeoVolume *rail_L_vol0 = new TGeoVolume("RAIL_L_VOL0",RL_Shape_0,kMedAlu); + + rail_L->AddNode(rail_L_vol0,1,new TGeoTranslation(0., 0., 1.5) ); + + + ////piece 7th ---------------RAIL RIGHT ---- //////////////----- + + auto *rail_R = new TGeoVolumeAssembly("rail_R"); + + Double_t x_RR_1box=3.0; //dx=15 + Double_t y_RR_1box=1.2; // dy=6, -dy=6 + Double_t z_RR_1box=0.8; // dz=4 to quit + TGeoTranslation *tr_RR_1box= new TGeoTranslation("tr_RR_1box",0,0.6,1.825); //81 + tr_RR_1box->RegisterYourself(); + ////////////////////////////////7 + + TGeoXtru *xtru_RR1 = new TGeoXtru(2); + xtru_RR1->SetName("S_XTRU_RR1"); + //-TGeoVolume *vol_RR1 = gGeoManager->MakeXtru("S_XTRU_RR1",kMedAlu,2); + //-TGeoXtru *xtru_RR1 = (TGeoXtru*)vol_RR1->GetShape(); + + Double_t x_RR1[5]={-1.5,-0.5,-0.5,1.5,1.5 };//C,D,K,L,C' //vertices + Double_t y_RR1[5]={1.2,2.2,8.2,8.2,1.2};//357.5,357.5,250.78,145.91}; + + xtru_RR1->DefinePolygon(5,x_RR1,y_RR1); + xtru_RR1->DefineSection(0,-2.225,0,0,1); //(plane,-zplane/ +zplane, x0, y0,(x/y)) + xtru_RR1->DefineSection(1,2.225,0,0,1); + + ////////////// \////////// + + TGeoXtru *xtru_RR2 = new TGeoXtru(2); + xtru_RR2->SetName("S_XTRU_RR2"); + //-TGeoVolume *vol_RR2 = gGeoManager->MakeXtru("S_XTRU_RR2",Al,2); + //-TGeoXtru *xtru_RR2 = (TGeoXtru*)vol_RR2->GetShape(); + + Double_t x_RR2[8]={-0.5,-0.5,-9.3,-9.3,-7.3,-7.3,1.5,1.5};//K,E,F,G,H,I,J,L//vertices + Double_t y_RR2[8]={8.2,13.863,24.35,35.75,35.75,25.078,14.591,8.2}; + + xtru_RR2->DefinePolygon(8,x_RR2,y_RR2); + xtru_RR2->DefineSection(0,0.776,0,0,1);//(plane,-zplane/+zplane, x0, y0,(x/y)) + xtru_RR2->DefineSection(1,2.225 ,0,0,1); + + ////////////// knee (small) + + TGeoXtru *xtru3_RR = new TGeoXtru(2); + xtru3_RR->SetName("S_XTRU3_RR"); + + Double_t x_3RR[6]={1.0,1.0,-1.2497,-2.2138,-0.5,-0.5};//R,Q,P,O,N.M //vertices + Double_t y_3RR[6]={10.91,14.41,17.0911,15.9421,13.86,10.91}; + + xtru3_RR->DefinePolygon(6,x_3RR,y_3RR); + xtru3_RR->DefineSection(0,-0.75,0,0,1);//(plane,-zplane/+zplane, x0, y0,(x/y)) + xtru3_RR->DefineSection(1,0.78,0,0,1); + + TGeoTranslation *tr_vol3_RR= new TGeoTranslation("tr_vol3_RR",-0.25,12.66,0); // + tr_vol3_RR->RegisterYourself(); + + ///////////////////////////////// quit diagona-> qdi///////////////// + Double_t x_qdi_Rbox=3.1; //dx=1.5 + Double_t y_qdi_Rbox=7.159; // + Double_t z_qdi_Rbox=3.005; // + + TGeoRotation *rot_Rqdi = new TGeoRotation("rot_Rqdi", 0,24.775,0); + rot_Rqdi->RegisterYourself(); + TGeoCombiTrans *combi_Rqdi = new TGeoCombiTrans(0,5.579, -2.087,rot_Rqdi);//y= + combi_Rqdi->SetName("combi_Rqdi"); + combi_Rqdi->RegisterYourself(); + + ////////////////////___holes__///// + + /// circular hole_a. diameter=6.5 (a(6,22)); hole_midle d=6.5 H11 + Double_t radin_a_rail=0.; + Double_t radout_a_rail=0.325;// diameter 3.5 + Double_t high_a_rail=0.82;/// + + TGeoTranslation *tr_a_RR= new TGeoTranslation("tr_a_RR",-0.7,0.6,1.825); //right + tr_a_RR->RegisterYourself(); + //// circular hole_ir. diameter=M3 (3 mm)) prof trou:8, tar:6mm + Double_t radin_ir_rail=0.; + Double_t radout_ir_rail=0.15;// diameter 3 + Double_t high_ir_rail=3.2;// 19 --- + TGeoRotation *rot_ir_RR = new TGeoRotation("rot_ir_RR", 90,90,0); + rot_ir_RR->RegisterYourself(); + //// in y = l_253.5 - 6. center in (0,6,0) + TGeoCombiTrans *combi_ir_RR = new TGeoCombiTrans(-8.62,24.75, 1.5,rot_ir_RR); + combi_ir_RR->SetName("combi_ir_RR"); + combi_ir_RR->RegisterYourself(); + + TGeoCombiTrans *combi_ir2_RR = new TGeoCombiTrans(-8.6,33.15, 1.5,rot_ir_RR); + combi_ir2_RR->SetName("combi_ir2_RR"); + combi_ir2_RR->RegisterYourself(); + + TGeoCombiTrans *combi_rail_R = new TGeoCombiTrans(24.1,-1.825, 0,rot_90x);//y= + combi_rail_R->SetName("combi_rail_R"); + combi_rail_R->RegisterYourself(); + TGeoCombiTrans *combi_rail_L = new TGeoCombiTrans(-24.1,-1.825, 0,rot_90x);//y= + combi_rail_L->SetName("combi_rail_L"); + combi_rail_L->RegisterYourself(); + + ///////// trasl L and R + TGeoTranslation *tr_sr_l = new TGeoTranslation("tr_sr_l",-15.01,0,0); // + tr_sr_l->RegisterYourself(); + + TGeoTranslation *tr_sr_r = new TGeoTranslation("tr_sr_r",15.01,0,0); // + tr_sr_r->RegisterYourself(); + + /////////////////////// shape for rail R //////// + auto *s_RR_1box =new TGeoBBox("S_RR_1BOX", x_RR_1box/2,y_RR_1box/2,z_RR_1box/2); + + auto *s_qdi_Rbox =new TGeoBBox("S_QDI_RBOX", x_qdi_Rbox/2,y_qdi_Rbox/2,z_qdi_Rbox/2); + + auto *s_ir_hole=new TGeoTube("S_ir_HOLE",radin_ir_rail,radout_ir_rail,high_ir_rail/2); + + // auto *s_cc_hole=new TGeoTube("S_CC_HOLE",radin_cc_rail,radout_cc_rail,high_cc_rail/2); + + ////////////////////// composite shape for rail R ////////////////////// + auto * RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0","S_RR_1BOX:tr_RR_1box+ S_XTRU_RR1 + S_XTRU_RR2 +S_XTRU3_RR- S_QDI_BOX:combi_qdi "); + + //-auto * RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0","S_RR_1BOX:tr_RR_1box+ S_XTRU_RR1 + S_XTRU_RR2 +S_XTRU3_RR- S_QDI_BOX:combi_qdi + S_ir_HOLE:combi_ir_RR +S_ir_HOLE:combi_ir2_RR "); //-S_RR_1BOX:tr_RL_1box- S_b_HOLE:tr_b_RR -S_CC_HOLE:combi_cc2_RR + + + // JOIN only for show L and R parts + + auto * rail_L_R_Shape = new TGeoCompositeShape("RAIL_L_R_Shape"," RL_Shape_0:combi_rail_L + RR_Shape_0:combi_rail_R"); + ////////////////////////////////////// + + TGeoVolume *rail_L_R_vol0 = new TGeoVolume("RAIL_L_R_VOL0",rail_L_R_Shape,kMedAlu); + + TGeoRotation *rot_rLR = new TGeoRotation("rot_rLR", 180,180,0); + rot_rLR->RegisterYourself(); + TGeoCombiTrans *combi_rLR = new TGeoCombiTrans(0,-6.9, -0.5,rot_rLR);//0,-6.9,-0.5-80 + combi_rLR->SetName("combi_rLR"); + combi_rLR->RegisterYourself(); + + rail_L_R->AddNode(rail_L_R_vol0,2,combi_rLR); + + /// piece 8th -------support rail MB --------------- -\_ + + auto *sup_rail_MBL = new TGeoVolumeAssembly("sup_rail_MBL"); + + /////////////////VARIAb + + TGeoXtru *xtru_MBL_0 = new TGeoXtru(2); + xtru_MBL_0->SetName("S_XTRU_MBL_0"); //V-MBL_0 + + // vertices a,b,c,d,e,f,g,h + Double_t x[8]={0.,0,6.1,31.55,34.55,34.55,31.946,6.496}; + Double_t y[8]={-0.4,0.4,0.4,13.0,13.0,12.2,12.2,-0.4}; + + xtru_MBL_0->DefinePolygon(8,x,y); + xtru_MBL_0->DefineSection(0,-0.4,0,0,1);//(plane, -zplane/ +zplane,x0,y0,(x/y)) + xtru_MBL_0->DefineSection(1,0.4,0,0,1); + + TGeoRotation *rot1_MBL_0 = new TGeoRotation("rot1_MBL_0", -90,-90,90); + rot1_MBL_0->RegisterYourself(); + + ///////////////////////////////// quit box in diag///////////////// + Double_t x_mb_box=0.8; //dx=4 + Double_t y_mb_box=0.8; // dy=4 + Double_t z_mb_box=0.81; // dz=4 to quit + TGeoTranslation *tr_mb_box= new TGeoTranslation("tr_mb_box",24.05,9.55,0);// 240.5 + tr_mb_box->RegisterYourself(); + + ////lateral hole-box + Double_t x_lat_box=0.7; //dx=0.35 + Double_t y_lat_box=1.8; // dy=0.9 + Double_t z_lat_box=0.2; // dz=0.1 + TGeoTranslation *tr_lat1L_box= new TGeoTranslation("tr_lat1L_box",4.6,0,0.4);// + tr_lat1L_box->RegisterYourself(); + TGeoTranslation *tr_lat2L_box= new TGeoTranslation("tr_lat2L_box",9.6,1.65,0.4);// + tr_lat2L_box->RegisterYourself(); + TGeoTranslation *tr_lat3L_box= new TGeoTranslation("tr_lat3L_box",18.53,6.1,0.4);// + tr_lat3L_box->RegisterYourself(); + TGeoTranslation *tr_lat4L_box= new TGeoTranslation("tr_lat4L_box",26.45,10,0.4);// + tr_lat4L_box->RegisterYourself(); + TGeoTranslation *tr_lat5L_box= new TGeoTranslation("tr_lat5L_box",29.9,11.6,0.4);// + tr_lat5L_box->RegisterYourself(); + + TGeoTranslation *tr_lat1R_box= new TGeoTranslation("tr_lat1R_box",4.6,0,-0.4);// + tr_lat1R_box->RegisterYourself(); + TGeoTranslation *tr_lat2R_box= new TGeoTranslation("tr_lat2R_box",9.6,1.65,-0.4);// + tr_lat2R_box->RegisterYourself(); + TGeoTranslation *tr_lat3R_box= new TGeoTranslation("tr_lat3R_box",18.53,6.1,-0.4);// + tr_lat3R_box->RegisterYourself(); + TGeoTranslation *tr_lat4R_box= new TGeoTranslation("tr_lat4R_box",26.45,10,-0.4);// + tr_lat4R_box->RegisterYourself(); + TGeoTranslation *tr_lat5R_box= new TGeoTranslation("tr_lat5R_box",29.9,11.6,-0.4);// + tr_lat5R_box->RegisterYourself(); + + /// circular hole_1mbl. diameter=3.5 H9 + Double_t radin_1mb =0.; + Double_t radout_1mb=0.175;// diameter 3.5mm _0.35 cm + Double_t high_1mb=2.825;/// dh=+/- 4 + TGeoTranslation *tr1_mb= new TGeoTranslation("tr1_mb",18.48,6.1,0.); //right + tr1_mb->RegisterYourself(); + + TGeoTranslation *tr2_mb= new TGeoTranslation("tr2_mb",24.15,8.9,0.); //right + tr2_mb->RegisterYourself(); + + ///circular hole_2mbl inclined and hole-up.diameter=M3 (3 mm)) prof , tar:8mm + Double_t radin_2mb =0.; + Double_t radout_2mb=0.15;// diameter 0.3 + Double_t high_2mb=0.82;/// dh=+/- 4 + + TGeoRotation *rot_hole2_MBL = new TGeoRotation("rot_hole2_MBL", 0,90,0); + rot_hole2_MBL->RegisterYourself(); + + TGeoTranslation *tr_mbl = new TGeoTranslation("tr_mbl",-7.5,0.,0.); // + tr_mbl->RegisterYourself(); + + TGeoTranslation *tr_mbr = new TGeoTranslation("tr_mbr",7.5,0,0); // + tr_mbr->RegisterYourself(); + + ///hole up ||-- hup + + TGeoCombiTrans *combi_hup_mb = new TGeoCombiTrans(32.5,12.6, 0,rot_90x);//y= + combi_hup_mb->SetName("combi_hup_mb"); + combi_hup_mb->RegisterYourself(); + + /////////////////////// shape for rail MB ///////// + auto *s_mb_box =new TGeoBBox("S_MB_BOX", x_mb_box/2,y_mb_box/2,z_mb_box/2); + auto *s_hole_1mbl=new TGeoTube("S_HOLE_1MBL",radin_1mb,radout_1mb,high_1mb/2); // d3.5 + auto *s_hole_2mbl=new TGeoTube("S_HOLE_2MBL",radin_2mb,radout_2mb,high_2mb/2); //d3 + auto *s_lat_box =new TGeoBBox("S_LAT_BOX",x_lat_box/2,y_lat_box/2,z_lat_box/2); + + ////////////////////// composite shape for rail_MB R + L ////////////////////// + + // auto * MB_Shape_0 = new TGeoCompositeShape("MB_Shape_0"," V_MBL_0 - S_MB_BOX:tr_mb_box - S_HOLE_1MBL:tr1_mb + S_HOLE_1MBL:tr2_mb -S_HOLE_2MBL:combi_hup_mb "); + auto * MB_Shape_0 = new TGeoCompositeShape("MB_Shape_0","S_XTRU_MBL_0 - S_MB_BOX:tr_mb_box - S_HOLE_1MBL:tr1_mb -S_HOLE_2MBL:combi_hup_mb "); + + auto * MB_Shape_0L = new TGeoCompositeShape("MB_Shape_0L","MB_Shape_0 -S_LAT_BOX:tr_lat1L_box -S_LAT_BOX:tr_lat2L_box - S_LAT_BOX:tr_lat3L_box -S_LAT_BOX:tr_lat4L_box- S_LAT_BOX:tr_lat5L_box "); + + auto * MB_Shape_0R = new TGeoCompositeShape("MB_Shape_0R","MB_Shape_0 - S_LAT_BOX:tr_lat1R_box -S_LAT_BOX:tr_lat2R_box - S_LAT_BOX:tr_lat3R_box -S_LAT_BOX:tr_lat4R_box- S_LAT_BOX:tr_lat5R_box"); + + auto * MB_Shape_1L = new TGeoCompositeShape("MB_Shape_1L","MB_Shape_0L:rot1_MBL_0 - S_HOLE_2MBL"); // one piece "completed" + // left and right--> + auto * MB_Shape_1R = new TGeoCompositeShape("MB_Shape_1R","MB_Shape_0R:rot1_MBL_0 - S_HOLE_2MBL"); + + auto * MB_Shape_2 = new TGeoCompositeShape("MB_Shape_2"," MB_Shape_1L:tr_mbl + MB_Shape_1R:tr_mbr "); + + ///////// + // TGeoVolume *sup_rail_MBL_vol0 = new TGeoVolume("SUPPORT_MBL_VOL0",MB_Shape_0,Al); + TGeoVolume *sup_rail_MBL_vol = new TGeoVolume("SUPPORT_MBL_VOL",MB_Shape_2,kMedAlu); + //////////////////////////////// + + + sup_rail_MBL->AddNode(sup_rail_MBL_vol,1,rot_halfR); + + + ///////////////////////////////////////////////// =|=|= + + auto *stair = new TGeoVolumeAssembly("stair"); + + stair->AddNode(sup_rail_MBL,1,new TGeoTranslation(0,0-28.8,0+0.675));// + stair->AddNode(Cross_mft,2,new TGeoTranslation(0,-28.8,4.55+0.675)); + stair->AddNode(Cross_mb0,3,new TGeoTranslation(0,1.65-28.8,9.55+0.675)); + stair->AddNode(Cross_mb0,4,new TGeoTranslation(0,6.1-28.8,18.48+0.675)); + stair->AddNode(Cross_mft,6,new TGeoTranslation(0,10.0-28.8,26.4+0.675)); + stair->AddNode(Cross_mft,7, new TGeoTranslation(0,11.6-28.8,29.85+0.675)); + + + Double_t t_final_x; + Double_t t_final_y; + Double_t t_final_z; + + Double_t r_final_x ; + Double_t r_final_y ; + Double_t r_final_z ; + + + if (half == 0){ + t_final_x = 0; + t_final_y = 0; + t_final_z = -80; + + r_final_x =0 ; + r_final_y = 0; + r_final_z = 0; + } + + if (half == 1){ + t_final_x = 0; + t_final_y = 0; + t_final_z = -80; + + r_final_x =0 ; + r_final_y = 0; + r_final_z= 180; + } + + auto* t_final = new TGeoTranslation("t_final", t_final_x, t_final_y, t_final_z); + auto* r_final = new TGeoRotation("r_final", r_final_x, r_final_y, r_final_z); + auto* c_final = new TGeoCombiTrans(*t_final, *r_final); + + + HalfConeVolume->AddNode(stair,1,c_final ); // + HalfConeVolume->AddNode(base,2,c_final); + HalfConeVolume->AddNode(rail_L_R,3, c_final);// R&L + HalfConeVolume->AddNode(Fra_front,4,c_final); + HalfConeVolume->AddNode(midle,6,c_final); // + +//////////// + + + + return HalfConeVolume; } From 23dc6d406969923e8232a14aa85070e980f1f603 Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Tue, 19 Feb 2019 17:27:05 -0500 Subject: [PATCH 02/22] Update HalfCone.cxx fixed errors --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 105 ++++++++++----------- 1 file changed, 52 insertions(+), 53 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 68267d3728665..94fb2838e55a1 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -57,8 +57,8 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoMaterial *matVacuum = new TGeoMaterial("Vacuum", 0,0,0); TGeoMaterial *matAl = new TGeoMaterial("Al", 26.98,13,2.7); // //--- define some media - TGeoMedium *Vacuum = new TGeoMedium("Vacuum",1, matVacuum); - TGeoMedium *Al = new TGeoMedium("Root Material",2, matAl); +///E TGeoMedium *Vacuum = new TGeoMedium("Vacuum",1, matVacuum); +///E TGeoMedium *Al = new TGeoMedium("Root Material",2, matAl); /////Rotation //// TGeoRotation *rot1 = new TGeoRotation("rot1", 180,-180,0); @@ -129,10 +129,10 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_2hole_mb0_b->RegisterYourself(); // shape for cross_mb0 - - auto *s_box_mb0 =new TGeoBBox("S_BOX_MB0", x_box_mb0/2,y_box_mb0/2,z_box_mb0/2); - auto *s_1hole_mb0=new TGeoTube("S_1HOLE_MB0",radin_1hole_mb0,radout_1hole_mb0,high_1hole_mb0/2); - auto *s_2hole_mb0=new TGeoTube("S_2HOLE_MB0",radin_2hole_mb0,radout_2hole_mb0,high_2hole_mb0/2); + ///E... + auto * box_mb0 =new TGeoBBox("S_BOX_MB0", x_box_mb0/2,y_box_mb0/2,z_box_mb0/2); + auto * hole1_mb0=new TGeoTube("S_1HOLE_MB0",radin_1hole_mb0,radout_1hole_mb0,high_1hole_mb0/2); + auto * hole2_mb0=new TGeoTube("S_2HOLE_MB0",radin_2hole_mb0,radout_2hole_mb0,high_2hole_mb0/2); ///composite shape for mb0 @@ -168,7 +168,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // shape for shape cross beam - auto *s_hole_cbeam=new TGeoTube("S_HOLE_CBEAM",radin_hole_cbeam,radout_hole_cbeam,high_hole_cbeam/2); + auto *hole_cbeam=new TGeoTube("S_HOLE_CBEAM",radin_hole_cbeam,radout_hole_cbeam,high_hole_cbeam/2); /// composite shape for cross beam (using the same box of mb0) auto * c_cbeam_Shape = new TGeoCompositeShape("c_cbeam_Shape","S_BOX_MB0 - S_HOLE_CBEAM:combi_hole_1cbeam - S_HOLE_CBEAM:combi_hole_2cbeam"); @@ -237,22 +237,22 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) /////// shape for framewor front - TGeoShape *s_box_up = new TGeoBBox("BOX_UP", x_box_up/2,y_box_up/2,z_box_up/2); + TGeoShape *box_up = new TGeoBBox("BOX_UP", x_box_up/2,y_box_up/2,z_box_up/2); - TGeoShape *s_tub_up=new TGeoTube("TUB_UP",0.,dia_tub_up/2,high_tub_up/2); // - TGeoShape *s_seg_tub=new TGeoTubeSeg("SEG_TUB",radin_segtub,radout_segtub,high_segtub/2,ang_in_segtub,ang_fin_segtub);//r_in,r_out,dZ,ang,ang + TGeoShape *tub_up=new TGeoTube("TUB_UP",0.,dia_tub_up/2,high_tub_up/2); // + TGeoShape *seg_tub=new TGeoTubeSeg("SEG_TUB",radin_segtub,radout_segtub,high_segtub/2,ang_in_segtub,ang_fin_segtub);//r_in,r_out,dZ,ang,ang - TGeoShape *s_boxB_down = new TGeoBBox("BOXB_DOWN", x_boxB_down/2,y_boxB_down/2,z_boxB_down/2); + TGeoShape *boxB_down = new TGeoBBox("BOXB_DOWN", x_boxB_down/2,y_boxB_down/2,z_boxB_down/2); - TGeoShape * s_boxA_down = new TGeoBBox("BOXA_DOWN", x_boxA_down/2,y_boxA_down/2,z_boxA_down/2); + TGeoShape * boxA_down = new TGeoBBox("BOXA_DOWN", x_boxA_down/2,y_boxA_down/2,z_boxA_down/2); - TGeoShape *s_tubdown=new TGeoTube("S_TUBDOWN",0.,dia_tubdown/2,high_tubdown/2); + TGeoShape *tubdown=new TGeoTube("S_TUBDOWN",0.,dia_tubdown/2,high_tubdown/2); //Composite shapes for Fra_front - auto * Fra_front_Shape_0 = new TGeoCompositeShape("Fra_front_Shape_0","BOX_UP:tr1_up +SEG_TUB:combi_3b+ BOXB_DOWN:tr3_box + BOXA_DOWN:tr_2_box"); + auto * fra_front_Shape_0 = new TGeoCompositeShape("Fra_front_Shape_0","BOX_UP:tr1_up +SEG_TUB:combi_3b+ BOXB_DOWN:tr3_box + BOXA_DOWN:tr_2_box"); - auto * Fra_front_Shape_1 = new TGeoCompositeShape("Fra_front_Shape_1","Fra_front_Shape_0 - S_TUBDOWN:tr_tubdown -TUB_UP:combi_3a"); - auto * Fra_front_Shape_2 = new TGeoCompositeShape("Fra_front_Shape_2","Fra_front_Shape_1:rot_90x -TUB_UP:combi_3a"); //- + auto * fra_front_Shape_1 = new TGeoCompositeShape("Fra_front_Shape_1","Fra_front_Shape_0 - S_TUBDOWN:tr_tubdown -TUB_UP:combi_3a"); + auto * fra_front_Shape_2 = new TGeoCompositeShape("Fra_front_Shape_2","Fra_front_Shape_1:rot_90x -TUB_UP:combi_3a"); //- TGeoRotation *rot_z180x90 = new TGeoRotation("rot_z180x90", 180,90,0);//half0_R rot_z180x90->RegisterYourself(); @@ -269,7 +269,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_front_R->RegisterYourself(); - auto * Fra_front_Shape_3 = new TGeoCompositeShape("Fra_front_Shape_3","Fra_front_Shape_2:rot_halfR "); + auto * fra_front_Shape_3 = new TGeoCompositeShape("Fra_front_Shape_3","Fra_front_Shape_2:rot_halfR "); auto * Fra_front_Volume = new TGeoVolume("Fra_front_Volume",Fra_front_Shape_1,kMedAlu); @@ -426,26 +426,26 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) ///////// shape for base -- - auto *s_disc=new TGeoTubeSeg("S_DISC",radin_disc,radout_disc,high_disc/2,ang_in_disc,ang_fin_disc); + auto *disc=new TGeoTubeSeg("S_DISC",radin_disc,radout_disc,high_disc/2,ang_in_disc,ang_fin_disc); - auto *s_1box =new TGeoBBox("BOX1", x_1box/2,y_1box/2,z_1box/2); - auto *s_2box =new TGeoBBox("BOX2", x_2box/2,y_2box/2,z_2box/2); - auto *s_3box =new TGeoBBox("BOX3", x_3box/2,y_3box/2,z_3box/2); - auto *s_labox =new TGeoBBox("LA_BOX", x_labox/2,y_labox/2,z_labox/2); - auto *s_2labox =new TGeoBBox("LA_2BOX", x_2labox/2,y_2labox/2,z_2labox/2); - auto *s_cbox =new TGeoBBox("CENTRAL_BOX", xc_box/2,yc_box/2,zc_box/2); - auto *s_tongbox =new TGeoBBox("TONG_BOX", x_tong/2,y_tong/2,z_tong/2); + auto *box1 =new TGeoBBox("BOX1", x_1box/2,y_1box/2,z_1box/2); + auto *box2 =new TGeoBBox("BOX2", x_2box/2,y_2box/2,z_2box/2); + auto *box3 =new TGeoBBox("BOX3", x_3box/2,y_3box/2,z_3box/2); + auto *labox =new TGeoBBox("LA_BOX", x_labox/2,y_labox/2,z_labox/2); + auto *labox2 =new TGeoBBox("LA_2BOX", x_2labox/2,y_2labox/2,z_2labox/2); + auto *cbox =new TGeoBBox("CENTRAL_BOX", xc_box/2,yc_box/2,zc_box/2); + auto *tongbox =new TGeoBBox("TONG_BOX", x_tong/2,y_tong/2,z_tong/2); - TGeoShape *s_seg_1hole=new TGeoTubeSeg("SEG_1HOLE",radin_1hole,radout_1hole,high_1hole/2,ang_in_1hole,ang_fin_1hole);//r_in,r_out,dZ,ang,ang - TGeoShape *s_seg_2hole=new TGeoTubeSeg("SEG_2HOLE",radin_2hole,radout_2hole,high_2hole/2,ang_in_2hole,ang_fin_2hole); - TGeoShape *s_seg_3hole=new TGeoTubeSeg("SEG_3ARC",radin_3hole,radout_3hole,high_3hole/2,ang_in_3hole,ang_fin_3hole);// |u| - TGeoShape *s_seg_bord=new TGeoTubeSeg("SEG_BORD",radin_bord,radout_bord,high_bord/2,ang_in_bord,ang_fin_bord); + TGeoShape *seg_1hole=new TGeoTubeSeg("SEG_1HOLE",radin_1hole,radout_1hole,high_1hole/2,ang_in_1hole,ang_fin_1hole);//r_in,r_out,dZ,ang,ang + TGeoShape *seg_2hole=new TGeoTubeSeg("SEG_2HOLE",radin_2hole,radout_2hole,high_2hole/2,ang_in_2hole,ang_fin_2hole); + TGeoShape *seg_3hole=new TGeoTubeSeg("SEG_3ARC",radin_3hole,radout_3hole,high_3hole/2,ang_in_3hole,ang_fin_3hole);// |u| + TGeoShape *seg_bord=new TGeoTubeSeg("SEG_BORD",radin_bord,radout_bord,high_bord/2,ang_in_bord,ang_fin_bord); - auto *s_circ_hole=new TGeoTube("S_CIRC_HOLE1",radin_hole1,radout_hole1,high_hole1/2); + auto *circ_hole=new TGeoTube("S_CIRC_HOLE1",radin_hole1,radout_hole1,high_hole1/2); - auto *s_circ_hole2=new TGeoTube("S_CIRC_HOLE2",radin_hole2,radout_hole2,high_hole2/2); + auto *circ_hole2=new TGeoTube("S_CIRC_HOLE2",radin_hole2,radout_hole2,high_hole2/2); - auto *s_circ_holeB=new TGeoTube("S_CIRC_HOLEB",radin_holeB,radout_holeB,high_holeB/2); + auto *circ_holeB=new TGeoTube("S_CIRC_HOLEB",radin_holeB,radout_holeB,high_holeB/2); //// composite shape for base ---- @@ -458,14 +458,13 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto * base_Shape_4 = new TGeoCompositeShape("base_Shape_4","base_Shape_0 -base_Shape_1 - base_Shape_1:rot1 + base_Shape_2 +TONG_BOX:tr_tong -S_CIRC_HOLE1:tr_hole1 -S_CIRC_HOLE1:tr2_hole1 -S_CIRC_HOLE1:tr3_hole1 -S_CIRC_HOLE2:tr1_hole2-S_CIRC_HOLE2:tr2_hole2 -base_Shape_3 "); - - auto * base_Shape_5 = new TGeoCompositeShape("base_Shape_5","S_DISC-BOX1 -BOX2 -BOX3 -SEG_1HOLE -SEG_2HOLE +SEG_3ARC -SEG_1HOLE:rot1-SEG_2HOLE:rot1 - CENTRAL_BOX:tr_cbox - LA_BOX:tr_la - LA_2BOX:tr_2la + SEG_BORD "); + auto * base_Shape_5 = new TGeoCompositeShape("base_Shape_5","S_DISC-BOX1 -BOX2 -BOX3 -SEG_1HOLE -SEG_2HOLE +SEG_3ARC -SEG_1HOLE:rot1-SEG_2HOLE:rot1 - CENTRAL_BOX:tr_cbox - LA_BOX:tr_la - LA_2BOX:tr_2la + SEG_BORD "); - auto * base0_Volume = new TGeoVolume("base0_Volume",base_Shape_0,kMedAlu); - auto * base1_Volume = new TGeoVolume("base1_Volume",base_Shape_1,kMedAlu); - auto * base2_Volume = new TGeoVolume("base2_Volume",base_Shape_2,kMedAlu); - auto * base3_Volume = new TGeoVolume("base3_Volume",base_Shape_3,kMedAlu); - auto * base4_Volume = new TGeoVolume("base4_Volume",base_Shape_4,kMedAlu); + auto * base0_Volume = new TGeoVolume("base0_Volume",base_Shape_0,kMedAlu); + auto * base1_Volume = new TGeoVolume("base1_Volume",base_Shape_1,kMedAlu); + auto * base2_Volume = new TGeoVolume("base2_Volume",base_Shape_2,kMedAlu); + auto * base3_Volume = new TGeoVolume("base3_Volume",base_Shape_3,kMedAlu); + auto * base4_Volume = new TGeoVolume("base4_Volume",base_Shape_4,kMedAlu); base->AddNode(base4_Volume,2,rot_base); @@ -543,17 +542,17 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) ///////// shape for midle - auto *s_midle_box =new TGeoBBox("S_MIDLE_BOX", x_midle/2,y_midle/2,z_midle/2); + auto *midle_box =new TGeoBBox("S_MIDLE_BOX", x_midle/2,y_midle/2,z_midle/2); - auto *s_midle_d1box =new TGeoBBox("S_MIDLE_D1BOX", x_midle_d1box/2,y_midle_d1box/2,z_midle_d1box/2); + auto *midle_d1box =new TGeoBBox("S_MIDLE_D1BOX", x_midle_d1box/2,y_midle_d1box/2,z_midle_d1box/2); - auto *s_midle_d2box =new TGeoBBox("S_MIDLE_D2BOX", x_midle_d2box/2,y_midle_d2box/2,z_midle_d2box/2); + auto *midle_d2box =new TGeoBBox("S_MIDLE_D2BOX", x_midle_d2box/2,y_midle_d2box/2,z_midle_d2box/2); - auto *s_arc_midle=new TGeoTubeSeg("S_ARC_MIDLE",radin_midle,radout_midle,high_midle/2,ang_in_midle,ang_fin_midle); + auto *arc_midle=new TGeoTubeSeg("S_ARC_MIDLE",radin_midle,radout_midle,high_midle/2,ang_in_midle,ang_fin_midle); - auto *s_mid_1tubhole=new TGeoTube("S_MID_1TUBHOLE",radin_mid_1hole,radout_mid_1hole,high_mid_1hole/2); + auto *mid_1tubhole=new TGeoTube("S_MID_1TUBHOLE",radin_mid_1hole,radout_mid_1hole,high_mid_1hole/2); - auto *s_mid_2tubhole=new TGeoTube("S_MID_2TUBHOLE",radin_mid_2hole,radout_mid_2hole,high_mid_2hole/2); + auto *mid_2tubhole=new TGeoTube("S_MID_2TUBHOLE",radin_mid_2hole,radout_mid_2hole,high_mid_2hole/2); //////////////////////////////////////////composite shape for midle @@ -691,10 +690,10 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_ir2_RL->RegisterYourself(); /////////////////////// shape for Rail L geom///////// - auto *s_RL_1box =new TGeoBBox("S_RL_1BOX", x_RL_1box/2,y_RL_1box/2,z_RL_1box/2); - auto *s_RL_kneebox =new TGeoBBox("S_RL_KNEEBOX", x_RL_kneebox/2,y_RL_kneebox/2,z_RL_kneebox/2); - auto *s_qdi_box =new TGeoBBox("S_QDI_BOX", x_qdi_box/2,y_qdi_box/2,z_qdi_box/2); - auto *s_RL1hole=new TGeoTube("S_RL1HOLE",radin_RL1hole,radout_RL1hole,high_RL1hole/2); + auto *RL_1box =new TGeoBBox("S_RL_1BOX", x_RL_1box/2,y_RL_1box/2,z_RL_1box/2); + auto *RL_kneebox =new TGeoBBox("S_RL_KNEEBOX", x_RL_kneebox/2,y_RL_kneebox/2,z_RL_kneebox/2); + auto *qdi_box =new TGeoBBox("S_QDI_BOX", x_qdi_box/2,y_qdi_box/2,z_qdi_box/2); + auto *RL1hole=new TGeoTube("S_RL1HOLE",radin_RL1hole,radout_RL1hole,high_RL1hole/2); //-auto *s_irL_hole=new TGeoTube("S_irL_HOLE",radin_ir_railL,radout_ir_railL,high_ir_railL/2); @@ -711,7 +710,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) ////piece 7th ---------------RAIL RIGHT ---- //////////////----- - auto *rail_R = new TGeoVolumeAssembly("rail_R"); + auto * rail_R = new TGeoVolumeAssembly("rail_R"); Double_t x_RR_1box=3.0; //dx=15 Double_t y_RR_1box=1.2; // dy=6, -dy=6 @@ -811,11 +810,11 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) tr_sr_r->RegisterYourself(); /////////////////////// shape for rail R //////// - auto *s_RR_1box =new TGeoBBox("S_RR_1BOX", x_RR_1box/2,y_RR_1box/2,z_RR_1box/2); + auto *RR_1box =new TGeoBBox("S_RR_1BOX", x_RR_1box/2,y_RR_1box/2,z_RR_1box/2); - auto *s_qdi_Rbox =new TGeoBBox("S_QDI_RBOX", x_qdi_Rbox/2,y_qdi_Rbox/2,z_qdi_Rbox/2); + auto *qdi_Rbox =new TGeoBBox("S_QDI_RBOX", x_qdi_Rbox/2,y_qdi_Rbox/2,z_qdi_Rbox/2); - auto *s_ir_hole=new TGeoTube("S_ir_HOLE",radin_ir_rail,radout_ir_rail,high_ir_rail/2); + auto *ir_hole=new TGeoTube("S_ir_HOLE",radin_ir_rail,radout_ir_rail,high_ir_rail/2); // auto *s_cc_hole=new TGeoTube("S_CC_HOLE",radin_cc_rail,radout_cc_rail,high_cc_rail/2); From 5c9609ee46fb8d8276413e059e83ec23d56d754a Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Tue, 19 Feb 2019 21:04:55 -0500 Subject: [PATCH 03/22] Update HalfCone.cxx modifying name fra_front_Shape_1 --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 94fb2838e55a1..b538df9ff7e22 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -271,7 +271,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto * fra_front_Shape_3 = new TGeoCompositeShape("Fra_front_Shape_3","Fra_front_Shape_2:rot_halfR "); - auto * Fra_front_Volume = new TGeoVolume("Fra_front_Volume",Fra_front_Shape_1,kMedAlu); + auto * Fra_front_Volume = new TGeoVolume("Fra_front_Volume",fra_front_Shape_1,kMedAlu); Fra_front_L->AddNode(Fra_front_Volume,1,combi_front_L); Fra_front_R->AddNode(Fra_front_Volume,1,combi_front_R); From bd129ab0a512b852b991507ca7e72984335f1696 Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Thu, 21 Feb 2019 21:09:24 -0500 Subject: [PATCH 04/22] Update HalfCone.cxx Correction in the names assigned on the boolean part. --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 50 +++++++++++----------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index b538df9ff7e22..7927e48364c3f 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -54,7 +54,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoMedium *kMedAlu = gGeoManager->GetMedium("MFT_Alu$"); //--- define some materials - TGeoMaterial *matVacuum = new TGeoMaterial("Vacuum", 0,0,0); + TGeoMaterial *matAl = new TGeoMaterial("Al", 26.98,13,2.7); // //--- define some media ///E TGeoMedium *Vacuum = new TGeoMedium("Vacuum",1, matVacuum); @@ -136,7 +136,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) ///composite shape for mb0 - auto * c_mb0_Shape_0 = new TGeoCompositeShape("c_mb0_Shape_0","S_BOX_MB0 - S_1HOLE_MB0:acombi_1h_mb0 - S_1HOLE_MB0:bcombi_1h_mb0 - S_2HOLE_MB0:combi_2hole_mb0 -S_2HOLE_MB0:combi_2hole_mb0_b"); + auto * c_mb0_Shape_0 = new TGeoCompositeShape("c_mb0_Shape_0","box_mb0 -hole1_mb0:acombi_1h_mb0 - hole1_mb0:bcombi_1h_mb0 - hole2_mb0:combi_2hole_mb0 - hole2_mb0:combi_2hole_mb0_b"); /////////////////// auto * cross_mb0_Volume = new TGeoVolume("cross_mb0_Volume",c_mb0_Shape_0,kMedAlu); @@ -171,7 +171,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto *hole_cbeam=new TGeoTube("S_HOLE_CBEAM",radin_hole_cbeam,radout_hole_cbeam,high_hole_cbeam/2); /// composite shape for cross beam (using the same box of mb0) - auto * c_cbeam_Shape = new TGeoCompositeShape("c_cbeam_Shape","S_BOX_MB0 - S_HOLE_CBEAM:combi_hole_1cbeam - S_HOLE_CBEAM:combi_hole_2cbeam"); + auto * c_cbeam_Shape = new TGeoCompositeShape("c_cbeam_Shape"," box_mb0 - hole_cbeam:combi_hole_1cbeam - hole_cbeam:combi_hole_2cbeam"); /////////////////// auto * Cross_mft_Volume = new TGeoVolume("Cross_mft_Volume",c_cbeam_Shape,kMedAlu); @@ -249,10 +249,10 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoShape *tubdown=new TGeoTube("S_TUBDOWN",0.,dia_tubdown/2,high_tubdown/2); //Composite shapes for Fra_front - auto * fra_front_Shape_0 = new TGeoCompositeShape("Fra_front_Shape_0","BOX_UP:tr1_up +SEG_TUB:combi_3b+ BOXB_DOWN:tr3_box + BOXA_DOWN:tr_2_box"); + auto * fra_front_Shape_0 = new TGeoCompositeShape("Fra_front_Shape_0"," box_up:tr1_up +seg_tub:combi_3b+ boxB_down:tr3_box + boxA_down:tr_2_box"); - auto * fra_front_Shape_1 = new TGeoCompositeShape("Fra_front_Shape_1","Fra_front_Shape_0 - S_TUBDOWN:tr_tubdown -TUB_UP:combi_3a"); - auto * fra_front_Shape_2 = new TGeoCompositeShape("Fra_front_Shape_2","Fra_front_Shape_1:rot_90x -TUB_UP:combi_3a"); //- + auto * fra_front_Shape_1 = new TGeoCompositeShape("Fra_front_Shape_1","fra_front_Shape_0 - tubdown:tr_tubdown -tub_up:combi_3a"); + auto * fra_front_Shape_2 = new TGeoCompositeShape("Fra_front_Shape_2","Fra_front_Shape_1:rot_90x - tub_up:combi_3a"); //- TGeoRotation *rot_z180x90 = new TGeoRotation("rot_z180x90", 180,90,0);//half0_R rot_z180x90->RegisterYourself(); @@ -269,7 +269,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_front_R->RegisterYourself(); - auto * fra_front_Shape_3 = new TGeoCompositeShape("Fra_front_Shape_3","Fra_front_Shape_2:rot_halfR "); + auto * fra_front_Shape_3 = new TGeoCompositeShape("Fra_front_Shape_3","fra_front_Shape_2:rot_halfR "); auto * Fra_front_Volume = new TGeoVolume("Fra_front_Volume",fra_front_Shape_1,kMedAlu); @@ -441,7 +441,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoShape *seg_3hole=new TGeoTubeSeg("SEG_3ARC",radin_3hole,radout_3hole,high_3hole/2,ang_in_3hole,ang_fin_3hole);// |u| TGeoShape *seg_bord=new TGeoTubeSeg("SEG_BORD",radin_bord,radout_bord,high_bord/2,ang_in_bord,ang_fin_bord); - auto *circ_hole=new TGeoTube("S_CIRC_HOLE1",radin_hole1,radout_hole1,high_hole1/2); + auto *circ_hole1=new TGeoTube("S_CIRC_HOLE1",radin_hole1,radout_hole1,high_hole1/2); auto *circ_hole2=new TGeoTube("S_CIRC_HOLE2",radin_hole2,radout_hole2,high_hole2/2); @@ -449,21 +449,21 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) //// composite shape for base ---- - auto * base_Shape_0 = new TGeoCompositeShape("base_Shape_0","S_DISC -BOX1 -BOX2 -BOX3 - S_CIRC_HOLEB:tr1_holeB- S_CIRC_HOLEB:tr2_holeB "); - auto * base_Shape_1 = new TGeoCompositeShape("base_Shape_1","(SEG_1HOLE -SEG_BORD:combi_bord1 -SEG_BORD:combi2_bord1) + SEG_2HOLE-SEG_BORD:combi1_bord2 + CENTRAL_BOX:tr_cbox "); + auto * base_Shape_0 = new TGeoCompositeShape("base_Shape_0"," disc - box1 - box2 - box3 -circ_holeB:tr1_holeB- circ_holeB:tr2_holeB "); + auto * base_Shape_1 = new TGeoCompositeShape("base_Shape_1","( seg_1hole -seg_bord:combi_bord1 -seg_bord:combi2_bord1) + seg_2hole - seg_bord:combi1_bord2 + cbox:tr_cbox "); - auto * base_Shape_2 = new TGeoCompositeShape("base_Shape_2"," SEG_3ARC +SEG_BORD:combi_cent_bord "); //-SEG_BORD:combi_cent_bord + auto * base_Shape_2 = new TGeoCompositeShape("base_Shape_2"," seg_3hole +seg_bord:combi_cent_bord "); //-SEG_BORD:combi_cent_bord - auto * base_Shape_3 = new TGeoCompositeShape("base_Shape_3"," LA_BOX:tr_la+ LA_2BOX:tr_2la "); + auto * base_Shape_3 = new TGeoCompositeShape("base_Shape_3"," labox:tr_la+ labox2:tr_2la "); - auto * base_Shape_4 = new TGeoCompositeShape("base_Shape_4","base_Shape_0 -base_Shape_1 - base_Shape_1:rot1 + base_Shape_2 +TONG_BOX:tr_tong -S_CIRC_HOLE1:tr_hole1 -S_CIRC_HOLE1:tr2_hole1 -S_CIRC_HOLE1:tr3_hole1 -S_CIRC_HOLE2:tr1_hole2-S_CIRC_HOLE2:tr2_hole2 -base_Shape_3 "); + auto * base_Shape_4 = new TGeoCompositeShape("base_Shape_4","base_Shape_0 -base_Shape_1 - base_Shape_1:rot1 + base_Shape_2 +tongbox:tr_tong - circ_hole1:tr_hole1 - circ_hole1:tr2_hole1 - circ_hole1:tr3_hole1 -circ_hole2:tr1_hole2-circ_hole2:tr2_hole2 -base_Shape_3 "); - auto * base_Shape_5 = new TGeoCompositeShape("base_Shape_5","S_DISC-BOX1 -BOX2 -BOX3 -SEG_1HOLE -SEG_2HOLE +SEG_3ARC -SEG_1HOLE:rot1-SEG_2HOLE:rot1 - CENTRAL_BOX:tr_cbox - LA_BOX:tr_la - LA_2BOX:tr_2la + SEG_BORD "); + // auto * base_Shape_5 = new TGeoCompositeShape("base_Shape_5"," disc - box1 - box2 -box3 - seg_1hole - seg_2hole + seg_3hole - seg_1hole:rot1- seg_2hole:rot1 - cbox:tr_cbox - labox:tr_la - labox2:tr_2la + seg_bord "); - auto * base0_Volume = new TGeoVolume("base0_Volume",base_Shape_0,kMedAlu); - auto * base1_Volume = new TGeoVolume("base1_Volume",base_Shape_1,kMedAlu); - auto * base2_Volume = new TGeoVolume("base2_Volume",base_Shape_2,kMedAlu); - auto * base3_Volume = new TGeoVolume("base3_Volume",base_Shape_3,kMedAlu); + //E auto * base0_Volume = new TGeoVolume("base0_Volume",base_Shape_0,kMedAlu); + //E auto * base1_Volume = new TGeoVolume("base1_Volume",base_Shape_1,kMedAlu); + //E auto * base2_Volume = new TGeoVolume("base2_Volume",base_Shape_2,kMedAlu); + //E auto * base3_Volume = new TGeoVolume("base3_Volume",base_Shape_3,kMedAlu); auto * base4_Volume = new TGeoVolume("base4_Volume",base_Shape_4,kMedAlu); @@ -556,9 +556,9 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) //////////////////////////////////////////composite shape for midle - auto * midle_Shape_0 = new TGeoCompositeShape("midle_Shape_0"," S_ARC_MIDLE + S_MIDLE_BOX:tr1_midle_box-S_MIDLE_BOX:tr2_midle_box-S_MIDLE_D1BOX:tr_midle_d1box-S_MIDLE_D2BOX:tr_midle_d2box "); + auto * midle_Shape_0 = new TGeoCompositeShape("midle_Shape_0","arc_midle + midle_box:tr1_midle_box- midle_box:tr2_midle_box- midle_d1box:tr_midle_d1box-midle_d2box:tr_midle_d2box "); - auto * midle_Shape_1 = new TGeoCompositeShape("midle_Shape_1"," midle_Shape_0 -S_MID_1TUBHOLE:combi_mid_1tubhole-S_MID_2TUBHOLE:combi_mid_2tubhole"); + auto * midle_Shape_1 = new TGeoCompositeShape("midle_Shape_1"," midle_Shape_0 -mid_1tubhole:combi_mid_1tubhole- mid_2tubhole:combi_mid_2tubhole"); TGeoRotation *rot_midlez = new TGeoRotation("rot_midley", 180,180,0);//half0_R rot_midlez->RegisterYourself(); @@ -699,7 +699,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) ////////////////////// composite shape for rail L ////////////////////// - auto * RL_Shape_0 = new TGeoCompositeShape("RL_Shape_0"," S_XTRU3_RL:tr_vol3_RL +S_XTRU_RL1 + S_XTRU_RL2 +S_RL_1BOX:tr_RL_1box -S_QDI_BOX:combi_qdi"); // + auto * RL_Shape_0 = new TGeoCompositeShape("RL_Shape_0"," S_XTRU3_RL:tr_vol3_RL +S_XTRU_RL1 + S_XTRU_RL2 + RL_1box:tr_RL_1box- qdi_box:combi_qdi"); // //////////////////////////////////////-------//////// @@ -710,7 +710,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) ////piece 7th ---------------RAIL RIGHT ---- //////////////----- - auto * rail_R = new TGeoVolumeAssembly("rail_R"); +//E auto * rail_R = new TGeoVolumeAssembly("rail_R"); Double_t x_RR_1box=3.0; //dx=15 Double_t y_RR_1box=1.2; // dy=6, -dy=6 @@ -812,14 +812,14 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) /////////////////////// shape for rail R //////// auto *RR_1box =new TGeoBBox("S_RR_1BOX", x_RR_1box/2,y_RR_1box/2,z_RR_1box/2); - auto *qdi_Rbox =new TGeoBBox("S_QDI_RBOX", x_qdi_Rbox/2,y_qdi_Rbox/2,z_qdi_Rbox/2); +//E auto *qdi_Rbox =new TGeoBBox("S_QDI_RBOX", x_qdi_Rbox/2,y_qdi_Rbox/2,z_qdi_Rbox/2); - auto *ir_hole=new TGeoTube("S_ir_HOLE",radin_ir_rail,radout_ir_rail,high_ir_rail/2); +//E auto *ir_hole=new TGeoTube("S_ir_HOLE",radin_ir_rail,radout_ir_rail,high_ir_rail/2); // auto *s_cc_hole=new TGeoTube("S_CC_HOLE",radin_cc_rail,radout_cc_rail,high_cc_rail/2); ////////////////////// composite shape for rail R ////////////////////// - auto * RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0","S_RR_1BOX:tr_RR_1box+ S_XTRU_RR1 + S_XTRU_RR2 +S_XTRU3_RR- S_QDI_BOX:combi_qdi "); + auto * RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0"," RR_1box:tr_RR_1box+ S_XTRU_RR1 + S_XTRU_RR2 +S_XTRU3_RR- S_QDI_BOX:combi_qdi "); //-auto * RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0","S_RR_1BOX:tr_RR_1box+ S_XTRU_RR1 + S_XTRU_RR2 +S_XTRU3_RR- S_QDI_BOX:combi_qdi + S_ir_HOLE:combi_ir_RR +S_ir_HOLE:combi_ir2_RR "); //-S_RR_1BOX:tr_RL_1box- S_b_HOLE:tr_b_RR -S_CC_HOLE:combi_cc2_RR From 4c77cbee221aa57e6144250cc36b0017f4b5048a Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Wed, 27 Feb 2019 16:03:02 -0500 Subject: [PATCH 05/22] Update HalfCone.cxx names fixed --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 160 ++++++++++----------- 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 7927e48364c3f..4166cfdbdaa20 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -130,9 +130,9 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // shape for cross_mb0 ///E... - auto * box_mb0 =new TGeoBBox("S_BOX_MB0", x_box_mb0/2,y_box_mb0/2,z_box_mb0/2); - auto * hole1_mb0=new TGeoTube("S_1HOLE_MB0",radin_1hole_mb0,radout_1hole_mb0,high_1hole_mb0/2); - auto * hole2_mb0=new TGeoTube("S_2HOLE_MB0",radin_2hole_mb0,radout_2hole_mb0,high_2hole_mb0/2); + auto * box_mb0 =new TGeoBBox("box_mb0", x_box_mb0/2,y_box_mb0/2,z_box_mb0/2); + auto * hole1_mb0=new TGeoTube("hole1_mb0",radin_1hole_mb0,radout_1hole_mb0,high_1hole_mb0/2); + auto * hole2_mb0=new TGeoTube("hole2_mb0",radin_2hole_mb0,radout_2hole_mb0,high_2hole_mb0/2); ///composite shape for mb0 @@ -168,7 +168,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // shape for shape cross beam - auto *hole_cbeam=new TGeoTube("S_HOLE_CBEAM",radin_hole_cbeam,radout_hole_cbeam,high_hole_cbeam/2); + auto *hole_cbeam=new TGeoTube("hole_cbeam",radin_hole_cbeam,radout_hole_cbeam,high_hole_cbeam/2); /// composite shape for cross beam (using the same box of mb0) auto * c_cbeam_Shape = new TGeoCompositeShape("c_cbeam_Shape"," box_mb0 - hole_cbeam:combi_hole_1cbeam - hole_cbeam:combi_hole_2cbeam"); @@ -237,22 +237,22 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) /////// shape for framewor front - TGeoShape *box_up = new TGeoBBox("BOX_UP", x_box_up/2,y_box_up/2,z_box_up/2); + TGeoShape *box_up = new TGeoBBox("box_up", x_box_up/2,y_box_up/2,z_box_up/2); - TGeoShape *tub_up=new TGeoTube("TUB_UP",0.,dia_tub_up/2,high_tub_up/2); // - TGeoShape *seg_tub=new TGeoTubeSeg("SEG_TUB",radin_segtub,radout_segtub,high_segtub/2,ang_in_segtub,ang_fin_segtub);//r_in,r_out,dZ,ang,ang + TGeoShape *tub_up=new TGeoTube("tub_up",0.,dia_tub_up/2,high_tub_up/2); // + TGeoShape *seg_tub=new TGeoTubeSeg("seg_tub",radin_segtub,radout_segtub,high_segtub/2,ang_in_segtub,ang_fin_segtub);//r_in,r_out,dZ,ang,ang - TGeoShape *boxB_down = new TGeoBBox("BOXB_DOWN", x_boxB_down/2,y_boxB_down/2,z_boxB_down/2); + TGeoShape *boxB_down = new TGeoBBox("boxB_down", x_boxB_down/2,y_boxB_down/2,z_boxB_down/2); - TGeoShape * boxA_down = new TGeoBBox("BOXA_DOWN", x_boxA_down/2,y_boxA_down/2,z_boxA_down/2); + TGeoShape * boxA_down = new TGeoBBox("boxA_down", x_boxA_down/2,y_boxA_down/2,z_boxA_down/2); - TGeoShape *tubdown=new TGeoTube("S_TUBDOWN",0.,dia_tubdown/2,high_tubdown/2); + TGeoShape *tubdown=new TGeoTube("tubdown",0.,dia_tubdown/2,high_tubdown/2); //Composite shapes for Fra_front - auto * fra_front_Shape_0 = new TGeoCompositeShape("Fra_front_Shape_0"," box_up:tr1_up +seg_tub:combi_3b+ boxB_down:tr3_box + boxA_down:tr_2_box"); + auto * fra_front_Shape_0 = new TGeoCompositeShape("fra_front_Shape_0"," box_up:tr1_up +seg_tub:combi_3b+ boxB_down:tr3_box + boxA_down:tr_2_box"); - auto * fra_front_Shape_1 = new TGeoCompositeShape("Fra_front_Shape_1","fra_front_Shape_0 - tubdown:tr_tubdown -tub_up:combi_3a"); - auto * fra_front_Shape_2 = new TGeoCompositeShape("Fra_front_Shape_2","Fra_front_Shape_1:rot_90x - tub_up:combi_3a"); //- + auto * fra_front_Shape_1 = new TGeoCompositeShape("fra_front_Shape_1","fra_front_Shape_0 - tubdown:tr_tubdown -tub_up:combi_3a"); + auto * fra_front_Shape_2 = new TGeoCompositeShape("fra_front_Shape_2","fra_front_Shape_1:rot_90x - tub_up:combi_3a"); //- TGeoRotation *rot_z180x90 = new TGeoRotation("rot_z180x90", 180,90,0);//half0_R rot_z180x90->RegisterYourself(); @@ -269,7 +269,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_front_R->RegisterYourself(); - auto * fra_front_Shape_3 = new TGeoCompositeShape("Fra_front_Shape_3","fra_front_Shape_2:rot_halfR "); + auto * fra_front_Shape_3 = new TGeoCompositeShape("fra_front_Shape_3","fra_front_Shape_2:rot_halfR "); auto * Fra_front_Volume = new TGeoVolume("Fra_front_Volume",fra_front_Shape_1,kMedAlu); @@ -426,26 +426,26 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) ///////// shape for base -- - auto *disc=new TGeoTubeSeg("S_DISC",radin_disc,radout_disc,high_disc/2,ang_in_disc,ang_fin_disc); + auto *disc=new TGeoTubeSeg("disc",radin_disc,radout_disc,high_disc/2,ang_in_disc,ang_fin_disc); - auto *box1 =new TGeoBBox("BOX1", x_1box/2,y_1box/2,z_1box/2); - auto *box2 =new TGeoBBox("BOX2", x_2box/2,y_2box/2,z_2box/2); - auto *box3 =new TGeoBBox("BOX3", x_3box/2,y_3box/2,z_3box/2); - auto *labox =new TGeoBBox("LA_BOX", x_labox/2,y_labox/2,z_labox/2); - auto *labox2 =new TGeoBBox("LA_2BOX", x_2labox/2,y_2labox/2,z_2labox/2); - auto *cbox =new TGeoBBox("CENTRAL_BOX", xc_box/2,yc_box/2,zc_box/2); - auto *tongbox =new TGeoBBox("TONG_BOX", x_tong/2,y_tong/2,z_tong/2); + auto *box1 =new TGeoBBox("box1", x_1box/2,y_1box/2,z_1box/2); + auto *box2 =new TGeoBBox("box2", x_2box/2,y_2box/2,z_2box/2); + auto *box3 =new TGeoBBox("box3", x_3box/2,y_3box/2,z_3box/2); + auto *labox1 =new TGeoBBox("labox1", x_labox/2,y_labox/2,z_labox/2); + auto *labox2 =new TGeoBBox("labox2", x_2labox/2,y_2labox/2,z_2labox/2); + auto *cbox =new TGeoBBox("cbox", xc_box/2,yc_box/2,zc_box/2); + auto *tongbox =new TGeoBBox("tongbox", x_tong/2,y_tong/2,z_tong/2); - TGeoShape *seg_1hole=new TGeoTubeSeg("SEG_1HOLE",radin_1hole,radout_1hole,high_1hole/2,ang_in_1hole,ang_fin_1hole);//r_in,r_out,dZ,ang,ang - TGeoShape *seg_2hole=new TGeoTubeSeg("SEG_2HOLE",radin_2hole,radout_2hole,high_2hole/2,ang_in_2hole,ang_fin_2hole); - TGeoShape *seg_3hole=new TGeoTubeSeg("SEG_3ARC",radin_3hole,radout_3hole,high_3hole/2,ang_in_3hole,ang_fin_3hole);// |u| - TGeoShape *seg_bord=new TGeoTubeSeg("SEG_BORD",radin_bord,radout_bord,high_bord/2,ang_in_bord,ang_fin_bord); + TGeoShape *seg_1hole=new TGeoTubeSeg("seg_1hole",radin_1hole,radout_1hole,high_1hole/2,ang_in_1hole,ang_fin_1hole);//r_in,r_out,dZ,ang,ang + TGeoShape *seg_2hole=new TGeoTubeSeg("seg_2hole",radin_2hole,radout_2hole,high_2hole/2,ang_in_2hole,ang_fin_2hole); + TGeoShape *seg_3hole=new TGeoTubeSeg("seg_3hole",radin_3hole,radout_3hole,high_3hole/2,ang_in_3hole,ang_fin_3hole);// |u| + TGeoShape *seg_bord=new TGeoTubeSeg("seg_bord",radin_bord,radout_bord,high_bord/2,ang_in_bord,ang_fin_bord); - auto *circ_hole1=new TGeoTube("S_CIRC_HOLE1",radin_hole1,radout_hole1,high_hole1/2); + auto *circ_hole1=new TGeoTube("circ_hole1",radin_hole1,radout_hole1,high_hole1/2); - auto *circ_hole2=new TGeoTube("S_CIRC_HOLE2",radin_hole2,radout_hole2,high_hole2/2); + auto *circ_hole2=new TGeoTube("circ_hole2",radin_hole2,radout_hole2,high_hole2/2); - auto *circ_holeB=new TGeoTube("S_CIRC_HOLEB",radin_holeB,radout_holeB,high_holeB/2); + auto *circ_holeB=new TGeoTube("circ_holeB",radin_holeB,radout_holeB,high_holeB/2); //// composite shape for base ---- @@ -454,7 +454,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto * base_Shape_2 = new TGeoCompositeShape("base_Shape_2"," seg_3hole +seg_bord:combi_cent_bord "); //-SEG_BORD:combi_cent_bord - auto * base_Shape_3 = new TGeoCompositeShape("base_Shape_3"," labox:tr_la+ labox2:tr_2la "); + auto * base_Shape_3 = new TGeoCompositeShape("base_Shape_3"," labox1:tr_la+ labox2:tr_2la "); auto * base_Shape_4 = new TGeoCompositeShape("base_Shape_4","base_Shape_0 -base_Shape_1 - base_Shape_1:rot1 + base_Shape_2 +tongbox:tr_tong - circ_hole1:tr_hole1 - circ_hole1:tr2_hole1 - circ_hole1:tr3_hole1 -circ_hole2:tr1_hole2-circ_hole2:tr2_hole2 -base_Shape_3 "); @@ -542,17 +542,17 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) ///////// shape for midle - auto *midle_box =new TGeoBBox("S_MIDLE_BOX", x_midle/2,y_midle/2,z_midle/2); + auto *midle_box =new TGeoBBox(" midle_box", x_midle/2,y_midle/2,z_midle/2); - auto *midle_d1box =new TGeoBBox("S_MIDLE_D1BOX", x_midle_d1box/2,y_midle_d1box/2,z_midle_d1box/2); + auto *midle_d1box =new TGeoBBox("midle_d1box", x_midle_d1box/2,y_midle_d1box/2,z_midle_d1box/2); - auto *midle_d2box =new TGeoBBox("S_MIDLE_D2BOX", x_midle_d2box/2,y_midle_d2box/2,z_midle_d2box/2); + auto *midle_d2box =new TGeoBBox("midle_d2box", x_midle_d2box/2,y_midle_d2box/2,z_midle_d2box/2); - auto *arc_midle=new TGeoTubeSeg("S_ARC_MIDLE",radin_midle,radout_midle,high_midle/2,ang_in_midle,ang_fin_midle); + auto *arc_midle=new TGeoTubeSeg("arc_midle",radin_midle,radout_midle,high_midle/2,ang_in_midle,ang_fin_midle); - auto *mid_1tubhole=new TGeoTube("S_MID_1TUBHOLE",radin_mid_1hole,radout_mid_1hole,high_mid_1hole/2); + auto *mid_1tubhole=new TGeoTube("mid_1tubhole",radin_mid_1hole,radout_mid_1hole,high_mid_1hole/2); - auto *mid_2tubhole=new TGeoTube("S_MID_2TUBHOLE",radin_mid_2hole,radout_mid_2hole,high_mid_2hole/2); + auto *mid_2tubhole=new TGeoTube("mid_2tubhole",radin_mid_2hole,radout_mid_2hole,high_mid_2hole/2); //////////////////////////////////////////composite shape for midle @@ -561,10 +561,10 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto * midle_Shape_1 = new TGeoCompositeShape("midle_Shape_1"," midle_Shape_0 -mid_1tubhole:combi_mid_1tubhole- mid_2tubhole:combi_mid_2tubhole"); TGeoRotation *rot_midlez = new TGeoRotation("rot_midley", 180,180,0);//half0_R - rot_midlez->RegisterYourself(); - TGeoCombiTrans *combi_midle_L = new TGeoCombiTrans(0, -7.625, 24.15+0.675,rot_90x);//x=7.35, y=0, z=15.79 -- 0,-7.625,24.15+0.675-80) - combi_midle_L->SetName("combi_midle_L"); - combi_midle_L->RegisterYourself(); + rot_midlez->RegisterYourself(); + TGeoCombiTrans *combi_midle_L = new TGeoCombiTrans(0, -7.625, 24.15+0.675,rot_90x);//x=7.35, y=0, z=15.79 -- 0,-7.625,24.15+0.675-80) + combi_midle_L->SetName("combi_midle_L"); + combi_midle_L->RegisterYourself(); TGeoTranslation *tr_midle_L= new TGeoTranslation("tr_midle_L",0,-7.625,24.15+0.675); //-152,-17.45,0 tr_midle_L->RegisterYourself(); @@ -690,10 +690,11 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_ir2_RL->RegisterYourself(); /////////////////////// shape for Rail L geom///////// - auto *RL_1box =new TGeoBBox("S_RL_1BOX", x_RL_1box/2,y_RL_1box/2,z_RL_1box/2); - auto *RL_kneebox =new TGeoBBox("S_RL_KNEEBOX", x_RL_kneebox/2,y_RL_kneebox/2,z_RL_kneebox/2); - auto *qdi_box =new TGeoBBox("S_QDI_BOX", x_qdi_box/2,y_qdi_box/2,z_qdi_box/2); - auto *RL1hole=new TGeoTube("S_RL1HOLE",radin_RL1hole,radout_RL1hole,high_RL1hole/2); + auto *RL_1box =new TGeoBBox("RL_1box", x_RL_1box/2,y_RL_1box/2,z_RL_1box/2); + auto *RL_kneebox =new TGeoBBox("RL_kneebox", x_RL_kneebox/2,y_RL_kneebox/2,z_RL_kneebox/2); + auto *qdi_box =new TGeoBBox("qdi_box", x_qdi_box/2,y_qdi_box/2,z_qdi_box/2); + + //auto *RL1hole=new TGeoTube("S_RL1HOLE",radin_RL1hole,radout_RL1hole,high_RL1hole/2); //-auto *s_irL_hole=new TGeoTube("S_irL_HOLE",radin_ir_railL,radout_ir_railL,high_ir_railL/2); @@ -708,7 +709,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) rail_L->AddNode(rail_L_vol0,1,new TGeoTranslation(0., 0., 1.5) ); - ////piece 7th ---------------RAIL RIGHT ---- //////////////----- + ////piece 7th ---------------RAIL RIGHT (RR)---- //////////////----- //E auto * rail_R = new TGeoVolumeAssembly("rail_R"); @@ -719,43 +720,43 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) tr_RR_1box->RegisterYourself(); ////////////////////////////////7 - TGeoXtru *xtru_RR1 = new TGeoXtru(2); - xtru_RR1->SetName("S_XTRU_RR1"); + TGeoXtru *part_RR1 = new TGeoXtru(2); + part_RR1->SetName("part_RR1"); //-TGeoVolume *vol_RR1 = gGeoManager->MakeXtru("S_XTRU_RR1",kMedAlu,2); //-TGeoXtru *xtru_RR1 = (TGeoXtru*)vol_RR1->GetShape(); Double_t x_RR1[5]={-1.5,-0.5,-0.5,1.5,1.5 };//C,D,K,L,C' //vertices Double_t y_RR1[5]={1.2,2.2,8.2,8.2,1.2};//357.5,357.5,250.78,145.91}; - xtru_RR1->DefinePolygon(5,x_RR1,y_RR1); - xtru_RR1->DefineSection(0,-2.225,0,0,1); //(plane,-zplane/ +zplane, x0, y0,(x/y)) - xtru_RR1->DefineSection(1,2.225,0,0,1); + part_RR1->DefinePolygon(5,x_RR1,y_RR1); + part_RR1->DefineSection(0,-2.225,0,0,1); //(plane,-zplane/ +zplane, x0, y0,(x/y)) + part_RR1->DefineSection(1,2.225,0,0,1); ////////////// \////////// - TGeoXtru *xtru_RR2 = new TGeoXtru(2); - xtru_RR2->SetName("S_XTRU_RR2"); + TGeoXtru *part_RR2 = new TGeoXtru(2); + part_RR2->SetName("part_RR2"); //-TGeoVolume *vol_RR2 = gGeoManager->MakeXtru("S_XTRU_RR2",Al,2); //-TGeoXtru *xtru_RR2 = (TGeoXtru*)vol_RR2->GetShape(); Double_t x_RR2[8]={-0.5,-0.5,-9.3,-9.3,-7.3,-7.3,1.5,1.5};//K,E,F,G,H,I,J,L//vertices Double_t y_RR2[8]={8.2,13.863,24.35,35.75,35.75,25.078,14.591,8.2}; - xtru_RR2->DefinePolygon(8,x_RR2,y_RR2); - xtru_RR2->DefineSection(0,0.776,0,0,1);//(plane,-zplane/+zplane, x0, y0,(x/y)) - xtru_RR2->DefineSection(1,2.225 ,0,0,1); + part_RR2->DefinePolygon(8,x_RR2,y_RR2); + part_RR2->DefineSection(0,0.776,0,0,1);//(plane,-zplane/+zplane, x0, y0,(x/y)) + part_RR2->DefineSection(1,2.225 ,0,0,1); ////////////// knee (small) - TGeoXtru *xtru3_RR = new TGeoXtru(2); - xtru3_RR->SetName("S_XTRU3_RR"); + TGeoXtru *part_RR3 = new TGeoXtru(2); + part_RR3->SetName("part_RR3"); Double_t x_3RR[6]={1.0,1.0,-1.2497,-2.2138,-0.5,-0.5};//R,Q,P,O,N.M //vertices Double_t y_3RR[6]={10.91,14.41,17.0911,15.9421,13.86,10.91}; - xtru3_RR->DefinePolygon(6,x_3RR,y_3RR); - xtru3_RR->DefineSection(0,-0.75,0,0,1);//(plane,-zplane/+zplane, x0, y0,(x/y)) - xtru3_RR->DefineSection(1,0.78,0,0,1); + part_RR3->DefinePolygon(6,x_3RR,y_3RR); + part_RR3->DefineSection(0,-0.75,0,0,1);//(plane,-zplane/+zplane, x0, y0,(x/y)) + part_RR3->DefineSection(1,0.78,0,0,1); TGeoTranslation *tr_vol3_RR= new TGeoTranslation("tr_vol3_RR",-0.25,12.66,0); // tr_vol3_RR->RegisterYourself(); @@ -810,7 +811,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) tr_sr_r->RegisterYourself(); /////////////////////// shape for rail R //////// - auto *RR_1box =new TGeoBBox("S_RR_1BOX", x_RR_1box/2,y_RR_1box/2,z_RR_1box/2); + auto *RR_1box =new TGeoBBox("RR_1box", x_RR_1box/2,y_RR_1box/2,z_RR_1box/2); //E auto *qdi_Rbox =new TGeoBBox("S_QDI_RBOX", x_qdi_Rbox/2,y_qdi_Rbox/2,z_qdi_Rbox/2); @@ -819,12 +820,11 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // auto *s_cc_hole=new TGeoTube("S_CC_HOLE",radin_cc_rail,radout_cc_rail,high_cc_rail/2); ////////////////////// composite shape for rail R ////////////////////// - auto * RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0"," RR_1box:tr_RR_1box+ S_XTRU_RR1 + S_XTRU_RR2 +S_XTRU3_RR- S_QDI_BOX:combi_qdi "); - - //-auto * RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0","S_RR_1BOX:tr_RR_1box+ S_XTRU_RR1 + S_XTRU_RR2 +S_XTRU3_RR- S_QDI_BOX:combi_qdi + S_ir_HOLE:combi_ir_RR +S_ir_HOLE:combi_ir2_RR "); //-S_RR_1BOX:tr_RL_1box- S_b_HOLE:tr_b_RR -S_CC_HOLE:combi_cc2_RR + auto * RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0"," RR_1box:tr_RR_1box+ part_RR1 + part_RR2 +part_RR3 - qdi_box:combi_qdi "); + //-auto * RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0","RR_1BOX:tr_RR_1box+ part_RR1 +part_RR2 +part_RR3- S_QDI_BOX:combi_qdi + S_ir_HOLE:combi_ir_RR +S_ir_HOLE:combi_ir2_RR "); //-S_RR_1BOX:tr_RL_1box- S_b_HOLE:tr_b_RR -S_CC_HOLE:combi_cc2_RR - // JOIN only for show L and R parts + ///// JOIN only for show L and R parts auto * rail_L_R_Shape = new TGeoCompositeShape("RAIL_L_R_Shape"," RL_Shape_0:combi_rail_L + RR_Shape_0:combi_rail_R"); ////////////////////////////////////// @@ -845,16 +845,16 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) /////////////////VARIAb - TGeoXtru *xtru_MBL_0 = new TGeoXtru(2); - xtru_MBL_0->SetName("S_XTRU_MBL_0"); //V-MBL_0 + TGeoXtru *part_MBL_0 = new TGeoXtru(2); + part_MBL_0->SetName("part_MBL_0"); //V-MBL_0 // vertices a,b,c,d,e,f,g,h Double_t x[8]={0.,0,6.1,31.55,34.55,34.55,31.946,6.496}; Double_t y[8]={-0.4,0.4,0.4,13.0,13.0,12.2,12.2,-0.4}; - xtru_MBL_0->DefinePolygon(8,x,y); - xtru_MBL_0->DefineSection(0,-0.4,0,0,1);//(plane, -zplane/ +zplane,x0,y0,(x/y)) - xtru_MBL_0->DefineSection(1,0.4,0,0,1); + part_MBL_0->DefinePolygon(8,x,y); + part_MBL_0->DefineSection(0,-0.4,0,0,1);//(plane, -zplane/ +zplane,x0,y0,(x/y)) + part_MBL_0->DefineSection(1,0.4,0,0,1); TGeoRotation *rot1_MBL_0 = new TGeoRotation("rot1_MBL_0", -90,-90,90); rot1_MBL_0->RegisterYourself(); @@ -923,23 +923,23 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_hup_mb->RegisterYourself(); /////////////////////// shape for rail MB ///////// - auto *s_mb_box =new TGeoBBox("S_MB_BOX", x_mb_box/2,y_mb_box/2,z_mb_box/2); - auto *s_hole_1mbl=new TGeoTube("S_HOLE_1MBL",radin_1mb,radout_1mb,high_1mb/2); // d3.5 - auto *s_hole_2mbl=new TGeoTube("S_HOLE_2MBL",radin_2mb,radout_2mb,high_2mb/2); //d3 - auto *s_lat_box =new TGeoBBox("S_LAT_BOX",x_lat_box/2,y_lat_box/2,z_lat_box/2); + auto *mb_box =new TGeoBBox("mb_box", x_mb_box/2,y_mb_box/2,z_mb_box/2); + auto *hole_1mbl=new TGeoTube("hole_1mbl",radin_1mb,radout_1mb,high_1mb/2); // d3.5 + auto *hole_2mbl=new TGeoTube(" hole_2mbl",radin_2mb,radout_2mb,high_2mb/2); //d3 + auto *lat_box =new TGeoBBox("lat_box",x_lat_box/2,y_lat_box/2,z_lat_box/2); ////////////////////// composite shape for rail_MB R + L ////////////////////// - // auto * MB_Shape_0 = new TGeoCompositeShape("MB_Shape_0"," V_MBL_0 - S_MB_BOX:tr_mb_box - S_HOLE_1MBL:tr1_mb + S_HOLE_1MBL:tr2_mb -S_HOLE_2MBL:combi_hup_mb "); - auto * MB_Shape_0 = new TGeoCompositeShape("MB_Shape_0","S_XTRU_MBL_0 - S_MB_BOX:tr_mb_box - S_HOLE_1MBL:tr1_mb -S_HOLE_2MBL:combi_hup_mb "); + // auto * MB_Shape_0 = new TGeoCompositeShape("MB_Shape_0"," V_MBL_0 -mb_box:tr_mb_box -hole_1mbl:tr1_mb +hole_1mbl:tr2_mb -hole_2mbl:combi_hup_mb "); + auto * MB_Shape_0 = new TGeoCompositeShape("MB_Shape_0","part_MBL_0 -mb_box:tr_mb_box -hole_1mbl:tr1_mb -hole_2mbl:combi_hup_mb "); - auto * MB_Shape_0L = new TGeoCompositeShape("MB_Shape_0L","MB_Shape_0 -S_LAT_BOX:tr_lat1L_box -S_LAT_BOX:tr_lat2L_box - S_LAT_BOX:tr_lat3L_box -S_LAT_BOX:tr_lat4L_box- S_LAT_BOX:tr_lat5L_box "); + auto * MB_Shape_0L = new TGeoCompositeShape("MB_Shape_0L","MB_Shape_0 -lat_box:tr_lat1L_box - lat_box:tr_lat2L_box - lat_box:tr_lat3L_box- lat_box:tr_lat4L_box-lat_box:tr_lat5L_box "); - auto * MB_Shape_0R = new TGeoCompositeShape("MB_Shape_0R","MB_Shape_0 - S_LAT_BOX:tr_lat1R_box -S_LAT_BOX:tr_lat2R_box - S_LAT_BOX:tr_lat3R_box -S_LAT_BOX:tr_lat4R_box- S_LAT_BOX:tr_lat5R_box"); + auto * MB_Shape_0R = new TGeoCompositeShape("MB_Shape_0R","MB_Shape_0 -lat_box:tr_lat1R_box -lat_box:tr_lat2R_box - lat_box:tr_lat3R_box -lat_box:tr_lat4R_box- lat_box:tr_lat5R_box"); - auto * MB_Shape_1L = new TGeoCompositeShape("MB_Shape_1L","MB_Shape_0L:rot1_MBL_0 - S_HOLE_2MBL"); // one piece "completed" + auto * MB_Shape_1L = new TGeoCompositeShape("MB_Shape_1L","MB_Shape_0L:rot1_MBL_0 -hole_2mbl"); // one piece "completed" // left and right--> - auto * MB_Shape_1R = new TGeoCompositeShape("MB_Shape_1R","MB_Shape_0R:rot1_MBL_0 - S_HOLE_2MBL"); + auto * MB_Shape_1R = new TGeoCompositeShape("MB_Shape_1R","MB_Shape_0R:rot1_MBL_0 - hole_2mbl"); auto * MB_Shape_2 = new TGeoCompositeShape("MB_Shape_2"," MB_Shape_1L:tr_mbl + MB_Shape_1R:tr_mbr "); From ebe1d1b18534341d18e8cc36bc39f24821e55fbf Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Wed, 27 Feb 2019 18:03:38 -0500 Subject: [PATCH 06/22] Update HalfCone.cxx excluding names pointer which are not used --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 4166cfdbdaa20..a8dba4e3c3bbf 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -252,7 +252,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto * fra_front_Shape_0 = new TGeoCompositeShape("fra_front_Shape_0"," box_up:tr1_up +seg_tub:combi_3b+ boxB_down:tr3_box + boxA_down:tr_2_box"); auto * fra_front_Shape_1 = new TGeoCompositeShape("fra_front_Shape_1","fra_front_Shape_0 - tubdown:tr_tubdown -tub_up:combi_3a"); - auto * fra_front_Shape_2 = new TGeoCompositeShape("fra_front_Shape_2","fra_front_Shape_1:rot_90x - tub_up:combi_3a"); //- +///E auto * fra_front_Shape_2 = new TGeoCompositeShape("fra_front_Shape_2","fra_front_Shape_1:rot_90x - tub_up:combi_3a"); //- TGeoRotation *rot_z180x90 = new TGeoRotation("rot_z180x90", 180,90,0);//half0_R rot_z180x90->RegisterYourself(); @@ -269,7 +269,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_front_R->RegisterYourself(); - auto * fra_front_Shape_3 = new TGeoCompositeShape("fra_front_Shape_3","fra_front_Shape_2:rot_halfR "); + ///E auto * fra_front_Shape_3 = new TGeoCompositeShape("fra_front_Shape_3","fra_front_Shape_2:rot_halfR "); auto * Fra_front_Volume = new TGeoVolume("Fra_front_Volume",fra_front_Shape_1,kMedAlu); @@ -542,7 +542,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) ///////// shape for midle - auto *midle_box =new TGeoBBox(" midle_box", x_midle/2,y_midle/2,z_midle/2); + auto *midle_box =new TGeoBBox("midle_box", x_midle/2,y_midle/2,z_midle/2); auto *midle_d1box =new TGeoBBox("midle_d1box", x_midle_d1box/2,y_midle_d1box/2,z_midle_d1box/2); From 11544fec36cbb8b63df0a6a1445d09e13918ddb5 Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Sat, 9 Mar 2019 10:43:38 -0500 Subject: [PATCH 07/22] Update HalfCone.cxx fixed according the clang-format. --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 1965 ++++++++++---------- 1 file changed, 1007 insertions(+), 958 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index a8dba4e3c3bbf..3b1d1a2c6c2f5 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -12,9 +12,8 @@ /// \brief Class building geometry of one half of one MFT half-cone /// \author sbest@pucp.pe, eric.endress@gmx.de, franck.manso@clermont.in2p3.fr -/// Carlos csoncco@pucp.edu.pe -/// \date 20/01/2019 - +/// Carlos csoncco@pucp.edu.pe +/// \date 09/03/2019 #include "TGeoManager.h" #include "TGeoMatrix.h" @@ -50,963 +49,1013 @@ HalfCone::~HalfCone() = default; TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) { - auto *HalfConeVolume = new TGeoVolumeAssembly("HalfConeVolume"); - - TGeoMedium *kMedAlu = gGeoManager->GetMedium("MFT_Alu$"); - //--- define some materials - - TGeoMaterial *matAl = new TGeoMaterial("Al", 26.98,13,2.7); - // //--- define some media -///E TGeoMedium *Vacuum = new TGeoMedium("Vacuum",1, matVacuum); -///E TGeoMedium *Al = new TGeoMedium("Root Material",2, matAl); - /////Rotation //// - - TGeoRotation *rot1 = new TGeoRotation("rot1", 180,-180,0); - - rot1->RegisterYourself(); - TGeoRotation *rot2 = new TGeoRotation("rot2", 90,-90,0); - - rot2->RegisterYourself(); - - TGeoRotation *rot3 = new TGeoRotation("rot3", 0,90,0); - rot3->RegisterYourself(); - - TGeoRotation *rot_90x = new TGeoRotation("rot_90x", 0,-90,0); // half0 - - rot_90x->RegisterYourself(); - - TGeoRotation *rot_base = new TGeoRotation("rot_base", 180,180,0); // rail_r - rot_base->RegisterYourself(); - - - TGeoCombiTrans *combi1 = new TGeoCombiTrans(0, -10.3, 1.29, rot1); //y=-10.80 belt - combi1->RegisterYourself(); - TGeoCombiTrans *combi2 = new TGeoCombiTrans(-16.8, 0., 0., rot2); - - combi2->RegisterYourself(); - TGeoRotation *r0 = new TGeoRotation("r0",10.,0.,0.); - r0->RegisterYourself(); - - ///// 1st piece --------- Cross_beam_MB0----------------------/// - - auto *Cross_mb0 = new TGeoVolumeAssembly("Cross_mb0"); - /// variables - // rectangular box - Double_t x_box_mb0 =14.4; // dx= 7.2 cm - Double_t y_box_mb0 =0.6; - Double_t z_box_mb0 =0.6; - - ///// holes tub 1hole tranversal - Double_t radin_1hole_mb0=0.; - Double_t radout_1hole_mb0=0.175;// diameter 3.5 H9 (0.35cm) - Double_t high_1hole_mb0=0.7;/// - - TGeoRotation *rot_1hole_mb0 = new TGeoRotation("rot_1hole_mb0", 0,90,0); - rot_1hole_mb0->RegisterYourself(); - /// h= hole - TGeoCombiTrans *acombi_1h_mb0 = new TGeoCombiTrans(5.2,0, 0,rot_1hole_mb0); - acombi_1h_mb0->SetName("acombi_1h_mb0"); - acombi_1h_mb0->RegisterYourself(); - TGeoCombiTrans *bcombi_1h_mb0 = new TGeoCombiTrans(-5.2,0, 0,rot_1hole_mb0);//y= - bcombi_1h_mb0->SetName("bcombi_1h_mb0"); - bcombi_1h_mb0->RegisterYourself(); - - ///// 2hole coaxial - Double_t radin_2hole_mb0=0.; - Double_t radout_2hole_mb0=0.15;// diameter M3 - Double_t high_2hole_mb0=1.2;/// 12 - - TGeoRotation *rot_2hole_mb0 = new TGeoRotation("rot_2hole_mb0", 90,90,0); - rot_2hole_mb0->SetName("rot_2hole_mb0"); - rot_2hole_mb0->RegisterYourself(); - - TGeoCombiTrans *combi_2hole_mb0 = new TGeoCombiTrans(6.7,0, 0,rot_2hole_mb0); - combi_2hole_mb0->SetName("combi_2hole_mb0"); - combi_2hole_mb0->RegisterYourself(); - - TGeoCombiTrans *combi_2hole_mb0_b = new TGeoCombiTrans(-6.7,0, 0,rot_2hole_mb0);//y= - combi_2hole_mb0_b->SetName("combi_2hole_mb0_b"); - combi_2hole_mb0_b->RegisterYourself(); - - // shape for cross_mb0 - ///E... - auto * box_mb0 =new TGeoBBox("box_mb0", x_box_mb0/2,y_box_mb0/2,z_box_mb0/2); - auto * hole1_mb0=new TGeoTube("hole1_mb0",radin_1hole_mb0,radout_1hole_mb0,high_1hole_mb0/2); - auto * hole2_mb0=new TGeoTube("hole2_mb0",radin_2hole_mb0,radout_2hole_mb0,high_2hole_mb0/2); - - ///composite shape for mb0 - - auto * c_mb0_Shape_0 = new TGeoCompositeShape("c_mb0_Shape_0","box_mb0 -hole1_mb0:acombi_1h_mb0 - hole1_mb0:bcombi_1h_mb0 - hole2_mb0:combi_2hole_mb0 - hole2_mb0:combi_2hole_mb0_b"); - - /////////////////// - auto * cross_mb0_Volume = new TGeoVolume("cross_mb0_Volume",c_mb0_Shape_0,kMedAlu); - - Cross_mb0->AddNode(cross_mb0_Volume,1); - -//////////////////////////////////////////// - - ///// 2nd piece ------ cross beam--MFT---------(cbeam)----- - - auto *Cross_mft = new TGeoVolumeAssembly("Cross_mft"); - /// variables - - // using the same "box" of the 1 piece - ////////// 2hole coaxial - Double_t radin_hole_cbeam=0.; - Double_t radout_hole_cbeam=0.15;// diameter M3 - Double_t high_hole_cbeam=0.91;/// - - // same rotation in tub aximatAl "rot_2hole_mb0" - - TGeoCombiTrans *combi_hole_1cbeam = new TGeoCombiTrans(6.8,0, 0,rot_2hole_mb0); - combi_hole_1cbeam->SetName("combi_hole_1cbeam"); - combi_hole_1cbeam->RegisterYourself(); - - TGeoCombiTrans *combi_hole_2cbeam = new TGeoCombiTrans(-6.8,0, 0,rot_2hole_mb0); - combi_hole_2cbeam->SetName("combi_hole_2cbeam"); - combi_hole_2cbeam->RegisterYourself(); - - // shape for shape cross beam - - auto *hole_cbeam=new TGeoTube("hole_cbeam",radin_hole_cbeam,radout_hole_cbeam,high_hole_cbeam/2); - - /// composite shape for cross beam (using the same box of mb0) - auto * c_cbeam_Shape = new TGeoCompositeShape("c_cbeam_Shape"," box_mb0 - hole_cbeam:combi_hole_1cbeam - hole_cbeam:combi_hole_2cbeam"); - - /////////////////// - auto * Cross_mft_Volume = new TGeoVolume("Cross_mft_Volume",c_cbeam_Shape,kMedAlu); - - Cross_mft->AddNode(Cross_mft_Volume,1); -//////////////////////////////////////////// - - - ////3th piece -------- Framework front ------------ - - auto *Fra_front = new TGeoVolumeAssembly("Fra_front"); - auto *Fra_front_L = new TGeoVolumeAssembly("Fra_front_L"); - auto *Fra_front_R = new TGeoVolumeAssembly("Fra_front_R"); - - Double_t x_box_up =0.6; // cm - Double_t y_box_up =0.605; - Double_t z_box_up =2.84; - //hole up // - Double_t dia_tub_up=0.35; - Double_t high_tub_up=0.65; - //hole down//// - Double_t dia_tubdown =0.35; - Double_t high_tubdown =0.68; - // - Double_t x_boxA_down=0.8; - Double_t y_boxA_down=0.6; - Double_t z_boxA_down=0.6; - // - Double_t x_boxB_down=0.6; - Double_t y_boxB_down=0.605; - Double_t z_boxB_down=1.26; // 12.6 - //seg tub - Double_t radin_segtub=16.9; - Double_t radout_segtub=17.5; - Double_t high_segtub=0.6; - Double_t ang_in_segtub=212.1; - Double_t ang_fin_segtub=241.92; // - - /////// trans. rot. - TGeoCombiTrans *combi_3a = new TGeoCombiTrans(-7.4, 0, 8.975,rot2); - combi_3a->SetName("combi_3a"); - combi_3a->RegisterYourself(); - - TGeoTranslation *tr1_up = new TGeoTranslation("tr1_up",-7.4,0,8.28); // - - tr1_up->RegisterYourself(); - - TGeoTranslation *tr1_tub1 = new TGeoTranslation("tr1_tub1",0,0.,3.075); - tr1_tub1->RegisterYourself(); - - TGeoCombiTrans *combi_3b = new TGeoCombiTrans(7.118, 0, 16.16,rot3); - combi_3b->SetName("combi_3b"); - combi_3b->RegisterYourself(); - - TGeoTranslation *tr_2_box = new TGeoTranslation("tr_2_box",-0.4,0,0.7); // - tr_2_box->RegisterYourself(); - - TGeoTranslation *tr3_box = new TGeoTranslation("tr3_box",-1.1,0,0.63); // - tr3_box->RegisterYourself(); - - TGeoTranslation *tr_tubdown = new TGeoTranslation("tr_tubdown",-0.4,0,0.7); // - tr_tubdown->RegisterYourself(); - - /////// shape for framewor front - - TGeoShape *box_up = new TGeoBBox("box_up", x_box_up/2,y_box_up/2,z_box_up/2); - - TGeoShape *tub_up=new TGeoTube("tub_up",0.,dia_tub_up/2,high_tub_up/2); // - TGeoShape *seg_tub=new TGeoTubeSeg("seg_tub",radin_segtub,radout_segtub,high_segtub/2,ang_in_segtub,ang_fin_segtub);//r_in,r_out,dZ,ang,ang - - TGeoShape *boxB_down = new TGeoBBox("boxB_down", x_boxB_down/2,y_boxB_down/2,z_boxB_down/2); - - TGeoShape * boxA_down = new TGeoBBox("boxA_down", x_boxA_down/2,y_boxA_down/2,z_boxA_down/2); - - TGeoShape *tubdown=new TGeoTube("tubdown",0.,dia_tubdown/2,high_tubdown/2); - - //Composite shapes for Fra_front - auto * fra_front_Shape_0 = new TGeoCompositeShape("fra_front_Shape_0"," box_up:tr1_up +seg_tub:combi_3b+ boxB_down:tr3_box + boxA_down:tr_2_box"); - - auto * fra_front_Shape_1 = new TGeoCompositeShape("fra_front_Shape_1","fra_front_Shape_0 - tubdown:tr_tubdown -tub_up:combi_3a"); -///E auto * fra_front_Shape_2 = new TGeoCompositeShape("fra_front_Shape_2","fra_front_Shape_1:rot_90x - tub_up:combi_3a"); //- - - TGeoRotation *rot_z180x90 = new TGeoRotation("rot_z180x90", 180,90,0);//half0_R - rot_z180x90->RegisterYourself(); - - - TGeoRotation *rot_halfR = new TGeoRotation("rot_halfR", 180,180,0);//half0_R - rot_halfR->RegisterYourself(); - TGeoCombiTrans *combi_front_L = new TGeoCombiTrans(-7.1, -16.2, 32.5+0.675,rot_90x);//x=7.35, y=0, z=15.79 - combi_front_L->SetName("combi_front_L"); - combi_front_L->RegisterYourself(); - - TGeoCombiTrans *combi_front_R = new TGeoCombiTrans(7.1, -16.2, 32.5+0.675,rot_z180x90);//x=7.35, y=0, z=15.79 - combi_front_R->SetName("combi_front_R"); - combi_front_R->RegisterYourself(); - - - ///E auto * fra_front_Shape_3 = new TGeoCompositeShape("fra_front_Shape_3","fra_front_Shape_2:rot_halfR "); - - auto * Fra_front_Volume = new TGeoVolume("Fra_front_Volume",fra_front_Shape_1,kMedAlu); - - Fra_front_L->AddNode(Fra_front_Volume,1,combi_front_L); - Fra_front_R->AddNode(Fra_front_Volume,1,combi_front_R); - - Fra_front->AddNode(Fra_front_L,1); - Fra_front->AddNode(Fra_front_R,2); - - ///////////////////////////////////////////////----- - - //4th piece ------------------"BASE" framework half support ------ - - auto *base = new TGeoVolumeAssembly("base"); - - //seg tub disc - Double_t radin_disc=23.6; - Double_t radout_disc=30.3; - Double_t high_disc=1.35; - Double_t ang_in_disc=180; - Double_t ang_fin_disc=360; - - ///// holes tub 1hole tranversal o3.5 - Double_t radin_holeB=0.; - Double_t radout_holeB=0.175;// diameter 3.5 H11 - Double_t high_holeB=1.5;/// - TGeoTranslation *tr1_holeB = new TGeoTranslation("tr1_holeB",-7.5,-28.8,0); - tr1_holeB->RegisterYourself(); - - TGeoTranslation *tr2_holeB = new TGeoTranslation("tr2_holeB",7.5,-28.8,0); - tr2_holeB->RegisterYourself(); - - //box 1 - Double_t x_1box=61.0; - Double_t y_1box=13.0; - Double_t z_1box=1.4; - //box 2 - Double_t x_2box=51.2; - Double_t y_2box=14.6; - Double_t z_2box=1.4; - //box 3 - Double_t x_3box=45.1; - Double_t y_3box=23.812; - Double_t z_3box=1.4; - //seg tub hole - Double_t radin_1hole=29.3; - Double_t radout_1hole=30.3; - Double_t high_1hole=1.4; - Double_t ang_in_1hole=205; - Double_t ang_fin_1hole=225; - //seg tub 2 hole - Double_t radin_2hole=23.0; - Double_t radout_2hole=25.5; - Double_t high_2hole=1.4; - Double_t ang_in_2hole=207.83; - Double_t ang_fin_2hole=249.998; - //seg tub 3 ARC central xy SEG_3ARC U - Double_t radin_3hole=25.5; - Double_t radout_3hole=27.5;//304 - Double_t high_3hole=1.35; - Double_t ang_in_3hole=255.253; - Double_t ang_fin_3hole=284.746; //284.746 - //// hole central down |_| since x=-70 to 0 - Double_t xc_box= 7.0 ; - Double_t yc_box= 5.772; - Double_t zc_box= 1.4; - - TGeoTranslation *tr_cbox = new TGeoTranslation("tr_cbox",-xc_box/2,-radout_disc+0.888,0); // - tr_cbox->RegisterYourself(); - //box 4 lamine 1 - Double_t x_labox=60.0; - Double_t y_labox=30.3; - Double_t z_labox=0.305; - TGeoTranslation *tr_la = new TGeoTranslation("tr_la",0,-y_labox/2-9.3,high_disc/2); // - tr_la->RegisterYourself(); - - /////box 5 lamin 2 - Double_t x_2labox=51.2; - Double_t y_2labox=2.8; //C-B - Double_t z_2labox=0.303; - TGeoTranslation *tr_2la = new TGeoTranslation("tr_2la",0,-8.1,high_disc/2); // - tr_2la->RegisterYourself(); - - ///////// circular border C //--SEG_BORD ---- - //seg tub 3 xy - Double_t radin_bord=0.5; - Double_t radout_bord=0.9;//304 - Double_t high_bord=1.355;///13.5 - Double_t ang_in_bord=0; - Double_t ang_fin_bord=90; - /////TGeoRotation *rot_bord1 = new TGeoRotation("rot_bord1", ang_in_1hole +0.0167,0,0); - TGeoRotation *rot1_bord1 = new TGeoRotation("rot1_bord1", 14.8,0,0); - rot1_bord1->RegisterYourself(); - TGeoCombiTrans *combi_bord1 = new TGeoCombiTrans(-26.7995,-13.0215, 0,rot1_bord1);//y= - combi_bord1->SetName("combi_bord1"); - combi_bord1->RegisterYourself(); - - TGeoRotation *rot2_bord1 = new TGeoRotation("rot2_bord1", -50,0,0); - rot2_bord1->RegisterYourself(); - TGeoCombiTrans *combi2_bord1 = new TGeoCombiTrans(-21.3795,-20.7636, 0,rot2_bord1);//y= - combi2_bord1->SetName("combi2_bord1"); - combi2_bord1->RegisterYourself(); + auto* HalfConeVolume = new TGeoVolumeAssembly("HalfConeVolume"); + + TGeoMedium* kMedAlu = gGeoManager->GetMedium("MFT_Alu$"); + //--- define some materials + TGeoMaterial* matVacuum = new TGeoMaterial("Vacuum", 0, 0, 0); + TGeoMaterial* matAl = new TGeoMaterial("Al", 26.98, 13, 2.7); + // //--- define some media + // TGeoMedium *Vacuum = new TGeoMedium("Vacuum",1, matVacuum); + // TGeoMedium *Al = new TGeoMedium("Root Material",2, matAl); + /////Rotation //// + + TGeoRotation* rot1 = new TGeoRotation("rot1", 180, -180, 0); + + rot1->RegisterYourself(); + TGeoRotation* rot2 = new TGeoRotation("rot2", 90, -90, 0); + rot2->RegisterYourself(); + + TGeoRotation* rot3 = new TGeoRotation("rot3", 0, 90, 0); + rot3->RegisterYourself(); + + TGeoRotation* rot_90x = new TGeoRotation("rot_90x", 0, -90, 0); // half0 + rot_90x->RegisterYourself(); + + TGeoRotation* rot_base = new TGeoRotation("rot_base", 180, 180, 0); // rail_r + rot_base->RegisterYourself(); + + TGeoCombiTrans* combi1 = new TGeoCombiTrans(0, -10.3, 1.29, rot1); //y=-10.80 belt + combi1->RegisterYourself(); + TGeoCombiTrans* combi2 = new TGeoCombiTrans(-16.8, 0., 0., rot2); + combi2->RegisterYourself(); + + TGeoRotation* r0 = new TGeoRotation("r0", 10., 0., 0.); + r0->RegisterYourself(); + + ///// 1st piece --------- Cross_beam_MB0----------------------/// + + auto* Cross_mb0 = new TGeoVolumeAssembly("Cross_mb0"); + + // rectangular box + Double_t x_box_mb0 = 14.4; // dx= 7.2 cm + Double_t y_box_mb0 = 0.6; + Double_t z_box_mb0 = 0.6; + + ///// holes tub 1hole tranversal + Double_t radin_1hole_mb0 = 0.; + Double_t radout_1hole_mb0 = 0.175; // diameter 3.5 H9 (0.35cm) + Double_t high_1hole_mb0 = 0.7; /// + + TGeoRotation* rot_1hole_mb0 = new TGeoRotation("rot_1hole_mb0", 0, 90, 0); + rot_1hole_mb0->RegisterYourself(); + /// h= hole + TGeoCombiTrans* acombi_1h_mb0 = new TGeoCombiTrans(5.2, 0, 0, rot_1hole_mb0); + acombi_1h_mb0->SetName("acombi_1h_mb0"); + acombi_1h_mb0->RegisterYourself(); + TGeoCombiTrans* bcombi_1h_mb0 = new TGeoCombiTrans(-5.2, 0, 0, rot_1hole_mb0); //y= + bcombi_1h_mb0->SetName("bcombi_1h_mb0"); + bcombi_1h_mb0->RegisterYourself(); + + ///// 2hole coaxial + Double_t radin_2hole_mb0 = 0.; + Double_t radout_2hole_mb0 = 0.15; // diameter M3 + Double_t high_2hole_mb0 = 1.2; /// 12 + + TGeoRotation* rot_2hole_mb0 = new TGeoRotation("rot_2hole_mb0", 90, 90, 0); + rot_2hole_mb0->SetName("rot_2hole_mb0"); + rot_2hole_mb0->RegisterYourself(); + + TGeoCombiTrans* combi_2hole_mb0 = new TGeoCombiTrans(6.7, 0, 0, rot_2hole_mb0); + combi_2hole_mb0->SetName("combi_2hole_mb0"); + combi_2hole_mb0->RegisterYourself(); + + TGeoCombiTrans* combi_2hole_mb0_b = new TGeoCombiTrans(-6.7, 0, 0, rot_2hole_mb0); //y= + combi_2hole_mb0_b->SetName("combi_2hole_mb0_b"); + combi_2hole_mb0_b->RegisterYourself(); + + // shape for cross_mb0 + auto* box_mb0 = new TGeoBBox("box_mb0", x_box_mb0 / 2, y_box_mb0 / 2, z_box_mb0 / 2); + auto* hole1_mb0 = new TGeoTube("hole1_mb0", radin_1hole_mb0, radout_1hole_mb0, high_1hole_mb0 / 2); + auto* hole2_mb0 = new TGeoTube("hole2_mb0", radin_2hole_mb0, radout_2hole_mb0, high_2hole_mb0 / 2); + + ///composite shape for mb0 + + auto* c_mb0_Shape_0 = new TGeoCompositeShape("c_mb0_Shape_0", "box_mb0 - hole1_mb0:acombi_1h_mb0 - hole1_mb0:bcombi_1h_mb0 - hole2_mb0:combi_2hole_mb0 - hole2_mb0:combi_2hole_mb0_b"); + + /////////////////// + auto* cross_mb0_Volume = new TGeoVolume("cross_mb0_Volume", c_mb0_Shape_0, kMedAlu); + + Cross_mb0->AddNode(cross_mb0_Volume, 1); + + //////////////////////////////////////////// + + ///// 2nd piece ------ cross beam--MFT---------(cbeam)----- + + auto* Cross_mft = new TGeoVolumeAssembly("Cross_mft"); + + // using the same "box" of the 1 piece + ////////// 2hole coaxial + Double_t radin_hole_cbeam = 0.; + Double_t radout_hole_cbeam = 0.15; // diameter M3 + Double_t high_hole_cbeam = 0.91; /// + + // same rotation in tub aximatAl "rot_2hole_mb0" + + TGeoCombiTrans* combi_hole_1cbeam = new TGeoCombiTrans(6.8, 0, 0, rot_2hole_mb0); + combi_hole_1cbeam->SetName("combi_hole_1cbeam"); + combi_hole_1cbeam->RegisterYourself(); + + TGeoCombiTrans* combi_hole_2cbeam = new TGeoCombiTrans(-6.8, 0, 0, rot_2hole_mb0); + combi_hole_2cbeam->SetName("combi_hole_2cbeam"); + combi_hole_2cbeam->RegisterYourself(); + + // shape for shape cross beam + + auto* hole_cbeam = new TGeoTube("hole_cbeam", radin_hole_cbeam, radout_hole_cbeam, high_hole_cbeam / 2); + + /// composite shape for cross beam (using the same box of mb0) + auto* c_cbeam_Shape = new TGeoCompositeShape("c_cbeam_Shape", "box_mb0 - hole_cbeam:combi_hole_1cbeam - hole_cbeam:combi_hole_2cbeam"); + + /////////////////// + auto* Cross_mft_Volume = new TGeoVolume("Cross_mft_Volume", c_cbeam_Shape, kMedAlu); + + Cross_mft->AddNode(Cross_mft_Volume, 1); + //////////////////////////////////////////// + + ////3th piece -------- Framework front ------------ + + auto* Fra_front = new TGeoVolumeAssembly("Fra_front"); + auto* Fra_front_L = new TGeoVolumeAssembly("Fra_front_L"); + auto* Fra_front_R = new TGeoVolumeAssembly("Fra_front_R"); + + Double_t x_box_up = 0.6; // cm + Double_t y_box_up = 0.605; + Double_t z_box_up = 2.84; + //hole up // + Double_t dia_tub_up = 0.35; + Double_t high_tub_up = 0.65; + //hole down//// + Double_t dia_tubdown = 0.35; + Double_t high_tubdown = 0.68; + // + Double_t x_boxA_down = 0.8; + Double_t y_boxA_down = 0.6; + Double_t z_boxA_down = 0.6; + + Double_t x_boxB_down = 0.6; + Double_t y_boxB_down = 0.605; + Double_t z_boxB_down = 1.26; // 12.6 + //seg tub + Double_t radin_segtub = 16.9; + Double_t radout_segtub = 17.5; + Double_t high_segtub = 0.6; + Double_t ang_in_segtub = 212.1; + Double_t ang_fin_segtub = 241.92; // + + /////// trans. rot. + TGeoCombiTrans* combi_3a = new TGeoCombiTrans(-7.4, 0, 8.975, rot2); + combi_3a->SetName("combi_3a"); + combi_3a->RegisterYourself(); + + TGeoTranslation* tr1_up = new TGeoTranslation("tr1_up", -7.4, 0, 8.28); // + + tr1_up->RegisterYourself(); + + TGeoTranslation* tr1_tub1 = new TGeoTranslation("tr1_tub1", 0, 0., 3.075); + tr1_tub1->RegisterYourself(); + + TGeoCombiTrans* combi_3b = new TGeoCombiTrans(7.118, 0, 16.16, rot3); + combi_3b->SetName("combi_3b"); + combi_3b->RegisterYourself(); + + TGeoTranslation* tr_2_box = new TGeoTranslation("tr_2_box", -0.4, 0, 0.7); + tr_2_box->RegisterYourself(); + + TGeoTranslation* tr3_box = new TGeoTranslation("tr3_box", -1.1, 0, 0.63); + tr3_box->RegisterYourself(); + + TGeoTranslation* tr_tubdown = new TGeoTranslation("tr_tubdown", -0.4, 0, 0.7); + tr_tubdown->RegisterYourself(); + + /////// shape for framewor front + + TGeoShape* box_up = new TGeoBBox("box_up", x_box_up / 2, y_box_up / 2, z_box_up / 2); + + TGeoShape* tub_up = new TGeoTube("tub_up", 0., dia_tub_up / 2, high_tub_up / 2); // + TGeoShape* seg_tub = new TGeoTubeSeg("seg_tub", radin_segtub, radout_segtub, high_segtub / 2, ang_in_segtub, ang_fin_segtub); + + TGeoShape* boxB_down = new TGeoBBox("boxB_down", x_boxB_down / 2, y_boxB_down / 2, z_boxB_down / 2); + + TGeoShape* boxA_down = new TGeoBBox("boxA_down", x_boxA_down / 2, y_boxA_down / 2, z_boxA_down / 2); + + TGeoShape* tubdown = new TGeoTube("tubdown", 0., dia_tubdown / 2, high_tubdown / 2); + + //Composite shapes for Fra_front + auto* fra_front_Shape_0 = new TGeoCompositeShape("fra_front_Shape_0", "box_up:tr1_up + seg_tub:combi_3b + boxB_down:tr3_box + boxA_down:tr_2_box"); + + auto* fra_front_Shape_1 = new TGeoCompositeShape("fra_front_Shape_1", "fra_front_Shape_0 - tubdown:tr_tubdown - tub_up:combi_3a"); + + TGeoRotation* rot_z180x90 = new TGeoRotation("rot_z180x90", 180, 90, 0); //half0_R + rot_z180x90->RegisterYourself(); + + TGeoRotation* rot_halfR = new TGeoRotation("rot_halfR", 180, 180, 0); //half0_R + rot_halfR->RegisterYourself(); + TGeoCombiTrans* combi_front_L = new TGeoCombiTrans(-7.1, -16.2, 32.5 + 0.675, rot_90x); //x=7.35, y=0, z=15.79 + combi_front_L->SetName("combi_front_L"); + combi_front_L->RegisterYourself(); + + TGeoCombiTrans* combi_front_R = new TGeoCombiTrans(7.1, -16.2, 32.5 + 0.675, rot_z180x90); //x=7.35, y=0, z=15.79 + combi_front_R->SetName("combi_front_R"); + combi_front_R->RegisterYourself(); + + // auto * fra_front_Shape_3 = new TGeoCompositeShape("fra_front_Shape_3","fra_front_Shape_2:rot_halfR "); + + auto* Fra_front_Volume = new TGeoVolume("Fra_front_Volume", fra_front_Shape_1, kMedAlu); + + Fra_front_L->AddNode(Fra_front_Volume, 1, combi_front_L); + Fra_front_R->AddNode(Fra_front_Volume, 1, combi_front_R); + + Fra_front->AddNode(Fra_front_L, 1); + Fra_front->AddNode(Fra_front_R, 2); + + ///////////////////////////////////////////////----- + + //4th piece ------------------"BASE" framework half support ------ + + auto* base = new TGeoVolumeAssembly("base"); + + //seg tub disc + Double_t radin_disc = 23.6; + Double_t radout_disc = 30.3; + Double_t high_disc = 1.35; + Double_t ang_in_disc = 180; + Double_t ang_fin_disc = 360; + + ///// holes tub 1hole tranversal o3.5 + Double_t radin_holeB = 0.; + Double_t radout_holeB = 0.175; // diameter 3.5 H11 + Double_t high_holeB = 1.5; /// + TGeoTranslation* tr1_holeB = new TGeoTranslation("tr1_holeB", -7.5, -28.8, 0); + tr1_holeB->RegisterYourself(); + + TGeoTranslation* tr2_holeB = new TGeoTranslation("tr2_holeB", 7.5, -28.8, 0); + tr2_holeB->RegisterYourself(); + + //box 1 + Double_t x_1box = 61.0; + Double_t y_1box = 13.0; + Double_t z_1box = 1.4; + //box 2 + Double_t x_2box = 51.2; + Double_t y_2box = 14.6; + Double_t z_2box = 1.4; + //box 3 + Double_t x_3box = 45.1; + Double_t y_3box = 23.812; + Double_t z_3box = 1.4; + //seg tub hole + Double_t radin_1hole = 29.3; + Double_t radout_1hole = 30.3; + Double_t high_1hole = 1.4; + Double_t ang_in_1hole = 205; + Double_t ang_fin_1hole = 225; + //seg tub 2 hole + Double_t radin_2hole = 23.0; + Double_t radout_2hole = 25.5; + Double_t high_2hole = 1.4; + Double_t ang_in_2hole = 207.83; + Double_t ang_fin_2hole = 249.998; + //seg tub 3 ARC central xy SEG_3ARC U + Double_t radin_3hole = 25.5; + Double_t radout_3hole = 27.5; + Double_t high_3hole = 1.35; + Double_t ang_in_3hole = 255.253; + Double_t ang_fin_3hole = 284.746; + //// hole central down |_| since x=-70 to 0 + Double_t xc_box = 7.0; + Double_t yc_box = 5.772; + Double_t zc_box = 1.4; + + TGeoTranslation* tr_cbox = new TGeoTranslation("tr_cbox", -xc_box / 2, -radout_disc + 0.888, 0); + tr_cbox->RegisterYourself(); + //box 4 lamine 1 + Double_t x_labox = 60.0; + Double_t y_labox = 30.3; + Double_t z_labox = 0.305; + TGeoTranslation* tr_la = new TGeoTranslation("tr_la", 0, -y_labox / 2 - 9.3, high_disc / 2); + tr_la->RegisterYourself(); + + /////box 5 lamin 2 + Double_t x_2labox = 51.2; + Double_t y_2labox = 2.8; //C-B + Double_t z_2labox = 0.303; + TGeoTranslation* tr_2la = new TGeoTranslation("tr_2la", 0, -8.1, high_disc / 2); // + tr_2la->RegisterYourself(); + + ///////// circular border C //--SEG_BORD ---- + //seg tub 3 xy + Double_t radin_bord = 0.5; + Double_t radout_bord = 0.9; // + Double_t high_bord = 1.355; ///13.5 + Double_t ang_in_bord = 0; + Double_t ang_fin_bord = 90; + /////TGeoRotation *rot_bord1 = new TGeoRotation("rot_bord1", ang_in_1hole +0.0167,0,0); + TGeoRotation* rot1_bord1 = new TGeoRotation("rot1_bord1", 14.8, 0, 0); + rot1_bord1->RegisterYourself(); + TGeoCombiTrans* combi_bord1 = new TGeoCombiTrans(-26.7995, -13.0215, 0, rot1_bord1); //y= + combi_bord1->SetName("combi_bord1"); + combi_bord1->RegisterYourself(); + + TGeoRotation* rot2_bord1 = new TGeoRotation("rot2_bord1", -50, 0, 0); + rot2_bord1->RegisterYourself(); + TGeoCombiTrans* combi2_bord1 = new TGeoCombiTrans(-21.3795, -20.7636, 0, rot2_bord1); //y= + combi2_bord1->SetName("combi2_bord1"); + combi2_bord1->RegisterYourself(); //////// /__0/ - TGeoRotation *rot1_bord2 = new TGeoRotation("rot1_bord2", 250,0,0); - rot1_bord2->RegisterYourself(); - TGeoCombiTrans *combi1_bord2 = new TGeoCombiTrans(-9.0527,-23.3006, 0,rot1_bord2);//y= - combi1_bord2->SetName("combi1_bord2"); - combi1_bord2->RegisterYourself(); - /////// |°____°| - TGeoRotation *rot_cent_bord = new TGeoRotation("rot_cent_bord", 90,0,0); - rot_cent_bord->RegisterYourself(); - TGeoCombiTrans *combi_cent_bord = new TGeoCombiTrans(-6.5,-27.094, 0,rot_cent_bord);//y= - combi_cent_bord->SetName("combi_cent_bord"); - combi_cent_bord->RegisterYourself(); - ///////////////// box tonge - Double_t x_tong=2.0; - Double_t y_tong=2.81; - Double_t z_tong=1.35; - TGeoTranslation *tr_tong= new TGeoTranslation("tr_tong",0,-28.6,0); // - tr_tong->RegisterYourself(); - //// circular central hole1 to conexion with other parts - Double_t radin_hole1=0; - Double_t radout_hole1=0.4;// - Double_t high_hole1=1.36;/// - TGeoTranslation *tr_hole1= new TGeoTranslation("tr_hole1",0,-28.0,0); //tonge - tr_hole1->RegisterYourself(); - - TGeoTranslation *tr2_hole1= new TGeoTranslation("tr2_hole1",-26.5,-8.5,0); //left - tr2_hole1->RegisterYourself(); - - TGeoTranslation *tr3_hole1= new TGeoTranslation("tr3_hole1",26.5,-8.5,0); //right - tr3_hole1->RegisterYourself(); + TGeoRotation* rot1_bord2 = new TGeoRotation("rot1_bord2", 250, 0, 0); + rot1_bord2->RegisterYourself(); + TGeoCombiTrans* combi1_bord2 = new TGeoCombiTrans(-9.0527, -23.3006, 0, rot1_bord2); //y= + combi1_bord2->SetName("combi1_bord2"); + combi1_bord2->RegisterYourself(); + /////// |°____°| + TGeoRotation* rot_cent_bord = new TGeoRotation("rot_cent_bord", 90, 0, 0); + rot_cent_bord->RegisterYourself(); + TGeoCombiTrans* combi_cent_bord = new TGeoCombiTrans(-6.5, -27.094, 0, rot_cent_bord); //y= + combi_cent_bord->SetName("combi_cent_bord"); + combi_cent_bord->RegisterYourself(); + ///////////////// box tonge + Double_t x_tong = 2.0; + Double_t y_tong = 2.81; + Double_t z_tong = 1.35; + TGeoTranslation* tr_tong = new TGeoTranslation("tr_tong", 0, -28.6, 0); // + tr_tong->RegisterYourself(); + //// circular central hole1 to conexion with other parts + Double_t radin_hole1 = 0; + Double_t radout_hole1 = 0.4; // + Double_t high_hole1 = 1.36; /// + TGeoTranslation* tr_hole1 = new TGeoTranslation("tr_hole1", 0, -28.0, 0); //tonge + tr_hole1->RegisterYourself(); + + TGeoTranslation* tr2_hole1 = new TGeoTranslation("tr2_hole1", -26.5, -8.5, 0); //left + tr2_hole1->RegisterYourself(); + + TGeoTranslation* tr3_hole1 = new TGeoTranslation("tr3_hole1", 26.5, -8.5, 0); //right + tr3_hole1->RegisterYourself(); + ///////////////////////////////////////// + /// circular hole2 ; hole2 r=6.7 + Double_t radin_hole2 = 0; + Double_t radout_hole2 = 0.335; // diameter 6.7 + Double_t high_hole2 = 1.36; ///13.5 + TGeoTranslation* tr1_hole2 = new TGeoTranslation("tr1_hole2", -28.0, -8.5, 0); // + tr1_hole2->RegisterYourself(); + + TGeoTranslation* tr2_hole2 = new TGeoTranslation("tr2_hole2", 28.0, -8.5, 0); // + tr2_hole2->RegisterYourself(); + + //////////// hole "0" two tubs together + Double_t radin_T1 = 0.325; // diam 0.65cm + Double_t radout_T1 = 0.55; // dia 1.1 + Double_t high_T1 = 1.2; /// dz 6 + + Double_t radin_T2 = 0; + Double_t radout_T2 = 1.1; // + Double_t high_T2 = 1.2; /// dz 6 + ///...................................... ..... + ///////// shape for base -- + + auto* disc = new TGeoTubeSeg("disc", radin_disc, radout_disc, high_disc / 2, ang_in_disc, ang_fin_disc); + + auto* box1 = new TGeoBBox("box1", x_1box / 2, y_1box / 2, z_1box / 2); + auto* box2 = new TGeoBBox("box2", x_2box / 2, y_2box / 2, z_2box / 2); + auto* box3 = new TGeoBBox("box3", x_3box / 2, y_3box / 2, z_3box / 2); + auto* labox1 = new TGeoBBox("labox1", x_labox / 2, y_labox / 2, z_labox / 2); + auto* labox2 = new TGeoBBox("labox2", x_2labox / 2, y_2labox / 2, z_2labox / 2); + auto* cbox = new TGeoBBox("cbox", xc_box / 2, yc_box / 2, zc_box / 2); + auto* tongbox = new TGeoBBox("tongbox", x_tong / 2, y_tong / 2, z_tong / 2); + + TGeoShape* seg_1hole = new TGeoTubeSeg("seg_1hole", radin_1hole, radout_1hole, high_1hole / 2, ang_in_1hole, ang_fin_1hole); //r_in,r_out,dZ,ang,ang + TGeoShape* s_seg_2hole = new TGeoTubeSeg("seg_2hole", radin_2hole, radout_2hole, high_2hole / 2, ang_in_2hole, ang_fin_2hole); + TGeoShape* seg_3hole = new TGeoTubeSeg("seg_3hole", radin_3hole, radout_3hole, high_3hole / 2, ang_in_3hole, ang_fin_3hole); // |u| + TGeoShape* seg_bord = new TGeoTubeSeg("seg_bord", radin_bord, radout_bord, high_bord / 2, ang_in_bord, ang_fin_bord); + + auto* circ_hole1 = new TGeoTube("circ_hole1", radin_hole1, radout_hole1, high_hole1 / 2); + + auto* circ_hole2 = new TGeoTube("circ_hole2", radin_hole2, radout_hole2, high_hole2 / 2); + + auto* circ_holeB = new TGeoTube("circ_holeB", radin_holeB, radout_holeB, high_holeB / 2); + + //// composite shape for base ---- + + auto* base_Shape_0 = new TGeoCompositeShape("base_Shape_0", " disc -box1 - box2 - box3 - circ_holeB:tr1_holeB - circ_holeB:tr2_holeB"); + auto* base_Shape_1 = new TGeoCompositeShape("base_Shape_1", "(seg_1hole - seg_bord:combi_bord1 - seg_bord:combi2_bord1) + seg_2hole -seg_bord:combi1_bord2 + cbox:tr_cbox"); + + auto* base_Shape_2 = new TGeoCompositeShape("base_Shape_2", " seg_3hole + seg_bord:combi_cent_bord"); //-seg_bord:combi_cent_bord + + auto* base_Shape_3 = new TGeoCompositeShape("base_Shape_3", " labox1:tr_la + labox2:tr_2la "); + + auto* base_Shape_4 = new TGeoCompositeShape("base_Shape_4", "base_Shape_0 - base_Shape_1 - base_Shape_1:rot1 + base_Shape_2 + tongbox:tr_tong - circ_hole1:tr_hole1 - circ_hole1:tr2_hole1 - circ_hole1:tr3_hole1 - circ_hole2:tr1_hole2 - circ_hole2:tr2_hole2 - base_Shape_3 "); + + // auto * base_Shape_5 = new TGeoCompositeShape("base_Shape_5","disc-box1 -box2 -box3 -seg_1hole -seg_2hole +seg_3hole -seg_1hole:rot1-seg_2hole:rot1 - cbox:tr_cbox - labox:tr_la - labox2:tr_2la + seg_bord "); + + // auto * base0_Volume = new TGeoVolume("base0_Volume",base_Shape_0,kMedAlu); + // auto * base1_Volume = new TGeoVolume("base1_Volume",base_Shape_1,kMedAlu); + // auto * base2_Volume = new TGeoVolume("base2_Volume",base_Shape_2,kMedAlu); + // auto * base3_Volume = new TGeoVolume("base3_Volume",base_Shape_3,kMedAlu); + + auto* base4_Volume = new TGeoVolume("base4_Volume", base_Shape_4, kMedAlu); + + base->AddNode(base4_Volume, 2, rot_base); + //base->AddNode(base4_Volume,2); + ////////////////////////////////////////// + + ///5th piece MIDLE ------ Framework midle-------------------- + + auto* midle = new TGeoVolumeAssembly("Midle"); + auto* midle_L = new TGeoVolumeAssembly("Midle_L"); + auto* midle_R = new TGeoVolumeAssembly("Midle_R"); + + ////box up to quit and to join + Double_t x_midle = 0.8; //dx=4 + Double_t y_midle = 3.495; //y=34.9 + Double_t z_midle = 0.62; //z=6 + //tr1 to join with arc + TGeoTranslation* tr1_midle_box = new TGeoTranslation("tr1_midle_box", -14.4, -0.745, 0); //-152,-17.45,0 + tr1_midle_box->RegisterYourself(); + //tr2 to quiet + TGeoTranslation* tr2_midle_box = new TGeoTranslation("tr2_midle_box", -15.2, -0.745, 0); //-152,-17.45,0 + tr2_midle_box->RegisterYourself(); + + /////////////////////////// + ////box down_1 + Double_t x_midle_d1box = 0.4; //dx=4 + Double_t y_midle_d1box = 0.28; + Double_t z_midle_d1box = 0.66; + TGeoTranslation* tr_midle_d1box = new TGeoTranslation("tr_midle_d1box", -7.3, -11.96, 0.); //81 + tr_midle_d1box->RegisterYourself(); + + /////////////////////////// + ////box down_2 + Double_t x_midle_d2box = 0.8; //dx=4 + Double_t y_midle_d2box = 1.0; + Double_t z_midle_d2box = 0.66; // + TGeoTranslation* tr_midle_d2box = new TGeoTranslation("tr_midle_d2box", -7.5, -12.6249, 0); //81 + tr_midle_d2box->RegisterYourself(); + + /////////////////// + //arc circ part + Double_t radin_midle = 14.0; + Double_t radout_midle = 15.0; // + Double_t high_midle = 0.6; /// + Double_t ang_in_midle = 180; + Double_t ang_fin_midle = 238.21; //alfa=57.60 + + ///////////////////////////////////////// + /// circular hole1 ; hole_midle d=3.5 + Double_t radin_mid_1hole = 0.; + Double_t radout_mid_1hole = 0.175; // diameter 3.5 + Double_t high_mid_1hole = 1.5; /// 2.4 + + TGeoRotation* rot_mid_1hole = new TGeoRotation("rot_mid_1hole", 90, 90, 0); + rot_mid_1hole->RegisterYourself(); + TGeoCombiTrans* combi_mid_1tubhole = new TGeoCombiTrans(-14.2, 0.325, 0, rot_mid_1hole); // + combi_mid_1tubhole->SetName("combi_mid_1tubhole"); + combi_mid_1tubhole->RegisterYourself(); + ///////////////////////////////////////// - /// circular hole2 ; hole2 r=6.7 - Double_t radin_hole2=0; - Double_t radout_hole2=0.335;// diameter 6.7 - Double_t high_hole2=1.36;///13.5 - TGeoTranslation *tr1_hole2= new TGeoTranslation("tr1_hole2",-28.0,-8.5,0); // - tr1_hole2->RegisterYourself(); - - TGeoTranslation *tr2_hole2= new TGeoTranslation("tr2_hole2",28.0,-8.5,0); // - tr2_hole2->RegisterYourself(); - - -//////////// hole "0" two tubs together - Double_t radin_T1=0.325; // diam 0.65cm - Double_t radout_T1=0.55;// dia 1.1 - Double_t high_T1=1.2;/// dz 6 - - Double_t radin_T2=0; - Double_t radout_T2=1.1;// - Double_t high_T2=1.2;/// dz 6 - ///...................................... ..... - - ///////// shape for base -- - - auto *disc=new TGeoTubeSeg("disc",radin_disc,radout_disc,high_disc/2,ang_in_disc,ang_fin_disc); - - auto *box1 =new TGeoBBox("box1", x_1box/2,y_1box/2,z_1box/2); - auto *box2 =new TGeoBBox("box2", x_2box/2,y_2box/2,z_2box/2); - auto *box3 =new TGeoBBox("box3", x_3box/2,y_3box/2,z_3box/2); - auto *labox1 =new TGeoBBox("labox1", x_labox/2,y_labox/2,z_labox/2); - auto *labox2 =new TGeoBBox("labox2", x_2labox/2,y_2labox/2,z_2labox/2); - auto *cbox =new TGeoBBox("cbox", xc_box/2,yc_box/2,zc_box/2); - auto *tongbox =new TGeoBBox("tongbox", x_tong/2,y_tong/2,z_tong/2); - - TGeoShape *seg_1hole=new TGeoTubeSeg("seg_1hole",radin_1hole,radout_1hole,high_1hole/2,ang_in_1hole,ang_fin_1hole);//r_in,r_out,dZ,ang,ang - TGeoShape *seg_2hole=new TGeoTubeSeg("seg_2hole",radin_2hole,radout_2hole,high_2hole/2,ang_in_2hole,ang_fin_2hole); - TGeoShape *seg_3hole=new TGeoTubeSeg("seg_3hole",radin_3hole,radout_3hole,high_3hole/2,ang_in_3hole,ang_fin_3hole);// |u| - TGeoShape *seg_bord=new TGeoTubeSeg("seg_bord",radin_bord,radout_bord,high_bord/2,ang_in_bord,ang_fin_bord); - - auto *circ_hole1=new TGeoTube("circ_hole1",radin_hole1,radout_hole1,high_hole1/2); - - auto *circ_hole2=new TGeoTube("circ_hole2",radin_hole2,radout_hole2,high_hole2/2); - - auto *circ_holeB=new TGeoTube("circ_holeB",radin_holeB,radout_holeB,high_holeB/2); - - //// composite shape for base ---- - - auto * base_Shape_0 = new TGeoCompositeShape("base_Shape_0"," disc - box1 - box2 - box3 -circ_holeB:tr1_holeB- circ_holeB:tr2_holeB "); - auto * base_Shape_1 = new TGeoCompositeShape("base_Shape_1","( seg_1hole -seg_bord:combi_bord1 -seg_bord:combi2_bord1) + seg_2hole - seg_bord:combi1_bord2 + cbox:tr_cbox "); - - auto * base_Shape_2 = new TGeoCompositeShape("base_Shape_2"," seg_3hole +seg_bord:combi_cent_bord "); //-SEG_BORD:combi_cent_bord - - auto * base_Shape_3 = new TGeoCompositeShape("base_Shape_3"," labox1:tr_la+ labox2:tr_2la "); - - auto * base_Shape_4 = new TGeoCompositeShape("base_Shape_4","base_Shape_0 -base_Shape_1 - base_Shape_1:rot1 + base_Shape_2 +tongbox:tr_tong - circ_hole1:tr_hole1 - circ_hole1:tr2_hole1 - circ_hole1:tr3_hole1 -circ_hole2:tr1_hole2-circ_hole2:tr2_hole2 -base_Shape_3 "); - - // auto * base_Shape_5 = new TGeoCompositeShape("base_Shape_5"," disc - box1 - box2 -box3 - seg_1hole - seg_2hole + seg_3hole - seg_1hole:rot1- seg_2hole:rot1 - cbox:tr_cbox - labox:tr_la - labox2:tr_2la + seg_bord "); - - //E auto * base0_Volume = new TGeoVolume("base0_Volume",base_Shape_0,kMedAlu); - //E auto * base1_Volume = new TGeoVolume("base1_Volume",base_Shape_1,kMedAlu); - //E auto * base2_Volume = new TGeoVolume("base2_Volume",base_Shape_2,kMedAlu); - //E auto * base3_Volume = new TGeoVolume("base3_Volume",base_Shape_3,kMedAlu); - auto * base4_Volume = new TGeoVolume("base4_Volume",base_Shape_4,kMedAlu); - - - base->AddNode(base4_Volume,2,rot_base); - //base->AddNode(base4_Volume,2); - ////////////////////////////////////////// - - - ///5th piece MIDLE ------ Framework midle-------------------- - - auto *midle = new TGeoVolumeAssembly("Midle"); - - auto *midle_L = new TGeoVolumeAssembly("Midle_L"); - auto *midle_R = new TGeoVolumeAssembly("Midle_R"); - - - ////box up to quit and to join - Double_t x_midle=0.8; //dx=4 - Double_t y_midle=3.495; //y=34.9 - Double_t z_midle=0.62; //z=6 - // tr1 to join with arc - TGeoTranslation *tr1_midle_box= new TGeoTranslation("tr1_midle_box",-14.4,-0.745,0); //-152,-17.45,0 - tr1_midle_box->RegisterYourself(); - //tr2 to quiet - TGeoTranslation *tr2_midle_box= new TGeoTranslation("tr2_midle_box",-15.2,-0.745,0); //-152,-17.45,0 - tr2_midle_box->RegisterYourself(); - - /////////////////////////// - ////box down_1 - Double_t x_midle_d1box=0.4; //dx=4 - Double_t y_midle_d1box=0.28; - Double_t z_midle_d1box=0.66; - TGeoTranslation *tr_midle_d1box= new TGeoTranslation("tr_midle_d1box",-7.3,-11.96,0.); //81 - tr_midle_d1box->RegisterYourself(); - - /////////////////////////// - ////box down_2 - Double_t x_midle_d2box=0.8; //dx=4 - Double_t y_midle_d2box=1.0; - Double_t z_midle_d2box=0.66; // 6.5 -> 6.6 to quit - TGeoTranslation *tr_midle_d2box= new TGeoTranslation("tr_midle_d2box",-7.5,-12.6249,0); //81 - tr_midle_d2box->RegisterYourself(); - - /////////////////// - //arc circ part - Double_t radin_midle=14.0; - Double_t radout_midle=15.0;// - Double_t high_midle=0.6;/// - Double_t ang_in_midle=180; - Double_t ang_fin_midle=238.21; //alfa=57.60 .(first 237.31) - - ///////////////////////////////////////// - /// circular hole1 ; hole_midle d=3.5 - Double_t radin_mid_1hole=0.; - Double_t radout_mid_1hole=0.175;// diameter 3.5 - Double_t high_mid_1hole=1.5;/// 2.4 - - TGeoRotation *rot_mid_1hole = new TGeoRotation("rot_mid_1hole", 90,90,0); - rot_mid_1hole->RegisterYourself(); - TGeoCombiTrans *combi_mid_1tubhole = new TGeoCombiTrans(-14.2,0.325, 0,rot_mid_1hole);// - combi_mid_1tubhole->SetName("combi_mid_1tubhole"); - combi_mid_1tubhole->RegisterYourself(); - - ///////////////////////////////////////// - /// circular hole2 ; hole_midle d=3 - Double_t radin_mid_2hole=0.; - Double_t radout_mid_2hole=0.15;// diameter 3 - Double_t high_mid_2hole=1.8;/// - - TGeoCombiTrans *combi_mid_2tubhole = new TGeoCombiTrans(-7.7,-12.355, 0,rot_mid_1hole);//x=81 - combi_mid_2tubhole->SetName("combi_mid_2tubhole"); - combi_mid_2tubhole->RegisterYourself(); - - ////////////////////////////////////////////////////// - - - ///////// shape for midle - - auto *midle_box =new TGeoBBox("midle_box", x_midle/2,y_midle/2,z_midle/2); - - auto *midle_d1box =new TGeoBBox("midle_d1box", x_midle_d1box/2,y_midle_d1box/2,z_midle_d1box/2); - - auto *midle_d2box =new TGeoBBox("midle_d2box", x_midle_d2box/2,y_midle_d2box/2,z_midle_d2box/2); - - auto *arc_midle=new TGeoTubeSeg("arc_midle",radin_midle,radout_midle,high_midle/2,ang_in_midle,ang_fin_midle); - - auto *mid_1tubhole=new TGeoTube("mid_1tubhole",radin_mid_1hole,radout_mid_1hole,high_mid_1hole/2); - - auto *mid_2tubhole=new TGeoTube("mid_2tubhole",radin_mid_2hole,radout_mid_2hole,high_mid_2hole/2); - - //////////////////////////////////////////composite shape for midle - - auto * midle_Shape_0 = new TGeoCompositeShape("midle_Shape_0","arc_midle + midle_box:tr1_midle_box- midle_box:tr2_midle_box- midle_d1box:tr_midle_d1box-midle_d2box:tr_midle_d2box "); - - auto * midle_Shape_1 = new TGeoCompositeShape("midle_Shape_1"," midle_Shape_0 -mid_1tubhole:combi_mid_1tubhole- mid_2tubhole:combi_mid_2tubhole"); - - TGeoRotation *rot_midlez = new TGeoRotation("rot_midley", 180,180,0);//half0_R - rot_midlez->RegisterYourself(); - TGeoCombiTrans *combi_midle_L = new TGeoCombiTrans(0, -7.625, 24.15+0.675,rot_90x);//x=7.35, y=0, z=15.79 -- 0,-7.625,24.15+0.675-80) - combi_midle_L->SetName("combi_midle_L"); - combi_midle_L->RegisterYourself(); - - TGeoTranslation *tr_midle_L= new TGeoTranslation("tr_midle_L",0,-7.625,24.15+0.675); //-152,-17.45,0 - tr_midle_L->RegisterYourself(); - - TGeoCombiTrans *combi_midle_R = new TGeoCombiTrans(0, -7.625,24.15+0.675,rot_midlez);//x=7.35, y=0, z=15.79 - combi_midle_R->SetName("combi_midle_R"); - combi_midle_R->RegisterYourself(); - - auto * midle_Volume = new TGeoVolume("midle_Volume",midle_Shape_1,kMedAlu); - - midle_L->AddNode(midle_Volume,1,tr_midle_L); - midle_R->AddNode(midle_Volume,1,combi_midle_R); - - //midle->AddNode(midle_Volume,1); - midle->AddNode(midle_L,1); - midle->AddNode(midle_R,2); - - //////////////////////////////////////new piece ... _/ \_ - /// Support_rail_L & Support_rail_R - - auto *rail_L_R = new TGeoVolumeAssembly("rail_L_R"); - - //6 piece RAIL LEFT --RL---0000------ - auto *rail_L = new TGeoVolumeAssembly("rail_L"); - - /////////////////VARIAb - ////box down_2 - Double_t x_RL_1box=3.0; //dx=15 - Double_t y_RL_1box=1.21; // dy=6, -dy=6 - Double_t z_RL_1box=0.8; // dz=4 to quit - TGeoTranslation *tr_RL_1box= new TGeoTranslation(0,y_RL_1box/2,1.825); //81 - tr_RL_1box->SetName("tr_RL_1box"); - tr_RL_1box->RegisterYourself(); - //////////////////////////////7 - - TGeoXtru *xtru_RL1 = new TGeoXtru(2); - xtru_RL1->SetName("S_XTRU_RL1"); - - Double_t x_RL1[5]={-1.5,1.5,0.5,0.5,-1.5 };//93,93,73,73,-15};//vertices - Double_t y_RL1[5]={1.2,1.2,2.2,8.2,8.2};//357.5,357.5,250.78,145.91}; - xtru_RL1->DefinePolygon(5,x_RL1,y_RL1); - xtru_RL1->DefineSection(0,-2.225,0.,0.,1); //(plane,-zplane/ +zplane, x0, y0,(x/y)) - xtru_RL1->DefineSection(1,2.225,0.,0.,1); - ////////////// \// - - TGeoXtru *xtru_RL2 = new TGeoXtru(2); - xtru_RL2->SetName("S_XTRU_RL2"); - - Double_t x_RL2[8]={-1.5,0.5,0.5,9.3,9.3,7.3,7.3,-1.5}; //vertices - Double_t y_RL2[8]={8.2,8.2,13.863,24.35,35.75,35.75,25.078,14.591}; - - xtru_RL2->DefinePolygon(8,x_RL2,y_RL2); - - xtru_RL2->DefineSection(0,0.776,0,0,1);//(plane,-zplane/+zplane, x0, y0,(x/y)) - xtru_RL2->DefineSection(1,2.225 ,0,0,1); - -///////////////////////// //////////////////// - ////box knee - Double_t x_RL_kneebox=1.5; //dx=7.5 - Double_t y_RL_kneebox=3.5; // dy=17.5 - Double_t z_RL_kneebox=1.5; // dz=7.5 to quit - TGeoTranslation *tr_RL_kneebox= new TGeoTranslation(0,0,0); //81 x =-2.5, y=145.91 - tr_RL_kneebox->SetName("tr_RL_kneebox"); - tr_RL_kneebox->RegisterYourself(); - - TGeoRotation *rot_knee = new TGeoRotation("rot_knee", -40,0,0); - rot_knee->SetName("rot_knee"); - rot_knee->RegisterYourself(); - TGeoCombiTrans *combi_knee = new TGeoCombiTrans(0.96,1.75+0.81864, 0,rot_knee);//y= - combi_knee->SetName("combi_knee"); - combi_knee->RegisterYourself(); - ///////////////////////////////// quit diagona-> qdi///////////////// - Double_t x_qdi_box=3.1; // - Double_t y_qdi_box=7.159; // - Double_t z_qdi_box=3.005; // - - TGeoRotation *rot_qdi = new TGeoRotation("rot_qdi", 0,24.775,0); - rot_qdi->RegisterYourself(); - TGeoCombiTrans *combi_qdi = new TGeoCombiTrans(0,5.579, -2.087,rot_qdi);//y= - combi_qdi->SetName("combi_qdi"); - combi_qdi->RegisterYourself(); - ////////////// knee small - - TGeoXtru *xtru3_RL = new TGeoXtru(2); - xtru3_RL->SetName("S_XTRU3_RL"); - - Double_t x_3RL[6]={-0.75,0.75,0.75,2.6487,1.4997,-0.75}; //vertices - Double_t y_3RL[6]={-1.75,-1.75,1.203,3.465,4.4311,1.75}; - - xtru3_RL->DefinePolygon(6,x_3RL,y_3RL); - xtru3_RL->DefineSection(0,-0.75,0,0,1);//(plane,-zplane/+zplane, x0, y0,(x/y)) - xtru3_RL->DefineSection(1,0.76,0,0,1); - - TGeoTranslation *tr_vol3_RL= new TGeoTranslation(-0.25,12.66,0); // - tr_vol3_RL->SetName("tr_vol3_RL"); - tr_vol3_RL->RegisterYourself(); -///////////////////////////////////////////// - //// circular holes could be for rail R and L .. - /// circular hole1_RL (a(6,22)); hole_midle d=6.5 H11 - Double_t radin_RL1hole=0.; - Double_t radout_RL1hole=0.325;// diameter 3.5 - Double_t high_RL1hole=1.0;/// - - TGeoRotation *rot_RL1hole = new TGeoRotation("rot_RL1hole", 0,0,0); - rot_RL1hole->RegisterYourself(); - TGeoCombiTrans *combi_RL1hole = new TGeoCombiTrans(0.7,0.6, 1.85,rot_RL1hole);//y= - combi_RL1hole->SetName("combi_RL1hole"); - combi_RL1hole->RegisterYourself(); -//////////////////////////////// similar hole for R -- Join. - /// circular hole_ir. diameter=M3 (3 mm)) prof trou:8, tar:6mm - Double_t radin_ir_railL=0.; - Double_t radout_ir_railL=0.15;// diameter 0.3cm - Double_t high_ir_railL=3.9;// - TGeoRotation *rot_ir_RL = new TGeoRotation("rot_ir_RL", 90,90,0); - rot_ir_RL->RegisterYourself(); - //// in y = l_253.5 - 6. enter in (0,6,0) - TGeoCombiTrans *combi_ir1_RL = new TGeoCombiTrans(8.62,24.75, 1.5,rot_ir_RL); - combi_ir1_RL->SetName("combi_ir1_RL"); - combi_ir1_RL->RegisterYourself(); - - TGeoCombiTrans *combi_ir2_RL = new TGeoCombiTrans(8.6,33.15, 1.5,rot_ir_RL); - combi_ir2_RL->SetName("combi_ir2_RL"); - combi_ir2_RL->RegisterYourself(); - -/////////////////////// shape for Rail L geom///////// - auto *RL_1box =new TGeoBBox("RL_1box", x_RL_1box/2,y_RL_1box/2,z_RL_1box/2); - auto *RL_kneebox =new TGeoBBox("RL_kneebox", x_RL_kneebox/2,y_RL_kneebox/2,z_RL_kneebox/2); - auto *qdi_box =new TGeoBBox("qdi_box", x_qdi_box/2,y_qdi_box/2,z_qdi_box/2); - - //auto *RL1hole=new TGeoTube("S_RL1HOLE",radin_RL1hole,radout_RL1hole,high_RL1hole/2); - //-auto *s_irL_hole=new TGeoTube("S_irL_HOLE",radin_ir_railL,radout_ir_railL,high_ir_railL/2); - - -////////////////////// composite shape for rail L ////////////////////// - - auto * RL_Shape_0 = new TGeoCompositeShape("RL_Shape_0"," S_XTRU3_RL:tr_vol3_RL +S_XTRU_RL1 + S_XTRU_RL2 + RL_1box:tr_RL_1box- qdi_box:combi_qdi"); // - - //////////////////////////////////////-------//////// - - TGeoVolume *rail_L_vol0 = new TGeoVolume("RAIL_L_VOL0",RL_Shape_0,kMedAlu); - - rail_L->AddNode(rail_L_vol0,1,new TGeoTranslation(0., 0., 1.5) ); - - - ////piece 7th ---------------RAIL RIGHT (RR)---- //////////////----- - -//E auto * rail_R = new TGeoVolumeAssembly("rail_R"); - - Double_t x_RR_1box=3.0; //dx=15 - Double_t y_RR_1box=1.2; // dy=6, -dy=6 - Double_t z_RR_1box=0.8; // dz=4 to quit - TGeoTranslation *tr_RR_1box= new TGeoTranslation("tr_RR_1box",0,0.6,1.825); //81 - tr_RR_1box->RegisterYourself(); - ////////////////////////////////7 - - TGeoXtru *part_RR1 = new TGeoXtru(2); - part_RR1->SetName("part_RR1"); - //-TGeoVolume *vol_RR1 = gGeoManager->MakeXtru("S_XTRU_RR1",kMedAlu,2); - //-TGeoXtru *xtru_RR1 = (TGeoXtru*)vol_RR1->GetShape(); - - Double_t x_RR1[5]={-1.5,-0.5,-0.5,1.5,1.5 };//C,D,K,L,C' //vertices - Double_t y_RR1[5]={1.2,2.2,8.2,8.2,1.2};//357.5,357.5,250.78,145.91}; - - part_RR1->DefinePolygon(5,x_RR1,y_RR1); - part_RR1->DefineSection(0,-2.225,0,0,1); //(plane,-zplane/ +zplane, x0, y0,(x/y)) - part_RR1->DefineSection(1,2.225,0,0,1); - - ////////////// \////////// - - TGeoXtru *part_RR2 = new TGeoXtru(2); - part_RR2->SetName("part_RR2"); - //-TGeoVolume *vol_RR2 = gGeoManager->MakeXtru("S_XTRU_RR2",Al,2); - //-TGeoXtru *xtru_RR2 = (TGeoXtru*)vol_RR2->GetShape(); - - Double_t x_RR2[8]={-0.5,-0.5,-9.3,-9.3,-7.3,-7.3,1.5,1.5};//K,E,F,G,H,I,J,L//vertices - Double_t y_RR2[8]={8.2,13.863,24.35,35.75,35.75,25.078,14.591,8.2}; - - part_RR2->DefinePolygon(8,x_RR2,y_RR2); - part_RR2->DefineSection(0,0.776,0,0,1);//(plane,-zplane/+zplane, x0, y0,(x/y)) - part_RR2->DefineSection(1,2.225 ,0,0,1); - - ////////////// knee (small) - - TGeoXtru *part_RR3 = new TGeoXtru(2); - part_RR3->SetName("part_RR3"); - - Double_t x_3RR[6]={1.0,1.0,-1.2497,-2.2138,-0.5,-0.5};//R,Q,P,O,N.M //vertices - Double_t y_3RR[6]={10.91,14.41,17.0911,15.9421,13.86,10.91}; - - part_RR3->DefinePolygon(6,x_3RR,y_3RR); - part_RR3->DefineSection(0,-0.75,0,0,1);//(plane,-zplane/+zplane, x0, y0,(x/y)) - part_RR3->DefineSection(1,0.78,0,0,1); - - TGeoTranslation *tr_vol3_RR= new TGeoTranslation("tr_vol3_RR",-0.25,12.66,0); // - tr_vol3_RR->RegisterYourself(); - - ///////////////////////////////// quit diagona-> qdi///////////////// - Double_t x_qdi_Rbox=3.1; //dx=1.5 - Double_t y_qdi_Rbox=7.159; // - Double_t z_qdi_Rbox=3.005; // - - TGeoRotation *rot_Rqdi = new TGeoRotation("rot_Rqdi", 0,24.775,0); - rot_Rqdi->RegisterYourself(); - TGeoCombiTrans *combi_Rqdi = new TGeoCombiTrans(0,5.579, -2.087,rot_Rqdi);//y= - combi_Rqdi->SetName("combi_Rqdi"); - combi_Rqdi->RegisterYourself(); - - ////////////////////___holes__///// - - /// circular hole_a. diameter=6.5 (a(6,22)); hole_midle d=6.5 H11 - Double_t radin_a_rail=0.; - Double_t radout_a_rail=0.325;// diameter 3.5 - Double_t high_a_rail=0.82;/// - - TGeoTranslation *tr_a_RR= new TGeoTranslation("tr_a_RR",-0.7,0.6,1.825); //right - tr_a_RR->RegisterYourself(); - //// circular hole_ir. diameter=M3 (3 mm)) prof trou:8, tar:6mm - Double_t radin_ir_rail=0.; - Double_t radout_ir_rail=0.15;// diameter 3 - Double_t high_ir_rail=3.2;// 19 --- - TGeoRotation *rot_ir_RR = new TGeoRotation("rot_ir_RR", 90,90,0); - rot_ir_RR->RegisterYourself(); - //// in y = l_253.5 - 6. center in (0,6,0) - TGeoCombiTrans *combi_ir_RR = new TGeoCombiTrans(-8.62,24.75, 1.5,rot_ir_RR); - combi_ir_RR->SetName("combi_ir_RR"); - combi_ir_RR->RegisterYourself(); - - TGeoCombiTrans *combi_ir2_RR = new TGeoCombiTrans(-8.6,33.15, 1.5,rot_ir_RR); - combi_ir2_RR->SetName("combi_ir2_RR"); - combi_ir2_RR->RegisterYourself(); - - TGeoCombiTrans *combi_rail_R = new TGeoCombiTrans(24.1,-1.825, 0,rot_90x);//y= - combi_rail_R->SetName("combi_rail_R"); - combi_rail_R->RegisterYourself(); - TGeoCombiTrans *combi_rail_L = new TGeoCombiTrans(-24.1,-1.825, 0,rot_90x);//y= - combi_rail_L->SetName("combi_rail_L"); - combi_rail_L->RegisterYourself(); - - ///////// trasl L and R - TGeoTranslation *tr_sr_l = new TGeoTranslation("tr_sr_l",-15.01,0,0); // - tr_sr_l->RegisterYourself(); - - TGeoTranslation *tr_sr_r = new TGeoTranslation("tr_sr_r",15.01,0,0); // - tr_sr_r->RegisterYourself(); - - /////////////////////// shape for rail R //////// - auto *RR_1box =new TGeoBBox("RR_1box", x_RR_1box/2,y_RR_1box/2,z_RR_1box/2); - -//E auto *qdi_Rbox =new TGeoBBox("S_QDI_RBOX", x_qdi_Rbox/2,y_qdi_Rbox/2,z_qdi_Rbox/2); - -//E auto *ir_hole=new TGeoTube("S_ir_HOLE",radin_ir_rail,radout_ir_rail,high_ir_rail/2); - - // auto *s_cc_hole=new TGeoTube("S_CC_HOLE",radin_cc_rail,radout_cc_rail,high_cc_rail/2); - - ////////////////////// composite shape for rail R ////////////////////// - auto * RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0"," RR_1box:tr_RR_1box+ part_RR1 + part_RR2 +part_RR3 - qdi_box:combi_qdi "); - - //-auto * RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0","RR_1BOX:tr_RR_1box+ part_RR1 +part_RR2 +part_RR3- S_QDI_BOX:combi_qdi + S_ir_HOLE:combi_ir_RR +S_ir_HOLE:combi_ir2_RR "); //-S_RR_1BOX:tr_RL_1box- S_b_HOLE:tr_b_RR -S_CC_HOLE:combi_cc2_RR - - ///// JOIN only for show L and R parts - - auto * rail_L_R_Shape = new TGeoCompositeShape("RAIL_L_R_Shape"," RL_Shape_0:combi_rail_L + RR_Shape_0:combi_rail_R"); - ////////////////////////////////////// - - TGeoVolume *rail_L_R_vol0 = new TGeoVolume("RAIL_L_R_VOL0",rail_L_R_Shape,kMedAlu); - - TGeoRotation *rot_rLR = new TGeoRotation("rot_rLR", 180,180,0); - rot_rLR->RegisterYourself(); - TGeoCombiTrans *combi_rLR = new TGeoCombiTrans(0,-6.9, -0.5,rot_rLR);//0,-6.9,-0.5-80 - combi_rLR->SetName("combi_rLR"); - combi_rLR->RegisterYourself(); - - rail_L_R->AddNode(rail_L_R_vol0,2,combi_rLR); - - /// piece 8th -------support rail MB --------------- -\_ - - auto *sup_rail_MBL = new TGeoVolumeAssembly("sup_rail_MBL"); - - /////////////////VARIAb - - TGeoXtru *part_MBL_0 = new TGeoXtru(2); - part_MBL_0->SetName("part_MBL_0"); //V-MBL_0 - - // vertices a,b,c,d,e,f,g,h - Double_t x[8]={0.,0,6.1,31.55,34.55,34.55,31.946,6.496}; - Double_t y[8]={-0.4,0.4,0.4,13.0,13.0,12.2,12.2,-0.4}; - - part_MBL_0->DefinePolygon(8,x,y); - part_MBL_0->DefineSection(0,-0.4,0,0,1);//(plane, -zplane/ +zplane,x0,y0,(x/y)) - part_MBL_0->DefineSection(1,0.4,0,0,1); - - TGeoRotation *rot1_MBL_0 = new TGeoRotation("rot1_MBL_0", -90,-90,90); - rot1_MBL_0->RegisterYourself(); - - ///////////////////////////////// quit box in diag///////////////// - Double_t x_mb_box=0.8; //dx=4 - Double_t y_mb_box=0.8; // dy=4 - Double_t z_mb_box=0.81; // dz=4 to quit - TGeoTranslation *tr_mb_box= new TGeoTranslation("tr_mb_box",24.05,9.55,0);// 240.5 - tr_mb_box->RegisterYourself(); - - ////lateral hole-box - Double_t x_lat_box=0.7; //dx=0.35 - Double_t y_lat_box=1.8; // dy=0.9 - Double_t z_lat_box=0.2; // dz=0.1 - TGeoTranslation *tr_lat1L_box= new TGeoTranslation("tr_lat1L_box",4.6,0,0.4);// - tr_lat1L_box->RegisterYourself(); - TGeoTranslation *tr_lat2L_box= new TGeoTranslation("tr_lat2L_box",9.6,1.65,0.4);// - tr_lat2L_box->RegisterYourself(); - TGeoTranslation *tr_lat3L_box= new TGeoTranslation("tr_lat3L_box",18.53,6.1,0.4);// - tr_lat3L_box->RegisterYourself(); - TGeoTranslation *tr_lat4L_box= new TGeoTranslation("tr_lat4L_box",26.45,10,0.4);// - tr_lat4L_box->RegisterYourself(); - TGeoTranslation *tr_lat5L_box= new TGeoTranslation("tr_lat5L_box",29.9,11.6,0.4);// - tr_lat5L_box->RegisterYourself(); - - TGeoTranslation *tr_lat1R_box= new TGeoTranslation("tr_lat1R_box",4.6,0,-0.4);// - tr_lat1R_box->RegisterYourself(); - TGeoTranslation *tr_lat2R_box= new TGeoTranslation("tr_lat2R_box",9.6,1.65,-0.4);// - tr_lat2R_box->RegisterYourself(); - TGeoTranslation *tr_lat3R_box= new TGeoTranslation("tr_lat3R_box",18.53,6.1,-0.4);// - tr_lat3R_box->RegisterYourself(); - TGeoTranslation *tr_lat4R_box= new TGeoTranslation("tr_lat4R_box",26.45,10,-0.4);// - tr_lat4R_box->RegisterYourself(); - TGeoTranslation *tr_lat5R_box= new TGeoTranslation("tr_lat5R_box",29.9,11.6,-0.4);// - tr_lat5R_box->RegisterYourself(); - - /// circular hole_1mbl. diameter=3.5 H9 - Double_t radin_1mb =0.; - Double_t radout_1mb=0.175;// diameter 3.5mm _0.35 cm - Double_t high_1mb=2.825;/// dh=+/- 4 - TGeoTranslation *tr1_mb= new TGeoTranslation("tr1_mb",18.48,6.1,0.); //right - tr1_mb->RegisterYourself(); - - TGeoTranslation *tr2_mb= new TGeoTranslation("tr2_mb",24.15,8.9,0.); //right - tr2_mb->RegisterYourself(); - - ///circular hole_2mbl inclined and hole-up.diameter=M3 (3 mm)) prof , tar:8mm - Double_t radin_2mb =0.; - Double_t radout_2mb=0.15;// diameter 0.3 - Double_t high_2mb=0.82;/// dh=+/- 4 - - TGeoRotation *rot_hole2_MBL = new TGeoRotation("rot_hole2_MBL", 0,90,0); - rot_hole2_MBL->RegisterYourself(); - - TGeoTranslation *tr_mbl = new TGeoTranslation("tr_mbl",-7.5,0.,0.); // - tr_mbl->RegisterYourself(); - - TGeoTranslation *tr_mbr = new TGeoTranslation("tr_mbr",7.5,0,0); // - tr_mbr->RegisterYourself(); - - ///hole up ||-- hup - - TGeoCombiTrans *combi_hup_mb = new TGeoCombiTrans(32.5,12.6, 0,rot_90x);//y= - combi_hup_mb->SetName("combi_hup_mb"); - combi_hup_mb->RegisterYourself(); - - /////////////////////// shape for rail MB ///////// - auto *mb_box =new TGeoBBox("mb_box", x_mb_box/2,y_mb_box/2,z_mb_box/2); - auto *hole_1mbl=new TGeoTube("hole_1mbl",radin_1mb,radout_1mb,high_1mb/2); // d3.5 - auto *hole_2mbl=new TGeoTube(" hole_2mbl",radin_2mb,radout_2mb,high_2mb/2); //d3 - auto *lat_box =new TGeoBBox("lat_box",x_lat_box/2,y_lat_box/2,z_lat_box/2); - - ////////////////////// composite shape for rail_MB R + L ////////////////////// - - // auto * MB_Shape_0 = new TGeoCompositeShape("MB_Shape_0"," V_MBL_0 -mb_box:tr_mb_box -hole_1mbl:tr1_mb +hole_1mbl:tr2_mb -hole_2mbl:combi_hup_mb "); - auto * MB_Shape_0 = new TGeoCompositeShape("MB_Shape_0","part_MBL_0 -mb_box:tr_mb_box -hole_1mbl:tr1_mb -hole_2mbl:combi_hup_mb "); - - auto * MB_Shape_0L = new TGeoCompositeShape("MB_Shape_0L","MB_Shape_0 -lat_box:tr_lat1L_box - lat_box:tr_lat2L_box - lat_box:tr_lat3L_box- lat_box:tr_lat4L_box-lat_box:tr_lat5L_box "); - - auto * MB_Shape_0R = new TGeoCompositeShape("MB_Shape_0R","MB_Shape_0 -lat_box:tr_lat1R_box -lat_box:tr_lat2R_box - lat_box:tr_lat3R_box -lat_box:tr_lat4R_box- lat_box:tr_lat5R_box"); - - auto * MB_Shape_1L = new TGeoCompositeShape("MB_Shape_1L","MB_Shape_0L:rot1_MBL_0 -hole_2mbl"); // one piece "completed" - // left and right--> - auto * MB_Shape_1R = new TGeoCompositeShape("MB_Shape_1R","MB_Shape_0R:rot1_MBL_0 - hole_2mbl"); - - auto * MB_Shape_2 = new TGeoCompositeShape("MB_Shape_2"," MB_Shape_1L:tr_mbl + MB_Shape_1R:tr_mbr "); - + /// circular hole2 ; hole_midle d=3 + Double_t radin_mid_2hole = 0.; + Double_t radout_mid_2hole = 0.15; // diameter 3 + Double_t high_mid_2hole = 1.8; /// + + TGeoCombiTrans* combi_mid_2tubhole = new TGeoCombiTrans(-7.7, -12.355, 0, rot_mid_1hole); //x=81 + combi_mid_2tubhole->SetName("combi_mid_2tubhole"); + combi_mid_2tubhole->RegisterYourself(); + + ////////////////////////////////////////////////////// + + ///////// shape for midle + auto* midle_box = new TGeoBBox("midle_box", x_midle / 2, y_midle / 2, z_midle / 2); + + auto* midle_d1box = new TGeoBBox("midle_d1box", x_midle_d1box / 2, y_midle_d1box / 2, z_midle_d1box / 2); + + auto* midle_d2box = new TGeoBBox("midle_d2box", x_midle_d2box / 2, y_midle_d2box / 2, z_midle_d2box / 2); + + auto* arc_midle = new TGeoTubeSeg("arc_midle", radin_midle, radout_midle, high_midle / 2, ang_in_midle, ang_fin_midle); + + auto* mid_1tubhole = new TGeoTube("mid_1tubhole", radin_mid_1hole, radout_mid_1hole, high_mid_1hole / 2); + + auto* mid_2tubhole = new TGeoTube("mid_2tubhole", radin_mid_2hole, radout_mid_2hole, high_mid_2hole / 2); + + //////////////////////////////////////////composite shape for midle + + auto* midle_Shape_0 = new TGeoCompositeShape("midle_Shape_0", " arc_midle + midle_box:tr1_midle_box - midle_box:tr2_midle_box -midle_d1box:tr_midle_d1box - midle_d2box:tr_midle_d2box"); + + auto* midle_Shape_1 = new TGeoCompositeShape("midle_Shape_1", " midle_Shape_0 -mid_1tubhole:combi_mid_1tubhole-mid_2tubhole:combi_mid_2tubhole"); + + TGeoRotation* rot_midlez = new TGeoRotation("rot_midley", 180, 180, 0); + rot_midlez->RegisterYourself(); + TGeoCombiTrans* combi_midle_L = new TGeoCombiTrans(0, -7.625, 24.15 + 0.675, rot_90x); //x=7.35, y=0, z=15.79- 0,-7.625,24.15+0.675-80) + combi_midle_L->SetName("combi_midle_L"); + combi_midle_L->RegisterYourself(); + + TGeoTranslation* tr_midle_L = new TGeoTranslation("tr_midle_L", 0, -7.625, 24.15 + 0.675); //-152,-17.45,0 + tr_midle_L->RegisterYourself(); + + TGeoCombiTrans* combi_midle_R = new TGeoCombiTrans(0, -7.625, 24.15 + 0.675, rot_midlez); //x=7.35, y=0, z=15.79 + combi_midle_R->SetName("combi_midle_R"); + combi_midle_R->RegisterYourself(); + + auto* midle_Volume = new TGeoVolume("midle_Volume", midle_Shape_1, kMedAlu); + + midle_L->AddNode(midle_Volume, 1, tr_midle_L); + midle_R->AddNode(midle_Volume, 1, combi_midle_R); + + //midle->AddNode(midle_Volume,1); + midle->AddNode(midle_L, 1); + midle->AddNode(midle_R, 2); + + //////////////////////////////////////new piece ... _/ \_ + /// Support_rail_L & Support_rail_R + + auto* rail_L_R = new TGeoVolumeAssembly("rail_L_R"); + + //6 piece RAIL LEFT --RL---0000------ + auto* rail_L = new TGeoVolumeAssembly("rail_L"); + + /////////////////VARIAb + ////box down_2 + Double_t x_RL_1box = 3.0; //dx=15 + Double_t y_RL_1box = 1.21; // dy=6, -dy=6 + Double_t z_RL_1box = 0.8; // dz=4 to quit + TGeoTranslation* tr_RL_1box = new TGeoTranslation(0, y_RL_1box / 2, 1.825); //81 + tr_RL_1box->SetName("tr_RL_1box"); + tr_RL_1box->RegisterYourself(); + //////////////////////////////7 + + TGeoXtru* xtru_RL1 = new TGeoXtru(2); + xtru_RL1->SetName("S_XTRU_RL1"); + + Double_t x_RL1[5] = { -1.5, 1.5, 0.5, 0.5, -1.5 }; //93,93,73,73,-15};//vertices + Double_t y_RL1[5] = { 1.2, 1.2, 2.2, 8.2, 8.2 }; //357.5,357.5,250.78,145.91}; + xtru_RL1->DefinePolygon(5, x_RL1, y_RL1); + xtru_RL1->DefineSection(0, -2.225, 0., 0., 1); //(plane,-zplane/ +zplane, x0, y0,(x/y)) + xtru_RL1->DefineSection(1, 2.225, 0., 0., 1); + ////////////// \// + + TGeoXtru* xtru_RL2 = new TGeoXtru(2); + xtru_RL2->SetName("S_XTRU_RL2"); + + Double_t x_RL2[8] = { -1.5, 0.5, 0.5, 9.3, 9.3, 7.3, 7.3, -1.5 }; //vertices + Double_t y_RL2[8] = { 8.2, 8.2, 13.863, 24.35, 35.75, 35.75, 25.078, 14.591 }; + + xtru_RL2->DefinePolygon(8, x_RL2, y_RL2); + + xtru_RL2->DefineSection(0, 0.776, 0, 0, 1); //(plane,-zplane/+zplane, x0, y0,(x/y)) + xtru_RL2->DefineSection(1, 2.225, 0, 0, 1); + + ///////////////////////// //////////////////// + ////box knee + Double_t x_RL_kneebox = 1.5; //dx=7.5 + Double_t y_RL_kneebox = 3.5; // dy=17.5 + Double_t z_RL_kneebox = 1.5; // dz=7.5 to quit + TGeoTranslation* tr_RL_kneebox = new TGeoTranslation(0, 0, 0); //81 x =-2.5, y=145.91 + tr_RL_kneebox->SetName("tr_RL_kneebox"); + tr_RL_kneebox->RegisterYourself(); + + TGeoRotation* rot_knee = new TGeoRotation("rot_knee", -40, 0, 0); + rot_knee->SetName("rot_knee"); + rot_knee->RegisterYourself(); + TGeoCombiTrans* combi_knee = new TGeoCombiTrans(0.96, 1.75 + 0.81864, 0, rot_knee); //y= + combi_knee->SetName("combi_knee"); + combi_knee->RegisterYourself(); + ///////////////////////////////// quit diagona-> qdi///////////////// + Double_t x_qdi_box = 3.1; // + Double_t y_qdi_box = 7.159; // + Double_t z_qdi_box = 3.005; // + + TGeoRotation* rot_qdi = new TGeoRotation("rot_qdi", 0, 24.775, 0); + rot_qdi->RegisterYourself(); + TGeoCombiTrans* combi_qdi = new TGeoCombiTrans(0, 5.579, -2.087, rot_qdi); //y= + combi_qdi->SetName("combi_qdi"); + combi_qdi->RegisterYourself(); + ////////////// knee small + + TGeoXtru* xtru3_RL = new TGeoXtru(2); + xtru3_RL->SetName("S_XTRU3_RL"); + + Double_t x_3RL[6] = { -0.75, 0.75, 0.75, 2.6487, 1.4997, -0.75 }; //vertices + Double_t y_3RL[6] = { -1.75, -1.75, 1.203, 3.465, 4.4311, 1.75 }; + + xtru3_RL->DefinePolygon(6, x_3RL, y_3RL); + xtru3_RL->DefineSection(0, -0.75, 0, 0, 1); //(plane,-zplane/+zplane, x0, y0,(x/y)) + xtru3_RL->DefineSection(1, 0.76, 0, 0, 1); + + TGeoTranslation* tr_vol3_RL = new TGeoTranslation(-0.25, 12.66, 0); // + tr_vol3_RL->SetName("tr_vol3_RL"); + tr_vol3_RL->RegisterYourself(); + ///////////////////////////////////////////// + //// circular holes could be for rail R and L .. + /// circular hole1_RL (a(6,22)); hole_midle d=6.5 H11 + Double_t radin_RL1hole = 0.; + Double_t radout_RL1hole = 0.325; // diameter 3.5 + Double_t high_RL1hole = 1.0; /// + + TGeoRotation* rot_RL1hole = new TGeoRotation("rot_RL1hole", 0, 0, 0); + rot_RL1hole->RegisterYourself(); + TGeoCombiTrans* combi_RL1hole = new TGeoCombiTrans(0.7, 0.6, 1.85, rot_RL1hole); //y= + combi_RL1hole->SetName("combi_RL1hole"); + combi_RL1hole->RegisterYourself(); + //////////////////////////////// similar hole for R -- Join. + /// circular hole_ir. diameter=M3 (3 mm)) prof trou:8, tar:6mm + Double_t radin_ir_railL = 0.; + Double_t radout_ir_railL = 0.15; // diameter 0.3cm + Double_t high_ir_railL = 3.9; // + TGeoRotation* rot_ir_RL = new TGeoRotation("rot_ir_RL", 90, 90, 0); + rot_ir_RL->RegisterYourself(); + //// in y = l_253.5 - 6. enter in (0,6,0) + TGeoCombiTrans* combi_ir1_RL = new TGeoCombiTrans(8.62, 24.75, 1.5, rot_ir_RL); + combi_ir1_RL->SetName("combi_ir1_RL"); + combi_ir1_RL->RegisterYourself(); + + TGeoCombiTrans* combi_ir2_RL = new TGeoCombiTrans(8.6, 33.15, 1.5, rot_ir_RL); + combi_ir2_RL->SetName("combi_ir2_RL"); + combi_ir2_RL->RegisterYourself(); + + /////////////////////// shape for Rail L geom///////// + auto* RL_1box = new TGeoBBox("RL_1box", x_RL_1box / 2, y_RL_1box / 2, z_RL_1box / 2); + auto* RL_kneebox = new TGeoBBox("RL_kneebox", x_RL_kneebox / 2, y_RL_kneebox / 2, z_RL_kneebox / 2); //no_ used + auto* qdi_box = new TGeoBBox("qdi_box", x_qdi_box / 2, y_qdi_box / 2, z_qdi_box / 2); + + //E auto *s_RL1hole=new TGeoTube("S_RL1HOLE",radin_RL1hole,radout_RL1hole,high_RL1hole/2); + //-auto *s_irL_hole=new TGeoTube("S_irL_HOLE",radin_ir_railL,radout_ir_railL,high_ir_railL/2); + + ////////////////////// composite shape for rail L ////////////////////// + + auto* RL_Shape_0 = new TGeoCompositeShape("RL_Shape_0", " S_XTRU3_RL:tr_vol3_RL + S_XTRU_RL1 + S_XTRU_RL2 + RL_1box:tr_RL_1box - qdi_box:combi_qdi"); // + + //////////////////////////////////////-------//////// + + TGeoVolume* rail_L_vol0 = new TGeoVolume("RAIL_L_VOL0", RL_Shape_0, kMedAlu); + + rail_L->AddNode(rail_L_vol0, 1, new TGeoTranslation(0., 0., 1.5)); + + ////piece 7th ---------------RAIL RIGHT ---- //////////////----- + //E auto *rail_R = new TGeoVolumeAssembly("rail_R"); + + Double_t x_RR_1box = 3.0; //dx=15 + Double_t y_RR_1box = 1.2; // dy=6, -dy=6 + Double_t z_RR_1box = 0.8; // dz=4 to quit + TGeoTranslation* tr_RR_1box = new TGeoTranslation("tr_RR_1box", 0, 0.6, 1.825); //81 + tr_RR_1box->RegisterYourself(); + ////////////////////////////////7 + + TGeoXtru* part_RR1 = new TGeoXtru(2); + part_RR1->SetName("part_RR1"); + //-TGeoVolume *vol_RR1 = gGeoManager->MakeXtru("S_part_RR1",kMedAlu,2); + //-TGeoXtru *part_RR1 = (TGeoXtru*)vol_RR1->GetShape(); + + Double_t x_RR1[5] = { -1.5, -0.5, -0.5, 1.5, 1.5 }; //C,D,K,L,C' //vertices + Double_t y_RR1[5] = { 1.2, 2.2, 8.2, 8.2, 1.2 }; //357.5,357.5,250.78,145.91}; + + part_RR1->DefinePolygon(5, x_RR1, y_RR1); + part_RR1->DefineSection(0, -2.225, 0, 0, 1); //(plane,-zplane/ +zplane, x0, y0,(x/y)) + part_RR1->DefineSection(1, 2.225, 0, 0, 1); + + ////////////// \////////// + + TGeoXtru* part_RR2 = new TGeoXtru(2); + part_RR2->SetName("part_RR2"); + //-TGeoVolume *vol_RR2 = gGeoManager->MakeXtru("part_RR2",Al,2); + //-TGeoXtru *xtru_RR2 = (TGeoXtru*)vol_RR2->GetShape(); + + Double_t x_RR2[8] = { -0.5, -0.5, -9.3, -9.3, -7.3, -7.3, 1.5, 1.5 }; //K,E,F,G,H,I,J,L//vertices + Double_t y_RR2[8] = { 8.2, 13.863, 24.35, 35.75, 35.75, 25.078, 14.591, 8.2 }; + + part_RR2->DefinePolygon(8, x_RR2, y_RR2); + part_RR2->DefineSection(0, 0.776, 0, 0, 1); //(plane,-zplane/+zplane, x0, y0,(x/y)) + part_RR2->DefineSection(1, 2.225, 0, 0, 1); + + ////////////// knee (small) + + TGeoXtru* part_RR3 = new TGeoXtru(2); + part_RR3->SetName("part_RR3"); + + Double_t x_3RR[6] = { 1.0, 1.0, -1.2497, -2.2138, -0.5, -0.5 }; //R,Q,P,O,N.M //vertices + Double_t y_3RR[6] = { 10.91, 14.41, 17.0911, 15.9421, 13.86, 10.91 }; + + part_RR3->DefinePolygon(6, x_3RR, y_3RR); + part_RR3->DefineSection(0, -0.75, 0, 0, 1); //(plane,-zplane/+zplane, x0, y0,(x/y)) + part_RR3->DefineSection(1, 0.78, 0, 0, 1); + + TGeoTranslation* tr_vol3_RR = new TGeoTranslation("tr_vol3_RR", -0.25, 12.66, 0); // + tr_vol3_RR->RegisterYourself(); + + ///////////////////////////////// quit diagona-> qdi///////////////// + Double_t x_qdi_Rbox = 3.1; //dx=1.5 + Double_t y_qdi_Rbox = 7.159; // + Double_t z_qdi_Rbox = 3.005; // + + TGeoRotation* rot_Rqdi = new TGeoRotation("rot_Rqdi", 0, 24.775, 0); + rot_Rqdi->RegisterYourself(); + TGeoCombiTrans* combi_Rqdi = new TGeoCombiTrans(0, 5.579, -2.087, rot_Rqdi); //y= + combi_Rqdi->SetName("combi_Rqdi"); + combi_Rqdi->RegisterYourself(); + + ////////////////////___holes__///// + + /// circular hole_a. diameter=6.5 (a(6,22)); hole_midle d=6.5 H11 + Double_t radin_a_rail = 0.; + Double_t radout_a_rail = 0.325; // diameter 3.5 + Double_t high_a_rail = 0.82; /// + + TGeoTranslation* tr_a_RR = new TGeoTranslation("tr_a_RR", -0.7, 0.6, 1.825); //right + tr_a_RR->RegisterYourself(); + //// circular hole_ir. diameter=M3 (3 mm)) prof trou:8, tar:6mm + Double_t radin_ir_rail = 0.; + Double_t radout_ir_rail = 0.15; // diameter 3 + Double_t high_ir_rail = 3.2; // 19 --- + TGeoRotation* rot_ir_RR = new TGeoRotation("rot_ir_RR", 90, 90, 0); + rot_ir_RR->RegisterYourself(); + //// in y = l_253.5 - 6. center in (0,6,0) + TGeoCombiTrans* combi_ir_RR = new TGeoCombiTrans(-8.62, 24.75, 1.5, rot_ir_RR); + combi_ir_RR->SetName("combi_ir_RR"); + combi_ir_RR->RegisterYourself(); + + TGeoCombiTrans* combi_ir2_RR = new TGeoCombiTrans(-8.6, 33.15, 1.5, rot_ir_RR); + combi_ir2_RR->SetName("combi_ir2_RR"); + combi_ir2_RR->RegisterYourself(); + + TGeoCombiTrans* combi_rail_R = new TGeoCombiTrans(24.1, -1.825, 0, rot_90x); //y= + combi_rail_R->SetName("combi_rail_R"); + combi_rail_R->RegisterYourself(); + TGeoCombiTrans* combi_rail_L = new TGeoCombiTrans(-24.1, -1.825, 0, rot_90x); //y= + combi_rail_L->SetName("combi_rail_L"); + combi_rail_L->RegisterYourself(); + + ///////// trasl L and R + TGeoTranslation* tr_sr_l = new TGeoTranslation("tr_sr_l", -15.01, 0, 0); // + tr_sr_l->RegisterYourself(); + TGeoTranslation* tr_sr_r = new TGeoTranslation("tr_sr_r", 15.01, 0, 0); // + tr_sr_r->RegisterYourself(); + + /////////////////////// shape for rail R //////// + auto* RR_1box = new TGeoBBox("RR_1box", x_RR_1box / 2, y_RR_1box / 2, z_RR_1box / 2); + + //E auto *s_qdi_Rbox =new TGeoBBox("S_QDI_RBOX", x_qdi_Rbox/2,y_qdi_Rbox/2,z_qdi_Rbox/2); + + //E auto *s_ir_hole=new TGeoTube("S_ir_HOLE",radin_ir_rail,radout_ir_rail,high_ir_rail/2); + + //E auto *s_cc_hole=new TGeoTube("S_CC_HOLE",radin_cc_rail,radout_cc_rail,high_cc_rail/2); + + ////////////////////// composite shape for rail R ////////////////////// + auto* RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0", "RR_1box:tr_RR_1box + part_RR1 + part_RR2 + part_RR3 - qdi_box:combi_qdi "); + + //-auto * RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0","RR_1box:tr_RR_1box+ S_part_RR1 + part_RR2 +part_RR3- qdi_box:combi_qdi + S_ir_HOLE:combi_ir_RR +S_ir_HOLE:combi_ir2_RR "); //-RR_1box:tr_RL_1box- S_b_HOLE:tr_b_RR -S_CC_HOLE:combi_cc2_RR + + //// JOIN only for show L and R parts + + auto* rail_L_R_Shape = new TGeoCompositeShape("RAIL_L_R_Shape", " RL_Shape_0:combi_rail_L + RR_Shape_0:combi_rail_R"); + ////////////////////////////////////// + + TGeoVolume* rail_L_R_vol0 = new TGeoVolume("RAIL_L_R_VOL0", rail_L_R_Shape, kMedAlu); + + TGeoRotation* rot_rLR = new TGeoRotation("rot_rLR", 180, 180, 0); + rot_rLR->RegisterYourself(); + TGeoCombiTrans* combi_rLR = new TGeoCombiTrans(0, -6.9, -0.5, rot_rLR); //0,-6.9,-0.5-80 + combi_rLR->SetName("combi_rLR"); + combi_rLR->RegisterYourself(); + + rail_L_R->AddNode(rail_L_R_vol0, 2, combi_rLR); + + /// piece 8th -------support rail MB --------------- -\_ + + auto* sup_rail_MBL = new TGeoVolumeAssembly("sup_rail_MBL"); + + /////////////////VARIAb + + TGeoXtru* part_MBL_0 = new TGeoXtru(2); + part_MBL_0->SetName("part_MBL_0"); //V-MBL_0 + + // vertices a,b,c,d,e,f,g,h + Double_t x[8] = { 0., 0, 6.1, 31.55, 34.55, 34.55, 31.946, 6.496 }; + Double_t y[8] = { -0.4, 0.4, 0.4, 13.0, 13.0, 12.2, 12.2, -0.4 }; + + part_MBL_0->DefinePolygon(8, x, y); + part_MBL_0->DefineSection(0, -0.4, 0, 0, 1); //(plane, -zplane/ +zplane,x0,y0,(x/y)) + part_MBL_0->DefineSection(1, 0.4, 0, 0, 1); + + TGeoRotation* rot1_MBL_0 = new TGeoRotation("rot1_MBL_0", -90, -90, 90); + rot1_MBL_0->RegisterYourself(); + + ///////////////////////////////// quit box in diag///////////////// + Double_t x_mb_box = 0.8; //dx=4 + Double_t y_mb_box = 0.8; // dy=4 + Double_t z_mb_box = 0.81; // dz=4 to quit + TGeoTranslation* tr_mb_box = new TGeoTranslation("tr_mb_box", 24.05, 9.55, 0); // 240.5 + tr_mb_box->RegisterYourself(); + + ////lateral hole-box + Double_t x_lat_box = 0.7; //dx=0.35 + Double_t y_lat_box = 1.8; // dy=0.9 + Double_t z_lat_box = 0.2; // dz=0.1 + TGeoTranslation* tr_lat1L_box = new TGeoTranslation("tr_lat1L_box", 4.6, 0, 0.4); // + tr_lat1L_box->RegisterYourself(); + TGeoTranslation* tr_lat2L_box = new TGeoTranslation("tr_lat2L_box", 9.6, 1.65, 0.4); // + tr_lat2L_box->RegisterYourself(); + TGeoTranslation* tr_lat3L_box = new TGeoTranslation("tr_lat3L_box", 18.53, 6.1, 0.4); // + tr_lat3L_box->RegisterYourself(); + TGeoTranslation* tr_lat4L_box = new TGeoTranslation("tr_lat4L_box", 26.45, 10, 0.4); // + tr_lat4L_box->RegisterYourself(); + TGeoTranslation* tr_lat5L_box = new TGeoTranslation("tr_lat5L_box", 29.9, 11.6, 0.4); // + tr_lat5L_box->RegisterYourself(); + + TGeoTranslation* tr_lat1R_box = new TGeoTranslation("tr_lat1R_box", 4.6, 0, -0.4); // + tr_lat1R_box->RegisterYourself(); + TGeoTranslation* tr_lat2R_box = new TGeoTranslation("tr_lat2R_box", 9.6, 1.65, -0.4); // + tr_lat2R_box->RegisterYourself(); + TGeoTranslation* tr_lat3R_box = new TGeoTranslation("tr_lat3R_box", 18.53, 6.1, -0.4); // + tr_lat3R_box->RegisterYourself(); + TGeoTranslation* tr_lat4R_box = new TGeoTranslation("tr_lat4R_box", 26.45, 10, -0.4); // + tr_lat4R_box->RegisterYourself(); + TGeoTranslation* tr_lat5R_box = new TGeoTranslation("tr_lat5R_box", 29.9, 11.6, -0.4); // + tr_lat5R_box->RegisterYourself(); + + /// circular hole_1mbl. diameter=3.5 H9 + Double_t radin_1mb = 0.; + Double_t radout_1mb = 0.175; // diameter 3.5mm _0.35 cm + Double_t high_1mb = 2.825; /// dh=+/- 4 + TGeoTranslation* tr1_mb = new TGeoTranslation("tr1_mb", 18.48, 6.1, 0.); //right + tr1_mb->RegisterYourself(); + + TGeoTranslation* tr2_mb = new TGeoTranslation("tr2_mb", 24.15, 8.9, 0.); //right + tr2_mb->RegisterYourself(); + + ///circular hole_2mbl inclined and hole-up.diameter=M3 (3 mm)) prof , tar:8mm + Double_t radin_2mb = 0.; + Double_t radout_2mb = 0.15; // diameter 0.3 + Double_t high_2mb = 0.82; /// dh=+/- 4 + + TGeoRotation* rot_hole2_MBL = new TGeoRotation("rot_hole2_MBL", 0, 90, 0); + rot_hole2_MBL->RegisterYourself(); + + TGeoTranslation* tr_mbl = new TGeoTranslation("tr_mbl", -7.5, 0., 0.); // + tr_mbl->RegisterYourself(); + + TGeoTranslation* tr_mbr = new TGeoTranslation("tr_mbr", 7.5, 0, 0); // + tr_mbr->RegisterYourself(); + + ///hole up ||-- hup + TGeoCombiTrans* combi_hup_mb = new TGeoCombiTrans(32.5, 12.6, 0, rot_90x); //y= + combi_hup_mb->SetName("combi_hup_mb"); + combi_hup_mb->RegisterYourself(); + + /////////////////////// shape for rail MB ///////// + auto* mb_box = new TGeoBBox("mb_box", x_mb_box / 2, y_mb_box / 2, z_mb_box / 2); + auto* hole_1mbl = new TGeoTube("hole_1mbl", radin_1mb, radout_1mb, high_1mb / 2); //d3.5 + auto* hole_2mbl = new TGeoTube("hole_2mbl", radin_2mb, radout_2mb, high_2mb / 2); //d3 + auto* lat_box = new TGeoBBox("lat_box", x_lat_box / 2, y_lat_box / 2, z_lat_box / 2); + + ////////////////////// composite shape for rail_MB R + L ////////////////////// + + // auto * MB_Shape_0 = new TGeoCompositeShape("MB_Shape_0"," V_MBL_0 - mb_box:tr_mb_box - hole_1mbl:tr1_mb + hole_1mbl:tr2_mb -hole_2mbl:combi_hup_mb "); + auto* MB_Shape_0 = new TGeoCompositeShape("MB_Shape_0", "part_MBL_0 - mb_box:tr_mb_box - hole_1mbl:tr1_mb - hole_2mbl:combi_hup_mb "); + + auto* MB_Shape_0L = new TGeoCompositeShape("MB_Shape_0L", "MB_Shape_0 - lat_box:tr_lat1L_box - lat_box:tr_lat2L_box - lat_box:tr_lat3L_box - lat_box:tr_lat4L_box - lat_box:tr_lat5L_box"); + + auto* MB_Shape_0R = new TGeoCompositeShape("MB_Shape_0R", "MB_Shape_0 - lat_box:tr_lat1R_box - lat_box:tr_lat2R_box - lat_box:tr_lat3R_box - lat_box:tr_lat4R_box - lat_box:tr_lat5R_box"); + + auto* MB_Shape_1L = new TGeoCompositeShape("MB_Shape_1L", "MB_Shape_0L:rot1_MBL_0 - hole_2mbl"); // one piece "completed" + // left and right--> + auto* MB_Shape_1R = new TGeoCompositeShape("MB_Shape_1R", "MB_Shape_0R:rot1_MBL_0 - hole_2mbl"); + + auto* MB_Shape_2 = new TGeoCompositeShape("MB_Shape_2", " MB_Shape_1L:tr_mbl + MB_Shape_1R:tr_mbr "); + ///////// - // TGeoVolume *sup_rail_MBL_vol0 = new TGeoVolume("SUPPORT_MBL_VOL0",MB_Shape_0,Al); - TGeoVolume *sup_rail_MBL_vol = new TGeoVolume("SUPPORT_MBL_VOL",MB_Shape_2,kMedAlu); - //////////////////////////////// - - - sup_rail_MBL->AddNode(sup_rail_MBL_vol,1,rot_halfR); - - + // TGeoVolume *sup_rail_MBL_vol0 = new TGeoVolume("SUPPORT_MBL_VOL0",MB_Shape_0,Al); + TGeoVolume* sup_rail_MBL_vol = new TGeoVolume("SUPPORT_MBL_VOL", MB_Shape_2, kMedAlu); + //////////////////////////////// + + sup_rail_MBL->AddNode(sup_rail_MBL_vol, 1, rot_halfR); + ///////////////////////////////////////////////// =|=|= - - auto *stair = new TGeoVolumeAssembly("stair"); - - stair->AddNode(sup_rail_MBL,1,new TGeoTranslation(0,0-28.8,0+0.675));// - stair->AddNode(Cross_mft,2,new TGeoTranslation(0,-28.8,4.55+0.675)); - stair->AddNode(Cross_mb0,3,new TGeoTranslation(0,1.65-28.8,9.55+0.675)); - stair->AddNode(Cross_mb0,4,new TGeoTranslation(0,6.1-28.8,18.48+0.675)); - stair->AddNode(Cross_mft,6,new TGeoTranslation(0,10.0-28.8,26.4+0.675)); - stair->AddNode(Cross_mft,7, new TGeoTranslation(0,11.6-28.8,29.85+0.675)); - - - Double_t t_final_x; - Double_t t_final_y; - Double_t t_final_z; - - Double_t r_final_x ; - Double_t r_final_y ; - Double_t r_final_z ; - - - if (half == 0){ - t_final_x = 0; - t_final_y = 0; - t_final_z = -80; - - r_final_x =0 ; - r_final_y = 0; - r_final_z = 0; - } - - if (half == 1){ - t_final_x = 0; - t_final_y = 0; - t_final_z = -80; - - r_final_x =0 ; - r_final_y = 0; - r_final_z= 180; - } - - auto* t_final = new TGeoTranslation("t_final", t_final_x, t_final_y, t_final_z); - auto* r_final = new TGeoRotation("r_final", r_final_x, r_final_y, r_final_z); - auto* c_final = new TGeoCombiTrans(*t_final, *r_final); - - - HalfConeVolume->AddNode(stair,1,c_final ); // - HalfConeVolume->AddNode(base,2,c_final); - HalfConeVolume->AddNode(rail_L_R,3, c_final);// R&L - HalfConeVolume->AddNode(Fra_front,4,c_final); - HalfConeVolume->AddNode(midle,6,c_final); // - -//////////// - - - - return HalfConeVolume; + + auto* stair = new TGeoVolumeAssembly("stair"); + + stair->AddNode(sup_rail_MBL, 1, new TGeoTranslation(0, 0 - 28.8, 0 + 0.675)); // + stair->AddNode(Cross_mft, 2, new TGeoTranslation(0, -28.8, 4.55 + 0.675)); + stair->AddNode(Cross_mb0, 3, new TGeoTranslation(0, 1.65 - 28.8, 9.55 + 0.675)); + stair->AddNode(Cross_mb0, 4, new TGeoTranslation(0, 6.1 - 28.8, 18.48 + 0.675)); + stair->AddNode(Cross_mft, 6, new TGeoTranslation(0, 10.0 - 28.8, 26.4 + 0.675)); + stair->AddNode(Cross_mft, 7, new TGeoTranslation(0, 11.6 - 28.8, 29.85 + 0.675)); + + Double_t t_final_x; + Double_t t_final_y; + Double_t t_final_z; + + Double_t r_final_x; + Double_t r_final_y; + Double_t r_final_z; + + if (half == 0) { + t_final_x = 0; + t_final_y = 0; + t_final_z = -80; + + r_final_x = 0; + r_final_y = 0; + r_final_z = 0; + } + + if (half == 1) { + t_final_x = 0; + t_final_y = 0; + t_final_z = -80; + + r_final_x = 0; + r_final_y = 0; + r_final_z = 180; + } + + auto* t_final = new TGeoTranslation("t_final", t_final_x, t_final_y, t_final_z); + auto* r_final = new TGeoRotation("r_final", r_final_x, r_final_y, r_final_z); + auto* c_final = new TGeoCombiTrans(*t_final, *r_final); + ////////////////////////////////////////////////////////// + auto* Half_3 = new TGeoVolumeAssembly("Half_3"); + + // Shell radii + Float_t Shell_rmax = 60.6 + .7; + Float_t Shell_rmin = 37.5 + .7; + + // Rotations and translations + auto* tShell_0 = new TGeoTranslation("tShell_0", 0., 0., 3.1 + (25.15 + 1.) / 2.); + auto* tShell_1 = new TGeoTranslation("tShell_1", 0., 0., -1.6 - (25.15 + 1.) / 2.); + auto* tShellHole = new TGeoTranslation("tShellHole", 0., 0., 2. / 2. + (25.15 + 1.) / 2.); + auto* tShellHole_0 = new TGeoTranslation("tShellHole_0", 0., -6.9, -26.1 / 2. - 6.2 / 2. - .1); + auto* tShellHole_1 = new TGeoTranslation("tShellHole_1", 0., 0., -26.1 / 2. - 6.2 / 2. - .1); + auto* tShell_Cut = new TGeoTranslation("tShell_Cut", 0., 25. / 2., 0.); + auto* tShell_Cut_1 = new TGeoTranslation("tShell_Cut_1", -23., 0., -8.); + auto* tShell_Cut_1_inv = new TGeoTranslation("tShell_Cut_1_inv", 23., 0., -8.); + auto* Rz = new TGeoRotation("Rz", 50., 0., 0.); + auto* Rz_inv = new TGeoRotation("Rz_inv", -50., 0., 0.); + auto* RShell_Cut = new TGeoRotation("RShell_Cut", 90., 90. - 24., -7.5); + auto* RShell_Cut_inv = new TGeoRotation("RShell_Cut_inv", 90., 90. + 24., -7.5); + + auto* cShell_Cut = new TGeoCombiTrans(*tShell_Cut_1, *RShell_Cut); + auto* cShell_Cut_inv = new TGeoCombiTrans(*tShell_Cut_1_inv, *RShell_Cut_inv); + + tShell_0->RegisterYourself(); + tShell_1->RegisterYourself(); + tShellHole->RegisterYourself(); + tShellHole_0->RegisterYourself(); + tShellHole_1->RegisterYourself(); + tShell_Cut->RegisterYourself(); + Rz->RegisterYourself(); + Rz_inv->RegisterYourself(); + RShell_Cut->RegisterYourself(); + cShell_Cut->SetName("cShell_Cut"); + cShell_Cut->RegisterYourself(); + cShell_Cut_inv->SetName("cShell_Cut_inv"); + cShell_Cut_inv->RegisterYourself(); + + // Basic shapes for Half_3 + TGeoShape* Shell_0 = new TGeoTubeSeg("Shell_0", Shell_rmax / 2. - .1, Shell_rmax / 2., 6.2 / 2., 12., 168.); + TGeoShape* Shell_1 = new TGeoTubeSeg("Shell_1", Shell_rmin / 2. - .1, Shell_rmin / 2., 3.2 / 2., 0., 180.); + TGeoShape* Shell_2 = new TGeoConeSeg("Shell_2", (25.15 + 1.0) / 2., Shell_rmin / 2. - .1, Shell_rmin / 2., Shell_rmax / 2. - .1, Shell_rmax / 2., 0., 180.); + TGeoShape* Shell_3 = new TGeoTube("Shell_3", 0., Shell_rmin / 2. + .1, .1 / 2.); + TGeoShape* ShellHole_0 = new TGeoTrd1("ShellHole_0", 17.5 / 4., 42.5 / 4., 80. / 2., (25.15 + 1.) / 2.); + TGeoShape* ShellHole_1 = new TGeoBBox("ShellHole_1", 42.5 / 4., 80. / 2., 2. / 2. + 0.00001); + TGeoShape* ShellHole_2 = new TGeoBBox("ShellHole_2", 58.9 / 4., (Shell_rmin - 2.25) / 2., .4 / 2. + 0.00001); + TGeoShape* ShellHole_3 = new TGeoBBox("ShellHole_3", 80. / 4., (Shell_rmin - 11.6) / 2., .4 / 2. + 0.00001); + + // For the extra cut, not sure if this is the shape (apprx. distances) + TGeoShape* Shell_Cut_0 = new TGeoTube("Shell_Cut_0", 0., 3.5, 5. / 2.); + TGeoShape* Shell_Cut_1 = new TGeoBBox("Shell_Cut_1", 7. / 2., 25. / 2., 5. / 2.); + + // Composite shapes for Half_3 + auto* Half_3_Shape_0 = new TGeoCompositeShape("Half_3_Shape_0", "Shell_Cut_0+Shell_Cut_1:tShell_Cut"); + auto* Half_3_Shape_1 = new TGeoCompositeShape("Half_3_Shape_1", "Shell_2-Half_3_Shape_0:cShell_Cut-Half_3_Shape_0:cShell_Cut_inv"); + auto* Half_3_Shape_2 = new TGeoCompositeShape("Half_3_Shape_2", "ShellHole_0+ShellHole_1:tShellHole"); + auto* Half_3_Shape_3 = new TGeoCompositeShape("Half_3_Shape_3", "Shell_3:tShellHole_1 -(ShellHole_2:tShellHole_1 + ShellHole_3:tShellHole_0)"); + auto* Half_3_Shape_4 = new TGeoCompositeShape("Half_3_Shape_4", + "(Shell_0:tShell_0 + Half_3_Shape_1+ Shell_1:tShell_1) - (Half_3_Shape_2 + " + "Half_3_Shape_2:Rz + Half_3_Shape_2:Rz_inv)+Half_3_Shape_3"); + + auto* Half_3_Volume = new TGeoVolume("Half_3_Volume", Half_3_Shape_4, kMedAlu); + // Position of the piece relative to the origin which for this code is the center of the the Framework piece (See + // Half_2) + ///-- Half_3->AddNode(Half_3_Volume, 1, new TGeoTranslation(0., 0., -19.)); + + TGeoRotation* rot_z180 = new TGeoRotation("rot_z180", 0, 180, 0); /// orig: (180,0,0) + rot_z180->RegisterYourself(); + //// in y = l_253.5 - 6. center in (0,6,0) + TGeoCombiTrans* combi_coat = new TGeoCombiTrans(0, 0, 19.5 - 0.45, rot_z180); ///TGeoCombiTrans(0,0, -19.5,rot_z180) // -0.5 ->0.45 + combi_coat->SetName("combi_coat"); + combi_coat->RegisterYourself(); + + Half_3->AddNode(Half_3_Volume, 1, combi_coat); + // Half_3_Volume->SetLineColor(1); + + ////////////////////////////////////////////////////// + HalfConeVolume->AddNode(stair, 1, c_final); // + HalfConeVolume->AddNode(base, 2, c_final); + HalfConeVolume->AddNode(rail_L_R, 3, c_final); // R&L + HalfConeVolume->AddNode(Fra_front, 4, c_final); + HalfConeVolume->AddNode(midle, 5, c_final); // + HalfConeVolume->AddNode(Half_3, 6, c_final); + /// HalfConeVolume->AddNode(Half_3,8, new TGeoCombiTrans(0,0,0-0.5,rot_halfR)); //-0.675 + + //////////// + + return HalfConeVolume; } From 76828de694163caf738f743d2a19c6eafa368a7e Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Sat, 9 Mar 2019 11:38:07 -0500 Subject: [PATCH 08/22] Update HalfCone.cxx removed an unnecessary parts --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 3b1d1a2c6c2f5..64c6a29770709 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -52,14 +52,8 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto* HalfConeVolume = new TGeoVolumeAssembly("HalfConeVolume"); TGeoMedium* kMedAlu = gGeoManager->GetMedium("MFT_Alu$"); - //--- define some materials - TGeoMaterial* matVacuum = new TGeoMaterial("Vacuum", 0, 0, 0); - TGeoMaterial* matAl = new TGeoMaterial("Al", 26.98, 13, 2.7); - // //--- define some media - // TGeoMedium *Vacuum = new TGeoMedium("Vacuum",1, matVacuum); - // TGeoMedium *Al = new TGeoMedium("Root Material",2, matAl); + /////Rotation //// - TGeoRotation* rot1 = new TGeoRotation("rot1", 180, -180, 0); rot1->RegisterYourself(); From afcab2ccac044c9656652a7a3c01a8f14ec9cd4d Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Sat, 9 Mar 2019 13:13:52 -0500 Subject: [PATCH 09/22] Update HalfCone.cxx Fixing 1 according Codacy/PR --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 64c6a29770709..8e6bda2e05fb2 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -119,9 +119,9 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_2hole_mb0_b->RegisterYourself(); // shape for cross_mb0 - auto* box_mb0 = new TGeoBBox("box_mb0", x_box_mb0 / 2, y_box_mb0 / 2, z_box_mb0 / 2); - auto* hole1_mb0 = new TGeoTube("hole1_mb0", radin_1hole_mb0, radout_1hole_mb0, high_1hole_mb0 / 2); - auto* hole2_mb0 = new TGeoTube("hole2_mb0", radin_2hole_mb0, radout_2hole_mb0, high_2hole_mb0 / 2); + TGeoShape* box_mb0 = new TGeoBBox("box_mb0", x_box_mb0 / 2, y_box_mb0 / 2, z_box_mb0 / 2); + TGeoShape* hole1_mb0 = new TGeoTube("hole1_mb0", radin_1hole_mb0, radout_1hole_mb0, high_1hole_mb0 / 2); + TGeoShape* hole2_mb0 = new TGeoTube("hole2_mb0", radin_2hole_mb0, radout_2hole_mb0, high_2hole_mb0 / 2); ///composite shape for mb0 From d28f8763d852b9736eedfdafc4c5c4742c07b096 Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Sat, 9 Mar 2019 15:06:47 -0500 Subject: [PATCH 10/22] Update HalfCone.cxx Fixing 2 according Codacy/PR --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 52 +++++++++++----------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 8e6bda2e05fb2..479c8a858b328 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -156,7 +156,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // shape for shape cross beam - auto* hole_cbeam = new TGeoTube("hole_cbeam", radin_hole_cbeam, radout_hole_cbeam, high_hole_cbeam / 2); + TGeoShape* hole_cbeam = new TGeoTube("hole_cbeam", radin_hole_cbeam, radout_hole_cbeam, high_hole_cbeam / 2); /// composite shape for cross beam (using the same box of mb0) auto* c_cbeam_Shape = new TGeoCompositeShape("c_cbeam_Shape", "box_mb0 - hole_cbeam:combi_hole_1cbeam - hole_cbeam:combi_hole_2cbeam"); @@ -408,26 +408,26 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) ///...................................... ..... ///////// shape for base -- - auto* disc = new TGeoTubeSeg("disc", radin_disc, radout_disc, high_disc / 2, ang_in_disc, ang_fin_disc); + TGeoShape* disc = new TGeoTubeSeg("disc", radin_disc, radout_disc, high_disc / 2, ang_in_disc, ang_fin_disc); - auto* box1 = new TGeoBBox("box1", x_1box / 2, y_1box / 2, z_1box / 2); - auto* box2 = new TGeoBBox("box2", x_2box / 2, y_2box / 2, z_2box / 2); - auto* box3 = new TGeoBBox("box3", x_3box / 2, y_3box / 2, z_3box / 2); - auto* labox1 = new TGeoBBox("labox1", x_labox / 2, y_labox / 2, z_labox / 2); - auto* labox2 = new TGeoBBox("labox2", x_2labox / 2, y_2labox / 2, z_2labox / 2); - auto* cbox = new TGeoBBox("cbox", xc_box / 2, yc_box / 2, zc_box / 2); - auto* tongbox = new TGeoBBox("tongbox", x_tong / 2, y_tong / 2, z_tong / 2); + TGeoShape* box1 = new TGeoBBox("box1", x_1box / 2, y_1box / 2, z_1box / 2); + TGeoShape* box2 = new TGeoBBox("box2", x_2box / 2, y_2box / 2, z_2box / 2); + TGeoShape* box3 = new TGeoBBox("box3", x_3box / 2, y_3box / 2, z_3box / 2); + TGeoShape* labox1 = new TGeoBBox("labox1", x_labox / 2, y_labox / 2, z_labox / 2); + TGeoShape* labox2 = new TGeoBBox("labox2", x_2labox / 2, y_2labox / 2, z_2labox / 2); + TGeoShape* cbox = new TGeoBBox("cbox", xc_box / 2, yc_box / 2, zc_box / 2); + TGeoShape* tongbox = new TGeoBBox("tongbox", x_tong / 2, y_tong / 2, z_tong / 2); TGeoShape* seg_1hole = new TGeoTubeSeg("seg_1hole", radin_1hole, radout_1hole, high_1hole / 2, ang_in_1hole, ang_fin_1hole); //r_in,r_out,dZ,ang,ang TGeoShape* s_seg_2hole = new TGeoTubeSeg("seg_2hole", radin_2hole, radout_2hole, high_2hole / 2, ang_in_2hole, ang_fin_2hole); TGeoShape* seg_3hole = new TGeoTubeSeg("seg_3hole", radin_3hole, radout_3hole, high_3hole / 2, ang_in_3hole, ang_fin_3hole); // |u| TGeoShape* seg_bord = new TGeoTubeSeg("seg_bord", radin_bord, radout_bord, high_bord / 2, ang_in_bord, ang_fin_bord); - auto* circ_hole1 = new TGeoTube("circ_hole1", radin_hole1, radout_hole1, high_hole1 / 2); + TGeoShape* circ_hole1 = new TGeoTube("circ_hole1", radin_hole1, radout_hole1, high_hole1 / 2); - auto* circ_hole2 = new TGeoTube("circ_hole2", radin_hole2, radout_hole2, high_hole2 / 2); + TGeoShape* circ_hole2 = new TGeoTube("circ_hole2", radin_hole2, radout_hole2, high_hole2 / 2); - auto* circ_holeB = new TGeoTube("circ_holeB", radin_holeB, radout_holeB, high_holeB / 2); + TGeoShape* circ_holeB = new TGeoTube("circ_holeB", radin_holeB, radout_holeB, high_holeB / 2); //// composite shape for base ---- @@ -519,17 +519,17 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) ////////////////////////////////////////////////////// ///////// shape for midle - auto* midle_box = new TGeoBBox("midle_box", x_midle / 2, y_midle / 2, z_midle / 2); + TGeoShape* midle_box = new TGeoBBox("midle_box", x_midle / 2, y_midle / 2, z_midle / 2); - auto* midle_d1box = new TGeoBBox("midle_d1box", x_midle_d1box / 2, y_midle_d1box / 2, z_midle_d1box / 2); + TGeoShape* midle_d1box = new TGeoBBox("midle_d1box", x_midle_d1box / 2, y_midle_d1box / 2, z_midle_d1box / 2); - auto* midle_d2box = new TGeoBBox("midle_d2box", x_midle_d2box / 2, y_midle_d2box / 2, z_midle_d2box / 2); + TGeoShape* midle_d2box = new TGeoBBox("midle_d2box", x_midle_d2box / 2, y_midle_d2box / 2, z_midle_d2box / 2); - auto* arc_midle = new TGeoTubeSeg("arc_midle", radin_midle, radout_midle, high_midle / 2, ang_in_midle, ang_fin_midle); + TGeoShape* arc_midle = new TGeoTubeSeg("arc_midle", radin_midle, radout_midle, high_midle / 2, ang_in_midle, ang_fin_midle); - auto* mid_1tubhole = new TGeoTube("mid_1tubhole", radin_mid_1hole, radout_mid_1hole, high_mid_1hole / 2); + TGeoShape* mid_1tubhole = new TGeoTube("mid_1tubhole", radin_mid_1hole, radout_mid_1hole, high_mid_1hole / 2); - auto* mid_2tubhole = new TGeoTube("mid_2tubhole", radin_mid_2hole, radout_mid_2hole, high_mid_2hole / 2); + TGeoShape* mid_2tubhole = new TGeoTube("mid_2tubhole", radin_mid_2hole, radout_mid_2hole, high_mid_2hole / 2); //////////////////////////////////////////composite shape for midle @@ -667,9 +667,9 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_ir2_RL->RegisterYourself(); /////////////////////// shape for Rail L geom///////// - auto* RL_1box = new TGeoBBox("RL_1box", x_RL_1box / 2, y_RL_1box / 2, z_RL_1box / 2); - auto* RL_kneebox = new TGeoBBox("RL_kneebox", x_RL_kneebox / 2, y_RL_kneebox / 2, z_RL_kneebox / 2); //no_ used - auto* qdi_box = new TGeoBBox("qdi_box", x_qdi_box / 2, y_qdi_box / 2, z_qdi_box / 2); + auTGeoShape* RL_1box = new TGeoBBox("RL_1box", x_RL_1box / 2, y_RL_1box / 2, z_RL_1box / 2); + auTGeoShape* RL_kneebox = new TGeoBBox("RL_kneebox", x_RL_kneebox / 2, y_RL_kneebox / 2, z_RL_kneebox / 2); //no_ used + auTGeoShape* qdi_box = new TGeoBBox("qdi_box", x_qdi_box / 2, y_qdi_box / 2, z_qdi_box / 2); //E auto *s_RL1hole=new TGeoTube("S_RL1HOLE",radin_RL1hole,radout_RL1hole,high_RL1hole/2); //-auto *s_irL_hole=new TGeoTube("S_irL_HOLE",radin_ir_railL,radout_ir_railL,high_ir_railL/2); @@ -784,7 +784,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) tr_sr_r->RegisterYourself(); /////////////////////// shape for rail R //////// - auto* RR_1box = new TGeoBBox("RR_1box", x_RR_1box / 2, y_RR_1box / 2, z_RR_1box / 2); + TGeoShape* RR_1box = new TGeoBBox("RR_1box", x_RR_1box / 2, y_RR_1box / 2, z_RR_1box / 2); //E auto *s_qdi_Rbox =new TGeoBBox("S_QDI_RBOX", x_qdi_Rbox/2,y_qdi_Rbox/2,z_qdi_Rbox/2); @@ -895,10 +895,10 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_hup_mb->RegisterYourself(); /////////////////////// shape for rail MB ///////// - auto* mb_box = new TGeoBBox("mb_box", x_mb_box / 2, y_mb_box / 2, z_mb_box / 2); - auto* hole_1mbl = new TGeoTube("hole_1mbl", radin_1mb, radout_1mb, high_1mb / 2); //d3.5 - auto* hole_2mbl = new TGeoTube("hole_2mbl", radin_2mb, radout_2mb, high_2mb / 2); //d3 - auto* lat_box = new TGeoBBox("lat_box", x_lat_box / 2, y_lat_box / 2, z_lat_box / 2); + TGeoShape* mb_box = new TGeoBBox("mb_box", x_mb_box / 2, y_mb_box / 2, z_mb_box / 2); + TGeoShape* hole_1mbl = new TGeoTube("hole_1mbl", radin_1mb, radout_1mb, high_1mb / 2); //d3.5 + TGeoShape* hole_2mbl = new TGeoTube("hole_2mbl", radin_2mb, radout_2mb, high_2mb / 2); //d3 + TGeoShape* lat_box = new TGeoBBox("lat_box", x_lat_box / 2, y_lat_box / 2, z_lat_box / 2); ////////////////////// composite shape for rail_MB R + L ////////////////////// From 382b94ef77bec3a78df25342a0273030b26f94ac Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Sat, 9 Mar 2019 15:17:55 -0500 Subject: [PATCH 11/22] Update HalfCone.cxx Fixing 3 according Codacy/PR --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 479c8a858b328..2af72af7e626c 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -667,9 +667,9 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_ir2_RL->RegisterYourself(); /////////////////////// shape for Rail L geom///////// - auTGeoShape* RL_1box = new TGeoBBox("RL_1box", x_RL_1box / 2, y_RL_1box / 2, z_RL_1box / 2); - auTGeoShape* RL_kneebox = new TGeoBBox("RL_kneebox", x_RL_kneebox / 2, y_RL_kneebox / 2, z_RL_kneebox / 2); //no_ used - auTGeoShape* qdi_box = new TGeoBBox("qdi_box", x_qdi_box / 2, y_qdi_box / 2, z_qdi_box / 2); + TGeoShape* RL_1box = new TGeoBBox("RL_1box", x_RL_1box / 2, y_RL_1box / 2, z_RL_1box / 2); + TGeoShape* RL_kneebox = new TGeoBBox("RL_kneebox", x_RL_kneebox / 2, y_RL_kneebox / 2, z_RL_kneebox / 2); //no_ used + TGeoShape* qdi_box = new TGeoBBox("qdi_box", x_qdi_box / 2, y_qdi_box / 2, z_qdi_box / 2); //E auto *s_RL1hole=new TGeoTube("S_RL1HOLE",radin_RL1hole,radout_RL1hole,high_RL1hole/2); //-auto *s_irL_hole=new TGeoTube("S_irL_HOLE",radin_ir_railL,radout_ir_railL,high_ir_railL/2); From 384838fe541a7ea0d1d3169413ab25099836330b Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Sun, 10 Mar 2019 12:55:08 -0500 Subject: [PATCH 12/22] Update HalfCone.cxx changing name of some variables --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 2af72af7e626c..0b13e8e2f9344 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -82,14 +82,14 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto* Cross_mb0 = new TGeoVolumeAssembly("Cross_mb0"); // rectangular box - Double_t x_box_mb0 = 14.4; // dx= 7.2 cm - Double_t y_box_mb0 = 0.6; - Double_t z_box_mb0 = 0.6; + Double_t x_boxmb0 = 14.4; // dx= 7.2 cm + Double_t y_boxmb0 = 0.6; + Double_t z_boxmb0 = 0.6; ///// holes tub 1hole tranversal - Double_t radin_1hole_mb0 = 0.; - Double_t radout_1hole_mb0 = 0.175; // diameter 3.5 H9 (0.35cm) - Double_t high_1hole_mb0 = 0.7; /// + Double_t radin_1hmb0 = 0.; + Double_t radout_1hmb0 = 0.175; // diameter 3.5 H9 (0.35cm) + Double_t high_1hmb0 = 0.7; /// TGeoRotation* rot_1hole_mb0 = new TGeoRotation("rot_1hole_mb0", 0, 90, 0); rot_1hole_mb0->RegisterYourself(); @@ -102,9 +102,9 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) bcombi_1h_mb0->RegisterYourself(); ///// 2hole coaxial - Double_t radin_2hole_mb0 = 0.; - Double_t radout_2hole_mb0 = 0.15; // diameter M3 - Double_t high_2hole_mb0 = 1.2; /// 12 + Double_t radin_2hmb0 = 0.; + Double_t radout_2hmb0 = 0.15; // diameter M3 + Double_t high_2hmb0 = 1.2; /// 12 TGeoRotation* rot_2hole_mb0 = new TGeoRotation("rot_2hole_mb0", 90, 90, 0); rot_2hole_mb0->SetName("rot_2hole_mb0"); @@ -119,13 +119,13 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_2hole_mb0_b->RegisterYourself(); // shape for cross_mb0 - TGeoShape* box_mb0 = new TGeoBBox("box_mb0", x_box_mb0 / 2, y_box_mb0 / 2, z_box_mb0 / 2); - TGeoShape* hole1_mb0 = new TGeoTube("hole1_mb0", radin_1hole_mb0, radout_1hole_mb0, high_1hole_mb0 / 2); - TGeoShape* hole2_mb0 = new TGeoTube("hole2_mb0", radin_2hole_mb0, radout_2hole_mb0, high_2hole_mb0 / 2); + TGeoShape* box_mb0 = new TGeoBBox("box_mb0", x_boxmb0 / 2, y_boxmb0 / 2, z_boxmb0 / 2); + TGeoShape* hole1_mb0 = new TGeoTube("hole1_mb0", radin_1hmb0, radout_1hmb0, high_1hmb0 / 2); + TGeoShape* hole2_mb0 = new TGeoTube("hole2_mb0", radin_2hmb0, radout_2hmb0, high_2hmb0 / 2); ///composite shape for mb0 - auto* c_mb0_Shape_0 = new TGeoCompositeShape("c_mb0_Shape_0", "box_mb0 - hole1_mb0:acombi_1h_mb0 - hole1_mb0:bcombi_1h_mb0 - hole2_mb0:combi_2hole_mb0 - hole2_mb0:combi_2hole_mb0_b"); + auto* c_mb0_Shape_0 = new TGeoCompositeShape("c_mb0_Shape_0", "Box_Mb0 - hole1_mb0:acombi_1h_mb0 - hole1_mb0:bcombi_1h_mb0 - hole2_mb0:combi_2hole_mb0 - hole2_mb0:combi_2hole_mb0_b"); /////////////////// auto* cross_mb0_Volume = new TGeoVolume("cross_mb0_Volume", c_mb0_Shape_0, kMedAlu); From 73e594f0311380e8a5c6cfb62a1421038c47ac0f Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Sun, 10 Mar 2019 13:06:05 -0500 Subject: [PATCH 13/22] Update HalfCone.cxx changing names of some variables 2 --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 0b13e8e2f9344..d758aed43de4c 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -119,7 +119,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_2hole_mb0_b->RegisterYourself(); // shape for cross_mb0 - TGeoShape* box_mb0 = new TGeoBBox("box_mb0", x_boxmb0 / 2, y_boxmb0 / 2, z_boxmb0 / 2); + TGeoShape* box_mb0 = new TGeoBBox("Box_mb0", x_boxmb0 / 2, y_boxmb0 / 2, z_boxmb0 / 2); TGeoShape* hole1_mb0 = new TGeoTube("hole1_mb0", radin_1hmb0, radout_1hmb0, high_1hmb0 / 2); TGeoShape* hole2_mb0 = new TGeoTube("hole2_mb0", radin_2hmb0, radout_2hmb0, high_2hmb0 / 2); From 8f8dc36dc9e2ef1377ecc715227082e26a47b7f4 Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Sun, 10 Mar 2019 20:08:44 -0500 Subject: [PATCH 14/22] Update HalfCone.cxx fixing point name 1v --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index d758aed43de4c..5c99f201401b2 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -119,13 +119,13 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_2hole_mb0_b->RegisterYourself(); // shape for cross_mb0 - TGeoShape* box_mb0 = new TGeoBBox("Box_mb0", x_boxmb0 / 2, y_boxmb0 / 2, z_boxmb0 / 2); - TGeoShape* hole1_mb0 = new TGeoTube("hole1_mb0", radin_1hmb0, radout_1hmb0, high_1hmb0 / 2); + TGeoShape* Box_mb0 = new TGeoBBox("Box_mb0", x_boxmb0 / 2, y_boxmb0 / 2, z_boxmb0 / 2); + TGeoShape* Hole1_mb0 = new TGeoTube("hole1_mb0", radin_1hmb0, radout_1hmb0, high_1hmb0 / 2); TGeoShape* hole2_mb0 = new TGeoTube("hole2_mb0", radin_2hmb0, radout_2hmb0, high_2hmb0 / 2); ///composite shape for mb0 - auto* c_mb0_Shape_0 = new TGeoCompositeShape("c_mb0_Shape_0", "Box_Mb0 - hole1_mb0:acombi_1h_mb0 - hole1_mb0:bcombi_1h_mb0 - hole2_mb0:combi_2hole_mb0 - hole2_mb0:combi_2hole_mb0_b"); + auto* c_mb0_Shape_0 = new TGeoCompositeShape("c_mb0_Shape_0", "Box_mb0 - Hole1_mb0:acombi_1h_mb0 - Hole1_mb0:bcombi_1h_mb0 - hole2_mb0:combi_2hole_mb0 - hole2_mb0:combi_2hole_mb0_b"); /////////////////// auto* cross_mb0_Volume = new TGeoVolume("cross_mb0_Volume", c_mb0_Shape_0, kMedAlu); @@ -159,7 +159,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoShape* hole_cbeam = new TGeoTube("hole_cbeam", radin_hole_cbeam, radout_hole_cbeam, high_hole_cbeam / 2); /// composite shape for cross beam (using the same box of mb0) - auto* c_cbeam_Shape = new TGeoCompositeShape("c_cbeam_Shape", "box_mb0 - hole_cbeam:combi_hole_1cbeam - hole_cbeam:combi_hole_2cbeam"); + auto* c_cbeam_Shape = new TGeoCompositeShape("c_cbeam_Shape", "Box_mb0 - hole_cbeam:combi_hole_1cbeam - hole_cbeam:combi_hole_2cbeam"); /////////////////// auto* Cross_mft_Volume = new TGeoVolume("Cross_mft_Volume", c_cbeam_Shape, kMedAlu); From 4d83fb447884f7ad37c931c646c872c14b670661 Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Tue, 12 Mar 2019 14:34:24 -0500 Subject: [PATCH 15/22] Update HalfCone.cxx changing 1 volume name --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 5c99f201401b2..1a5d057df992b 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -119,13 +119,13 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_2hole_mb0_b->RegisterYourself(); // shape for cross_mb0 - TGeoShape* Box_mb0 = new TGeoBBox("Box_mb0", x_boxmb0 / 2, y_boxmb0 / 2, z_boxmb0 / 2); - TGeoShape* Hole1_mb0 = new TGeoTube("hole1_mb0", radin_1hmb0, radout_1hmb0, high_1hmb0 / 2); + TGeoShape* box_mb0 = new TGeoBBox("S_BOX_MB0", x_boxmb0 / 2, y_boxmb0 / 2, z_boxmb0 / 2); + TGeoShape* hole1_mb0 = new TGeoTube("hole1_MB0", radin_1hmb0, radout_1hmb0, high_1hmb0 / 2); TGeoShape* hole2_mb0 = new TGeoTube("hole2_mb0", radin_2hmb0, radout_2hmb0, high_2hmb0 / 2); ///composite shape for mb0 - auto* c_mb0_Shape_0 = new TGeoCompositeShape("c_mb0_Shape_0", "Box_mb0 - Hole1_mb0:acombi_1h_mb0 - Hole1_mb0:bcombi_1h_mb0 - hole2_mb0:combi_2hole_mb0 - hole2_mb0:combi_2hole_mb0_b"); + auto* c_mb0_Shape_0 = new TGeoCompositeShape("c_mb0_Shape_0", "box_mb0 - hole1_mb0:acombi_1h_mb0 - hole1_mb0:bcombi_1h_mb0 - hole2_mb0:combi_2hole_mb0 - hole2_mb0:combi_2hole_mb0_b"); /////////////////// auto* cross_mb0_Volume = new TGeoVolume("cross_mb0_Volume", c_mb0_Shape_0, kMedAlu); @@ -159,7 +159,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoShape* hole_cbeam = new TGeoTube("hole_cbeam", radin_hole_cbeam, radout_hole_cbeam, high_hole_cbeam / 2); /// composite shape for cross beam (using the same box of mb0) - auto* c_cbeam_Shape = new TGeoCompositeShape("c_cbeam_Shape", "Box_mb0 - hole_cbeam:combi_hole_1cbeam - hole_cbeam:combi_hole_2cbeam"); + auto* c_cbeam_Shape = new TGeoCompositeShape("c_cbeam_Shape", "box_mb0 - hole_cbeam:combi_hole_1cbeam - hole_cbeam:combi_hole_2cbeam"); /////////////////// auto* Cross_mft_Volume = new TGeoVolume("Cross_mft_Volume", c_cbeam_Shape, kMedAlu); From 52d31a0812d39eda456d6574c47469f5fc1bdc97 Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Tue, 12 Mar 2019 15:44:35 -0500 Subject: [PATCH 16/22] Update HalfCone.cxx changing 2 volume name --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 1a5d057df992b..2bbf83f68551e 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -119,8 +119,8 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_2hole_mb0_b->RegisterYourself(); // shape for cross_mb0 - TGeoShape* box_mb0 = new TGeoBBox("S_BOX_MB0", x_boxmb0 / 2, y_boxmb0 / 2, z_boxmb0 / 2); - TGeoShape* hole1_mb0 = new TGeoTube("hole1_MB0", radin_1hmb0, radout_1hmb0, high_1hmb0 / 2); + TGeoShape* box_mb0 = new TGeoBBox("box_mb0", x_boxmb0 / 2, y_boxmb0 / 2, z_boxmb0 / 2); + TGeoShape* hole1_mb0 = new TGeoTube("hole1_mb0", radin_1hmb0, radout_1hmb0, high_1hmb0 / 2); TGeoShape* hole2_mb0 = new TGeoTube("hole2_mb0", radin_2hmb0, radout_2hmb0, high_2hmb0 / 2); ///composite shape for mb0 From e9e1b582100be1e6398ec2183bc2ab10ad74ca6a Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Wed, 13 Mar 2019 12:39:53 -0500 Subject: [PATCH 17/22] Update HalfCone.cxx Removing the point name to use volume name in the boolean operations --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 89 +++++++++++----------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 2bbf83f68551e..65fa6147ea988 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -13,7 +13,7 @@ /// \author sbest@pucp.pe, eric.endress@gmx.de, franck.manso@clermont.in2p3.fr /// Carlos csoncco@pucp.edu.pe -/// \date 09/03/2019 +/// \date 13/03/2019 #include "TGeoManager.h" #include "TGeoMatrix.h" @@ -52,7 +52,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto* HalfConeVolume = new TGeoVolumeAssembly("HalfConeVolume"); TGeoMedium* kMedAlu = gGeoManager->GetMedium("MFT_Alu$"); - + /////Rotation //// TGeoRotation* rot1 = new TGeoRotation("rot1", 180, -180, 0); @@ -118,10 +118,11 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_2hole_mb0_b->SetName("combi_2hole_mb0_b"); combi_2hole_mb0_b->RegisterYourself(); - // shape for cross_mb0 - TGeoShape* box_mb0 = new TGeoBBox("box_mb0", x_boxmb0 / 2, y_boxmb0 / 2, z_boxmb0 / 2); - TGeoShape* hole1_mb0 = new TGeoTube("hole1_mb0", radin_1hmb0, radout_1hmb0, high_1hmb0 / 2); - TGeoShape* hole2_mb0 = new TGeoTube("hole2_mb0", radin_2hmb0, radout_2hmb0, high_2hmb0 / 2); + // shape for cross_mb0.. + //TGeoShape* box_mb0 = new TGeoBBox("s_box_mb0", x_boxmb0 / 2, y_boxmb0 / 2, z_boxmb0 / 2); + new TGeoBBox("box_mb0", x_boxmb0 / 2, y_boxmb0 / 2, z_boxmb0 / 2); + new TGeoTube("hole1_mb0", radin_1hmb0, radout_1hmb0, high_1hmb0 / 2); + new TGeoTube("hole2_mb0", radin_2hmb0, radout_2hmb0, high_2hmb0 / 2); ///composite shape for mb0 @@ -156,7 +157,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // shape for shape cross beam - TGeoShape* hole_cbeam = new TGeoTube("hole_cbeam", radin_hole_cbeam, radout_hole_cbeam, high_hole_cbeam / 2); + new TGeoTube("hole_cbeam", radin_hole_cbeam, radout_hole_cbeam, high_hole_cbeam / 2); /// composite shape for cross beam (using the same box of mb0) auto* c_cbeam_Shape = new TGeoCompositeShape("c_cbeam_Shape", "box_mb0 - hole_cbeam:combi_hole_1cbeam - hole_cbeam:combi_hole_2cbeam"); @@ -224,16 +225,16 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) /////// shape for framewor front - TGeoShape* box_up = new TGeoBBox("box_up", x_box_up / 2, y_box_up / 2, z_box_up / 2); + new TGeoBBox("box_up", x_box_up / 2, y_box_up / 2, z_box_up / 2); - TGeoShape* tub_up = new TGeoTube("tub_up", 0., dia_tub_up / 2, high_tub_up / 2); // - TGeoShape* seg_tub = new TGeoTubeSeg("seg_tub", radin_segtub, radout_segtub, high_segtub / 2, ang_in_segtub, ang_fin_segtub); + new TGeoTube("tub_up", 0., dia_tub_up / 2, high_tub_up / 2); // + new TGeoTubeSeg("seg_tub", radin_segtub, radout_segtub, high_segtub / 2, ang_in_segtub, ang_fin_segtub); - TGeoShape* boxB_down = new TGeoBBox("boxB_down", x_boxB_down / 2, y_boxB_down / 2, z_boxB_down / 2); + new TGeoBBox("boxB_down", x_boxB_down / 2, y_boxB_down / 2, z_boxB_down / 2); - TGeoShape* boxA_down = new TGeoBBox("boxA_down", x_boxA_down / 2, y_boxA_down / 2, z_boxA_down / 2); + new TGeoBBox("boxA_down", x_boxA_down / 2, y_boxA_down / 2, z_boxA_down / 2); - TGeoShape* tubdown = new TGeoTube("tubdown", 0., dia_tubdown / 2, high_tubdown / 2); + new TGeoTube("tubdown", 0., dia_tubdown / 2, high_tubdown / 2); //Composite shapes for Fra_front auto* fra_front_Shape_0 = new TGeoCompositeShape("fra_front_Shape_0", "box_up:tr1_up + seg_tub:combi_3b + boxB_down:tr3_box + boxA_down:tr_2_box"); @@ -408,26 +409,26 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) ///...................................... ..... ///////// shape for base -- - TGeoShape* disc = new TGeoTubeSeg("disc", radin_disc, radout_disc, high_disc / 2, ang_in_disc, ang_fin_disc); + new TGeoTubeSeg("disc", radin_disc, radout_disc, high_disc / 2, ang_in_disc, ang_fin_disc); - TGeoShape* box1 = new TGeoBBox("box1", x_1box / 2, y_1box / 2, z_1box / 2); - TGeoShape* box2 = new TGeoBBox("box2", x_2box / 2, y_2box / 2, z_2box / 2); - TGeoShape* box3 = new TGeoBBox("box3", x_3box / 2, y_3box / 2, z_3box / 2); - TGeoShape* labox1 = new TGeoBBox("labox1", x_labox / 2, y_labox / 2, z_labox / 2); - TGeoShape* labox2 = new TGeoBBox("labox2", x_2labox / 2, y_2labox / 2, z_2labox / 2); - TGeoShape* cbox = new TGeoBBox("cbox", xc_box / 2, yc_box / 2, zc_box / 2); - TGeoShape* tongbox = new TGeoBBox("tongbox", x_tong / 2, y_tong / 2, z_tong / 2); + new TGeoBBox("box1", x_1box / 2, y_1box / 2, z_1box / 2); + new TGeoBBox("box2", x_2box / 2, y_2box / 2, z_2box / 2); + new TGeoBBox("box3", x_3box / 2, y_3box / 2, z_3box / 2); + new TGeoBBox("labox1", x_labox / 2, y_labox / 2, z_labox / 2); + new TGeoBBox("labox2", x_2labox / 2, y_2labox / 2, z_2labox / 2); + new TGeoBBox("cbox", xc_box / 2, yc_box / 2, zc_box / 2); + new TGeoBBox("tongbox", x_tong / 2, y_tong / 2, z_tong / 2); - TGeoShape* seg_1hole = new TGeoTubeSeg("seg_1hole", radin_1hole, radout_1hole, high_1hole / 2, ang_in_1hole, ang_fin_1hole); //r_in,r_out,dZ,ang,ang - TGeoShape* s_seg_2hole = new TGeoTubeSeg("seg_2hole", radin_2hole, radout_2hole, high_2hole / 2, ang_in_2hole, ang_fin_2hole); - TGeoShape* seg_3hole = new TGeoTubeSeg("seg_3hole", radin_3hole, radout_3hole, high_3hole / 2, ang_in_3hole, ang_fin_3hole); // |u| - TGeoShape* seg_bord = new TGeoTubeSeg("seg_bord", radin_bord, radout_bord, high_bord / 2, ang_in_bord, ang_fin_bord); + new TGeoTubeSeg("seg_1hole", radin_1hole, radout_1hole, high_1hole / 2, ang_in_1hole, ang_fin_1hole); //r_in,r_out,dZ,ang,ang + new TGeoTubeSeg("seg_2hole", radin_2hole, radout_2hole, high_2hole / 2, ang_in_2hole, ang_fin_2hole); + new TGeoTubeSeg("seg_3hole", radin_3hole, radout_3hole, high_3hole / 2, ang_in_3hole, ang_fin_3hole); // |u| + new TGeoTubeSeg("seg_bord", radin_bord, radout_bord, high_bord / 2, ang_in_bord, ang_fin_bord); - TGeoShape* circ_hole1 = new TGeoTube("circ_hole1", radin_hole1, radout_hole1, high_hole1 / 2); + new TGeoTube("circ_hole1", radin_hole1, radout_hole1, high_hole1 / 2); - TGeoShape* circ_hole2 = new TGeoTube("circ_hole2", radin_hole2, radout_hole2, high_hole2 / 2); + new TGeoTube("circ_hole2", radin_hole2, radout_hole2, high_hole2 / 2); - TGeoShape* circ_holeB = new TGeoTube("circ_holeB", radin_holeB, radout_holeB, high_holeB / 2); + new TGeoTube("circ_holeB", radin_holeB, radout_holeB, high_holeB / 2); //// composite shape for base ---- @@ -519,17 +520,17 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) ////////////////////////////////////////////////////// ///////// shape for midle - TGeoShape* midle_box = new TGeoBBox("midle_box", x_midle / 2, y_midle / 2, z_midle / 2); + new TGeoBBox("midle_box", x_midle / 2, y_midle / 2, z_midle / 2); - TGeoShape* midle_d1box = new TGeoBBox("midle_d1box", x_midle_d1box / 2, y_midle_d1box / 2, z_midle_d1box / 2); + new TGeoBBox("midle_d1box", x_midle_d1box / 2, y_midle_d1box / 2, z_midle_d1box / 2); - TGeoShape* midle_d2box = new TGeoBBox("midle_d2box", x_midle_d2box / 2, y_midle_d2box / 2, z_midle_d2box / 2); + new TGeoBBox("midle_d2box", x_midle_d2box / 2, y_midle_d2box / 2, z_midle_d2box / 2); - TGeoShape* arc_midle = new TGeoTubeSeg("arc_midle", radin_midle, radout_midle, high_midle / 2, ang_in_midle, ang_fin_midle); + new TGeoTubeSeg("arc_midle", radin_midle, radout_midle, high_midle / 2, ang_in_midle, ang_fin_midle); - TGeoShape* mid_1tubhole = new TGeoTube("mid_1tubhole", radin_mid_1hole, radout_mid_1hole, high_mid_1hole / 2); + new TGeoTube("mid_1tubhole", radin_mid_1hole, radout_mid_1hole, high_mid_1hole / 2); - TGeoShape* mid_2tubhole = new TGeoTube("mid_2tubhole", radin_mid_2hole, radout_mid_2hole, high_mid_2hole / 2); + new TGeoTube("mid_2tubhole", radin_mid_2hole, radout_mid_2hole, high_mid_2hole / 2); //////////////////////////////////////////composite shape for midle @@ -626,7 +627,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) ////////////// knee small TGeoXtru* xtru3_RL = new TGeoXtru(2); - xtru3_RL->SetName("S_XTRU3_RL"); + xtru3_RL->SetName("xtru3_RL"); Double_t x_3RL[6] = { -0.75, 0.75, 0.75, 2.6487, 1.4997, -0.75 }; //vertices Double_t y_3RL[6] = { -1.75, -1.75, 1.203, 3.465, 4.4311, 1.75 }; @@ -667,16 +668,16 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_ir2_RL->RegisterYourself(); /////////////////////// shape for Rail L geom///////// - TGeoShape* RL_1box = new TGeoBBox("RL_1box", x_RL_1box / 2, y_RL_1box / 2, z_RL_1box / 2); - TGeoShape* RL_kneebox = new TGeoBBox("RL_kneebox", x_RL_kneebox / 2, y_RL_kneebox / 2, z_RL_kneebox / 2); //no_ used - TGeoShape* qdi_box = new TGeoBBox("qdi_box", x_qdi_box / 2, y_qdi_box / 2, z_qdi_box / 2); + new TGeoBBox("RL_1box", x_RL_1box / 2, y_RL_1box / 2, z_RL_1box / 2); + new TGeoBBox("RL_kneebox", x_RL_kneebox / 2, y_RL_kneebox / 2, z_RL_kneebox / 2); //no_ used + new TGeoBBox("qdi_box", x_qdi_box / 2, y_qdi_box / 2, z_qdi_box / 2); //E auto *s_RL1hole=new TGeoTube("S_RL1HOLE",radin_RL1hole,radout_RL1hole,high_RL1hole/2); //-auto *s_irL_hole=new TGeoTube("S_irL_HOLE",radin_ir_railL,radout_ir_railL,high_ir_railL/2); ////////////////////// composite shape for rail L ////////////////////// - auto* RL_Shape_0 = new TGeoCompositeShape("RL_Shape_0", " S_XTRU3_RL:tr_vol3_RL + S_XTRU_RL1 + S_XTRU_RL2 + RL_1box:tr_RL_1box - qdi_box:combi_qdi"); // + auto* RL_Shape_0 = new TGeoCompositeShape("RL_Shape_0", " xtru3_RL:tr_vol3_RL + S_XTRU_RL1 + S_XTRU_RL2 + RL_1box:tr_RL_1box - qdi_box:combi_qdi"); // //////////////////////////////////////-------//////// @@ -784,7 +785,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) tr_sr_r->RegisterYourself(); /////////////////////// shape for rail R //////// - TGeoShape* RR_1box = new TGeoBBox("RR_1box", x_RR_1box / 2, y_RR_1box / 2, z_RR_1box / 2); + new TGeoBBox("RR_1box", x_RR_1box / 2, y_RR_1box / 2, z_RR_1box / 2); //E auto *s_qdi_Rbox =new TGeoBBox("S_QDI_RBOX", x_qdi_Rbox/2,y_qdi_Rbox/2,z_qdi_Rbox/2); @@ -895,10 +896,10 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_hup_mb->RegisterYourself(); /////////////////////// shape for rail MB ///////// - TGeoShape* mb_box = new TGeoBBox("mb_box", x_mb_box / 2, y_mb_box / 2, z_mb_box / 2); - TGeoShape* hole_1mbl = new TGeoTube("hole_1mbl", radin_1mb, radout_1mb, high_1mb / 2); //d3.5 - TGeoShape* hole_2mbl = new TGeoTube("hole_2mbl", radin_2mb, radout_2mb, high_2mb / 2); //d3 - TGeoShape* lat_box = new TGeoBBox("lat_box", x_lat_box / 2, y_lat_box / 2, z_lat_box / 2); + new TGeoBBox("mb_box", x_mb_box / 2, y_mb_box / 2, z_mb_box / 2); + new TGeoTube("hole_1mbl", radin_1mb, radout_1mb, high_1mb / 2); //d3.5 + new TGeoTube("hole_2mbl", radin_2mb, radout_2mb, high_2mb / 2); //d3 + new TGeoBBox("lat_box", x_lat_box / 2, y_lat_box / 2, z_lat_box / 2); ////////////////////// composite shape for rail_MB R + L ////////////////////// From 14dc7474256e0e5e88f66bb5dd413b89c7d56b77 Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Wed, 13 Mar 2019 19:00:30 -0500 Subject: [PATCH 18/22] Update HalfCone.cxx removing point names 2 --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 65fa6147ea988..6ebb929d83bb6 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -237,7 +237,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) new TGeoTube("tubdown", 0., dia_tubdown / 2, high_tubdown / 2); //Composite shapes for Fra_front - auto* fra_front_Shape_0 = new TGeoCompositeShape("fra_front_Shape_0", "box_up:tr1_up + seg_tub:combi_3b + boxB_down:tr3_box + boxA_down:tr_2_box"); + new TGeoCompositeShape("fra_front_Shape_0", "box_up:tr1_up + seg_tub:combi_3b + boxB_down:tr3_box + boxA_down:tr_2_box"); auto* fra_front_Shape_1 = new TGeoCompositeShape("fra_front_Shape_1", "fra_front_Shape_0 - tubdown:tr_tubdown - tub_up:combi_3a"); @@ -432,12 +432,12 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) //// composite shape for base ---- - auto* base_Shape_0 = new TGeoCompositeShape("base_Shape_0", " disc -box1 - box2 - box3 - circ_holeB:tr1_holeB - circ_holeB:tr2_holeB"); - auto* base_Shape_1 = new TGeoCompositeShape("base_Shape_1", "(seg_1hole - seg_bord:combi_bord1 - seg_bord:combi2_bord1) + seg_2hole -seg_bord:combi1_bord2 + cbox:tr_cbox"); + new TGeoCompositeShape("base_Shape_0", " disc -box1 - box2 - box3 - circ_holeB:tr1_holeB - circ_holeB:tr2_holeB"); + new TGeoCompositeShape("base_Shape_1", "(seg_1hole - seg_bord:combi_bord1 - seg_bord:combi2_bord1) + seg_2hole -seg_bord:combi1_bord2 + cbox:tr_cbox"); - auto* base_Shape_2 = new TGeoCompositeShape("base_Shape_2", " seg_3hole + seg_bord:combi_cent_bord"); //-seg_bord:combi_cent_bord + new TGeoCompositeShape("base_Shape_2", " seg_3hole + seg_bord:combi_cent_bord"); //-seg_bord:combi_cent_bord - auto* base_Shape_3 = new TGeoCompositeShape("base_Shape_3", " labox1:tr_la + labox2:tr_2la "); + new TGeoCompositeShape("base_Shape_3", " labox1:tr_la + labox2:tr_2la "); auto* base_Shape_4 = new TGeoCompositeShape("base_Shape_4", "base_Shape_0 - base_Shape_1 - base_Shape_1:rot1 + base_Shape_2 + tongbox:tr_tong - circ_hole1:tr_hole1 - circ_hole1:tr2_hole1 - circ_hole1:tr3_hole1 - circ_hole2:tr1_hole2 - circ_hole2:tr2_hole2 - base_Shape_3 "); @@ -534,7 +534,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) //////////////////////////////////////////composite shape for midle - auto* midle_Shape_0 = new TGeoCompositeShape("midle_Shape_0", " arc_midle + midle_box:tr1_midle_box - midle_box:tr2_midle_box -midle_d1box:tr_midle_d1box - midle_d2box:tr_midle_d2box"); + new TGeoCompositeShape("midle_Shape_0", " arc_midle + midle_box:tr1_midle_box - midle_box:tr2_midle_box -midle_d1box:tr_midle_d1box - midle_d2box:tr_midle_d2box"); auto* midle_Shape_1 = new TGeoCompositeShape("midle_Shape_1", " midle_Shape_0 -mid_1tubhole:combi_mid_1tubhole-mid_2tubhole:combi_mid_2tubhole"); @@ -794,7 +794,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) //E auto *s_cc_hole=new TGeoTube("S_CC_HOLE",radin_cc_rail,radout_cc_rail,high_cc_rail/2); ////////////////////// composite shape for rail R ////////////////////// - auto* RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0", "RR_1box:tr_RR_1box + part_RR1 + part_RR2 + part_RR3 - qdi_box:combi_qdi "); + new TGeoCompositeShape("RR_Shape_0", "RR_1box:tr_RR_1box + part_RR1 + part_RR2 + part_RR3 - qdi_box:combi_qdi "); //-auto * RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0","RR_1box:tr_RR_1box+ S_part_RR1 + part_RR2 +part_RR3- qdi_box:combi_qdi + S_ir_HOLE:combi_ir_RR +S_ir_HOLE:combi_ir2_RR "); //-RR_1box:tr_RL_1box- S_b_HOLE:tr_b_RR -S_CC_HOLE:combi_cc2_RR @@ -904,15 +904,15 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) ////////////////////// composite shape for rail_MB R + L ////////////////////// // auto * MB_Shape_0 = new TGeoCompositeShape("MB_Shape_0"," V_MBL_0 - mb_box:tr_mb_box - hole_1mbl:tr1_mb + hole_1mbl:tr2_mb -hole_2mbl:combi_hup_mb "); - auto* MB_Shape_0 = new TGeoCompositeShape("MB_Shape_0", "part_MBL_0 - mb_box:tr_mb_box - hole_1mbl:tr1_mb - hole_2mbl:combi_hup_mb "); + new TGeoCompositeShape("MB_Shape_0", "part_MBL_0 - mb_box:tr_mb_box - hole_1mbl:tr1_mb - hole_2mbl:combi_hup_mb "); - auto* MB_Shape_0L = new TGeoCompositeShape("MB_Shape_0L", "MB_Shape_0 - lat_box:tr_lat1L_box - lat_box:tr_lat2L_box - lat_box:tr_lat3L_box - lat_box:tr_lat4L_box - lat_box:tr_lat5L_box"); + new TGeoCompositeShape("MB_Shape_0L", "MB_Shape_0 - lat_box:tr_lat1L_box - lat_box:tr_lat2L_box - lat_box:tr_lat3L_box - lat_box:tr_lat4L_box - lat_box:tr_lat5L_box"); - auto* MB_Shape_0R = new TGeoCompositeShape("MB_Shape_0R", "MB_Shape_0 - lat_box:tr_lat1R_box - lat_box:tr_lat2R_box - lat_box:tr_lat3R_box - lat_box:tr_lat4R_box - lat_box:tr_lat5R_box"); + new TGeoCompositeShape("MB_Shape_0R", "MB_Shape_0 - lat_box:tr_lat1R_box - lat_box:tr_lat2R_box - lat_box:tr_lat3R_box - lat_box:tr_lat4R_box - lat_box:tr_lat5R_box"); - auto* MB_Shape_1L = new TGeoCompositeShape("MB_Shape_1L", "MB_Shape_0L:rot1_MBL_0 - hole_2mbl"); // one piece "completed" + new TGeoCompositeShape("MB_Shape_1L", "MB_Shape_0L:rot1_MBL_0 - hole_2mbl"); // one piece "completed" // left and right--> - auto* MB_Shape_1R = new TGeoCompositeShape("MB_Shape_1R", "MB_Shape_0R:rot1_MBL_0 - hole_2mbl"); + new TGeoCompositeShape("MB_Shape_1R", "MB_Shape_0R:rot1_MBL_0 - hole_2mbl"); auto* MB_Shape_2 = new TGeoCompositeShape("MB_Shape_2", " MB_Shape_1L:tr_mbl + MB_Shape_1R:tr_mbr "); @@ -1006,7 +1006,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // Basic shapes for Half_3 TGeoShape* Shell_0 = new TGeoTubeSeg("Shell_0", Shell_rmax / 2. - .1, Shell_rmax / 2., 6.2 / 2., 12., 168.); TGeoShape* Shell_1 = new TGeoTubeSeg("Shell_1", Shell_rmin / 2. - .1, Shell_rmin / 2., 3.2 / 2., 0., 180.); - TGeoShape* Shell_2 = new TGeoConeSeg("Shell_2", (25.15 + 1.0) / 2., Shell_rmin / 2. - .1, Shell_rmin / 2., Shell_rmax / 2. - .1, Shell_rmax / 2., 0., 180.); + new TGeoConeSeg("Shell_2", (25.15 + 1.0) / 2., Shell_rmin / 2. - .1, Shell_rmin / 2., Shell_rmax / 2. - .1, Shell_rmax / 2., 0., 180.); TGeoShape* Shell_3 = new TGeoTube("Shell_3", 0., Shell_rmin / 2. + .1, .1 / 2.); TGeoShape* ShellHole_0 = new TGeoTrd1("ShellHole_0", 17.5 / 4., 42.5 / 4., 80. / 2., (25.15 + 1.) / 2.); TGeoShape* ShellHole_1 = new TGeoBBox("ShellHole_1", 42.5 / 4., 80. / 2., 2. / 2. + 0.00001); @@ -1019,9 +1019,9 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // Composite shapes for Half_3 auto* Half_3_Shape_0 = new TGeoCompositeShape("Half_3_Shape_0", "Shell_Cut_0+Shell_Cut_1:tShell_Cut"); - auto* Half_3_Shape_1 = new TGeoCompositeShape("Half_3_Shape_1", "Shell_2-Half_3_Shape_0:cShell_Cut-Half_3_Shape_0:cShell_Cut_inv"); + new TGeoCompositeShape("Half_3_Shape_1", "Shell_2-Half_3_Shape_0:cShell_Cut-Half_3_Shape_0:cShell_Cut_inv"); auto* Half_3_Shape_2 = new TGeoCompositeShape("Half_3_Shape_2", "ShellHole_0+ShellHole_1:tShellHole"); - auto* Half_3_Shape_3 = new TGeoCompositeShape("Half_3_Shape_3", "Shell_3:tShellHole_1 -(ShellHole_2:tShellHole_1 + ShellHole_3:tShellHole_0)"); + new TGeoCompositeShape("Half_3_Shape_3", "Shell_3:tShellHole_1 -(ShellHole_2:tShellHole_1 + ShellHole_3:tShellHole_0)"); auto* Half_3_Shape_4 = new TGeoCompositeShape("Half_3_Shape_4", "(Shell_0:tShell_0 + Half_3_Shape_1+ Shell_1:tShell_1) - (Half_3_Shape_2 + " "Half_3_Shape_2:Rz + Half_3_Shape_2:Rz_inv)+Half_3_Shape_3"); From 94424d22631414df96b922d26a95d32d919fc999 Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Thu, 14 Mar 2019 13:05:54 -0500 Subject: [PATCH 19/22] Update HalfCone.cxx removing unnecessary lines --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 6ebb929d83bb6..8e9026640ed43 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -11,8 +11,7 @@ /// \file HalfCone.cxx /// \brief Class building geometry of one half of one MFT half-cone /// \author sbest@pucp.pe, eric.endress@gmx.de, franck.manso@clermont.in2p3.fr - -/// Carlos csoncco@pucp.edu.pe +/// \Carlos csoncco@pucp.edu.pe /// \date 13/03/2019 #include "TGeoManager.h" @@ -48,14 +47,11 @@ HalfCone::~HalfCone() = default; //_____________________________________________________________________________ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) { - auto* HalfConeVolume = new TGeoVolumeAssembly("HalfConeVolume"); TGeoMedium* kMedAlu = gGeoManager->GetMedium("MFT_Alu$"); - /////Rotation //// TGeoRotation* rot1 = new TGeoRotation("rot1", 180, -180, 0); - rot1->RegisterYourself(); TGeoRotation* rot2 = new TGeoRotation("rot2", 90, -90, 0); rot2->RegisterYourself(); @@ -1048,9 +1044,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) HalfConeVolume->AddNode(Fra_front, 4, c_final); HalfConeVolume->AddNode(midle, 5, c_final); // HalfConeVolume->AddNode(Half_3, 6, c_final); - /// HalfConeVolume->AddNode(Half_3,8, new TGeoCombiTrans(0,0,0-0.5,rot_halfR)); //-0.675 - - //////////// + //// HalfConeVolume->AddNode(Half_3,8, new TGeoCombiTrans(0,0,0-0.5,rot_halfR)); //-0.675 return HalfConeVolume; } From 4317833bdcdc24522444c94e3335d82b16ccf825 Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Thu, 14 Mar 2019 22:09:09 -0500 Subject: [PATCH 20/22] Update HalfCone.cxx removing unnecessary comments --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 546 ++++++++++----------- 1 file changed, 251 insertions(+), 295 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 8e9026640ed43..99e4e51c8a078 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -50,7 +50,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto* HalfConeVolume = new TGeoVolumeAssembly("HalfConeVolume"); TGeoMedium* kMedAlu = gGeoManager->GetMedium("MFT_Alu$"); - /////Rotation //// + // Rotation TGeoRotation* rot1 = new TGeoRotation("rot1", 180, -180, 0); rot1->RegisterYourself(); TGeoRotation* rot2 = new TGeoRotation("rot2", 90, -90, 0); @@ -65,7 +65,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoRotation* rot_base = new TGeoRotation("rot_base", 180, 180, 0); // rail_r rot_base->RegisterYourself(); - TGeoCombiTrans* combi1 = new TGeoCombiTrans(0, -10.3, 1.29, rot1); //y=-10.80 belt + TGeoCombiTrans* combi1 = new TGeoCombiTrans(0, -10.3, 1.29, rot1); // y=-10.80 belt combi1->RegisterYourself(); TGeoCombiTrans* combi2 = new TGeoCombiTrans(-16.8, 0., 0., rot2); combi2->RegisterYourself(); @@ -73,8 +73,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoRotation* r0 = new TGeoRotation("r0", 10., 0., 0.); r0->RegisterYourself(); - ///// 1st piece --------- Cross_beam_MB0----------------------/// - + // 1st piece Cross_beam_MB0 auto* Cross_mb0 = new TGeoVolumeAssembly("Cross_mb0"); // rectangular box @@ -82,25 +81,25 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) Double_t y_boxmb0 = 0.6; Double_t z_boxmb0 = 0.6; - ///// holes tub 1hole tranversal + // holes tub 1hole tranversal Double_t radin_1hmb0 = 0.; Double_t radout_1hmb0 = 0.175; // diameter 3.5 H9 (0.35cm) - Double_t high_1hmb0 = 0.7; /// + Double_t high_1hmb0 = 0.7; TGeoRotation* rot_1hole_mb0 = new TGeoRotation("rot_1hole_mb0", 0, 90, 0); rot_1hole_mb0->RegisterYourself(); - /// h= hole + // h = hole TGeoCombiTrans* acombi_1h_mb0 = new TGeoCombiTrans(5.2, 0, 0, rot_1hole_mb0); acombi_1h_mb0->SetName("acombi_1h_mb0"); acombi_1h_mb0->RegisterYourself(); - TGeoCombiTrans* bcombi_1h_mb0 = new TGeoCombiTrans(-5.2, 0, 0, rot_1hole_mb0); //y= + TGeoCombiTrans* bcombi_1h_mb0 = new TGeoCombiTrans(-5.2, 0, 0, rot_1hole_mb0); // y= bcombi_1h_mb0->SetName("bcombi_1h_mb0"); bcombi_1h_mb0->RegisterYourself(); - ///// 2hole coaxial + // 2hole coaxial Double_t radin_2hmb0 = 0.; Double_t radout_2hmb0 = 0.15; // diameter M3 - Double_t high_2hmb0 = 1.2; /// 12 + Double_t high_2hmb0 = 1.2; // 12 TGeoRotation* rot_2hole_mb0 = new TGeoRotation("rot_2hole_mb0", 90, 90, 0); rot_2hole_mb0->SetName("rot_2hole_mb0"); @@ -110,39 +109,33 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_2hole_mb0->SetName("combi_2hole_mb0"); combi_2hole_mb0->RegisterYourself(); - TGeoCombiTrans* combi_2hole_mb0_b = new TGeoCombiTrans(-6.7, 0, 0, rot_2hole_mb0); //y= + TGeoCombiTrans* combi_2hole_mb0_b = new TGeoCombiTrans(-6.7, 0, 0, rot_2hole_mb0); // y= combi_2hole_mb0_b->SetName("combi_2hole_mb0_b"); combi_2hole_mb0_b->RegisterYourself(); // shape for cross_mb0.. - //TGeoShape* box_mb0 = new TGeoBBox("s_box_mb0", x_boxmb0 / 2, y_boxmb0 / 2, z_boxmb0 / 2); + // TGeoShape* box_mb0 = new TGeoBBox("s_box_mb0", x_boxmb0 / 2, y_boxmb0 / 2, z_boxmb0 / 2); new TGeoBBox("box_mb0", x_boxmb0 / 2, y_boxmb0 / 2, z_boxmb0 / 2); new TGeoTube("hole1_mb0", radin_1hmb0, radout_1hmb0, high_1hmb0 / 2); new TGeoTube("hole2_mb0", radin_2hmb0, radout_2hmb0, high_2hmb0 / 2); - ///composite shape for mb0 - + // composite shape for mb0 auto* c_mb0_Shape_0 = new TGeoCompositeShape("c_mb0_Shape_0", "box_mb0 - hole1_mb0:acombi_1h_mb0 - hole1_mb0:bcombi_1h_mb0 - hole2_mb0:combi_2hole_mb0 - hole2_mb0:combi_2hole_mb0_b"); - - /////////////////// + // auto* cross_mb0_Volume = new TGeoVolume("cross_mb0_Volume", c_mb0_Shape_0, kMedAlu); Cross_mb0->AddNode(cross_mb0_Volume, 1); - //////////////////////////////////////////// - - ///// 2nd piece ------ cross beam--MFT---------(cbeam)----- - + // 2nd piece cross beam MFT (cbeam) auto* Cross_mft = new TGeoVolumeAssembly("Cross_mft"); // using the same "box" of the 1 piece - ////////// 2hole coaxial + // 2hole coaxial Double_t radin_hole_cbeam = 0.; Double_t radout_hole_cbeam = 0.15; // diameter M3 Double_t high_hole_cbeam = 0.91; /// // same rotation in tub aximatAl "rot_2hole_mb0" - TGeoCombiTrans* combi_hole_1cbeam = new TGeoCombiTrans(6.8, 0, 0, rot_2hole_mb0); combi_hole_1cbeam->SetName("combi_hole_1cbeam"); combi_hole_1cbeam->RegisterYourself(); @@ -155,17 +148,13 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) new TGeoTube("hole_cbeam", radin_hole_cbeam, radout_hole_cbeam, high_hole_cbeam / 2); - /// composite shape for cross beam (using the same box of mb0) + // composite shape for cross beam (using the same box of mb0) auto* c_cbeam_Shape = new TGeoCompositeShape("c_cbeam_Shape", "box_mb0 - hole_cbeam:combi_hole_1cbeam - hole_cbeam:combi_hole_2cbeam"); - - /////////////////// auto* Cross_mft_Volume = new TGeoVolume("Cross_mft_Volume", c_cbeam_Shape, kMedAlu); Cross_mft->AddNode(Cross_mft_Volume, 1); - //////////////////////////////////////////// - - ////3th piece -------- Framework front ------------ - + + // 3th piece Framework front auto* Fra_front = new TGeoVolumeAssembly("Fra_front"); auto* Fra_front_L = new TGeoVolumeAssembly("Fra_front_L"); auto* Fra_front_R = new TGeoVolumeAssembly("Fra_front_R"); @@ -173,28 +162,28 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) Double_t x_box_up = 0.6; // cm Double_t y_box_up = 0.605; Double_t z_box_up = 2.84; - //hole up // + // hole up Double_t dia_tub_up = 0.35; Double_t high_tub_up = 0.65; - //hole down//// + // hole down Double_t dia_tubdown = 0.35; Double_t high_tubdown = 0.68; // Double_t x_boxA_down = 0.8; Double_t y_boxA_down = 0.6; Double_t z_boxA_down = 0.6; - + // Double_t x_boxB_down = 0.6; Double_t y_boxB_down = 0.605; Double_t z_boxB_down = 1.26; // 12.6 - //seg tub + // seg tub Double_t radin_segtub = 16.9; Double_t radout_segtub = 17.5; Double_t high_segtub = 0.6; Double_t ang_in_segtub = 212.1; Double_t ang_fin_segtub = 241.92; // - /////// trans. rot. + // trans. rot. TGeoCombiTrans* combi_3a = new TGeoCombiTrans(-7.4, 0, 8.975, rot2); combi_3a->SetName("combi_3a"); combi_3a->RegisterYourself(); @@ -219,8 +208,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoTranslation* tr_tubdown = new TGeoTranslation("tr_tubdown", -0.4, 0, 0.7); tr_tubdown->RegisterYourself(); - /////// shape for framewor front - + // shape for framewor front new TGeoBBox("box_up", x_box_up / 2, y_box_up / 2, z_box_up / 2); new TGeoTube("tub_up", 0., dia_tub_up / 2, high_tub_up / 2); // @@ -232,7 +220,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) new TGeoTube("tubdown", 0., dia_tubdown / 2, high_tubdown / 2); - //Composite shapes for Fra_front + // Composite shapes for Fra_front new TGeoCompositeShape("fra_front_Shape_0", "box_up:tr1_up + seg_tub:combi_3b + boxB_down:tr3_box + boxA_down:tr_2_box"); auto* fra_front_Shape_1 = new TGeoCompositeShape("fra_front_Shape_1", "fra_front_Shape_0 - tubdown:tr_tubdown - tub_up:combi_3a"); @@ -250,98 +238,93 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_front_R->SetName("combi_front_R"); combi_front_R->RegisterYourself(); - // auto * fra_front_Shape_3 = new TGeoCompositeShape("fra_front_Shape_3","fra_front_Shape_2:rot_halfR "); + // auto * fra_front_Shape_3 = new TGeoCompositeShape("fra_front_Shape_3","fra_front_Shape_2:rot_halfR "); auto* Fra_front_Volume = new TGeoVolume("Fra_front_Volume", fra_front_Shape_1, kMedAlu); Fra_front_L->AddNode(Fra_front_Volume, 1, combi_front_L); Fra_front_R->AddNode(Fra_front_Volume, 1, combi_front_R); - Fra_front->AddNode(Fra_front_L, 1); Fra_front->AddNode(Fra_front_R, 2); - ///////////////////////////////////////////////----- - - //4th piece ------------------"BASE" framework half support ------ - + // 4th piece "BASE" framework half support auto* base = new TGeoVolumeAssembly("base"); - - //seg tub disc + // seg tub disc Double_t radin_disc = 23.6; Double_t radout_disc = 30.3; Double_t high_disc = 1.35; Double_t ang_in_disc = 180; Double_t ang_fin_disc = 360; - ///// holes tub 1hole tranversal o3.5 + // holes tub 1hole tranversal o3.5 Double_t radin_holeB = 0.; Double_t radout_holeB = 0.175; // diameter 3.5 H11 - Double_t high_holeB = 1.5; /// + Double_t high_holeB = 1.5; // TGeoTranslation* tr1_holeB = new TGeoTranslation("tr1_holeB", -7.5, -28.8, 0); tr1_holeB->RegisterYourself(); TGeoTranslation* tr2_holeB = new TGeoTranslation("tr2_holeB", 7.5, -28.8, 0); tr2_holeB->RegisterYourself(); - //box 1 + // box 1 Double_t x_1box = 61.0; Double_t y_1box = 13.0; Double_t z_1box = 1.4; - //box 2 + // box 2 Double_t x_2box = 51.2; Double_t y_2box = 14.6; Double_t z_2box = 1.4; - //box 3 + // box 3 Double_t x_3box = 45.1; Double_t y_3box = 23.812; Double_t z_3box = 1.4; - //seg tub hole + // seg tub hole Double_t radin_1hole = 29.3; Double_t radout_1hole = 30.3; Double_t high_1hole = 1.4; Double_t ang_in_1hole = 205; Double_t ang_fin_1hole = 225; - //seg tub 2 hole + // seg tub 2 hole Double_t radin_2hole = 23.0; Double_t radout_2hole = 25.5; Double_t high_2hole = 1.4; Double_t ang_in_2hole = 207.83; Double_t ang_fin_2hole = 249.998; - //seg tub 3 ARC central xy SEG_3ARC U + // seg tub 3 ARC central xy SEG_3ARC U Double_t radin_3hole = 25.5; Double_t radout_3hole = 27.5; Double_t high_3hole = 1.35; Double_t ang_in_3hole = 255.253; Double_t ang_fin_3hole = 284.746; - //// hole central down |_| since x=-70 to 0 + // hole central down |_| since x=-70 to 0 Double_t xc_box = 7.0; Double_t yc_box = 5.772; Double_t zc_box = 1.4; TGeoTranslation* tr_cbox = new TGeoTranslation("tr_cbox", -xc_box / 2, -radout_disc + 0.888, 0); tr_cbox->RegisterYourself(); - //box 4 lamine 1 + // box 4 lamine 1 Double_t x_labox = 60.0; Double_t y_labox = 30.3; Double_t z_labox = 0.305; TGeoTranslation* tr_la = new TGeoTranslation("tr_la", 0, -y_labox / 2 - 9.3, high_disc / 2); tr_la->RegisterYourself(); - /////box 5 lamin 2 + // box 5 lamin 2 Double_t x_2labox = 51.2; Double_t y_2labox = 2.8; //C-B Double_t z_2labox = 0.303; TGeoTranslation* tr_2la = new TGeoTranslation("tr_2la", 0, -8.1, high_disc / 2); // tr_2la->RegisterYourself(); - ///////// circular border C //--SEG_BORD ---- - //seg tub 3 xy + // circular border C SEG_BORD + // seg tub 3 xy Double_t radin_bord = 0.5; Double_t radout_bord = 0.9; // - Double_t high_bord = 1.355; ///13.5 + Double_t high_bord = 1.355; // 13.5 Double_t ang_in_bord = 0; Double_t ang_fin_bord = 90; - /////TGeoRotation *rot_bord1 = new TGeoRotation("rot_bord1", ang_in_1hole +0.0167,0,0); + // TGeoRotation *rot_bord1 = new TGeoRotation("rot_bord1", ang_in_1hole +0.0167,0,0); TGeoRotation* rot1_bord1 = new TGeoRotation("rot1_bord1", 14.8, 0, 0); rot1_bord1->RegisterYourself(); TGeoCombiTrans* combi_bord1 = new TGeoCombiTrans(-26.7995, -13.0215, 0, rot1_bord1); //y= @@ -353,48 +336,48 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoCombiTrans* combi2_bord1 = new TGeoCombiTrans(-21.3795, -20.7636, 0, rot2_bord1); //y= combi2_bord1->SetName("combi2_bord1"); combi2_bord1->RegisterYourself(); - //////// /__0/ + // TGeoRotation* rot1_bord2 = new TGeoRotation("rot1_bord2", 250, 0, 0); rot1_bord2->RegisterYourself(); TGeoCombiTrans* combi1_bord2 = new TGeoCombiTrans(-9.0527, -23.3006, 0, rot1_bord2); //y= combi1_bord2->SetName("combi1_bord2"); combi1_bord2->RegisterYourself(); - /////// |°____°| + // e|°____°| TGeoRotation* rot_cent_bord = new TGeoRotation("rot_cent_bord", 90, 0, 0); rot_cent_bord->RegisterYourself(); TGeoCombiTrans* combi_cent_bord = new TGeoCombiTrans(-6.5, -27.094, 0, rot_cent_bord); //y= combi_cent_bord->SetName("combi_cent_bord"); combi_cent_bord->RegisterYourself(); - ///////////////// box tonge + // box tonge Double_t x_tong = 2.0; Double_t y_tong = 2.81; Double_t z_tong = 1.35; TGeoTranslation* tr_tong = new TGeoTranslation("tr_tong", 0, -28.6, 0); // tr_tong->RegisterYourself(); - //// circular central hole1 to conexion with other parts + // circular central hole1 to conexion with other parts Double_t radin_hole1 = 0; Double_t radout_hole1 = 0.4; // - Double_t high_hole1 = 1.36; /// - TGeoTranslation* tr_hole1 = new TGeoTranslation("tr_hole1", 0, -28.0, 0); //tonge + Double_t high_hole1 = 1.36; // + TGeoTranslation* tr_hole1 = new TGeoTranslation("tr_hole1", 0, -28.0, 0); // tonge tr_hole1->RegisterYourself(); - TGeoTranslation* tr2_hole1 = new TGeoTranslation("tr2_hole1", -26.5, -8.5, 0); //left + TGeoTranslation* tr2_hole1 = new TGeoTranslation("tr2_hole1", -26.5, -8.5, 0); // left tr2_hole1->RegisterYourself(); - TGeoTranslation* tr3_hole1 = new TGeoTranslation("tr3_hole1", 26.5, -8.5, 0); //right + TGeoTranslation* tr3_hole1 = new TGeoTranslation("tr3_hole1", 26.5, -8.5, 0); // right tr3_hole1->RegisterYourself(); - ///////////////////////////////////////// - /// circular hole2 ; hole2 r=6.7 + + // circular hole2 ; hole2 r=6.7 Double_t radin_hole2 = 0; Double_t radout_hole2 = 0.335; // diameter 6.7 - Double_t high_hole2 = 1.36; ///13.5 + Double_t high_hole2 = 1.36; // 13.5 TGeoTranslation* tr1_hole2 = new TGeoTranslation("tr1_hole2", -28.0, -8.5, 0); // tr1_hole2->RegisterYourself(); TGeoTranslation* tr2_hole2 = new TGeoTranslation("tr2_hole2", 28.0, -8.5, 0); // tr2_hole2->RegisterYourself(); - //////////// hole "0" two tubs together + // hole "0" two tubs together Double_t radin_T1 = 0.325; // diam 0.65cm Double_t radout_T1 = 0.55; // dia 1.1 Double_t high_T1 = 1.2; /// dz 6 @@ -402,9 +385,8 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) Double_t radin_T2 = 0; Double_t radout_T2 = 1.1; // Double_t high_T2 = 1.2; /// dz 6 - ///...................................... ..... - ///////// shape for base -- - + + // shape for base new TGeoTubeSeg("disc", radin_disc, radout_disc, high_disc / 2, ang_in_disc, ang_fin_disc); new TGeoBBox("box1", x_1box / 2, y_1box / 2, z_1box / 2); @@ -426,8 +408,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) new TGeoTube("circ_holeB", radin_holeB, radout_holeB, high_holeB / 2); - //// composite shape for base ---- - + // composite shape for base new TGeoCompositeShape("base_Shape_0", " disc -box1 - box2 - box3 - circ_holeB:tr1_holeB - circ_holeB:tr2_holeB"); new TGeoCompositeShape("base_Shape_1", "(seg_1hole - seg_bord:combi_bord1 - seg_bord:combi2_bord1) + seg_2hole -seg_bord:combi1_bord2 + cbox:tr_cbox"); @@ -437,85 +418,76 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto* base_Shape_4 = new TGeoCompositeShape("base_Shape_4", "base_Shape_0 - base_Shape_1 - base_Shape_1:rot1 + base_Shape_2 + tongbox:tr_tong - circ_hole1:tr_hole1 - circ_hole1:tr2_hole1 - circ_hole1:tr3_hole1 - circ_hole2:tr1_hole2 - circ_hole2:tr2_hole2 - base_Shape_3 "); - // auto * base_Shape_5 = new TGeoCompositeShape("base_Shape_5","disc-box1 -box2 -box3 -seg_1hole -seg_2hole +seg_3hole -seg_1hole:rot1-seg_2hole:rot1 - cbox:tr_cbox - labox:tr_la - labox2:tr_2la + seg_bord "); - - // auto * base0_Volume = new TGeoVolume("base0_Volume",base_Shape_0,kMedAlu); - // auto * base1_Volume = new TGeoVolume("base1_Volume",base_Shape_1,kMedAlu); - // auto * base2_Volume = new TGeoVolume("base2_Volume",base_Shape_2,kMedAlu); - // auto * base3_Volume = new TGeoVolume("base3_Volume",base_Shape_3,kMedAlu); + // auto * base_Shape_5 = new TGeoCompositeShape("base_Shape_5","disc-box1 -box2 -box3 -seg_1hole -seg_2hole +seg_3hole -seg_1hole:rot1-seg_2hole:rot1 - cbox:tr_cbox - labox:tr_la - labox2:tr_2la + seg_bord "); + // auto * base0_Volume = new TGeoVolume("base0_Volume",base_Shape_0,kMedAlu); + // auto * base1_Volume = new TGeoVolume("base1_Volume",base_Shape_1,kMedAlu); + // auto * base2_Volume = new TGeoVolume("base2_Volume",base_Shape_2,kMedAlu); + // auto * base3_Volume = new TGeoVolume("base3_Volume",base_Shape_3,kMedAlu); auto* base4_Volume = new TGeoVolume("base4_Volume", base_Shape_4, kMedAlu); base->AddNode(base4_Volume, 2, rot_base); - //base->AddNode(base4_Volume,2); - ////////////////////////////////////////// - - ///5th piece MIDLE ------ Framework midle-------------------- + // base->AddNode(base4_Volume,2); + + // 5th piece MIDLE Framework midle auto* midle = new TGeoVolumeAssembly("Midle"); auto* midle_L = new TGeoVolumeAssembly("Midle_L"); auto* midle_R = new TGeoVolumeAssembly("Midle_R"); - - ////box up to quit and to join - Double_t x_midle = 0.8; //dx=4 - Double_t y_midle = 3.495; //y=34.9 - Double_t z_midle = 0.62; //z=6 - //tr1 to join with arc + + // box up to quit and to join + Double_t x_midle = 0.8; // dx=4 + Double_t y_midle = 3.495; // y=34.9 + Double_t z_midle = 0.62; // z=6 + // tr1 to join with arc TGeoTranslation* tr1_midle_box = new TGeoTranslation("tr1_midle_box", -14.4, -0.745, 0); //-152,-17.45,0 tr1_midle_box->RegisterYourself(); - //tr2 to quiet + // tr2 to quiet TGeoTranslation* tr2_midle_box = new TGeoTranslation("tr2_midle_box", -15.2, -0.745, 0); //-152,-17.45,0 tr2_midle_box->RegisterYourself(); - - /////////////////////////// - ////box down_1 - Double_t x_midle_d1box = 0.4; //dx=4 + + // box down_1 + Double_t x_midle_d1box = 0.4; // dx=4 Double_t y_midle_d1box = 0.28; Double_t z_midle_d1box = 0.66; TGeoTranslation* tr_midle_d1box = new TGeoTranslation("tr_midle_d1box", -7.3, -11.96, 0.); //81 tr_midle_d1box->RegisterYourself(); - - /////////////////////////// - ////box down_2 - Double_t x_midle_d2box = 0.8; //dx=4 + + // box down_2 + Double_t x_midle_d2box = 0.8; // dx=4 Double_t y_midle_d2box = 1.0; Double_t z_midle_d2box = 0.66; // - TGeoTranslation* tr_midle_d2box = new TGeoTranslation("tr_midle_d2box", -7.5, -12.6249, 0); //81 + TGeoTranslation* tr_midle_d2box = new TGeoTranslation("tr_midle_d2box", -7.5, -12.6249, 0); // 81 tr_midle_d2box->RegisterYourself(); - - /////////////////// - //arc circ part + + // arc circ part Double_t radin_midle = 14.0; Double_t radout_midle = 15.0; // Double_t high_midle = 0.6; /// Double_t ang_in_midle = 180; - Double_t ang_fin_midle = 238.21; //alfa=57.60 - - ///////////////////////////////////////// - /// circular hole1 ; hole_midle d=3.5 + Double_t ang_fin_midle = 238.21; // alfa=57.60 + + // circular hole1 ; hole_midle d=3.5 Double_t radin_mid_1hole = 0.; Double_t radout_mid_1hole = 0.175; // diameter 3.5 - Double_t high_mid_1hole = 1.5; /// 2.4 - + Double_t high_mid_1hole = 1.5; // 2.4 + TGeoRotation* rot_mid_1hole = new TGeoRotation("rot_mid_1hole", 90, 90, 0); rot_mid_1hole->RegisterYourself(); TGeoCombiTrans* combi_mid_1tubhole = new TGeoCombiTrans(-14.2, 0.325, 0, rot_mid_1hole); // combi_mid_1tubhole->SetName("combi_mid_1tubhole"); combi_mid_1tubhole->RegisterYourself(); - - ///////////////////////////////////////// - /// circular hole2 ; hole_midle d=3 + + // circular hole2 ; hole_midle d=3 Double_t radin_mid_2hole = 0.; Double_t radout_mid_2hole = 0.15; // diameter 3 - Double_t high_mid_2hole = 1.8; /// + Double_t high_mid_2hole = 1.8; // TGeoCombiTrans* combi_mid_2tubhole = new TGeoCombiTrans(-7.7, -12.355, 0, rot_mid_1hole); //x=81 combi_mid_2tubhole->SetName("combi_mid_2tubhole"); combi_mid_2tubhole->RegisterYourself(); - - ////////////////////////////////////////////////////// - - ///////// shape for midle + + // shape for midle new TGeoBBox("midle_box", x_midle / 2, y_midle / 2, z_midle / 2); new TGeoBBox("midle_d1box", x_midle_d1box / 2, y_midle_d1box / 2, z_midle_d1box / 2); @@ -528,279 +500,270 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) new TGeoTube("mid_2tubhole", radin_mid_2hole, radout_mid_2hole, high_mid_2hole / 2); - //////////////////////////////////////////composite shape for midle - + // composite shape for midle + new TGeoCompositeShape("midle_Shape_0", " arc_midle + midle_box:tr1_midle_box - midle_box:tr2_midle_box -midle_d1box:tr_midle_d1box - midle_d2box:tr_midle_d2box"); - + auto* midle_Shape_1 = new TGeoCompositeShape("midle_Shape_1", " midle_Shape_0 -mid_1tubhole:combi_mid_1tubhole-mid_2tubhole:combi_mid_2tubhole"); - + TGeoRotation* rot_midlez = new TGeoRotation("rot_midley", 180, 180, 0); rot_midlez->RegisterYourself(); TGeoCombiTrans* combi_midle_L = new TGeoCombiTrans(0, -7.625, 24.15 + 0.675, rot_90x); //x=7.35, y=0, z=15.79- 0,-7.625,24.15+0.675-80) combi_midle_L->SetName("combi_midle_L"); combi_midle_L->RegisterYourself(); - + TGeoTranslation* tr_midle_L = new TGeoTranslation("tr_midle_L", 0, -7.625, 24.15 + 0.675); //-152,-17.45,0 tr_midle_L->RegisterYourself(); - + TGeoCombiTrans* combi_midle_R = new TGeoCombiTrans(0, -7.625, 24.15 + 0.675, rot_midlez); //x=7.35, y=0, z=15.79 combi_midle_R->SetName("combi_midle_R"); combi_midle_R->RegisterYourself(); - + auto* midle_Volume = new TGeoVolume("midle_Volume", midle_Shape_1, kMedAlu); - + midle_L->AddNode(midle_Volume, 1, tr_midle_L); midle_R->AddNode(midle_Volume, 1, combi_midle_R); - - //midle->AddNode(midle_Volume,1); + + // midle->AddNode(midle_Volume,1); midle->AddNode(midle_L, 1); midle->AddNode(midle_R, 2); - - //////////////////////////////////////new piece ... _/ \_ - /// Support_rail_L & Support_rail_R + + // new piece _/ \_ + // Support_rail_L & Support_rail_R auto* rail_L_R = new TGeoVolumeAssembly("rail_L_R"); - //6 piece RAIL LEFT --RL---0000------ + // 6 piece RAIL LEFT --RL---0000------ auto* rail_L = new TGeoVolumeAssembly("rail_L"); - /////////////////VARIAb - ////box down_2 + // var box down_2 Double_t x_RL_1box = 3.0; //dx=15 Double_t y_RL_1box = 1.21; // dy=6, -dy=6 Double_t z_RL_1box = 0.8; // dz=4 to quit TGeoTranslation* tr_RL_1box = new TGeoTranslation(0, y_RL_1box / 2, 1.825); //81 tr_RL_1box->SetName("tr_RL_1box"); tr_RL_1box->RegisterYourself(); - //////////////////////////////7 - + TGeoXtru* xtru_RL1 = new TGeoXtru(2); xtru_RL1->SetName("S_XTRU_RL1"); - Double_t x_RL1[5] = { -1.5, 1.5, 0.5, 0.5, -1.5 }; //93,93,73,73,-15};//vertices + Double_t x_RL1[5] = { -1.5, 1.5, 0.5, 0.5, -1.5 }; //vertices Double_t y_RL1[5] = { 1.2, 1.2, 2.2, 8.2, 8.2 }; //357.5,357.5,250.78,145.91}; xtru_RL1->DefinePolygon(5, x_RL1, y_RL1); - xtru_RL1->DefineSection(0, -2.225, 0., 0., 1); //(plane,-zplane/ +zplane, x0, y0,(x/y)) + xtru_RL1->DefineSection(0, -2.225, 0., 0., 1); // (plane,-zplane/ +zplane, x0, y0,(x/y)) xtru_RL1->DefineSection(1, 2.225, 0., 0., 1); - ////////////// \// - + TGeoXtru* xtru_RL2 = new TGeoXtru(2); xtru_RL2->SetName("S_XTRU_RL2"); - - Double_t x_RL2[8] = { -1.5, 0.5, 0.5, 9.3, 9.3, 7.3, 7.3, -1.5 }; //vertices + + Double_t x_RL2[8] = { -1.5, 0.5, 0.5, 9.3, 9.3, 7.3, 7.3, -1.5 }; // vertices Double_t y_RL2[8] = { 8.2, 8.2, 13.863, 24.35, 35.75, 35.75, 25.078, 14.591 }; - + xtru_RL2->DefinePolygon(8, x_RL2, y_RL2); - - xtru_RL2->DefineSection(0, 0.776, 0, 0, 1); //(plane,-zplane/+zplane, x0, y0,(x/y)) + + xtru_RL2->DefineSection(0, 0.776, 0, 0, 1); // (plane,-zplane/+zplane, x0, y0,(x/y)) xtru_RL2->DefineSection(1, 2.225, 0, 0, 1); - - ///////////////////////// //////////////////// - ////box knee - Double_t x_RL_kneebox = 1.5; //dx=7.5 + + // box knee + Double_t x_RL_kneebox = 1.5; // dx=7.5 Double_t y_RL_kneebox = 3.5; // dy=17.5 - Double_t z_RL_kneebox = 1.5; // dz=7.5 to quit - TGeoTranslation* tr_RL_kneebox = new TGeoTranslation(0, 0, 0); //81 x =-2.5, y=145.91 + Double_t z_RL_kneebox = 1.5; // dz=7.5 to quit + TGeoTranslation* tr_RL_kneebox = new TGeoTranslation(0, 0, 0); // 81 x =-2.5, y=145.91 tr_RL_kneebox->SetName("tr_RL_kneebox"); tr_RL_kneebox->RegisterYourself(); - + TGeoRotation* rot_knee = new TGeoRotation("rot_knee", -40, 0, 0); rot_knee->SetName("rot_knee"); rot_knee->RegisterYourself(); TGeoCombiTrans* combi_knee = new TGeoCombiTrans(0.96, 1.75 + 0.81864, 0, rot_knee); //y= combi_knee->SetName("combi_knee"); combi_knee->RegisterYourself(); - ///////////////////////////////// quit diagona-> qdi///////////////// - Double_t x_qdi_box = 3.1; // + // quit diagona-> qdi + Double_t x_qdi_box = 3.1; // Double_t y_qdi_box = 7.159; // Double_t z_qdi_box = 3.005; // TGeoRotation* rot_qdi = new TGeoRotation("rot_qdi", 0, 24.775, 0); rot_qdi->RegisterYourself(); - TGeoCombiTrans* combi_qdi = new TGeoCombiTrans(0, 5.579, -2.087, rot_qdi); //y= + TGeoCombiTrans* combi_qdi = new TGeoCombiTrans(0, 5.579, -2.087, rot_qdi); // y= combi_qdi->SetName("combi_qdi"); combi_qdi->RegisterYourself(); - ////////////// knee small - + // knee small + TGeoXtru* xtru3_RL = new TGeoXtru(2); xtru3_RL->SetName("xtru3_RL"); - - Double_t x_3RL[6] = { -0.75, 0.75, 0.75, 2.6487, 1.4997, -0.75 }; //vertices + + Double_t x_3RL[6] = { -0.75, 0.75, 0.75, 2.6487, 1.4997, -0.75 }; // vertices Double_t y_3RL[6] = { -1.75, -1.75, 1.203, 3.465, 4.4311, 1.75 }; - + xtru3_RL->DefinePolygon(6, x_3RL, y_3RL); - xtru3_RL->DefineSection(0, -0.75, 0, 0, 1); //(plane,-zplane/+zplane, x0, y0,(x/y)) + xtru3_RL->DefineSection(0, -0.75, 0, 0, 1); // (plane,-zplane/+zplane, x0, y0,(x/y)) xtru3_RL->DefineSection(1, 0.76, 0, 0, 1); - + TGeoTranslation* tr_vol3_RL = new TGeoTranslation(-0.25, 12.66, 0); // tr_vol3_RL->SetName("tr_vol3_RL"); tr_vol3_RL->RegisterYourself(); - ///////////////////////////////////////////// - //// circular holes could be for rail R and L .. - /// circular hole1_RL (a(6,22)); hole_midle d=6.5 H11 + + // circular holes could be for rail R and L .. + // circular hole1_RL (a(6,22)); hole_midle d=6.5 H11 Double_t radin_RL1hole = 0.; Double_t radout_RL1hole = 0.325; // diameter 3.5 Double_t high_RL1hole = 1.0; /// - + TGeoRotation* rot_RL1hole = new TGeoRotation("rot_RL1hole", 0, 0, 0); rot_RL1hole->RegisterYourself(); TGeoCombiTrans* combi_RL1hole = new TGeoCombiTrans(0.7, 0.6, 1.85, rot_RL1hole); //y= combi_RL1hole->SetName("combi_RL1hole"); combi_RL1hole->RegisterYourself(); - //////////////////////////////// similar hole for R -- Join. - /// circular hole_ir. diameter=M3 (3 mm)) prof trou:8, tar:6mm + // similar hole for R Join. + // circular hole_ir. diameter=M3 (3 mm)) prof trou:8, tar:6mm Double_t radin_ir_railL = 0.; Double_t radout_ir_railL = 0.15; // diameter 0.3cm Double_t high_ir_railL = 3.9; // TGeoRotation* rot_ir_RL = new TGeoRotation("rot_ir_RL", 90, 90, 0); rot_ir_RL->RegisterYourself(); - //// in y = l_253.5 - 6. enter in (0,6,0) + // in y = l_253.5 - 6. enter in (0,6,0) TGeoCombiTrans* combi_ir1_RL = new TGeoCombiTrans(8.62, 24.75, 1.5, rot_ir_RL); combi_ir1_RL->SetName("combi_ir1_RL"); combi_ir1_RL->RegisterYourself(); - + TGeoCombiTrans* combi_ir2_RL = new TGeoCombiTrans(8.6, 33.15, 1.5, rot_ir_RL); combi_ir2_RL->SetName("combi_ir2_RL"); combi_ir2_RL->RegisterYourself(); - - /////////////////////// shape for Rail L geom///////// + + // shape for Rail L geom new TGeoBBox("RL_1box", x_RL_1box / 2, y_RL_1box / 2, z_RL_1box / 2); new TGeoBBox("RL_kneebox", x_RL_kneebox / 2, y_RL_kneebox / 2, z_RL_kneebox / 2); //no_ used new TGeoBBox("qdi_box", x_qdi_box / 2, y_qdi_box / 2, z_qdi_box / 2); + + // E auto *s_RL1hole=new TGeoTube("S_RL1HOLE",radin_RL1hole,radout_RL1hole,high_RL1hole/2); + // -auto *s_irL_hole=new TGeoTube("S_irL_HOLE",radin_ir_railL,radout_ir_railL,high_ir_railL/2); - //E auto *s_RL1hole=new TGeoTube("S_RL1HOLE",radin_RL1hole,radout_RL1hole,high_RL1hole/2); - //-auto *s_irL_hole=new TGeoTube("S_irL_HOLE",radin_ir_railL,radout_ir_railL,high_ir_railL/2); - - ////////////////////// composite shape for rail L ////////////////////// - + // composite shape for rail L + auto* RL_Shape_0 = new TGeoCompositeShape("RL_Shape_0", " xtru3_RL:tr_vol3_RL + S_XTRU_RL1 + S_XTRU_RL2 + RL_1box:tr_RL_1box - qdi_box:combi_qdi"); // - - //////////////////////////////////////-------//////// - + TGeoVolume* rail_L_vol0 = new TGeoVolume("RAIL_L_VOL0", RL_Shape_0, kMedAlu); - + rail_L->AddNode(rail_L_vol0, 1, new TGeoTranslation(0., 0., 1.5)); - - ////piece 7th ---------------RAIL RIGHT ---- //////////////----- - //E auto *rail_R = new TGeoVolumeAssembly("rail_R"); - + + // piece 7th RAIL RIGHT + // E auto *rail_R = new TGeoVolumeAssembly("rail_R"); + Double_t x_RR_1box = 3.0; //dx=15 Double_t y_RR_1box = 1.2; // dy=6, -dy=6 - Double_t z_RR_1box = 0.8; // dz=4 to quit - TGeoTranslation* tr_RR_1box = new TGeoTranslation("tr_RR_1box", 0, 0.6, 1.825); //81 + Double_t z_RR_1box = 0.8; // dz=4 to quit + TGeoTranslation* tr_RR_1box = new TGeoTranslation("tr_RR_1box", 0, 0.6, 1.825); // 81 tr_RR_1box->RegisterYourself(); - ////////////////////////////////7 - + // + TGeoXtru* part_RR1 = new TGeoXtru(2); part_RR1->SetName("part_RR1"); - //-TGeoVolume *vol_RR1 = gGeoManager->MakeXtru("S_part_RR1",kMedAlu,2); - //-TGeoXtru *part_RR1 = (TGeoXtru*)vol_RR1->GetShape(); - - Double_t x_RR1[5] = { -1.5, -0.5, -0.5, 1.5, 1.5 }; //C,D,K,L,C' //vertices - Double_t y_RR1[5] = { 1.2, 2.2, 8.2, 8.2, 1.2 }; //357.5,357.5,250.78,145.91}; - + // TGeoVolume *vol_RR1 = gGeoManager->MakeXtru("S_part_RR1",kMedAlu,2); + // TGeoXtru *part_RR1 = (TGeoXtru*)vol_RR1->GetShape(); + + Double_t x_RR1[5] = { -1.5, -0.5, -0.5, 1.5, 1.5 }; // C,D,K,L,C' //vertices + Double_t y_RR1[5] = { 1.2, 2.2, 8.2, 8.2, 1.2 }; // 357.5,357.5,250.78,145.91}; + part_RR1->DefinePolygon(5, x_RR1, y_RR1); - part_RR1->DefineSection(0, -2.225, 0, 0, 1); //(plane,-zplane/ +zplane, x0, y0,(x/y)) + part_RR1->DefineSection(0, -2.225, 0, 0, 1); // (plane,-zplane/ +zplane, x0, y0,(x/y)) part_RR1->DefineSection(1, 2.225, 0, 0, 1); - - ////////////// \////////// - + TGeoXtru* part_RR2 = new TGeoXtru(2); part_RR2->SetName("part_RR2"); - //-TGeoVolume *vol_RR2 = gGeoManager->MakeXtru("part_RR2",Al,2); - //-TGeoXtru *xtru_RR2 = (TGeoXtru*)vol_RR2->GetShape(); - - Double_t x_RR2[8] = { -0.5, -0.5, -9.3, -9.3, -7.3, -7.3, 1.5, 1.5 }; //K,E,F,G,H,I,J,L//vertices + // TGeoVolume *vol_RR2 = gGeoManager->MakeXtru("part_RR2",Al,2); + // TGeoXtru *xtru_RR2 = (TGeoXtru*)vol_RR2->GetShape(); + + Double_t x_RR2[8] = { -0.5, -0.5, -9.3, -9.3, -7.3, -7.3, 1.5, 1.5 }; // K,E,F,G,H,I,J,L vertices Double_t y_RR2[8] = { 8.2, 13.863, 24.35, 35.75, 35.75, 25.078, 14.591, 8.2 }; - + part_RR2->DefinePolygon(8, x_RR2, y_RR2); - part_RR2->DefineSection(0, 0.776, 0, 0, 1); //(plane,-zplane/+zplane, x0, y0,(x/y)) + part_RR2->DefineSection(0, 0.776, 0, 0, 1); // (plane,-zplane/+zplane, x0, y0,(x/y)) part_RR2->DefineSection(1, 2.225, 0, 0, 1); - - ////////////// knee (small) - + + // knee (small) + TGeoXtru* part_RR3 = new TGeoXtru(2); part_RR3->SetName("part_RR3"); - Double_t x_3RR[6] = { 1.0, 1.0, -1.2497, -2.2138, -0.5, -0.5 }; //R,Q,P,O,N.M //vertices + Double_t x_3RR[6] = { 1.0, 1.0, -1.2497, -2.2138, -0.5, -0.5 }; //R,Q,P,O,N.M // vertices Double_t y_3RR[6] = { 10.91, 14.41, 17.0911, 15.9421, 13.86, 10.91 }; - + part_RR3->DefinePolygon(6, x_3RR, y_3RR); - part_RR3->DefineSection(0, -0.75, 0, 0, 1); //(plane,-zplane/+zplane, x0, y0,(x/y)) + part_RR3->DefineSection(0, -0.75, 0, 0, 1); // (plane,-zplane/+zplane, x0, y0,(x/y)) part_RR3->DefineSection(1, 0.78, 0, 0, 1); - + TGeoTranslation* tr_vol3_RR = new TGeoTranslation("tr_vol3_RR", -0.25, 12.66, 0); // tr_vol3_RR->RegisterYourself(); - - ///////////////////////////////// quit diagona-> qdi///////////////// - Double_t x_qdi_Rbox = 3.1; //dx=1.5 + + // quit diagona -> qdi + Double_t x_qdi_Rbox = 3.1; // dx=1.5 Double_t y_qdi_Rbox = 7.159; // Double_t z_qdi_Rbox = 3.005; // - + TGeoRotation* rot_Rqdi = new TGeoRotation("rot_Rqdi", 0, 24.775, 0); rot_Rqdi->RegisterYourself(); TGeoCombiTrans* combi_Rqdi = new TGeoCombiTrans(0, 5.579, -2.087, rot_Rqdi); //y= combi_Rqdi->SetName("combi_Rqdi"); combi_Rqdi->RegisterYourself(); - - ////////////////////___holes__///// - - /// circular hole_a. diameter=6.5 (a(6,22)); hole_midle d=6.5 H11 + + // holes + + // circular hole_a. diameter=6.5 (a(6,22)); hole_midle d=6.5 H11 Double_t radin_a_rail = 0.; Double_t radout_a_rail = 0.325; // diameter 3.5 Double_t high_a_rail = 0.82; /// - + TGeoTranslation* tr_a_RR = new TGeoTranslation("tr_a_RR", -0.7, 0.6, 1.825); //right tr_a_RR->RegisterYourself(); - //// circular hole_ir. diameter=M3 (3 mm)) prof trou:8, tar:6mm + // circular hole_ir. diameter=M3 (3 mm)) prof trou:8, tar:6mm Double_t radin_ir_rail = 0.; Double_t radout_ir_rail = 0.15; // diameter 3 Double_t high_ir_rail = 3.2; // 19 --- TGeoRotation* rot_ir_RR = new TGeoRotation("rot_ir_RR", 90, 90, 0); rot_ir_RR->RegisterYourself(); - //// in y = l_253.5 - 6. center in (0,6,0) + // in y = l_253.5 - 6. center in (0,6,0) TGeoCombiTrans* combi_ir_RR = new TGeoCombiTrans(-8.62, 24.75, 1.5, rot_ir_RR); combi_ir_RR->SetName("combi_ir_RR"); combi_ir_RR->RegisterYourself(); - + TGeoCombiTrans* combi_ir2_RR = new TGeoCombiTrans(-8.6, 33.15, 1.5, rot_ir_RR); combi_ir2_RR->SetName("combi_ir2_RR"); combi_ir2_RR->RegisterYourself(); - + TGeoCombiTrans* combi_rail_R = new TGeoCombiTrans(24.1, -1.825, 0, rot_90x); //y= combi_rail_R->SetName("combi_rail_R"); combi_rail_R->RegisterYourself(); TGeoCombiTrans* combi_rail_L = new TGeoCombiTrans(-24.1, -1.825, 0, rot_90x); //y= combi_rail_L->SetName("combi_rail_L"); combi_rail_L->RegisterYourself(); - - ///////// trasl L and R + + // trasl L and R TGeoTranslation* tr_sr_l = new TGeoTranslation("tr_sr_l", -15.01, 0, 0); // tr_sr_l->RegisterYourself(); TGeoTranslation* tr_sr_r = new TGeoTranslation("tr_sr_r", 15.01, 0, 0); // tr_sr_r->RegisterYourself(); - - /////////////////////// shape for rail R //////// + + // shape for rail R new TGeoBBox("RR_1box", x_RR_1box / 2, y_RR_1box / 2, z_RR_1box / 2); + + // E auto *s_qdi_Rbox =new TGeoBBox("S_QDI_RBOX", x_qdi_Rbox/2,y_qdi_Rbox/2,z_qdi_Rbox/2); - //E auto *s_qdi_Rbox =new TGeoBBox("S_QDI_RBOX", x_qdi_Rbox/2,y_qdi_Rbox/2,z_qdi_Rbox/2); + // E auto *s_ir_hole=new TGeoTube("S_ir_HOLE",radin_ir_rail,radout_ir_rail,high_ir_rail/2); - //E auto *s_ir_hole=new TGeoTube("S_ir_HOLE",radin_ir_rail,radout_ir_rail,high_ir_rail/2); + // E auto *s_cc_hole=new TGeoTube("S_CC_HOLE",radin_cc_rail,radout_cc_rail,high_cc_rail/2); - //E auto *s_cc_hole=new TGeoTube("S_CC_HOLE",radin_cc_rail,radout_cc_rail,high_cc_rail/2); - - ////////////////////// composite shape for rail R ////////////////////// + // composite shape for rail R new TGeoCompositeShape("RR_Shape_0", "RR_1box:tr_RR_1box + part_RR1 + part_RR2 + part_RR3 - qdi_box:combi_qdi "); - - //-auto * RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0","RR_1box:tr_RR_1box+ S_part_RR1 + part_RR2 +part_RR3- qdi_box:combi_qdi + S_ir_HOLE:combi_ir_RR +S_ir_HOLE:combi_ir2_RR "); //-RR_1box:tr_RL_1box- S_b_HOLE:tr_b_RR -S_CC_HOLE:combi_cc2_RR - - //// JOIN only for show L and R parts - + + // auto * RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0","RR_1box:tr_RR_1box+ S_part_RR1 + part_RR2 +part_RR3- qdi_box:combi_qdi + S_ir_HOLE:combi_ir_RR +S_ir_HOLE:combi_ir2_RR "); //-RR_1box:tr_RL_1box- S_b_HOLE:tr_b_RR -S_CC_HOLE:combi_cc2_RR + + // JOIN only for show L and R parts + auto* rail_L_R_Shape = new TGeoCompositeShape("RAIL_L_R_Shape", " RL_Shape_0:combi_rail_L + RR_Shape_0:combi_rail_R"); - ////////////////////////////////////// - + TGeoVolume* rail_L_R_vol0 = new TGeoVolume("RAIL_L_R_VOL0", rail_L_R_Shape, kMedAlu); - + TGeoRotation* rot_rLR = new TGeoRotation("rot_rLR", 180, 180, 0); rot_rLR->RegisterYourself(); TGeoCombiTrans* combi_rLR = new TGeoCombiTrans(0, -6.9, -0.5, rot_rLR); //0,-6.9,-0.5-80 @@ -808,16 +771,14 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_rLR->RegisterYourself(); rail_L_R->AddNode(rail_L_R_vol0, 2, combi_rLR); - - /// piece 8th -------support rail MB --------------- -\_ - + + // piece 8th support rail MB-\_ + auto* sup_rail_MBL = new TGeoVolumeAssembly("sup_rail_MBL"); - - /////////////////VARIAb - + TGeoXtru* part_MBL_0 = new TGeoXtru(2); part_MBL_0->SetName("part_MBL_0"); //V-MBL_0 - + // vertices a,b,c,d,e,f,g,h Double_t x[8] = { 0., 0, 6.1, 31.55, 34.55, 34.55, 31.946, 6.496 }; Double_t y[8] = { -0.4, 0.4, 0.4, 13.0, 13.0, 12.2, 12.2, -0.4 }; @@ -828,16 +789,16 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoRotation* rot1_MBL_0 = new TGeoRotation("rot1_MBL_0", -90, -90, 90); rot1_MBL_0->RegisterYourself(); - - ///////////////////////////////// quit box in diag///////////////// + + // quit box in diag Double_t x_mb_box = 0.8; //dx=4 Double_t y_mb_box = 0.8; // dy=4 Double_t z_mb_box = 0.81; // dz=4 to quit TGeoTranslation* tr_mb_box = new TGeoTranslation("tr_mb_box", 24.05, 9.55, 0); // 240.5 tr_mb_box->RegisterYourself(); - ////lateral hole-box - Double_t x_lat_box = 0.7; //dx=0.35 + // lateral hole-box + Double_t x_lat_box = 0.7; // dx=0.35 Double_t y_lat_box = 1.8; // dy=0.9 Double_t z_lat_box = 0.2; // dz=0.1 TGeoTranslation* tr_lat1L_box = new TGeoTranslation("tr_lat1L_box", 4.6, 0, 0.4); // @@ -862,32 +823,32 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoTranslation* tr_lat5R_box = new TGeoTranslation("tr_lat5R_box", 29.9, 11.6, -0.4); // tr_lat5R_box->RegisterYourself(); - /// circular hole_1mbl. diameter=3.5 H9 + // circular hole_1mbl. diameter=3.5 H9 Double_t radin_1mb = 0.; Double_t radout_1mb = 0.175; // diameter 3.5mm _0.35 cm - Double_t high_1mb = 2.825; /// dh=+/- 4 - TGeoTranslation* tr1_mb = new TGeoTranslation("tr1_mb", 18.48, 6.1, 0.); //right + Double_t high_1mb = 2.825; // dh=+/- 4 + TGeoTranslation* tr1_mb = new TGeoTranslation("tr1_mb", 18.48, 6.1, 0.); // right tr1_mb->RegisterYourself(); TGeoTranslation* tr2_mb = new TGeoTranslation("tr2_mb", 24.15, 8.9, 0.); //right tr2_mb->RegisterYourself(); - ///circular hole_2mbl inclined and hole-up.diameter=M3 (3 mm)) prof , tar:8mm + // circular hole_2mbl inclined and hole-up.diameter=M3 (3 mm)) prof , tar:8mm Double_t radin_2mb = 0.; Double_t radout_2mb = 0.15; // diameter 0.3 Double_t high_2mb = 0.82; /// dh=+/- 4 TGeoRotation* rot_hole2_MBL = new TGeoRotation("rot_hole2_MBL", 0, 90, 0); rot_hole2_MBL->RegisterYourself(); - + TGeoTranslation* tr_mbl = new TGeoTranslation("tr_mbl", -7.5, 0., 0.); // tr_mbl->RegisterYourself(); - + TGeoTranslation* tr_mbr = new TGeoTranslation("tr_mbr", 7.5, 0, 0); // tr_mbr->RegisterYourself(); - - ///hole up ||-- hup - TGeoCombiTrans* combi_hup_mb = new TGeoCombiTrans(32.5, 12.6, 0, rot_90x); //y= + + // hole up || hup + TGeoCombiTrans* combi_hup_mb = new TGeoCombiTrans(32.5, 12.6, 0, rot_90x); // y= combi_hup_mb->SetName("combi_hup_mb"); combi_hup_mb->RegisterYourself(); @@ -897,47 +858,43 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) new TGeoTube("hole_2mbl", radin_2mb, radout_2mb, high_2mb / 2); //d3 new TGeoBBox("lat_box", x_lat_box / 2, y_lat_box / 2, z_lat_box / 2); - ////////////////////// composite shape for rail_MB R + L ////////////////////// + // composite shape for rail_MB R + L // auto * MB_Shape_0 = new TGeoCompositeShape("MB_Shape_0"," V_MBL_0 - mb_box:tr_mb_box - hole_1mbl:tr1_mb + hole_1mbl:tr2_mb -hole_2mbl:combi_hup_mb "); new TGeoCompositeShape("MB_Shape_0", "part_MBL_0 - mb_box:tr_mb_box - hole_1mbl:tr1_mb - hole_2mbl:combi_hup_mb "); - + new TGeoCompositeShape("MB_Shape_0L", "MB_Shape_0 - lat_box:tr_lat1L_box - lat_box:tr_lat2L_box - lat_box:tr_lat3L_box - lat_box:tr_lat4L_box - lat_box:tr_lat5L_box"); - + new TGeoCompositeShape("MB_Shape_0R", "MB_Shape_0 - lat_box:tr_lat1R_box - lat_box:tr_lat2R_box - lat_box:tr_lat3R_box - lat_box:tr_lat4R_box - lat_box:tr_lat5R_box"); - + new TGeoCompositeShape("MB_Shape_1L", "MB_Shape_0L:rot1_MBL_0 - hole_2mbl"); // one piece "completed" - // left and right--> + // left and right > new TGeoCompositeShape("MB_Shape_1R", "MB_Shape_0R:rot1_MBL_0 - hole_2mbl"); - + auto* MB_Shape_2 = new TGeoCompositeShape("MB_Shape_2", " MB_Shape_1L:tr_mbl + MB_Shape_1R:tr_mbr "); - - ///////// + // TGeoVolume *sup_rail_MBL_vol0 = new TGeoVolume("SUPPORT_MBL_VOL0",MB_Shape_0,Al); TGeoVolume* sup_rail_MBL_vol = new TGeoVolume("SUPPORT_MBL_VOL", MB_Shape_2, kMedAlu); - //////////////////////////////// - + sup_rail_MBL->AddNode(sup_rail_MBL_vol, 1, rot_halfR); - - ///////////////////////////////////////////////// =|=|= - + auto* stair = new TGeoVolumeAssembly("stair"); - + stair->AddNode(sup_rail_MBL, 1, new TGeoTranslation(0, 0 - 28.8, 0 + 0.675)); // stair->AddNode(Cross_mft, 2, new TGeoTranslation(0, -28.8, 4.55 + 0.675)); stair->AddNode(Cross_mb0, 3, new TGeoTranslation(0, 1.65 - 28.8, 9.55 + 0.675)); stair->AddNode(Cross_mb0, 4, new TGeoTranslation(0, 6.1 - 28.8, 18.48 + 0.675)); stair->AddNode(Cross_mft, 6, new TGeoTranslation(0, 10.0 - 28.8, 26.4 + 0.675)); stair->AddNode(Cross_mft, 7, new TGeoTranslation(0, 11.6 - 28.8, 29.85 + 0.675)); - + Double_t t_final_x; Double_t t_final_y; Double_t t_final_z; - + Double_t r_final_x; Double_t r_final_y; Double_t r_final_z; - + if (half == 0) { t_final_x = 0; t_final_y = 0; @@ -961,13 +918,13 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto* t_final = new TGeoTranslation("t_final", t_final_x, t_final_y, t_final_z); auto* r_final = new TGeoRotation("r_final", r_final_x, r_final_y, r_final_z); auto* c_final = new TGeoCombiTrans(*t_final, *r_final); - ////////////////////////////////////////////////////////// + auto* Half_3 = new TGeoVolumeAssembly("Half_3"); // Shell radii Float_t Shell_rmax = 60.6 + .7; Float_t Shell_rmin = 37.5 + .7; - + // Rotations and translations auto* tShell_0 = new TGeoTranslation("tShell_0", 0., 0., 3.1 + (25.15 + 1.) / 2.); auto* tShell_1 = new TGeoTranslation("tShell_1", 0., 0., -1.6 - (25.15 + 1.) / 2.); @@ -981,10 +938,10 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto* Rz_inv = new TGeoRotation("Rz_inv", -50., 0., 0.); auto* RShell_Cut = new TGeoRotation("RShell_Cut", 90., 90. - 24., -7.5); auto* RShell_Cut_inv = new TGeoRotation("RShell_Cut_inv", 90., 90. + 24., -7.5); - + auto* cShell_Cut = new TGeoCombiTrans(*tShell_Cut_1, *RShell_Cut); auto* cShell_Cut_inv = new TGeoCombiTrans(*tShell_Cut_1_inv, *RShell_Cut_inv); - + tShell_0->RegisterYourself(); tShell_1->RegisterYourself(); tShellHole->RegisterYourself(); @@ -1008,7 +965,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoShape* ShellHole_1 = new TGeoBBox("ShellHole_1", 42.5 / 4., 80. / 2., 2. / 2. + 0.00001); TGeoShape* ShellHole_2 = new TGeoBBox("ShellHole_2", 58.9 / 4., (Shell_rmin - 2.25) / 2., .4 / 2. + 0.00001); TGeoShape* ShellHole_3 = new TGeoBBox("ShellHole_3", 80. / 4., (Shell_rmin - 11.6) / 2., .4 / 2. + 0.00001); - + // For the extra cut, not sure if this is the shape (apprx. distances) TGeoShape* Shell_Cut_0 = new TGeoTube("Shell_Cut_0", 0., 3.5, 5. / 2.); TGeoShape* Shell_Cut_1 = new TGeoBBox("Shell_Cut_1", 7. / 2., 25. / 2., 5. / 2.); @@ -1021,30 +978,29 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto* Half_3_Shape_4 = new TGeoCompositeShape("Half_3_Shape_4", "(Shell_0:tShell_0 + Half_3_Shape_1+ Shell_1:tShell_1) - (Half_3_Shape_2 + " "Half_3_Shape_2:Rz + Half_3_Shape_2:Rz_inv)+Half_3_Shape_3"); - + auto* Half_3_Volume = new TGeoVolume("Half_3_Volume", Half_3_Shape_4, kMedAlu); // Position of the piece relative to the origin which for this code is the center of the the Framework piece (See // Half_2) - ///-- Half_3->AddNode(Half_3_Volume, 1, new TGeoTranslation(0., 0., -19.)); - + // Half_3->AddNode(Half_3_Volume, 1, new TGeoTranslation(0., 0., -19.)); + TGeoRotation* rot_z180 = new TGeoRotation("rot_z180", 0, 180, 0); /// orig: (180,0,0) rot_z180->RegisterYourself(); - //// in y = l_253.5 - 6. center in (0,6,0) + // in y = l_253.5 - 6. center in (0,6,0) TGeoCombiTrans* combi_coat = new TGeoCombiTrans(0, 0, 19.5 - 0.45, rot_z180); ///TGeoCombiTrans(0,0, -19.5,rot_z180) // -0.5 ->0.45 combi_coat->SetName("combi_coat"); combi_coat->RegisterYourself(); - + Half_3->AddNode(Half_3_Volume, 1, combi_coat); // Half_3_Volume->SetLineColor(1); - - ////////////////////////////////////////////////////// + HalfConeVolume->AddNode(stair, 1, c_final); // HalfConeVolume->AddNode(base, 2, c_final); HalfConeVolume->AddNode(rail_L_R, 3, c_final); // R&L HalfConeVolume->AddNode(Fra_front, 4, c_final); HalfConeVolume->AddNode(midle, 5, c_final); // HalfConeVolume->AddNode(Half_3, 6, c_final); - //// HalfConeVolume->AddNode(Half_3,8, new TGeoCombiTrans(0,0,0-0.5,rot_halfR)); //-0.675 - + // HalfConeVolume->AddNode(Half_3,8, new TGeoCombiTrans(0,0,0-0.5,rot_halfR)); -0.675 + return HalfConeVolume; } From 500ce157893d7b21aebe3d99e2f6e9f638d72947 Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Fri, 15 Mar 2019 11:29:37 -0500 Subject: [PATCH 21/22] Half_cone 3 modified according clang --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 423 +++++++++++---------- 1 file changed, 217 insertions(+), 206 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 99e4e51c8a078..5f0e061528758 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -47,11 +47,14 @@ HalfCone::~HalfCone() = default; //_____________________________________________________________________________ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) { + auto* HalfConeVolume = new TGeoVolumeAssembly("HalfConeVolume"); TGeoMedium* kMedAlu = gGeoManager->GetMedium("MFT_Alu$"); + // Rotation TGeoRotation* rot1 = new TGeoRotation("rot1", 180, -180, 0); + rot1->RegisterYourself(); TGeoRotation* rot2 = new TGeoRotation("rot2", 90, -90, 0); rot2->RegisterYourself(); @@ -74,6 +77,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) r0->RegisterYourself(); // 1st piece Cross_beam_MB0 + auto* Cross_mb0 = new TGeoVolumeAssembly("Cross_mb0"); // rectangular box @@ -81,18 +85,18 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) Double_t y_boxmb0 = 0.6; Double_t z_boxmb0 = 0.6; - // holes tub 1hole tranversal + ///// holes tub 1hole tranversal Double_t radin_1hmb0 = 0.; Double_t radout_1hmb0 = 0.175; // diameter 3.5 H9 (0.35cm) - Double_t high_1hmb0 = 0.7; + Double_t high_1hmb0 = 0.7; TGeoRotation* rot_1hole_mb0 = new TGeoRotation("rot_1hole_mb0", 0, 90, 0); rot_1hole_mb0->RegisterYourself(); - // h = hole + // h= hole TGeoCombiTrans* acombi_1h_mb0 = new TGeoCombiTrans(5.2, 0, 0, rot_1hole_mb0); acombi_1h_mb0->SetName("acombi_1h_mb0"); acombi_1h_mb0->RegisterYourself(); - TGeoCombiTrans* bcombi_1h_mb0 = new TGeoCombiTrans(-5.2, 0, 0, rot_1hole_mb0); // y= + TGeoCombiTrans* bcombi_1h_mb0 = new TGeoCombiTrans(-5.2, 0, 0, rot_1hole_mb0); //y= bcombi_1h_mb0->SetName("bcombi_1h_mb0"); bcombi_1h_mb0->RegisterYourself(); @@ -109,7 +113,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_2hole_mb0->SetName("combi_2hole_mb0"); combi_2hole_mb0->RegisterYourself(); - TGeoCombiTrans* combi_2hole_mb0_b = new TGeoCombiTrans(-6.7, 0, 0, rot_2hole_mb0); // y= + TGeoCombiTrans* combi_2hole_mb0_b = new TGeoCombiTrans(-6.7, 0, 0, rot_2hole_mb0); //y= combi_2hole_mb0_b->SetName("combi_2hole_mb0_b"); combi_2hole_mb0_b->RegisterYourself(); @@ -119,23 +123,26 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) new TGeoTube("hole1_mb0", radin_1hmb0, radout_1hmb0, high_1hmb0 / 2); new TGeoTube("hole2_mb0", radin_2hmb0, radout_2hmb0, high_2hmb0 / 2); - // composite shape for mb0 + ///composite shape for mb0 + auto* c_mb0_Shape_0 = new TGeoCompositeShape("c_mb0_Shape_0", "box_mb0 - hole1_mb0:acombi_1h_mb0 - hole1_mb0:bcombi_1h_mb0 - hole2_mb0:combi_2hole_mb0 - hole2_mb0:combi_2hole_mb0_b"); - // + auto* cross_mb0_Volume = new TGeoVolume("cross_mb0_Volume", c_mb0_Shape_0, kMedAlu); Cross_mb0->AddNode(cross_mb0_Volume, 1); - // 2nd piece cross beam MFT (cbeam) + // 2nd piece cross beam MFT (cbeam) + auto* Cross_mft = new TGeoVolumeAssembly("Cross_mft"); // using the same "box" of the 1 piece // 2hole coaxial Double_t radin_hole_cbeam = 0.; Double_t radout_hole_cbeam = 0.15; // diameter M3 - Double_t high_hole_cbeam = 0.91; /// + Double_t high_hole_cbeam = 0.91; // // same rotation in tub aximatAl "rot_2hole_mb0" + TGeoCombiTrans* combi_hole_1cbeam = new TGeoCombiTrans(6.8, 0, 0, rot_2hole_mb0); combi_hole_1cbeam->SetName("combi_hole_1cbeam"); combi_hole_1cbeam->RegisterYourself(); @@ -148,13 +155,15 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) new TGeoTube("hole_cbeam", radin_hole_cbeam, radout_hole_cbeam, high_hole_cbeam / 2); - // composite shape for cross beam (using the same box of mb0) + // composite shape for cross beam (using the same box of mb0) auto* c_cbeam_Shape = new TGeoCompositeShape("c_cbeam_Shape", "box_mb0 - hole_cbeam:combi_hole_1cbeam - hole_cbeam:combi_hole_2cbeam"); + auto* Cross_mft_Volume = new TGeoVolume("Cross_mft_Volume", c_cbeam_Shape, kMedAlu); Cross_mft->AddNode(Cross_mft_Volume, 1); - + // 3th piece Framework front + auto* Fra_front = new TGeoVolumeAssembly("Fra_front"); auto* Fra_front_L = new TGeoVolumeAssembly("Fra_front_L"); auto* Fra_front_R = new TGeoVolumeAssembly("Fra_front_R"); @@ -162,7 +171,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) Double_t x_box_up = 0.6; // cm Double_t y_box_up = 0.605; Double_t z_box_up = 2.84; - // hole up + // hole up Double_t dia_tub_up = 0.35; Double_t high_tub_up = 0.65; // hole down @@ -172,7 +181,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) Double_t x_boxA_down = 0.8; Double_t y_boxA_down = 0.6; Double_t z_boxA_down = 0.6; - // + Double_t x_boxB_down = 0.6; Double_t y_boxB_down = 0.605; Double_t z_boxB_down = 1.26; // 12.6 @@ -209,6 +218,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) tr_tubdown->RegisterYourself(); // shape for framewor front + new TGeoBBox("box_up", x_box_up / 2, y_box_up / 2, z_box_up / 2); new TGeoTube("tub_up", 0., dia_tub_up / 2, high_tub_up / 2); // @@ -221,16 +231,16 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) new TGeoTube("tubdown", 0., dia_tubdown / 2, high_tubdown / 2); // Composite shapes for Fra_front - new TGeoCompositeShape("fra_front_Shape_0", "box_up:tr1_up + seg_tub:combi_3b + boxB_down:tr3_box + boxA_down:tr_2_box"); + auto* fra_front_Shape_0 = new TGeoCompositeShape("fra_front_Shape_0", "box_up:tr1_up + seg_tub:combi_3b + boxB_down:tr3_box + boxA_down:tr_2_box"); auto* fra_front_Shape_1 = new TGeoCompositeShape("fra_front_Shape_1", "fra_front_Shape_0 - tubdown:tr_tubdown - tub_up:combi_3a"); TGeoRotation* rot_z180x90 = new TGeoRotation("rot_z180x90", 180, 90, 0); //half0_R rot_z180x90->RegisterYourself(); - TGeoRotation* rot_halfR = new TGeoRotation("rot_halfR", 180, 180, 0); //half0_R + TGeoRotation* rot_halfR = new TGeoRotation("rot_halfR", 180, 180, 0); // half0_R rot_halfR->RegisterYourself(); - TGeoCombiTrans* combi_front_L = new TGeoCombiTrans(-7.1, -16.2, 32.5 + 0.675, rot_90x); //x=7.35, y=0, z=15.79 + TGeoCombiTrans* combi_front_L = new TGeoCombiTrans(-7.1, -16.2, 32.5 + 0.675, rot_90x); // x=7.35, y=0, z=15.79 combi_front_L->SetName("combi_front_L"); combi_front_L->RegisterYourself(); @@ -244,11 +254,14 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) Fra_front_L->AddNode(Fra_front_Volume, 1, combi_front_L); Fra_front_R->AddNode(Fra_front_Volume, 1, combi_front_R); + Fra_front->AddNode(Fra_front_L, 1); Fra_front->AddNode(Fra_front_R, 2); // 4th piece "BASE" framework half support + auto* base = new TGeoVolumeAssembly("base"); + // seg tub disc Double_t radin_disc = 23.6; Double_t radout_disc = 30.3; @@ -259,7 +272,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // holes tub 1hole tranversal o3.5 Double_t radin_holeB = 0.; Double_t radout_holeB = 0.175; // diameter 3.5 H11 - Double_t high_holeB = 1.5; // + Double_t high_holeB = 1.5; TGeoTranslation* tr1_holeB = new TGeoTranslation("tr1_holeB", -7.5, -28.8, 0); tr1_holeB->RegisterYourself(); @@ -296,7 +309,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) Double_t high_3hole = 1.35; Double_t ang_in_3hole = 255.253; Double_t ang_fin_3hole = 284.746; - // hole central down |_| since x=-70 to 0 + // hole central down |_| since x=-70 to 0 Double_t xc_box = 7.0; Double_t yc_box = 5.772; Double_t zc_box = 1.4; @@ -312,7 +325,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // box 5 lamin 2 Double_t x_2labox = 51.2; - Double_t y_2labox = 2.8; //C-B + Double_t y_2labox = 2.8; // C-B Double_t z_2labox = 0.303; TGeoTranslation* tr_2la = new TGeoTranslation("tr_2la", 0, -8.1, high_disc / 2); // tr_2la->RegisterYourself(); @@ -327,25 +340,25 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // TGeoRotation *rot_bord1 = new TGeoRotation("rot_bord1", ang_in_1hole +0.0167,0,0); TGeoRotation* rot1_bord1 = new TGeoRotation("rot1_bord1", 14.8, 0, 0); rot1_bord1->RegisterYourself(); - TGeoCombiTrans* combi_bord1 = new TGeoCombiTrans(-26.7995, -13.0215, 0, rot1_bord1); //y= + TGeoCombiTrans* combi_bord1 = new TGeoCombiTrans(-26.7995, -13.0215, 0, rot1_bord1); // y= combi_bord1->SetName("combi_bord1"); combi_bord1->RegisterYourself(); TGeoRotation* rot2_bord1 = new TGeoRotation("rot2_bord1", -50, 0, 0); rot2_bord1->RegisterYourself(); - TGeoCombiTrans* combi2_bord1 = new TGeoCombiTrans(-21.3795, -20.7636, 0, rot2_bord1); //y= + TGeoCombiTrans* combi2_bord1 = new TGeoCombiTrans(-21.3795, -20.7636, 0, rot2_bord1); // y= combi2_bord1->SetName("combi2_bord1"); combi2_bord1->RegisterYourself(); - // + // TGeoRotation* rot1_bord2 = new TGeoRotation("rot1_bord2", 250, 0, 0); rot1_bord2->RegisterYourself(); - TGeoCombiTrans* combi1_bord2 = new TGeoCombiTrans(-9.0527, -23.3006, 0, rot1_bord2); //y= + TGeoCombiTrans* combi1_bord2 = new TGeoCombiTrans(-9.0527, -23.3006, 0, rot1_bord2); // y= combi1_bord2->SetName("combi1_bord2"); combi1_bord2->RegisterYourself(); // e|°____°| TGeoRotation* rot_cent_bord = new TGeoRotation("rot_cent_bord", 90, 0, 0); rot_cent_bord->RegisterYourself(); - TGeoCombiTrans* combi_cent_bord = new TGeoCombiTrans(-6.5, -27.094, 0, rot_cent_bord); //y= + TGeoCombiTrans* combi_cent_bord = new TGeoCombiTrans(-6.5, -27.094, 0, rot_cent_bord); // y= combi_cent_bord->SetName("combi_cent_bord"); combi_cent_bord->RegisterYourself(); // box tonge @@ -356,8 +369,8 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) tr_tong->RegisterYourself(); // circular central hole1 to conexion with other parts Double_t radin_hole1 = 0; - Double_t radout_hole1 = 0.4; // - Double_t high_hole1 = 1.36; // + Double_t radout_hole1 = 0.4; + Double_t high_hole1 = 1.36; TGeoTranslation* tr_hole1 = new TGeoTranslation("tr_hole1", 0, -28.0, 0); // tonge tr_hole1->RegisterYourself(); @@ -366,7 +379,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoTranslation* tr3_hole1 = new TGeoTranslation("tr3_hole1", 26.5, -8.5, 0); // right tr3_hole1->RegisterYourself(); - + // circular hole2 ; hole2 r=6.7 Double_t radin_hole2 = 0; Double_t radout_hole2 = 0.335; // diameter 6.7 @@ -377,16 +390,17 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoTranslation* tr2_hole2 = new TGeoTranslation("tr2_hole2", 28.0, -8.5, 0); // tr2_hole2->RegisterYourself(); - // hole "0" two tubs together + //////////// hole "0" two tubs together Double_t radin_T1 = 0.325; // diam 0.65cm Double_t radout_T1 = 0.55; // dia 1.1 - Double_t high_T1 = 1.2; /// dz 6 + Double_t high_T1 = 1.2; // dz 6 Double_t radin_T2 = 0; - Double_t radout_T2 = 1.1; // - Double_t high_T2 = 1.2; /// dz 6 - + Double_t radout_T2 = 1.1; + Double_t high_T2 = 1.2; // dz 6 + // shape for base + new TGeoTubeSeg("disc", radin_disc, radout_disc, high_disc / 2, ang_in_disc, ang_fin_disc); new TGeoBBox("box1", x_1box / 2, y_1box / 2, z_1box / 2); @@ -397,9 +411,9 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) new TGeoBBox("cbox", xc_box / 2, yc_box / 2, zc_box / 2); new TGeoBBox("tongbox", x_tong / 2, y_tong / 2, z_tong / 2); - new TGeoTubeSeg("seg_1hole", radin_1hole, radout_1hole, high_1hole / 2, ang_in_1hole, ang_fin_1hole); //r_in,r_out,dZ,ang,ang + new TGeoTubeSeg("seg_1hole", radin_1hole, radout_1hole, high_1hole / 2, ang_in_1hole, ang_fin_1hole); // r_in,r_out,dZ,ang,ang new TGeoTubeSeg("seg_2hole", radin_2hole, radout_2hole, high_2hole / 2, ang_in_2hole, ang_fin_2hole); - new TGeoTubeSeg("seg_3hole", radin_3hole, radout_3hole, high_3hole / 2, ang_in_3hole, ang_fin_3hole); // |u| + new TGeoTubeSeg("seg_3hole", radin_3hole, radout_3hole, high_3hole / 2, ang_in_3hole, ang_fin_3hole); // y|u| new TGeoTubeSeg("seg_bord", radin_bord, radout_bord, high_bord / 2, ang_in_bord, ang_fin_bord); new TGeoTube("circ_hole1", radin_hole1, radout_hole1, high_hole1 / 2); @@ -409,16 +423,18 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) new TGeoTube("circ_holeB", radin_holeB, radout_holeB, high_holeB / 2); // composite shape for base - new TGeoCompositeShape("base_Shape_0", " disc -box1 - box2 - box3 - circ_holeB:tr1_holeB - circ_holeB:tr2_holeB"); - new TGeoCompositeShape("base_Shape_1", "(seg_1hole - seg_bord:combi_bord1 - seg_bord:combi2_bord1) + seg_2hole -seg_bord:combi1_bord2 + cbox:tr_cbox"); - new TGeoCompositeShape("base_Shape_2", " seg_3hole + seg_bord:combi_cent_bord"); //-seg_bord:combi_cent_bord + auto* base_Shape_0 = new TGeoCompositeShape("base_Shape_0", " disc -box1 - box2 - box3 - circ_holeB:tr1_holeB - circ_holeB:tr2_holeB"); + auto* base_Shape_1 = new TGeoCompositeShape("base_Shape_1", "(seg_1hole - seg_bord:combi_bord1 - seg_bord:combi2_bord1) + seg_2hole -seg_bord:combi1_bord2 + cbox:tr_cbox"); - new TGeoCompositeShape("base_Shape_3", " labox1:tr_la + labox2:tr_2la "); + auto* base_Shape_2 = new TGeoCompositeShape("base_Shape_2", " seg_3hole + seg_bord:combi_cent_bord"); // seg_bord:combi_cent_bord + + auto* base_Shape_3 = new TGeoCompositeShape("base_Shape_3", " labox1:tr_la + labox2:tr_2la "); auto* base_Shape_4 = new TGeoCompositeShape("base_Shape_4", "base_Shape_0 - base_Shape_1 - base_Shape_1:rot1 + base_Shape_2 + tongbox:tr_tong - circ_hole1:tr_hole1 - circ_hole1:tr2_hole1 - circ_hole1:tr3_hole1 - circ_hole2:tr1_hole2 - circ_hole2:tr2_hole2 - base_Shape_3 "); // auto * base_Shape_5 = new TGeoCompositeShape("base_Shape_5","disc-box1 -box2 -box3 -seg_1hole -seg_2hole +seg_3hole -seg_1hole:rot1-seg_2hole:rot1 - cbox:tr_cbox - labox:tr_la - labox2:tr_2la + seg_bord "); + // auto * base0_Volume = new TGeoVolume("base0_Volume",base_Shape_0,kMedAlu); // auto * base1_Volume = new TGeoVolume("base1_Volume",base_Shape_1,kMedAlu); // auto * base2_Volume = new TGeoVolume("base2_Volume",base_Shape_2,kMedAlu); @@ -428,56 +444,56 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) base->AddNode(base4_Volume, 2, rot_base); // base->AddNode(base4_Volume,2); - - // 5th piece MIDLE Framework midle + + // 5th piece MIDLE Framework midle auto* midle = new TGeoVolumeAssembly("Midle"); auto* midle_L = new TGeoVolumeAssembly("Midle_L"); auto* midle_R = new TGeoVolumeAssembly("Midle_R"); - + // box up to quit and to join - Double_t x_midle = 0.8; // dx=4 - Double_t y_midle = 3.495; // y=34.9 - Double_t z_midle = 0.62; // z=6 + Double_t x_midle = 0.8; //dx=4 + Double_t y_midle = 3.495; //y=34.9 + Double_t z_midle = 0.62; //z=6 // tr1 to join with arc - TGeoTranslation* tr1_midle_box = new TGeoTranslation("tr1_midle_box", -14.4, -0.745, 0); //-152,-17.45,0 + TGeoTranslation* tr1_midle_box = new TGeoTranslation("tr1_midle_box", -14.4, -0.745, 0); // -152,-17.45,0 tr1_midle_box->RegisterYourself(); // tr2 to quiet - TGeoTranslation* tr2_midle_box = new TGeoTranslation("tr2_midle_box", -15.2, -0.745, 0); //-152,-17.45,0 + TGeoTranslation* tr2_midle_box = new TGeoTranslation("tr2_midle_box", -15.2, -0.745, 0); // -152,-17.45,0 tr2_midle_box->RegisterYourself(); - + // box down_1 Double_t x_midle_d1box = 0.4; // dx=4 Double_t y_midle_d1box = 0.28; Double_t z_midle_d1box = 0.66; - TGeoTranslation* tr_midle_d1box = new TGeoTranslation("tr_midle_d1box", -7.3, -11.96, 0.); //81 + TGeoTranslation* tr_midle_d1box = new TGeoTranslation("tr_midle_d1box", -7.3, -11.96, 0.); // 81 tr_midle_d1box->RegisterYourself(); - + // box down_2 Double_t x_midle_d2box = 0.8; // dx=4 Double_t y_midle_d2box = 1.0; Double_t z_midle_d2box = 0.66; // TGeoTranslation* tr_midle_d2box = new TGeoTranslation("tr_midle_d2box", -7.5, -12.6249, 0); // 81 tr_midle_d2box->RegisterYourself(); - + // arc circ part Double_t radin_midle = 14.0; Double_t radout_midle = 15.0; // - Double_t high_midle = 0.6; /// + Double_t high_midle = 0.6; // Double_t ang_in_midle = 180; Double_t ang_fin_midle = 238.21; // alfa=57.60 - + // circular hole1 ; hole_midle d=3.5 Double_t radin_mid_1hole = 0.; Double_t radout_mid_1hole = 0.175; // diameter 3.5 Double_t high_mid_1hole = 1.5; // 2.4 - + TGeoRotation* rot_mid_1hole = new TGeoRotation("rot_mid_1hole", 90, 90, 0); rot_mid_1hole->RegisterYourself(); TGeoCombiTrans* combi_mid_1tubhole = new TGeoCombiTrans(-14.2, 0.325, 0, rot_mid_1hole); // combi_mid_1tubhole->SetName("combi_mid_1tubhole"); combi_mid_1tubhole->RegisterYourself(); - + // circular hole2 ; hole_midle d=3 Double_t radin_mid_2hole = 0.; Double_t radout_mid_2hole = 0.15; // diameter 3 @@ -486,7 +502,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoCombiTrans* combi_mid_2tubhole = new TGeoCombiTrans(-7.7, -12.355, 0, rot_mid_1hole); //x=81 combi_mid_2tubhole->SetName("combi_mid_2tubhole"); combi_mid_2tubhole->RegisterYourself(); - + // shape for midle new TGeoBBox("midle_box", x_midle / 2, y_midle / 2, z_midle / 2); @@ -501,85 +517,85 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) new TGeoTube("mid_2tubhole", radin_mid_2hole, radout_mid_2hole, high_mid_2hole / 2); // composite shape for midle - - new TGeoCompositeShape("midle_Shape_0", " arc_midle + midle_box:tr1_midle_box - midle_box:tr2_midle_box -midle_d1box:tr_midle_d1box - midle_d2box:tr_midle_d2box"); - + + auto* midle_Shape_0 = new TGeoCompositeShape("midle_Shape_0", " arc_midle + midle_box:tr1_midle_box - midle_box:tr2_midle_box -midle_d1box:tr_midle_d1box - midle_d2box:tr_midle_d2box"); + auto* midle_Shape_1 = new TGeoCompositeShape("midle_Shape_1", " midle_Shape_0 -mid_1tubhole:combi_mid_1tubhole-mid_2tubhole:combi_mid_2tubhole"); - + TGeoRotation* rot_midlez = new TGeoRotation("rot_midley", 180, 180, 0); rot_midlez->RegisterYourself(); - TGeoCombiTrans* combi_midle_L = new TGeoCombiTrans(0, -7.625, 24.15 + 0.675, rot_90x); //x=7.35, y=0, z=15.79- 0,-7.625,24.15+0.675-80) + TGeoCombiTrans* combi_midle_L = new TGeoCombiTrans(0, -7.625, 24.15 + 0.675, rot_90x); // x=7.35, y=0, z=15.79- 0,-7.625,24.15+0.675-80) combi_midle_L->SetName("combi_midle_L"); combi_midle_L->RegisterYourself(); - - TGeoTranslation* tr_midle_L = new TGeoTranslation("tr_midle_L", 0, -7.625, 24.15 + 0.675); //-152,-17.45,0 + + TGeoTranslation* tr_midle_L = new TGeoTranslation("tr_midle_L", 0, -7.625, 24.15 + 0.675); // -152,-17.45,0 tr_midle_L->RegisterYourself(); - - TGeoCombiTrans* combi_midle_R = new TGeoCombiTrans(0, -7.625, 24.15 + 0.675, rot_midlez); //x=7.35, y=0, z=15.79 + + TGeoCombiTrans* combi_midle_R = new TGeoCombiTrans(0, -7.625, 24.15 + 0.675, rot_midlez); // x=7.35, y=0, z=15.79 combi_midle_R->SetName("combi_midle_R"); combi_midle_R->RegisterYourself(); - + auto* midle_Volume = new TGeoVolume("midle_Volume", midle_Shape_1, kMedAlu); - + midle_L->AddNode(midle_Volume, 1, tr_midle_L); midle_R->AddNode(midle_Volume, 1, combi_midle_R); - + // midle->AddNode(midle_Volume,1); midle->AddNode(midle_L, 1); midle->AddNode(midle_R, 2); - + // new piece _/ \_ // Support_rail_L & Support_rail_R auto* rail_L_R = new TGeoVolumeAssembly("rail_L_R"); - // 6 piece RAIL LEFT --RL---0000------ + // 6 piece RAIL LEFT RL0000 auto* rail_L = new TGeoVolumeAssembly("rail_L"); - // var box down_2 - Double_t x_RL_1box = 3.0; //dx=15 + // box down_2 + Double_t x_RL_1box = 3.0; // dx=15 Double_t y_RL_1box = 1.21; // dy=6, -dy=6 Double_t z_RL_1box = 0.8; // dz=4 to quit - TGeoTranslation* tr_RL_1box = new TGeoTranslation(0, y_RL_1box / 2, 1.825); //81 + TGeoTranslation* tr_RL_1box = new TGeoTranslation(0, y_RL_1box / 2, 1.825); // 81 tr_RL_1box->SetName("tr_RL_1box"); tr_RL_1box->RegisterYourself(); - + TGeoXtru* xtru_RL1 = new TGeoXtru(2); xtru_RL1->SetName("S_XTRU_RL1"); - Double_t x_RL1[5] = { -1.5, 1.5, 0.5, 0.5, -1.5 }; //vertices - Double_t y_RL1[5] = { 1.2, 1.2, 2.2, 8.2, 8.2 }; //357.5,357.5,250.78,145.91}; + Double_t x_RL1[5] = { -1.5, 1.5, 0.5, 0.5, -1.5 }; // 93,93,73,73,-15}; //vertices + Double_t y_RL1[5] = { 1.2, 1.2, 2.2, 8.2, 8.2 }; // 357.5,357.5,250.78,145.91}; xtru_RL1->DefinePolygon(5, x_RL1, y_RL1); xtru_RL1->DefineSection(0, -2.225, 0., 0., 1); // (plane,-zplane/ +zplane, x0, y0,(x/y)) xtru_RL1->DefineSection(1, 2.225, 0., 0., 1); - + TGeoXtru* xtru_RL2 = new TGeoXtru(2); xtru_RL2->SetName("S_XTRU_RL2"); - + Double_t x_RL2[8] = { -1.5, 0.5, 0.5, 9.3, 9.3, 7.3, 7.3, -1.5 }; // vertices Double_t y_RL2[8] = { 8.2, 8.2, 13.863, 24.35, 35.75, 35.75, 25.078, 14.591 }; - + xtru_RL2->DefinePolygon(8, x_RL2, y_RL2); - + xtru_RL2->DefineSection(0, 0.776, 0, 0, 1); // (plane,-zplane/+zplane, x0, y0,(x/y)) xtru_RL2->DefineSection(1, 2.225, 0, 0, 1); - + // box knee Double_t x_RL_kneebox = 1.5; // dx=7.5 Double_t y_RL_kneebox = 3.5; // dy=17.5 - Double_t z_RL_kneebox = 1.5; // dz=7.5 to quit + Double_t z_RL_kneebox = 1.5; // dz=7.5 to quit TGeoTranslation* tr_RL_kneebox = new TGeoTranslation(0, 0, 0); // 81 x =-2.5, y=145.91 tr_RL_kneebox->SetName("tr_RL_kneebox"); tr_RL_kneebox->RegisterYourself(); - + TGeoRotation* rot_knee = new TGeoRotation("rot_knee", -40, 0, 0); rot_knee->SetName("rot_knee"); rot_knee->RegisterYourself(); - TGeoCombiTrans* combi_knee = new TGeoCombiTrans(0.96, 1.75 + 0.81864, 0, rot_knee); //y= + TGeoCombiTrans* combi_knee = new TGeoCombiTrans(0.96, 1.75 + 0.81864, 0, rot_knee); // y= combi_knee->SetName("combi_knee"); combi_knee->RegisterYourself(); // quit diagona-> qdi - Double_t x_qdi_box = 3.1; // + Double_t x_qdi_box = 3.1; // Double_t y_qdi_box = 7.159; // Double_t z_qdi_box = 3.005; // @@ -589,27 +605,27 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_qdi->SetName("combi_qdi"); combi_qdi->RegisterYourself(); // knee small - + TGeoXtru* xtru3_RL = new TGeoXtru(2); xtru3_RL->SetName("xtru3_RL"); - + Double_t x_3RL[6] = { -0.75, 0.75, 0.75, 2.6487, 1.4997, -0.75 }; // vertices Double_t y_3RL[6] = { -1.75, -1.75, 1.203, 3.465, 4.4311, 1.75 }; - + xtru3_RL->DefinePolygon(6, x_3RL, y_3RL); xtru3_RL->DefineSection(0, -0.75, 0, 0, 1); // (plane,-zplane/+zplane, x0, y0,(x/y)) xtru3_RL->DefineSection(1, 0.76, 0, 0, 1); - + TGeoTranslation* tr_vol3_RL = new TGeoTranslation(-0.25, 12.66, 0); // tr_vol3_RL->SetName("tr_vol3_RL"); tr_vol3_RL->RegisterYourself(); - + // circular holes could be for rail R and L .. // circular hole1_RL (a(6,22)); hole_midle d=6.5 H11 Double_t radin_RL1hole = 0.; Double_t radout_RL1hole = 0.325; // diameter 3.5 - Double_t high_RL1hole = 1.0; /// - + Double_t high_RL1hole = 1.0; // + TGeoRotation* rot_RL1hole = new TGeoRotation("rot_RL1hole", 0, 0, 0); rot_RL1hole->RegisterYourself(); TGeoCombiTrans* combi_RL1hole = new TGeoCombiTrans(0.7, 0.6, 1.85, rot_RL1hole); //y= @@ -626,179 +642,174 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoCombiTrans* combi_ir1_RL = new TGeoCombiTrans(8.62, 24.75, 1.5, rot_ir_RL); combi_ir1_RL->SetName("combi_ir1_RL"); combi_ir1_RL->RegisterYourself(); - + TGeoCombiTrans* combi_ir2_RL = new TGeoCombiTrans(8.6, 33.15, 1.5, rot_ir_RL); combi_ir2_RL->SetName("combi_ir2_RL"); combi_ir2_RL->RegisterYourself(); - - // shape for Rail L geom + + // shape for Rail L geom new TGeoBBox("RL_1box", x_RL_1box / 2, y_RL_1box / 2, z_RL_1box / 2); - new TGeoBBox("RL_kneebox", x_RL_kneebox / 2, y_RL_kneebox / 2, z_RL_kneebox / 2); //no_ used + new TGeoBBox("RL_kneebox", x_RL_kneebox / 2, y_RL_kneebox / 2, z_RL_kneebox / 2); // no_ used new TGeoBBox("qdi_box", x_qdi_box / 2, y_qdi_box / 2, z_qdi_box / 2); - - // E auto *s_RL1hole=new TGeoTube("S_RL1HOLE",radin_RL1hole,radout_RL1hole,high_RL1hole/2); - // -auto *s_irL_hole=new TGeoTube("S_irL_HOLE",radin_ir_railL,radout_ir_railL,high_ir_railL/2); - - // composite shape for rail L - - auto* RL_Shape_0 = new TGeoCompositeShape("RL_Shape_0", " xtru3_RL:tr_vol3_RL + S_XTRU_RL1 + S_XTRU_RL2 + RL_1box:tr_RL_1box - qdi_box:combi_qdi"); // - + + // auto *s_RL1hole=new TGeoTube("S_RL1HOLE",radin_RL1hole,radout_RL1hole,high_RL1hole/2); + // auto *s_irL_hole=new TGeoTube("S_irL_HOLE",radin_ir_railL,radout_ir_railL,high_ir_railL/2); + // composite shape for rail L + + auto* RL_Shape_0 = new TGeoCompositeShape("RL_Shape_0", " xtru3_RL:tr_vol3_RL + S_XTRU_RL1 + S_XTRU_RL2 + RL_1box:tr_RL_1box - qdi_box:combi_qdi"); + TGeoVolume* rail_L_vol0 = new TGeoVolume("RAIL_L_VOL0", RL_Shape_0, kMedAlu); - + rail_L->AddNode(rail_L_vol0, 1, new TGeoTranslation(0., 0., 1.5)); - + // piece 7th RAIL RIGHT - // E auto *rail_R = new TGeoVolumeAssembly("rail_R"); - - Double_t x_RR_1box = 3.0; //dx=15 + // auto *rail_R = new TGeoVolumeAssembly("rail_R"); + + Double_t x_RR_1box = 3.0; // dx=15 Double_t y_RR_1box = 1.2; // dy=6, -dy=6 - Double_t z_RR_1box = 0.8; // dz=4 to quit + Double_t z_RR_1box = 0.8; // dz=4 to quit TGeoTranslation* tr_RR_1box = new TGeoTranslation("tr_RR_1box", 0, 0.6, 1.825); // 81 tr_RR_1box->RegisterYourself(); - // - + TGeoXtru* part_RR1 = new TGeoXtru(2); part_RR1->SetName("part_RR1"); // TGeoVolume *vol_RR1 = gGeoManager->MakeXtru("S_part_RR1",kMedAlu,2); // TGeoXtru *part_RR1 = (TGeoXtru*)vol_RR1->GetShape(); - + Double_t x_RR1[5] = { -1.5, -0.5, -0.5, 1.5, 1.5 }; // C,D,K,L,C' //vertices Double_t y_RR1[5] = { 1.2, 2.2, 8.2, 8.2, 1.2 }; // 357.5,357.5,250.78,145.91}; - + part_RR1->DefinePolygon(5, x_RR1, y_RR1); part_RR1->DefineSection(0, -2.225, 0, 0, 1); // (plane,-zplane/ +zplane, x0, y0,(x/y)) part_RR1->DefineSection(1, 2.225, 0, 0, 1); - + TGeoXtru* part_RR2 = new TGeoXtru(2); part_RR2->SetName("part_RR2"); // TGeoVolume *vol_RR2 = gGeoManager->MakeXtru("part_RR2",Al,2); // TGeoXtru *xtru_RR2 = (TGeoXtru*)vol_RR2->GetShape(); - - Double_t x_RR2[8] = { -0.5, -0.5, -9.3, -9.3, -7.3, -7.3, 1.5, 1.5 }; // K,E,F,G,H,I,J,L vertices + + Double_t x_RR2[8] = { -0.5, -0.5, -9.3, -9.3, -7.3, -7.3, 1.5, 1.5 }; // K,E,F,G,H,I,J,L // vertices Double_t y_RR2[8] = { 8.2, 13.863, 24.35, 35.75, 35.75, 25.078, 14.591, 8.2 }; - + part_RR2->DefinePolygon(8, x_RR2, y_RR2); part_RR2->DefineSection(0, 0.776, 0, 0, 1); // (plane,-zplane/+zplane, x0, y0,(x/y)) part_RR2->DefineSection(1, 2.225, 0, 0, 1); - + // knee (small) - + TGeoXtru* part_RR3 = new TGeoXtru(2); part_RR3->SetName("part_RR3"); - Double_t x_3RR[6] = { 1.0, 1.0, -1.2497, -2.2138, -0.5, -0.5 }; //R,Q,P,O,N.M // vertices + Double_t x_3RR[6] = { 1.0, 1.0, -1.2497, -2.2138, -0.5, -0.5 }; // R,Q,P,O,N.M // vertices Double_t y_3RR[6] = { 10.91, 14.41, 17.0911, 15.9421, 13.86, 10.91 }; - + part_RR3->DefinePolygon(6, x_3RR, y_3RR); part_RR3->DefineSection(0, -0.75, 0, 0, 1); // (plane,-zplane/+zplane, x0, y0,(x/y)) part_RR3->DefineSection(1, 0.78, 0, 0, 1); - + TGeoTranslation* tr_vol3_RR = new TGeoTranslation("tr_vol3_RR", -0.25, 12.66, 0); // tr_vol3_RR->RegisterYourself(); - - // quit diagona -> qdi + + // quit diagona-> qdi Double_t x_qdi_Rbox = 3.1; // dx=1.5 Double_t y_qdi_Rbox = 7.159; // Double_t z_qdi_Rbox = 3.005; // - + TGeoRotation* rot_Rqdi = new TGeoRotation("rot_Rqdi", 0, 24.775, 0); rot_Rqdi->RegisterYourself(); - TGeoCombiTrans* combi_Rqdi = new TGeoCombiTrans(0, 5.579, -2.087, rot_Rqdi); //y= + TGeoCombiTrans* combi_Rqdi = new TGeoCombiTrans(0, 5.579, -2.087, rot_Rqdi); // y= combi_Rqdi->SetName("combi_Rqdi"); combi_Rqdi->RegisterYourself(); - - // holes - - // circular hole_a. diameter=6.5 (a(6,22)); hole_midle d=6.5 H11 + + // holes circular hole_a. diameter=6.5 (a(6,22)); hole_midle d=6.5 H11 Double_t radin_a_rail = 0.; Double_t radout_a_rail = 0.325; // diameter 3.5 - Double_t high_a_rail = 0.82; /// - - TGeoTranslation* tr_a_RR = new TGeoTranslation("tr_a_RR", -0.7, 0.6, 1.825); //right + Double_t high_a_rail = 0.82; // + + TGeoTranslation* tr_a_RR = new TGeoTranslation("tr_a_RR", -0.7, 0.6, 1.825); // right tr_a_RR->RegisterYourself(); // circular hole_ir. diameter=M3 (3 mm)) prof trou:8, tar:6mm Double_t radin_ir_rail = 0.; Double_t radout_ir_rail = 0.15; // diameter 3 - Double_t high_ir_rail = 3.2; // 19 --- + Double_t high_ir_rail = 3.2; // 19 TGeoRotation* rot_ir_RR = new TGeoRotation("rot_ir_RR", 90, 90, 0); rot_ir_RR->RegisterYourself(); // in y = l_253.5 - 6. center in (0,6,0) TGeoCombiTrans* combi_ir_RR = new TGeoCombiTrans(-8.62, 24.75, 1.5, rot_ir_RR); combi_ir_RR->SetName("combi_ir_RR"); combi_ir_RR->RegisterYourself(); - + TGeoCombiTrans* combi_ir2_RR = new TGeoCombiTrans(-8.6, 33.15, 1.5, rot_ir_RR); combi_ir2_RR->SetName("combi_ir2_RR"); combi_ir2_RR->RegisterYourself(); - - TGeoCombiTrans* combi_rail_R = new TGeoCombiTrans(24.1, -1.825, 0, rot_90x); //y= + + TGeoCombiTrans* combi_rail_R = new TGeoCombiTrans(24.1, -1.825, 0, rot_90x); // y= combi_rail_R->SetName("combi_rail_R"); combi_rail_R->RegisterYourself(); - TGeoCombiTrans* combi_rail_L = new TGeoCombiTrans(-24.1, -1.825, 0, rot_90x); //y= + TGeoCombiTrans* combi_rail_L = new TGeoCombiTrans(-24.1, -1.825, 0, rot_90x); // y= combi_rail_L->SetName("combi_rail_L"); combi_rail_L->RegisterYourself(); - + // trasl L and R TGeoTranslation* tr_sr_l = new TGeoTranslation("tr_sr_l", -15.01, 0, 0); // tr_sr_l->RegisterYourself(); TGeoTranslation* tr_sr_r = new TGeoTranslation("tr_sr_r", 15.01, 0, 0); // tr_sr_r->RegisterYourself(); - - // shape for rail R + + // shape for rail R new TGeoBBox("RR_1box", x_RR_1box / 2, y_RR_1box / 2, z_RR_1box / 2); - - // E auto *s_qdi_Rbox =new TGeoBBox("S_QDI_RBOX", x_qdi_Rbox/2,y_qdi_Rbox/2,z_qdi_Rbox/2); - // E auto *s_ir_hole=new TGeoTube("S_ir_HOLE",radin_ir_rail,radout_ir_rail,high_ir_rail/2); + // auto *s_qdi_Rbox =new TGeoBBox("S_QDI_RBOX", x_qdi_Rbox/2,y_qdi_Rbox/2,z_qdi_Rbox/2); - // E auto *s_cc_hole=new TGeoTube("S_CC_HOLE",radin_cc_rail,radout_cc_rail,high_cc_rail/2); + // auto *s_ir_hole=new TGeoTube("S_ir_HOLE",radin_ir_rail,radout_ir_rail,high_ir_rail/2); + + // auto *s_cc_hole=new TGeoTube("S_CC_HOLE",radin_cc_rail,radout_cc_rail,high_cc_rail/2); // composite shape for rail R - new TGeoCompositeShape("RR_Shape_0", "RR_1box:tr_RR_1box + part_RR1 + part_RR2 + part_RR3 - qdi_box:combi_qdi "); - + auto* RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0", "RR_1box:tr_RR_1box + part_RR1 + part_RR2 + part_RR3 - qdi_box:combi_qdi "); + // auto * RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0","RR_1box:tr_RR_1box+ S_part_RR1 + part_RR2 +part_RR3- qdi_box:combi_qdi + S_ir_HOLE:combi_ir_RR +S_ir_HOLE:combi_ir2_RR "); //-RR_1box:tr_RL_1box- S_b_HOLE:tr_b_RR -S_CC_HOLE:combi_cc2_RR - + // JOIN only for show L and R parts - auto* rail_L_R_Shape = new TGeoCompositeShape("RAIL_L_R_Shape", " RL_Shape_0:combi_rail_L + RR_Shape_0:combi_rail_R"); - + TGeoVolume* rail_L_R_vol0 = new TGeoVolume("RAIL_L_R_VOL0", rail_L_R_Shape, kMedAlu); - + TGeoRotation* rot_rLR = new TGeoRotation("rot_rLR", 180, 180, 0); rot_rLR->RegisterYourself(); - TGeoCombiTrans* combi_rLR = new TGeoCombiTrans(0, -6.9, -0.5, rot_rLR); //0,-6.9,-0.5-80 + TGeoCombiTrans* combi_rLR = new TGeoCombiTrans(0, -6.9, -0.5, rot_rLR); // 0,-6.9,-0.5-80 combi_rLR->SetName("combi_rLR"); combi_rLR->RegisterYourself(); rail_L_R->AddNode(rail_L_R_vol0, 2, combi_rLR); - - // piece 8th support rail MB-\_ - + + // piece 8th support rail MB \_ + auto* sup_rail_MBL = new TGeoVolumeAssembly("sup_rail_MBL"); - + TGeoXtru* part_MBL_0 = new TGeoXtru(2); - part_MBL_0->SetName("part_MBL_0"); //V-MBL_0 - + part_MBL_0->SetName("part_MBL_0"); // V-MBL_0 + // vertices a,b,c,d,e,f,g,h Double_t x[8] = { 0., 0, 6.1, 31.55, 34.55, 34.55, 31.946, 6.496 }; Double_t y[8] = { -0.4, 0.4, 0.4, 13.0, 13.0, 12.2, 12.2, -0.4 }; part_MBL_0->DefinePolygon(8, x, y); - part_MBL_0->DefineSection(0, -0.4, 0, 0, 1); //(plane, -zplane/ +zplane,x0,y0,(x/y)) + part_MBL_0->DefineSection(0, -0.4, 0, 0, 1); // (plane, -zplane/ +zplane,x0,y0,(x/y)) part_MBL_0->DefineSection(1, 0.4, 0, 0, 1); TGeoRotation* rot1_MBL_0 = new TGeoRotation("rot1_MBL_0", -90, -90, 90); rot1_MBL_0->RegisterYourself(); - + // quit box in diag - Double_t x_mb_box = 0.8; //dx=4 + Double_t x_mb_box = 0.8; // dx=4 Double_t y_mb_box = 0.8; // dy=4 - Double_t z_mb_box = 0.81; // dz=4 to quit + Double_t z_mb_box = 0.81; // dz=4 to quit TGeoTranslation* tr_mb_box = new TGeoTranslation("tr_mb_box", 24.05, 9.55, 0); // 240.5 tr_mb_box->RegisterYourself(); // lateral hole-box - Double_t x_lat_box = 0.7; // dx=0.35 + Double_t x_lat_box = 0.7; //dx=0.35 Double_t y_lat_box = 1.8; // dy=0.9 Double_t z_lat_box = 0.2; // dz=0.1 TGeoTranslation* tr_lat1L_box = new TGeoTranslation("tr_lat1L_box", 4.6, 0, 0.4); // @@ -830,7 +841,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoTranslation* tr1_mb = new TGeoTranslation("tr1_mb", 18.48, 6.1, 0.); // right tr1_mb->RegisterYourself(); - TGeoTranslation* tr2_mb = new TGeoTranslation("tr2_mb", 24.15, 8.9, 0.); //right + TGeoTranslation* tr2_mb = new TGeoTranslation("tr2_mb", 24.15, 8.9, 0.); // right tr2_mb->RegisterYourself(); // circular hole_2mbl inclined and hole-up.diameter=M3 (3 mm)) prof , tar:8mm @@ -840,61 +851,61 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoRotation* rot_hole2_MBL = new TGeoRotation("rot_hole2_MBL", 0, 90, 0); rot_hole2_MBL->RegisterYourself(); - + TGeoTranslation* tr_mbl = new TGeoTranslation("tr_mbl", -7.5, 0., 0.); // tr_mbl->RegisterYourself(); - + TGeoTranslation* tr_mbr = new TGeoTranslation("tr_mbr", 7.5, 0, 0); // tr_mbr->RegisterYourself(); - + // hole up || hup - TGeoCombiTrans* combi_hup_mb = new TGeoCombiTrans(32.5, 12.6, 0, rot_90x); // y= + TGeoCombiTrans* combi_hup_mb = new TGeoCombiTrans(32.5, 12.6, 0, rot_90x); //y= combi_hup_mb->SetName("combi_hup_mb"); combi_hup_mb->RegisterYourself(); - /////////////////////// shape for rail MB ///////// + // shape for rail MB new TGeoBBox("mb_box", x_mb_box / 2, y_mb_box / 2, z_mb_box / 2); - new TGeoTube("hole_1mbl", radin_1mb, radout_1mb, high_1mb / 2); //d3.5 - new TGeoTube("hole_2mbl", radin_2mb, radout_2mb, high_2mb / 2); //d3 + new TGeoTube("hole_1mbl", radin_1mb, radout_1mb, high_1mb / 2); // d3.5 + new TGeoTube("hole_2mbl", radin_2mb, radout_2mb, high_2mb / 2); // d3 new TGeoBBox("lat_box", x_lat_box / 2, y_lat_box / 2, z_lat_box / 2); - // composite shape for rail_MB R + L + // composite shape for rail_MB R + L // auto * MB_Shape_0 = new TGeoCompositeShape("MB_Shape_0"," V_MBL_0 - mb_box:tr_mb_box - hole_1mbl:tr1_mb + hole_1mbl:tr2_mb -hole_2mbl:combi_hup_mb "); - new TGeoCompositeShape("MB_Shape_0", "part_MBL_0 - mb_box:tr_mb_box - hole_1mbl:tr1_mb - hole_2mbl:combi_hup_mb "); - - new TGeoCompositeShape("MB_Shape_0L", "MB_Shape_0 - lat_box:tr_lat1L_box - lat_box:tr_lat2L_box - lat_box:tr_lat3L_box - lat_box:tr_lat4L_box - lat_box:tr_lat5L_box"); - - new TGeoCompositeShape("MB_Shape_0R", "MB_Shape_0 - lat_box:tr_lat1R_box - lat_box:tr_lat2R_box - lat_box:tr_lat3R_box - lat_box:tr_lat4R_box - lat_box:tr_lat5R_box"); - - new TGeoCompositeShape("MB_Shape_1L", "MB_Shape_0L:rot1_MBL_0 - hole_2mbl"); // one piece "completed" - // left and right > - new TGeoCompositeShape("MB_Shape_1R", "MB_Shape_0R:rot1_MBL_0 - hole_2mbl"); - + auto* MB_Shape_0 = new TGeoCompositeShape("MB_Shape_0", "part_MBL_0 - mb_box:tr_mb_box - hole_1mbl:tr1_mb - hole_2mbl:combi_hup_mb "); + + auto* MB_Shape_0L = new TGeoCompositeShape("MB_Shape_0L", "MB_Shape_0 - lat_box:tr_lat1L_box - lat_box:tr_lat2L_box - lat_box:tr_lat3L_box - lat_box:tr_lat4L_box - lat_box:tr_lat5L_box"); + + auto* MB_Shape_0R = new TGeoCompositeShape("MB_Shape_0R", "MB_Shape_0 - lat_box:tr_lat1R_box - lat_box:tr_lat2R_box - lat_box:tr_lat3R_box - lat_box:tr_lat4R_box - lat_box:tr_lat5R_box"); + + auto* MB_Shape_1L = new TGeoCompositeShape("MB_Shape_1L", "MB_Shape_0L:rot1_MBL_0 - hole_2mbl"); // one piece "completed" + // left and right + auto* MB_Shape_1R = new TGeoCompositeShape("MB_Shape_1R", "MB_Shape_0R:rot1_MBL_0 - hole_2mbl"); + auto* MB_Shape_2 = new TGeoCompositeShape("MB_Shape_2", " MB_Shape_1L:tr_mbl + MB_Shape_1R:tr_mbr "); - + // TGeoVolume *sup_rail_MBL_vol0 = new TGeoVolume("SUPPORT_MBL_VOL0",MB_Shape_0,Al); TGeoVolume* sup_rail_MBL_vol = new TGeoVolume("SUPPORT_MBL_VOL", MB_Shape_2, kMedAlu); - + sup_rail_MBL->AddNode(sup_rail_MBL_vol, 1, rot_halfR); - + auto* stair = new TGeoVolumeAssembly("stair"); - - stair->AddNode(sup_rail_MBL, 1, new TGeoTranslation(0, 0 - 28.8, 0 + 0.675)); // + + stair->AddNode(sup_rail_MBL, 1, new TGeoTranslation(0, 0 - 28.8, 0 + 0.675)); stair->AddNode(Cross_mft, 2, new TGeoTranslation(0, -28.8, 4.55 + 0.675)); stair->AddNode(Cross_mb0, 3, new TGeoTranslation(0, 1.65 - 28.8, 9.55 + 0.675)); stair->AddNode(Cross_mb0, 4, new TGeoTranslation(0, 6.1 - 28.8, 18.48 + 0.675)); stair->AddNode(Cross_mft, 6, new TGeoTranslation(0, 10.0 - 28.8, 26.4 + 0.675)); stair->AddNode(Cross_mft, 7, new TGeoTranslation(0, 11.6 - 28.8, 29.85 + 0.675)); - + Double_t t_final_x; Double_t t_final_y; Double_t t_final_z; - + Double_t r_final_x; Double_t r_final_y; Double_t r_final_z; - + if (half == 0) { t_final_x = 0; t_final_y = 0; @@ -918,13 +929,13 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto* t_final = new TGeoTranslation("t_final", t_final_x, t_final_y, t_final_z); auto* r_final = new TGeoRotation("r_final", r_final_x, r_final_y, r_final_z); auto* c_final = new TGeoCombiTrans(*t_final, *r_final); - + auto* Half_3 = new TGeoVolumeAssembly("Half_3"); // Shell radii Float_t Shell_rmax = 60.6 + .7; Float_t Shell_rmin = 37.5 + .7; - + // Rotations and translations auto* tShell_0 = new TGeoTranslation("tShell_0", 0., 0., 3.1 + (25.15 + 1.) / 2.); auto* tShell_1 = new TGeoTranslation("tShell_1", 0., 0., -1.6 - (25.15 + 1.) / 2.); @@ -938,10 +949,10 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto* Rz_inv = new TGeoRotation("Rz_inv", -50., 0., 0.); auto* RShell_Cut = new TGeoRotation("RShell_Cut", 90., 90. - 24., -7.5); auto* RShell_Cut_inv = new TGeoRotation("RShell_Cut_inv", 90., 90. + 24., -7.5); - + auto* cShell_Cut = new TGeoCombiTrans(*tShell_Cut_1, *RShell_Cut); auto* cShell_Cut_inv = new TGeoCombiTrans(*tShell_Cut_1_inv, *RShell_Cut_inv); - + tShell_0->RegisterYourself(); tShell_1->RegisterYourself(); tShellHole->RegisterYourself(); @@ -959,48 +970,48 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // Basic shapes for Half_3 TGeoShape* Shell_0 = new TGeoTubeSeg("Shell_0", Shell_rmax / 2. - .1, Shell_rmax / 2., 6.2 / 2., 12., 168.); TGeoShape* Shell_1 = new TGeoTubeSeg("Shell_1", Shell_rmin / 2. - .1, Shell_rmin / 2., 3.2 / 2., 0., 180.); - new TGeoConeSeg("Shell_2", (25.15 + 1.0) / 2., Shell_rmin / 2. - .1, Shell_rmin / 2., Shell_rmax / 2. - .1, Shell_rmax / 2., 0., 180.); + TGeoShape* Shell_2 = new TGeoConeSeg("Shell_2", (25.15 + 1.0) / 2., Shell_rmin / 2. - .1, Shell_rmin / 2., Shell_rmax / 2. - .1, Shell_rmax / 2., 0., 180.); TGeoShape* Shell_3 = new TGeoTube("Shell_3", 0., Shell_rmin / 2. + .1, .1 / 2.); TGeoShape* ShellHole_0 = new TGeoTrd1("ShellHole_0", 17.5 / 4., 42.5 / 4., 80. / 2., (25.15 + 1.) / 2.); TGeoShape* ShellHole_1 = new TGeoBBox("ShellHole_1", 42.5 / 4., 80. / 2., 2. / 2. + 0.00001); TGeoShape* ShellHole_2 = new TGeoBBox("ShellHole_2", 58.9 / 4., (Shell_rmin - 2.25) / 2., .4 / 2. + 0.00001); TGeoShape* ShellHole_3 = new TGeoBBox("ShellHole_3", 80. / 4., (Shell_rmin - 11.6) / 2., .4 / 2. + 0.00001); - + // For the extra cut, not sure if this is the shape (apprx. distances) TGeoShape* Shell_Cut_0 = new TGeoTube("Shell_Cut_0", 0., 3.5, 5. / 2.); TGeoShape* Shell_Cut_1 = new TGeoBBox("Shell_Cut_1", 7. / 2., 25. / 2., 5. / 2.); // Composite shapes for Half_3 auto* Half_3_Shape_0 = new TGeoCompositeShape("Half_3_Shape_0", "Shell_Cut_0+Shell_Cut_1:tShell_Cut"); - new TGeoCompositeShape("Half_3_Shape_1", "Shell_2-Half_3_Shape_0:cShell_Cut-Half_3_Shape_0:cShell_Cut_inv"); + auto* Half_3_Shape_1 = new TGeoCompositeShape("Half_3_Shape_1", "Shell_2-Half_3_Shape_0:cShell_Cut-Half_3_Shape_0:cShell_Cut_inv"); auto* Half_3_Shape_2 = new TGeoCompositeShape("Half_3_Shape_2", "ShellHole_0+ShellHole_1:tShellHole"); - new TGeoCompositeShape("Half_3_Shape_3", "Shell_3:tShellHole_1 -(ShellHole_2:tShellHole_1 + ShellHole_3:tShellHole_0)"); + auto* Half_3_Shape_3 = new TGeoCompositeShape("Half_3_Shape_3", "Shell_3:tShellHole_1 -(ShellHole_2:tShellHole_1 + ShellHole_3:tShellHole_0)"); auto* Half_3_Shape_4 = new TGeoCompositeShape("Half_3_Shape_4", "(Shell_0:tShell_0 + Half_3_Shape_1+ Shell_1:tShell_1) - (Half_3_Shape_2 + " "Half_3_Shape_2:Rz + Half_3_Shape_2:Rz_inv)+Half_3_Shape_3"); - + auto* Half_3_Volume = new TGeoVolume("Half_3_Volume", Half_3_Shape_4, kMedAlu); // Position of the piece relative to the origin which for this code is the center of the the Framework piece (See // Half_2) // Half_3->AddNode(Half_3_Volume, 1, new TGeoTranslation(0., 0., -19.)); - - TGeoRotation* rot_z180 = new TGeoRotation("rot_z180", 0, 180, 0); /// orig: (180,0,0) + + TGeoRotation* rot_z180 = new TGeoRotation("rot_z180", 0, 180, 0); // orig: (180,0,0) rot_z180->RegisterYourself(); // in y = l_253.5 - 6. center in (0,6,0) - TGeoCombiTrans* combi_coat = new TGeoCombiTrans(0, 0, 19.5 - 0.45, rot_z180); ///TGeoCombiTrans(0,0, -19.5,rot_z180) // -0.5 ->0.45 + TGeoCombiTrans* combi_coat = new TGeoCombiTrans(0, 0, 19.5 - 0.45, rot_z180); // TGeoCombiTrans(0,0, -19.5,rot_z180) // -0.5 ->0.45 combi_coat->SetName("combi_coat"); combi_coat->RegisterYourself(); - + Half_3->AddNode(Half_3_Volume, 1, combi_coat); // Half_3_Volume->SetLineColor(1); - + HalfConeVolume->AddNode(stair, 1, c_final); // HalfConeVolume->AddNode(base, 2, c_final); HalfConeVolume->AddNode(rail_L_R, 3, c_final); // R&L HalfConeVolume->AddNode(Fra_front, 4, c_final); HalfConeVolume->AddNode(midle, 5, c_final); // HalfConeVolume->AddNode(Half_3, 6, c_final); - // HalfConeVolume->AddNode(Half_3,8, new TGeoCombiTrans(0,0,0-0.5,rot_halfR)); -0.675 - + // HalfConeVolume->AddNode(Half_3,8, new TGeoCombiTrans(0,0,0-0.5,rot_halfR)); //-0.675 + return HalfConeVolume; } From 9f8cf1c236ac47389748aa5314a36a74ed147fdf Mon Sep 17 00:00:00 2001 From: carlos-soncco <33285924+carlos-soncco@users.noreply.github.com> Date: Fri, 15 Mar 2019 15:09:53 -0500 Subject: [PATCH 22/22] Update HalfCone.cxx removing some point name --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 5f0e061528758..f1e59ad91e063 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -231,7 +231,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) new TGeoTube("tubdown", 0., dia_tubdown / 2, high_tubdown / 2); // Composite shapes for Fra_front - auto* fra_front_Shape_0 = new TGeoCompositeShape("fra_front_Shape_0", "box_up:tr1_up + seg_tub:combi_3b + boxB_down:tr3_box + boxA_down:tr_2_box"); + new TGeoCompositeShape("fra_front_Shape_0", "box_up:tr1_up + seg_tub:combi_3b + boxB_down:tr3_box + boxA_down:tr_2_box"); auto* fra_front_Shape_1 = new TGeoCompositeShape("fra_front_Shape_1", "fra_front_Shape_0 - tubdown:tr_tubdown - tub_up:combi_3a"); @@ -424,12 +424,12 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // composite shape for base - auto* base_Shape_0 = new TGeoCompositeShape("base_Shape_0", " disc -box1 - box2 - box3 - circ_holeB:tr1_holeB - circ_holeB:tr2_holeB"); - auto* base_Shape_1 = new TGeoCompositeShape("base_Shape_1", "(seg_1hole - seg_bord:combi_bord1 - seg_bord:combi2_bord1) + seg_2hole -seg_bord:combi1_bord2 + cbox:tr_cbox"); + new TGeoCompositeShape("base_Shape_0", " disc - box1 - box2 - box3 - circ_holeB:tr1_holeB - circ_holeB:tr2_holeB"); + new TGeoCompositeShape("base_Shape_1", "(seg_1hole - seg_bord:combi_bord1 - seg_bord:combi2_bord1) + seg_2hole -seg_bord:combi1_bord2 + cbox:tr_cbox"); - auto* base_Shape_2 = new TGeoCompositeShape("base_Shape_2", " seg_3hole + seg_bord:combi_cent_bord"); // seg_bord:combi_cent_bord + new TGeoCompositeShape("base_Shape_2", " seg_3hole + seg_bord:combi_cent_bord"); // seg_bord:combi_cent_bord - auto* base_Shape_3 = new TGeoCompositeShape("base_Shape_3", " labox1:tr_la + labox2:tr_2la "); + new TGeoCompositeShape("base_Shape_3", " labox1:tr_la + labox2:tr_2la "); auto* base_Shape_4 = new TGeoCompositeShape("base_Shape_4", "base_Shape_0 - base_Shape_1 - base_Shape_1:rot1 + base_Shape_2 + tongbox:tr_tong - circ_hole1:tr_hole1 - circ_hole1:tr2_hole1 - circ_hole1:tr3_hole1 - circ_hole2:tr1_hole2 - circ_hole2:tr2_hole2 - base_Shape_3 "); @@ -518,7 +518,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // composite shape for midle - auto* midle_Shape_0 = new TGeoCompositeShape("midle_Shape_0", " arc_midle + midle_box:tr1_midle_box - midle_box:tr2_midle_box -midle_d1box:tr_midle_d1box - midle_d2box:tr_midle_d2box"); + new TGeoCompositeShape("midle_Shape_0", " arc_midle + midle_box:tr1_midle_box - midle_box:tr2_midle_box - midle_d1box:tr_midle_d1box - midle_d2box:tr_midle_d2box"); auto* midle_Shape_1 = new TGeoCompositeShape("midle_Shape_1", " midle_Shape_0 -mid_1tubhole:combi_mid_1tubhole-mid_2tubhole:combi_mid_2tubhole"); @@ -766,7 +766,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // auto *s_cc_hole=new TGeoTube("S_CC_HOLE",radin_cc_rail,radout_cc_rail,high_cc_rail/2); // composite shape for rail R - auto* RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0", "RR_1box:tr_RR_1box + part_RR1 + part_RR2 + part_RR3 - qdi_box:combi_qdi "); + new TGeoCompositeShape("RR_Shape_0", "RR_1box:tr_RR_1box + part_RR1 + part_RR2 + part_RR3 - qdi_box:combi_qdi "); // auto * RR_Shape_0 = new TGeoCompositeShape("RR_Shape_0","RR_1box:tr_RR_1box+ S_part_RR1 + part_RR2 +part_RR3- qdi_box:combi_qdi + S_ir_HOLE:combi_ir_RR +S_ir_HOLE:combi_ir2_RR "); //-RR_1box:tr_RL_1box- S_b_HOLE:tr_b_RR -S_CC_HOLE:combi_cc2_RR @@ -872,15 +872,15 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // composite shape for rail_MB R + L // auto * MB_Shape_0 = new TGeoCompositeShape("MB_Shape_0"," V_MBL_0 - mb_box:tr_mb_box - hole_1mbl:tr1_mb + hole_1mbl:tr2_mb -hole_2mbl:combi_hup_mb "); - auto* MB_Shape_0 = new TGeoCompositeShape("MB_Shape_0", "part_MBL_0 - mb_box:tr_mb_box - hole_1mbl:tr1_mb - hole_2mbl:combi_hup_mb "); + new TGeoCompositeShape("MB_Shape_0", "part_MBL_0 - mb_box:tr_mb_box - hole_1mbl:tr1_mb - hole_2mbl:combi_hup_mb"); - auto* MB_Shape_0L = new TGeoCompositeShape("MB_Shape_0L", "MB_Shape_0 - lat_box:tr_lat1L_box - lat_box:tr_lat2L_box - lat_box:tr_lat3L_box - lat_box:tr_lat4L_box - lat_box:tr_lat5L_box"); + new TGeoCompositeShape("MB_Shape_0L", "MB_Shape_0 - lat_box:tr_lat1L_box - lat_box:tr_lat2L_box - lat_box:tr_lat3L_box - lat_box:tr_lat4L_box - lat_box:tr_lat5L_box"); - auto* MB_Shape_0R = new TGeoCompositeShape("MB_Shape_0R", "MB_Shape_0 - lat_box:tr_lat1R_box - lat_box:tr_lat2R_box - lat_box:tr_lat3R_box - lat_box:tr_lat4R_box - lat_box:tr_lat5R_box"); + new TGeoCompositeShape("MB_Shape_0R", "MB_Shape_0 - lat_box:tr_lat1R_box - lat_box:tr_lat2R_box - lat_box:tr_lat3R_box - lat_box:tr_lat4R_box - lat_box:tr_lat5R_box"); - auto* MB_Shape_1L = new TGeoCompositeShape("MB_Shape_1L", "MB_Shape_0L:rot1_MBL_0 - hole_2mbl"); // one piece "completed" + new TGeoCompositeShape("MB_Shape_1L", "MB_Shape_0L:rot1_MBL_0 - hole_2mbl"); // one piece "completed" // left and right - auto* MB_Shape_1R = new TGeoCompositeShape("MB_Shape_1R", "MB_Shape_0R:rot1_MBL_0 - hole_2mbl"); + new TGeoCompositeShape("MB_Shape_1R", "MB_Shape_0R:rot1_MBL_0 - hole_2mbl"); auto* MB_Shape_2 = new TGeoCompositeShape("MB_Shape_2", " MB_Shape_1L:tr_mbl + MB_Shape_1R:tr_mbr "); @@ -970,7 +970,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // Basic shapes for Half_3 TGeoShape* Shell_0 = new TGeoTubeSeg("Shell_0", Shell_rmax / 2. - .1, Shell_rmax / 2., 6.2 / 2., 12., 168.); TGeoShape* Shell_1 = new TGeoTubeSeg("Shell_1", Shell_rmin / 2. - .1, Shell_rmin / 2., 3.2 / 2., 0., 180.); - TGeoShape* Shell_2 = new TGeoConeSeg("Shell_2", (25.15 + 1.0) / 2., Shell_rmin / 2. - .1, Shell_rmin / 2., Shell_rmax / 2. - .1, Shell_rmax / 2., 0., 180.); + new TGeoConeSeg("Shell_2", (25.15 + 1.0) / 2., Shell_rmin / 2. - .1, Shell_rmin / 2., Shell_rmax / 2. - .1, Shell_rmax / 2., 0., 180.); TGeoShape* Shell_3 = new TGeoTube("Shell_3", 0., Shell_rmin / 2. + .1, .1 / 2.); TGeoShape* ShellHole_0 = new TGeoTrd1("ShellHole_0", 17.5 / 4., 42.5 / 4., 80. / 2., (25.15 + 1.) / 2.); TGeoShape* ShellHole_1 = new TGeoBBox("ShellHole_1", 42.5 / 4., 80. / 2., 2. / 2. + 0.00001); @@ -983,9 +983,9 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // Composite shapes for Half_3 auto* Half_3_Shape_0 = new TGeoCompositeShape("Half_3_Shape_0", "Shell_Cut_0+Shell_Cut_1:tShell_Cut"); - auto* Half_3_Shape_1 = new TGeoCompositeShape("Half_3_Shape_1", "Shell_2-Half_3_Shape_0:cShell_Cut-Half_3_Shape_0:cShell_Cut_inv"); + new TGeoCompositeShape("Half_3_Shape_1", "Shell_2 - Half_3_Shape_0:cShell_Cut - Half_3_Shape_0:cShell_Cut_inv"); auto* Half_3_Shape_2 = new TGeoCompositeShape("Half_3_Shape_2", "ShellHole_0+ShellHole_1:tShellHole"); - auto* Half_3_Shape_3 = new TGeoCompositeShape("Half_3_Shape_3", "Shell_3:tShellHole_1 -(ShellHole_2:tShellHole_1 + ShellHole_3:tShellHole_0)"); + new TGeoCompositeShape("Half_3_Shape_3", "Shell_3:tShellHole_1 -(ShellHole_2:tShellHole_1 + ShellHole_3:tShellHole_0)"); auto* Half_3_Shape_4 = new TGeoCompositeShape("Half_3_Shape_4", "(Shell_0:tShell_0 + Half_3_Shape_1+ Shell_1:tShell_1) - (Half_3_Shape_2 + " "Half_3_Shape_2:Rz + Half_3_Shape_2:Rz_inv)+Half_3_Shape_3");