diff --git a/SimTracker/SiPhase2Digitizer/plugins/Pixel3DDigitizerAlgorithm.cc b/SimTracker/SiPhase2Digitizer/plugins/Pixel3DDigitizerAlgorithm.cc index 9a1111b417610..f13eee18e58bc 100644 --- a/SimTracker/SiPhase2Digitizer/plugins/Pixel3DDigitizerAlgorithm.cc +++ b/SimTracker/SiPhase2Digitizer/plugins/Pixel3DDigitizerAlgorithm.cc @@ -94,7 +94,7 @@ void Pixel3DDigitizerAlgorithm::accumulateSimHits(std::vector::const_it LogDebug("Pixel3DDigitizerAlgorithm:: Geant4 hit info: ") << (*it).particleType() << " " << (*it).pabs() << " " << (*it).energyLoss() << " " << (*it).tof() << " " << (*it).trackId() << " " << (*it).processType() << " " << (*it).detUnitId() << (*it).entryPoint() << " " - << (*it).exitPoint(); + << (*it).exitPoint() << " Global index for PSimHit:" << simHitGlobalIndex; // Convert the simhit position into global to check if the simhit was // produced within a given time-window @@ -409,14 +409,16 @@ void Pixel3DDigitizerAlgorithm::induce_signal(const PSimHit& hit, MeasurementPoint rowcol(pt.position().x(), pt.position().y()); const int channel = topo.channel(topo.localPosition(rowcol)); + float corr_time = hit.tof() - pixdet->surface().toGlobal(hit.localPosition()).mag() * c_inv; if (makeDigiSimLinks_) { - the_signal[channel] += DigitizerUtility::Amplitude(pt.amplitude(), &hit, pt.amplitude(), hitIndex, tofBin); + the_signal[channel] += DigitizerUtility::Amplitude(pt.amplitude(), &hit, pt.amplitude(), corr_time, hitIndex, tofBin); } else { the_signal[channel] += DigitizerUtility::Amplitude(pt.amplitude(), nullptr, pt.amplitude()); } LogDebug("Pixel3DDigitizerAlgorithm::induce_signal") << " Induce charge at row,col:" << rowcol << " N_electrons:" << pt.amplitude() << " [Channel:" << channel - << "]\n [Accumulated signal in this channel:" << the_signal[channel].ampl() << "]"; + << "]\n [Accumulated signal in this channel:" << the_signal[channel].ampl() << "] " + << " Global index linked PSimHit:" << hitIndex;; } }