@@ -135,7 +135,6 @@ void Digitizer::processHit(const o2::itsmft::Hit& hit, int evID, int srcID)
135135 double hitTime = hit.GetTime () * sec2ns; // convert to ns
136136 double eventTimeInBC = mEventTime .getTimeOffsetWrtBC (); // event time wrt bc
137137 double hitTimeWrtBC = hitTime + eventTimeInBC; // hit time wrt bc
138- double smearedTime = smearTime (hitTimeWrtBC);
139138
140139 // Create the digit with time information
141140 o2::MCCompLabel label (hit.GetTrackID (), evID, srcID, false );
@@ -168,6 +167,8 @@ void Digitizer::processHit(const o2::itsmft::Hit& hit, int evID, int srcID)
168167 const int nElectronsSampled = gRandom ->Poisson (electronsPerStep * nEleResp);
169168 // Noise can be added here if needed
170169
170+ double smearedTime = smearTime (hitTimeWrtBC);
171+
171172 registerDigits (chip, roFrameAbs, smearedTime, nROF,
172173 static_cast <uint16_t >(rowIS), static_cast <uint16_t >(colIS), nElectronsSampled, label);
173174 }
@@ -195,7 +196,6 @@ void Digitizer::stepping(const o2::itsmft::Hit& hit, float**& respMatrix, float*
195196 const auto & digitizerParams = o2::iotof::DPLDigitizerParam::Instance ();
196197 auto stepVector = (xyzPositionEnd - xyzPositionStart) / digitizerParams.nSimSteps ;
197198 xyzPositionStart = xyzPositionStart + stepVector * 0 .5f ; // center the start position in the middle of the step
198- xyzPositionEnd = xyzPositionEnd - stepVector * 0 .5f ; // center the end position in the middle of the step
199199
200200 rowStart = -1 ;
201201 colStart = -1 ;
0 commit comments