From 0c06ad16983b6cba545d561c5d8a5b43bcebce6d Mon Sep 17 00:00:00 2001 From: RaffaelaLanger Date: Thu, 26 Aug 2021 14:12:22 +0200 Subject: [PATCH] Fixed an error in window selection --- source/Digitisers/src/DDPlanarDigiProcessor.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/source/Digitisers/src/DDPlanarDigiProcessor.cc b/source/Digitisers/src/DDPlanarDigiProcessor.cc index 5d1f0ef..8e78347 100644 --- a/source/Digitisers/src/DDPlanarDigiProcessor.cc +++ b/source/Digitisers/src/DDPlanarDigiProcessor.cc @@ -356,13 +356,13 @@ void DDPlanarDigiProcessor::processEvent( LCEvent * evt ) { // Smearing time of the hit if (_resT.size() and _resT[0] > 0.0) { - float resT = _resT.size() > 1 ? _resT.at(layer) : _resT.at(0); - double tSmear = resT > 0.0 ? gsl_ran_gaussian( _rng, resT ) : 0.0; - _h[hT]->Fill( resT > 0.0 ? tSmear / resT : 0.0 ); - _h[diffT]->Fill( tSmear ); + float resT = _resT.size() > 1 ? _resT.at(layer) : _resT.at(0); + double tSmear = resT > 0.0 ? gsl_ran_gaussian( _rng, resT ) : 0.0; + _h[hT]->Fill( resT > 0.0 ? tSmear / resT : 0.0 ); + _h[diffT]->Fill( tSmear ); - hitT += tSmear; - streamlog_out(DEBUG3) << "smeared hit at T: " << simTHit->getTime() << " ns to T: " << hitT << " ns according to resolution: " << resT << " ns" << std::endl; + hitT += tSmear; + streamlog_out(DEBUG3) << "smeared hit at T: " << simTHit->getTime() << " ns to T: " << hitT << " ns according to resolution: " << resT << " ns" << std::endl; } // Correcting for the propagation time @@ -377,10 +377,10 @@ void DDPlanarDigiProcessor::processEvent( LCEvent * evt ) { float timeWindow_min = _timeWindow_min.size() > 1 ? _timeWindow_min.at(layer) : _timeWindow_min.at(0); float timeWindow_max = _timeWindow_max.size() > 1 ? _timeWindow_max.at(layer) : _timeWindow_max.at(0); if ( hitT < timeWindow_min || hitT > timeWindow_max ) { - streamlog_out(DEBUG4) << "hit at T: " << simTHit->getTime() << " smeared to: " << hitT << " is outside the time window: hit dropped" << std::endl; - ++nDismissedHits; + streamlog_out(DEBUG4) << "hit at T: " << simTHit->getTime() << " smeared to: " << hitT << " is outside the time window: hit dropped" << std::endl; + ++nDismissedHits; + continue; } - continue; }