56 gain_ = std::vector<float>(nluts, 0.);
57 ped_ = std::vector<float>(nluts, 0.);
61 throw cms::Exception(
"PROBLEM: This method should never be invoked!");
99 assert(file.is_open());
101 std::vector<HcalSubdetector> subdet;
105 std::getline(file, buffer);
106 std::getline(file, buffer);
108 unsigned int index = buffer.find(
"H", 0);
109 while (index < buffer.length()){
111 if (subdetStr ==
"HB") subdet.push_back(
HcalBarrel);
112 else if (subdetStr ==
"HE") subdet.push_back(
HcalEndcap);
113 else if (subdetStr ==
"HF") subdet.push_back(
HcalForward);
117 index = buffer.find(
"H", index);
121 size_t nCol = subdet.size();
124 std::vector<int> ietaU;
125 std::vector<int> ietaL;
126 std::vector<int> iphiU;
127 std::vector<int> iphiL;
128 std::vector<int> depU;
129 std::vector<int> depL;
130 std::vector< Lut > lutFromFile(nCol);
133 for (
size_t i=0;
i<nCol; ++
i) {
136 ietaL.push_back(ieta);
139 for (
size_t i=0;
i<nCol; ++
i) {
142 ietaU.push_back(ieta);
145 for (
size_t i=0;
i<nCol; ++
i) {
148 iphiL.push_back(iphi);
151 for (
size_t i=0;
i<nCol; ++
i) {
154 iphiU.push_back(iphi);
157 for (
size_t i=0;
i<nCol; ++
i) {
163 for (
size_t i=0;
i<nCol; ++
i) {
170 for (
size_t i=0; file >> lutValue;
i = (
i+1) % nCol){
171 lutFromFile[
i].push_back(lutValue);
177 for (
size_t i=0;
i<nCol; ++
i){
178 for (
int ieta = ietaL[
i]; ieta <= ietaU[
i]; ++ieta){
179 for (
int iphi = iphiL[
i]; iphi <= iphiU[
i]; ++iphi){
210 for (
int isub=0; isub<3; ++isub) {
215 if (lut==0)
throw cms::Exception(
"PROBLEM: No inputLUT_ in xml file for ") << detid << std::endl;
230 assert(metadata !=0);
233 std::map<int, float> cosh_ieta;
236 double eta1 = etas.first;
237 double eta2 = etas.second;
238 cosh_ieta[
i] = cosh((eta1 + eta2)/2.);
254 unsigned int mipMax = 0;
255 unsigned int mipMin = 0;
272 for (
int capId = 0; capId < 4; ++capId){
273 ped += calibrations.
pedestal(capId);
291 bool isMasked = ( (status &
bitToMask_) > 0 );
304 coder.
adc2fC(frame,samples);
305 float adc2fC = samples[0];
311 unsigned short data[] = {0, 0, 0};
316 coder.
adc2fC(upgradeFrame, upgradeSamples);
317 float adc2fC = upgradeSamples[0];
323 if (
adc >= mipMin and
adc < mipMax)
325 else if (
adc >= mipMax)
337 coder.
adc2fC(frame,samples);
338 float adc2fC = samples[0];
343 unsigned short data[] = {0, 0, 0, 0};
348 coder.
adc2fC(upgradeFrame, upgradeSamples);
349 float adc2fC = upgradeSamples[0];
363 for (
int i=0;
i<df.
size();
i++){
371 for (
int i=0;
i<df.
size();
i++){
399 return ped_.at(lutId);
404 return gain_.at(lutId);
413 msb.resize(df.
size());
414 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
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
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
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
virtual bool valid(const DetId &id) 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
std::vector< Lut > inputLUT_