56 QIEType_ = std::vector<int> (nluts, 0);
57 gain_ = std::vector<float>(nluts, 0.);
58 ped_ = std::vector<float>(nluts, 0.);
62 throw cms::Exception(
"PROBLEM: This method should never be invoked!");
100 assert(file.is_open());
102 std::vector<HcalSubdetector> subdet;
106 std::getline(file, buffer);
107 std::getline(file, buffer);
109 unsigned int index = buffer.find(
"H", 0);
110 while (index < buffer.length()){
112 if (subdetStr ==
"HB") subdet.push_back(
HcalBarrel);
113 else if (subdetStr ==
"HE") subdet.push_back(
HcalEndcap);
114 else if (subdetStr ==
"HF") subdet.push_back(
HcalForward);
118 index = buffer.find(
"H", index);
122 size_t nCol = subdet.size();
125 std::vector<int> ietaU;
126 std::vector<int> ietaL;
127 std::vector<int> iphiU;
128 std::vector<int> iphiL;
129 std::vector<int> depU;
130 std::vector<int> depL;
131 std::vector< Lut > lutFromFile(nCol);
134 for (
size_t i=0;
i<nCol; ++
i) {
137 ietaL.push_back(ieta);
140 for (
size_t i=0;
i<nCol; ++
i) {
143 ietaU.push_back(ieta);
146 for (
size_t i=0;
i<nCol; ++
i) {
149 iphiL.push_back(iphi);
152 for (
size_t i=0;
i<nCol; ++
i) {
155 iphiU.push_back(iphi);
158 for (
size_t i=0;
i<nCol; ++
i) {
164 for (
size_t i=0;
i<nCol; ++
i) {
171 for (
size_t i=0; file >> lutValue;
i = (
i+1) % nCol){
172 lutFromFile[
i].push_back(lutValue);
178 for (
size_t i=0;
i<nCol; ++
i){
179 for (
int ieta = ietaL[
i]; ieta <= ietaU[
i]; ++ieta){
180 for (
int iphi = iphiL[
i]; iphi <= iphiU[
i]; ++iphi){
211 for (
int isub=0; isub<3; ++isub) {
216 if (lut==0)
throw cms::Exception(
"PROBLEM: No inputLUT_ in xml file for ") << detid << std::endl;
231 assert(metadata !=0);
234 std::map<int, float> cosh_ieta;
237 double eta1 = etas.first;
238 double eta2 = etas.second;
239 cosh_ieta[
i] = cosh((eta1 + eta2)/2.);
255 unsigned int mipMax = 0;
256 unsigned int mipMin = 0;
275 for (
auto capId : {0,1,2,3}){
276 ped += calibrations.
pedestal(capId);
294 bool isMasked = ( (status &
bitToMask_) > 0 );
307 coder.
adc2fC(frame,samples);
308 float adc2fC = samples[0];
314 unsigned short data[] = {0, 0, 0};
319 coder.
adc2fC(upgradeFrame, upgradeSamples);
320 float adc2fC = upgradeSamples[0];
326 if (
adc >= mipMin and
adc < mipMax)
328 else if (
adc >= mipMax)
340 coder.
adc2fC(frame,samples);
341 float adc2fC = samples[0];
346 unsigned short data[] = {0, 0, 0, 0};
351 coder.
adc2fC(upgradeFrame, upgradeSamples);
352 float adc2fC = upgradeSamples[0];
366 for (
int i=0;
i<df.
size();
i++){
374 for (
int i=0;
i<df.
size();
i++){
402 return ped_.at(lutId);
407 return gain_.at(lutId);
422 return lut.at(lutId);
426 msb.resize(df.
size());
427 for (
int i=0;
i<df.
size(); ++
i)
int adc(sample_type sample)
get the ADC sample (12 bits)
int samples() const
total number of samples in the digi
void setSample(edm::DataFrame::size_type isample, int adc, int tdc, bool soi=false)
set the sample contents
float getPedestal() const
virtual void adc2Linear(const HBHEDataFrame &df, IntegerCaloSamples &ics) const override
const HcalDDDRecConstants * dddConstants() const
HcalSubdetector subdet() const
get the subdetector
const HcalTPChannelParameter * getHcalTPChannelParameter(const HcalGenericDetId &fId) const
bool valid(const DetId &id) const override
static const int QIE11_LUT_MSB1
static const int QIE11_LUT_BITMASK
virtual ~HcaluLUTTPGCoder()
const HcalChannelStatus * getHcalChannelStatus(const HcalGenericDetId &fId) const
virtual float getLUTGain(HcalDetId id) const override
int adc() const
get the ADC sample
int size() const
total number of samples in the digi
const HcalTopology * topo_
edm::DataFrame::id_type id() const
static const int QIE11_LUT_MSB0
double pedestal(int fCapId) const
get pedestal for capid=0..3
const Item * getValues(DetId fId, bool throwOnFail=true) const
static const int QIE8_LUT_BITMASK
HcalTopologyMode::TriggerMode triggerMode() const
unsigned short LutElement
void update(const HcalDbService &conditions)
static const int kHcalDepthMask2
void updateXML(const char *filename)
static const size_t UPGRADE_LUT_SIZE
int depth() const
get the tower depth
void lookupMSB(const HBHEDataFrame &df, std::vector< bool > &msb) const
std::vector< int > QIEType_
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const
float getRespGain() const
void setSample(int i, const HcalQIESample &sam)
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const
std::vector< DetId > getAllChannels() const
int maxDepth(HcalSubdetector subdet) const
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
const HcalL1TriggerObject * getHcalL1TriggerObject(const HcalGenericDetId &fId) const
int ieta() const
get the cell ieta
edm::DataFrame::id_type id() const
std::vector< unsigned short > getLinearizationLUTWithMSB(const HcalDetId &id) const
const HcalLutMetadata * getHcalLutMetadata() const
std::vector< LutElement > Lut
void setSample(int i, const HcalQIESample &sam)
static const int QIE8_LUT_MSB
std::vector< Lut > upgradeQIE11LUT_
static const int QIE10_LUT_BITMASK
int ietaAbs() const
get the absolute value of the cell ieta
const HcalQIEType * getHcalQIEType(const HcalGenericDetId &fId) const
int iphi() const
get the cell iphi
static const int kHcalPhiMask2
double LUTrespcorrgain(int fCapId) const
get LUT corrected and response corrected gain for capid=0..3
std::vector< float > ped_
std::vector< float > gain_
int size() const
total number of samples in the digi
const HcalQIESample & sample(int i) const
access a sample
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
std::vector< unsigned int > * getLutFast(uint32_t det_id)
static const size_t INPUT_LUT_SIZE
std::pair< double, double > etaRange(HcalSubdetector subdet, int ieta) const
HcaluLUTTPGCoder(const HcalTopology *topo)
char data[epos_bytes_allocation]
bool getMSB(const HcalDetId &id, int adc) const
virtual float getLUTPedestal(HcalDetId id) const override
static const int kHcalEtaMask2
uint32_t getFGBitInfo() const
get FG bit information
std::vector< Lut > upgradeQIE10LUT_
const HcalDetId & id() const
bool isPlan1(const HcalDetId &id) const
const HcalDetId & id() const
uint32_t getValue() const
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
void setSample(edm::DataFrame::size_type isample, int adc, int le_tdc, int te_tdc, int capid, bool soi=false, bool ok=true)
set the sample contents
int samples() const
total number of samples in the digi
static XMLProcessor * getInstance()
virtual void compress(const IntegerCaloSamples &ics, const std::vector< bool > &featureBits, HcalTriggerPrimitiveDigi &tp) const override
virtual std::vector< unsigned short > getLinearizationLUT(HcalDetId id) const override
Get the full linearization LUT (128 elements). Default implementation just uses adc2Linear to get all...
std::vector< Lut > inputLUT_