Skip to content

Commit 3b100c5

Browse files
committed
ITS3: digitizer offset for Alpide resp.
Signed-off-by: Felix Schlepper <[email protected]>
1 parent bf496ea commit 3b100c5

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <numeric>
2727

2828
using o2::itsmft::Hit;
29-
using Segmentation = o2::itsmft::SegmentationAlpide;
29+
using SegmentationAlpide = o2::itsmft::SegmentationAlpide;
3030
using o2::itsmft::AlpideRespSimMat;
3131
using o2::itsmft::PreDigit;
3232

@@ -64,14 +64,14 @@ void Digitizer::init()
6464
if (const auto& func = ITS3Params::Instance().chipResponseFunction; func == "Alpide") {
6565
constexpr const char* responseFile = "$(O2_ROOT)/share/Detectors/ITSMFT/data/AlpideResponseData/AlpideResponseData.root";
6666
loadSetResponseFunc("Alpide", responseFile, "response0", responseFile, "response1");
67-
mSimRespIBShift = mSimRespIB->getDepthMax() - SegmentationMosaix::mSensorLayerThickness / 2.f;
68-
mSimRespOBShift = mSimRespOB->getDepthMax() - Segmentation::SensorLayerThickness / 2.f;
67+
mSimRespIBShift = mSimRespIB->getDepthMax() - SegmentationMosaix::mSensorLayerThickness / 2.f + 10.e-4f; // TODO why this offset?
68+
mSimRespOBShift = mSimRespOB->getDepthMax() - SegmentationAlpide::SensorLayerThickness / 2.f;
6969
} else if (func == "APTS") {
7070
constexpr const char* responseFileIB = "$(O2_ROOT)/share/Detectors/Upgrades/ITS3/data/ITS3ChipResponseData/APTSResponseData.root";
7171
constexpr const char* responseFileOB = "$(O2_ROOT)/share/Detectors/ITSMFT/data/AlpideResponseData/AlpideResponseData.root";
7272
loadSetResponseFunc("APTS", responseFileIB, "response1", responseFileOB, "response1");
7373
mSimRespIBShift = mSimRespIB->getDepthMax() - 10.e-4f;
74-
mSimRespOBShift = mSimRespOB->getDepthMax() - Segmentation::SensorLayerThickness / 2.f;
74+
mSimRespOBShift = mSimRespOB->getDepthMax() - SegmentationAlpide::SensorLayerThickness / 2.f;
7575
mSimRespIBScaleX = 0.5 * constants::pixelarray::pixels::apts::pitchX / SegmentationMosaix::mPitchRow;
7676
mSimRespIBScaleZ = 0.5 * constants::pixelarray::pixels::apts::pitchZ / SegmentationMosaix::mPitchCol;
7777
} else {
@@ -299,14 +299,14 @@ void Digitizer::processHit(const o2::itsmft::Hit& hit, uint32_t& maxFr, int evID
299299
}
300300
} else {
301301
// get entrance pixel row and col
302-
while (!Segmentation::localToDetector(xyzLocS.X(), xyzLocS.Z(), rowS, colS)) { // guard-ring ?
302+
while (!SegmentationAlpide::localToDetector(xyzLocS.X(), xyzLocS.Z(), rowS, colS)) { // guard-ring ?
303303
if (++nSkip >= nSteps) {
304304
return; // did not enter to sensitive matrix
305305
}
306306
xyzLocS += step;
307307
}
308308
// get exit pixel row and col
309-
while (!Segmentation::localToDetector(xyzLocE.X(), xyzLocE.Z(), rowE, colE)) { // guard-ring ?
309+
while (!SegmentationAlpide::localToDetector(xyzLocE.X(), xyzLocE.Z(), rowE, colE)) { // guard-ring ?
310310
if (++nSkip >= nSteps) {
311311
return; // did not enter to sensitive matrix
312312
}
@@ -327,8 +327,8 @@ void Digitizer::processHit(const o2::itsmft::Hit& hit, uint32_t& maxFr, int evID
327327
rowS = 0;
328328
}
329329

330-
const int maxNrows{innerBarrel ? SegmentationMosaix::mNRows : Segmentation::NRows};
331-
const int maxNcols{innerBarrel ? SegmentationMosaix::mNCols : Segmentation::NCols};
330+
const int maxNrows{innerBarrel ? SegmentationMosaix::mNRows : SegmentationAlpide::NRows};
331+
const int maxNcols{innerBarrel ? SegmentationMosaix::mNCols : SegmentationAlpide::NCols};
332332
if (rowE >= maxNrows) {
333333
rowE = maxNrows - 1;
334334
}
@@ -364,14 +364,14 @@ void Digitizer::processHit(const o2::itsmft::Hit& hit, uint32_t& maxFr, int evID
364364
if (innerBarrel) {
365365
mIBSegmentations[layer].localToDetector(xyzLocS.X(), xyzLocS.Z(), row, col);
366366
} else {
367-
Segmentation::localToDetector(xyzLocS.X(), xyzLocS.Z(), row, col);
367+
SegmentationAlpide::localToDetector(xyzLocS.X(), xyzLocS.Z(), row, col);
368368
}
369369
if (row != rowPrev || col != colPrev) { // update pixel and coordinates of its center
370370
if (innerBarrel) {
371371
if (!mIBSegmentations[layer].detectorToLocal(row, col, cRowPix, cColPix)) {
372372
continue;
373373
}
374-
} else if (!Segmentation::detectorToLocal(row, col, cRowPix, cColPix)) {
374+
} else if (!SegmentationAlpide::detectorToLocal(row, col, cRowPix, cColPix)) {
375375
continue; // should not happen
376376
}
377377
rowPrev = row;
@@ -386,8 +386,8 @@ void Digitizer::processHit(const o2::itsmft::Hit& hit, uint32_t& maxFr, int evID
386386
colMax = 0.5 * SegmentationMosaix::mPitchCol;
387387
rspmat = mSimRespIB->getResponse(mSimRespIBScaleX * (xyzLocS.X() - cRowPix), mSimRespIBScaleZ * (xyzLocS.Z() - cColPix), xyzLocS.Y(), flipRow, flipCol, rowMax, colMax);
388388
} else {
389-
rowMax = 0.5 * Segmentation::PitchRow;
390-
colMax = 0.5 * Segmentation::PitchCol;
389+
rowMax = 0.5 * SegmentationAlpide::PitchRow;
390+
colMax = 0.5 * SegmentationAlpide::PitchCol;
391391
rspmat = mSimRespOB->getResponse(xyzLocS.X() - cRowPix, xyzLocS.Z() - cColPix, xyzLocS.Y(), flipRow, flipCol, rowMax, colMax);
392392
}
393393

0 commit comments

Comments
 (0)