Skip to content
Snippets Groups Projects
Commit 388d2816 authored by Eoin Clerkin's avatar Eoin Clerkin
Browse files

beampipes binaries and moves

parent b2efb52b
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
This diff is collapsed.
......@@ -24,7 +24,6 @@ void create_bpipe_geometry_v21e(const char* geoTag = "v21e")
gSystem->Load("libGeom");
TGeoManager* geom = new TGeoManager("beampipe_v21e", "Beampipe for maximum deflection");
//--- define some materials
TGeoMixture* matCarbonFiber = new TGeoMixture("BP_carbonfiber", 4, 1.5);
matCarbonFiber->AddElement(12.001, 6.0, 0.8926);
......@@ -59,14 +58,13 @@ void create_bpipe_geometry_v21e(const char* geoTag = "v21e")
Double_t rmin2 = 125 * mm;
Double_t rmax2 = 126 * mm;
Double_t rail_cord[] = {23.1, 0, 4.5, 21.5, 2.8, 4.5};
Double_t rail_cord[] = {23.0, 0, 4.5, 21.4, 2.8, 4.5};
Double_t top_plate_cord[] = {10, 0, 2.1, 10.15, 0, 4.05, 11.75, 2.15, 4.0, 15.3, 4.28,
2.85, 18.1, 5.27, 2.85, 19.75, 5.65, 5.0, 21.1, 5.65, 0};
Double_t side_plate_cord[] = {11.3, 0, 2, 11.3, 0, 7.55, 16, 6.8, 4.6, 8.7, 6.8, 4.6,
19.8, 8.3, 2.35, 13.6, 8.3, 2.35, 20.8, 7.9, 3.0, 14.8, 7.9, 3.0,
21.3, 6.8, 1.5, 16.3, 6.8, 1.5, 21.3, 6.3, 0, 17.4, 6.3, 0};
//-----------------------DEFINITION OF TRANSFORMATIONS--------------------------------------------------------------------------------------
TGeoRotation* rot_top = new TGeoRotation("rot_top");
......@@ -91,25 +89,8 @@ void create_bpipe_geometry_v21e(const char* geoTag = "v21e")
TGeoRotation* ident_rotation = new TGeoRotation("ident_rotation");
ident_rotation->RotateY(0);
ident_rotation->RotateY(0);
ident_rotation->RegisterYourself();
TGeoTranslation orig_translation("orig_translation", -0.15707676 * mm, 0, 3230 * mm);
//TGeoCombiTrans *origin_translation = new TGeoCombiTrans(orig_translation,ident);
TGeoRotation orig_rotation("orig_rotation");
orig_rotation.RotateY(1.2);
//TGeoCombiTrans *origin_rotation = new TGeoCombiTrans(0,orig_rotation);
//orig_rotation->RegisterYourself();
//TGeoHMatrix orig_combi = orig_translation * orig_rotation;
TGeoHMatrix orig_combi = orig_rotation * orig_translation;
TGeoHMatrix* origin_combi = new TGeoHMatrix(orig_combi);
TGeoRotation* rot_left = new TGeoRotation("rot_left");
rot_left->SetAngles(90, 0, 0);
TGeoCombiTrans* combi_left = new TGeoCombiTrans(-15.2, 0, 0, rot_left);
......@@ -198,13 +179,13 @@ void create_bpipe_geometry_v21e(const char* geoTag = "v21e")
rot_right);
TGeoRotation* rot_sts_conus_connection = new TGeoRotation("rot_sts_conus_connection");
rot_sts_conus_connection->RotateZ(180);
TGeoCombiTrans* ctr_sts_conus_connection = new TGeoCombiTrans(0, 0, -3185 * mm, rot_sts_conus_connection);
//rot_sts_conus_connection->RotateZ(180);
TGeoCombiTrans* ctr_sts_conus_connection = new TGeoCombiTrans(0, 0, -1600.00 * mm, rot_sts_conus_connection);
TGeoRotation* rotation_of_sts_tube = new TGeoRotation("rotation_of_sts_tube");
rotation_of_sts_tube->RotateZ(180);
//rotation_of_sts_tube->RotateZ(180);
rotation_of_sts_tube->RotateY(-1.2);
TGeoCombiTrans* ctr_sts_tube = new TGeoCombiTrans(0.15707676 * mm, 0, -3214.99917754 * mm, rotation_of_sts_tube);
TGeoCombiTrans* ctr_sts_tube = new TGeoCombiTrans(0.15707676 * mm, 0, -1630.50 * mm, rotation_of_sts_tube);
TGeoRotation* rot_global = new TGeoRotation("rot_global");
rot_global->RotateY(1.2);
......@@ -251,6 +232,30 @@ void create_bpipe_geometry_v21e(const char* geoTag = "v21e")
TGeoTranslation* mot_transl = new TGeoTranslation("mot_transl", -286.5 * mm, -159.5 * mm, 534. * mm);
TGeoTranslation orig_translation("orig_translation", -0.15707676 * mm, 0, 3230 * mm);
TGeoTranslation orig_translation_cone("orig_translation_cone", -0.15707676 * mm, 0, 1645 * mm);
//TGeoCombiTrans *origin_translation = new TGeoCombiTrans(orig_translation,ident);
TGeoRotation orig_rotation("orig_rotation");
orig_rotation.RotateY(1.2);
//TGeoCombiTrans *origin_rotation = new TGeoCombiTrans(0,orig_rotation);
//orig_rotation->RegisterYourself();
//TGeoHMatrix orig_combi = orig_translation * orig_rotation;
TGeoHMatrix orig_combi = orig_rotation * orig_translation;
TGeoHMatrix orig_combi_cone = orig_rotation * orig_translation_cone;
TGeoHMatrix* origin_combi = new TGeoHMatrix(orig_combi);
TGeoHMatrix* origin_combi_cone = new TGeoHMatrix(orig_combi_cone);
//TGeoTranslation* cone_transl = new TGeoTranslation("cone_transl", -286.5 * mm, -159.5 * mm, 534. * mm);
TGeoRotation* rot_psd_tube = new TGeoRotation("rot_psd_tube");
rot_psd_tube->RotateY(2.15);
TGeoCombiTrans* ctr_psd_tube =
......@@ -266,17 +271,27 @@ void create_bpipe_geometry_v21e(const char* geoTag = "v21e")
//------------------------------------DEFINITIONS OF VOLUMES----------------------------------------
//--- make the top container volume
Double_t worldx = 320 * mm;
Double_t worldx = 800 * mm;
Double_t worldy = 220 * mm;
Double_t worldz = 18100 * mm;
TGeoVolume* full_assembly = geom->MakeBox("pipe_v21e", Vacuum, worldx, worldy, worldz);
Double_t worldz = 18200 * mm;
//TGeoVolume* full_assembly = geom->MakeBox("pipe_v21e", Vacuum, worldx, worldy, worldz);
TGeoVolumeAssembly* full_assembly = new TGeoVolumeAssembly("pipe_v21e");
geom->SetTopVolume(full_assembly);
full_assembly->SetVisibility(kTRUE);
TGeoVolume* conical_beam_pipe = geom->MakeBox("conical_beam_pipe", Vacuum, 220 * mm, 220 * mm, 3650 * mm);
//TGeoVolume* conical_beam_pipe = geom->MakeBox("conical_beam_pipe", Vacuum, 220 * mm, 220 * mm, 1825 * mm);
TGeoVolume* conical_beam_pipe = new TGeoVolumeAssembly("conical_beam_pipe");
conical_beam_pipe->SetVisibility(kFALSE);
TGeoVolume* bellow_ass = geom->MakeBox("Bellow assembly", Vacuum, 320 * mm, 220 * mm, 240 * mm);
TGeoVolume* vacuum_conical_beam_pipe = new TGeoVolumeAssembly("vacuum_conical_beam_pipe");
vacuum_conical_beam_pipe->SetVisibility(kFALSE);
//TGeoVolume* bellow_ass = geom->MakeBox("Bellow assembly", Vacuum, 350 * mm, 220 * mm, 600 * mm);
TGeoVolume* bellow_ass = new TGeoVolumeAssembly("Bellow assembly");
bellow_ass->SetVisibility(kFALSE);
TGeoVolume* vacuum_bellow_ass = new TGeoVolumeAssembly("Vacuum_bellow assembly");
vacuum_bellow_ass->SetVisibility(kFALSE);
// TOP PLATE--------------------------------------------------------------------------------------
TGeoVolume* sub_t_plate1 = geom->MakeArb8("sub_t_plate1", CF, top_plate_cord[2]);
sub_t_plate1->SetLineColor(kGray);
......@@ -486,35 +501,47 @@ void create_bpipe_geometry_v21e(const char* geoTag = "v21e")
r_arb1->SetVertex(7, rail_cord[3], rail_cord[1] + rail_cord[4]);
TGeoBBox* flange_box = new TGeoBBox("flange_box", 15.2, 15.2, 1.5);
TGeoTube* flange_hole = new TGeoTube("flange_hole", 0., 12.5, 2.5);
TGeoTube* flange_hole = new TGeoTube("flange_hole", 0., 12.5, 1.6);
// DOWNSTREAM_CARBON-FIBRE_RICH_MUCH_FLANGE_TO_BELLOW_ASS------------------------------------------------------------------------------------
TGeoBBox* rich_much_flange_box = new TGeoBBox("rich_much_flange_box", 15.2, 15.2, 1.5);
TGeoTube* rich_much_flange_hole = new TGeoTube("rich_much_flange_hole", 0., 12.5, 2.5);
TGeoTube* rich_much_flange_hole = new TGeoTube("rich_much_flange_hole", 0., 12.55, 1.6);
TGeoCompositeShape* rich_much_flange_composite =
new TGeoCompositeShape("flange_composite_rich", "rich_much_flange_box-rich_much_flange_hole");
TGeoVolume* rich_much_downstream_flange =
new TGeoVolume("rich_much_downstream_flange", rich_much_flange_composite, CF);
rich_much_downstream_flange->SetLineColor(kGray);
// CONICAL_BEAM_PIPE WITH CARBONE-FIBRE FLANGE AND TILTED END PIECE OF TUBE TO STS SECTION------------------------------------------------------------------------------------
TGeoCone* conus = new TGeoCone("conical_beam_pipe", conus_lenght, rmin1, rmax1, rmin2, rmax2);
TGeoVolume* conical_beam_pipe_volume = new TGeoVolume("conical_beam_pipe_volume", conus, CF);
conical_beam_pipe_volume->SetLineColor(kGray);
TGeoCtub* rich_much_upstream_tube_connection =
new TGeoCtub("rich_much_upstream_tube_connection", 55. * mm, 56. * mm, 15. * mm, 360., 360., 0.05235892, 0.,
4.99972585, 0., 0., 1.);
TGeoVolume* rich_much_upstream_tube_connection_volume =
new TGeoVolume("rich_much_upstream_tube_connection_volume", rich_much_upstream_tube_connection, CF);
rich_much_upstream_tube_connection_volume->SetLineColor(kGray);
TGeoCtub* rich_much_upstream_tube_connection_to_sts =
new TGeoCtub("rich_much_upstream_tube_connection_to_sts", 55. * mm, 56. * mm, 15. * mm, 360., 360., 0., 0., 1.,
-0.05235892, 0., 4.99972585);
TGeoVolume* rich_much_upstream_tube_connection_to_sts_volume =
new TGeoVolume("rich_much_upstream_tube_connection_to_sts_volume", rich_much_upstream_tube_connection_to_sts, CF);
rich_much_upstream_tube_connection_to_sts_volume->SetLineColor(kGray);
// VACUUM IN THE FLANGE----------------------------------------------------------------------------------------------
TGeoTube* vacuum_flange_hole = new TGeoTube("vacuum_flange_hole", 0., 12.5, 1.5);
TGeoVolume* vacuum_downstream_flange =
new TGeoVolume("vacuum_downstream_flange", vacuum_flange_hole, Vacuum);
vacuum_downstream_flange->SetLineColor(kRed);
// CONICAL_BEAM_PIPE----------------------------------------------------------------------------------------------------------
TGeoCone* conus = new TGeoCone("conus", conus_lenght, rmin1, rmax1, rmin2, rmax2);
TGeoVolume* conus_volume = new TGeoVolume("conus_volume", conus, CF);
conus_volume->SetLineColor(kGray);
//-------------------------------VACUUM IN CONE-------------------------------------------------------------------
TGeoCone* vacuum_conus = new TGeoCone("vacuum_conus", conus_lenght, 0, rmin1, 0, rmin2);
TGeoVolume* vacuum_conus_volume = new TGeoVolume("vacuum_conus_volume", vacuum_conus, Vacuum);
vacuum_conus_volume->SetLineColor(kGreen);
// CONNECTING TUBE--------------------------------------------------------------------------------------------------------------------------------------------------------
TGeoCtub* tube_connection = new TGeoCtub("tube_connection", 55. * mm, 56. * mm, 15. * mm, 0., 360., -0.05235892, 0., 4.99972585, 0., 0., 1.);
TGeoVolume* tube_connection_volume = new TGeoVolume("tube_connection_volume", tube_connection, CF);
tube_connection_volume->SetLineColor(kGray);
//------------------------VACUUM IN THE CONNECTING TUBE--------------------------------------------------------------
TGeoCtub* vacuum_tube_connection = new TGeoCtub("vacuum_tube_connection", 0. * mm, 55. * mm, 15. * mm, 0., 360., -0.05235892, 0., 4.99972585, 0., 0., 1.);
TGeoVolume* vacuum_tube_connection_volume = new TGeoVolume("vacuum_tube_connection_volume", vacuum_tube_connection, Vacuum);
vacuum_tube_connection_volume->SetLineColor(kGreen);
// STS tube-----------------------------------------------------------------------------------------------------
TGeoCtub* tube_connection_sts = new TGeoCtub("tube_connection_sts", 55. * mm, 56. * mm, 15. * mm, 0., 360., 0., 0., 1., 0.05235892, 0., 4.99972585);
TGeoVolume* tube_connection_sts_volume = new TGeoVolume("tube_connection_sts_volume", tube_connection_sts, CF);
tube_connection_sts_volume->SetLineColor(kGray);
//-------------------------------BELLOW DEFINITION----------------------------------------------------------------
TGeoCompositeShape* flange_composite = new TGeoCompositeShape("flange_composite", "flange_box-flange_hole");
......@@ -536,23 +563,50 @@ void create_bpipe_geometry_v21e(const char* geoTag = "v21e")
TGeoVolume* bellow_3 = new TGeoVolume("bellow_s3", bellow_s3, Stainless);
bellow_3->SetLineColor(kRed);
TGeoCtub* bellow_s4 = new TGeoCtub("bellow_s4", 124. * mm, 142. * mm, 25.30673722 * mm, 0., 360., -0.024210927, 0.,
TGeoCtub* bellow_s4 = new TGeoCtub("bellow_s4", 124. * mm, 142. * mm, 25.306 * mm, 0., 360., -0.024210927, 0.,
-0.999706873, -0.083697266, 0., 0.996491228);
TGeoVolume* bellow_4 = new TGeoVolume("bellow_s3", bellow_s4, Stainless);
bellow_4->SetLineColor(kRed);
//-------------------------------VACUUM BELLOW DEFINITION----------------------------------------------------------------
TGeoVolume* vacuum_bellow_flange_0 = new TGeoVolume("vacuum_bellow_flange_0", vacuum_flange_hole, Vacuum);
vacuum_bellow_flange_0->SetLineColor(kGreen);
TGeoCtub* vacuum_bellow_s1 = new TGeoCtub("vacuum_bellow_s1", 0. * mm, 123.8 * mm, 29.87452196 * mm, 0., 360., -0.083697266, 0.,
-0.996491228, -0.122217128, 0., 0.992503387);
TGeoVolume* vacuum_bellow_1 = new TGeoVolume("vacuum_bellow_s1", vacuum_bellow_s1, Vacuum);
vacuum_bellow_1->SetLineColor(kGreen);
TGeoCtub* vacuum_bellow_s2 = new TGeoCtub("vacuum_bellow_s1", 0. * mm, 123.8 * mm, 96.682942995 * mm, 0., 360., -0.122217128, 0.,
-0.992503387, 0.089898314, 0, 0.995950949);
TGeoVolume* vacuum_bellow_2 = new TGeoVolume("vacuum_bellow_s2", vacuum_bellow_s2, Vacuum);
vacuum_bellow_2->SetLineColor(kGreen);
TGeoCtub* vacuum_bellow_s3 = new TGeoCtub("vacuum_bellow_s3", 0. * mm, 123.8 * mm, 22.10506784 * mm, 0., 360., -0.089898314, 0.,
-0.995950949, -0.024210927, 0., 0.999706873);
TGeoVolume* vacuum_bellow_3 = new TGeoVolume("vacuum_bellow_s3", vacuum_bellow_s3, Vacuum);
vacuum_bellow_3->SetLineColor(kGreen);
TGeoCtub* vacuum_bellow_s4 = new TGeoCtub("vacuum_bellow_s4", 0. * mm, 123.8 * mm, 25.306 * mm, 0., 360., -0.024210927, 0.,
-0.999706873, -0.083697266, 0., 0.996491228);
TGeoVolume* vacuum_bellow_4 = new TGeoVolume("vacuum_bellow_s4", vacuum_bellow_s4, Vacuum);
vacuum_bellow_4->SetLineColor(kGreen);
TGeoBBox* roll_plate_s = new TGeoBBox("roll_plate_s", 75. * mm, 12.5 * mm, 90. * mm);
TGeoVolume* roll_plate = new TGeoVolume("roll_plate", roll_plate_s, Al);
roll_plate->SetLineColor(kBlue);
TGeoTube* flange_cyl = new TGeoTube("flange_cyl", 0., 15., 1.5);
TGeoTube* flange_cyl_hole = new TGeoTube("flange_cyl_hole", 0., 8.9, 2.5);
TGeoTube* flange_cyl_hole = new TGeoTube("flange_cyl_hole", 0., 8.9, 1.6);
TGeoCompositeShape* flange_cyl_composite = new TGeoCompositeShape(
"flange_cyl_composite", "((flange_cyl-flange_cyl_hole)-roll_plate_s:tr_plate_up)-roll_plate_s:tr_plate_down");
TGeoVolume* bellow_flange_1 = new TGeoVolume("bellow_flange_1", flange_cyl_composite, Stainless);
bellow_flange_1->SetLineColor(kRed);
//-------------------------------VACUUM FLANGE BELLOW------------------------------------------------------------------
TGeoTube* vacuum_flange_cyl_hole = new TGeoTube("vacuum_flange_cyl_hole", 0., 8.9, 1.5);
TGeoVolume* vacuum_bellow_flange_1 = new TGeoVolume("vacuum_bellow_flange_1", vacuum_flange_cyl_hole, Vacuum);
vacuum_bellow_flange_1->SetLineColor(kGreen);
TGeoTube* lead_screw_s = new TGeoTube("lead_screw_s", 0. * mm, 6. * mm, 205. * mm);
TGeoTube* nut_small_s = new TGeoTube("nut_small_s", 6. * mm, 14. * mm, 50. * mm);
......@@ -573,6 +627,11 @@ void create_bpipe_geometry_v21e(const char* geoTag = "v21e")
TGeoVolume* psd_tube = new TGeoVolume("psd_tube", psd_tube_s, CF);
psd_tube->SetLineColor(kGray);
//------------------------------VACUUM PSD TUBE-------------------------------------------------------------------------
TGeoTube* vacuum_psd_tube_s = new TGeoTube("vacuum_psd_tube_s", 0. * mm, 90. * mm, 7230. * mm);
TGeoVolume* vacuum_psd_tube = new TGeoVolume("vacuum_psd_tube", vacuum_psd_tube_s, Vacuum);
vacuum_psd_tube->SetLineColor(kGreen);
//------------------TOP plate------------------------------
bellow_ass->AddNode(sub_t_plate1, 1, tr_top_0a);
bellow_ass->AddNode(sub_t_plate2, 1, tr_top_1a);
......@@ -625,6 +684,15 @@ void create_bpipe_geometry_v21e(const char* geoTag = "v21e")
bellow_ass->AddNode(bellow_4, 1, ctr_s4);
bellow_ass->AddNode(bellow_flange_1, 1, ctr_s5);
//-----------------Vacuum in bellow and flanges
vacuum_bellow_ass->AddNode(vacuum_bellow_flange_0, 1, new TGeoTranslation(0, 0, 1.5));
vacuum_bellow_ass->AddNode(vacuum_bellow_1, 1, ctr_s1);
vacuum_bellow_ass->AddNode(vacuum_bellow_2, 1, ctr_s2);
vacuum_bellow_ass->AddNode(vacuum_bellow_3, 1, ctr_s3);
vacuum_bellow_ass->AddNode(vacuum_bellow_4, 1, ctr_s4);
vacuum_bellow_ass->AddNode(vacuum_bellow_flange_1, 1, ctr_s5);
//------------------DRIVE assembly--------------------------------------
bellow_ass->AddNode(roll_plate, 1, ctr_plate_up);
bellow_ass->AddNode(roll_plate, 2, ctr_plate_down);
......@@ -632,16 +700,24 @@ void create_bpipe_geometry_v21e(const char* geoTag = "v21e")
bellow_ass->AddNode(motor, 1, mot_transl);
//-------------------CONICAL section--------------------------------------------------
conical_beam_pipe->AddNode(rich_much_downstream_flange, 1, new TGeoTranslation(0, 0, -15 * mm));
conical_beam_pipe->AddNode(conical_beam_pipe_volume, 1, new TGeoTranslation(0, 0, -1585 * mm));
conical_beam_pipe->AddNode(rich_much_upstream_tube_connection_volume, 1, ctr_sts_conus_connection);
conical_beam_pipe->AddNode(rich_much_upstream_tube_connection_to_sts_volume, 1, ctr_sts_tube);
conical_beam_pipe->AddNode(rich_much_downstream_flange, 1, new TGeoTranslation(0, 0, 1570 * mm));
conical_beam_pipe->AddNode(conus_volume, 1, new TGeoTranslation(0, 0, 0));
conical_beam_pipe->AddNode(tube_connection_volume, 1, ctr_sts_conus_connection);
//conical_beam_pipe->AddNode(tube_connection_sts_volume, 1, ctr_sts_tube); //unexplained "nonexisting" overlap
//conical_beam_pipe->AddNode(rich_much_upstream_tube_connection_volume, 1, ctr_sts_tube);
//-------------------VACUUM in CONICAL section--------------------------------------------------
//vacuum_conical_beam_pipe->AddNode(vacuum_downstream_flange, 1, new TGeoTranslation(0, 0, 1570 * mm)); // not needed
vacuum_conical_beam_pipe->AddNode(vacuum_conus_volume, 1, new TGeoTranslation(0, 0, 0));
vacuum_conical_beam_pipe->AddNode(vacuum_tube_connection_volume, 1, ctr_sts_conus_connection);
//------------------INSERT into top volume
full_assembly->AddNode(conical_beam_pipe, 1, origin_combi);
full_assembly->AddNode(conical_beam_pipe, 1, origin_combi_cone);
full_assembly->AddNode(bellow_ass, 1, origin_combi);
full_assembly->AddNode(psd_tube, 1, ctr_psd_tube);
full_assembly->AddNode(vacuum_conical_beam_pipe, 1, origin_combi_cone);
full_assembly->AddNode(vacuum_bellow_ass, 1, origin_combi);
full_assembly->AddNode(vacuum_psd_tube, 1, ctr_psd_tube);
//beampipe->AddNode(full_assembly,1, new TGeoTranslation(0, 0, 0*mm));
// --- close the geometry
......@@ -662,8 +738,10 @@ void create_bpipe_geometry_v21e(const char* geoTag = "v21e")
TGeoTranslation* trans = new TGeoTranslation(0.0, 0.0, 82.0);
trans->Write("trans");
cout << endl;
cout << "Geometry " << geom->GetTopVolume()->GetName() << " written to " << geo_bin_filename << std::endl;
cout << "Geometry " << geom->GetTopVolume()->GetName() << " written to " << geo_bin_filename << endl;
binfile->Close();
//--- close the geometry
geom->CloseGeometry();
//gGeoManager->CheckOverlaps(0.000001);
//gGeoManager->GetListOfOverlaps()->Print();
}
This diff is collapsed.
......@@ -2,3 +2,5 @@ Created by create_bpipe_geometry_v21e.C
The downstream section has maximum deflection at the bellows.
May be used for low beam energies from 5 AGeV gold-gold collisions
at 100% MF and below.
File added
File added
Created from macro of the same name
in macro/pipes folder of this repository.
File added
created from macro of same name.
Intended for simulation of 12 AGeV/c gold beam
with 100% magnetic field.
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment