Skip to content

Commit

Permalink
Merge pull request #37472 from TaeunKwon/TPasInFW
Browse files Browse the repository at this point in the history
[Backport of] HCAL: fix on HCAL TP saturation algorithm to synchronize s/w TP algorithm with f/w
  • Loading branch information
cmsbuild committed Apr 8, 2022
2 parents 017e8b6 + c46bab0 commit d77a87f
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -447,7 +447,8 @@ void HcalTriggerPrimitiveAlgo::analyzeQIE11(IntegerCaloSamples& samples,

if (fix_saturation_ && (sample_saturation.size() > ibin + i))
check_sat = (sample_saturation[ibin + i] | (sample > QIE11_MAX_LINEARIZATION_ET));
else if (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
Expand Down Expand Up @@ -492,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 d77a87f

Please sign in to comment.