63 cosh_ieta_28_HE_low_depths_{},
64 cosh_ieta_28_HE_high_depths_{},
72 linearLSB_QIE11Overlap_{} {}
107 inputLUT_ = std::vector<HcaluLUTTPGCoder::Lut>(nluts);
108 gain_ = std::vector<float>(nluts, 0.);
109 ped_ = std::vector<float>(nluts, 0.);
114 const std::vector<bool>& featureBits,
116 throw cms::Exception(
"PROBLEM: This method should never be invoked!");
179 std::vector<HcalSubdetector> subdet;
189 if (subdetStr ==
"HB")
191 else if (subdetStr ==
"HE")
193 else if (subdetStr ==
"HF")
202 size_t nCol = subdet.size();
205 std::vector<int> ietaU;
206 std::vector<int> ietaL;
207 std::vector<int> iphiU;
208 std::vector<int> iphiL;
209 std::vector<int> depU;
210 std::vector<int> depL;
211 std::vector<Lut> lutFromFile(nCol);
214 for (
size_t i = 0;
i < nCol; ++
i) {
217 ietaL.push_back(
ieta);
220 for (
size_t i = 0;
i < nCol; ++
i) {
223 ietaU.push_back(
ieta);
226 for (
size_t i = 0;
i < nCol; ++
i) {
229 iphiL.push_back(
iphi);
232 for (
size_t i = 0;
i < nCol; ++
i) {
235 iphiU.push_back(
iphi);
238 for (
size_t i = 0;
i < nCol; ++
i) {
244 for (
size_t i = 0;
i < nCol; ++
i) {
251 for (
size_t i = 0;
file >> lutValue;
i = (
i + 1) % nCol) {
252 lutFromFile[
i].push_back(lutValue);
256 for (
size_t i = 0;
i < nCol; ++
i)
259 for (
size_t i = 0;
i < nCol; ++
i) {
291 for (
int isub = 0; isub < 3; ++isub) {
300 throw cms::Exception(
"PROBLEM: Wrong inputLUT_ size in xml file for ") <<
detid << std::endl;
337 double eta_low = 0., eta_high = 0.;
361 float nominalgain_ =
metadata->getNominalGain();
377 bool foundHB =
false;
378 bool foundHE =
false;
379 bool newHBtp =
false;
380 bool newHEtp =
false;
382 for (std::vector<HcalElectronicsId>::const_iterator eId = vIds.begin(); eId != vIds.end(); eId++) {
384 if (foundHB and foundHE)
388 if (hcalTTDetId.null())
391 int aieta =
abs(hcalTTDetId.ieta());
395 auto tpParam =
conditions.getHcalTPChannelParameter(hcalTTDetId,
false);
397 weight = tpParam->getauxi1();
399 if (aieta <= lastHBRing) {
403 }
else if (aieta > lastHBRing and aieta < lastHERing) {
410 for (
const auto&
id :
metadata->getAllChannels()) {
424 unsigned int bit12_energy = 0;
425 unsigned int bit13_energy = 0;
426 unsigned int bit14_energy = 999;
427 unsigned int bit15_energy = 999;
446 for (
auto capId : {0, 1, 2, 3}) {
471 for (
auto capId : {0, 1, 2, 3})
504 double nonlinearityCorrection = 1.0;
505 double containmentCorrection = 1.0;
513 double correctedCharge = containmentCorrection1TS *
adc2fC(
adc);
514 double containmentCorrection2TSCorrected =
520 containmentCorrection = containmentCorrection1TS;
522 containmentCorrection = containmentCorrection2TSCorrected;
527 conditions.getHcalSiPMCharacteristics()->getNonLinearities(siPMParameter.getType()));
528 const double fcByPE = siPMParameter.getFCByPE();
529 const double effectivePixelsFired = correctedCharge / fcByPE;
530 nonlinearityCorrection =
corr.getRecoCorrectionFactor(effectivePixelsFired);
532 containmentCorrection = containmentCorrection2TSCorrected;
538 int((
adc2fC(
adc) -
ped) *
gain * rcalib * nonlinearityCorrection * containmentCorrection /
545 containmentCorrection / nominalgain_ /
granularity)),
548 unsigned int linearizedADC =
553 if ((linearizedADC < bit12_energy and cell.
depth() <= 2)
or (cell.
depth() >= 3))
555 if (linearizedADC >= bit13_energy and cell.
depth() >= 3)
557 if (linearizedADC >= bit14_energy)
559 if (linearizedADC >= bit15_energy)
597 auto tpParam =
conditions.getHcalTPChannelParameter(cell,
false);
598 int weight = tpParam->getauxi1();
611 for (
auto capId : {0, 1, 2, 3}) {
614 pedWidth += effPedestals->
getWidth(capId);
637 for (
auto capId : {0, 1, 2, 3})
648 lut_ootpu.resize(
SIZE, 0);
674 for (
int i = 0;
i <
df.size();
i++) {
682 for (
int i = 0;
i <
df.size();
i++) {
692 for (
int i = 0;
i <
df.samples();
i++) {
700 for (
int i = 0;
i <
df.samples();
i++) {
709 for (
int i = 0;
i <
df.samples();
i++) {
722 std::vector<unsigned short> group0LLPbits;
723 group0LLPbits.reserve(
df.samples());
724 for (
int i = 0;
i <
df.samples();
i++) {
725 group0LLPbits.push_back((lut.at(
df[
i].adc()) >> 12) &
728 return group0LLPbits;
733 return ped_.at(lutId);
738 return gain_.at(lutId);
755 msb.resize(
df.size());
756 for (
int i = 0;
i <
df.size(); ++
i)
767 msb.resize(
df.samples());
770 for (
int i = 0;
i <
df.samples(); ++
i) {
779 for (
int i = 0;
i <
df.samples(); ++
i) {
std::vector< uint32_t > FG_HF_thresholds_
std::vector< HcalElectronicsId > allElectronicsIdTrigger() const
static constexpr uint32_t kHcalPhiMask2
double cosh_ieta_28_HE_high_depths_
float getPedestal() const
double linearLSB_QIE11Overlap_
static const int QIE11_LUT_MSB1
constexpr int ietaAbs() const
get the absolute value of the cell ieta
static const int QIE11_LUT_BITMASK
bool valid(const DetId &id) const override
const HcalTopology * topo_
static const int QIE11_LUT_MSB0
void lookupMSB(const HBHEDataFrame &df, std::vector< bool > &msb) const
std::vector< unsigned short > group0FGbits(const QIE11DataFrame &df) const
double cosh_ieta_28_HE_low_depths_
static const int QIE10_ZDC_LUT_BITMASK
void init(const HcalTopology *top, const HcalTimeSlew *delay)
bool overrideDBweightsAndFilterHB_
static const int QIE8_LUT_BITMASK
bool getMSB(const HcalDetId &id, int adc) const
unsigned short LutElement
void update(const HcalDbService &conditions)
void updateXML(const char *filename)
static const int QIE10_LUT_MSB0
constexpr HcalSubdetector subdet() const
get the subdetector
static const size_t UPGRADE_LUT_SIZE
float getLUTGain(HcalDetId id) const override
std::vector< Lut > inputLUT_
std::vector< unsigned short > getLinearizationLUT(HcalDetId id) const override
Get the full linearization LUT (128 elements). Default implementation just uses adc2Linear to get all...
HcalTopologyMode::TriggerMode triggerMode() const
constexpr int ieta() const
get the cell ieta
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
std::pair< double, double > etaRange(HcalSubdetector subdet, int ieta) const
const HcalTimeSlew * delay_
Abs< T >::type abs(const T &t)
static const float adc2fC[128]
bool overrideDBweightsAndFilterHE_
float getLUTPedestal(HcalDetId id) const override
static const int QIE8_LUT_MSB
uint32_t getValue() const
static constexpr uint32_t kHcalEtaMask2
static const int QIE10_LUT_BITMASK
std::vector< double > cosh_ieta_
std::vector< float > ped_
double cosh_ieta(int ieta, int depth, HcalSubdetector subdet)
constexpr double MaximumFractionalError
float getWidth(int fCapId) const
get width for capId = 0..3
std::vector< float > gain_
static const float zdc_lsb_
~HcaluLUTTPGCoder() override
void adc2Linear(const HBHEDataFrame &df, IntegerCaloSamples &ics) const override
std::vector< unsigned int > * getLutFast(uint32_t det_id)
static const size_t INPUT_LUT_SIZE
constexpr Section section() const
get the section
void towerEtaBounds(int ieta, int version, double &eta1, double &eta2) const
where this tower begins and ends in eta
const HcalDDDRecConstants * dddConstants() const
void compress(const IntegerCaloSamples &ics, const std::vector< bool > &featureBits, HcalTriggerPrimitiveDigi &tp) const override
static constexpr int32_t SubdetectorId
const DetId lookupTrigger(HcalElectronicsId fId) const
brief lookup the trigger logical detid associated with the given electronics id
float getRespGain() const
void make_cosh_ieta_map(void)
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const
std::unique_ptr< HcalPulseContainmentManager > pulseCorr_
bool isPlan1(const HcalDetId &id) const
static const int QIE10_LUT_MSB1
static XMLProcessor * getInstance()
float charge(const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.
uint16_t *__restrict__ uint16_t const *__restrict__ adc
static constexpr uint32_t kHcalDepthMask2
constexpr int depth() const
get the tower depth