26 : gmtSource_( ps.getParameter<
InputTag >(
"gmtSource") )
44 cout <<
"L1T Monitoring histograms will be saved to " <<
outputFile_.c_str() << endl;
85 LogInfo(
"EndJob") <<
"analyzed " <<
nev_ <<
" events";
103 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuGMTReadoutCollection with label "
109 int bx1st[4] = {9, 9, 9, 9};
114 vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
116 vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
118 for( RRItr = gmt_records.begin(); RRItr != gmt_records.end(); RRItr++ )
121 vector<L1MuRegionalCand> INPCands[4] = {
122 RRItr->getDTBXCands(),
123 RRItr->getBrlRPCCands(),
124 RRItr->getCSCCands(),
125 RRItr->getFwdRPCCands()
127 vector<L1MuGMTExtendedCand> GMTCands = RRItr->getGMTCands();
129 vector<L1MuRegionalCand>::const_iterator INPItr;
130 vector<L1MuGMTExtendedCand>::const_iterator GMTItr;
131 vector<L1MuGMTExtendedCand>::const_iterator GMTItr2;
133 int BxInEvent = RRItr->getBxInEvent();
136 int nSUBS[5] = {0, 0, 0, 0, 0};
137 for(
int i=0;
i<4;
i++) {
138 for( INPItr = INPCands[
i].
begin(); INPItr != INPCands[
i].end(); ++INPItr ) {
139 if(!INPItr->empty()) {
141 if(bx1st[
i]==9) bx1st[
i]=BxInEvent;
147 for( GMTItr = GMTCands.begin(); GMTItr != GMTCands.end(); ++GMTItr ) {
148 if(!GMTItr->empty()) nSUBS[
GMT]++;
154 if(BxInEvent!=0)
continue;
157 int Bx = RRItr->getBxNr();
158 int Ev = RRItr->getEvNr();
162 for(
int i=0;
i<4;
i++) {
163 for( INPItr = INPCands[
i].
begin(); INPItr != INPCands[
i].end(); ++INPItr ) {
164 if(INPItr->empty())
continue;
171 int word = INPItr->getDataWord();
172 for(
int j=0;
j<32;
j++ ) {
178 for( GMTItr = GMTCands.begin(); GMTItr != GMTCands.end(); ++GMTItr ) {
179 if(GMTItr->empty())
continue;
186 int word = GMTItr->getDataWord();
187 for(
int j=0;
j<32;
j++ ) {
191 if(GMTItr->isMatchedCand()) {
192 if(GMTItr->quality()>3) {
197 }
else if(GMTItr->isRPC()) {
198 if(GMTItr->quality()>3) {
204 if(GMTItr->quality()>3) {
210 if(GMTItr != GMTCands.end()){
211 for( GMTItr2 = GMTCands.begin(); GMTItr2 != GMTCands.end(); ++GMTItr2 ) {
212 if(GMTItr2==GMTItr)
continue;
213 if(GMTItr2->empty())
continue;
214 if(GMTItr2->isRPC()) {
215 if(GMTItr->isFwd()) {
223 if(!(GMTItr->isFwd()) && GMTItr2->isFwd()) {
226 }
else if(GMTItr->isFwd() && !(GMTItr2->isFwd())){
245 for(
int i=0;
i<4;
i++) {
258 for(
int id = 0;
id<4;
id++) {
260 for(
int i=0;
i<4;
i++) {
273 for(
int i=0;
i<4;
i++) {
280 if(bx1st[DTTF]<9 && bx1st[CSCTF]<9)
bx_dt_csc->
Fill(bx1st[DTTF], bx1st[CSCTF]);
285 double phiout = double(phi);
294 std::string subs[5] = {
"DTTF",
"RPCb",
"CSCTF",
"RPCf",
"GMT" };
310 dbe->
rmdir(
"L1T/L1TGMT");
318 int nqty=8;
double qtymin=-0.5;
double qtymax=7.5;
324 if(nbins>144) nbins=144;
333 for(
int j=0;
j<9;
j++) {
334 qscale[
j] = -0.5 +
j;
343 if(nbins>31) nbins=31;
347 ptscale[
nbins]=ptscale[nbins-1]+10.;
351 float etascale[5][66];
356 if(nbins>65) nbins = 65;
365 if(nbins>65) nbins = 65;
375 if(nbins>32) nbins = 32;
378 for(
int j=nbins;
j>=0;
j--,i++) {
384 netascale[
CSCTF]=i-1;
389 if(nbins>65) nbins = 65;
398 if(nbins>32) nbins = 32;
401 for(
int j=nbins;
j>0;
j--,i++) {
411 std::string hname(
"");
412 std::string htitle(
"");
414 for(
int i=0;
i<5;
i++) {
416 hname = subs[
i] +
"_nbx"; htitle = subs[
i] +
" multiplicity in bx";
417 subs_nbx[
i] = dbe->
book2D(hname.data(),htitle.data(), 4, 1., 5., 5, -2.5, 2.5);
421 hname = subs[
i] +
"_eta"; htitle = subs[
i] +
" eta value";
422 subs_eta[
i] = dbe->
book1D(hname.data(),htitle.data(), netascale[
i], etascale[
i]);
425 hname = subs[
i] +
"_phi"; htitle = subs[
i] +
" phi value";
426 subs_phi[
i] = dbe->
book1D(hname.data(),htitle.data(), nphiscale, phiscale);
429 hname = subs[
i] +
"_pt"; htitle = subs[
i] +
" pt value";
430 subs_pt[
i] = dbe->
book1D(hname.data(),htitle.data(), nptscale, ptscale);
433 hname = subs[
i] +
"_qty"; htitle = subs[
i] +
" qty value";
434 subs_qty[
i] = dbe->
book1D(hname.data(),htitle.data(), nqty, qtymin, qtymax);
437 hname = subs[
i] +
"_etaphi"; htitle = subs[
i] +
" phi vs eta";
438 subs_etaphi[
i] = dbe->
book2D(hname.data(),htitle.data(), netascale[
i], etascale[
i], nphiscale, phiscale);
442 hname = subs[
i] +
"_etaqty"; htitle = subs[
i] +
" qty vs eta";
443 subs_etaqty[
i] = dbe->
book2D(hname.data(),htitle.data(), netascale[
i], etascale[
i], nqty, qscale);
447 hname = subs[
i] +
"_bits"; htitle = subs[
i] +
" bit population";
483 bx_number = dbe->
book1D(
"Bx_Number",
"Bx number ROP chip", 3564, 0., 3564.);
486 dbx_chip = dbe->
bookProfile(
"dbx_Chip",
"bx count difference wrt ROP chip", 5, 0., 5.,100,-4000.,4000.,
"i");
496 netascale[
GMT], etascale[GMT]);
500 netascale[GMT], etascale[GMT]);
504 netascale[GMT], etascale[GMT]);
508 nphiscale, phiscale);
512 nphiscale, phiscale);
516 nphiscale, phiscale);
520 netascale[GMT], etascale[GMT], nphiscale, phiscale);
525 netascale[GMT], etascale[GMT], nphiscale, phiscale);
530 netascale[GMT], etascale[GMT], nphiscale, phiscale);
535 dist_phi_dt_rpc = dbe->
book1D(
"dist_phi_DT_RPC",
"Dphi between DT and RPC candidates", 100, -125., 125.);
538 dist_phi_csc_rpc = dbe->
book1D(
"dist_phi_CSC_RPC",
"Dphi between CSC and RPC candidates", 100, -125., 125.);
541 dist_phi_dt_csc = dbe->
book1D(
"dist_phi_DT_CSC",
"Dphi between DT and CSC candidates", 100, -125., 125.);
555 n_rpcb_vs_dttf = dbe->
book2D(
"n_RPCb_vs_DTTF",
"n cands RPCb vs DTTF", 5, -0.5, 4.5, 5, -0.5, 4.5);
559 n_rpcf_vs_csctf = dbe->
book2D(
"n_RPCf_vs_CSCTF",
"n cands RPCf vs CSCTF", 5, -0.5, 4.5, 5, -0.5, 4.5);
563 n_csctf_vs_dttf = dbe->
book2D(
"n_CSCTF_vs_DTTF",
"n cands CSCTF vs DTTF", 5, -0.5, 4.5, 5, -0.5, 4.5);
567 bx_dt_rpc = dbe->
book2D(
"bx_DT_vs_RPC",
"1st bx DT vs. RPC", 5, -2.5, 2.5, 5, -2.5, 2.5);
571 bx_csc_rpc = dbe->
book2D(
"bx_CSC_vs_RPC",
"1st bx CSC vs. RPC", 5, -2.5, 2.5, 5, -2.5, 2.5);
575 bx_dt_csc = dbe->
book2D(
"bx_DT_vs_CSC",
"1st bx DT vs. CSC", 5, -2.5, 2.5, 5, -2.5, 2.5);
580 for(
int i=0;
i<4;
i++) {
581 hname = subs[
i] +
"_dbx"; htitle =
"dBx " + subs[
i] +
" to previous event";
582 subs_dbx[
i] = dbe->
book2D(hname.data(),htitle.data(), 1000, 0., 1000., 4, 0., 4.);
583 for(
int j=0;
j<4;
j++) {
L1TGMT(const edm::ParameterSet &ps)
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * bx_number
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void rmdir(const std::string &fullpath)
const L1MuScale * getPtScale() const
get the Pt scale
void beginRun(const edm::Run &r, const edm::EventSetup &c)
MonitorElement * phi_rpc_only
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
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)
void analyze(const edm::Event &e, const edm::EventSetup &c)
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]
MonitorElement * regional_triggers
static const double piconv_
MonitorElement * etaphi_dtcsc_and_rpc
MonitorElement * etaphi_rpc_only
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
virtual float getValue(unsigned i) const =0
get value of the underlying vector for bin i
MonitorElement * bx_dt_csc
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
void setVerbose(unsigned level)
MonitorElement * subs_phi[5]
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
MonitorElement * dbx_chip
std::vector< L1MuGMTReadoutRecord > getRecords() const
void book_(const edm::EventSetup &c)
MonitorElement * dist_phi_dt_rpc
MonitorElement * dist_phi_dt_csc
MonitorElement * phi_dtcsc_and_rpc
MonitorElement * subs_pt[5]
T const * product() const
virtual unsigned getNBins() const =0
get number of bins
T const * product() const
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
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 * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
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)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * n_rpcf_vs_csctf