9 using std::setprecision;
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++)
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++)
134 output = ecalTPGScale->
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++)
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++)
203 scalesFile << setprecision (8) <<
output ;
207 if (absIeta == 32 &&
input == 0xFF)
211 else if(nEntries>254)
213 scalesFile <<
")+cms.vdouble(";
225 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