53 inputLUT_ = std::vector<HcaluLUTTPGCoder::Lut>(nluts);
54 gain_ = std::vector<float>(nluts, 0.);
55 ped_ = std::vector<float>(nluts, 0.);
59 throw cms::Exception(
"PROBLEM: This method should never be invoked!");
97 assert(file.is_open());
99 std::vector<HcalSubdetector> subdet;
103 std::getline(file, buffer);
104 std::getline(file, buffer);
106 unsigned int index = buffer.find(
"H", 0);
107 while (index < buffer.length()){
109 if (subdetStr ==
"HB") subdet.push_back(
HcalBarrel);
110 else if (subdetStr ==
"HE") subdet.push_back(
HcalEndcap);
111 else if (subdetStr ==
"HF") subdet.push_back(
HcalForward);
115 index = buffer.find(
"H", index);
119 size_t nCol = subdet.size();
122 std::vector<int> ietaU;
123 std::vector<int> ietaL;
124 std::vector<int> iphiU;
125 std::vector<int> iphiL;
126 std::vector<int> depU;
127 std::vector<int> depL;
128 std::vector< Lut > lutFromFile(nCol);
131 for (
size_t i=0;
i<nCol; ++
i) {
134 ietaL.push_back(ieta);
137 for (
size_t i=0;
i<nCol; ++
i) {
140 ietaU.push_back(ieta);
143 for (
size_t i=0;
i<nCol; ++
i) {
146 iphiL.push_back(iphi);
149 for (
size_t i=0;
i<nCol; ++
i) {
152 iphiU.push_back(iphi);
155 for (
size_t i=0;
i<nCol; ++
i) {
161 for (
size_t i=0;
i<nCol; ++
i) {
168 for (
size_t i=0; file >> lutValue;
i = (
i+1) % nCol){
169 lutFromFile[
i].push_back(lutValue);
175 for (
size_t i=0;
i<nCol; ++
i){
176 for (
int ieta = ietaL[
i]; ieta <= ietaU[
i]; ++ieta){
177 for (
int iphi = iphiL[
i]; iphi <= iphiU[
i]; ++iphi){
208 for (
int isub=0; isub<3; ++isub) {
213 if (lut==
nullptr)
throw cms::Exception(
"PROBLEM: No inputLUT_ in xml file for ") << detid << std::endl;
228 assert(metadata !=
nullptr);
231 std::map<int, float> cosh_ieta;
234 double eta1 = etas.first;
235 double eta2 = etas.second;
236 cosh_ieta[
i] = cosh((eta1 + eta2)/2.);
253 unsigned int mipMax = 0;
254 unsigned int mipMin = 0;
272 for (
auto capId : {0,1,2,3}){
273 ped += calibrations.
pedestal(capId);
292 bool isMasked = ( (status &
bitToMask_) > 0 );
295 auto adc2fC = [channelCoder, shape](
unsigned int adc){
297 for (
auto capId : {0,1,2,3}) fC += channelCoder->
charge(*shape,
adc, capId);
315 if (isMasked) lut[
adc] = 0;
327 if (isMasked) lut[
adc] = 0;
340 for (
int i=0;
i<df.
size();
i++){
348 for (
int i=0;
i<df.
size();
i++){
376 return ped_.at(lutId);
381 return gain_.at(lutId);
390 msb.resize(df.
size());
391 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
float getPedestal() const
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
const HcalChannelStatus * getHcalChannelStatus(const HcalGenericDetId &fId) const
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 int QIE10_LUT_MSB
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
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
const HcalLutMetadata * getHcalLutMetadata() const
unsigned int FG_HF_threshold_
static const int QIE8_LUT_MSB
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
~HcaluLUTTPGCoder() override
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)
bool getMSB(const HcalDetId &id, int adc) const
float getLUTPedestal(HcalDetId id) const override
static const int kHcalEtaMask2
uint32_t getFGBitInfo() const
get FG bit information
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
int samples() const
total number of samples in the digi
static XMLProcessor * getInstance()
void compress(const IntegerCaloSamples &ics, const std::vector< bool > &featureBits, HcalTriggerPrimitiveDigi &tp) const override
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_
float charge(const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.