Skip to content

Commit

Permalink
remove peak-finder for PFA1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-Krohn committed Jun 24, 2022
1 parent ccd5266 commit 66db876
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions SimCalorimetry/HcalTrigPrimAlgos/src/HcalTriggerPrimitiveAlgo.cc
Expand Up @@ -489,19 +489,28 @@ void HcalTriggerPrimitiveAlgo::analyzeQIE11(IntegerCaloSamples& samples,
continue;
}

bool isPeak = (sum[idx] > sum[idx - 1] && sum[idx] >= sum[idx + 1] && sum[idx] > theThreshold);
//Only run the peak-finder when the PFA2 FIR filter is running, which corresponds to weights = 1
if (weightsQIE11_[theIeta][0] == 1) {
bool isPeak = (sum[idx] > sum[idx - 1] && sum[idx] >= sum[idx + 1] && sum[idx] > theThreshold);
if (isPeak) {
output[ibin] = std::min<unsigned int>(sum[idx], QIE11_MAX_LINEARIZATION_ET);

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;

if (isPeak) {
} else {
// Not a peak
output[ibin] = 0;
}
} else {
output[ibin] = std::min<unsigned int>(sum[idx], QIE11_MAX_LINEARIZATION_ET);

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;
}
// peak-finding is not applied for FG bits
// compute(msb) returns two bits (MIP). compute(timingTDC,ids) returns 6 bits (1 depth, 1 prompt, 1 delayed 01, 1 delayed 10, 2 reserved)
Expand Down

0 comments on commit 66db876

Please sign in to comment.