Skip to content

Commit

Permalink
Modification to move ZDC trigger spacing to TP channel parameters con…
Browse files Browse the repository at this point in the history
…ditions.
  • Loading branch information
hjbossi committed Oct 29, 2024
1 parent 52219c0 commit 476bdb1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion CalibCalorimetry/HcalTPGAlgos/interface/HcaluLUTTPGCoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class HcalDbService;
class HcaluLUTTPGCoder : public HcalTPGCoder {
public:
static const float lsb_;
static const float zdc_lsb_;

HcaluLUTTPGCoder();
HcaluLUTTPGCoder(const HcalTopology* topo, const HcalTimeSlew* delay);
Expand Down
8 changes: 4 additions & 4 deletions CalibCalorimetry/HcalTPGAlgos/src/HcaluLUTTPGCoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "CalibCalorimetry/HcalTPGAlgos/interface/LutXml.h"

const float HcaluLUTTPGCoder::lsb_ = 1. / 16;
const float HcaluLUTTPGCoder::zdc_lsb_ = 50.;

const int HcaluLUTTPGCoder::QIE8_LUT_BITMASK;
const int HcaluLUTTPGCoder::QIE10_LUT_BITMASK;
Expand Down Expand Up @@ -596,6 +595,7 @@ void HcaluLUTTPGCoder::update(const HcalDbService& conditions) {

auto tpParam = conditions.getHcalTPChannelParameter(cell, false);
int weight = tpParam->getauxi1();
int factorGeVPerCount = tpParam->getauxi2();

int lutId = getLUTId(cell);
int lutId_ootpu = lutId + sizeZDC_;
Expand Down Expand Up @@ -656,9 +656,9 @@ void HcaluLUTTPGCoder::update(const HcalDbService& conditions) {
lut[adc] = 0;
lut_ootpu[adc] = 0;
} else {
lut[adc] = std::min(std::max(0, int((adc2fC(adc) - ped) * gain * rcalib / zdc_lsb_)), MASK);
lut_ootpu[adc] =
std::min(std::max(0, int((adc2fC(adc) - ped) * gain * rcalib * weight / (zdc_lsb_ * 256))), MASK);
lut[adc] = std::min(std::max(0, int((adc2fC(adc) - ped) * gain * rcalib / factorGeVPerCount)), MASK);
lut_ootpu[adc] = std::min(
std::max(0, int((adc2fC(adc) - ped) * gain * rcalib * weight / (factorGeVPerCount * 256))), MASK);
}
}
}
Expand Down

0 comments on commit 476bdb1

Please sign in to comment.