|
19 | 19 | #include "IOTOFSimulation/Digitizer.h" |
20 | 20 | #include "IOTOFSimulation/DPLDigitizerParam.h" |
21 | 21 | #include "DetectorsRaw/HBFUtils.h" |
| 22 | +#include "CommonConstants/PhysicsConstants.h" |
22 | 23 |
|
23 | 24 | #include <TCollection.h> |
24 | 25 | #include <TFile.h> |
@@ -135,7 +136,7 @@ void Digitizer::processHit(const o2::itsmft::Hit& hit, int evID, int srcID) |
135 | 136 | double hitTime = hit.GetTime() * sec2ns; // convert to ns |
136 | 137 | double eventTimeInBC = mEventTime.getTimeOffsetWrtBC(); // event time wrt bc |
137 | 138 | double hitTimeWrtBC = hitTime + eventTimeInBC; // hit time wrt bc |
138 | | - double smearedTime = smearTime(hitTimeWrtBC); |
| 139 | + // double smearedTime = smearTime(hitTimeWrtBC); |
139 | 140 |
|
140 | 141 | // Create the digit with time information |
141 | 142 | o2::MCCompLabel label(hit.GetTrackID(), evID, srcID, false); |
@@ -168,6 +169,8 @@ void Digitizer::processHit(const o2::itsmft::Hit& hit, int evID, int srcID) |
168 | 169 | const int nElectronsSampled = gRandom->Poisson(electronsPerStep * nEleResp); |
169 | 170 | // Noise can be added here if needed |
170 | 171 |
|
| 172 | + double smearedTime = smearTime(hitTimeWrtBC); |
| 173 | + |
171 | 174 | registerDigits(chip, roFrameAbs, smearedTime, nROF, |
172 | 175 | static_cast<uint16_t>(rowIS), static_cast<uint16_t>(colIS), nElectronsSampled, label); |
173 | 176 | } |
@@ -195,7 +198,6 @@ void Digitizer::stepping(const o2::itsmft::Hit& hit, float**& respMatrix, float* |
195 | 198 | const auto& digitizerParams = o2::iotof::DPLDigitizerParam::Instance(); |
196 | 199 | auto stepVector = (xyzPositionEnd - xyzPositionStart) / digitizerParams.nSimSteps; |
197 | 200 | 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 |
199 | 201 |
|
200 | 202 | rowStart = -1; |
201 | 203 | colStart = -1; |
|
0 commit comments