Skip to content

Commit 2148157

Browse files
maciaccoGiorgioAlbertoLucia
authored andcommitted
fix issue in chip configuration (complex types cannot be used in configurables) + fix dictionary creation
1 parent dc9d987 commit 2148157

4 files changed

Lines changed: 52 additions & 7 deletions

File tree

Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "CommonUtils/ConfigurableParam.h"
1616
#include "CommonUtils/ConfigurableParamHelper.h"
1717

18+
1819
namespace o2
1920
{
2021
namespace iotof
@@ -38,6 +39,39 @@ struct ChipSpecifics {
3839
float SensorSizeRows() const { return ActiveMatrixSizeRows() + PassiveEdgeTop + PassiveEdgeReadOut; }
3940
};
4041

42+
struct ITOFChipSpecifics : ChipSpecifics {
43+
ITOFChipSpecifics()
44+
{
45+
NCols = 258;
46+
NRows = 271;
47+
PitchCol = 250.00e-4;
48+
PitchRow = 100.00e-4;
49+
SensorLayerThicknessEff = 50.e-4;
50+
SensorLayerThickness = 50.e-4;
51+
}
52+
};
53+
54+
struct OTOFChipSpecifics : ChipSpecifics {
55+
OTOFChipSpecifics()
56+
{
57+
NCols = 251;
58+
NRows = 487;
59+
PitchCol = 250.00e-4;
60+
PitchRow = 100.00e-4;
61+
PassiveEdgeSide = 106.48e-4;
62+
SensorLayerThicknessEff = 50.e-4;
63+
SensorLayerThickness = 50.e-4;
64+
}
65+
};
66+
67+
struct ITOFChipSpecificParam : public o2::conf::ConfigurableParamPromoter<ITOFChipSpecificParam, ITOFChipSpecifics> {
68+
O2ParamDef(ITOFChipSpecificParam, "ITOFChipSpecific");
69+
};
70+
71+
struct OTOFChipSpecificParam : public o2::conf::ConfigurableParamPromoter<OTOFChipSpecificParam, OTOFChipSpecifics> {
72+
O2ParamDef(OTOFChipSpecificParam, "OTOFChipSpecific");
73+
};
74+
4175
struct IOTOFBaseParam : public o2::conf::ConfigurableParamHelper<IOTOFBaseParam> {
4276
bool enableInnerTOF = true; // Enable Inner TOF layer
4377
bool enableOuterTOF = true; // Enable Outer TOF layer
@@ -49,9 +83,6 @@ struct IOTOFBaseParam : public o2::conf::ConfigurableParamHelper<IOTOFBaseParam>
4983
float x2x0 = 0.02f; // thickness expressed in radiation length, for all layers for the moment
5084
float sensorThickness = 0.0050f; // thickness of the sensor in cm, for all layers for the moment, the default is set to 50 microns
5185

52-
ChipSpecifics iTofChipSpecifics{258, 271, 250.00e-4, 100.00e-4, 0.00f, 0.00e-4, 0.00e-4, 50.e-4, 50.e-4};
53-
ChipSpecifics oTofChipSpecifics{251, 487, 250.00e-4, 100.00e-4, 0.00f, 0.00e-4, 106.48e-4, 50.e-4, 50.e-4};
54-
5586
O2ParamDef(IOTOFBaseParam, "IOTOFBase");
5687
};
5788

Detectors/Upgrades/ALICE3/IOTOF/base/src/IOTOFBaseParam.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@
1111

1212
#include "IOTOFBase/IOTOFBaseParam.h"
1313

14-
O2ParamImpl(o2::iotof::IOTOFBaseParam);
14+
O2ParamImpl(o2::iotof::IOTOFBaseParam);
15+
O2ParamImpl(o2::iotof::ITOFChipSpecificParam);
16+
O2ParamImpl(o2::iotof::OTOFChipSpecificParam);

Detectors/Upgrades/ALICE3/IOTOF/simulation/src/IOTOFSimulationLinkDef.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,15 @@
2222
#pragma link C++ class o2::iotof::Detector + ;
2323
#pragma link C++ class o2::base::DetImpl < o2::iotof::Detector> + ;
2424

25+
#pragma link C++ class o2::iotof::DPLDigitizerParam < o2::detectors::DetID::TF3 > + ;
26+
#pragma link C++ class o2::conf::ConfigurableParamHelper < o2::iotof::DPLDigitizerParam < o2::detectors::DetID::TF3>> + ;
27+
28+
#pragma link C++ class o2::iotof::ChipSpecifics + ;
29+
#pragma link C++ class o2::iotof::ITOFChipSpecifics + ;
30+
#pragma link C++ class o2::iotof::OTOFChipSpecifics + ;
31+
#pragma link C++ class o2::iotof::ITOFChipSpecificParam + ;
32+
#pragma link C++ class o2::conf::ConfigurableParamPromoter < o2::iotof::ITOFChipSpecificParam , o2::iotof::ITOFChipSpecifics > + ;
33+
#pragma link C++ class o2::iotof::OTOFChipSpecificParam + ;
34+
#pragma link C++ class o2::conf::ConfigurableParamPromoter < o2::iotof::OTOFChipSpecificParam , o2::iotof::OTOFChipSpecifics > + ;
35+
2536
#endif

Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Segmentation.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ Segmentation::Segmentation()
3737
if (sInstance) {
3838
printf("Invalid use of public constructor: o2::iotof::Segmentation instance exists\n");
3939
} else {
40-
auto& iotofPars = IOTOFBaseParam::Instance();
41-
const ChipSpecifics& mITofChipPars = iotofPars.iTofChipSpecifics;
42-
const ChipSpecifics& mOTofChipPars = iotofPars.oTofChipSpecifics;
40+
auto& itofPars = ITOFChipSpecificParam::Instance();
41+
auto& otofPars = OTOFChipSpecificParam::Instance();
42+
const ChipSpecifics mITofChipPars(itofPars.NCols, itofPars.NRows, itofPars.PitchCol, itofPars.PitchRow, itofPars.PassiveEdgeReadOut, itofPars.PassiveEdgeTop, itofPars.PassiveEdgeSide, itofPars.SensorLayerThicknessEff, itofPars.SensorLayerThickness);
43+
const ChipSpecifics mOTofChipPars(otofPars.NCols, otofPars.NRows, otofPars.PitchCol, otofPars.PitchRow, otofPars.PassiveEdgeReadOut, otofPars.PassiveEdgeTop, otofPars.PassiveEdgeSide, otofPars.SensorLayerThicknessEff, otofPars.SensorLayerThickness);
4344

4445
configChip(mITofChipPars, 0 /* subDetectorID for iTOF */);
4546
configChip(mOTofChipPars, 1 /* subDetectorID for oTOF */);

0 commit comments

Comments
 (0)