diff --git a/Detectors/Passive/include/DetectorsPassive/Pipe.h b/Detectors/Passive/include/DetectorsPassive/Pipe.h index 1c03ed589a1b0..0acf130d954a8 100644 --- a/Detectors/Passive/include/DetectorsPassive/Pipe.h +++ b/Detectors/Passive/include/DetectorsPassive/Pipe.h @@ -16,6 +16,7 @@ #include "Rtypes.h" // for Pipe::Class, ClassDef, Pipe::Streamer class TGeoPcon; +class TGeoMedium; namespace o2 { @@ -47,7 +48,7 @@ class Pipe : public PassiveBase Int_t nz = -1); TGeoPcon* MakeInsulationFromTemplate(TGeoPcon* shape); TGeoVolume* MakeBellow(const char* ext, Int_t nc, Float_t rMin, Float_t rMax, Float_t dU, Float_t rPlie, - Float_t dPlie); + Float_t dPlie, const TGeoMedium* medVac = nullptr, const TGeoMedium* medSteel = nullptr); TGeoVolume* MakeBellowCside(const char* ext, Int_t nc, Float_t rMin, Float_t rMax, Float_t rPlie, Float_t dPlie); float mBePipeRmax = 0.; // outer diameter of the Be section diff --git a/Detectors/Passive/include/DetectorsPassive/PipeRun4.h b/Detectors/Passive/include/DetectorsPassive/PipeRun4.h index 5eadb7af1003c..68ddbe0c13476 100644 --- a/Detectors/Passive/include/DetectorsPassive/PipeRun4.h +++ b/Detectors/Passive/include/DetectorsPassive/PipeRun4.h @@ -16,6 +16,7 @@ #include "Rtypes.h" // for PipeRun4::Class, ClassDef, PipeRun4::Streamer class TGeoPcon; +class TGeoMedium; namespace o2 { @@ -47,7 +48,7 @@ class PipeRun4 : public PassiveBase int nz = -1); TGeoPcon* makeInsulationFromTemplate(TGeoPcon* shape); TGeoVolume* makeBellow(const char* ext, int nc, float rMin, float rMax, float rPlie, - float dPlie); + float dPlie, const TGeoMedium* medVac = nullptr, const TGeoMedium* medSteel = nullptr); TGeoVolume* makeBellowCside(const char* ext, int nc, float rMin, float rMax, float rPlie, float dPlie); TGeoVolume* makeSupportBar(const char* tag, float Rin, float Rout, float length, float skinLength); diff --git a/Detectors/Passive/src/Pipe.cxx b/Detectors/Passive/src/Pipe.cxx index bdf0f7a2caea6..7ec4a493160a9 100644 --- a/Detectors/Passive/src/Pipe.cxx +++ b/Detectors/Passive/src/Pipe.cxx @@ -874,8 +874,9 @@ void Pipe::ConstructGeometry() /// // // Bellow Section + // field-free like its mothers RB24B1BellowM and RB24VMABBEBellowM TGeoVolume* voRB24B1Bellow = MakeBellow("RB24B1", kRB24B1NumberOfPlies, kRB24B1BellowRi, kRB24B1BellowRo, - kRB24B1BellowUndL, kRB24B1PlieRadius, kRB24B1PlieThickness); + kRB24B1BellowUndL, kRB24B1PlieRadius, kRB24B1PlieThickness, kMedVacNF, kMedSteelNF); voRB24B1Bellow->SetVisibility(0); Float_t newRB24B1BellowUndL = 2 * (static_cast(voRB24B1Bellow->GetShape()))->GetDz(); @@ -3000,7 +3001,7 @@ TGeoPcon* Pipe::MakeInsulationFromTemplate(TGeoPcon* shape) } TGeoVolume* Pipe::MakeBellow(const char* ext, Int_t nc, Float_t rMin, Float_t rMax, Float_t dU, Float_t rPlie, - Float_t dPlie) + Float_t dPlie, const TGeoMedium* medVac, const TGeoMedium* medSteel) { // nc Number of convolution // rMin Inner radius of the bellow @@ -3008,9 +3009,11 @@ TGeoVolume* Pipe::MakeBellow(const char* ext, Int_t nc, Float_t rMin, Float_t rM // dU Undulation length // rPlie Plie radius // dPlie Plie thickness + // medVac Medium of the bellow vacuum, default PIPE_VACUUM + // medSteel Medium of the plies, default PIPE_INOX auto& matmgr = o2::base::MaterialManager::Instance(); - const TGeoMedium* kMedVac = matmgr.getTGeoMedium("PIPE_VACUUM"); - const TGeoMedium* kMedSteel = matmgr.getTGeoMedium("PIPE_INOX"); + const TGeoMedium* kMedVac = medVac ? medVac : matmgr.getTGeoMedium("PIPE_VACUUM"); + const TGeoMedium* kMedSteel = medSteel ? medSteel : matmgr.getTGeoMedium("PIPE_INOX"); // // Upper part of the undulation // diff --git a/Detectors/Passive/src/PipeRun4.cxx b/Detectors/Passive/src/PipeRun4.cxx index fa7e2afc7e6ba..24c05efcfa6af 100644 --- a/Detectors/Passive/src/PipeRun4.cxx +++ b/Detectors/Passive/src/PipeRun4.cxx @@ -879,8 +879,9 @@ void PipeRun4::ConstructGeometry() /// // // Bellow Section + // field-free like its mothers RB24B1BellowM and RB24VMABBEBellowM TGeoVolume* voRB24B1Bellow = makeBellow("RB24B1", kRB24B1NumberOfPlies, kRB24B1BellowRi, kRB24B1BellowRo, - kRB24B1PlieRadius, kRB24B1PlieThickness); + kRB24B1PlieRadius, kRB24B1PlieThickness, kMedVacNF, kMedSteelNF); voRB24B1Bellow->SetVisibility(0); float newRB24B1BellowUndL = 2 * (static_cast(voRB24B1Bellow->GetShape()))->GetDz(); @@ -2838,16 +2839,19 @@ TGeoPcon* PipeRun4::makeInsulationFromTemplate(TGeoPcon* shape) return insu; } -TGeoVolume* PipeRun4::makeBellow(const char* ext, int nc, float rMin, float rMax, float rPlie, float dPlie) +TGeoVolume* PipeRun4::makeBellow(const char* ext, int nc, float rMin, float rMax, float rPlie, float dPlie, + const TGeoMedium* medVac, const TGeoMedium* medSteel) { // nc Number of convolution // rMin Inner radius of the bellow // rMax Outer radius of the bellow // rPlie Plie radius // dPlie Plie thickness + // medVac Medium of the bellow vacuum, default PIPE_VACUUM + // medSteel Medium of the plies, default PIPE_INOX auto& matmgr = o2::base::MaterialManager::Instance(); - const TGeoMedium* kMedVac = matmgr.getTGeoMedium("PIPE_VACUUM"); - const TGeoMedium* kMedSteel = matmgr.getTGeoMedium("PIPE_INOX"); + const TGeoMedium* kMedVac = medVac ? medVac : matmgr.getTGeoMedium("PIPE_VACUUM"); + const TGeoMedium* kMedSteel = medSteel ? medSteel : matmgr.getTGeoMedium("PIPE_INOX"); // // Upper part of the undulation //