28 m_rctInputLabel(iConfig.getParameter<
edm::
InputTag>(
"RctInputLabel")),
29 m_textFileName(iConfig.getParameter<
std::
string>(
"TextFileName")),
38 <<
"RctDigiToSourceCardText::RctDigiToSourceCardText : " 39 <<
" couldn't open the file " <<
m_textFileName <<
" for writing" << std::endl;
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(); iem++){
82 eIsoRank[iem->rctCrate()][numIsoEM[iem->rctCrate()]]=iem->rank();
83 eIsoCardId[iem->rctCrate()][numIsoEM[iem->rctCrate()]]=iem->rctCard();
84 eIsoRegionId[iem->rctCrate()][numIsoEM[iem->rctCrate()]]=iem->rctRegion();
85 numIsoEM[iem->rctCrate()]++;
87 eNonIsoRank[iem->rctCrate()][numNonIsoEM[iem->rctCrate()]]=iem->rank();
88 eNonIsoCardId[iem->rctCrate()][numNonIsoEM[iem->rctCrate()]]=iem->rctCard();
89 eNonIsoRegionId[iem->rctCrate()][numNonIsoEM[iem->rctCrate()]]=iem->rctRegion();
90 numNonIsoEM[iem->rctCrate()]++;
93 LogDebug(
"Electrons") <<
"Rank=" << iem->rank()
94 <<
" Card=" << iem->rctCard()
95 <<
" Region=" << iem->rctRegion()
96 <<
" Crate=" << iem->rctCrate()
97 <<
" Isolated=" << iem->isolated();
101 unsigned short RC[18][7][2]={{{0}}};
102 unsigned short RCof[18][7][2]={{{0}}};
103 unsigned short RCtau[18][7][2]={{{0}}};
104 unsigned short HF[18][4][2]={{{0}}};
105 unsigned short HFQ[18][4][2]={{{0}}};
106 unsigned short MIPbits[18][7][2]={{{0}}};
107 unsigned short Qbits[18][7][2]={{{0}}};
110 for (L1CaloRegionCollection::const_iterator irgn=rgn->begin(); irgn!=rgn->end(); irgn++){
111 if (irgn->id().isHf()){
112 HF[irgn->rctCrate()][irgn->id().rctEta()-7][irgn->id().rctPhi()]=irgn->et();
113 HFQ[irgn->rctCrate()][irgn->id().rctEta()-7][irgn->id().rctPhi()]=irgn->fineGrain();
115 LogDebug(
"HFRegions") <<
"Et=" << irgn->et()
116 <<
" FineGrain=" << irgn->fineGrain()
117 <<
" Eta=" << irgn->id().rctEta()
118 <<
" Phi=" << irgn->id().rctPhi()
119 <<
" Crate=" << irgn->rctCrate();
121 RC[irgn->rctCrate()][irgn->rctCard()][irgn->rctRegionIndex()]=irgn->et();
122 RCof[irgn->rctCrate()][irgn->rctCard()][irgn->rctRegionIndex()]=irgn->overFlow();
123 RCtau[irgn->rctCrate()][irgn->rctCard()][irgn->rctRegionIndex()]=irgn->tauVeto();
124 MIPbits[irgn->rctCrate()][irgn->rctCard()][irgn->rctRegionIndex()]=irgn->mip();
125 Qbits[irgn->rctCrate()][irgn->rctCard()][irgn->rctRegionIndex()]=irgn->quiet();
127 LogDebug(
"Regions") <<
"Et=" << irgn->et()
128 <<
" OverFlow=" << irgn->overFlow()
129 <<
" tauVeto=" << irgn->tauVeto()
130 <<
" mip=" << irgn->mip()
131 <<
" quiet=" << irgn->quiet()
132 <<
" Card=" << irgn->rctCard()
133 <<
" Region=" << irgn->rctRegionIndex()
134 <<
" Crate=" << irgn->rctCrate();
151 eNonIsoCardId[crate],
152 eNonIsoRegionId[crate],
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
virtual void analyze(const edm::Event &, const edm::EventSetup &)
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
~RctDigiToSourceCardText()