Skip to content

Commit e5e7482

Browse files
committed
[ALICE3] Update FT3 geometry
- simplify geometry building - unify indices, variables
1 parent d890d41 commit e5e7482

File tree

7 files changed

+221
-369
lines changed

7 files changed

+221
-369
lines changed

Detectors/Upgrades/ALICE3/FT3/base/include/FT3Base/FT3BaseParam.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ struct FT3BaseParam : public o2::conf::ConfigurableParamHelper<FT3BaseParam> {
4242
Float_t etaOut = 1.5;
4343
Float_t Layerx2X0 = 0.01;
4444

45-
// FT3Geometry::External file
46-
std::string configFile = ""; // Overrides geoModel parameter when provided
47-
4845
O2ParamDef(FT3BaseParam, "FT3Base");
4946
};
5047

Detectors/Upgrades/ALICE3/FT3/base/include/FT3Base/GeometryTGeo.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,6 @@ class GeometryTGeo : public o2::itsmft::GeometryTGeo
101101
static const char* composeSymNameSensor(Int_t d, Int_t lr);
102102

103103
protected:
104-
static constexpr int MAXLAYERS = 15; ///< max number of active layers
105-
106-
Int_t mNumberOfLayers; ///< number of layers
107104
static std::string sInnerVolumeName; ///< Mother inner volume name
108105
static std::string sVolumeName; ///< Mother volume name
109106
static std::string sLayerName; ///< Layer name

Detectors/Upgrades/ALICE3/FT3/simulation/include/FT3Simulation/Detector.h

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include "TGeoManager.h" // for gGeoManager, TGeoManager (ptr only)
2626
#include "TLorentzVector.h" // for TLorentzVector
2727
#include "TVector3.h" // for TVector3
28-
#include "FT3Base/FT3BaseParam.h"
2928

3029
class FairVolume;
3130
class TGeoVolume;
@@ -34,25 +33,10 @@ class TParticle;
3433

3534
class TString;
3635

37-
namespace o2
38-
{
39-
namespace ft3
36+
namespace o2::ft3
4037
{
4138
class GeometryTGeo;
42-
}
43-
} // namespace o2
44-
namespace o2
45-
{
46-
namespace ft3
47-
{
48-
class FT3Layer;
49-
}
50-
} // namespace o2
51-
52-
namespace o2
53-
{
54-
namespace ft3
55-
{
39+
class FT3BaseParam;
5640
class FT3Layer;
5741

5842
class Detector : public o2::base::DetImpl<Detector>
@@ -108,25 +92,27 @@ class Detector : public o2::base::DetImpl<Detector>
10892
void PostTrack() override { ; }
10993
void PreTrack() override { ; }
11094

95+
static constexpr int IdxForwardDisks = 0;
96+
static constexpr int IdxBackwardDisks = 1;
11197
/// Returns the number of layers
112-
Int_t getNumberOfLayers() const { return mNumberOfLayers; }
98+
size_t getNumberOfLayers() const
99+
{
100+
if (mLayerName[IdxBackwardDisks].size() != mLayerName[IdxForwardDisks].size()) {
101+
LOG(fatal) << "Number of layers in the two directions are different! Returning 0.";
102+
}
103+
return mLayerName[IdxBackwardDisks].size();
104+
}
113105

114106
void buildBasicFT3(const FT3BaseParam& param);
115107
void buildFT3V1();
116108
void buildFT3V3b();
117109
void buildFT3Scoping();
118110
void buildFT3NewVacuumVessel();
119111
void buildFT3ScopingV3();
120-
void buildFT3FromFile(std::string);
121-
122-
GeometryTGeo* mGeometryTGeo; //! access to geometry details
123-
124-
void exportLayout();
125112

126113
protected:
127114
std::vector<Int_t> mLayerID;
128-
std::vector<std::vector<TString>> mLayerName;
129-
Int_t mNumberOfLayers;
115+
std::array<std::vector<TString>, 2> mLayerName; // Two sets of layer names, one per direction (forward/backward)
130116

131117
private:
132118
/// this is transient data about track passing the sensor
@@ -154,16 +140,15 @@ class Detector : public o2::base::DetImpl<Detector>
154140

155141
Detector& operator=(const Detector&);
156142

157-
std::vector<std::vector<FT3Layer>> mLayers;
158-
bool mIsPipeActivated = true; //! If Alice 3 pipe is present append inner disks to vacuum volume to avoid overlaps
143+
std::array<std::vector<FT3Layer>, 2> mLayers; // Two sets of layers, one per direction (forward/backward)
144+
bool mIsPipeActivated = true; //! If Alice 3 pipe is present append inner disks to vacuum volume to avoid overlaps
159145

160146
template <typename Det>
161147
friend class o2::base::DetImpl;
162148
ClassDefOverride(Detector, 1);
163149
};
164150

165-
} // namespace ft3
166-
} // namespace o2
151+
} // namespace o2::ft3
167152

168153
#ifdef USESHM
169154
namespace o2

Detectors/Upgrades/ALICE3/FT3/simulation/include/FT3Simulation/FT3Layer.h

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class FT3Layer : public TObject
3636
FT3Layer() = default;
3737

3838
// Sample layer constructor
39-
FT3Layer(Int_t layerDirection, Int_t layerNumber, std::string layerName, Float_t z, Float_t rIn, Float_t rOut, Float_t Layerx2X0);
39+
FT3Layer(Int_t layerDirection, Int_t layerNumber, std::string layerName, Float_t z, Float_t rIn, Float_t rOut, Float_t Layerx2X0, bool partOfMiddleLayers);
4040

4141
/// Copy constructor
4242
FT3Layer(const FT3Layer&) = default;
@@ -51,6 +51,7 @@ class FT3Layer : public TObject
5151
auto getInnerRadius() const { return mInnerRadius; }
5252
auto getOuterRadius() const { return mOuterRadius; }
5353
auto getDirection() const { return mDirection; }
54+
bool getIsInMiddleLayer() const { return mIsMiddleLayer; }
5455
auto getZ() const { return mZ; }
5556
auto getx2X0() const { return mx2X0; }
5657

@@ -77,14 +78,15 @@ class FT3Layer : public TObject
7778
static TGeoMedium* medFoam;
7879

7980
private:
80-
Int_t mLayerNumber = -1; ///< Current layer number
81-
Int_t mDirection; ///< Layer direction 0=Forward 1 = Backward
82-
std::string mLayerName; ///< Current layer name
83-
Double_t mInnerRadius; ///< Inner radius of this layer
84-
Double_t mOuterRadius; ///< Outer radius of this layer
85-
Double_t mZ; ///< Z position of the layer
86-
Double_t mChipThickness; ///< Chip thickness
87-
Double_t mx2X0; ///< Layer material budget x/X0
81+
Int_t mLayerNumber = -1; ///< Current layer number
82+
Int_t mDirection; ///< Layer direction 0=Forward 1 = Backward
83+
bool mIsMiddleLayer = true; ///< Wether this layer is part of the middle layers
84+
std::string mLayerName; ///< Current layer name
85+
Double_t mInnerRadius; ///< Inner radius of this layer
86+
Double_t mOuterRadius; ///< Outer radius of this layer
87+
Double_t mZ; ///< Z position of the layer
88+
Double_t mChipThickness; ///< Chip thickness
89+
Double_t mx2X0; ///< Layer material budget x/X0
8890

8991
ClassDefOverride(FT3Layer, 0); // ALICE 3 EndCaps geometry
9092
};

0 commit comments

Comments
 (0)