Skip to content

Commit ea6b15c

Browse files
authored
[ALICE3] TRK: Collect services in a dedicated volume assembly (#15215)
* Refactor TRKServices to use volume assembly * Add service volume name to GeometryTGeo * Add getTRKServiceVolPattern method and variable
1 parent 74c8049 commit ea6b15c

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

Detectors/Upgrades/ALICE3/TRK/base/include/TRKBase/GeometryTGeo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
4343
return sInstance.get();
4444
};
4545
static const char* getTRKVolPattern() { return sVolumeName.c_str(); }
46+
static const char* getTRKServiceVolPattern() { return sServiceVolName.c_str(); }
4647
static const char* getTRKLayerPattern() { return sLayerName.c_str(); }
4748
static const char* getTRKPetalAssemblyPattern() { return sPetalAssemblyName.c_str(); }
4849
static const char* getTRKPetalPattern() { return sPetalName.c_str(); }
@@ -198,6 +199,7 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
198199
static constexpr int MAXLAYERS = 20; ///< max number of active layers
199200

200201
static std::string sVolumeName;
202+
static std::string sServiceVolName;
201203
static std::string sLayerName;
202204
static std::string sPetalAssemblyName;
203205
static std::string sPetalName;

Detectors/Upgrades/ALICE3/TRK/base/src/GeometryTGeo.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ std::unique_ptr<o2::trk::GeometryTGeo> GeometryTGeo::sInstance;
2626

2727
// Names
2828
std::string GeometryTGeo::sVolumeName = "TRKV";
29+
std::string GeometryTGeo::sServiceVolName = "TRKService";
2930
std::string GeometryTGeo::sLayerName = "TRKLayer";
3031
std::string GeometryTGeo::sPetalAssemblyName = "PETAL";
3132
std::string GeometryTGeo::sPetalName = "PETALCASE";

Detectors/Upgrades/ALICE3/TRK/simulation/src/TRKServices.cxx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,21 @@ void TRKServices::createMaterials()
127127

128128
void TRKServices::createServices(TGeoVolume* motherVolume)
129129
{
130+
131+
TGeoVolumeAssembly* vol = new TGeoVolumeAssembly(GeometryTGeo::getTRKServiceVolPattern());
132+
motherVolume->AddNode(vol, 2, new TGeoTranslation(0, 0., 0));
130133
createMaterials();
131134
createVacuumCompositeShape();
132135
auto& trkPars = TRKBaseParam::Instance();
133136
if (trkPars.getLayoutSRV() == kLOISymm) {
134137
LOGP(info, "TRK services: LoI version");
135-
createMiddleServices(motherVolume);
136-
createOuterDisksServices(motherVolume);
137-
createOuterBarrelServices(motherVolume);
138+
createMiddleServices(vol);
139+
createOuterDisksServices(vol);
140+
createOuterBarrelServices(vol);
138141
} else {
139142
LOGP(info, "TRK services: Peacock layout");
140-
createMLServicesPeacock(motherVolume);
141-
createOTServicesPeacock(motherVolume);
143+
createMLServicesPeacock(vol);
144+
createOTServicesPeacock(vol);
142145
}
143146
}
144147

0 commit comments

Comments
 (0)