64 ofstream scalesFile(
"L1CaloInputScales_cfi.py");
68 scalesFile <<
"import FWCore.ParameterSet.Config as cms\n" << endl;
70 scalesFile <<
"L1CaloInputScalesProducer =cms.ESProducer(\"L1CaloInputScalesProducer\"," << endl;
71 scalesFile <<
"L1EcalEtThresholdsPositiveEta = cms.vdouble(" << endl;
77 for (
unsigned short absIeta = 1; absIeta <= 28; absIeta++) {
82 scalesFile << setprecision(8) <<
output;
85 if (absIeta == 28 && input == 0xFF) {
87 }
else if (nEntries > 254) {
88 scalesFile <<
")+cms.vdouble(";
99 scalesFile << endl <<
"\tL1EcalEtThresholdsNegativeEta = cms.vdouble(" << endl;
103 for (
unsigned short absIeta = 1; absIeta <= 28; absIeta++) {
106 for (
unsigned short input = 0; input <= 0xFF; input++) {
109 scalesFile << setprecision(8) <<
output;
112 if (absIeta == 28 && input == 0xFF) {
114 }
else if (nEntries > 254) {
115 scalesFile <<
")+cms.vdouble(";
126 scalesFile << endl <<
"\tL1HcalEtThresholdsPositiveEta = cms.vdouble(" << endl;
131 for (
unsigned short absIeta = 1; absIeta <= 32; absIeta++) {
132 for (
unsigned short input = 0; input <= 0xFF; input++) {
133 output = caloTPGTranscoder->
hcaletValue(absIeta, input);
134 scalesFile << setprecision(8) <<
output;
137 if (absIeta == 32 && input == 0xFF) {
139 }
else if (nEntries > 254) {
140 scalesFile <<
")+cms.vdouble(";
151 scalesFile << endl <<
"\tL1HcalEtThresholdsNegativeEta = cms.vdouble(" << endl;
155 for (
unsigned short absIeta = 1; absIeta <= 32; absIeta++) {
156 for (
unsigned short input = 0; input <= 0xFF; input++) {
157 output = caloTPGTranscoder->
hcaletValue(-absIeta, input);
158 scalesFile << setprecision(8) <<
output;
161 if (absIeta == 32 && input == 0xFF) {
163 }
else if (nEntries > 254) {
164 scalesFile <<
")+cms.vdouble(";
173 scalesFile <<
")" << endl;
void setEventSetup(const edm::EventSetup &evtSetup)
double getTPGInGeV(const EcalTriggerPrimitiveDigi &tpDigi)
static std::string const input
virtual double hcaletValue(const int &ieta, const int &iphi, const int &version, const int &compressedValue) const =0