Skip to content
Snippets Groups Projects

Draft: Beampipes with bellows, wide conical section and downstream cylinder

Closed Petr Chudoba requested to merge p.chudoba/cbmroot:beampipe into master
All threads resolved!
3 files
+ 323
81
Compare changes
  • Side-by-side
  • Inline

Files

@@ -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,7 +58,7 @@ 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,
@@ -94,22 +93,6 @@ void create_bpipe_geometry_v21e(const char* geoTag = "v21e")
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);
@@ -199,12 +182,12 @@ void create_bpipe_geometry_v21e(const char* geoTag = "v21e")
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);
TGeoCombiTrans* ctr_sts_conus_connection = new TGeoCombiTrans(0, 0, -1600 * 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->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.001 * mm, rotation_of_sts_tube);
TGeoRotation* rot_global = new TGeoRotation("rot_global");
rot_global->RotateY(1.2);
@@ -251,10 +234,33 @@ 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 =
new TGeoCombiTrans("ctr_psd_tube", 426.44387679 * mm, 0. * mm, 10849.15 * mm, rot_psd_tube);
TGeoCombiTrans* ctr_psd_tube = new TGeoCombiTrans("ctr_psd_tube", 426.44387679 * mm, 0. * mm, 10849.15 * mm, rot_psd_tube);
TGeoRotation* rot_s5 = new TGeoRotation("rot_s5");
//rot_s5->RotateZ(180.);
@@ -266,15 +272,15 @@ 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);
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);
conical_beam_pipe->SetVisibility(kFALSE);
TGeoVolume* bellow_ass = geom->MakeBox("Bellow assembly", Vacuum, 320 * mm, 220 * mm, 240 * mm);
TGeoVolume* bellow_ass = geom->MakeBox("Bellow assembly", Vacuum, 350 * mm, 220 * mm, 600 * mm);
bellow_ass->SetVisibility(kFALSE);
// TOP PLATE--------------------------------------------------------------------------------------
@@ -632,16 +638,16 @@ 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(conical_beam_pipe_volume, 1, new TGeoTranslation(0, 0, -1585 * mm));
conical_beam_pipe->AddNode(conical_beam_pipe_volume, 1, new TGeoTranslation(0, 0, 0));
conical_beam_pipe->AddNodeOverlap(rich_much_upstream_tube_connection_volume, 1, ctr_sts_conus_connection);
conical_beam_pipe->AddNodeOverlap(rich_much_upstream_tube_connection_to_sts_volume, 1, ctr_sts_tube);
//------------------INSERT into top volume
full_assembly->AddNode(conical_beam_pipe, 1, origin_combi);
full_assembly->AddNode(bellow_ass, 1, origin_combi);
full_assembly->AddNode(psd_tube, 1, ctr_psd_tube);
full_assembly->AddNodeOverlap(conical_beam_pipe, 1, origin_combi_cone);
full_assembly->AddNodeOverlap(bellow_ass, 1, origin_combi);
full_assembly->AddNodeOverlap(psd_tube, 1, ctr_psd_tube);
//beampipe->AddNode(full_assembly,1, new TGeoTranslation(0, 0, 0*mm));
// --- close the geometry
@@ -662,8 +668,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();
//geom->CloseGeometry();
gGeoManager->CheckOverlaps(0.0001);
gGeoManager->GetListOfOverlaps()->Print();
}
Loading