Skip to content

Commit 7466eb6

Browse files
committed
[ALICE3] Update FT3 geometry
- wrap layers into air volumes - solve visualization issues
1 parent d890d41 commit 7466eb6

File tree

6 files changed

+191
-219
lines changed

6 files changed

+191
-219
lines changed

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 & 27 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,8 +92,16 @@ 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();
@@ -119,14 +111,11 @@ class Detector : public o2::base::DetImpl<Detector>
119111
void buildFT3ScopingV3();
120112
void buildFT3FromFile(std::string);
121113

122-
GeometryTGeo* mGeometryTGeo; //! access to geometry details
123-
124114
void exportLayout();
125115

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

131120
private:
132121
/// this is transient data about track passing the sensor
@@ -154,16 +143,15 @@ class Detector : public o2::base::DetImpl<Detector>
154143

155144
Detector& operator=(const Detector&);
156145

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
146+
std::array<std::vector<FT3Layer>, 2> mLayers; // Two sets of layers, one per direction (forward/backward)
147+
bool mIsPipeActivated = true; //! If Alice 3 pipe is present append inner disks to vacuum volume to avoid overlaps
159148

160149
template <typename Det>
161150
friend class o2::base::DetImpl;
162151
ClassDefOverride(Detector, 1);
163152
};
164153

165-
} // namespace ft3
166-
} // namespace o2
154+
} // namespace o2::ft3
167155

168156
#ifdef USESHM
169157
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)