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);
void setSample(int i, const HcalTriggerPrimitiveSample &sam)
edm::SortedCollection< HcalTriggerPrimitiveDigi > HcalTrigPrimDigiCollection
~RctInputTextToDigi() override
#define DEFINE_FWK_MODULE(type)
T const * product() const
void setSample(int i, const EcalTriggerPrimitiveSample &sam)
Abs< T >::type abs(const T &t)
void produce(edm::Event &, const edm::EventSetup &) override
const L1RCTParameters * rctParameters() const
RctInputTextToDigi(const edm::ParameterSet &)
edm::SortedCollection< EcalTriggerPrimitiveDigi > EcalTrigPrimDigiCollection
L1RCTLookupTables * lookupTables_
std::ifstream inputStream_
void setRCTParameters(const L1RCTParameters *rctParameters)
short calcIEta(unsigned short iCrate, unsigned short iCard, unsigned short iTower) const
unsigned short calcIPhi(unsigned short iCrate, unsigned short iCard, unsigned short iTower) const