From ef3f97618fc0c4253e04849b056b725789805e7c Mon Sep 17 00:00:00 2001 From: manso Date: Tue, 23 Feb 2021 09:11:35 +0100 Subject: [PATCH] Medium for HalfCone --- Detectors/ITSMFT/MFT/base/src/HalfCone.cxx | 675 ++++++------------ .../ITSMFT/MFT/simulation/src/Detector.cxx | 318 +++++---- 2 files changed, 413 insertions(+), 580 deletions(-) diff --git a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx index 7b101838470e8..240e0c2abc73c 100644 --- a/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx +++ b/Detectors/ITSMFT/MFT/base/src/HalfCone.cxx @@ -52,35 +52,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto* HalfConeVolume = new TGeoVolumeAssembly("HalfConeVolume"); - TGeoElement* Silicon = new TGeoElement("Silicon", "Silicon", 14, 28.0855); - TGeoElement* Iron = new TGeoElement("Iron", "Iron", 26, 55.845); - TGeoElement* Copper = new TGeoElement("Copper", "Copper", 29, 63.546); - TGeoElement* Manganese = - new TGeoElement("Manganese", "Manganese", 25, 54.938049); - TGeoElement* Magnesium = - new TGeoElement("Magnesium", "Magnesium", 12, 24.3050); - TGeoElement* Zinc = new TGeoElement("Zinc", "Zinc", 30, 65.39); - TGeoElement* Titanium = new TGeoElement("Titanium", "Titanium", 22, 47.867); - TGeoElement* Chromium = new TGeoElement("Chromium", "Chromium", 24, 51.9961); - TGeoElement* Aluminum = new TGeoElement("Aluminum", "Aluminum", 13, 26981538); - - TGeoMixture* alu5083 = new TGeoMixture("alu5083", 9, 2.650); // g/cm3 - alu5083->AddElement(Iron, 0.004); - alu5083->AddElement(Silicon, 0.004); - alu5083->AddElement(Copper, 0.001); - alu5083->AddElement(Manganese, 0.002); - alu5083->AddElement(Magnesium, 0.0025); - alu5083->AddElement(Zinc, 0.0025); - alu5083->AddElement(Titanium, 0.0015); - alu5083->AddElement(Chromium, 0.0010); - alu5083->AddElement(Aluminum, 0.9815); - // alu5083->SetTemperature(); // 25. - alu5083->SetDensity(2.65); // g/cm3 - alu5083->SetState(TGeoMaterial::kMatStateSolid); - - TGeoMedium* kMedAlu = gGeoManager->GetMedium("MFT_Alu$"); - TGeoMedium* malu5083 = - new TGeoMedium("malu5083", 2, alu5083); // name, numer medio, material + TGeoMedium* malu5083 = gGeoManager->GetMedium("MFT_Alu5083$"); // Rotation TGeoRotation* rot1 = new TGeoRotation("rot1", 180, -180, 0); @@ -92,14 +64,13 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoRotation* rot3 = new TGeoRotation("rot3", 0, 90, 0); rot3->RegisterYourself(); - TGeoRotation* rot_90x = new TGeoRotation("rot_90x", 0, -90, 0); // half0 + TGeoRotation* rot_90x = new TGeoRotation("rot_90x", 0, -90, 0); rot_90x->RegisterYourself(); - TGeoRotation* rot_base = new TGeoRotation("rot_base", 180, 180, 0); // rail_r + TGeoRotation* rot_base = new TGeoRotation("rot_base", 180, 180, 0); 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); combi1->RegisterYourself(); TGeoCombiTrans* combi2 = new TGeoCombiTrans(-16.8, 0., 0., rot2); combi2->RegisterYourself(); @@ -118,7 +89,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) ///// holes tub 1hole tranversal Double_t radin_1hmb0 = 0.; - Double_t radout_1hmb0 = 0.175; // diameter 3.5 H9 (0.35cm) + Double_t radout_1hmb0 = 0.175; Double_t high_1hmb0 = 0.7; TGeoRotation* rot_1hole_mb0 = new TGeoRotation("rot_1hole_mb0", 0, 90, 0); @@ -127,16 +98,14 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) 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); bcombi_1h_mb0->SetName("bcombi_1h_mb0"); bcombi_1h_mb0->RegisterYourself(); // 2hole coaxial Double_t radin_2hmb0 = 0.; - Double_t radout_2hmb0 = 0.15; // diameter M3 - Double_t high_2hmb0 = 1.2; // 12 - + Double_t radout_2hmb0 = 0.15; + Double_t high_2hmb0 = 1.2; TGeoRotation* rot_2hole_mb0 = new TGeoRotation("rot_2hole_mb0", 90, 90, 0); rot_2hole_mb0->SetName("rot_2hole_mb0"); rot_2hole_mb0->RegisterYourself(); @@ -147,13 +116,11 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_2hole_mb0->RegisterYourself(); TGeoCombiTrans* combi_2hole_mb0_b = - new TGeoCombiTrans(-6.7, 0, 0, rot_2hole_mb0); // y= + new TGeoCombiTrans(-6.7, 0, 0, rot_2hole_mb0); 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); 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); @@ -162,18 +129,14 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto* c_mb0_Shape_0 = new TGeoCompositeShape( "c_mb0_Shape_0", "box_mb0 - hole2_mb0:combi_2hole_mb0 - " - "hole2_mb0:combi_2hole_mb0_b"); //- hole1_mb0:acombi_1h_mb0 - - // hole1_mb0:bcombi_1h_mb0 + "hole2_mb0:combi_2hole_mb0_b"); - /// auto* cross_mb0_Volume = new TGeoVolume("cross_mb0_Volume", c_mb0_Shape_0, - /// kMedAlu); auto* cross_mb0_Volume = new TGeoVolume("cross_mb0_Volume", c_mb0_Shape_0, malu5083); Cross_mb0->AddNode(cross_mb0_Volume, 1); // 2nd piece cross beam MFT (cbeam) - auto* Cross_mft = new TGeoVolumeAssembly("Cross_mft"); auto* Cross_mft_2 = new TGeoVolumeAssembly("Cross_mft_2"); auto* Cross_mft_3 = new TGeoVolumeAssembly("Cross_mft_3"); @@ -192,11 +155,10 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // 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 radout_hole_cbeam = 0.15; + 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"); @@ -208,21 +170,17 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_hole_2cbeam->RegisterYourself(); // shape for shape cross beam - new TGeoTube("hole_cbeam", radin_hole_cbeam, radout_hole_cbeam, high_hole_cbeam / 2); new TGeoTube("s_cb", radin_cb, radout_cb, high_cb / 2); // new // 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", " s_cb:rot_cb - hole_cbeam:combi_hole_1cbeam - " "hole_cbeam:combi_hole_2cbeam"); - /// auto* Cross_mft_Volume = new TGeoVolume("Cross_mft_Volume", c_cbeam_Shape, - /// kMedAlu); auto* Cross_mft_Volume = new TGeoVolume("Cross_mft_Volume", c_cbeam_Shape, malu5083); auto* Cross_mft_Volume_2 = @@ -238,7 +196,6 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) Cross_mft_4->AddNode(Cross_mft_Volume_4, 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"); @@ -281,8 +238,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) top_adfwf->SetName("top_adfwf"); Double_t x_top_adfwf[4] = {-14.8, -14.2, -14.2, -14.8}; - Double_t y_top_adfwf[4] = {-3.6 - 0.12, -3.6 - 0.12, -5.56, - -5.83}; // 5.52 , 5.9 --5.83 + Double_t y_top_adfwf[4] = {-3.6 - 0.12, -3.6 - 0.12, -5.56, -5.83}; top_adfwf->DefinePolygon(4, x_top_adfwf, y_top_adfwf); top_adfwf->DefineSection(0, -0.3, 0., 0., 1); //(plane,-zplane/ +zplane, x0, y0,(x/y)) @@ -297,15 +253,13 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) new TGeoTranslation("tr_q_upbox", -14.8 - 0.2, -3.6 - 0.6, 0.); tr_q_upbox->RegisterYourself(); - TGeoRotation* rot_180yR = - new TGeoRotation("rot_180yR", 180, -180, 0); // half0 + TGeoRotation* rot_180yR = new TGeoRotation("rot_180yR", 180, -180, 0); rot_180yR->RegisterYourself(); TGeoCombiTrans* combi_fwb_R = new TGeoCombiTrans(0, 0, 0, rot_180yR); combi_fwb_R->SetName("combi_fwb_R"); combi_fwb_R->RegisterYourself(); /////////////////////////////////////////// - Double_t x_box_up = 0.6; // cm Double_t y_box_up = 0.605; Double_t z_box_up = 2.84; @@ -322,20 +276,20 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) Double_t x_boxB_down = 0.6; Double_t y_boxB_down = 0.605; - Double_t z_boxB_down = 1.26; // 12.6 + Double_t z_boxB_down = 1.26; // 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; // + 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); // + TGeoTranslation* tr1_up = new TGeoTranslation("tr1_up", -7.4, 0, 8.28); tr1_up->RegisterYourself(); @@ -378,7 +332,6 @@ 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"); @@ -394,8 +347,6 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) 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); @@ -405,11 +356,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoTranslation* tr_ff = new TGeoTranslation( "tr_ff", 0, -2.5 - 0.31, 32.5 + 0.675); // 7.1 , -16.2 z32.5 tr_ff->RegisterYourself(); - // TGeoRotation *rot_180yR = new TGeoRotation("rot_180yR", 180,-180,0); // - // half0 rot_180yR->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 TGeoCombiTrans* combi_front_R = new TGeoCombiTrans(0, -2.5 - 0.31, 32.5 + 0.675, rot_180yR); combi_front_R->SetName("combi_front_R"); @@ -420,18 +367,9 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) "fwf_tub - box_qdown:tr_qdown + box_addown:tr_addown + tria_fwf + " "top_adfwf - q_upbox:tr_q_upbox"); - // auto * fra_front_Shape_3 = new - // TGeoCompositeShape("Fra_front_Shape_3","Fra_front_Shape_2 + - // Fra_front_Shape_2:combi_front_R "); - auto* fra_front_Shape_3 = new TGeoCompositeShape( "Fra_front_Shape_3", "Fra_front_Shape_2 + Fra_front_Shape_2:rot_180yR"); - // 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_R = new TGeoVolume("Fra_front_Volume_R", fra_front_Shape_2, malu5083); auto* Fra_front_Volume_L = @@ -440,15 +378,9 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto* Fra_front_Volume_RL = new TGeoVolume("Fra_front_Volume_RL", fra_front_Shape_3, malu5083); - // Fra_front_L->AddNode(Fra_front_Volume, 1, tr_ff); - // 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); Fra_front->AddNode(Fra_front_Volume_RL, 1, tr_ff); // 4th piece "BASE" framework half support - auto* base = new TGeoVolumeAssembly("base"); // seg tub disc @@ -519,7 +451,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) 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); // + new TGeoTranslation("tr_2la", 0, -8.1, high_disc / 2); tr_2la->RegisterYourself(); // circular border C SEG_BORD @@ -529,8 +461,6 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) 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 = @@ -541,21 +471,21 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) 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= + new TGeoCombiTrans(-21.3795, -20.7636, 0, rot2_bord1); 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= + new TGeoCombiTrans(-9.0527, -23.3006, 0, rot1_bord2); 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= + new TGeoCombiTrans(-6.5, -27.094, 0, rot_cent_bord); combi_cent_bord->SetName("combi_cent_bord"); combi_cent_bord->RegisterYourself(); // box tonge @@ -568,8 +498,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) 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 + TGeoTranslation* tr_hole1 = new TGeoTranslation("tr_hole1", 0, -28.0, 0); tr_hole1->RegisterYourself(); TGeoTranslation* tr2_hole1 = @@ -582,8 +511,8 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // 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 radout_hole2 = 0.335; + Double_t high_hole2 = 1.36; TGeoTranslation* tr1_hole2 = new TGeoTranslation("tr1_hole2", -28.0, -8.5, 0); // tr1_hole2->RegisterYourself(); @@ -600,15 +529,14 @@ 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 - // seg tong xy + Double_t radin_ccut = 27.5; - Double_t radout_ccut = 29.; // 304 - Double_t high_ccut = 1.4; /// 13.5 + Double_t radout_ccut = 29.; + Double_t high_ccut = 1.4; Double_t ang_in_ccut = 260; Double_t ang_fin_ccut = 280; // shape for base - new TGeoTubeSeg("disc", radin_disc, radout_disc, high_disc / 2, ang_in_disc, ang_fin_disc); new TGeoTubeSeg("c_cut", radin_ccut, radout_ccut, high_ccut / 2, ang_in_ccut, @@ -623,7 +551,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) 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 + ang_in_1hole, ang_fin_1hole); 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, @@ -639,52 +567,35 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // 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_0", " disc - box1 - box2 - box3"); 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 + new TGeoCompositeShape("base_Shape_2", + " seg_3hole + seg_bord:combi_cent_bord"); 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_4 = new TGeoCompositeShape( "base_Shape_4", "base_Shape_0 - base_Shape_1 - base_Shape_1:rot1 + base_Shape_2 - " - "base_Shape_3 + tongbox:tr_tong - c_cut"); //- circ_hole1:tr_hole1 - - // circ_hole1:tr2_hole1 - - // circ_hole1:tr3_hole1 - - // circ_hole2:tr1_hole2 - - // circ_hole2:tr2_hole2 - - // 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 "); + "base_Shape_3 + tongbox:tr_tong - c_cut"); auto* base4_Volume = new TGeoVolume("base4_Volume", base_Shape_4, malu5083); base->AddNode(base4_Volume, 2, rot_base); - // base->AddNode(base4_Volume,2); // 5th piece middle Framework middle - auto* middle = new TGeoVolumeAssembly("middle"); auto* middle_L = new TGeoVolumeAssembly("middle_L"); auto* middle_R = new TGeoVolumeAssembly("middle_R"); ////new2020 framework middle Double_t radin_fwm = 14.406; - Double_t radout_fwm = 15.185; // - Double_t high_fwm = 0.6; /// + Double_t radout_fwm = 15.185; + Double_t high_fwm = 0.6; Double_t ang_in_fwm = 180. + 12.93; Double_t ang_fin_fwm = 180. + 58.65; @@ -693,7 +604,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) Double_t y_fwm_1box = 1.45; Double_t z_fwm_1box = 0.6; // 6.5 -> 6.6 to quit TGeoTranslation* tr_fwm_1box = - new TGeoTranslation("tr_fwm_1box", -14.4, -3.398 + 1.45 / 2, 0); // 81 + new TGeoTranslation("tr_fwm_1box", -14.4, -3.398 + 1.45 / 2, 0); tr_fwm_1box->RegisterYourself(); ////box quit down @@ -701,10 +612,9 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) Double_t y_fwm_2box = 1.2; Double_t z_fwm_2box = 0.7; // 6.5 -> 6.6 to quit TGeoTranslation* tr_fwm_2box = - new TGeoTranslation("tr_fwm_2box", -14.4 + 6.9, -3.398 - 9.1, 0); // 81 + new TGeoTranslation("tr_fwm_2box", -14.4 + 6.9, -3.398 - 9.1, 0); tr_fwm_2box->RegisterYourself(); - //// TGeoXtru* tria_fwm = new TGeoXtru(2); tria_fwm->SetName("tria_fwm"); @@ -716,16 +626,16 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) ////////// // box up to quit and to join - Double_t x_middle = 0.8; // dx=4 - Double_t y_middle = 3.495; // y=34.9 - Double_t z_middle = 0.62; // z=6 + Double_t x_middle = 0.8; + Double_t y_middle = 3.495; + Double_t z_middle = 0.62; // tr1 to join with arc TGeoTranslation* tr1_middle_box = - new TGeoTranslation("tr1_middle_box", -14.4, -0.745, 0); // -152,-17.45,0 + new TGeoTranslation("tr1_middle_box", -14.4, -0.745, 0); tr1_middle_box->RegisterYourself(); // tr2 to quiet TGeoTranslation* tr2_middle_box = - new TGeoTranslation("tr2_middle_box", -15.2, -0.745, 0); // -152,-17.45,0 + new TGeoTranslation("tr2_middle_box", -15.2, -0.745, 0); tr2_middle_box->RegisterYourself(); // box down_1 @@ -733,7 +643,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) Double_t y_middle_d1box = 0.28; Double_t z_middle_d1box = 0.66; TGeoTranslation* tr_middle_d1box = - new TGeoTranslation("tr_middle_d1box", -7.3, -11.96, 0.); // 81 + new TGeoTranslation("tr_middle_d1box", -7.3, -11.96, 0.); tr_middle_d1box->RegisterYourself(); // box down_2 @@ -741,35 +651,35 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) Double_t y_middle_d2box = 1.0; Double_t z_middle_d2box = 0.66; // TGeoTranslation* tr_middle_d2box = - new TGeoTranslation("tr_middle_d2box", -7.5, -12.6249, 0); // 81 + new TGeoTranslation("tr_middle_d2box", -7.5, -12.6249, 0); tr_middle_d2box->RegisterYourself(); // arc circ part Double_t radin_middle = 14.0; - Double_t radout_middle = 15.0; // - Double_t high_middle = 0.6; // + Double_t radout_middle = 15.0; + Double_t high_middle = 0.6; Double_t ang_in_middle = 180; Double_t ang_fin_middle = 238.21; // alfa=57.60 // circular hole1 ; hole_middle 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 radout_mid_1hole = 0.175; + Double_t high_mid_1hole = 1.5; 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); // + new TGeoCombiTrans(-14.2, 0.325, 0, rot_mid_1hole); combi_mid_1tubhole->SetName("combi_mid_1tubhole"); combi_mid_1tubhole->RegisterYourself(); // circular hole2 ; hole_middle 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 radout_mid_2hole = 0.15; + Double_t high_mid_2hole = 1.8; TGeoCombiTrans* combi_mid_2tubhole = - new TGeoCombiTrans(-7.7, -12.355, 0, rot_mid_1hole); // x=81 + new TGeoCombiTrans(-7.7, -12.355, 0, rot_mid_1hole); combi_mid_2tubhole->SetName("combi_mid_2tubhole"); combi_mid_2tubhole->RegisterYourself(); @@ -799,7 +709,6 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) new TGeoBBox("fwm_2box", x_fwm_2box / 2, y_fwm_2box / 2, z_fwm_2box / 2); // composite shape for middle - new TGeoCompositeShape( "middle_Shape_0", " arc_middle + middle_box:tr1_middle_box - middle_box:tr2_middle_box - " @@ -812,19 +721,17 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoRotation* rot_middlez = new TGeoRotation("rot_middley", 180, 180, 0); rot_middlez->RegisterYourself(); - TGeoCombiTrans* combi_middle_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_middle_L = + new TGeoCombiTrans(0, -7.625, 24.15 + 0.675, rot_90x); combi_middle_L->SetName("combi_middle_L"); combi_middle_L->RegisterYourself(); - TGeoTranslation* tr_middle_L = new TGeoTranslation( - "tr_middle_L", 0, -4.45 - 0.1, 24.85 + 0.675); //+2.5,, -152,-17.45,0 + TGeoTranslation* tr_middle_L = + new TGeoTranslation("tr_middle_L", 0, -4.45 - 0.1, 24.85 + 0.675); tr_middle_L->RegisterYourself(); TGeoCombiTrans* combi_middle_R = - new TGeoCombiTrans(0, -4.45 - 0.1, 24.85 + 0.675, - rot_middlez); // x=7.35, y=0, z=15.79 y7.625 ++2.5 + new TGeoCombiTrans(0, -4.45 - 0.1, 24.85 + 0.675, rot_middlez); combi_middle_R->SetName("combi_middle_R"); combi_middle_R->RegisterYourself(); @@ -836,15 +743,13 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) "middle_Shape_4", " tube_fwm + fwm_1box:tr_fwm_1box - fwm_2box:tr_fwm_2box +tria_fwm"); - // auto* middle_Volume = new TGeoVolume("middle_Volume", middle_Shape_1, - // kMedAlu); auto* middle_Volume_L = new TGeoVolume("middle_Volume_L", middle_Shape_3, malu5083); auto* middle_Volume_R = new TGeoVolume("middle_Volume_R", middle_Shape_4, malu5083); - TGeoTranslation* tr_middle = new TGeoTranslation( - "tr_middle", 0, -4.45 - 0.1, 24.85 + 0.675); //+2.5,, -152,-17.45,0 + TGeoTranslation* tr_middle = + new TGeoTranslation("tr_middle", 0, -4.45 - 0.1, 24.85 + 0.675); tr_middle->RegisterYourself(); middle_L->AddNode(middle_Volume_L, 1, tr_middle); @@ -865,40 +770,24 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) 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); 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}; // 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}; + Double_t x_RL1[5] = {-1.5, 1.5, 0.5, 0.5, -1.5}; + Double_t y_RL1[5] = {1.2, 1.2, 2.2, 8.2, 8.2}; 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); 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 + Double_t x_RL_kneebox = 1.5; + Double_t y_RL_kneebox = 3.5; + Double_t z_RL_kneebox = 1.5; + TGeoTranslation* tr_RL_kneebox = new TGeoTranslation(0, 0, 0); tr_RL_kneebox->SetName("tr_RL_kneebox"); tr_RL_kneebox->RegisterYourself(); @@ -906,7 +795,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) rot_knee->SetName("rot_knee"); rot_knee->RegisterYourself(); TGeoCombiTrans* combi_knee = - new TGeoCombiTrans(0.96, 1.75 + 0.81864, 0, rot_knee); // y= + new TGeoCombiTrans(0.96, 1.75 + 0.81864, 0, rot_knee); combi_knee->SetName("combi_knee"); combi_knee->RegisterYourself(); // quit diagona-> qdi @@ -916,8 +805,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) 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); combi_qdi->SetName("combi_qdi"); combi_qdi->RegisterYourself(); // knee small @@ -925,38 +813,37 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) 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}; 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); xtru3_RL->DefineSection(1, 0.76, 0, 0, 1); - TGeoTranslation* tr_vol3_RL = new TGeoTranslation(-0.25, 12.66, 0); // + 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 holes 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 radout_RL1hole = 0.325; + 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= + new TGeoCombiTrans(0.7, 0.6, 1.85, rot_RL1hole); 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; // + Double_t radout_ir_railL = 0.15; + 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"); @@ -966,17 +853,14 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) combi_ir2_RL->SetName("combi_ir2_RL"); combi_ir2_RL->RegisterYourself(); // - // 1) modification TGeoXtru* xtru_RL2 = new TGeoXtru(2); xtru_RL2->SetName("S_XTRU_RL2"); - // modi the arm L---> new L Double_t x_RL2[8] = {-1.5, 0.5, 0.5, 9.3, 9.3, 7.3, 7.3, -1.5}; Double_t y_RL2[8] = {8.2, 8.2, 13.863, 24.35, 25.65, 25.65, 25.078, 14.591}; xtru_RL2->DefinePolygon(8, x_RL2, y_RL2); - xtru_RL2->DefineSection(0, 0.7752, 0, 0, - 1); //(plane,-zplane/+zplane, x0, y0,(x/y)) 0.775 + xtru_RL2->DefineSection(0, 0.7752, 0, 0, 1); xtru_RL2->DefineSection(1, 2.225, 0, 0, 1); // 2) modi adding box new element 1 box @@ -986,13 +870,9 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) Double_t x_adi1RL[4] = {-1.5, -1.5, 0.5, 0.5}; Double_t y_adi1RL[4] = {2.2, 13.863, 13.863, 2.2}; - /// Double_t x_adi1RL[4]={-0.5,-0.5,1.5,1.5}; //vertices - ////Double_t y_adi1RL[4]={2.2,13.86,13.86,2.2}; - adi1_RL->DefinePolygon(4, x_adi1RL, y_adi1RL); - adi1_RL->DefineSection(0, -0.75, 0, 0, - 1); //(plane,-zplane/+zplane, x0, y0,(x/y)) - adi1_RL->DefineSection(1, 0.775, 0, 0, 1); // 0.76 + adi1_RL->DefineSection(0, -0.75, 0, 0, 1); + adi1_RL->DefineSection(1, 0.775, 0, 0, 1); //// 3) modi adding new knee new element 2 new knee TGeoXtru* adi2_RL = new TGeoXtru(2); // @@ -1001,64 +881,57 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) Double_t y_adi2RL[6] = {13.863, 13.863, 24.35, 25.65, 25.65, 25.078}; adi2_RL->DefinePolygon(6, x_adi2RL, y_adi2RL); - adi2_RL->DefineSection(0, -0.75, 0, 0, - 1); //(plane,-zplane/+zplane, x0, y0,(x/y)) - adi2_RL->DefineSection(1, 0.7755, 0, 0, 1); // 0.76, 0.775 + adi2_RL->DefineSection(0, -0.75, 0, 0, 1); + adi2_RL->DefineSection(1, 0.7755, 0, 0, 1); // 4)modi to quit ---> trap - Double_t RL_dx1 = 2.66; // at -z - Double_t RL_dx2 = 1; // dat +z - Double_t RL_dy = 2.2; // dz=7.5 to quit - Double_t RL_dz = 1.5; // dz=1.5 to quit - // auto *trap1 = new TGeoTrd1("TRAP1",RL_dx1,RL_dx2 ,RL_dy ,RL_dz); + Double_t RL_dx1 = 2.66; + Double_t RL_dx2 = 1; + Double_t RL_dy = 2.2; + Double_t RL_dz = 1.5; TGeoRotation* rot_RL_Z50 = new TGeoRotation("rot_RL_Z50", 50, 0, 0); rot_RL_Z50->RegisterYourself(); TGeoCombiTrans* combi_RL_trap = - new TGeoCombiTrans(5, 18.633, -1.5 - 0.025, rot_RL_Z50); // y= + new TGeoCombiTrans(5, 18.633, -1.5 - 0.025, rot_RL_Z50); combi_RL_trap->SetName("combi_RL_trap"); combi_RL_trap->RegisterYourself(); - ///// 5) modi to quit inferior part box - Double_t x_qinf_box = 10.66; // - Double_t y_qinf_box = 10.2; // - Double_t z_qinf_box = 3.; // dz =1.5 + ///// 5) modi to quit inferior part box + Double_t x_qinf_box = 10.66; + Double_t y_qinf_box = 10.2; + Double_t z_qinf_box = 3.; auto* s_RL_qinf_box = new TGeoBBox("S_RL_QINF_BOX", x_qinf_box / 2, y_qinf_box / 2, z_qinf_box / 2); TGeoCombiTrans* combi_RL_qbox = - new TGeoCombiTrans(7, 23., -1.5 - 0.025, rot_RL_Z50); // y= , z=-0.75-0.75 + new TGeoCombiTrans(7, 23., -1.5 - 0.025, rot_RL_Z50); combi_RL_qbox->SetName("combi_RL_qbox"); combi_RL_qbox->RegisterYourself(); // 6) modi. add penta face z - TGeoXtru* pentfa_RL = new TGeoXtru(2); // not work + TGeoXtru* pentfa_RL = new TGeoXtru(2); pentfa_RL->SetName("S_PENTFA_RL"); Double_t x_pentfaRL[5] = {-1., -1., 0.13, 1., 1.}; - Double_t y_pentfaRL[5] = {1.125, 0.045, -1.125, -1.125, 1.125}; // 1.125 + Double_t y_pentfaRL[5] = {1.125, 0.045, -1.125, -1.125, 1.125}; pentfa_RL->DefinePolygon(5, x_pentfaRL, y_pentfaRL); - pentfa_RL->DefineSection(0, -5.05, 0, 0, - 1); //(plane,-zplane/+zplane, x0, y0,(x/y)) // 0.75 - pentfa_RL->DefineSection(1, 5.055, 0, 0, 1); // 0.76.. 0.9036 + pentfa_RL->DefineSection(0, -5.05, 0, 0, 1); + pentfa_RL->DefineSection(1, 5.055, 0, 0, 1); TGeoRotation* rot_X90 = new TGeoRotation("rot_X90", 0, 90, 0); rot_X90->RegisterYourself(); - TGeoCombiTrans* combi_RL_pent = new TGeoCombiTrans( - 8.3, 30.705, 1.125 - 0.025, rot_X90); // x =8.3 , z= 1.125 + TGeoCombiTrans* combi_RL_pent = + new TGeoCombiTrans(8.3, 30.705, 1.125 - 0.025, rot_X90); combi_RL_pent->SetName("combi_RL_pent"); combi_RL_pent->RegisterYourself(); - // // 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 + z_RL_kneebox / 2); new TGeoBBox("qdi_box", x_qdi_box / 2, y_qdi_box / 2, z_qdi_box / 2); new TGeoTrd1("TRAP1", RL_dx1, RL_dx2, RL_dy, RL_dz); - // 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( @@ -1067,96 +940,70 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) "qdi_box:combi_qdi + " "S_ADI1_RL + S_ADI2_RL - TRAP1:combi_RL_trap - " "S_RL_QINF_BOX:combi_RL_qbox + " - "S_PENTFA_RL:combi_RL_pent"); // xtru3_RL:tr_vol3_RL - // + + "S_PENTFA_RL:combi_RL_pent"); TGeoVolume* rail_L_vol0 = new TGeoVolume("RAIL_L_VOL0", RL_Shape_0, malu5083); - // 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 + new TGeoTranslation("tr_RR_1box", 0, 0.6, 1.825); 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}; + Double_t x_RR1[5] = {-1.5, -0.5, -0.5, 1.5, 1.5}; + Double_t y_RR1[5] = {1.2, 2.2, 8.2, 8.2, 1.2}; 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); 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 x_3RR[6] = {1.0, 1.0, -1.2497, -2.2138, -0.5, -0.5}; 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); part_RR3->DefineSection(1, 0.78, 0, 0, 1); TGeoTranslation* tr_vol3_RR = - new TGeoTranslation("tr_vol3_RR", -0.25, 12.66, 0); // + 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; // + Double_t x_qdi_Rbox = 3.1; + 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); 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; // + Double_t radout_a_rail = 0.325; + Double_t high_a_rail = 0.82; - TGeoTranslation* tr_a_RR = - new TGeoTranslation("tr_a_RR", -0.7, 0.6, 1.825); // right + TGeoTranslation* tr_a_RR = new TGeoTranslation("tr_a_RR", -0.7, 0.6, 1.825); 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 radout_ir_rail = 0.15; + Double_t high_ir_rail = 3.2; 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"); @@ -1167,82 +1014,62 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) 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); 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); 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); // + 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); // + TGeoTranslation* tr_sr_r = new TGeoTranslation("tr_sr_r", 15.01, 0, 0); tr_sr_r->RegisterYourself(); - // + //////// new modfi b /////// cut arm 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(); - // 1b) modi, reducing arm - // 1b) modi, reducing arm - 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, 25.65, - 25.65, 25.078, 14.591, 8.2}; // 35.75, 35.75 -->25.65 + + Double_t x_RR2[8] = {-0.5, -0.5, -9.3, -9.3, -7.3, -7.3, 1.5, 1.5}; + Double_t y_RR2[8] = {8.2, 13.863, 24.35, 25.65, 25.65, 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); part_RR2->DefineSection(1, 2.225, 0, 0, 1); // 2b) modi adding box new element 1 box TGeoXtru* adi1_RR = new TGeoXtru(2); adi1_RR->SetName("S_ADI1_RR"); - Double_t x_adi1RR[4] = {-0.5, -.5, 1.5, 1.5}; // vertices + Double_t x_adi1RR[4] = {-0.5, -.5, 1.5, 1.5}; Double_t y_adi1RR[4] = {2.2, 13.863, 13.863, 2.2}; adi1_RR->DefinePolygon(4, x_adi1RR, y_adi1RR); - adi1_RR->DefineSection(0, -0.75, 0, 0, - 1); //(plane,-zplane/+zplane, x0, y0,(x/y)) - adi1_RR->DefineSection(1, 0.775, 0, 0, 1); // 0.76 + adi1_RR->DefineSection(0, -0.75, 0, 0, 1); + adi1_RR->DefineSection(1, 0.775, 0, 0, 1); - // 3b) modi adding new knee new element 2 new knee + // 3b) modi adding new knee new element TGeoXtru* adi2_RR = new TGeoXtru(2); // adi2_RR->SetName("S_ADI2_RR"); Double_t x_adi2RR[6] = {1.5, -0.5, -9.3, -9.3, -7.8, -7.8}; Double_t y_adi2RR[6] = {13.863, 13.863, 24.35, 25.65, 25.65, 25.078}; adi2_RR->DefinePolygon(6, x_adi2RR, y_adi2RR); - adi2_RR->DefineSection(0, -0.75, 0, 0, - 1); //(plane,-zplane/+zplane, x0, y0,(x/y)) - adi2_RR->DefineSection(1, 0.7755, 0, 0, 1); // 0.775 + adi2_RR->DefineSection(0, -0.75, 0, 0, 1); + adi2_RR->DefineSection(1, 0.7755, 0, 0, 1); // 4)modi to quit ---> trap - // Double_t RL_dx1=2.66; //at -z (defined in rail L) - // Double_t RL_dx2=1; // dat +z - // Double_t RL_dy=2.2; // dz=7.5 to quit - // Double_t RL_dz=1.5; // dz=1.5 to quit - // auto *trap1 = new TGeoTrd1("TRAP1",RL_dx1,RL_dx2 ,RL_dy ,RL_dz); TGeoRotation* rot_RR_Z310 = new TGeoRotation("rot_RR_Z310", -50, 0, 0); rot_RR_Z310->RegisterYourself(); TGeoCombiTrans* combi_RR_trap = - new TGeoCombiTrans(-5, 18.633, -1.5 - 0.025, rot_RR_Z310); // y= + new TGeoCombiTrans(-5, 18.633, -1.5 - 0.025, rot_RR_Z310); combi_RR_trap->SetName("combi_RR_trap"); combi_RR_trap->RegisterYourself(); // 5) modi to quit inferior part box - // Double_t x_qinf_box=10.66; // defined in RL - // Double_t y_qinf_box=10.2; // - /// Double_t z_qinf_box=3.; // dz =1.5 - /// auto *s_RL_qinf_box =new TGeoBBox("S_RL_QINF_BOX", - /// x_qinf_box/2,y_qinf_box/2,z_qinf_box/2); TGeoCombiTrans* combi_RR_qbox = - new TGeoCombiTrans(-7, 23., -1.5 - 0.025, rot_RR_Z310); // rot to RR + new TGeoCombiTrans(-7, 23., -1.5 - 0.025, rot_RR_Z310); combi_RR_qbox->SetName("combi_RR_qbox"); combi_RR_qbox->RegisterYourself(); @@ -1250,46 +1077,26 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoXtru* pentfa_RR = new TGeoXtru(2); pentfa_RR->SetName("S_PENTFA_RR"); Double_t x_pentfaRR[5] = {1., 1., -0.13, -1., -1.}; - Double_t y_pentfaRR[5] = {1.125, 0.045, -1.125, -1.125, 1.125}; // 1.125 + Double_t y_pentfaRR[5] = {1.125, 0.045, -1.125, -1.125, 1.125}; pentfa_RR->DefinePolygon(5, x_pentfaRR, y_pentfaRR); - pentfa_RR->DefineSection(0, -5.05, 0, 0, - 1); //(plane,-zplane/+zplane, x0, y0,(x/y)) // 0.75 - pentfa_RR->DefineSection(1, 5.055, 0, 0, 1); // 0.76.. 0.9036 - - // TGeoRotation *rot_X90 = new TGeoRotation("rot_X90", 0,90,0); - // rot_X90->RegisterYourself(); - TGeoCombiTrans* combi_RR_pent = new TGeoCombiTrans( - -8.3, 30.705, 1.125 - 0.025, rot_X90); // x =8.3 , z= 1.125 + pentfa_RR->DefineSection(0, -5.05, 0, 0, 1); + pentfa_RR->DefineSection(1, 5.055, 0, 0, 1); + + TGeoCombiTrans* combi_RR_pent = + new TGeoCombiTrans(-8.3, 30.705, 1.125 - 0.025, rot_X90); combi_RR_pent->SetName("combi_RR_pent"); combi_RR_pent->RegisterYourself(); // shape for rail R new TGeoBBox("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 new TGeoCompositeShape( "RR_Shape_0", "RR_1box:tr_RR_1box + part_RR1 + part_RR2 - qdi_box:combi_qdi + " "S_ADI1_RR + S_ADI2_RR - TRAP1:combi_RR_trap - " - "S_RL_QINF_BOX:combi_RR_qbox +S_PENTFA_RR:combi_RR_pent "); // quit + - // part_RR3 - // old knee - - // 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 + "S_RL_QINF_BOX:combi_RR_qbox +S_PENTFA_RR:combi_RR_pent "); // JOIN only for show L and R parts auto* rail_L_R_Shape = new TGeoCompositeShape( @@ -1297,13 +1104,10 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) TGeoVolume* rail_L_R_vol0 = new TGeoVolume("RAIL_L_R_VOL0", rail_L_R_Shape, malu5083); - // 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); combi_rLR->SetName("combi_rLR"); combi_rLR->RegisterYourself(); @@ -1325,144 +1129,117 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) 13.4, 13.4, 12.6, 12.6, 0.}; sup_MB_L->DefinePolygon(11, x_sMB_L, y_sMB_L); - sup_MB_L->DefineSection(0, -0.4, 0, 0, - 1); //(plane, -zplane/ +zplane,x0,y0,(x/y)) + sup_MB_L->DefineSection(0, -0.4, 0, 0, 1); sup_MB_L->DefineSection(1, 0.4, 0, 0, 1); TGeoXtru* part_MBL_0 = new TGeoXtru(2); - part_MBL_0->SetName("part_MBL_0"); // V-MBL_0 + part_MBL_0->SetName("part_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); 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 + Double_t x_mb_box = 0.8; + Double_t y_mb_box = 0.8; + Double_t z_mb_box = 0.81; + TGeoTranslation* tr_mb_box = new TGeoTranslation("tr_mb_box", 24.05, 9.55, 0); 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 + Double_t x_lat_box = 0.7; + Double_t y_lat_box = 1.8; + Double_t z_lat_box = 0.2; TGeoTranslation* tr_lat1L_box = - new TGeoTranslation("tr_lat1L_box", 4.6, 0, 0.4); // + 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); // + 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); // + TGeoTranslation* tr_lat3L_box = - new TGeoTranslation("tr_lat3L_box", 17.35, 5.923, 0.4); // 18.53 + new TGeoTranslation("tr_lat3L_box", 17.35, 5.923, 0.4); tr_lat3L_box->RegisterYourself(); TGeoTranslation* tr_lat4L_box = - new TGeoTranslation("tr_lat4L_box", 26.45, 10, 0.4); // + 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); // + 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); // + 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); // + 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); // + TGeoTranslation* tr_lat3R_box = - new TGeoTranslation("tr_lat3R_box", 17.35, 5.923, -0.4); // + new TGeoTranslation("tr_lat3R_box", 17.35, 5.923, -0.4); tr_lat3R_box->RegisterYourself(); TGeoTranslation* tr_lat4R_box = - new TGeoTranslation("tr_lat4R_box", 26.45, 10, -0.4); // + 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); // + 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 + Double_t radout_1mb = 0.175; + Double_t high_1mb = 2.825; + TGeoTranslation* tr1_mb = new TGeoTranslation("tr1_mb", 18.48, 6.1, 0.); 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.); 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 + Double_t radout_2mb = 0.15; + Double_t high_2mb = 0.82; 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.); // + 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); // + 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); combi_hup_mb->SetName("combi_hup_mb"); combi_hup_mb->RegisterYourself(); // 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); + new TGeoTube("hole_2mbl", radin_2mb, radout_2mb, high_2mb / 2); 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", " sup_MB_L - hole_2mbl:combi_hup_mb "); // new2020 + "MB_Shape_0", " sup_MB_L - hole_2mbl:combi_hup_mb "); auto* MB_Shape_0L = new TGeoCompositeShape( "MB_Shape_0L", "MB_Shape_0 - lat_box:tr_lat3L_box "); auto* MB_Shape_0R = new TGeoCompositeShape( "MB_Shape_0R", "MB_Shape_0 - lat_box:tr_lat3R_box "); - // 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" + new TGeoCompositeShape("MB_Shape_1L", "MB_Shape_0L:rot1_MBL_0 - hole_2mbl"); // 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, malu5083); @@ -1476,7 +1253,7 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) stair->AddNode(Cross_mft_2, 2, new TGeoTranslation(0, 1.65 - 28.8, 9.55 + 0.675)); stair->AddNode(Cross_mb0, 4, - new TGeoTranslation(0, 5.423 - 28.8, 17.35 + 0.675)); // 6.1 + new TGeoTranslation(0, 5.423 - 28.8, 17.35 + 0.675)); stair->AddNode(Cross_mft_3, 5, new TGeoTranslation(0, 11.7 - 28.8, 25.55 + 0.675)); stair->AddNode(Cross_mft_4, 6, @@ -1526,63 +1303,59 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) // 9th new 2020 ELEMENT middle framework back ----------------------------- auto* frame_back = new TGeoVolumeAssembly("frame_back"); - /// variables + // rectangular box1 to quit - Double_t x_box_fwb = 15.8; // dx= 7.2 cm + Double_t x_box_fwb = 15.8; Double_t y_box_fwb = 5; Double_t z_box_fwb = 1; // rectangular box2 to add - Double_t x_box2_fwb = 1.9; // dx= 7.2 cm + Double_t x_box2_fwb = 1.9; Double_t y_box2_fwb = 0.5; Double_t z_box2_fwb = 0.6; ///// holes tub 1hole tranversal Double_t radin_fwb = 25.75; - Double_t radout_fwb = 26.75; // diameter 3.5 H9 (0.35cm) - Double_t high_fwb = 0.6; /// + Double_t radout_fwb = 26.75; + Double_t high_fwb = 0.6; // seg tub_back - Double_t radin_stub = 23.6; // 25.75 - Double_t radout_stub = 24.4; // 26.05 + Double_t radin_stub = 23.6; + Double_t radout_stub = 24.4; Double_t high_stub = 0.6; - Double_t ang_in_stub = 288.9; // 270 + 19.56 - Double_t ang_fin_stub = 342.; // 360-17.56 + Double_t ang_in_stub = 288.9; + Double_t ang_fin_stub = 342.; TGeoRotation* rot_1hole_fwb = new TGeoRotation("rot_1hole_fwb", 0, 90, 0); rot_1hole_fwb->RegisterYourself(); - /// h= hole + TGeoCombiTrans* acombi_fwb = new TGeoCombiTrans(5.2, 0, 0, rot_1hole_fwb); acombi_fwb->SetName("acombi_1h_fwb"); acombi_fwb->RegisterYourself(); - TGeoTranslation* tr_box_y24 = - new TGeoTranslation("tr_box_y24", 0, -24., 0.); // + TGeoTranslation* tr_box_y24 = new TGeoTranslation("tr_box_y24", 0, -24., 0.); tr_box_y24->RegisterYourself(); - TGeoTranslation* tr_box2_fwb = new TGeoTranslation( - "tr_box2_fwb", 24.4 - 1.9 / 2, -7.121 - 0.5 / 2, 0.); // + TGeoTranslation* tr_box2_fwb = + new TGeoTranslation("tr_box2_fwb", 24.4 - 1.9 / 2, -7.121 - 0.5 / 2, 0.); tr_box2_fwb->RegisterYourself(); TGeoRotation* rot_Z180_X180 = new TGeoRotation("rot_Z180_X180", 180, 180, 0); rot_Z180_X180->RegisterYourself(); TGeoTranslation* tr_fb = - new TGeoTranslation("tr_fb", 0, -2.3 - 0.06, 13.85 + 0.675); // + new TGeoTranslation("tr_fb", 0, -2.3 - 0.06, 13.85 + 0.675); tr_fb->RegisterYourself(); - // auto* q_box_fwb = new TGeoBBox("q_box_fwb", x_box_fwb / 2, y_box_fwb / 2, z_box_fwb / 2); auto* box2_fwb = new TGeoBBox("box2_fwb", x_box2_fwb / 2, y_box2_fwb / 2, z_box2_fwb / 2); auto* s_tub_fwb = new TGeoTube("s_tub_fwb", radin_fwb, radout_fwb, high_fwb / 2); - // auto *s_ctub_fwb=new - // TGeoTube("S_ctub_fwb",radin_fwb,radout_fwb,high_2hole_mb0/2); - auto* s_stub_fwb = - new TGeoTubeSeg("s_stub_fwb", radin_stub, radout_stub, high_stub / 2, - ang_in_stub, ang_fin_stub); // r_in,r_out,dZ,ang,ang + + auto* s_stub_fwb = new TGeoTubeSeg("s_stub_fwb", radin_stub, radout_stub, + high_stub / 2, ang_in_stub, ang_fin_stub); /// composite shape for mb0 @@ -1592,49 +1365,45 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto* fwb_Shape_1 = new TGeoCompositeShape( "fwb_Shape_1", "fwb_Shape_0 + fwb_Shape_0:rot_Z180_X180"); - auto* fwb_Volume = - new TGeoVolume("fwb_Volume", fwb_Shape_1, malu5083); // malu5083 + auto* fwb_Volume = new TGeoVolume("fwb_Volume", fwb_Shape_1, malu5083); frame_back->AddNode(fwb_Volume, 1, tr_fb); - //////////////////////////////////////////////// /// 10 th colonne_support_MB012 new 2020 auto* colonne_mb = new TGeoVolumeAssembly("colonne_mb"); - /// variables + // rectangular box - Double_t x_box_cmb = 1.9; // dx= 7.2 cm + Double_t x_box_cmb = 1.9; Double_t y_box_cmb = 0.6; Double_t z_box_cmb = 2.2033; ///// holes tub 1hole tranversal Double_t radin_c_mb = 0.; - Double_t radout_c_mb = 0.3; // diameter 3.5 H9 (0.35cm) - Double_t high_c_mb = 2.2033; /// + Double_t radout_c_mb = 0.3; + Double_t high_c_mb = 2.2033; TGeoRotation* rot_1c_mb0 = new TGeoRotation("rot_1c_mb0", 0, 90, 0); rot_1c_mb0->RegisterYourself(); - /// h= hole + TGeoCombiTrans* acombi_1c_mb0 = new TGeoCombiTrans(0.95, 0, 0, rot_1c_mb0); acombi_1c_mb0->SetName("acombi_1c_mb0"); acombi_1c_mb0->RegisterYourself(); - TGeoCombiTrans* bcombi_1c_mb0 = - new TGeoCombiTrans(-0.95, 0, 0, rot_1c_mb0); // y= + TGeoCombiTrans* bcombi_1c_mb0 = new TGeoCombiTrans(-0.95, 0, 0, rot_1c_mb0); bcombi_1c_mb0->SetName("bcombi_1c_mb0"); bcombi_1c_mb0->RegisterYourself(); // box to cut - Double_t x_boxq_cmb = 3.; // dx= 7.2 cm + Double_t x_boxq_cmb = 3.; Double_t y_boxq_cmb = 1.05; Double_t z_boxq_cmb = 4.; TGeoRotation* rot_X19 = new TGeoRotation("rot_X19", 0, -19, 0); rot_X19->RegisterYourself(); TGeoCombiTrans* combi_qbox = - new TGeoCombiTrans(0, +2.1 / 2 + 0.5, 0, rot_X19); // x =8.3 , z= 1.125 + new TGeoCombiTrans(0, +2.1 / 2 + 0.5, 0, rot_X19); combi_qbox->SetName("combi_qbox"); combi_qbox->RegisterYourself(); // shapes - auto* box_cmb = new TGeoBBox("box_cmb", x_box_cmb / 2, y_box_cmb / 2, z_box_cmb / 2); auto* tub_cmb = @@ -1642,27 +1411,21 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) auto* boxq_cmb = new TGeoBBox("boxq_cmb", x_boxq_cmb / 2, y_boxq_cmb / 2, z_boxq_cmb / 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_mb_Shape_0 = new TGeoCompositeShape( "box_cmb:rot_1c_mb0 + tub_cmb:acombi_1c_mb0 + " "tub_cmb:bcombi_1c_mb0 - boxq_cmb:combi_qbox"); TGeoTranslation* tr_cmb = new TGeoTranslation( - "tr_cmb", 0, 5.923 - 28.8 + 2.2033 / 2 - 0.2, 17.35 + 0.675); // + "tr_cmb", 0, 5.923 - 28.8 + 2.2033 / 2 - 0.2, 17.35 + 0.675); tr_cmb->RegisterYourself(); /////////////////// - // auto * cross_mb0_Volume = new - // TGeoVolume("cross_mb0_Volume",c_mb0_Shape_0,Al); // + auto* colonne_mb_Volume = - new TGeoVolume("colonne_mb_Volume", c_mb_Shape_0, malu5083); // malu5083 + new TGeoVolume("colonne_mb_Volume", c_mb_Shape_0, malu5083); colonne_mb->AddNode(colonne_mb_Volume, 1, tr_cmb); - // auto* Half_3 = new TGeoVolumeAssembly("Half_3"); // Shell radii @@ -1749,28 +1512,24 @@ TGeoVolumeAssembly* HalfCone::createHalfCone(Int_t half) "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.)); + new TGeoVolume("Half_3_Volume", Half_3_Shape_4, malu5083); - TGeoRotation* rot_z180 = - new TGeoRotation("rot_z180", 0, 180, 0); // orig: (180,0,0) + TGeoRotation* rot_z180 = new TGeoRotation("rot_z180", 0, 180, 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); combi_coat->SetName("combi_coat"); combi_coat->RegisterYourself(); Half_3->AddNode(Half_3_Volume, 1, combi_coat); - HalfConeVolume->AddNode(stair, 1, c_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(middle, 5, c_final); // - HalfConeVolume->AddNode(frame_back, 6, c_final); // - HalfConeVolume->AddNode(colonne_mb, 7, c_final); // + HalfConeVolume->AddNode(middle, 5, c_final); + HalfConeVolume->AddNode(frame_back, 6, c_final); + HalfConeVolume->AddNode(colonne_mb, 7, c_final); //========================== Mother Boards //========================================= diff --git a/Detectors/ITSMFT/MFT/simulation/src/Detector.cxx b/Detectors/ITSMFT/MFT/simulation/src/Detector.cxx index a1c934cc90aa3..255c2d7ce95c7 100644 --- a/Detectors/ITSMFT/MFT/simulation/src/Detector.cxx +++ b/Detectors/ITSMFT/MFT/simulation/src/Detector.cxx @@ -20,17 +20,16 @@ #include "MFTSimulation/Detector.h" -#include "SimulationDataFormat/Stack.h" #include "Field/MagneticField.h" +#include "SimulationDataFormat/Stack.h" -#include "TVirtualMC.h" -#include "TLorentzVector.h" -#include "TVector3.h" -#include "TGeoManager.h" #include "FairLogger.h" #include "FairRootManager.h" #include "FairVolume.h" -#include "FairRootManager.h" +#include "TGeoManager.h" +#include "TLorentzVector.h" +#include "TVector3.h" +#include "TVirtualMC.h" using o2::itsmft::Hit; using namespace o2::mft; @@ -39,23 +38,11 @@ ClassImp(o2::mft::Detector); //_____________________________________________________________________________ Detector::Detector() - : o2::base::DetImpl("MFT", kTRUE), - mVersion(1), - mDensitySupportOverSi(0.036), - mHits(o2::utils::createSimVector()), - mTrackData() -{ -} + : o2::base::DetImpl("MFT", kTRUE), mVersion(1), mDensitySupportOverSi(0.036), mHits(o2::utils::createSimVector()), mTrackData() {} //_____________________________________________________________________________ Detector::Detector(const Detector& src) - : o2::base::DetImpl(src), - mVersion(src.mVersion), - mDensitySupportOverSi(src.mDensitySupportOverSi), - mHits(o2::utils::createSimVector()), - mTrackData() -{ -} + : o2::base::DetImpl(src), mVersion(src.mVersion), mDensitySupportOverSi(src.mDensitySupportOverSi), mHits(o2::utils::createSimVector()), mTrackData() {} //_____________________________________________________________________________ Detector& Detector::operator=(const Detector& src) @@ -122,10 +109,11 @@ Bool_t Detector::ProcessHits(FairVolume* vol) fMC->CurrentVolOffID(++level, diskID); fMC->CurrentVolOffID(++level, halfID); - Int_t sensorIndex = mGeometryTGeo->getSensorIndex(halfID, diskID, ladderID, sensorID); + Int_t sensorIndex = + mGeometryTGeo->getSensorIndex(halfID, diskID, ladderID, sensorID); - // LOG(INFO) << "Found hit into half = " << halfID << "; disk = " << diskID << "; ladder = " << ladderID << "; sensor - // = " << sensorID ; + // LOG(INFO) << "Found hit into half = " << halfID << "; disk = " << diskID << + // "; ladder = " << ladderID << "; sensor = " << sensorID ; bool startHit = false, stopHit = false; unsigned char status = 0; @@ -149,9 +137,11 @@ Bool_t Detector::ProcessHits(FairVolume* vol) } // track is entering or created in the volume - if ((status & Hit::kTrackEntering) || (status & Hit::kTrackInside && !mTrackData.mHitStarted)) { + if ((status & Hit::kTrackEntering) || + (status & Hit::kTrackInside && !mTrackData.mHitStarted)) { startHit = true; - } else if ((status & (Hit::kTrackExiting | Hit::kTrackOut | Hit::kTrackStopped))) { + } else if ((status & + (Hit::kTrackExiting | Hit::kTrackOut | Hit::kTrackStopped))) { stopHit = true; } @@ -180,8 +170,9 @@ Bool_t Detector::ProcessHits(FairVolume* vol) Int_t trackID = fMC->GetStack()->GetCurrentTrackNumber(); // Int_t detID = vol->getMCid(); - Hit* p = addHit(trackID, sensorIndex, mTrackData.mPositionStart.Vect(), positionStop.Vect(), - mTrackData.mMomentumStart.Vect(), mTrackData.mMomentumStart.E(), positionStop.T(), + Hit* p = addHit(trackID, sensorIndex, mTrackData.mPositionStart.Vect(), + positionStop.Vect(), mTrackData.mMomentumStart.Vect(), + mTrackData.mMomentumStart.E(), positionStop.T(), mTrackData.mEnergyLoss, mTrackData.mTrkStatusStart, status); o2::data::Stack* stack = (o2::data::Stack*)fMC->GetStack(); @@ -192,12 +183,14 @@ Bool_t Detector::ProcessHits(FairVolume* vol) } //_____________________________________________________________________________ -Hit* Detector::addHit(Int_t trackID, Int_t detID, TVector3 startPos, TVector3 endPos, TVector3 startMom, - Double_t startE, Double_t endTime, Double_t eLoss, unsigned char startStatus, - unsigned char endStatus) +Hit* Detector::addHit(Int_t trackID, Int_t detID, TVector3 startPos, + TVector3 endPos, TVector3 startMom, Double_t startE, + Double_t endTime, Double_t eLoss, + unsigned char startStatus, unsigned char endStatus) { - mHits->emplace_back(trackID, detID, startPos, endPos, startMom, startE, endTime, eLoss, startStatus, endStatus); + mHits->emplace_back(trackID, detID, startPos, endPos, startMom, startE, + endTime, eLoss, startStatus, endStatus); return &(mHits->back()); } @@ -206,36 +199,46 @@ Hit* Detector::addHit(Int_t trackID, Int_t detID, TVector3 startPos, TVector3 en void Detector::createMaterials() { - // data from PDG booklet 2002 density [gr/cm^3] rad len [cm] abs len [cm] - Float_t aSi = 28.085, zSi = 14., dSi = 2.329, radSi = 21.82 / dSi, absSi = 108.4 / dSi; // Silicon - Float_t aCarb = 12.01, zCarb = 6., dCarb = 2.265, radCarb = 18.8, absCarb = 49.9; // Carbon - Float_t aAlu = 26.98, zAlu = 13., dAlu = 2.70, radAlu = 8.897, absAlu = 39.70; // Aluminum - Float_t aBe = 9.012182, zBe = 4., dBe = 1.85, radBe = 65.19 / dBe, absBe = 77.8 / dBe; // Beryllium - Float_t aCu = 63.546, zCu = 29., dCu = 8.96, radCu = 1.436, absCu = 15.32; // Copper + // data from PDG booklet 2002 density [gr/cm^3] rad len + // [cm] abs len [cm] + Float_t aSi = 28.085, zSi = 14., dSi = 2.329, radSi = 21.82 / dSi, + absSi = 108.4 / dSi; // Silicon + Float_t aCarb = 12.01, zCarb = 6., dCarb = 2.265, radCarb = 18.8, + absCarb = 49.9; // Carbon + Float_t aAlu = 26.98, zAlu = 13., dAlu = 2.70, radAlu = 8.897, + absAlu = 39.70; // Aluminum + Float_t aBe = 9.012182, zBe = 4., dBe = 1.85, radBe = 65.19 / dBe, + absBe = 77.8 / dBe; // Beryllium + Float_t aCu = 63.546, zCu = 29., dCu = 8.96, radCu = 1.436, + absCu = 15.32; // Copper // Air mixture const Int_t nAir = 4; Float_t aAir[nAir] = {12, 14, 16, 36}, zAir[nAir] = {6, 7, 8, 18}, - wAir[nAir] = {0.000124, 0.755267, 0.231781, 0.012827}, dAir = 0.00120479, dAirVacuum = 0.00120479e-4; + wAir[nAir] = {0.000124, 0.755267, 0.231781, 0.012827}, + dAir = 0.00120479, dAirVacuum = 0.00120479e-4; // Water mixture const Int_t nWater = 2; - Float_t aWater[nWater] = {1.00794, 15.9994}, zWater[nWater] = {1, 8}, wWater[nWater] = {0.111894, 0.888106}, - dWater = 1.; + Float_t aWater[nWater] = {1.00794, 15.9994}, zWater[nWater] = {1, 8}, + wWater[nWater] = {0.111894, 0.888106}, dWater = 1.; // SiO2 mixture const Int_t nSiO2 = 2; - Float_t aSiO2[nSiO2] = {15.9994, 28.0855}, zSiO2[nSiO2] = {8., 14.}, wSiO2[nSiO2] = {0.532565, 0.467435}, - dSiO2 = 2.20; + Float_t aSiO2[nSiO2] = {15.9994, 28.0855}, zSiO2[nSiO2] = {8., 14.}, + wSiO2[nSiO2] = {0.532565, 0.467435}, dSiO2 = 2.20; // Inox mixture const Int_t nInox = 9; - Float_t aInox[nInox] = {12.0107, 54.9380, 28.0855, 30.9738, 32.0660, 58.6928, 51.9961, 95.9400, 55.8450}; + Float_t aInox[nInox] = {12.0107, 54.9380, 28.0855, 30.9738, 32.0660, + 58.6928, 51.9961, 95.9400, 55.8450}; Float_t zInox[nInox] = {6, 25, 14, 15, 16, 28, 24, 42, 26}; - Float_t wInox[nInox] = {0.0003, 0.02, 0.01, 0.00045, 0.0003, 0.12, 0.17, 0.025, 0.65395}; + Float_t wInox[nInox] = {0.0003, 0.02, 0.01, 0.00045, 0.0003, + 0.12, 0.17, 0.025, 0.65395}; Float_t dInox = 8.03; - // Kapton polyimide film (from SPD AliITSv11.cxx) and http://physics.nist.gov/cgi-bin/Star/compos.pl?matno=179 + // Kapton polyimide film (from SPD AliITSv11.cxx) and + // http://physics.nist.gov/cgi-bin/Star/compos.pl?matno=179 Float_t aKapton[4] = {1.00794, 12.0107, 14.010, 15.9994}; Float_t zKapton[4] = {1., 6., 7., 8.}; Float_t wKapton[4] = {0.026362, 0.69113, 0.07327, 0.209235}; @@ -245,7 +248,8 @@ void Detector::createMaterials() Float_t aEpoxy[3] = {15.9994, 1.00794, 12.0107}; Float_t zEpoxy[3] = {8., 1., 6.}; Float_t wEpoxy[3] = {3., 19., 18.}; - Float_t dEpoxy = 1.23; // 1.8 very high value from ITS! ou 1.23 from eccobond 45 lv datasheet + Float_t dEpoxy = 1.23; // 1.8 very high value from ITS! ou 1.23 from eccobond + // 45 lv datasheet //--- Silicone SE4445 Dow Corning // Si, Al, O, C, H @@ -267,10 +271,14 @@ void Detector::createMaterials() Float_t wRohacell[nRohacell] = {0.0858, 0.5964, 0.3178}; Float_t dRohacell; if (Geometry::sGrooves == 0) { - dRohacell = 0.032 / (1 - 0.15); // No grooves, water pipes outside rohacell ==> smaller thcikness, greater rohacell density by 15% + dRohacell = + 0.032 / + (1 - 0.15); // No grooves, water pipes outside rohacell ==> smaller + // thcikness, greater rohacell density by 15% } if (Geometry::sGrooves == 1) { - dRohacell = 0.032; // With grooves, usual rohacell density: 0.032 g/cm3 rohacell 31, 0.075 g/cm3 rohacell 71; + dRohacell = 0.032; // With grooves, usual rohacell density: 0.032 g/cm3 + // rohacell 31, 0.075 g/cm3 rohacell 71; } // Polyimide pipe mixture @@ -302,7 +310,8 @@ void Detector::createMaterials() // 137.327 Ba, 47.867 Ti, 15.9994 O (mainly BaTiO3) Float_t aX7R[6] = {137.327, 47.867, 15.9994, 58.6928, 63.5460, 118.710}; Float_t zX7R[6] = {56., 22., 8., 28., 29., 50.}; - Float_t wX7R[6] = {0.524732, 0.176736, 0.179282, 0.079750, 0.019750, 0.019750}; + Float_t wX7R[6] = {0.524732, 0.176736, 0.179282, + 0.079750, 0.019750, 0.019750}; Float_t dX7R = 6.07914; // X7R weld, i.e. Sn 60% Pb 40% (from F.Tosello's web page - M.S. 15 Oct 10) @@ -313,21 +322,21 @@ void Detector::createMaterials() Float_t dX7Rweld = 8.52358; //========================================================================== - //Barrel CarbonFiber M46J + // Barrel CarbonFiber M46J const Int_t nCM46J = 4; Float_t aCM46J[4] = {12.0107, 14.0067, 15.9994, 1.00794}; Float_t zCM46J[4] = {6., 7., 8., 1.}; Float_t wCM46J[4] = {0.908508078, 0.010387573, 0.055957585, 0.025146765}; Float_t dCM46J = 1.84; // only changes density - //Polypropylene[C3H6]n + // Polypropylene[C3H6]n const Int_t nPolyppln = 2; Float_t aPolyppln[2] = {12.0107, 1.00794}; Float_t zPolyppln[2] = {6.0, 1.0}; Float_t wPolyppln[2] = {0.856307, 0.143693}; Float_t dPolyppln = 1.19; - //Polyurethane [HN-CO-O] + // Polyurethane [HN-CO-O] const Int_t nPolyurthn = 4; Float_t aPolyurthn[4] = {1.00794, 14.010, 12.0107, 15.9994}; Float_t zPolyurthn[4] = {1.0, 7.0, 6.0, 8.0}; @@ -336,52 +345,65 @@ void Detector::createMaterials() Int_t matId = 0; // tmp material id number Int_t unsens = 0, sens = 1; // sensitive or unsensitive medium - Int_t itgfld = - 3; // type of field intergration 0 no field -1 user in guswim 1 Runge Kutta 2 helix 3 const field along z - Float_t maxfld = 5.; // max field value - - Float_t tmaxfd = 0.1; // -10.0; // max deflection angle due to magnetic field in one step - Float_t stemax = 1.0; // 0.001; // max step allowed [cm] - Float_t deemax = 0.1; // -0.2; // maximum fractional energy loss in one step 0>>>> fieldType " << fieldType << " maxField " << maxField; + LOG(DEBUG) << "Detector::createMaterials >>>>> fieldType " << fieldType + << " maxField " << maxField; matId = 0; // starting value o2::base::Detector::Mixture(matId, "Air$", aAir, zAir, dAir, nAir, wAir); - o2::base::Detector::Medium(matId, "Air$", matId, unsens, fieldType, maxField, tmaxfd, stemax, deemax, epsil, stmin); + o2::base::Detector::Medium(matId, "Air$", matId, unsens, fieldType, maxField, + tmaxfd, stemax, deemax, epsil, stmin); matId++; - o2::base::Detector::Mixture(matId, "Vacuum$", aAir, zAir, dAirVacuum, nAir, wAir); - o2::base::Detector::Medium(matId, "Vacuum$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, stmin); + o2::base::Detector::Mixture(matId, "Vacuum$", aAir, zAir, dAirVacuum, nAir, + wAir); + o2::base::Detector::Medium(matId, "Vacuum$", matId, unsens, itgfld, maxfld, + tmaxfd, stemax, deemax, epsil, stmin); matId++; o2::base::Detector::Material(matId, "Si$", aSi, zSi, dSi, radSi, absSi); - o2::base::Detector::Medium(matId, "Si$", matId, sens, fieldType, maxField, tmaxfdSi, stemaxSi, deemaxSi, epsilSi, - stminSi); + o2::base::Detector::Medium(matId, "Si$", matId, sens, fieldType, maxField, + tmaxfdSi, stemaxSi, deemaxSi, epsilSi, stminSi); matId++; o2::base::Detector::Material(matId, "Readout$", aSi, zSi, dSi, radSi, absSi); - o2::base::Detector::Medium(matId, "Readout$", matId, unsens, fieldType, maxField, tmaxfdSi, stemaxSi, deemaxSi, - epsilSi, stminSi); + o2::base::Detector::Medium(matId, "Readout$", matId, unsens, fieldType, + maxField, tmaxfdSi, stemaxSi, deemaxSi, epsilSi, + stminSi); matId++; - o2::base::Detector::Material(matId, "Support$", aSi, zSi, dSi * mDensitySupportOverSi, - radSi / mDensitySupportOverSi, absSi / mDensitySupportOverSi); - o2::base::Detector::Medium(matId, "Support$", matId, unsens, fieldType, maxField, tmaxfdSi, stemaxSi, deemaxSi, - epsilSi, stminSi); + o2::base::Detector::Material( + matId, "Support$", aSi, zSi, dSi * mDensitySupportOverSi, + radSi / mDensitySupportOverSi, absSi / mDensitySupportOverSi); + o2::base::Detector::Medium(matId, "Support$", matId, unsens, fieldType, + maxField, tmaxfdSi, stemaxSi, deemaxSi, epsilSi, + stminSi); matId++; Double_t maxBending = 0; // Max Angle @@ -400,96 +422,147 @@ void Detector::createMaterials() maxStepSize = .01; precision = .003; minStepSize = .003; - o2::base::Detector::Material(matId, "Carbon$", aCarb, zCarb, dCarb, radCarb, absCarb); - o2::base::Detector::Medium(matId, "Carbon$", matId, 0, fieldType, maxField, maxBending, maxStepSize, maxEnergyLoss, - precision, minStepSize); + o2::base::Detector::Material(matId, "Carbon$", aCarb, zCarb, dCarb, radCarb, + absCarb); + o2::base::Detector::Medium(matId, "Carbon$", matId, 0, fieldType, maxField, + maxBending, maxStepSize, maxEnergyLoss, precision, + minStepSize); matId++; o2::base::Detector::Material(matId, "Be$", aBe, zBe, dBe, radBe, absBe); - o2::base::Detector::Medium(matId, "Be$", matId, unsens, fieldType, maxField, tmaxfd, stemax, deemax, epsil, stmin); + o2::base::Detector::Medium(matId, "Be$", matId, unsens, fieldType, maxField, + tmaxfd, stemax, deemax, epsil, stmin); matId++; o2::base::Detector::Material(matId, "Alu$", aAlu, zAlu, dAlu, radAlu, absAlu); - o2::base::Detector::Medium(matId, "Alu$", matId, unsens, fieldType, maxField, tmaxfd, stemax, deemax, epsil, stmin); + o2::base::Detector::Medium(matId, "Alu$", matId, unsens, fieldType, maxField, + tmaxfd, stemax, deemax, epsil, stmin); matId++; - o2::base::Detector::Mixture(matId, "Water$", aWater, zWater, dWater, nWater, wWater); - o2::base::Detector::Medium(matId, "Water$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, stmin); + o2::base::Detector::Mixture(matId, "Water$", aWater, zWater, dWater, nWater, + wWater); + o2::base::Detector::Medium(matId, "Water$", matId, unsens, itgfld, maxfld, + tmaxfd, stemax, deemax, epsil, stmin); matId++; - o2::base::Detector::Mixture(matId, "SiO2$", aSiO2, zSiO2, dSiO2, nSiO2, wSiO2); - o2::base::Detector::Medium(matId, "SiO2$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, stmin); + o2::base::Detector::Mixture(matId, "SiO2$", aSiO2, zSiO2, dSiO2, nSiO2, + wSiO2); + o2::base::Detector::Medium(matId, "SiO2$", matId, unsens, itgfld, maxfld, + tmaxfd, stemax, deemax, epsil, stmin); matId++; - o2::base::Detector::Mixture(matId, "Inox$", aInox, zInox, dInox, nInox, wInox); - o2::base::Detector::Medium(matId, "Inox$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, stmin); + o2::base::Detector::Mixture(matId, "Inox$", aInox, zInox, dInox, nInox, + wInox); + o2::base::Detector::Medium(matId, "Inox$", matId, unsens, itgfld, maxfld, + tmaxfd, stemax, deemax, epsil, stmin); matId++; - o2::base::Detector::Mixture(matId, "Kapton$", aKapton, zKapton, dKapton, 4, wKapton); - o2::base::Detector::Medium(matId, "Kapton$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, stmin); + o2::base::Detector::Mixture(matId, "Kapton$", aKapton, zKapton, dKapton, 4, + wKapton); + o2::base::Detector::Medium(matId, "Kapton$", matId, unsens, itgfld, maxfld, + tmaxfd, stemax, deemax, epsil, stmin); matId++; - o2::base::Detector::Mixture(matId, "Epoxy$", aEpoxy, zEpoxy, dEpoxy, -3, wEpoxy); - o2::base::Detector::Medium(matId, "Epoxy$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, stmin); + o2::base::Detector::Mixture(matId, "Epoxy$", aEpoxy, zEpoxy, dEpoxy, -3, + wEpoxy); + o2::base::Detector::Medium(matId, "Epoxy$", matId, unsens, itgfld, maxfld, + tmaxfd, stemax, deemax, epsil, stmin); matId++; - o2::base::Detector::Mixture(matId, "SE4445$", aSE4445, zSE4445, dSE4445, -5, wSE4445); - o2::base::Detector::Medium(matId, "SE4445$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, stmin); + o2::base::Detector::Mixture(matId, "SE4445$", aSE4445, zSE4445, dSE4445, -5, + wSE4445); + o2::base::Detector::Medium(matId, "SE4445$", matId, unsens, itgfld, maxfld, + tmaxfd, stemax, deemax, epsil, stmin); matId++; - o2::base::Detector::Mixture(matId, "CarbonFiber$", aCM55J, zCM55J, dCM55J, 4, wCM55J); - o2::base::Detector::Medium(matId, "CarbonFiber$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, - stmin); + o2::base::Detector::Mixture(matId, "CarbonFiber$", aCM55J, zCM55J, dCM55J, 4, + wCM55J); + o2::base::Detector::Medium(matId, "CarbonFiber$", matId, unsens, itgfld, + maxfld, tmaxfd, stemax, deemax, epsil, stmin); matId++; - o2::base::Detector::Mixture(matId, "Rohacell$", aRohacell, zRohacell, dRohacell, nRohacell, wRohacell); - o2::base::Detector::Medium(matId, "Rohacell$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, stmin); + o2::base::Detector::Mixture(matId, "Rohacell$", aRohacell, zRohacell, + dRohacell, nRohacell, wRohacell); + o2::base::Detector::Medium(matId, "Rohacell$", matId, unsens, itgfld, maxfld, + tmaxfd, stemax, deemax, epsil, stmin); matId++; - o2::base::Detector::Mixture(matId, "Polyimide$", aPolyimide, zPolyimide, dPolyimide, nPolyimide, wPolyimide); - o2::base::Detector::Medium(matId, "Polyimide$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, - stmin); + o2::base::Detector::Mixture(matId, "Polyimide$", aPolyimide, zPolyimide, + dPolyimide, nPolyimide, wPolyimide); + o2::base::Detector::Medium(matId, "Polyimide$", matId, unsens, itgfld, maxfld, + tmaxfd, stemax, deemax, epsil, stmin); matId++; - o2::base::Detector::Mixture(matId, "PEEK$", aPEEK, zPEEK, dPEEK, nPEEK, wPEEK); - o2::base::Detector::Medium(matId, "PEEK$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, stmin); + o2::base::Detector::Mixture(matId, "PEEK$", aPEEK, zPEEK, dPEEK, nPEEK, + wPEEK); + o2::base::Detector::Medium(matId, "PEEK$", matId, unsens, itgfld, maxfld, + tmaxfd, stemax, deemax, epsil, stmin); matId++; o2::base::Detector::Mixture(matId, "FR4$", aFR4, zFR4, dFR4, nFR4, wFR4); - o2::base::Detector::Medium(matId, "FR4$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, stmin); + o2::base::Detector::Medium(matId, "FR4$", matId, unsens, itgfld, maxfld, + tmaxfd, stemax, deemax, epsil, stmin); matId++; o2::base::Detector::Material(matId, "Cu$", aCu, zCu, dCu, radCu, absCu); - o2::base::Detector::Medium(matId, "Cu$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, stmin); + o2::base::Detector::Medium(matId, "Cu$", matId, unsens, itgfld, maxfld, + tmaxfd, stemax, deemax, epsil, stmin); matId++; - o2::base::Detector::Mixture(matId, "X7Rcapacitors$", aX7R, zX7R, dX7R, 6, wX7R); - o2::base::Detector::Medium(matId, "X7Rcapacitors$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, - stmin); + o2::base::Detector::Mixture(matId, "X7Rcapacitors$", aX7R, zX7R, dX7R, 6, + wX7R); + o2::base::Detector::Medium(matId, "X7Rcapacitors$", matId, unsens, itgfld, + maxfld, tmaxfd, stemax, deemax, epsil, stmin); matId++; - o2::base::Detector::Mixture(matId, "X7Rweld$", aX7Rweld, zX7Rweld, dX7Rweld, 2, wX7Rweld); - o2::base::Detector::Medium(matId, "X7Rweld$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, stmin); + o2::base::Detector::Mixture(matId, "X7Rweld$", aX7Rweld, zX7Rweld, dX7Rweld, + 2, wX7Rweld); + o2::base::Detector::Medium(matId, "X7Rweld$", matId, unsens, itgfld, maxfld, + tmaxfd, stemax, deemax, epsil, stmin); matId++; // Carbon fleece from AliITSSUv2.cxx - o2::base::Detector::Material(matId, "CarbonFleece$", 12.0107, 6, 0.4, radCarb, absCarb); // 999,999); why 999??? - o2::base::Detector::Medium(matId, "CarbonFleece$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, - epsil, stmin); + o2::base::Detector::Material(matId, "CarbonFleece$", 12.0107, 6, 0.4, radCarb, + absCarb); // 999,999); why 999??? + o2::base::Detector::Medium(matId, "CarbonFleece$", matId, unsens, itgfld, + maxfld, tmaxfd, stemax, deemax, epsil, stmin); matId++; - //Barrel Materials + // Barrel Materials + + o2::base::Detector::Mixture(matId, "CarbonFiberM46J$", aCM46J, zCM46J, dCM46J, + nCM46J, wCM46J); + o2::base::Detector::Medium(matId, "CarbonFiberM46J$", matId, unsens, itgfld, + maxfld, tmaxfd, stemax, deemax, epsil, stmin); + matId++; - o2::base::Detector::Mixture(matId, "CarbonFiberM46J$", aCM46J, zCM46J, dCM46J, nCM46J, wCM46J); - o2::base::Detector::Medium(matId, "CarbonFiberM46J$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, stmin); + o2::base::Detector::Mixture(matId, "Polypropylene$", aPolyppln, zPolyppln, + dPolyppln, nPolyppln, wPolyppln); + o2::base::Detector::Medium(matId, "Polypropylene$", matId, unsens, itgfld, + maxfld, tmaxfd, stemax, deemax, epsil, stmin); matId++; - o2::base::Detector::Mixture(matId, "Polypropylene$", aPolyppln, zPolyppln, dPolyppln, nPolyppln, wPolyppln); - o2::base::Detector::Medium(matId, "Polypropylene$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, stmin); + o2::base::Detector::Mixture(matId, "Polyurethane$", aPolyurthn, zPolyurthn, + dPolyurthn, nPolyurthn, wPolyurthn); + o2::base::Detector::Medium(matId, "Polyurethane$", matId, unsens, itgfld, + maxfld, tmaxfd, stemax, deemax, epsil, stmin); matId++; - o2::base::Detector::Mixture(matId, "Polyurethane$", aPolyurthn, zPolyurthn, dPolyurthn, nPolyurthn, wPolyurthn); - o2::base::Detector::Medium(matId, "Polyurethane$", matId, unsens, itgfld, maxfld, tmaxfd, stemax, deemax, epsil, stmin); + // Halfcone Materials + // Alu5083 mixture + const Int_t nAlu5083 = 9; // iron, silicon, copper, Manganese, Magnesium, + // Zinc, Titanium, Chromium, Aluminium + Float_t aAlu5083[nAlu5083] = {55.845, 28.0855, 63.546, 54.938049, 24.3050, + 65.39, 47.867, 51.9961, 26.981538}; + Float_t zAlu5083[nAlu5083] = {26., 14., 29., 25., 12., 30., 22., 24., 13.}; + Float_t wAlu5083[nAlu5083] = {0.004, 0.004, 0.001, 0.002, 0.0025, + 0.0025, 0.0015, 0.0010, 0.9815}; + Float_t dAlu5083 = 2.65; + + o2::base::Detector::Mixture(matId, "Alu5083$", aAlu5083, zAlu5083, dAlu5083, + nAlu5083, wAlu5083); + o2::base::Detector::Medium(matId, "Alu5083$", matId, unsens, itgfld, maxfld, + tmaxfd, stemax, deemax, epsil, stmin); matId++; LOG(DEBUG) << "Detector::createMaterials -----> matId = " << matId; @@ -532,11 +605,12 @@ void Detector::EndOfEvent() { Reset(); } void Detector::Register() { // This will create a branch in the output tree called Hit, setting the last - // parameter to kFALSE means that this collection will not be written to the file, - // it will exist only during the simulation + // parameter to kFALSE means that this collection will not be written to the + // file, it will exist only during the simulation if (FairRootManager::Instance()) { - FairRootManager::Instance()->RegisterAny(addNameTo("Hit").data(), mHits, kTRUE); + FairRootManager::Instance()->RegisterAny(addNameTo("Hit").data(), mHits, + kTRUE); } }