Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions Detectors/Upgrades/ALICE3/FT3/simulation/src/Detector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ void Detector::buildBasicFT3(const FT3BaseParam& param)
//_________________________________________________________________________________________________
void Detector::buildFT3V1()
{
//Build FT3 detector according to
//https://indico.cern.ch/event/992488/contributions/4174473/attachments/2168881/3661331/tracker_parameters_werner_jan_11_2021.pdf
// Build FT3 detector according to
// https://indico.cern.ch/event/992488/contributions/4174473/attachments/2168881/3661331/tracker_parameters_werner_jan_11_2021.pdf

LOG(info) << "Building FT3 Detector: V1";

Expand Down Expand Up @@ -284,17 +284,15 @@ void Detector::buildFT3NewVacuumVessel()
// to adhere to the changes that were presented at the ALICE 3 Upgrade days in March 2024
// Inner radius at C-side to 7 cm
// Inner radius at A-side stays at 5 cm
// 06.02.2025 update: IRIS layers are now in TRK

LOG(info) << "Building FT3 Detector: After Upgrade Days March 2024 version";

mNumberOfLayers = 12;
mNumberOfLayers = 9;
float sensorThickness = 30.e-4;
float layersx2X0 = 1.e-2;
std::vector<std::array<float, 5>> layersConfigCSide{
{26., .5, 2.5, 0.1f * layersx2X0}, // {z_layer, r_in, r_out, Layerx2X0}
{30., .5, 2.5, 0.1f * layersx2X0},
{34., .5, 2.5, 0.1f * layersx2X0},
{77., 7.0, 35., layersx2X0},
{77., 7.0, 35., layersx2X0}, // {z_layer, r_in, r_out, Layerx2X0}
{100., 7.0, 35., layersx2X0},
{122., 7.0, 35., layersx2X0},
{150., 7.0, 68.f, layersx2X0},
Expand All @@ -305,10 +303,7 @@ void Detector::buildFT3NewVacuumVessel()
{350., 7.0, 68.f, layersx2X0}};

std::vector<std::array<float, 5>> layersConfigASide{
{26., .5, 2.5, 0.1f * layersx2X0}, // {z_layer, r_in, r_out, Layerx2X0}
{30., .5, 2.5, 0.1f * layersx2X0},
{34., .5, 2.5, 0.1f * layersx2X0},
{77., 5.0, 35., layersx2X0},
{77., 5.0, 35., layersx2X0}, // {z_layer, r_in, r_out, Layerx2X0}
{100., 5.0, 35., layersx2X0},
{122., 5.0, 35., layersx2X0},
{150., 5.0, 68.f, layersx2X0},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ class Alice3Pipe : public Alice3PassiveBase
~Alice3Pipe() override;
Alice3Pipe(const char* name,
const char* title = "Alice 3 Pipe",
const bool isTRKActivated = false,
const bool isFT3Activated = false,
const float pipeRIn = 0.f,
const float pipeThickness = 0.f,
const float a3ipLength = 0.f,
Expand All @@ -50,9 +48,6 @@ class Alice3Pipe : public Alice3PassiveBase
float getVacuumVesselWidth() const { return mVacuumVesselThick; }
float getVacuumVesselLength() const { return mVacuumVesselASideLength; }

bool IsTRKActivated() const { return mIsTRKActivated; }
bool IsFT3Activated() const { return mIsFT3Activated; }

private:
void createMaterials();
Alice3Pipe(const Alice3Pipe& orig) = default;
Expand All @@ -62,13 +57,10 @@ class Alice3Pipe : public Alice3PassiveBase
float mPipeThick = 0.; // inner beam pipe section thickness
float mA3IPLength = 0.; // Length of A3IP

float mVacuumVesselRIn = 0.; // inner diameter of the vacuum vessel
float mVacuumVesselThick = 0.; // outer beam pipe section thickness
float mVacuumVesselRIn = 0.; // inner diameter of the vacuum vessel
float mVacuumVesselThick = 0.; // outer beam pipe section thickness
float mVacuumVesselASideLength = 0.; // Length of the A Side of the vacuum vessel around the IP

bool mIsTRKActivated = true; // If TRK is not active don't create TRK layers allocations in the vacuum volume
bool mIsFT3Activated = true;

ClassDefOverride(Alice3Pipe, 1);
};
} // namespace passive
Expand Down
144 changes: 14 additions & 130 deletions Detectors/Upgrades/ALICE3/Passive/src/Pipe.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include "Alice3DetectorsPassive/Pipe.h"
#include <DetectorsBase/Detector.h>
#include <DetectorsBase/MaterialManager.h>
#include <TGeoTube.h>
#include <TVirtualMC.h>
#include "TGeoTube.h"
#include "TVirtualMC.h"
#include "TGeoManager.h" // for TGeoManager, gGeoManager
#include "TGeoMaterial.h" // for TGeoMaterial
#include "TGeoMedium.h" // for TGeoMedium
Expand All @@ -31,17 +31,13 @@ using namespace o2::passive;
Alice3Pipe::Alice3Pipe() : Alice3PassiveBase{"Alice3PIPE", ""} {}
Alice3Pipe::Alice3Pipe(const char* name,
const char* title,
bool isTRKActivated,
bool isFT3Activated,
float pipeRIn,
float pipeThickness,
float a3ipLength,
float vacuumVesselRIn,
float vacuumVesselThickness,
float vacuumVesselASideLength)
: Alice3PassiveBase{name, title},
mIsTRKActivated{isTRKActivated},
mIsFT3Activated{isFT3Activated},
mPipeRIn{pipeRIn},
mPipeThick{pipeThickness},
mA3IPLength{a3ipLength},
Expand Down Expand Up @@ -85,7 +81,6 @@ void Alice3Pipe::ConstructGeometry()
auto& matmgr = o2::base::MaterialManager::Instance();

const TGeoMedium* kMedBe = matmgr.getTGeoMedium("ALICE3_PIPE_BE");
const TGeoMedium* kMedVac = matmgr.getTGeoMedium("ALICE3_PIPE_VACUUM");

// Top volume
TGeoVolume* top = gGeoManager->GetVolume("cave");
Expand All @@ -96,134 +91,37 @@ void Alice3Pipe::ConstructGeometry()

// We split the naming of the parts if the beam pipe for ALICE 3 into parts
// - pipe A Side
// - vacuum vessel (which hosts the primary vacuum and covers all C Side as well)
// - iris vacuum vessel (which hosts the secondary vacuum)
// - pipe C Side (which hosts the primary vacuum vessel and covers all C Side as well)

// A3IP update
// Vacuum
Double_t pipeASideLength = mA3IPLength / 2. - mVacuumVesselThick - mVacuumVesselASideLength;
Double_t pipeCSideLength = mA3IPLength / 2. + mVacuumVesselASideLength;
TGeoTube* vacuumBasePipe = new TGeoTube("PIPEVACUUM_BASEsh", 0., mPipeRIn, mA3IPLength / 2.);
TGeoTube* vacuumBaseVacuumVessel = new TGeoTube("VACUUM_VESSELVACUUM_BASEsh", mPipeRIn, mVacuumVesselRIn, pipeCSideLength / 2.);

TGeoTranslation* posPipeCSide = new TGeoTranslation("PIPE_CSIDE_POSITION", 0, 0, mVacuumVesselASideLength - pipeCSideLength / 2.);
posPipeCSide->RegisterYourself();
// Excavate volumes from the vacuum such that there is place for the TRK barrel layers and FT3 disc layers of the IRIS tracker
// And the other passive shapes: coldplate, iris tracker vacuum vessel
TGeoCompositeShape* vacuumComposite;
TGeoVolume* vacuumVolume;
TString compositeFormula{"PIPEVACUUM_BASEsh+VACUUM_VESSELVACUUM_BASEsh:PIPE_CSIDE_POSITION"};
TString subtractorsFormula;

if (!mIsTRKActivated) {
std::vector<TGeoTube*> trkLayerShapes;

std::vector<std::array<float, 3>> layersQuotas = {std::array<float, 3>{0.5f, 50.f, 100.e-4}, // TODO: Set layers dynamically. {radius, zLen, thickness}
std::array<float, 3>{1.2f, 50.f, 100.e-4},
std::array<float, 3>{2.5f, 50.f, 100.e-4}};

for (auto iLayer{0}; iLayer < layersQuotas.size(); ++iLayer) { // Create TRK layers shapes
auto& layerData = layersQuotas[iLayer];
trkLayerShapes.emplace_back(new TGeoTube(Form("TRKLAYER_%dsh", iLayer), layerData[0], layerData[0] + layerData[2], layerData[1] / 2.));
if (iLayer != 0) {
subtractorsFormula += "+";
}
subtractorsFormula += Form("TRKLAYER_%dsh", iLayer);
}

// IRIS vacuum vessel and coldplate dimensions
float coldplateRIn = 2.6f; // cm
float coldplateThick = 150.e-3; // cm
float coldplateLength = 50.f; // cm
float irisVacuumVesselInnerRIn = 0.48f; // cm
float irisVacuumVesselOuterRIn = coldplateRIn + coldplateThick;
float irisVacuumVesselLength = 70.f; // cm
float irisVacuumVesselThick = 150.e-4; // cm

// Excavate vacuum for hosting cold plate and IRIS tracker
TGeoTube* coldPlate = new TGeoTube("TRK_COLDPLATEsh", coldplateRIn, coldplateRIn + coldplateThick, coldplateLength / 2.);
subtractorsFormula += "+TRK_COLDPLATEsh";

TGeoTube* irisVacuumVesselInner = new TGeoTube("TRK_IRISVACUUMVESSELINNERsh", irisVacuumVesselInnerRIn, irisVacuumVesselInnerRIn + irisVacuumVesselThick, irisVacuumVesselLength / 2.);
subtractorsFormula += "+TRK_IRISVACUUMVESSELINNERsh";

TGeoTube* irisVacuumVesselOuter = new TGeoTube("TRK_IRISVACUUMVESSELOUTERsh", irisVacuumVesselOuterRIn, irisVacuumVesselOuterRIn + irisVacuumVesselThick, irisVacuumVesselLength / 2.);
subtractorsFormula += "+TRK_IRISVACUUMVESSELOUTERsh";

TGeoTube* irisVacuumVesselWall = new TGeoTube("TRK_IRISVACUUMVESSELWALLsh", irisVacuumVesselInnerRIn, irisVacuumVesselOuterRIn + irisVacuumVesselThick, irisVacuumVesselThick / 2.);
TGeoTranslation* posIrisVacVWallNegZSide = new TGeoTranslation("IRISWALLNEGZ", 0., 0., -irisVacuumVesselLength / 2. - irisVacuumVesselThick / 2.);
posIrisVacVWallNegZSide->RegisterYourself();
subtractorsFormula += "+TRK_IRISVACUUMVESSELWALLsh:IRISWALLNEGZ";

TGeoTranslation* posIrisVacVWallPosZSide = new TGeoTranslation("IRISWALLPOSZ", 0., 0., irisVacuumVesselLength / 2. + irisVacuumVesselThick / 2.);
posIrisVacVWallPosZSide->RegisterYourself();
subtractorsFormula += "+TRK_IRISVACUUMVESSELWALLsh:IRISWALLPOSZ";
}

if (!mIsFT3Activated) {
std::vector<TGeoTube*> ft3DiscShapes;
std::vector<TGeoTranslation*> ft3DiscPositions;

std::vector<std::array<float, 4>> discsQuotas = {std::array<float, 4>{0.5f, 2.5f, 100.e-4, 26.}, // TODO: Set discs dynamically. {rIn, rOut, thickness, zpos}
std::array<float, 4>{0.5f, 2.5f, 100.e-4, 30.},
std::array<float, 4>{0.5f, 2.5f, 100.e-4, 34.},
std::array<float, 4>{0.5f, 2.5f, 100.e-4, -26.},
std::array<float, 4>{0.5f, 2.5f, 100.e-4, -30.},
std::array<float, 4>{0.5f, 2.5f, 100.e-4, -34.}};
TString tempSubtractorsFormula = "";
if (!mIsTRKActivated) {
tempSubtractorsFormula = "+";
}
for (auto iDisc{0}; iDisc < discsQuotas.size(); ++iDisc) {
auto& discData = discsQuotas[iDisc];
ft3DiscShapes.emplace_back(new TGeoTube(Form("FT3DISC_%dsh", iDisc), discData[0], discData[1], discData[2] / 2.));
ft3DiscPositions.emplace_back(new TGeoTranslation(Form("t%d", iDisc), 0., 0., discData[3]));
ft3DiscPositions[iDisc]->RegisterYourself();
if (iDisc != 0) {
tempSubtractorsFormula += "+";
}
tempSubtractorsFormula += Form("FT3DISC_%dsh:t%d", iDisc, iDisc);
}
subtractorsFormula += tempSubtractorsFormula;
}
Double_t pipeASideLength = mA3IPLength / 2. - mVacuumVesselThick - mVacuumVesselASideLength / 2.;
Double_t pipeCSideLength = mA3IPLength / 2. + mVacuumVesselASideLength / 2.;

// Pipe tubes
TGeoTube* pipeASide = new TGeoTube("PIPE_Ash", mPipeRIn, mPipeRIn + mPipeThick, pipeASideLength / 2.);
TGeoTube* pipeCSide = new TGeoTube("PIPE_Csh", mVacuumVesselRIn, mVacuumVesselRIn + mVacuumVesselThick, pipeCSideLength / 2.);
TGeoTube* vacuumVesselWall = new TGeoTube("VACUUM_VESSEL_WALLsh", mPipeRIn, mVacuumVesselRIn + mVacuumVesselThick, mVacuumVesselThick / 2.);

// Pipe and vacuum vessel positions
TGeoTranslation* posVacuumVesselWall = new TGeoTranslation("WALL_POSITION", 0, 0, mVacuumVesselASideLength + mVacuumVesselThick / 2.);
posVacuumVesselWall->RegisterYourself();
TGeoTranslation* posPipeASide = new TGeoTranslation("PIPE_ASIDE_POSITION", 0, 0, mVacuumVesselASideLength + mVacuumVesselThick + pipeASideLength / 2.);
TGeoTranslation* posPipeASide = new TGeoTranslation("PIPE_ASIDE_POSITION", 0, 0, mVacuumVesselASideLength / 2. + mVacuumVesselThick + pipeASideLength / 2.);
posPipeASide->RegisterYourself();
TGeoTranslation* posPipeCSide = new TGeoTranslation("PIPE_CSIDE_POSITION", 0, 0, mVacuumVesselASideLength / 2. - pipeCSideLength / 2.);
posPipeCSide->RegisterYourself();
TGeoTranslation* posVacuumVesselWall = new TGeoTranslation("WALL_POSITION", 0, 0, mVacuumVesselASideLength / 2. + mVacuumVesselThick / 2.);
posVacuumVesselWall->RegisterYourself();

// Pipe composite shape and volume
TString pipeCompositeFormula =
"VACUUM_VESSEL_WALLsh:WALL_POSITION"
"+PIPE_Ash:PIPE_ASIDE_POSITION"
"+PIPE_Csh:PIPE_CSIDE_POSITION";

if (subtractorsFormula.Length()) {
LOG(info) << "Subtractors formula before : " << subtractorsFormula;
subtractorsFormula = Form("-(%s)", subtractorsFormula.Data());
LOG(info) << "Subtractors formula after: " << subtractorsFormula;

vacuumComposite = new TGeoCompositeShape("VACUUM_BASEsh", (compositeFormula + subtractorsFormula).Data());
vacuumVolume = new TGeoVolume("VACUUM_BASE", vacuumComposite, kMedVac);
} else {
vacuumComposite = new TGeoCompositeShape("VACUUM_BASEsh", compositeFormula.Data());
vacuumVolume = new TGeoVolume("VACUUM_BASE", vacuumComposite, kMedVac);
}
"PIPE_Ash:PIPE_ASIDE_POSITION"
"+PIPE_Csh:PIPE_CSIDE_POSITION"
"+VACUUM_VESSEL_WALLsh:WALL_POSITION";

TGeoCompositeShape* pipeComposite = new TGeoCompositeShape("A3IPsh", pipeCompositeFormula);
TGeoVolume* pipeVolume = new TGeoVolume("A3IP", pipeComposite, kMedBe);

// Add everything to the barrel
barrel->AddNode(vacuumVolume, 1, new TGeoTranslation(0, 30.f, 0));
barrel->AddNode(pipeVolume, 1, new TGeoTranslation(0, 30.f, 0));

vacuumVolume->SetLineColor(kGreen + 3);
pipeVolume->SetLineColor(kGreen + 3);
}

Expand All @@ -236,15 +134,6 @@ void Alice3Pipe::createMaterials()
float sxmgmx = 10.;
o2::base::Detector::initFieldTrackingParams(isxfld, sxmgmx);

//
// Air
//
float aAir[4] = {12.0107, 14.0067, 15.9994, 39.948};
float zAir[4] = {6., 7., 8., 18.};
float wAir[4] = {0.000124, 0.755267, 0.231781, 0.012827};
float dAir = 1.20479E-3;
float dAir1 = 1.20479E-11;

// ****************
// Defines tracking media parameters.
//
Expand All @@ -258,13 +147,8 @@ void Alice3Pipe::createMaterials()
auto& matmgr = o2::base::MaterialManager::Instance();

// Beryllium
matmgr.Material("ALICE3_PIPE", 5, "BERILLIUM$", 9.01, 4., 1.848, 35.3, 36.7);
matmgr.Material("ALICE3_PIPE", 5, "BERYLLIUM$", 9.01, 4., 1.848, 35.3, 36.7);
matmgr.Medium("ALICE3_PIPE", 5, "BE", 5, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);

// Vacuum
matmgr.Mixture("ALICE3_PIPE", 16, "VACUUM$ ", aAir, zAir, dAir1, 4, wAir);

matmgr.Medium("ALICE3_PIPE", 16, "VACUUM", 16, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
}

// ----------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ enum eLayout {
struct TRKBaseParam : public o2::conf::ConfigurableParamHelper<TRKBaseParam> {
std::string configFile = "";
float serviceTubeX0 = 0.02f; // X0 Al2O3
Bool_t irisOpen = false;

eLayout layoutML = kCylinder; // Type of segmentation for the middle layers
eLayout layoutOL = kCylinder; // Type of segmentation for the outer layers

Expand Down
8 changes: 7 additions & 1 deletion Detectors/Upgrades/ALICE3/TRK/simulation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@ o2_add_library(TRKSimulation
SOURCES src/TRKLayer.cxx
src/Detector.cxx
src/TRKServices.cxx
src/TRKPetalCase.cxx
src/TRKPetalLayer.cxx
src/TRKPetalDisk.cxx
PUBLIC_LINK_LIBRARIES O2::TRKBase
O2::FT3Simulation
O2::ITSMFTSimulation)

o2_target_root_dictionary(TRKSimulation
HEADERS include/TRKSimulation/Detector.h
include/TRKSimulation/TRKLayer.h
include/TRKSimulation/TRKServices.h)
include/TRKSimulation/TRKServices.h
include/TRKSimulation/TRKPetalCase.h
include/TRKSimulation/TRKPetalLayer.h
include/TRKSimulation/TRKPetalDisk.h)
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "TRKSimulation/TRKLayer.h"
#include "TRKSimulation/TRKServices.h"
#include "TRKSimulation/TRKPetalCase.h"
#include "TRKBase/GeometryTGeo.h"

#include <TLorentzVector.h>
Expand Down Expand Up @@ -87,7 +88,11 @@ class Detector : public o2::base::DetImpl<Detector>
GeometryTGeo* mGeometryTGeo; //!
std::vector<o2::itsmft::Hit>* mHits; // ITSMFT ones for the moment
std::vector<TRKLayer> mLayers;
TRKServices mServices;
TRKServices mServices; // Houses the services of the TRK, but not the Iris tracker
std::vector<TRKPetalCase> mPetalCases; // Houses the Iris tracker and its services. Created fully in the beam pipe

std::vector<std::string> mFirstOrLastLayers; // Names of the first or last layers
bool InsideFirstOrLastLayer(std::string layerName);

void defineSensitiveVolumes();

Expand Down
Loading