Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix on HCAL TP saturation algorithm to synchronize s/w TP algorithm with f/w (backport from master) #1013

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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