8 : inputFile_(iConfig.getParameter<
edm::FileInPath>(
"inputFile")),
9 inputStream_(inputFile_.
fullPath().c_str()),
21 produces<EcalTrigPrimDigiCollection>();
22 produces<HcalTrigPrimDigiCollection>();
28 std::cerr <<
"Input file didn't open!!" << std::endl;
62 ecalTPs->reserve(56 * 72);
63 hcalTPs->reserve(56 * 72 + 18 * 8);
64 const int nEcalSamples = 1;
65 const int nHcalSamples = 1;
76 unsigned short junk_counter = 0;
88 if ((junk_counter == 11) && (junk ==
"1-32")) {
92 }
while (junk !=
"LUTOut");
93 std::cout <<
"Skipped file header" << std::endl;
95 std::cout <<
"oldVersion_ TRUE (tower 1-32)" << std::endl;
97 std::cout <<
"oldVersion_ FALSE (tower 0-31)" << std::endl;
103 for (
int i = 0;
i < 72;
i++) {
105 for (
int j = 0;
j < 56;
j++) {
110 unsigned short crate;
112 unsigned short tower;
121 int encodedEtEcal = (
int)(eAddr >> 1);
122 bool fineGrainEcal = (
bool)(eAddr & 1);
123 int encodedEtHcal = (
int)(hAddr >> 1);
124 bool fineGrainHcal = (
bool)(hAddr & 1);
134 iPhi = ((72 + 18 - iPhi) % 72);
139 int zSide = (
iEta / absIeta);
150 ecalDigi.
setSize(nEcalSamples);
156 ecalTPs->push_back(ecalDigi);
160 hcalDigi.
setSize(nHcalSamples);
165 hcalTPs->push_back(hcalDigi);
170 for (
int i = 0;
i < 18;
i++) {
171 for (
int j = 0;
j < 8;
j++) {
173 int hfIEta = (
j % 4) + 29;
175 hfIEta = hfIEta * (-1);
179 int hfIPhi = (
i % 9) * 8 + (
j / 4) * 4 + 1;
184 hcalTPs->push_back(hfDigi);