@@ -228,18 +228,21 @@ void Digitizer::processHit(const o2::itsmft::Hit& hit, uint32_t& maxFr, int evID
228228 int nSteps = mParams .getNSimSteps ();
229229 short detID{hit.GetDetectorID ()};
230230 const auto & matrix = mGeometry ->getMatrixL2G (detID); // <<<< ?????
231- bool innerBarrel{detID < mSuperSegmentations .size ()};
231+ bool innerBarrel{detID < mSuperSegmentations .size ()};
232232 float gap = 0.1 ; // FIXME: get this properly!
233233 auto startPos = hit.GetPosStart ();
234- float recenteredStartY = (startPos.Y () > 0 ) ? startPos.Y () - gap / 2 : startPos.Y () + gap / 2 ; // This is due to the gap between the ITS3 emispheres
235- float startPhi{std::atan2 (-recenteredStartY, -startPos.X ())};
234+ // LOGP(info, "StartPos: {} {} {}", startPos.X(), startPos.Y(), startPos.Z());
235+ float reShiftedStartY = (startPos.Y () > 0 ) ? startPos.Y () - gap / 2 : startPos.Y () + gap / 2 ; // This is due to the gap between the ITS3 emispheres
236+ float startPhi{std::atan2 (reShiftedStartY, startPos.X ())};
237+ LOGP (info, " X: {}, Y: {}, startPhi: {}" , startPos.X (), reShiftedStartY, startPhi);
236238 auto endPos = hit.GetPos ();
237- float recenteredEndY = (endPos.Y () > 0 ) ? endPos.Y () - gap / 2 : endPos.Y () + gap / 2 ; // This is due to the gap between the ITS3 emispheres
238- float endPhi{std::atan2 (-recenteredEndY, -endPos.X ())};
239+ float reShiftedEndY = (endPos.Y () > 0 ) ? endPos.Y () - gap / 2 : endPos.Y () + gap / 2 ; // This is due to the gap between the ITS3 emispheres
240+ float endPhi{std::atan2 (reShiftedEndY, endPos.X ())};
241+ LOGP (info, " X: {}, Y: {}, endPhi: {}" , endPos.X (), reShiftedEndY, endPhi);
239242 math_utils::Vector3D<float > xyzLocS, xyzLocE;
240243 if (innerBarrel) {
241- xyzLocS = {SegmentationSuperAlpide::Radii[detID] * startPhi, 0 .f , startPos.Z ()};
242- xyzLocE = {SegmentationSuperAlpide::Radii[detID] * endPhi, 0 .f , endPos.Z ()};
244+ xyzLocS = {SegmentationSuperAlpide::Radii[detID] * ( startPhi) , 0 .f , startPos.Z ()};
245+ xyzLocE = {SegmentationSuperAlpide::Radii[detID] * ( endPhi) , 0 .f , endPos.Z ()};
243246 } else {
244247 xyzLocS = matrix ^ (hit.GetPosStart ());
245248 xyzLocE = matrix ^ (hit.GetPos ());
@@ -250,7 +253,7 @@ void Digitizer::processHit(const o2::itsmft::Hit& hit, uint32_t& maxFr, int evID
250253 step *= nStepsInv; // position increment at each step
251254 // the electrons will be injected in the middle of each step
252255 math_utils::Vector3D<float > stepH (step * 0.5 );
253- xyzLocS += stepH; // Adjust start position to the middle of the first step
256+ xyzLocS += stepH; // Adjust start position to the middle of the first step
254257 xyzLocE -= stepH; // Adjust end position to the middle of the last step
255258
256259 int rowS = -1 , colS = -1 , rowE = -1 , colE = -1 , nSkip = 0 ;
@@ -269,6 +272,7 @@ void Digitizer::processHit(const o2::itsmft::Hit& hit, uint32_t& maxFr, int evID
269272 }
270273 xyzLocE -= step;
271274 }
275+ LOGP (info, " x: {}, z: {}, col: {}, row: {}, detID: {}" , xyzLocS.X (), xyzLocS.Z (), colS, rowS, detID);
272276 } else {
273277 // get entrance pixel row and col
274278 while (!Segmentation::localToDetector (xyzLocS.X (), xyzLocS.Z (), rowS, colS)) { // guard-ring ?
0 commit comments