Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FCT Segmentation in trapezoids #13760

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
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 @@ -26,7 +26,8 @@ namespace fct

enum FCTGeometry {
Default = 0,
Telescope = 1
Telescope = 1,
Segmented = 2
};

struct FCTBaseParam : public o2::conf::ConfigurableParamHelper<FCTBaseParam> {
Expand All @@ -42,6 +43,10 @@ struct FCTBaseParam : public o2::conf::ConfigurableParamHelper<FCTBaseParam> {
Float_t etaOut = 1.5;
Float_t Layerx2X0 = 0.01;

// FCTGeometry::Segmented parameters
Int_t nRadSeg = 2;
Int_t nAziSeg = 5;

// FCTGeometry::External file
std::string configFile = ""; // Overrides geoModel parameter when provided

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,24 +92,28 @@ class GeometryTGeo : public o2::itsmft::GeometryTGeo
static const char* getFCTVolPattern() { return sVolumeName.c_str(); }
static const char* getFCTInnerVolPattern() { return sInnerVolumeName.c_str(); }
static const char* getFCTLayerPattern() { return sLayerName.c_str(); }
static const char* getFCTSegmentPattern() { return sSegmentName.c_str(); }
static const char* getFCTChipPattern() { return sChipName.c_str(); }
static const char* getFCTSensorPattern() { return sSensorName.c_str(); }

static const char* composeSymNameFCT(Int_t d) { return Form("%s_%d", o2::detectors::DetID(o2::detectors::DetID::FCT).getName(), d); }
static const char* composeSymNameLayer(Int_t d, Int_t lr);
static const char* composeSymNameLayer(Int_t d, Int_t lr, Int_t sec, Int_t mod);
static const char* composeSymNameChip(Int_t d, Int_t lr);
static const char* composeSymNameChip(Int_t d, Int_t lr, Int_t sec, Int_t mod);
static const char* composeSymNameSensor(Int_t d, Int_t lr);
static const char* composeSymNameSensor(Int_t d, Int_t lr, Int_t sec, Int_t mod);

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

Int_t mNumberOfLayers; ///< number of layers
Int_t mNumberOfActives; ///< number of layers/segments (whichever is selected)
static std::string sInnerVolumeName; ///< Mother inner volume name
static std::string sVolumeName; ///< Mother volume name
static std::string sSegmentName; ///< Segment name
static std::string sLayerName; ///< Layer name
static std::string sChipName; ///< Chip name

static std::string sSensorName; ///< Sensor name
static std::string sSensorName; ///< Sensor name

private:
static std::unique_ptr<o2::fct::GeometryTGeo> sInstance; ///< singletone instance
Expand Down
19 changes: 19 additions & 0 deletions Detectors/Upgrades/ALICE3/FCT/base/src/GeometryTGeo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ std::unique_ptr<o2::fct::GeometryTGeo> GeometryTGeo::sInstance;

std::string GeometryTGeo::sVolumeName = "FCTV"; ///< Mother volume name
std::string GeometryTGeo::sInnerVolumeName = "FCTInner"; ///< Mother inner volume name
std::string GeometryTGeo::sSegmentName = "FCTSegment"; ///< Segment name
std::string GeometryTGeo::sLayerName = "FCTLayer"; ///< Layer name
std::string GeometryTGeo::sChipName = "FCTChip"; ///< Sensor name
std::string GeometryTGeo::sSensorName = "FCTSensor"; ///< Sensor name
Expand Down Expand Up @@ -104,6 +105,24 @@ const char* GeometryTGeo::composeSymNameSensor(Int_t d, Int_t lr)
return Form("%s/%s%d", composeSymNameChip(d, lr), getFCTSensorPattern(), lr);
}

//__________________________________________________________________________
const char* GeometryTGeo::composeSymNameLayer(Int_t d, Int_t lr, Int_t sec, Int_t mod)
{
return Form("%s/%s%dSec%dMod%d", composeSymNameFCT(d), getFCTSegmentPattern(), lr, sec, mod);
}

//__________________________________________________________________________
const char* GeometryTGeo::composeSymNameChip(Int_t d, Int_t lr, Int_t sec, Int_t mod)
{
return Form("%s/%s%dSec%dMod%d", composeSymNameLayer(d, lr, sec, mod), getFCTChipPattern(), lr, sec, mod);
}

//__________________________________________________________________________
const char* GeometryTGeo::composeSymNameSensor(Int_t d, Int_t lr, Int_t sec, Int_t mod)
{
return Form("%s/%s%dSec%dMod%d", composeSymNameChip(d, lr, sec, mod), getFCTSensorPattern(), lr, sec, mod);
}

//__________________________________________________________________________
void GeometryTGeo::fillMatrixCache(int mask)
{
Expand Down
4 changes: 3 additions & 1 deletion Detectors/Upgrades/ALICE3/FCT/simulation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@

o2_add_library(FCTSimulation
SOURCES src/FCTLayer.cxx
src/FCTSegment.cxx
src/Detector.cxx
PUBLIC_LINK_LIBRARIES O2::FCTBase
O2::ITSMFTSimulation
ROOT::Physics)

o2_target_root_dictionary(FCTSimulation
HEADERS include/FCTSimulation/Detector.h
include/FCTSimulation/FCTLayer.h)
include/FCTSimulation/FCTLayer.h
include/FCTSimulation/FCTSegment.h)

o2_data_file(COPY data DESTINATION Detectors/FCT/simulation)
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,16 @@ namespace o2
namespace fct
{
class FCTLayer;
}
class FCTSegment;
} // namespace fct
} // namespace o2

namespace o2
{
namespace fct
{
class FCTLayer;
class FCTSegment;

class Detector : public o2::base::DetImpl<Detector>
{
Expand Down Expand Up @@ -109,22 +111,23 @@ class Detector : public o2::base::DetImpl<Detector>
void PreTrack() override { ; }

/// Returns the number of layers
Int_t getNumberOfLayers() const { return mNumberOfLayers; }
Int_t getNumberOfLayers() const { return mNumberOfActives; }

void buildBasicFCT(const FCTBaseParam& param);
void buildFCTV1();
void buildSegmentedFCT(const FCTBaseParam& param);
void buildFCTFromFile(std::string);

GeometryTGeo* mGeometryTGeo; //! access to geometry details

void exportLayout();

private:
std::vector<Int_t> mLayerID;
std::vector<Int_t> mActiveID;
std::vector<Int_t> mConverterLayerId;
std::vector<TString> mLayerName;
std::vector<TString> mActiveName;
std::vector<TString> mConverterLayerName;
Int_t mNumberOfLayers;
Int_t mNumberOfActives;
Int_t mNumberOfConverterLayers;

/// this is transient data about track passing the sensor
Expand Down Expand Up @@ -154,6 +157,7 @@ class Detector : public o2::base::DetImpl<Detector>

std::vector<FCTLayer> mLayers;
std::vector<FCTLayer> mConverterLayers;
std::vector<o2::fct::FCTSegment> mSegments;
bool mIsPipeActivated = true; //! If Alice 3 pipe is present append inner disks to vacuum volume to avoid overlaps

template <typename Det>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

/// \file FCTSegment.h
/// \brief Definition of the FCTSegment class

#ifndef ALICEO2_FCT_SEGMENT_H_
#define ALICEO2_FCT_SEGMENT_H_

#include "Rtypes.h" // for Double_t, Int_t, Bool_t, etc
#include "FCTSimulation/Detector.h" // for Detector, Detector::Model

class TGeoVolume;

namespace o2
{
namespace fct
{

/// This class defines the Geometry for the FCT segment TGeo. This is a work class used
/// to study different configurations during the development of the ALICE3 EndCaps
class FCTSegment : public TObject
{
public:
// Default constructor
FCTSegment() = default;

// Segment constructor
FCTSegment(Int_t layerNumber, Int_t sectorNumber, Int_t moduleNumber, std::string segmentName, Double_t x, Double_t y, Double_t z, Double_t vertL, Double_t innerL, Double_t outerL, Double_t rotX, Double_t rotY, Double_t rotZ, Float_t segmentx2X0);

/// Copy constructor
FCTSegment(const FCTSegment&) = default;

/// Assignment operator
FCTSegment& operator=(const FCTSegment&) = default;

/// Default destructor
~FCTSegment() override;

/// getters
auto getLayerNumber() const { return mLayerNumber; }
auto getSectorNumber() const { return mSectorNumber; }
auto getModuleNumber() const { return mModuleNumber; }
auto getX() const { return mX; }
auto getY() const { return mY; }
auto getZ() const { return mZ; }
auto getXRot() const { return mX; }
auto getYRot() const { return mY; }
auto getZRot() const { return mZ; }
auto getVertL() const { return mVertL; }
auto getInnerL() const { return mInnerL; }
auto getOuterL() const { return mOuterL; }
auto getx2X0() const { return mx2X0; }

/// Creates the actual Segment and places inside its mother volume
/// \param motherVolume the TGeoVolume owing the volume structure
virtual void createSegment(TGeoVolume* motherVolume);

private:
Int_t mLayerNumber = -1;
Int_t mSectorNumber = -1;
Int_t mModuleNumber = -1;
std::string mSegmentName; ///< Current segment name
Double_t mVertL; ///< Vertical length of the trapezoid
Double_t mInnerL; ///< Inner side length of the trapezoid
Double_t mOuterL; ///< Outer side length of the trapezoid
Double_t mX; ///< X position of the segment
Double_t mY; ///< Y position of the segment
Double_t mZ; ///< Z position of the segment
Double_t mRotX; ///< X rotation of the segment
Double_t mRotY; ///< X rotation of the segment
Double_t mRotZ; ///< X rotation of the segment
Double_t mChipThickness; ///< Chip thickness
Double_t mx2X0; ///< segment material budget x/X0

ClassDefOverride(FCTSegment, 0); // ALICE 3 EndCaps geometry
};
} // namespace fct
} // namespace o2

#endif
Loading
Loading