24 : verbose_(ps.getUntrackedParameter<
bool>(
"verbose",
false))
31 cout <<
"L1TGMT: constructor...." << endl;
38 cout <<
"L1TGMT: analyze...." << endl;
44 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuGMTReadoutCollection";
49 int bx1st[4] = {9, 9, 9, 9};
54 vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
56 vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
58 for (RRItr = gmt_records.begin(); RRItr != gmt_records.end(); RRItr++) {
59 vector<L1MuRegionalCand> INPCands[4] = {
60 RRItr->getDTBXCands(), RRItr->getBrlRPCCands(), RRItr->getCSCCands(), RRItr->getFwdRPCCands()};
61 vector<L1MuGMTExtendedCand> GMTCands = RRItr->getGMTCands();
63 vector<L1MuRegionalCand>::const_iterator INPItr;
64 vector<L1MuGMTExtendedCand>::const_iterator GMTItr;
65 vector<L1MuGMTExtendedCand>::const_iterator GMTItr2;
67 int BxInEvent = RRItr->getBxInEvent();
70 int nSUBS[5] = {0, 0, 0, 0, 0};
71 for (
int i = 0;
i < 4;
i++) {
72 for (INPItr = INPCands[
i].begin(); INPItr != INPCands[
i].end(); ++INPItr) {
73 if (!INPItr->empty()) {
82 for (GMTItr = GMTCands.begin(); GMTItr != GMTCands.end(); ++GMTItr) {
94 int Bx = RRItr->getBxNr();
98 for (
int i = 0;
i < 4;
i++) {
99 for (INPItr = INPCands[
i].begin(); INPItr != INPCands[
i].end(); ++INPItr) {
108 int word = INPItr->getDataWord();
109 for (
int j = 0;
j < 32;
j++) {
116 for (GMTItr = GMTCands.begin(); GMTItr != GMTCands.end(); ++GMTItr) {
125 int word = GMTItr->getDataWord();
126 for (
int j = 0;
j < 32;
j++) {
131 if (GMTItr->isMatchedCand()) {
132 if (GMTItr->quality() > 3) {
137 }
else if (GMTItr->isRPC()) {
138 if (GMTItr->quality() > 3) {
144 if (GMTItr->quality() > 3) {
150 if (GMTItr != GMTCands.end()) {
151 for (GMTItr2 = GMTCands.begin(); GMTItr2 != GMTCands.end(); ++GMTItr2) {
152 if (GMTItr2 == GMTItr)
154 if (GMTItr2->empty())
156 if (GMTItr2->isRPC()) {
157 if (GMTItr->isFwd()) {
165 if (!(GMTItr->isFwd()) && GMTItr2->isFwd()) {
168 }
else if (GMTItr->isFwd() && !(GMTItr2->isFwd())) {
186 for (
int i = 0;
i < 4;
i++) {
204 for (
int id = 0;
id < 4;
id++) {
206 for (
int i = 0;
i < 4;
i++) {
218 for (
int i = 0;
i < 4;
i++) {
224 if (bx1st[
DTTF] < 9 && bx1st[
RPCb] < 9)
233 double phiout = double(
phi);
240 std::string subs[5] = {
"DTTF",
"RPCb",
"CSCTF",
"RPCf",
"GMT"};
253 double qtymin = -0.5;
270 for (
int j = 0;
j < 9;
j++) {
271 qscale[
j] = -0.5 +
j;
289 float etascale[5][66];
350 netascale[
GMT] =
i - 1;
356 for (
int i = 0;
i < 5;
i++) {
357 hname = subs[
i] +
"_nbx";
358 htitle = subs[
i] +
" multiplicity in bx";
359 subs_nbx[
i] = ibooker.
book2D(hname.data(), htitle.data(), 4, 1., 5., 5, -2.5, 2.5);
363 hname = subs[
i] +
"_eta";
364 htitle = subs[
i] +
" eta value";
365 subs_eta[
i] = ibooker.
book1D(hname.data(), htitle.data(), netascale[
i], etascale[
i]);
368 hname = subs[
i] +
"_phi";
369 htitle = subs[
i] +
" phi value";
370 subs_phi[
i] = ibooker.
book1D(hname.data(), htitle.data(), nphiscale, phiscale);
373 hname = subs[
i] +
"_pt";
374 htitle = subs[
i] +
" pt value";
378 hname = subs[
i] +
"_qty";
379 htitle = subs[
i] +
" qty value";
380 subs_qty[
i] = ibooker.
book1D(hname.data(), htitle.data(), nqty, qtymin, qtymax);
383 hname = subs[
i] +
"_etaphi";
384 htitle = subs[
i] +
" phi vs eta";
385 subs_etaphi[
i] = ibooker.
book2D(hname.data(), htitle.data(), netascale[
i], etascale[
i], nphiscale, phiscale);
389 hname = subs[
i] +
"_etaqty";
390 htitle = subs[
i] +
" qty vs eta";
391 subs_etaqty[
i] = ibooker.
book2D(hname.data(), htitle.data(), netascale[
i], etascale[
i], nqty, qscale);
395 hname = subs[
i] +
"_bits";
396 htitle = subs[
i] +
" bit population";
431 bx_number = ibooker.
book1D(
"Bx_Number",
"Bx number ROP chip", 3564, 0., 3564.);
434 dbx_chip = ibooker.
bookProfile(
"dbx_Chip",
"bx count difference wrt ROP chip", 5, 0., 5., 100, -4000., 4000.,
"i");
444 ibooker.
book1D(
"eta_DTCSC_and_RPC",
"eta of confirmed GMT candidates", netascale[
GMT], etascale[
GMT]);
448 ibooker.
book1D(
"eta_DTCSC_only",
"eta of unconfirmed DT/CSC candidates", netascale[
GMT], etascale[
GMT]);
454 phi_dtcsc_and_rpc = ibooker.
book1D(
"phi_DTCSC_and_RPC",
"phi of confirmed GMT candidates", nphiscale, phiscale);
457 phi_dtcsc_only = ibooker.
book1D(
"phi_DTCSC_only",
"phi of unconfirmed DT/CSC candidates", nphiscale, phiscale);
460 phi_rpc_only = ibooker.
book1D(
"phi_RPC_only",
"phi of unconfirmed RPC candidates", nphiscale, phiscale);
464 "eta vs phi map of confirmed GMT candidates",
473 "eta vs phi map of unconfirmed DT/CSC candidates",
482 "eta vs phi map of unconfirmed RPC candidates",
490 dist_phi_dt_rpc = ibooker.
book1D(
"dist_phi_DT_RPC",
"Dphi between DT and RPC candidates", 100, -125., 125.);
493 dist_phi_csc_rpc = ibooker.
book1D(
"dist_phi_CSC_RPC",
"Dphi between CSC and RPC candidates", 100, -125., 125.);
496 dist_phi_dt_csc = ibooker.
book1D(
"dist_phi_DT_CSC",
"Dphi between DT and CSC candidates", 100, -125., 125.);
499 dist_eta_dt_rpc = ibooker.
book1D(
"dist_eta_DT_RPC",
"Deta between DT and RPC candidates", 40, -1., 1.);
502 dist_eta_csc_rpc = ibooker.
book1D(
"dist_eta_CSC_RPC",
"Deta between CSC and RPC candidates", 40, -1., 1.);
505 dist_eta_dt_csc = ibooker.
book1D(
"dist_eta_DT_CSC",
"Deta between DT and CSC candidates", 40, -1., 1.);
508 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);
512 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);
516 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);
520 bx_dt_rpc = ibooker.
book2D(
"bx_DT_vs_RPC",
"1st bx DT vs. RPC", 5, -2.5, 2.5, 5, -2.5, 2.5);
524 bx_csc_rpc = ibooker.
book2D(
"bx_CSC_vs_RPC",
"1st bx CSC vs. RPC", 5, -2.5, 2.5, 5, -2.5, 2.5);
528 bx_dt_csc = ibooker.
book2D(
"bx_DT_vs_CSC",
"1st bx DT vs. CSC", 5, -2.5, 2.5, 5, -2.5, 2.5);
532 for (
int i = 0;
i < 4;
i++) {
533 hname = subs[
i] +
"_dbx";
534 htitle =
"dBx " + subs[
i] +
" to previous event";
535 subs_dbx[
i] = ibooker.
book2D(hname.data(), htitle.data(), 1000, 0., 1000., 4, 0., 4.);
536 for (
int j = 0;
j < 4;
j++) {