|
|
Go to the documentation of this file.
61 cosh_ieta_28_HE_low_depths_{},
62 cosh_ieta_28_HE_high_depths_{},
67 linearLSB_QIE11Overlap_{} {}
98 inputLUT_ = std::vector<HcaluLUTTPGCoder::Lut>(nluts);
99 gain_ = std::vector<float>(nluts, 0.);
100 ped_ = std::vector<float>(nluts, 0.);
105 const std::vector<bool>& featureBits,
107 throw cms::Exception(
"PROBLEM: This method should never be invoked!");
151 std::vector<HcalSubdetector> subdet;
161 if (subdetStr ==
"HB")
163 else if (subdetStr ==
"HE")
165 else if (subdetStr ==
"HF")
174 size_t nCol = subdet.size();
177 std::vector<int> ietaU;
178 std::vector<int> ietaL;
179 std::vector<int> iphiU;
180 std::vector<int> iphiL;
181 std::vector<int> depU;
182 std::vector<int> depL;
183 std::vector<Lut> lutFromFile(nCol);
186 for (
size_t i = 0;
i < nCol; ++
i) {
189 ietaL.push_back(
ieta);
192 for (
size_t i = 0;
i < nCol; ++
i) {
195 ietaU.push_back(
ieta);
198 for (
size_t i = 0;
i < nCol; ++
i) {
201 iphiL.push_back(
iphi);
204 for (
size_t i = 0;
i < nCol; ++
i) {
207 iphiU.push_back(
iphi);
210 for (
size_t i = 0;
i < nCol; ++
i) {
216 for (
size_t i = 0;
i < nCol; ++
i) {
223 for (
size_t i = 0;
file >> lutValue;
i = (
i + 1) % nCol) {
224 lutFromFile[
i].push_back(lutValue);
228 for (
size_t i = 0;
i < nCol; ++
i)
231 for (
size_t i = 0;
i < nCol; ++
i) {
263 for (
int isub = 0; isub < 3; ++isub) {
268 std::vector<unsigned int>* lut = _xml->
getLutFast(detid);
270 throw cms::Exception(
"PROBLEM: No inputLUT_ in xml file for ") << detid << std::endl;
272 throw cms::Exception(
"PROBLEM: Wrong inputLUT_ size in xml file for ") << detid << std::endl;
307 double eta_low = 0., eta_high = 0.;
331 float nominalgain_ =
metadata->getNominalGain();
337 for (
const auto&
id :
metadata->getAllChannels()) {
352 unsigned int mipMax = 0;
353 unsigned int mipMin = 0;
371 for (
auto capId : {0, 1, 2, 3}) {
394 auto adc2fC = [channelCoder, shape](
unsigned int adc) {
396 for (
auto capId : {0, 1, 2, 3})
397 fC += channelCoder->
charge(*shape,
adc, capId);
422 double nonlinearityCorrection = 1.0;
423 double containmentCorrection2TSCorrected = 1.0;
431 double correctedCharge = containmentCorrection1TS *
adc2fC(
adc);
437 const double fcByPE = siPMParameter.getFCByPE();
438 const double effectivePixelsFired = correctedCharge / fcByPE;
439 nonlinearityCorrection =
corr.getRecoCorrectionFactor(effectivePixelsFired);
444 int((
adc2fC(
adc) - ped) *
gain * rcalib * nonlinearityCorrection *
445 containmentCorrection2TSCorrected / linearLSB /
451 int((
adc2fC(
adc) - ped) *
gain * rcalib * nonlinearityCorrection *
452 containmentCorrection2TSCorrected / nominalgain_ / granularity)),
456 if (
adc >= mipMin and
adc < mipMax)
458 else if (
adc >= mipMax)
483 for (
int i = 0;
i < df.
size();
i++) {
491 for (
int i = 0;
i < df.
size();
i++) {
519 return ped_.at(lutId);
524 return gain_.at(lutId);
533 msb.resize(df.
size());
534 for (
int i = 0;
i < df.
size(); ++
i)
bool isPlan1(const HcalDetId &id) const
void update(const HcalDbService &conditions)
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
constexpr float correctionPhaseNS() const
static XMLProcessor * getInstance()
std::vector< float > ped_
constexpr HcalQIESample const & sample(int i) const
access a sample
const HcalSiPMCharacteristics * getHcalSiPMCharacteristics() const
constexpr HcalDetId const & id() const
constexpr int iphi() const
get the cell iphi
constexpr int samples() const
total number of samples in the digi
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)
constexpr int adc() const
get the ADC sample
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
std::vector< float > getNonLinearities(int type) const
get nonlinearity constants
static const size_t INPUT_LUT_SIZE
constexpr int depth() const
get the tower depth
constexpr double MaximumFractionalError
static const float adc2fC[128]
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
std::vector< uint32_t > FG_HF_thresholds_
static const size_t UPGRADE_LUT_SIZE
double cosh_ieta_28_HE_low_depths_
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
float getRespGain() const
std::vector< float > gain_
static constexpr uint32_t kHcalPhiMask2
float getLUTPedestal(HcalDetId id) const override
constexpr int samples() const
total number of samples in the digi
float getPedestal() const
const HcalRecoParam * getHcalRecoParam(const HcalGenericDetId &fId) const
const HcalQIEType * getHcalQIEType(const HcalGenericDetId &fId) 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 size() const
total number of samples in the digi
constexpr int ieta() const
get the cell ieta
double linearLSB_QIE11Overlap_
const HcalDDDRecConstants * dddConstants() const
constexpr edm::DataFrame::id_type id() 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
constexpr const HcalDetId & id() const
static const int QIE11_LUT_BITMASK
bool getMSB(const HcalDetId &id, int adc) const
std::vector< double > cosh_ieta_
const HcalSiPMParameter * getHcalSiPMParameter(const HcalGenericDetId &fId) const
constexpr int size() const
total number of samples in the digi
const HcalChannelStatus * getHcalChannelStatus(const HcalGenericDetId &fId) const
~HcaluLUTTPGCoder() override
uint32_t getFGBitInfo() const
get FG bit information
const HcalLutMetadata * getHcalLutMetadata() const
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
constexpr edm::DataFrame::id_type id() const
void towerEtaBounds(int ieta, int version, double &eta1, double &eta2) const
where this tower begins and ends in eta
const HcalTPChannelParameter * getHcalTPChannelParameter(const HcalGenericDetId &fId) const
const HcalTimeSlew * delay_
std::unique_ptr< HcalPulseContainmentManager > pulseCorr_
const HcalL1TriggerObject * getHcalL1TriggerObject(const HcalGenericDetId &fId) const
void adc2Linear(const HBHEDataFrame &df, IntegerCaloSamples &ics) const override