Skip to content

Commit

Permalink
Merge pull request #37471 from TaeunKwon/SWTPasInFW
Browse files Browse the repository at this point in the history
HCAL: fix on HCAL TP saturation algorithm to synchronize s/w TP algorithm with f/w
  • Loading branch information
cmsbuild authored Apr 7, 2022
2 parents ec4cb8b + e22097c commit 4b0e632
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions SimCalorimetry/HcalTrigPrimAlgos/src/HcalTriggerPrimitiveAlgo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,10 @@ void HcalTriggerPrimitiveAlgo::analyzeQIE11(IntegerCaloSamples& samples,
unsigned int sample = samples[ibin + i];

if (fix_saturation_ && (sample_saturation.size() > ibin + i))
check_sat = sample_saturation[ibin + i];
check_sat = (sample_saturation[ibin + i] | (sample > QIE11_MAX_LINEARIZATION_ET));

if (sample > QIE11_MAX_LINEARIZATION_ET)
sample = QIE11_MAX_LINEARIZATION_ET;

// Usually use a segmentation factor of 1.0 but for ieta >= 21 use 0.5
double segmentationFactor = 1.0;
Expand Down Expand Up @@ -490,8 +493,12 @@ void HcalTriggerPrimitiveAlgo::analyzeQIE11(IntegerCaloSamples& samples,

if (isPeak) {
output[ibin] = std::min<unsigned int>(sum[idx], QIE11_MAX_LINEARIZATION_ET);
if (fix_saturation_ && force_saturation[idx])

if (fix_saturation_ && force_saturation[idx] && ids.size() == 2)
output[ibin] = QIE11_MAX_LINEARIZATION_ET * 0.5;
else if (fix_saturation_ && force_saturation[idx])
output[ibin] = QIE11_MAX_LINEARIZATION_ET;

} else {
// Not a peak
output[ibin] = 0;
Expand Down

0 comments on commit 4b0e632

Please sign in to comment.