fRmax(1.98), // outer radius of Be beam pipe
fBe(0.08), // width of Be beam pipe
fZ1(50.), // beginning of beam pipe z location (A side)
- fZ2(-49), // end of Be beam pipe z location (C side)
+ fZ2(-57.25), // end of Be beam pipe z location (C side)
fZ3(-82.) // end of beam pipe z location (C side)
{
// Constructor
fRmax(1.98), // outer radius of Be beam pipe
fBe(0.08), // width of Be beam pipe
fZ1(50.), // beginning of beam pipe z location (A side)
- fZ2(-49.), // end of Be beam pipe z location (C side)
+ fZ2(-57.25), // end of Be beam pipe z location (C side)
fZ3(-82.) // end of Steel beam pipe z location (C side)
{
// Constructor
fRmax(rmax), // outer radius of Be beam pipe
fBe(width), // width of Be beam pipe
fZ1(50.), // beginning of beam pipe z location (A side)
- fZ2(-49.), // end of Be beam pipe z location (C side)
+ fZ2(-57.25), // end of Be beam pipe z location (C side)
fZ3(-82.) // end of Steel beam pipe z location (C side)
{
// Constructor
TGeoVolume* voadaptatorVide = new TGeoVolume("voadaptatorVide",adaptatorVide,kMedVac);
voadaptatorVide->SetVisibility(0);
top->AddNode(voadaptatorVide,1,new TGeoTranslation(0., 0., 0.));
+
// -------------- End Vaccum ------------
// -------------- Bellows --------------
Float_t plieradius = (3.8 + (2. * 7 - 2.) * 0.03) / (4. * 7); // radius of bellows "plis"
Float_t dzbellow1=2.0; // distance between the start of the aluminium beam pipe and the first bellows
- Float_t dzbellow2=2.0; // distance between the 2 bellows
+ Float_t dzbellow2=4.0; // distance between the 2 bellows
//--------------------------------------
//---------------- First Al tube ------------------
TGeoVolume* votube1 = new TGeoVolume("votube1",tube1,kMedAlu2219);
votube1->SetLineColor(kBlue);
top->AddNode(votube1,1,new TGeoTranslation(0., 0., 0.));
+
//-------------------------------------------------
// ------------------ Bellows 1 -----------------------
TGeoVolume* vobellows1 = MakeBellow("bellows1", 7, 2.0, 2.665, 3.8, plieradius ,0.03);
top->AddNode(vobellows1, 1, new TGeoTranslation(0., 0., fZ2-dzbellow1-(3.8)/2.));
+
//------------------------------------------------------
//------------- Second Al tube --------------
TGeoVolume* votube2 = new TGeoVolume("votube2",tube2,kMedAlu2219);
votube2->SetLineColor(kBlue);
top->AddNode(votube2,1,new TGeoTranslation(0., 0., 0.));
+
//-------------------------------------------
// ------------------ Bellows 2 -----------------------
TGeoVolume* vobellows2 = MakeBellow("bellows2", 7, 2.0, 2.665, 3.8, plieradius ,0.03);
top->AddNode(vobellows2, 1, new TGeoTranslation(0., 0., fZ2-dzbellow1-3.8-dzbellow2-3.8/2.));
+
//-----------------------------------------------------
//------------- Conical adaptator -------------
TGeoVolume* voadaptator = new TGeoVolume("voadaptator",adaptator,kMedAlu2219);
voadaptator->SetLineColor(kBlue);
top->AddNode(voadaptator,1,new TGeoTranslation(0., 0., 0.));
+
//---------------------------------------------
TGeoPcon* flange = new TGeoPcon(0., 360., 2);
const TGeoMedium* kMedAlu5083 = gGeoManager->GetMedium("PIPE_AA5083"); //FM
char name[64], nameA[64], nameB[64], bools[64];
- sprintf(name, "%sBellowUS", ext);
+ snprintf(name, 64, "%sBellowUS", ext);
TGeoVolume* voBellow = new TGeoVolume(name, new TGeoTube(rMin, rMax, dU/2.), kMedVac);
//
// Upper part of the undulation
//
TGeoTorus* shPlieTorusU = new TGeoTorus(rMax - rPlie, rPlie - dPlie, rPlie);
- sprintf(nameA, "%sTorusU", ext);
+ snprintf(nameA, 64, "%sTorusU", ext);
shPlieTorusU->SetName(nameA);
TGeoTube* shPlieTubeU = new TGeoTube (rMax - rPlie, rMax, rPlie);
- sprintf(nameB, "%sTubeU", ext);
+ snprintf(nameB, 64, "%sTubeU", ext);
shPlieTubeU->SetName(nameB);
- sprintf(name, "%sUpperPlie", ext);
- sprintf(bools, "%s*%s", nameA, nameB);
+ snprintf(name, 64, "%sUpperPlie", ext);
+ snprintf(bools, 64, "%s*%s", nameA, nameB);
TGeoCompositeShape* shUpperPlie = new TGeoCompositeShape(name, bools);
TGeoVolume* voWiggleU = new TGeoVolume(name, shUpperPlie, kMedAlu5083);
//
// Lower part of the undulation
TGeoTorus* shPlieTorusL = new TGeoTorus(rMin + rPlie, rPlie - dPlie, rPlie);
- sprintf(nameA, "%sTorusL", ext);
+ snprintf(nameA, 64, "%sTorusL", ext);
shPlieTorusL->SetName(nameA);
TGeoTube* shPlieTubeL = new TGeoTube (rMin, rMin + rPlie, rPlie);
- sprintf(nameB, "%sTubeL", ext);
+ snprintf(nameB, 64, "%sTubeL", ext);
shPlieTubeL->SetName(nameB);
- sprintf(name, "%sLowerPlie", ext);
- sprintf(bools, "%s*%s", nameA, nameB);
+ snprintf(name, 64, "%sLowerPlie", ext);
+ snprintf(bools, 64, "%s*%s", nameA, nameB);
TGeoCompositeShape* shLowerPlie = new TGeoCompositeShape(name, bools);
TGeoVolume* voWiggleL = new TGeoVolume(name, shLowerPlie, kMedAlu5083);
voWiggleL->SetLineColor(kOrange+3); //FM
//
// Connection between upper and lower part of undulation
- sprintf(name, "%sPlieConn1", ext);
+ snprintf(name, 64, "%sPlieConn1", ext);
TGeoVolume* voWiggleC1 = new TGeoVolume(name, new TGeoTube(rMin + rPlie, rMax - rPlie, dPlie/2.), kMedAlu5083);
voWiggleC1->SetLineColor(kOrange+3); //FM
//
// One wiggle
Float_t dz = rPlie - dPlie / 2.;
Float_t z0 = - dPlie / 2.;
- sprintf(name, "%sWiggle", ext);
+ snprintf(name, 64, "%sWiggle", ext);
TGeoVolumeAssembly* asWiggle = new TGeoVolumeAssembly(name);
asWiggle->AddNode(voWiggleC1, 1 , new TGeoTranslation(0., 0., z0));