Skip to content

Commit 8d2d373

Browse files
committed
ALICE3-TRK: fix digits distribution along columns by removing the rescaling of the silicon depth
1 parent 350c0c8 commit 8d2d373

File tree

1 file changed

+14
-29
lines changed

1 file changed

+14
-29
lines changed

Detectors/Upgrades/ALICE3/TRK/simulation/src/Digitizer.cxx

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -62,29 +62,29 @@ void Digitizer::init()
6262

6363
/// setting scale factors to adapt to the APTS response function (adjusting pitch and Y shift)
6464
// TODO: adjust Y shift when the geometry is improved
65-
LOG(debug) << " Depth max: " << mChipSimRespVD->getDepthMax();
66-
LOG(debug) << " Depth min: " << mChipSimRespVD->getDepthMin();
65+
LOG(info) << " Depth max VD: " << mChipSimRespVD->getDepthMax();
66+
LOG(info) << " Depth min VD: " << mChipSimRespVD->getDepthMin();
67+
68+
LOG(info) << " Depth max MLOT: " << mChipSimRespMLOT->getDepthMax();
69+
LOG(info) << " Depth min MLOT: " << mChipSimRespMLOT->getDepthMin();
6770

6871
float thicknessVD = 0.0095; // cm --- hardcoded based on geometry currently present
6972
float thicknessMLOT = 0.1; // cm --- hardcoded based on geometry currently present
7073

7174
mSimRespVDScaleX = o2::trk::constants::apts::pitchX / o2::trk::SegmentationChip::PitchRowVD;
7275
mSimRespVDScaleZ = o2::trk::constants::apts::pitchZ / o2::trk::SegmentationChip::PitchColVD;
73-
mSimRespVDScaleDepth = o2::trk::constants::apts::thickness / (thicknessVD); /// introducing this scaling factor because the silicon thickness for the moment is 1 mm -> rescale to 45 um which is the depth of the APTS response
74-
// mSimRespVDShift = mChipSimRespVD->getDepthMax() - thicknessVD * mSimRespVDScaleDepth / 2.f; // the shift should be done considering the rescaling done to adapt to the wrong silicon thickness. TODO: remove the scaling factor for the depth when the silicon thickness match the simulated response
75-
mSimRespVDShift = mChipSimRespVD->getDepthMax(); // the curved, rescaled, sensors have a width from 0 to -45. Must add 10 um (= max depth) to match the APTS response.
76+
mSimRespVDShift = -mChipSimRespVD->getDepthMax(); // the curved, rescaled, sensors have a width from 0 to -45. Must add 10 um (= max depth) to match the APTS response.
7677
mSimRespMLOTScaleX = o2::trk::constants::apts::pitchX / o2::trk::SegmentationChip::PitchRowMLOT;
7778
mSimRespMLOTScaleZ = o2::trk::constants::apts::pitchZ / o2::trk::SegmentationChip::PitchColMLOT;
78-
mSimRespMLOTScaleDepth = o2::trk::constants::apts::thickness / (thicknessMLOT); /// introducing this scaling factor because the silicon thickness for the moment is 1 mm -> rescale to 45 um which is the depth of the APTS response
79-
mSimRespMLOTShift = mChipSimRespMLOT->getDepthMax() - thicknessMLOT * mSimRespMLOTScaleDepth / 2.f; // the shift should be done considering the rescaling done to adapt to the wrong silicon thickness. TODO: remove the scaling factor for the depth when the silicon thickness match the simulated response
79+
mSimRespMLOTShift = mChipSimRespMLOT->getDepthMax() - thicknessMLOT / 2.f; // the shift should be done considering the rescaling done to adapt to the wrong silicon thickness. TODO: remove the scaling factor for the depth when the silicon thickness match the simulated response
8080
mSimRespOrientation = false;
8181

8282
// importing the parameters from DPLDigitizerParam.h
8383
auto& dOptTRK = DPLDigitizerParam<o2::detectors::DetID::TRK>::Instance();
8484

8585
LOGP(info, "TRK Digitizer is initialised.");
8686
mParams.print();
87-
LOGP(info, "VD shift = {} ; ML/OT shift = {} = {} - {}", mSimRespVDShift, mSimRespMLOTShift, mChipSimRespMLOT->getDepthMax(), thicknessMLOT * mSimRespMLOTScaleDepth / 2.f);
87+
LOGP(info, "VD shift = {} ; ML/OT shift = {} = {} - {}", mSimRespVDShift, mSimRespMLOTShift, mChipSimRespMLOT->getDepthMax(), thicknessMLOT / 2.f);
8888
LOGP(info, "VD pixel scale on x = {} ; z = {}", mSimRespVDScaleX, mSimRespVDScaleZ);
8989
LOGP(info, "ML/OT pixel scale on x = {} ; z = {}", mSimRespMLOTScaleX, mSimRespMLOTScaleZ);
9090
LOGP(info, "Response orientation: {}", mSimRespOrientation ? "flipped" : "normal");
@@ -115,8 +115,8 @@ void Digitizer::process(const std::vector<Hit>* hits, int evID, int srcID)
115115
<< " cont.mode: " << isContinuous()
116116
<< " Min/Max ROFrames " << mROFrameMin << "/" << mROFrameMax;
117117

118-
std::cout << "Printing segmentation info: " << std::endl;
119-
SegmentationChip::Print();
118+
// std::cout << "Printing segmentation info: " << std::endl;
119+
// SegmentationChip::Print();
120120

121121
// // is there something to flush ?
122122
if (mNewROFrame > mROFrameMin) {
@@ -335,13 +335,9 @@ void Digitizer::processHit(const o2::itsmft::Hit& hit, uint32_t& maxFr, int evID
335335

336336
//// adapting the depth (Y) of the chip to the APTS response maximum depth
337337
LOG(debug) << "local original: startPos = " << xyzLocS << ", endPos = " << xyzLocE << std::endl;
338-
if (subDetID == 0) {
339-
xyzLocS.SetY(xyzLocS.Y() * mSimRespVDScaleDepth);
340-
xyzLocE.SetY(xyzLocE.Y() * mSimRespVDScaleDepth);
341-
} else {
342-
xyzLocS.SetY(xyzLocS.Y() * mSimRespMLOTScaleDepth);
343-
xyzLocE.SetY(xyzLocE.Y() * mSimRespMLOTScaleDepth);
344-
}
338+
xyzLocS.SetY(xyzLocS.Y());
339+
xyzLocE.SetY(xyzLocE.Y());
340+
345341
LOG(debug) << "rescaled Y: startPos = " << xyzLocS << ", endPos = " << xyzLocE << std::endl;
346342

347343
math_utils::Vector3D<float> step(xyzLocE);
@@ -449,17 +445,6 @@ void Digitizer::processHit(const o2::itsmft::Hit& hit, uint32_t& maxFr, int evID
449445
rspmat = resp->getResponse(mSimRespMLOTScaleX * (xyzLocS.X() - cRowPix), mSimRespMLOTScaleZ * (xyzLocS.Z() - cColPix), xyzLocS.Y(), flipRow, flipCol, rowMax, colMax);
450446
}
451447

452-
float tempPitchX = 0, tempPitchZ = 0;
453-
if (subDetID == 0) {
454-
tempPitchX = Segmentation::PitchRowVD;
455-
tempPitchZ = Segmentation::PitchColVD;
456-
} else {
457-
tempPitchX = Segmentation::PitchRowMLOT;
458-
tempPitchZ = Segmentation::PitchColMLOT;
459-
}
460-
LOG(debug) << "X and Z inside pixel at start = " << (xyzLocS.X() - cRowPix) << " , " << (xyzLocS.Z() - cColPix) << ", rescaled: " << mSimRespMLOTScaleX * (xyzLocS.X() - cRowPix) << " , " << mSimRespMLOTScaleZ * (xyzLocS.Z() - cColPix);
461-
LOG(debug) << "Hit inside pitch? X: " << ((xyzLocS.X() - cRowPix) < tempPitchX) << " Z: " << ((xyzLocS.Z() - cColPix) < tempPitchZ);
462-
463448
xyzLocS += step;
464449

465450
if (rspmat == nullptr) {
@@ -479,7 +464,7 @@ void Digitizer::processHit(const o2::itsmft::Hit& hit, uint32_t& maxFr, int evID
479464
if (colDest < 0 || colDest >= colSpan) {
480465
continue;
481466
}
482-
respMatrix[rowDest][colDest] += rspmat->getValue(irow, icol, mSimRespOrientation ? !flipRow : flipRow, flipCol);
467+
respMatrix[rowDest][colDest] += rspmat->getValue(irow, icol, mSimRespOrientation ? !flipRow : flipRow, !flipCol);
483468
}
484469
}
485470
}

0 commit comments

Comments
 (0)