24 : verbose_(ps.getUntrackedParameter<
bool>(
"verbose",
false))
58 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuGMTReadoutCollection" ;
63 int bx1st[4] = {9, 9, 9, 9};
68 vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
70 vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
72 for( RRItr = gmt_records.begin(); RRItr != gmt_records.end(); RRItr++ )
75 vector<L1MuRegionalCand> INPCands[4] = {
76 RRItr->getDTBXCands(),
77 RRItr->getBrlRPCCands(),
79 RRItr->getFwdRPCCands()
81 vector<L1MuGMTExtendedCand> GMTCands = RRItr->getGMTCands();
83 vector<L1MuRegionalCand>::const_iterator INPItr;
84 vector<L1MuGMTExtendedCand>::const_iterator GMTItr;
85 vector<L1MuGMTExtendedCand>::const_iterator GMTItr2;
87 int BxInEvent = RRItr->getBxInEvent();
90 int nSUBS[5] = {0, 0, 0, 0, 0};
91 for(
int i=0;
i<4;
i++) {
92 for( INPItr = INPCands[
i].
begin(); INPItr != INPCands[
i].end(); ++INPItr ) {
93 if(!INPItr->empty()) {
95 if(bx1st[
i]==9) bx1st[
i]=BxInEvent;
101 for( GMTItr = GMTCands.begin(); GMTItr != GMTCands.end(); ++GMTItr ) {
102 if(!GMTItr->empty()) nSUBS[
GMT]++;
108 if(BxInEvent!=0)
continue;
111 int Bx = RRItr->getBxNr();
115 for(
int i=0;
i<4;
i++) {
116 for( INPItr = INPCands[
i].
begin(); INPItr != INPCands[
i].end(); ++INPItr ) {
117 if(INPItr->empty())
continue;
124 int word = INPItr->getDataWord();
125 for(
int j=0; j<32; j++ ) {
131 for( GMTItr = GMTCands.begin(); GMTItr != GMTCands.end(); ++GMTItr ) {
132 if(GMTItr->empty())
continue;
139 int word = GMTItr->getDataWord();
140 for(
int j=0; j<32; j++ ) {
144 if(GMTItr->isMatchedCand()) {
145 if(GMTItr->quality()>3) {
150 }
else if(GMTItr->isRPC()) {
151 if(GMTItr->quality()>3) {
157 if(GMTItr->quality()>3) {
163 if(GMTItr != GMTCands.end()){
164 for( GMTItr2 = GMTCands.begin(); GMTItr2 != GMTCands.end(); ++GMTItr2 ) {
165 if(GMTItr2==GMTItr)
continue;
166 if(GMTItr2->empty())
continue;
167 if(GMTItr2->isRPC()) {
168 if(GMTItr->isFwd()) {
176 if(!(GMTItr->isFwd()) && GMTItr2->isFwd()) {
179 }
else if(GMTItr->isFwd() && !(GMTItr2->isFwd())){
198 for(
int i=0;
i<4;
i++) {
211 for(
int id = 0;
id<4;
id++) {
213 for(
int i=0;
i<4;
i++) {
225 for(
int i=0;
i<4;
i++) {
232 if(bx1st[DTTF]<9 && bx1st[CSCTF]<9)
bx_dt_csc->
Fill(bx1st[DTTF], bx1st[CSCTF]);
237 double phiout = double(phi);
246 std::string subs[5] = {
"DTTF",
"RPCb",
"CSCTF",
"RPCf",
"GMT" };
258 int nqty=8;
double qtymin=-0.5;
double qtymax=7.5;
264 if(nbins>144) nbins=144;
265 for(
int j=0; j<=
nbins; j++) {
273 for(
int j=0; j<9; j++) {
274 qscale[j] = -0.5 + j;
283 if(nbins>31) nbins=31;
284 for(
int j=1; j<=
nbins; j++) {
287 ptscale[
nbins]=ptscale[nbins-1]+10.;
291 float etascale[5][66];
296 if(nbins>65) nbins = 65;
297 for(
int j=0; j<=
nbins; j++) {
305 if(nbins>65) nbins = 65;
306 for(
int j=0; j<=
nbins; j++) {
315 if(nbins>32) nbins = 32;
318 for(
int j=nbins; j>=0; j--,i++) {
321 for(
int j=0; j<=
nbins; j++,i++) {
324 netascale[
CSCTF]=i-1;
329 if(nbins>65) nbins = 65;
330 for(
int j=0; j<=
nbins; j++) {
338 if(nbins>32) nbins = 32;
341 for(
int j=nbins; j>0; j--,i++) {
344 for(
int j=0; j<=
nbins; j++,i++) {
354 for(
int i=0;
i<5;
i++) {
356 hname = subs[
i] +
"_nbx"; htitle = subs[
i] +
" multiplicity in bx";
357 subs_nbx[
i] = ibooker.
book2D(hname.data(),htitle.data(), 4, 1., 5., 5, -2.5, 2.5);
361 hname = subs[
i] +
"_eta"; htitle = subs[
i] +
" eta value";
362 subs_eta[
i] = ibooker.
book1D(hname.data(),htitle.data(), netascale[
i], etascale[
i]);
365 hname = subs[
i] +
"_phi"; htitle = subs[
i] +
" phi value";
366 subs_phi[
i] = ibooker.
book1D(hname.data(),htitle.data(), nphiscale, phiscale);
369 hname = subs[
i] +
"_pt"; htitle = subs[
i] +
" pt value";
373 hname = subs[
i] +
"_qty"; htitle = subs[
i] +
" qty value";
374 subs_qty[
i] = ibooker.
book1D(hname.data(),htitle.data(), nqty, qtymin, qtymax);
377 hname = subs[
i] +
"_etaphi"; htitle = subs[
i] +
" phi vs eta";
378 subs_etaphi[
i] = ibooker.
book2D(hname.data(),htitle.data(), netascale[
i], etascale[
i], nphiscale, phiscale);
382 hname = subs[
i] +
"_etaqty"; htitle = subs[
i] +
" qty vs eta";
383 subs_etaqty[
i] = ibooker.
book2D(hname.data(),htitle.data(), netascale[
i], etascale[
i], nqty, qscale);
387 hname = subs[
i] +
"_bits"; htitle = subs[
i] +
" bit population";
423 bx_number = ibooker.
book1D(
"Bx_Number",
"Bx number ROP chip", 3564, 0., 3564.);
426 dbx_chip = ibooker.
bookProfile(
"dbx_Chip",
"bx count difference wrt ROP chip", 5, 0., 5.,100,-4000.,4000.,
"i");
438 eta_dtcsc_only = ibooker.
book1D(
"eta_DTCSC_only",
"eta of unconfirmed DT/CSC candidates", netascale[GMT], etascale[GMT]);
441 eta_rpc_only = ibooker.
book1D(
"eta_RPC_only",
"eta of unconfirmed RPC candidates", netascale[GMT], etascale[GMT]);
447 phi_dtcsc_only = ibooker.
book1D(
"phi_DTCSC_only",
"phi of unconfirmed DT/CSC candidates", nphiscale, phiscale);
450 phi_rpc_only = ibooker.
book1D(
"phi_RPC_only",
"phi of unconfirmed RPC candidates", nphiscale, phiscale);
453 etaphi_dtcsc_and_rpc = ibooker.
book2D(
"etaphi_DTCSC_and_RPC",
"eta vs phi map of confirmed GMT candidates", netascale[GMT], etascale[GMT], nphiscale, phiscale);
457 etaphi_dtcsc_only = ibooker.
book2D(
"etaphi_DTCSC_only",
"eta vs phi map of unconfirmed DT/CSC candidates", netascale[GMT], etascale[GMT], nphiscale, phiscale);
461 etaphi_rpc_only = ibooker.
book2D(
"etaphi_RPC_only",
"eta vs phi map of unconfirmed RPC candidates", netascale[GMT], etascale[GMT], nphiscale, phiscale);
466 dist_phi_dt_rpc = ibooker.
book1D(
"dist_phi_DT_RPC",
"Dphi between DT and RPC candidates", 100, -125., 125.);
469 dist_phi_csc_rpc = ibooker.
book1D(
"dist_phi_CSC_RPC",
"Dphi between CSC and RPC candidates", 100, -125., 125.);
472 dist_phi_dt_csc = ibooker.
book1D(
"dist_phi_DT_CSC",
"Dphi between DT and CSC candidates", 100, -125., 125.);
476 dist_eta_dt_rpc = ibooker.
book1D(
"dist_eta_DT_RPC",
"Deta between DT and RPC candidates", 40, -1., 1.);
482 dist_eta_dt_csc = ibooker.
book1D(
"dist_eta_DT_CSC",
"Deta between DT and CSC candidates", 40, -1., 1.);
486 n_rpcb_vs_dttf = ibooker.
book2D(
"n_RPCb_vs_DTTF",
"n cands RPCb vs DTTF", 5, -0.5, 4.5, 5, -0.5, 4.5);
490 n_rpcf_vs_csctf = ibooker.
book2D(
"n_RPCf_vs_CSCTF",
"n cands RPCf vs CSCTF", 5, -0.5, 4.5, 5, -0.5, 4.5);
494 n_csctf_vs_dttf = ibooker.
book2D(
"n_CSCTF_vs_DTTF",
"n cands CSCTF vs DTTF", 5, -0.5, 4.5, 5, -0.5, 4.5);
498 bx_dt_rpc = ibooker.
book2D(
"bx_DT_vs_RPC",
"1st bx DT vs. RPC", 5, -2.5, 2.5, 5, -2.5, 2.5);
502 bx_csc_rpc = ibooker.
book2D(
"bx_CSC_vs_RPC",
"1st bx CSC vs. RPC", 5, -2.5, 2.5, 5, -2.5, 2.5);
506 bx_dt_csc = ibooker.
book2D(
"bx_DT_vs_CSC",
"1st bx DT vs. CSC", 5, -2.5, 2.5, 5, -2.5, 2.5);
511 for(
int i=0;
i<4;
i++) {
512 hname = subs[
i] +
"_dbx"; htitle =
"dBx " + subs[
i] +
" to previous event";
513 subs_dbx[
i] = ibooker.
book2D(hname.data(),htitle.data(), 1000, 0., 1000., 4, 0., 4.);
514 for(
int j=0; j<4; j++) {
L1TGMT(const edm::ParameterSet &ps)
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
MonitorElement * bx_number
void analyze(const edm::Event &e, const edm::EventSetup &c) override
const L1MuScale * getPtScale() const
get the Pt scale
MonitorElement * bookProfile(Args &&...args)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * phi_rpc_only
MonitorElement * subs_eta[5]
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * subs_nbx[5]
double phiconv_(float phi)
MonitorElement * dist_eta_dt_rpc
MonitorElement * subs_bits[5]
MonitorElement * subs_dbx[4]
MonitorElement * n_csctf_vs_dttf
MonitorElement * eta_dtcsc_and_rpc
MonitorElement * dist_eta_csc_rpc
MonitorElement * subs_etaphi[5]
const edm::EDGetTokenT< L1MuGMTReadoutCollection > gmtSource_
MonitorElement * regional_triggers
static const double piconv_
MonitorElement * etaphi_dtcsc_and_rpc
MonitorElement * etaphi_rpc_only
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
MonitorElement * eta_dtcsc_only
MonitorElement * eta_rpc_only
MonitorElement * n_rpcb_vs_dttf
MonitorElement * phi_dtcsc_only
const L1MuScale * getPhiScale() const
get the phi scale
MonitorElement * book1D(Args &&...args)
MonitorElement * bx_dt_csc
MonitorElement * subs_phi[5]
virtual unsigned getNBins() const =0
get number of bins
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
MonitorElement * dbx_chip
MonitorElement * dist_phi_dt_rpc
void setCurrentFolder(const std::string &fullpath)
MonitorElement * dist_phi_dt_csc
T const * product() const
MonitorElement * phi_dtcsc_and_rpc
MonitorElement * book2D(Args &&...args)
MonitorElement * subs_pt[5]
MonitorElement * subs_qty[5]
const L1MuScale * getRegionalEtaScale(int isys) const
get the regioanl muon trigger eta scale, isys = 0(DT), 1(bRPC), 2(CSC), 3(fwdRPC) ...
MonitorElement * bx_csc_rpc
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
MonitorElement * bx_dt_rpc
MonitorElement * dist_phi_csc_rpc
MonitorElement * etaphi_dtcsc_only
const L1MuScale * getGMTEtaScale() const
get the GMT eta scale
MonitorElement * subs_etaqty[5]
MonitorElement * dist_eta_dt_csc
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
T const * product() const
MonitorElement * n_rpcf_vs_csctf
virtual float getValue(unsigned i) const =0
get value of the underlying vector for bin i