Skip to content

Commit 499233f

Browse files
authored
[ALICE3] TRK: introduce the staggering of ROFs in the TRK (#15335)
* ALICE3: Add method to get the TRK layer id * ALICE3: introduce staggering logic in the digitizer * ALICE3: Adapt test macros to new staggering structure * ALICE3: adapt cluster finding to separated streams per layer Fix CheckCluster macro * Change macro name in CMakeLists.txt * Fix Specs.h and use that in geometry building
1 parent 38239f7 commit 499233f

24 files changed

Lines changed: 1018 additions & 908 deletions

File tree

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

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,40 @@
1212
#ifndef O2_TRK_ALMIRAPARAM_H
1313
#define O2_TRK_ALMIRAPARAM_H
1414

15+
#include <algorithm>
16+
1517
#include "CommonConstants/LHCConstants.h"
1618
#include "CommonUtils/ConfigurableParam.h"
1719
#include "CommonUtils/ConfigurableParamHelper.h"
20+
#include "TRKBase/Specs.h"
1821

1922
namespace o2
2023
{
2124
namespace trk
2225
{
23-
constexpr float DEFAlmiraStrobeDelay = 0.f; ///< default strobe delay in ns wrt ROF start, to be tuned with the real chip response
2426

2527
struct AlmiraParam : public o2::conf::ConfigurableParamHelper<AlmiraParam> {
26-
int roFrameLengthInBC = o2::constants::lhc::LHCMaxBunches / 198; ///< ROF length in BC for continuous mode
27-
float strobeDelay = DEFAlmiraStrobeDelay; ///< strobe start in ns wrt ROF start
28-
float strobeLengthCont = -1.; ///< if < 0, full ROF length minus delay
29-
int roFrameBiasInBC = 0; ///< ROF start bias in BC wrt orbit start
28+
static constexpr size_t kNLayers = constants::VD::petal::nLayers + constants::ML::nLayers + constants::OT::nLayers;
29+
static constexpr size_t getNLayers() { return kNLayers; }
30+
31+
int roFrameLengthInBCPerLayer[kNLayers] = {0}; ///< ROF length in BC per layer
32+
float strobeDelayPerLayer[kNLayers] = {0}; ///< strobe delay in ns per layer
33+
float strobeLengthContPerLayer[kNLayers] = {0}; ///< strobe length in ns per layer
34+
int roFrameBiasInBCPerLayer[kNLayers] = {0}; ///< ROF start bias in BC per layer
35+
int roFrameDelayInBCPerLayer[kNLayers] = {0}; ///< extra ROF delay in BC per layer
36+
37+
int getROFLengthInBC(int layer) const
38+
{
39+
if (roFrameLengthInBCPerLayer[layer] > 0) {
40+
return roFrameLengthInBCPerLayer[layer];
41+
} else {
42+
return o2::constants::lhc::LHCMaxBunches / 198;
43+
}
44+
}
45+
float getStrobeDelay(int layer) const { return strobeDelayPerLayer[layer]; }
46+
float getStrobeLengthCont(int layer) const { return strobeLengthContPerLayer[layer]; }
47+
int getROFBiasInBC(int layer) const { return roFrameBiasInBCPerLayer[layer]; }
48+
int getROFDelayInBC(int layer) const { return roFrameDelayInBCPerLayer[layer]; }
3049

3150
O2ParamDef(AlmiraParam, "TRKAlmiraParam");
3251
};

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
8989
int getSubDetID(int index) const;
9090
int getPetalCase(int index) const;
9191
int getDisk(int index) const;
92-
int getLayer(int index) const;
92+
int getLayer(int index) const; ///< local layer index within the sub-detector (0-based per VD/MLOT)
93+
int getLayerTRK(int index) const; ///< global layer index across the full TRK (VD layers 0..nVD-1, MLOT layers nVD..nTotal-1)
9394
int getStave(int index) const;
9495
int getHalfStave(int index) const;
9596
int getModule(int index) const;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ constexpr int nCols{static_cast<int>(length / chip::pitchZ)};
100100

101101
namespace ML
102102
{
103+
constexpr int nLayers{5}; // number of layers in the ML
103104
constexpr double width{constants::moduleMLOT::width * 1}; // width of the stave
104105
// constexpr double length{constants::moduleMLOT::length * 10}; // length of the stave
105106
constexpr double length{124 * cm}; // length of the stave, hardcoded to fit the implemented geometry
@@ -117,6 +118,7 @@ constexpr double length{258 * cm}; // len
117118
constexpr int nRows{static_cast<int>(width / moduleMLOT::chip::pitchX)}; // number of rows in the halfstave
118119
constexpr int nCols{static_cast<int>(length / moduleMLOT::chip::pitchZ)}; // number of columns in the halfstave
119120
} // namespace halfstave
121+
constexpr int nLayers{3}; // number of layers in the OT
120122
constexpr double width{halfstave::width * 2}; // width of the stave
121123
constexpr double length{halfstave::length}; // length of the stave
122124
constexpr int nRows{static_cast<int>(width / moduleMLOT::chip::pitchX)}; // number of rows in the stave

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <TRKBase/GeometryTGeo.h>
1313
#include <TGeoManager.h>
1414
#include "TRKBase/SegmentationChip.h"
15+
#include "TRKBase/Specs.h"
1516
#include <TMath.h>
1617

1718
#include <limits>
@@ -64,7 +65,7 @@ GeometryTGeo::GeometryTGeo(bool build, int loadTrans) : DetMatrixCache(detectors
6465
void GeometryTGeo::Build(int loadTrans)
6566
{
6667
///// current geometry organization:
67-
///// total elements = x staves (*2 half staves if staggered geometry) * 8 layers ML+OT + 4 petal cases * (3 layers + 6 disks)
68+
///// total elements = x staves (*2 half staves if staggered geometry) * ML+OT layers + 4 petal cases * (3 layers + 6 disks)
6869
///// indexing from 0 to 35: VD petals -> layers -> disks
6970
///// indexing from 36 to y: MLOT staves
7071

@@ -203,6 +204,15 @@ int GeometryTGeo::getLayer(int index) const
203204
return -1; /// -1 if not found
204205
}
205206
//__________________________________________________________________________
207+
int GeometryTGeo::getLayerTRK(int index) const
208+
{
209+
if (getDisk(index) != -1) {
210+
return -1; /// disks do not have a global layer index
211+
}
212+
int subDetID = getSubDetID(index);
213+
return subDetID * o2::trk::constants::VD::petal::nLayers + getLayer(index); // MLOT: offset by number of VD layers
214+
}
215+
//__________________________________________________________________________
206216
int GeometryTGeo::getStave(int index) const
207217
{
208218
int subDetID = getSubDetID(index);
@@ -1121,7 +1131,7 @@ void GeometryTGeo::Print(Option_t*) const
11211131
std::cout << "Detector ID: " << sInstance.get()->getDetID() << std::endl;
11221132

11231133
LOGF(info, "Summary of GeometryTGeo: %s", getName());
1124-
LOGF(info, "Number of layers ML + OL: %d", mNumberOfLayersMLOT);
1134+
LOGF(info, "Number of layers ML + OT: %d", mNumberOfLayersMLOT);
11251135
LOGF(info, "Number of active parts VD: %d", mNumberOfActivePartsVD);
11261136
LOGF(info, "Number of layers VD: %d", mNumberOfLayersVD);
11271137
LOGF(info, "Number of petals VD: %d", mNumberOfPetalsVD);
@@ -1133,7 +1143,7 @@ void GeometryTGeo::Print(Option_t*) const
11331143
LOGF(info, "Number of staves and half staves per layer MLOT: ");
11341144
for (int i = 0; i < mNumberOfLayersMLOT; i++) {
11351145
std::string mlot = "";
1136-
mlot = (i < 4) ? "ML" : "OT";
1146+
mlot = (i < constants::ML::nLayers) ? "ML" : "OT";
11371147
LOGF(info, "Layer: %d, %s, %d staves, %d half staves per stave", i, mlot.c_str(), mNumberOfStaves[i], mNumberOfHalfStaves[i]);
11381148
}
11391149
LOGF(info, "Number of modules per stave (half stave) in each ML(OT) layer: ");

Detectors/Upgrades/ALICE3/TRK/macros/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ o2_add_test_root_macro(CheckBandwidth.C
2121
O2::Steer
2222
LABELS trk COMPILE_ONLY)
2323

24-
o2_add_test_root_macro(CheckDigits.C
24+
o2_add_test_root_macro(CheckDigitsTRK.C
2525
PUBLIC_LINK_LIBRARIES O2::ITSMFTBase
2626
O2::ITSMFTSimulation
2727
O2::TRKBase

0 commit comments

Comments
 (0)