30 : m_rctInputLabel(iConfig.getParameter<
edm::
InputTag>(
"RctInputLabel")),
31 m_textFileName(iConfig.getParameter<
std::
string>(
"TextFileName")),
38 <<
"RctDigiToSourceCardText::RctDigiToSourceCardText : " 39 <<
" couldn't open the file " <<
m_textFileName <<
" for writing" << std::endl;
61 unsigned short logicalCardID;
65 unsigned short eIsoRank[18][4] = {{0}};
66 unsigned short eIsoCardId[18][4] = {{0}};
67 unsigned short eIsoRegionId[18][4] = {{0}};
68 unsigned short eNonIsoRank[18][4] = {{0}};
69 unsigned short eNonIsoCardId[18][4] = {{0}};
70 unsigned short eNonIsoRegionId[18][4] = {{0}};
73 unsigned numIsoEM[18] = {0};
74 unsigned numNonIsoEM[18] = {0};
76 for (L1CaloEmCollection::const_iterator iem = em->begin(); iem != em->end(); iem++) {
77 if (iem->isolated()) {
78 eIsoRank[iem->rctCrate()][numIsoEM[iem->rctCrate()]] = iem->rank();
79 eIsoCardId[iem->rctCrate()][numIsoEM[iem->rctCrate()]] = iem->rctCard();
80 eIsoRegionId[iem->rctCrate()][numIsoEM[iem->rctCrate()]] = iem->rctRegion();
81 numIsoEM[iem->rctCrate()]++;
83 eNonIsoRank[iem->rctCrate()][numNonIsoEM[iem->rctCrate()]] = iem->rank();
84 eNonIsoCardId[iem->rctCrate()][numNonIsoEM[iem->rctCrate()]] = iem->rctCard();
85 eNonIsoRegionId[iem->rctCrate()][numNonIsoEM[iem->rctCrate()]] = iem->rctRegion();
86 numNonIsoEM[iem->rctCrate()]++;
89 LogDebug(
"Electrons") <<
"Rank=" << iem->rank() <<
" Card=" << iem->rctCard() <<
" Region=" << iem->rctRegion()
90 <<
" Crate=" << iem->rctCrate() <<
" Isolated=" << iem->isolated();
94 unsigned short RC[18][7][2] = {{{0}}};
95 unsigned short RCof[18][7][2] = {{{0}}};
96 unsigned short RCtau[18][7][2] = {{{0}}};
97 unsigned short HF[18][4][2] = {{{0}}};
98 unsigned short HFQ[18][4][2] = {{{0}}};
99 unsigned short MIPbits[18][7][2] = {{{0}}};
100 unsigned short Qbits[18][7][2] = {{{0}}};
103 for (L1CaloRegionCollection::const_iterator irgn = rgn->begin(); irgn != rgn->end(); irgn++) {
104 if (irgn->id().isHf()) {
105 HF[irgn->rctCrate()][irgn->id().rctEta() - 7][irgn->id().rctPhi()] = irgn->et();
106 HFQ[irgn->rctCrate()][irgn->id().rctEta() - 7][irgn->id().rctPhi()] = irgn->fineGrain();
108 LogDebug(
"HFRegions") <<
"Et=" << irgn->et() <<
" FineGrain=" << irgn->fineGrain()
109 <<
" Eta=" << irgn->id().rctEta() <<
" Phi=" << irgn->id().rctPhi()
110 <<
" Crate=" << irgn->rctCrate();
112 RC[irgn->rctCrate()][irgn->rctCard()][irgn->rctRegionIndex()] = irgn->et();
113 RCof[irgn->rctCrate()][irgn->rctCard()][irgn->rctRegionIndex()] = irgn->overFlow();
114 RCtau[irgn->rctCrate()][irgn->rctCard()][irgn->rctRegionIndex()] = irgn->tauVeto();
115 MIPbits[irgn->rctCrate()][irgn->rctCard()][irgn->rctRegionIndex()] = irgn->mip();
116 Qbits[irgn->rctCrate()][irgn->rctCard()][irgn->rctRegionIndex()] = irgn->quiet();
118 LogDebug(
"Regions") <<
"Et=" << irgn->et() <<
" OverFlow=" << irgn->overFlow() <<
" tauVeto=" << irgn->tauVeto()
119 <<
" mip=" << irgn->mip() <<
" quiet=" << irgn->quiet() <<
" Card=" << irgn->rctCard()
120 <<
" Region=" << irgn->rctRegionIndex() <<
" Crate=" << irgn->rctCrate();
136 eNonIsoCardId[
crate],
137 eNonIsoRegionId[
crate],
void analyze(const edm::Event &, const edm::EventSetup &) override
void RC012toSTRING(unsigned short &logicalCardID, unsigned short &eventNumber, unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], std::string &dataString) const
~RctDigiToSourceCardText() override
std::ofstream m_file
file handle
edm::InputTag m_rctInputLabel
Label for RCT digis.
void RC56HFtoSTRING(unsigned short &logicalCardID, unsigned short &eventNumber, unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&HF)[4][2], unsigned short(&HFQ)[4][2], std::string &dataString) const
std::string m_textFileName
Name out output file.
void EMUtoSTRING(unsigned short &logicalCardID, unsigned short &eventNumber, unsigned short(&eIsoRank)[4], unsigned short(&eIsoCardId)[4], unsigned short(&eIsoRegionId)[4], unsigned short(&eNonIsoRank)[4], unsigned short(&eNonIsoCardId)[4], unsigned short(&eNonIsoRegionId)[4], unsigned short(&MIPbits)[7][2], unsigned short(&Qbits)[7][2], std::string &dataString) const
RctDigiToSourceCardText(const edm::ParameterSet &)
unsigned short m_nevt
event counter
void RC234toSTRING(unsigned short &logicalCardID, unsigned short &eventNumber, unsigned short(&RC)[7][2], unsigned short(&RCof)[7][2], unsigned short(&RCtau)[7][2], unsigned short(&sisterRC)[7][2], unsigned short(&sisterRCof)[7][2], unsigned short(&sisterRCtau)[7][2], std::string &dataString) const
SourceCardRouting m_scRouting
source card router
static const int NUM_RCT_CRATES
void RoutingModetoLogicalCardID(unsigned short &logicalCardID, int &RoutingMode, int &RCTCrateNumber) const