Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ class GeometryTGeo : public o2::itsmft::GeometryTGeo
static const char* composeSymNameSensor(Int_t d, Int_t lr);

protected:
static constexpr int MAXLAYERS = 15; ///< max number of active layers

Int_t mNumberOfLayers; ///< number of layers
static std::string sInnerVolumeName; ///< Mother inner volume name
static std::string sVolumeName; ///< Mother volume name
static std::string sLayerName; ///< Layer name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "TGeoManager.h" // for gGeoManager, TGeoManager (ptr only)
#include "TLorentzVector.h" // for TLorentzVector
#include "TVector3.h" // for TVector3
#include "FT3Base/FT3BaseParam.h"

class FairVolume;
class TGeoVolume;
Expand All @@ -34,25 +33,10 @@ class TParticle;

class TString;

namespace o2
{
namespace ft3
namespace o2::ft3
{
class GeometryTGeo;
}
} // namespace o2
namespace o2
{
namespace ft3
{
class FT3Layer;
}
} // namespace o2

namespace o2
{
namespace ft3
{
class FT3BaseParam;
class FT3Layer;

class Detector : public o2::base::DetImpl<Detector>
Expand Down Expand Up @@ -108,8 +92,16 @@ class Detector : public o2::base::DetImpl<Detector>
void PostTrack() override { ; }
void PreTrack() override { ; }

static constexpr int IdxForwardDisks = 0;
static constexpr int IdxBackwardDisks = 1;
/// Returns the number of layers
Int_t getNumberOfLayers() const { return mNumberOfLayers; }
size_t getNumberOfLayers() const
{
if (mLayerName[IdxBackwardDisks].size() != mLayerName[IdxForwardDisks].size()) {
LOG(fatal) << "Number of layers in the two directions are different! Returning 0.";
}
return mLayerName[IdxBackwardDisks].size();
}

void buildBasicFT3(const FT3BaseParam& param);
void buildFT3V1();
Expand All @@ -119,14 +111,11 @@ class Detector : public o2::base::DetImpl<Detector>
void buildFT3ScopingV3();
void buildFT3FromFile(std::string);

GeometryTGeo* mGeometryTGeo; //! access to geometry details

void exportLayout();

protected:
std::vector<Int_t> mLayerID;
std::vector<std::vector<TString>> mLayerName;
Int_t mNumberOfLayers;
std::array<std::vector<TString>, 2> mLayerName; // Two sets of layer names, one per direction (forward/backward)

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

Detector& operator=(const Detector&);

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

template <typename Det>
friend class o2::base::DetImpl;
ClassDefOverride(Detector, 1);
};

} // namespace ft3
} // namespace o2
} // namespace o2::ft3

#ifdef USESHM
namespace o2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class FT3Layer : public TObject
FT3Layer() = default;

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

/// Copy constructor
FT3Layer(const FT3Layer&) = default;
Expand All @@ -51,6 +51,7 @@ class FT3Layer : public TObject
auto getInnerRadius() const { return mInnerRadius; }
auto getOuterRadius() const { return mOuterRadius; }
auto getDirection() const { return mDirection; }
bool getIsInMiddleLayer() const { return mIsMiddleLayer; }
auto getZ() const { return mZ; }
auto getx2X0() const { return mx2X0; }

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

private:
Int_t mLayerNumber = -1; ///< Current layer number
Int_t mDirection; ///< Layer direction 0=Forward 1 = Backward
std::string mLayerName; ///< Current layer name
Double_t mInnerRadius; ///< Inner radius of this layer
Double_t mOuterRadius; ///< Outer radius of this layer
Double_t mZ; ///< Z position of the layer
Double_t mChipThickness; ///< Chip thickness
Double_t mx2X0; ///< Layer material budget x/X0
Int_t mLayerNumber = -1; ///< Current layer number
Int_t mDirection; ///< Layer direction 0=Forward 1 = Backward
bool mIsMiddleLayer = true; ///< Wether this layer is part of the middle layers
std::string mLayerName; ///< Current layer name
Double_t mInnerRadius; ///< Inner radius of this layer
Double_t mOuterRadius; ///< Outer radius of this layer
Double_t mZ; ///< Z position of the layer
Double_t mChipThickness; ///< Chip thickness
Double_t mx2X0; ///< Layer material budget x/X0

ClassDefOverride(FT3Layer, 0); // ALICE 3 EndCaps geometry
};
Expand Down
Loading