31 : m_rctInputLabel(iConfig.getParameter<
edm::
InputTag>(
"RctInputLabel")),
32 m_textFileName(iConfig.getParameter<
std::
string>(
"TextFileName")),
39 <<
"RctDigiToSourceCardText::RctDigiToSourceCardText : " 65 unsigned short logicalCardID;
69 unsigned short eIsoRank[18][4] = {{0}};
70 unsigned short eIsoCardId[18][4] = {{0}};
71 unsigned short eIsoRegionId[18][4] = {{0}};
72 unsigned short eNonIsoRank[18][4] = {{0}};
73 unsigned short eNonIsoCardId[18][4] = {{0}};
74 unsigned short eNonIsoRegionId[18][4] = {{0}};
77 unsigned numIsoEM[18] = {0};
78 unsigned numNonIsoEM[18] = {0};
80 for (L1CaloEmCollection::const_iterator iem = em->begin(); iem != em->end();
82 if (iem->isolated()) {
83 eIsoRank[iem->rctCrate()][numIsoEM[iem->rctCrate()]] = iem->rank();
84 eIsoCardId[iem->rctCrate()][numIsoEM[iem->rctCrate()]] = iem->rctCard();
85 eIsoRegionId[iem->rctCrate()][numIsoEM[iem->rctCrate()]] =
87 numIsoEM[iem->rctCrate()]++;
89 eNonIsoRank[iem->rctCrate()][numNonIsoEM[iem->rctCrate()]] = iem->rank();
90 eNonIsoCardId[iem->rctCrate()][numNonIsoEM[iem->rctCrate()]] =
92 eNonIsoRegionId[iem->rctCrate()][numNonIsoEM[iem->rctCrate()]] =
94 numNonIsoEM[iem->rctCrate()]++;
97 LogDebug(
"Electrons") <<
"Rank=" << iem->rank()
98 <<
" Card=" << iem->rctCard()
99 <<
" Region=" << iem->rctRegion()
100 <<
" Crate=" << iem->rctCrate()
101 <<
" Isolated=" << iem->isolated();
105 unsigned short RC[18][7][2] = {{{0}}};
106 unsigned short RCof[18][7][2] = {{{0}}};
107 unsigned short RCtau[18][7][2] = {{{0}}};
108 unsigned short HF[18][4][2] = {{{0}}};
109 unsigned short HFQ[18][4][2] = {{{0}}};
110 unsigned short MIPbits[18][7][2] = {{{0}}};
111 unsigned short Qbits[18][7][2] = {{{0}}};
114 for (L1CaloRegionCollection::const_iterator irgn = rgn->begin();
115 irgn != rgn->end(); irgn++) {
116 if (irgn->id().isHf()) {
117 HF[irgn->rctCrate()][irgn->id().rctEta() - 7][irgn->id().rctPhi()] =
119 HFQ[irgn->rctCrate()][irgn->id().rctEta() - 7][irgn->id().rctPhi()] =
123 <<
"Et=" << irgn->et() <<
" FineGrain=" << irgn->fineGrain()
124 <<
" Eta=" << irgn->id().rctEta() <<
" Phi=" << irgn->id().rctPhi()
125 <<
" Crate=" << irgn->rctCrate();
127 RC[irgn->rctCrate()][irgn->rctCard()][irgn->rctRegionIndex()] =
129 RCof[irgn->rctCrate()][irgn->rctCard()][irgn->rctRegionIndex()] =
131 RCtau[irgn->rctCrate()][irgn->rctCard()][irgn->rctRegionIndex()] =
133 MIPbits[irgn->rctCrate()][irgn->rctCard()][irgn->rctRegionIndex()] =
135 Qbits[irgn->rctCrate()][irgn->rctCard()][irgn->rctRegionIndex()] =
138 LogDebug(
"Regions") <<
"Et=" << irgn->et()
139 <<
" OverFlow=" << irgn->overFlow()
140 <<
" tauVeto=" << irgn->tauVeto()
141 <<
" mip=" << irgn->mip()
142 <<
" quiet=" << irgn->quiet()
143 <<
" Card=" << irgn->rctCard()
144 <<
" Region=" << irgn->rctRegionIndex()
145 <<
" Crate=" << irgn->rctCrate();
157 logicalCardID,
m_nevt, eIsoRank[crate], eIsoCardId[crate],
158 eIsoRegionId[crate], eNonIsoRank[crate], eNonIsoCardId[crate],
159 eNonIsoRegionId[crate], MIPbits[crate], Qbits[crate], dataString);
170 RCtau[crate], HF[crate], HFQ[crate], dataString);
181 RCtau[crate], dataString);
194 RCtau[crate], RC[crate + 9], RCof[crate + 9],
195 RCtau[crate + 9], dataString);
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 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
void RoutingModetoLogicalCardID(unsigned short &logicalCardID, int &RoutingMode, int &RCTCrateNumber) 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
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
RctDigiToSourceCardText(const edm::ParameterSet &)
unsigned short m_nevt
event counter
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
SourceCardRouting m_scRouting
source card router
static const int NUM_RCT_CRATES