Skip to content

Commit

Permalink
TP algorithm update for the sync with f/w
Browse files Browse the repository at this point in the history
  • Loading branch information
TaeunKwon committed Apr 5, 2022
1 parent 6e4ac3f commit c46bab0
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 c46bab0

Please sign in to comment.