|
|
Go to the documentation of this file.
60 cosh_ieta_28_HE_low_depths_{},
61 cosh_ieta_28_HE_high_depths_{},
68 linearLSB_QIE11Overlap_{} {}
101 inputLUT_ = std::vector<HcaluLUTTPGCoder::Lut>(nluts);
102 gain_ = std::vector<float>(nluts, 0.);
103 ped_ = std::vector<float>(nluts, 0.);
108 const std::vector<bool>& featureBits,
110 throw cms::Exception(
"PROBLEM: This method should never be invoked!");
154 std::vector<HcalSubdetector> subdet;
164 if (subdetStr ==
"HB")
166 else if (subdetStr ==
"HE")
168 else if (subdetStr ==
"HF")
177 size_t nCol = subdet.size();
180 std::vector<int> ietaU;
181 std::vector<int> ietaL;
182 std::vector<int> iphiU;
183 std::vector<int> iphiL;
184 std::vector<int> depU;
185 std::vector<int> depL;
186 std::vector<Lut> lutFromFile(nCol);
189 for (
size_t i = 0;
i < nCol; ++
i) {
192 ietaL.push_back(
ieta);
195 for (
size_t i = 0;
i < nCol; ++
i) {
198 ietaU.push_back(
ieta);
201 for (
size_t i = 0;
i < nCol; ++
i) {
204 iphiL.push_back(
iphi);
207 for (
size_t i = 0;
i < nCol; ++
i) {
210 iphiU.push_back(
iphi);
213 for (
size_t i = 0;
i < nCol; ++
i) {
219 for (
size_t i = 0;
i < nCol; ++
i) {
226 for (
size_t i = 0;
file >> lutValue;
i = (
i + 1) % nCol) {
227 lutFromFile[
i].push_back(lutValue);
231 for (
size_t i = 0;
i < nCol; ++
i)
234 for (
size_t i = 0;
i < nCol; ++
i) {
266 for (
int isub = 0; isub < 3; ++isub) {
271 std::vector<unsigned int>* lut = _xml->
getLutFast(detid);
273 throw cms::Exception(
"PROBLEM: No inputLUT_ in xml file for ") << detid << std::endl;
275 throw cms::Exception(
"PROBLEM: Wrong inputLUT_ size in xml file for ") << detid << std::endl;
310 double eta_low = 0., eta_high = 0.;
334 float nominalgain_ =
metadata->getNominalGain();
349 bool foundHB =
false;
350 bool foundHE =
false;
351 bool newHBtp =
false;
352 bool newHEtp =
false;
354 for (std::vector<HcalElectronicsId>::const_iterator eId = vIds.begin(); eId != vIds.end(); eId++) {
356 if (foundHB and foundHE)
360 if (hcalTTDetId.null())
363 int aieta =
abs(hcalTTDetId.ieta());
364 int tp_version = hcalTTDetId.version();
366 if (aieta <= lastHBRing) {
370 }
else if (aieta > lastHBRing and aieta < lastHERing) {
377 for (
const auto&
id :
metadata->getAllChannels()) {
392 unsigned int mipMax = 0;
393 unsigned int mipMin = 0;
411 for (
auto capId : {0, 1, 2, 3}) {
434 auto adc2fC = [channelCoder, shape](
unsigned int adc) {
436 for (
auto capId : {0, 1, 2, 3})
437 fC += channelCoder->
charge(*shape,
adc, capId);
441 int qieType =
conditions.getHcalQIEType(cell)->getValue();
448 else if (qieType ==
QIE11)
459 if (qieType ==
QIE11) {
469 double nonlinearityCorrection = 1.0;
470 double containmentCorrection = 1.0;
478 double correctedCharge = containmentCorrection1TS *
adc2fC(
adc);
479 double containmentCorrection2TSCorrected =
481 if (qieType ==
QIE11) {
485 containmentCorrection = containmentCorrection1TS;
487 containmentCorrection = containmentCorrection2TSCorrected;
492 conditions.getHcalSiPMCharacteristics()->getNonLinearities(siPMParameter.getType()));
493 const double fcByPE = siPMParameter.getFCByPE();
494 const double effectivePixelsFired = correctedCharge / fcByPE;
495 nonlinearityCorrection =
corr.getRecoCorrectionFactor(effectivePixelsFired);
497 containmentCorrection = containmentCorrection2TSCorrected;
503 int((
adc2fC(
adc) - ped) *
gain * rcalib * nonlinearityCorrection * containmentCorrection /
508 int((
adc2fC(
adc) - ped) *
gain * rcalib * nonlinearityCorrection *
509 containmentCorrection / nominalgain_ / granularity)),
512 if (qieType ==
QIE11) {
513 if (
adc >= mipMin and
adc < mipMax)
515 else if (
adc >= mipMax)
540 for (
int i = 0;
i <
df.size();
i++) {
548 for (
int i = 0;
i <
df.size();
i++) {
556 for (
int i = 0;
i <
df.samples();
i++) {
564 for (
int i = 0;
i <
df.samples();
i++) {
576 return ped_.at(lutId);
581 return gain_.at(lutId);
590 msb.resize(
df.size());
591 for (
int i = 0;
i <
df.size(); ++
i)
602 msb.resize(
df.samples());
605 for (
int i = 0;
i <
df.samples(); ++
i) {
614 for (
int i = 0;
i <
df.samples(); ++
i) {
bool isPlan1(const HcalDetId &id) const
void update(const HcalDbService &conditions)
static XMLProcessor * getInstance()
std::vector< float > ped_
constexpr int iphi() const
get the cell iphi
static const int QIE8_LUT_BITMASK
bool overrideDBweightsAndFilterHE_
float charge(const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.
double cosh_ieta(int ieta, int depth, HcalSubdetector subdet)
uint16_t *__restrict__ uint16_t const *__restrict__ adc
static const int QIE10_LUT_BITMASK
static const int QIE11_LUT_MSB1
void updateXML(const char *filename)
void compress(const IntegerCaloSamples &ics, const std::vector< bool > &featureBits, HcalTriggerPrimitiveDigi &tp) const override
static const size_t INPUT_LUT_SIZE
constexpr int depth() const
get the tower depth
constexpr double MaximumFractionalError
static const float adc2fC[128]
std::vector< uint32_t > FG_HF_thresholds_
static const size_t UPGRADE_LUT_SIZE
const DetId lookupTrigger(HcalElectronicsId fId) const
brief lookup the trigger logical detid associated with the given electronics id
double cosh_ieta_28_HE_low_depths_
float getRespGain() const
std::vector< float > gain_
static constexpr uint32_t kHcalPhiMask2
float getLUTPedestal(HcalDetId id) const override
std::vector< HcalElectronicsId > allElectronicsIdTrigger() const
float getPedestal() const
static constexpr uint32_t kHcalDepthMask2
double cosh_ieta_28_HE_high_depths_
float getLUTGain(HcalDetId id) const override
uint32_t getValue() const
constexpr int ieta() const
get the cell ieta
double linearLSB_QIE11Overlap_
const HcalDDDRecConstants * dddConstants() const
void init(const HcalTopology *top, const HcalTimeSlew *delay)
unsigned short LutElement
constexpr HcalSubdetector subdet() const
get the subdetector
void lookupMSB(const HBHEDataFrame &df, std::vector< bool > &msb) const
HcalTopologyMode::TriggerMode triggerMode() const
std::vector< unsigned int > * getLutFast(uint32_t det_id)
const HcalTopology * topo_
bool valid(const DetId &id) const override
static const int QIE11_LUT_BITMASK
bool getMSB(const HcalDetId &id, int adc) const
std::vector< double > cosh_ieta_
bool overrideDBweightsAndFilterHB_
~HcaluLUTTPGCoder() override
uint32_t getFGBitInfo() const
get FG bit information
std::vector< unsigned short > getLinearizationLUT(HcalDetId id) const override
Get the full linearization LUT (128 elements). Default implementation just uses adc2Linear to get all...
static const int QIE10_LUT_MSB1
static const int QIE10_LUT_MSB0
std::pair< double, double > etaRange(HcalSubdetector subdet, int ieta) const
void make_cosh_ieta_map(void)
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::vector< Lut > inputLUT_
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const
static constexpr uint32_t kHcalEtaMask2
static const int QIE11_LUT_MSB0
Abs< T >::type abs(const T &t)
constexpr int ietaAbs() const
get the absolute value of the cell ieta
static const int QIE8_LUT_MSB
void towerEtaBounds(int ieta, int version, double &eta1, double &eta2) const
where this tower begins and ends in eta
const HcalTimeSlew * delay_
std::unique_ptr< HcalPulseContainmentManager > pulseCorr_
void adc2Linear(const HBHEDataFrame &df, IntegerCaloSamples &ics) const override