Skip to content

Commit fe0f342

Browse files
committed
Address reviewer comments
1 parent ef99c60 commit fe0f342

File tree

9 files changed

+43
-71
lines changed

9 files changed

+43
-71
lines changed

Detectors/ITSMFT/common/simulation/include/ITSMFTSimulation/AlpideSimResponse.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class AlpideRespSimMat
6969
private:
7070
std::array<float, MatSize> data;
7171

72-
ClassDefNV(AlpideRespSimMat, 1);
72+
ClassDef(AlpideRespSimMat, 2);
7373
};
7474

7575
/*

Detectors/Upgrades/ITS3/base/include/ITS3Base/SegmentationMosaix.h

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#ifndef ALICEO2_ITS3_SEGMENTATIONMOSAIX_H_
1818
#define ALICEO2_ITS3_SEGMENTATIONMOSAIX_H_
1919

20-
#include <type_traits>
21-
2220
#include "MathUtils/Cartesian.h"
2321
#include "ITS3Base/SpecsV2.h"
2422

@@ -78,7 +76,6 @@ class SegmentationMosaix
7876
static constexpr float PitchCol{constants::pixelarray::pixels::mosaix::pitchZ};
7977
static constexpr float PitchRow{constants::pixelarray::pixels::mosaix::pitchX};
8078
static constexpr float SensorLayerThickness{constants::totalThickness};
81-
static constexpr float NominalYShift{0.0f};
8279

8380
/// Transformation from the curved surface to a flat surface.
8481
/// Additionally a shift in the flat coordinates must be applied because
@@ -104,7 +101,7 @@ class SegmentationMosaix
104101
// the y position is in the silicon volume however we need the chip volume (silicon+metalstack)
105102
// this is accounted by a y shift
106103
xFlat = WidthH - mRadius * phi;
107-
yFlat = dist - mRadius + NominalYShift;
104+
yFlat = dist - mRadius;
108105
}
109106

110107
/// Transformation from the flat surface to a curved surface
@@ -121,7 +118,7 @@ class SegmentationMosaix
121118
{
122119
// MUST align the flat surface with the curved surface with the original pixel array is on and account for metal
123120
// stack
124-
float dist = yFlat - NominalYShift + mRadius;
121+
float dist = yFlat + mRadius;
125122
float phi = (WidthH - xFlat) / mRadius;
126123
// the y position is in the chip volume however we need the silicon volume
127124
// this is accounted by a -y shift
@@ -170,8 +167,7 @@ class SegmentationMosaix
170167
/// center of the sensitive volume.
171168
/// If iRow and or iCol is outside of the segmentation range a value of -0.5*Dx()
172169
/// or -0.5*Dz() is returned.
173-
template <typename T>
174-
constexpr bool detectorToLocal(T const row, T const col, float& xRow, float& zCol) const noexcept
170+
bool detectorToLocal(float const row, float const col, float& xRow, float& zCol) const noexcept
175171
{
176172
if (!isValidDet(row, col)) {
177173
return false;
@@ -182,30 +178,27 @@ class SegmentationMosaix
182178

183179
// Same as detectorToLocal w.o. checks.
184180
// We position ourself in the middle of the pixel.
185-
template <typename T>
186-
constexpr void detectorToLocalUnchecked(T const row, T const col, float& xRow, float& zCol) const noexcept
181+
void detectorToLocalUnchecked(float const row, float const col, float& xRow, float& zCol) const noexcept
187182
{
188-
xRow = -(static_cast<float>(row) + 0.5f) * PitchRow + WidthH;
189-
zCol = (static_cast<float>(col) + 0.5f) * PitchCol - LengthH;
183+
xRow = -(row + 0.5f) * PitchRow + WidthH;
184+
zCol = (col + 0.5f) * PitchCol - LengthH;
190185
}
191186

192-
template <typename T>
193-
constexpr bool detectorToLocal(T const row, T const col, math_utils::Point3D<float>& loc) const noexcept
187+
bool detectorToLocal(float const row, float const col, math_utils::Point3D<float>& loc) const noexcept
194188
{
195189
float xRow{0.}, zCol{0.};
196190
if (!detectorToLocal(row, col, xRow, zCol)) {
197191
return false;
198192
}
199-
loc.SetCoordinates(xRow, NominalYShift, zCol);
193+
loc.SetCoordinates(xRow, 0.0f, zCol);
200194
return true;
201195
}
202196

203-
template <typename T>
204-
constexpr void detectorToLocalUnchecked(T const row, T const col, math_utils::Point3D<float>& loc) const noexcept
197+
void detectorToLocalUnchecked(float const row, float const col, math_utils::Point3D<float>& loc) const noexcept
205198
{
206199
float xRow{0.}, zCol{0.};
207200
detectorToLocalUnchecked(row, col, xRow, zCol);
208-
loc.SetCoordinates(xRow, NominalYShift, zCol);
201+
loc.SetCoordinates(xRow, 0.0f, zCol);
209202
}
210203

211204
private:

Detectors/Upgrades/ITS3/base/include/ITS3Base/SpecsV2.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ constexpr std::array<double, nLayers> radii{19.0006 * mm, 25.228 * mm, 31.4554 *
134134
constexpr std::array<double, nLayers> radiiInner{radii[0] - silicon::thicknessIn, radii[1] - silicon::thicknessIn, radii[2] - silicon::thicknessIn}; // inner silicon radius
135135
constexpr std::array<double, nLayers> radiiOuter{radii[0] + silicon::thicknessOut, radii[1] + silicon::thicknessOut, radii[2] + silicon::thicknessOut}; // outer silicon radius
136136
constexpr std::array<double, nLayers> radiiMiddle{(radiiInner[0] + radiiOuter[0]) / 2., (radiiInner[1] + radiiOuter[1]) / 2., (radiiInner[2] + radiiOuter[2]) / 2.}; // middle silicon radius
137-
constexpr double nominalYShift{-metalstack::thickness / 2.}; // shift to position in silicion volume to the chip volume (silicon+metalstack)
138137

139138
// extra information of pixels and their response functions
140139
namespace pixelarray::pixels

Detectors/Upgrades/ITS3/simulation/include/ITS3Simulation/ChipDigitsContainer.h

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,9 @@
1919
#include "ITS3Simulation/DigiParams.h" // ITS3-specific DigiParams interface
2020
#include <TRandom.h>
2121

22-
namespace o2
23-
{
24-
namespace its3
22+
namespace o2::its3
2523
{
2624

27-
// IB uses the Alpide segmentation,
28-
// OB uses the Mosaix segmentation.
29-
using SegmentationIB = SegmentationMosaix;
30-
using SegmentationOB = o2::itsmft::SegmentationAlpide;
3125
class ChipDigitsContainer : public o2::itsmft::ChipDigitsContainer
3226
{
3327
private:
@@ -38,6 +32,9 @@ class ChipDigitsContainer : public o2::itsmft::ChipDigitsContainer
3832
public:
3933
explicit ChipDigitsContainer(UShort_t idx = 0);
4034

35+
using SegmentationIB = SegmentationMosaix;
36+
using SegmentationOB = o2::itsmft::SegmentationAlpide;
37+
4138
/// Returns whether the chip is in the inner barrel (IB)
4239
void setChipIndex(UShort_t idx)
4340
{
@@ -57,7 +54,6 @@ class ChipDigitsContainer : public o2::itsmft::ChipDigitsContainer
5754
ClassDefNV(ChipDigitsContainer, 1);
5855
};
5956

60-
} // namespace its3
61-
} // namespace o2
57+
} // namespace o2::its3
6258

6359
#endif // ALICEO2_ITS3_CHIPDIGITSCONTAINER_

Detectors/Upgrades/ITS3/simulation/include/ITS3Simulation/ChipSimResponse.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class ChipSimResponse : public o2::itsmft::AlpideSimResponse
3232
private:
3333
float mRespCentreDep = 0.f;
3434

35-
ClassDefNV(ChipSimResponse, 1);
35+
ClassDef(ChipSimResponse, 1);
3636
};
3737

3838
} // namespace its3

Detectors/Upgrades/ITS3/simulation/include/ITS3Simulation/DigiParams.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,18 @@ class DigiParams final : public o2::itsmft::DigiParams
4848
const o2::itsmft::AlpideSimResponse* getOBSimResponse() const { return mOBSimResponse; }
4949
void setOBSimResponse(const o2::itsmft::AlpideSimResponse* response) { mOBSimResponse = response; }
5050

51-
const o2::itsmft::AlpideSimResponse* getIBSimResponse() const { return mIBSimResponse; }
52-
void setIBSimResponse(const o2::itsmft::AlpideSimResponse* response);
51+
o2::its3::ChipSimResponse* getIBSimResponse() const { return mIBSimResponse; }
52+
void setIBSimResponse(o2::its3::ChipSimResponse* response);
5353

5454
bool hasResponseFunctions() const { return mIBSimResponse != nullptr && mOBSimResponse != nullptr; }
5555

5656
void print() const final;
5757

5858
private:
5959
const o2::itsmft::AlpideSimResponse* mOBSimResponse = nullptr; //!< pointer to external response
60-
const o2::its3::ChipSimResponse* mIBSimResponse = nullptr; //!< pointer to external response
60+
o2::its3::ChipSimResponse* mIBSimResponse = nullptr; //!< pointer to external response
6161

62-
ClassDefNV(DigiParams, 1);
62+
ClassDef(DigiParams, 1);
6363
};
6464

6565
} // namespace o2::its3

Detectors/Upgrades/ITS3/simulation/include/ITS3Simulation/ITS3DPLDigitizerParam.h

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

18-
namespace o2
19-
{
20-
namespace its3
18+
namespace o2::its3
2119
{
2220

2321
struct ITS3DPLDigitizerParam : public o2::conf::ConfigurableParamHelper<ITS3DPLDigitizerParam> {
@@ -29,7 +27,6 @@ struct ITS3DPLDigitizerParam : public o2::conf::ConfigurableParamHelper<ITS3DPLD
2927
O2ParamDef(ITS3DPLDigitizerParam, "ITS3DPLDigitizerParam");
3028
};
3129

32-
} // namespace its3
33-
} // namespace o2
30+
} // namespace o2::its3
3431

3532
#endif

Detectors/Upgrades/ITS3/simulation/src/DigiParams.cxx

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#include "Framework/Logger.h"
1616
#include "ITS3Simulation/DigiParams.h"
17+
#include <cstdio>
1718

1819
ClassImp(o2::its3::DigiParams);
1920

@@ -50,36 +51,29 @@ void DigiParams::setIBChargeThreshold(int v, float frac2Account)
5051
void DigiParams::print() const
5152
{
5253
// print settings
53-
LOGF(info, "ITS3 DigiParams settings:");
54-
LOGF(info, "Continuous readout : %s", isContinuous() ? "ON" : "OFF");
55-
LOGF(info, "Readout Frame Length(ns) : %f", getROFrameLength());
56-
LOGF(info, "Strobe delay (ns) : %f", getStrobeDelay());
57-
LOGF(info, "Strobe length (ns) : %f", getStrobeLength());
58-
LOGF(info, "IB Threshold (N electrons) : %d", getIBChargeThreshold());
59-
LOGF(info, "OB Threshold (N electrons) : %d", getChargeThreshold());
60-
LOGF(info, "Min N electrons to account for IB : %d", getIBMinChargeToAccount());
61-
LOGF(info, "Min N electrons to account for OB : %d", getMinChargeToAccount());
62-
LOGF(info, "Number of charge sharing steps of IB : %d", getIBNSimSteps());
63-
LOGF(info, "Number of charge sharing steps of OB : %d", getNSimSteps());
64-
LOGF(info, "ELoss to N electrons factor : %e", getEnergyToNElectrons());
65-
LOGF(info, "Noise level per pixel of IB : %e", getIBNoisePerPixel());
66-
LOGF(info, "Noise level per pixel of OB : %e", getNoisePerPixel());
67-
LOGF(info, "Charge time-response:\n");
54+
printf("ITS3 DigiParams settings:\n");
55+
printf("Continuous readout : %s\n", isContinuous() ? "ON" : "OFF");
56+
printf("Readout Frame Length(ns) : %f\n", getROFrameLength());
57+
printf("Strobe delay (ns) : %f\n", getStrobeDelay());
58+
printf("Strobe length (ns) : %f\n", getStrobeLength());
59+
printf("IB Threshold (N electrons) : %d\n", getIBChargeThreshold());
60+
printf("OB Threshold (N electrons) : %d\n", getChargeThreshold());
61+
printf("Min N electrons to account for IB : %d\n", getIBMinChargeToAccount());
62+
printf("Min N electrons to account for OB : %d\n", getMinChargeToAccount());
63+
printf("Number of charge sharing steps of IB : %d\n", getIBNSimSteps());
64+
printf("Number of charge sharing steps of OB : %d\n", getNSimSteps());
65+
printf("ELoss to N electrons factor : %e\n", getEnergyToNElectrons());
66+
printf("Noise level per pixel of IB : %e\n", getIBNoisePerPixel());
67+
printf("Noise level per pixel of OB : %e\n", getNoisePerPixel());
68+
printf("Charge time-response:\n");
6869
getSignalShape().print();
6970
}
7071

71-
void DigiParams::setIBSimResponse(const o2::itsmft::AlpideSimResponse* response)
72+
void DigiParams::setIBSimResponse(o2::its3::ChipSimResponse* response)
7273
{
73-
// This method is compatible with ChipSimResponse and will automatically handle center computation.
74-
auto chipResp = static_cast<const o2::its3::ChipSimResponse*>(response);
75-
if (chipResp) {
76-
mIBSimResponse = chipResp;
77-
if (mIBSimResponse->getRespCentreDep() == 0.f) {
78-
const_cast<o2::its3::ChipSimResponse*>(mIBSimResponse)->computeCentreFromData();
79-
}
80-
} else {
81-
LOG(error) << "Provided response is not of type ChipSimResponse. Cannot proceed.";
82-
return;
74+
mIBSimResponse = response;
75+
if (mIBSimResponse) {
76+
mIBSimResponse->computeCentreFromData();
8377
}
8478
}
8579

Detectors/Upgrades/ITS3/simulation/src/ITS3DPLDigitizerParam.cxx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,4 @@
1111

1212
#include "ITS3Simulation/ITS3DPLDigitizerParam.h"
1313

14-
namespace o2
15-
{
16-
namespace its3
17-
{
18-
static auto& sDigitizerParamITS3 = o2::its3::ITS3DPLDigitizerParam::Instance();
19-
} // namespace its3
20-
} // namespace o2
2114
O2ParamImpl(o2::its3::ITS3DPLDigitizerParam)

0 commit comments

Comments
 (0)