|
|
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();
340 for (
const auto&
id :
metadata->getAllChannels()) {
355 unsigned int mipMax = 0;
356 unsigned int mipMin = 0;
374 for (
auto capId : {0, 1, 2, 3}) {
397 auto adc2fC = [channelCoder, shape](
unsigned int adc) {
399 for (
auto capId : {0, 1, 2, 3})
400 fC += channelCoder->
charge(*shape,
adc, capId);
404 int qieType =
conditions.getHcalQIEType(cell)->getValue();
411 else if (qieType ==
QIE11)
423 if (qieType ==
QIE11) {
433 double nonlinearityCorrection = 1.0;
434 double containmentCorrection = 1.0;
442 double correctedCharge = containmentCorrection1TS *
adc2fC(
adc);
443 double containmentCorrection2TSCorrected =
445 if (qieType ==
QIE11) {
449 containmentCorrection = containmentCorrection1TS;
451 containmentCorrection = containmentCorrection2TSCorrected;
456 conditions.getHcalSiPMCharacteristics()->getNonLinearities(siPMParameter.getType()));
457 const double fcByPE = siPMParameter.getFCByPE();
458 const double effectivePixelsFired = correctedCharge / fcByPE;
459 nonlinearityCorrection =
corr.getRecoCorrectionFactor(effectivePixelsFired);
461 containmentCorrection = containmentCorrection2TSCorrected;
467 int((
adc2fC(
adc) - ped) *
gain * rcalib * nonlinearityCorrection * containmentCorrection /
472 int((
adc2fC(
adc) - ped) *
gain * rcalib * nonlinearityCorrection *
473 containmentCorrection / nominalgain_ / granularity)),
476 if (qieType ==
QIE11) {
477 if (
adc >= mipMin and
adc < mipMax)
479 else if (
adc >= mipMax)
504 for (
int i = 0;
i <
df.size();
i++) {
512 for (
int i = 0;
i <
df.size();
i++) {
520 for (
int i = 0;
i <
df.samples();
i++) {
528 for (
int i = 0;
i <
df.samples();
i++) {
540 return ped_.at(lutId);
545 return gain_.at(lutId);
554 msb.resize(
df.size());
555 for (
int i = 0;
i <
df.size(); ++
i)
566 msb.resize(
df.samples());
569 for (
int i = 0;
i <
df.samples(); ++
i) {
578 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
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)
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
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
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
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_
~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