X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=STRUCT%2FAliPIPEv3.cxx;h=5095369bcde2a85ddf53241c976e5d84f6d208d4;hb=f8a569ccc5bc7187100a87bf45864df309a8003e;hp=6fb6a0cae8b9a3bff4c0119703d2364310af8e53;hpb=090540f49588fe6d750e1a5eff45712528b8bacb;p=u%2Fmrichter%2FAliRoot.git diff --git a/STRUCT/AliPIPEv3.cxx b/STRUCT/AliPIPEv3.cxx index 6fb6a0cae8b..5095369bcde 100644 --- a/STRUCT/AliPIPEv3.cxx +++ b/STRUCT/AliPIPEv3.cxx @@ -24,18 +24,19 @@ #include -#include -#include +#include +#include +#include +#include #include #include -#include +#include #include #include -#include -#include -#include +#include #include -#include +#include +#include #include "AliConst.h" #include "AliMagF.h" @@ -44,16 +45,17 @@ #include "AliLog.h" ClassImp(AliPIPEv3) + //_____________________________________________________________________________ -AliPIPEv3::AliPIPEv3() +AliPIPEv3::AliPIPEv3() : fBeamBackground(0) { // Constructor } //_____________________________________________________________________________ AliPIPEv3::AliPIPEv3(const char *name, const char *title) - : AliPIPE(name,title) + : AliPIPE(name,title), fBeamBackground(0) { // Constructor } @@ -62,11 +64,10 @@ AliPIPEv3::AliPIPEv3(const char *name, const char *title) //___________________________________________ void AliPIPEv3::CreateGeometry() { - AliDebug(1,"Create PIPEv3 geometry"); // -// Class describing the beam pipe geometry +// Method describing the beam pipe geometry // - + AliDebug(1,"Create PIPEv3 geometry"); Float_t dz, z, zsh, z0; // // Rotation Matrices @@ -85,6 +86,7 @@ void AliPIPEv3::CreateGeometry() const TGeoMedium* kMedAir = gGeoManager->GetMedium("PIPE_AIR"); const TGeoMedium* kMedAirHigh = gGeoManager->GetMedium("PIPE_AIR_HIGH"); const TGeoMedium* kMedVac = gGeoManager->GetMedium("PIPE_VACUUM"); + const TGeoMedium* kMedVacM = gGeoManager->GetMedium("PIPE_VACUUMM"); const TGeoMedium* kMedInsu = gGeoManager->GetMedium("PIPE_INS_C0"); const TGeoMedium* kMedSteel = gGeoManager->GetMedium("PIPE_INOX"); const TGeoMedium* kMedBe = gGeoManager->GetMedium("PIPE_BE"); @@ -370,10 +372,11 @@ void AliPIPEv3::CreateGeometry() // // Central beam pipe support collars // LHCVC2C_0019 +// cp1l = 405. // Position at z = -46., 40., 150. - TGeoVolume* voCpSupC = new TGeoVolume("CpSupC", new TGeoTube(3.051, 4.0, 0.35), kMedAco); - voCp1->AddNode(voCpSupC, 1, new TGeoTranslation(0., 0., kCP1Length / 2. - 81.5)); - voCp1->AddNode(voCpSupC, 2, new TGeoTranslation(0., 0., kCP1Length / 2.- 191.5)); + TGeoVolume* voCpSupC = new TGeoVolume("CpSupC", new TGeoTube(3.051, 4.00, 0.35), kMedAco); + voCp1->AddNode(voCpSupC, 1, new TGeoTranslation(0., 0., kCP1Length / 2. - 98.2 - 34.77 + 0.49)); +// voCp1->AddNode(voCpSupC, 2, new TGeoTranslation(0., 0., kCP1Length / 2.- 191.5)); // Beam Pipe Protection Tube // // ALIFWDA_0025 @@ -526,8 +529,8 @@ void AliPIPEv3::CreateGeometry() // Plie radius // const Float_t kCP3PlieR = 0.118286; const Float_t kCP3PlieR = - (kCP3BellowUndulatedLength - 4. * kCP3ConnectionPlieR + 2. * kCP3PlieThickness + - (2. * kCP3NumberOfPlies - 2.) * kCP3PlieThickness) / (4. * kCP3NumberOfPlies - 2.); + (kCP3BellowUndulatedLength - 4. * kCP3ConnectionPlieR + + 2. * kCP3NumberOfPlies * kCP3PlieThickness) / (4. * kCP3NumberOfPlies - 2.); // Length of connection pipe const Float_t kCP3BellowConnectionLength = 2.35; // @@ -575,11 +578,12 @@ void AliPIPEv3::CreateGeometry() z = -shCp3Mo->GetZ(0); shCp3Mo->DefineSection(11, z, 0., kCP3FlangeRo); // - TGeoVolume* voCp3Mo = new TGeoVolume("CP3MO", shCp3Mo, kMedAir); + // TGeoVolume* voCp3Mo = new TGeoVolume("CP3MO", shCp3Mo, kMedAir); + TGeoVolume* voCp3Mo = new TGeoVolumeAssembly("CP3MO"); voCp3Mo->SetVisibility(0); TGeoVolumeAssembly* voCp3 = new TGeoVolumeAssembly("Cp3"); voCp3->AddNode(voCp3Mo, 1, gGeoIdentity); - voCp3->AddNode(voCpSupC, 3, new TGeoTranslation(0., 0., - kCP3Length / 2. + 4.5)); + voCp3->AddNode(voCpSupC, 3, new TGeoTranslation(0., 0., - kCP3Length / 2. + 4.6 - 0.49)); dz = kCP3pos; ////////////////////////////////////////////// @@ -841,8 +845,8 @@ void AliPIPEv3::CreateGeometry() new TGeoTube(25., 100., kRB24CuTubeL/2.), kMedAirHigh); voRB24CuTubeA->SetVisibility(0); // Simplified DN 100 Flange - TGeoVolume* voRB24CuTubeF = new TGeoVolume("voRB24CuTubeF", - new TGeoTube(kRB24CuTubeRo, kRB24CuTubeFRo, kRB24CuTubeFL/2.), kMedSteel); + TGeoVolume* voRB24CuTubeF = new TGeoVolume("voRB24CuTubeF", + new TGeoTube(kRB24CuTubeRo, kRB24CuTubeFRo, kRB24CuTubeFL/2.), kMedSteel); // Warm Module Type VMACA // LHCVMACA_0002 @@ -875,7 +879,7 @@ void AliPIPEv3::CreateGeometry() const Float_t kRB24B1PlieThickness = 0.015; // Plie thickness const Float_t kRB24B1PlieRadius = - (kRB24B1BellowUndL + (2. * kRB24B1NumberOfPlies - 2.) * kRB24B1PlieThickness) / (4. * kRB24B1NumberOfPlies); + (kRB24B1BellowUndL + (2. * kRB24B1NumberOfPlies+ 1.) * kRB24B1PlieThickness) / (4. * kRB24B1NumberOfPlies + 2.); const Float_t kRB24B1ProtTubeThickness = 0.02; // Thickness of the protection tube const Float_t kRB24B1ProtTubeLength = 4.2; // Length of the protection tube @@ -1614,7 +1618,7 @@ void AliPIPEv3::CreateGeometry() TGeoVolumeAssembly* voRB24 = new TGeoVolumeAssembly("RB24"); // Cu Tube with two simplified flanges voRB24->AddNode(voRB24CuTubeM, 1, gGeoIdentity); - voRB24->AddNode(voRB24CuTubeA, 1, gGeoIdentity); + if (!fBeamBackground) voRB24->AddNode(voRB24CuTubeA, 1, gGeoIdentity); z = - kRB24CuTubeL/2 + kRB24CuTubeFL/2.; voRB24->AddNode(voRB24CuTubeF, 1, new TGeoTranslation(0., 0., z)); z = + kRB24CuTubeL/2 - kRB24CuTubeFL/2.; @@ -1639,18 +1643,20 @@ void AliPIPEv3::CreateGeometry() // RB24/2 // // Copper Tube RB24/2 +// +// This is the part inside the compensator magnet const Float_t kRB242CuTubeL = 330.0; TGeoVolume* voRB242CuTubeM = new TGeoVolume("voRB242CuTubeM", - new TGeoTube(0., kRB24CuTubeRo, kRB242CuTubeL/2.), kMedVac); - voRB24CuTubeM->SetVisibility(0); + new TGeoTube(0., kRB24CuTubeRo, kRB242CuTubeL/2.), kMedVacM); + voRB242CuTubeM->SetVisibility(0); TGeoVolume* voRB242CuTube = new TGeoVolume("voRB242CuTube", new TGeoTube(kRB24CuTubeRi, kRB24CuTubeRo, kRB242CuTubeL/2.), kMedCu); voRB242CuTubeM->AddNode(voRB242CuTube, 1, gGeoIdentity); TGeoVolumeAssembly* voRB242 = new TGeoVolumeAssembly("RB242"); - voRB242->AddNode(voRB242CuTube, 1, gGeoIdentity); + voRB242->AddNode(voRB242CuTubeM, 1, gGeoIdentity); z = - kRB242CuTubeL/2 + kRB24CuTubeFL/2.; voRB242->AddNode(voRB24CuTubeF, 3, new TGeoTranslation(0., 0., z)); z = + kRB242CuTubeL/2 - kRB24CuTubeFL/2.; @@ -1674,11 +1680,11 @@ void AliPIPEv3::CreateGeometry() TGeoVolumeAssembly* voRB243 = new TGeoVolumeAssembly("RB243"); TGeoVolumeAssembly* voRB243A = new TGeoVolumeAssembly("RB243A"); - voRB243A->AddNode(voRB243CuTube, 1, gGeoIdentity); + voRB243A->AddNode(voRB243CuTubeM, 1, gGeoIdentity); z = - kRB243CuTubeL/2 + kRB24CuTubeFL/2.; voRB243A->AddNode(voRB24CuTubeF, 5, new TGeoTranslation(0., 0., z)); z = + kRB243CuTubeL/2 - kRB24CuTubeFL/2.; - voRB243A->AddNode(voRB24CuTubeF, 6, new TGeoTranslation(0., 0., z)); + voRB243A->AddNode(voRB24CuTubeF, 6, new TGeoTranslation(0., 0., z)); z = + kRB243CuTubeL/2; voRB243A->AddNode(voRB24B1BellowM, 2, new TGeoTranslation(0., 0., z)); @@ -1803,8 +1809,8 @@ void AliPIPEv3::CreateGeometry() const Float_t kRB26s2ConnectionPlieR = 0.21; // Connection plie radius [Pos 1] // Plie radius const Float_t kRB26s2PlieR = - (kRB26s2BellowUndL - 4. * kRB26s2ConnectionPlieR + 2. * kRB26s2PlieThickness + - (2. * kRB26s2NumberOfPlies - 2.) * kRB26s2PlieThickness) / (4. * kRB26s2NumberOfPlies - 2.); + (kRB26s2BellowUndL - 4. * kRB26s2ConnectionPlieR + + 2. * kRB26s2NumberOfPlies * kRB26s2PlieThickness) / (4. * kRB26s2NumberOfPlies); const Float_t kRB26s2CompTubeInnerR = 12.00/2.; // Connection tubes inner radius [Pos 2 + 3] const Float_t kRB26s2CompTubeOuterR = 12.30/2.; // Connection tubes outer radius [Pos 2 + 3] const Float_t kRB26s2WeldingTubeLeftL = 9.00/2.; // Left connection tube half length [Pos 2] @@ -2127,7 +2133,7 @@ void AliPIPEv3::CreateGeometry() shRB26s3SFlange->DefineSection(5, z0, kRB26s3SFlangeRi3, kRB26s3SFlangeRo); TGeoVolume* voRB26s3SFlange = new TGeoVolume("RB26s3SFlange", shRB26s3SFlange, kMedSteel); - TGeoVolume* voRB26s3SFlangeM = new TGeoVolume("RB26s3SFlange", MakeMotherFromTemplate(shRB26s3SFlange, 0, 3), kMedVac); + TGeoVolume* voRB26s3SFlangeM = new TGeoVolume("RB26s3SFlangeM", MakeMotherFromTemplate(shRB26s3SFlange, 0, 3), kMedVac); voRB26s3SFlangeM->AddNode(voRB26s3SFlange, 1, gGeoIdentity); /////////////////////////////////// @@ -2156,7 +2162,7 @@ void AliPIPEv3::CreateGeometry() shRB26s3FFlange->DefineSection(5, z0, kRB26s3FFlangeRi3, kRB26s3FFlangeRo); TGeoVolume* voRB26s3FFlange = new TGeoVolume("RB26s3FFlange", shRB26s3FFlange, kMedSteel); - TGeoVolume* voRB26s3FFlangeM = new TGeoVolume("RB26s3FFlange", MakeMotherFromTemplate(shRB26s3FFlange, 2, 5), kMedVac); + TGeoVolume* voRB26s3FFlangeM = new TGeoVolume("RB26s3FFlangeM", MakeMotherFromTemplate(shRB26s3FFlange, 2, 5), kMedVac); voRB26s3FFlangeM->AddNode(voRB26s3FFlange, 1, gGeoIdentity); @@ -2174,8 +2180,8 @@ void AliPIPEv3::CreateGeometry() const Float_t kRB26s3ConnectionPlieR = 0.21; // Connection plie radius [Pos 1] // Plie radius const Float_t kRB26s3PlieR = - (kRB26s3BellowUndL - 4. * kRB26s3ConnectionPlieR + 2. * kRB26s3PlieThickness + - (2. * kRB26s3NumberOfPlies - 2.) * kRB26s3PlieThickness) / (4. * kRB26s3NumberOfPlies - 2.); + (kRB26s3BellowUndL - 4. * kRB26s3ConnectionPlieR + + 2. * kRB26s3NumberOfPlies * kRB26s3PlieThickness) / (4. * kRB26s3NumberOfPlies); // // The welding tubes have 3 sections with different radii and 2 transition regions. @@ -2263,9 +2269,9 @@ void AliPIPEv3::CreateGeometry() z0 += kRB26s3PlieR - kRB26s3PlieThickness; voRB26s3Wiggle->AddNode(voRB26s3WiggleL, 1 , new TGeoTranslation(0., 0., z0)); // Positioning of the volumes - z0 = - kRB26s3BellowUndL/2.+ kRB26s3ConnectionPlieR; + z0 = - kRB26s3BellowUndL/2.+ kRB26s3PlieR; voRB26s3Bellow->AddNode(voRB26s3WiggleL, 1, new TGeoTranslation(0., 0., z0)); - z0 += kRB26s3ConnectionPlieR; + z0 += kRB26s3PlieR; zsh = 4. * kRB26s3PlieR - 2. * kRB26s3PlieThickness; for (Int_t iw = 0; iw < kRB26s3NumberOfPlies; iw++) { Float_t zpos = z0 + iw * zsh; @@ -2389,8 +2395,8 @@ void AliPIPEv3::CreateGeometry() const Float_t kRB26s5ConnectionR = 11.2/2.; // Bellow connection radius [Pos 1] // Plie radius const Float_t kRB26s5PlieR = - (kRB26s5BellowUndL - 4. * kRB26s5ConnectionPlieR + 2. * kRB26s5PlieThickness + - (2. * kRB26s5NumberOfPlies - 2.) * kRB26s5PlieThickness) / (4. * kRB26s5NumberOfPlies - 2.); + (kRB26s5BellowUndL - 4. * kRB26s5ConnectionPlieR + + 2. * kRB26s5NumberOfPlies * kRB26s5PlieThickness) / (4. * kRB26s5NumberOfPlies); const Float_t kRB26s5CompTubeInnerR = 10.00/2.; // Connection tubes inner radius [Pos 2 + 3] const Float_t kRB26s5CompTubeOuterR = 10.30/2.; // Connection tubes outer radius [Pos 2 + 3] const Float_t kRB26s5WeldingTubeLeftL = 3.70/2.; // Left connection tube half length [Pos 2] @@ -2694,8 +2700,8 @@ void AliPIPEv3::CreateMaterials() // AliDebugClass(1,"Create PIPEv3 materials"); - Int_t isxfld = gAlice->Field()->Integ(); - Float_t sxmgmx = gAlice->Field()->Max(); + Int_t isxfld = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ(); + Float_t sxmgmx = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max(); // Steel (Inox) Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 }; Float_t zsteel[4] = { 26.,24.,28.,14. }; @@ -2716,7 +2722,7 @@ void AliPIPEv3::CreateMaterials() Float_t zAir[4]={6.,7.,8.,18.}; Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827}; Float_t dAir = 1.20479E-3; - Float_t dAir1 = 1.20479E-10; + Float_t dAir1 = 1.20479E-11; // // Insulation powder // Si O Ti Al @@ -2764,7 +2770,8 @@ void AliPIPEv3::CreateMaterials() AliMixture(35, "AIR_HIGH$ ", aAir, zAir, dAir, 4, wAir); // // Vacuum - AliMixture(16, "VACUUM$ ", aAir, zAir, dAir1, 4, wAir); + AliMixture(16, "VACUUM$ " , aAir, zAir, dAir1, 4, wAir); + AliMixture(17, "VACUUMM$ ", aAir, zAir, dAir1, 4, wAir); // // stainless Steel AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel); @@ -2820,7 +2827,8 @@ void AliPIPEv3::CreateMaterials() AliMedium(35, "AIR_HIGH",35, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); // // Vacuum - AliMedium(16, "VACUUM", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); + AliMedium(16, "VACUUM", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); + AliMedium(17, "VACUUMM", 17, 0, isxfld, sxmgmx, 0.1, stemax, deemax, epsil, stmin); // // Steel AliMedium(19, "INOX", 19, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); @@ -2849,7 +2857,7 @@ void AliPIPEv3::CreateMaterials() } -TGeoPcon* AliPIPEv3::MakeMotherFromTemplate(TGeoPcon* shape, Int_t imin, Int_t imax, Float_t r0, Int_t nz) +TGeoPcon* AliPIPEv3::MakeMotherFromTemplate(const TGeoPcon* shape, Int_t imin, Int_t imax, Float_t r0, Int_t nz) { // // Create a mother shape from a template setting some min radii to 0 @@ -2902,7 +2910,7 @@ TGeoPcon* AliPIPEv3::MakeInsulationFromTemplate(TGeoPcon* shape) } -TGeoVolume* AliPIPEv3::MakeBellow(char* ext, Int_t nc, Float_t rMin, Float_t rMax, Float_t dU, Float_t rPlie, Float_t dPlie) +TGeoVolume* AliPIPEv3::MakeBellow(const char* ext, Int_t nc, Float_t rMin, Float_t rMax, Float_t dU, Float_t rPlie, Float_t dPlie) { // nc Number of convolution // rMin Inner radius of the bellow @@ -2914,45 +2922,45 @@ TGeoVolume* AliPIPEv3::MakeBellow(char* ext, Int_t nc, Float_t rMin, Float_t rMa const TGeoMedium* kMedSteel = gGeoManager->GetMedium("PIPE_INOX"); 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, kMedSteel); // // 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, kMedSteel); // // 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.), kMedSteel); // // 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)); z0 += dz; @@ -2973,6 +2981,31 @@ TGeoVolume* AliPIPEv3::MakeBellow(char* ext, Int_t nc, Float_t rMin, Float_t rMa return voBellow; } +//_______________________________________________________________________ +void AliPIPEv3::AddAlignableVolumes() const +{ + // + AliInfo("Add PIPE alignable volume"); + + if (!gGeoManager) { + AliFatal("TGeoManager doesn't exist !"); + return; + } + + TString symname("CP1"); + TString volpath("/ALIC_1/CP_1/Cp1_1"); + if(!gGeoManager->SetAlignableEntry(symname.Data(),volpath.Data())) + AliFatal(Form("Alignable entry %s not created. Volume path %s not valid", + symname.Data(),volpath.Data())); + + TString symname2("CP3"); + TString volpath2("/ALIC_1/CP_1/Cp3_1"); + if(!gGeoManager->SetAlignableEntry(symname2.Data(),volpath2.Data())) + AliFatal(Form("Alignable entry %s not created. Volume path %s not valid", + symname2.Data(),volpath2.Data())); +} + +