9 using std::setprecision;
72 ecalTPGScale->setEventSetup(iSetup);
75 ofstream scalesFile(
"L1CaloInputScales_cfi.py");
80 scalesFile <<
"import FWCore.ParameterSet.Config as cms\n" <<endl;
82 scalesFile <<
"L1CaloInputScalesProducer =cms.ESProducer(\"L1CaloInputScalesProducer\"," << endl;
83 scalesFile <<
"L1EcalEtThresholdsPositiveEta = cms.vdouble(" << endl;
92 for (
unsigned short absIeta = 1; absIeta <= 28; absIeta++)
98 output = ecalTPGScale->getTPGInGeV( (
unsigned int)
input,
101 scalesFile << setprecision (8) <<
output;
104 if (absIeta == 28 && input == 0xFF)
108 else if(nEntries>254)
110 scalesFile <<
")+cms.vdouble(";
123 scalesFile << endl <<
"\tL1EcalEtThresholdsNegativeEta = cms.vdouble(" << endl;
127 for (
unsigned short absIeta = 1; absIeta <= 28; absIeta++)
137 scalesFile << setprecision (8) <<
output;
142 if (absIeta == 28 && input == 0xFF)
146 else if(nEntries>254)
148 scalesFile <<
")+cms.vdouble(";
161 scalesFile << endl <<
"\tL1HcalEtThresholdsPositiveEta = cms.vdouble(" << endl;
166 for (
unsigned short absIeta = 1; absIeta <= 32; absIeta++)
170 output = caloTPGTranscoder->hcaletValue(absIeta,
input);
171 scalesFile << setprecision (8) <<
output ;
175 if (absIeta == 32 &&
input == 0xFF)
179 else if(nEntries>254)
181 scalesFile <<
")+cms.vdouble(";
194 scalesFile << endl <<
"\tL1HcalEtThresholdsNegativeEta = cms.vdouble(" << endl;
198 for (
unsigned short absIeta = 1; absIeta <= 32; absIeta++)
202 output = caloTPGTranscoder->hcaletValue(-absIeta,
input);
203 scalesFile << setprecision (8) <<
output ;
207 if (absIeta == 32 &&
input == 0xFF)
211 else if(nEntries>254)
213 scalesFile <<
")+cms.vdouble(";
225 scalesFile <<
")" << endl;