CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1TdeCSCTF.cc
Go to the documentation of this file.
1 /*
2  * L1TdeCSCTF.cc v1.0
3  * written by J. Gartner
4  */
5 
12 
17 
19 
22 
23 #include <iostream>
24 #include <iomanip>
25 #include <memory>
26 
27 
28 using namespace std;
29 using namespace edm;
30 
32  dataTrackProducer = pset.getParameter<edm::InputTag>("dataTrackProducer");
33  emulTrackProducer = pset.getParameter<edm::InputTag>("emulTrackProducer");
34  lctProducer = pset.getParameter<edm::InputTag>("lctProducer");
35 
36  m_dirName = pset.getUntrackedParameter("DQMFolder",
37  std::string("L1TEMU/CSCTFexpert"));
38 
39  ts=0;
40  eventNum = 0;
41 
42  ptLUTset = pset.getParameter<edm::ParameterSet>("PTLUT");
43 
44  dbe = NULL;
45  if(pset.getUntrackedParameter<bool>("DQMStore", false) )
46  {
47  dbe = Service<DQMStore>().operator->();
48  dbe->setVerbose(0);
49  dbe->setCurrentFolder(m_dirName);
50  }
51 
52  outFile = pset.getUntrackedParameter<string>("outFile", "");
53  if( outFile.size() != 0 )
54  {
55  edm::LogWarning("L1TdeCSCTF")
56  << "L1T Monitoring histograms will be saved to "
57  << outFile.c_str()
58  << endl;
59  }
60 
61  bool disable = pset. getUntrackedParameter<bool>("disableROOToutput", false);
62  if(disable){
63  outFile="";
64  }
65 
66  bzero(srLUTs_, sizeof(srLUTs_));
67  //int endcap =1, sector =1;
68  bool TMB07=true;
69  edm::ParameterSet srLUTset;
70  srLUTset.addUntrackedParameter<bool>("ReadLUTs", false);
71  srLUTset.addUntrackedParameter<bool>("Binary", false);
72  srLUTset.addUntrackedParameter<std::string>("LUTPath", "./");
73  for(int endcapItr = CSCDetId::minEndcapId(); endcapItr <= CSCDetId::maxEndcapId(); endcapItr++)
74  {
75  for(int sectorItr = CSCTriggerNumbering::minTriggerSectorId();sectorItr <= CSCTriggerNumbering::maxTriggerSectorId();sectorItr++)
76  {
77  for(int stationItr = 1; stationItr <= 4; stationItr++)
78  {
79  if(stationItr == 1)
80  {
81  for(int subsectorItr = 0; subsectorItr < 2; subsectorItr++)
82  {
83  srLUTs_[endcapItr-1][sectorItr-1][subsectorItr] = new CSCSectorReceiverLUT(endcapItr, sectorItr, subsectorItr+1, stationItr, srLUTset, TMB07);
84  }
85  } else {
86  srLUTs_[endcapItr-1][sectorItr-1][stationItr] = new CSCSectorReceiverLUT(endcapItr, sectorItr, 0, stationItr, srLUTset, TMB07);
87  } //if for station 1 or 234
88  } // stationItr loop
89  } // sectorItr loop
90  } // endcapItr loop
91 }
92 
94 {
95 
96 
98  // DQM Directory Structure //
100  DQMStore * dbe = 0;
101  dbe = Service<DQMStore>().operator->();
102  if( dbe ){
105  // Define Monitor Elements //
107 
108 
109  pt1Comp = dbe->book2D("pt1Comp","Hardware Vs. Emulator #Delta #phi_{12}",256,0,256,256,0,256);
110  pt1Comp->setAxisTitle("Hardware #Delta #phi_{12}",1);
111  pt1Comp->setAxisTitle("Emulator #Delta #phi_{12}",2);
112  pt2Comp = dbe->book2D("pt2Comp","Hardware Vs. Emulator #Delta #phi_{23}",16,0,16,16,0,16);
113  pt2Comp->setAxisTitle("Hardware #Delta #phi_{23}",1);
114  pt2Comp->setAxisTitle("Emulator #Delta #phi_{23}",2);
115  pt3Comp = dbe->book2D("pt3Comp","Hardware Vs. Emulator #eta",16,0,16,16,0,16);
116  pt3Comp->setAxisTitle("Hardware #eta",1);
117  pt3Comp->setAxisTitle("Emulator #eta",2);
118  pt4Comp = dbe->book2D("pt4Comp","Hardware Vs. Emulator Mode",16,0,16,16,0,16);
119  pt4Comp->setAxisTitle("Hardware Mode",1);
120  pt4Comp->setAxisTitle("Emulator Mode",2);
121  pt5Comp = dbe->book2D("pt5Comp","Hardware Vs. Emulator Sign",2,0,2,2,0,2);
122  pt5Comp->setAxisTitle("Hardware Sign",1);
123  pt5Comp->setAxisTitle("Emulator Sign",2);
124  pt6Comp = dbe->book2D("pt6Comp","Hardware Vs. Emulator FR bit",2,0,2,2,0,2);
125  pt6Comp->setAxisTitle("Hardware FR bit",1);
126  pt6Comp->setAxisTitle("Emulator FR bit",2);
127 
128  badBitMode1 = dbe->book1D("badBitMode1","P_{t} LUT address bit differences, emulator mode 1", 21,0,21);
129  badBitMode1->setAxisTitle("P_{t} Address Bit",1);
130  badBitMode2 = dbe->book1D("badBitMode2","P_{t} LUT address bit differences, emulator mode 2", 21,0,21);
131  badBitMode2->setAxisTitle("P_{t} Address Bit",1);
132  badBitMode3 = dbe->book1D("badBitMode3","P_{t} LUT address bit differences, emulator mode 3", 21,0,21);
133  badBitMode3->setAxisTitle("P_{t} Address Bit",1);
134  badBitMode4 = dbe->book1D("badBitMode4","P_{t} LUT address bit differences, emulator mode 4", 21,0,21);
135  badBitMode4->setAxisTitle("P_{t} Address Bit",1);
136  badBitMode5 = dbe->book1D("badBitMode5","P_{t} LUT address bit differences, emulator mode 5", 21,0,21);
137  badBitMode5->setAxisTitle("P_{t} Address Bit",1);
138  badBitMode6 = dbe->book1D("badBitMode6","P_{t} LUT address bit differences, emulator mode 6", 21,0,21);
139  badBitMode6->setAxisTitle("P_{t} Address Bit",1);
140  badBitMode7 = dbe->book1D("badBitMode7","P_{t} LUT address bit differences, emulator mode 7", 21,0,21);
141  badBitMode7->setAxisTitle("P_{t} Address Bit",1);
142  badBitMode8 = dbe->book1D("badBitMode8","P_{t} LUT address bit differences, emulator mode 8", 21,0,21);
143  badBitMode8->setAxisTitle("P_{t} Address Bit",1);
144  badBitMode9 = dbe->book1D("badBitMode9","P_{t} LUT address bit differences, emulator mode 9", 21,0,21);
145  badBitMode9->setAxisTitle("P_{t} Address Bit",1);
146  badBitMode10 = dbe->book1D("badBitMode10","P_{t} LUT address bit differences, emulator mode 10", 21,0,21);
147  badBitMode10->setAxisTitle("P_{t} Address Bit",1);
148  badBitMode11 = dbe->book1D("badBitMode11","P_{t} LUT address bit differences, emulator mode 11", 21,0,21);
149  badBitMode11->setAxisTitle("P_{t} Address Bit",1);
150  badBitMode12 = dbe->book1D("badBitMode12","P_{t} LUT address bit differences, emulator mode 12", 21,0,21);
151  badBitMode12->setAxisTitle("P_{t} Address Bit",1);
152  badBitMode13 = dbe->book1D("badBitMode13","P_{t} LUT address bit differences, emulator mode 13", 21,0,21);
153  badBitMode13->setAxisTitle("P_{t} Address Bit",1);
154  badBitMode14 = dbe->book1D("badBitMode14","P_{t} LUT address bit differences, emulator mode 14", 21,0,21);
155  badBitMode14->setAxisTitle("P_{t} Address Bit",1);
156  badBitMode15 = dbe->book1D("badBitMode15","P_{t} LUT address bit differences, emulator mode 15", 21,0,21);
157  badBitMode15->setAxisTitle("P_{t} Address Bit",1);
158 
159  trackCountComp = dbe->book2D("trackCountComp","Hardware Vs. Emulator track Multiplicity",4,-0.5,3.5,4,-0.5,3.5);
160  trackCountComp->setAxisTitle("Hardware track count",1);
161  trackCountComp->setAxisTitle("Emulator track count",2);
162 
163  ptLUTOutput = dbe->book2D("ptLUTOutput","Comparison of P_{t}LUT Output for spy muon",127,0,127,127,0,127);
164  ptLUTOutput->setAxisTitle("Hardware P_{t} LUT Out",1);
165  ptLUTOutput->setAxisTitle("Emulator P_{t} LUT Out",2);
166 
167  mismatchSector = dbe->book1D("mismatchSector","LCT Sector for mismatched tracks",6,0,6);
168  mismatchTime = dbe->book1D("mismatchTime","LCT Time bin for mismatched tracks", 7,3,10);
169  mismatchEndcap = dbe->book1D("mismatchEndcap","LCT endcap for mismatched tracks", 2,0,2);
170  mismatchPhi = dbe->book1D("mismatchPhi","LCT #phi for mismatched tracks",4096,0,4096);
171  mismatchEta = dbe->book1D("mismatchEta","LCT #eta for mismatched tracks",128,0,128);
172 
173  mismatchDelPhi12 = dbe->book1D("mismatchDelPhi12", "LCT #Delta #phi_{12}", 4096,0,4096);
174  mismatchDelPhi13 = dbe->book1D("mismatchDelPhi13", "LCT #Delta #phi_{13}", 4096,0,4096);
175  mismatchDelPhi14 = dbe->book1D("mismatchDelPhi14", "LCT #Delta #phi_{14}", 4096,0,4096);
176  mismatchDelPhi23 = dbe->book1D("mismatchDelPhi23", "LCT #Delta #phi_{23}", 4096,0,4096);
177  mismatchDelPhi24 = dbe->book1D("mismatchDelPhi24", "LCT #Delta #phi_{24}", 4096,0,4096);
178  mismatchDelPhi34 = dbe->book1D("mismatchDelPhi34", "LCT #Delta #phi_{34}", 4096,0,4096);
179 
180  mismatchDelEta12 = dbe->book1D("mismatchDelEta12", "LCT #Delta #eta_{12}", 128,0,128);
181  mismatchDelEta13 = dbe->book1D("mismatchDelEta13", "LCT #Delta #eta_{13}", 128,0,128);
182  mismatchDelEta14 = dbe->book1D("mismatchDelEta14", "LCT #Delta #eta_{14}", 128,0,128);
183  mismatchDelEta23 = dbe->book1D("mismatchDelEta23", "LCT #Delta #eta_{23}", 128,0,128);
184  mismatchDelEta24 = dbe->book1D("mismatchDelEta24", "LCT #Delta #eta_{24}", 128,0,128);
185  mismatchDelEta34 = dbe->book1D("mismatchDelEta34", "LCT #Delta #eta_{34}", 128,0,128);
186 
187  endTrackBadSector = dbe->book1D("endTrackBadSector", "Sector for PtLUT misalignment", 12,0,12);
188  endTrackBadFR = dbe->book1D("endTrackBadFR", "FR bit for PtLUT misalignment", 2, 0, 2);
189  endTrackBadEta = dbe->book1D("endTrackBadEta", "Eta for PtLUT misalignment", 16,0,16);
190  endTrackBadMode = dbe->book1D("endTrackBadMode", "Mode of track for PtLUT misalingment", 16,0,16);
191 
192  bxData = dbe->book1D("bxData", "Bunch Crossing Number for data track", 15, -5, 10);
193  bxEmu = dbe->book1D("bxEmu", "Bunch Crossing Number for emu track", 15, -5, 10);
194 
195  allLctBx = dbe->book1D("allLctBx", "Bunch Crossing Number for all Lcts", 15,-3,12);
196  }
197 
198 }
199 
201 
202  if(ptLUT_) delete ptLUT_;
203 
204  if ( outFile.size() != 0 && dbe ) dbe->save(outFile);
205  return;
206 }
207 
209  // Get LCT information
211  int lctArray[20][7];
212  short nLCTs=0;
213  for(int oj=0; oj<20; oj++) lctArray[oj][0]=0;
214  if( lctProducer.label() != "null" )
215  {
218 
219  // check validity of input collection
220  if(!LCTs.isValid()) {
221  edm::LogWarning("L1TdeCSCTF")
222  << "\n No valid [lct] product found: "
223  << " CSCCorrelatedLCTDigiCollection"
224  << std::endl;
225  return;
226  }
227 
229  es.get< L1MuTriggerScalesRcd >().get( scales ) ;
231  es.get< L1MuTriggerPtScaleRcd >().get( ptScale ) ;
232  ptLUT_ = new CSCTFPtLUT(ptLUTset, scales.product(), ptScale.product() );
233 
234  for(CSCCorrelatedLCTDigiCollection::DigiRangeIterator csc=LCTs.product()->begin(); csc!=LCTs.product()->end(); csc++)
235  {
236  int lctId=0;
237 
238  CSCCorrelatedLCTDigiCollection::Range range1 = LCTs.product()->get((*csc).first);
239  for(CSCCorrelatedLCTDigiCollection::const_iterator lct=range1.first; lct!=range1.second; lct++,lctId++)
240  {
241  CSCCorrelatedLCTDigiCollection::Range range1 = LCTs.product()->get((*csc).first);
243  for( lct = range1.first; lct!=range1.second; lct++)
244  {
245  int station = (*csc).first.station()-1;
246  int cscId = (*csc).first.triggerCscId()-1;
247  int sector = (*csc).first.triggerSector()-1;
248  int subSector = CSCTriggerNumbering::triggerSubSectorFromLabels((*csc).first);
249  int tbin = lct->getBX();
250  int fpga = ( subSector ? subSector-1 : station+1 );
251  int endcap = (*csc).first.endcap()-1;
252 
253  lclphidat lclPhi;
254  gblphidat gblPhi;
255  gbletadat gblEta;
256 
257  try{
258  lclPhi = srLUTs_[endcap][sector][fpga]->localPhi(lct->getStrip(), lct->getPattern(), lct->getQuality(), lct->getBend());
259  } catch ( cms::Exception &e ) {
260  bzero(&lclPhi, sizeof(lclPhi));
261  edm::LogWarning("L1TdeCSCTF:analyze()") << "Exception from LocalPhi LUT in endCap: " << endcap << ", sector: " << sector << ", fpga: " << fpga
262  << "(strip:" << lct->getStrip() << ", pattern:"<< lct->getPattern() << ", Q:" << lct->getQuality() << ", bend:" << lct->getBend() << std::endl;
263  }
264 
265  try{
266  gblPhi = srLUTs_[endcap][sector][fpga]->globalPhiME( lclPhi.phi_local, lct->getKeyWG(),cscId+1);
267  } catch ( cms::Exception &e ) {
268  bzero(&gblPhi,sizeof(gblPhi));
269  edm::LogWarning("L1TdeCSCTF:analyze()") << "Exception from GlobalPhi LUT in endCap: " << endcap << ", sector: " << sector << ", fpga: " << fpga
270  << "(local phi:" << lclPhi.phi_local << ", keyWG:" << lct->getKeyWG() << ",cscID:" << cscId+1 << std::endl;
271  }
272  try{
273  gblEta = srLUTs_[endcap][sector][fpga]->globalEtaME(lclPhi.phi_bend_local, lclPhi.phi_local,lct->getKeyWG(),cscId+1);
274  } catch ( cms::Exception &e ) {
275  bzero(&gblEta,sizeof(gblEta));
276  edm::LogWarning("L1TdeCSCTF:analyze()") << "Exception from GlobalEta LUT in endCap: " << endcap << ", sector: " << sector << ", fpga: " << fpga
277  << "(local phi bend:" << lclPhi.phi_bend_local << ", local phi:" << lclPhi.phi_local << ", keyWG: " << lct->getKeyWG() << ", cscID: " << cscId+1 << std::endl;
278  }
279 
280  allLctBx->Fill(tbin);
281 
282  if((nLCTs < 20))
283  {
284  lctArray[nLCTs][0] = 1;
285  lctArray[nLCTs][1] = sector;
286  lctArray[nLCTs][2] = tbin;
287  lctArray[nLCTs][3] = endcap;
288  lctArray[nLCTs][4] = gblPhi.global_phi;
289  lctArray[nLCTs][5] = gblEta.global_eta;
290  lctArray[nLCTs][6] = station;
291  nLCTs++;
292  }
293  }
294  }
295  }
296  }
297 
298  // Initialize Arrays
300  nDataMuons = 0; nEmulMuons = 0;
301  int dataMuonArray[8][3], emuMuonArray[8][3];
302  for( int joe=0; joe<8; joe++){
303  for( int rules=0; rules<3; rules++ )
304  {
305  dataMuonArray[joe][rules] = 0;
306  emuMuonArray[joe][rules] = 0;
307  }
308  }
309  // Get Hardware information, and check output of PtLUT
311  if( dataTrackProducer.label() != "null" )
312  {
315 
316  // check validity of input collection
317  if(!tracks.isValid()) {
318  edm::LogWarning("L1TdeCSCTF")
319  << "\n No valid [data tracks] product found: "
320  << " L1CSCTrackCollection"
321  << std::endl;
322  return;
323  }
324 
325 
326  for(L1CSCTrackCollection::const_iterator trk=tracks.product()->begin(); trk!=tracks.product()->end(); trk++)
327  {
328  bxData->Fill(trk->first.BX());
329  if( /*(((0x0f0000 &(trk->first.ptLUTAddress()) ) >> 16) != 0xb) &&*/ (nDataMuons < 8) && (trk->first.BX() <2) && (trk->first.BX() > -2) )
330  {
331  dataMuonArray[nDataMuons][0] = 0; //matched?
332  dataMuonArray[nDataMuons][1] = trk->first.ptLUTAddress();
333  dataMuonArray[nDataMuons][2] = trk->first.sector();
334  nDataMuons++;
335  }
336  /*
337  if( trk->first.outputLink() == 1)
338  {
339  int frBit = (0x200000 &(trk->first.ptLUTAddress()) ) >> 21;
340  int dataRank = trk->first.rank();
341  ptadd thePtAdd(trk->first.ptLUTAddress());
342  ptdat thePtDat = ptLUT_->Pt(thePtAdd);
343  int emuRank = thePtDat.front_rank;
344  if(frBit == 0) emuRank = thePtDat.rear_rank;
345  ptLUTOutput->Fill(dataRank, emuRank);
346  if(dataRank != emuRank)
347  {
348  endTrackBadSector->Fill(trk->first.sector());
349  endTrackBadFR->Fill(frBit);
350  int etaP = (0xf000 &(trk->first.ptLUTAddress()) ) >> 12;
351  endTrackBadEta->Fill(etaP);
352  int modeP = (0xf0000 &(trk->first.ptLUTAddress()) ) >> 16;
353  endTrackBadMode->Fill(modeP);
354  }
355  }*/
356  }
357  }
358  // Get Emulator information
360  if( emulTrackProducer.label() != "null" )
361  {
364 
365  // check validity of input collection
366  if(!tracks.isValid()) {
367  edm::LogWarning("L1TdeCSCTF")
368  << "\n No valid [emulator tracks] product found: "
369  << " L1CSCTrackCollection"
370  << std::endl;
371  return;
372  }
373 
374  for(L1CSCTrackCollection::const_iterator trk=tracks.product()->begin(); trk!=tracks.product()->end(); trk++)
375  {
376  bxEmu->Fill(trk->first.BX());
377  if( /*(((0x0f0000&trk->first.ptLUTAddress())>>16) != 0xb) &&*/ (nEmulMuons<8) && (trk->first.BX() <2) && (trk->first.BX() >-2))
378  {
379  emuMuonArray[nEmulMuons][0] = 0;
380  emuMuonArray[nEmulMuons][1] = trk->first.ptLUTAddress();
381  emuMuonArray[nEmulMuons][2] = trk->first.sector();
382  nEmulMuons++;
383  }
384  }
385  }
386  // Match Tracks by sector & mode in the case of multiple tracks
388  short int rightIndex[8];
389  for(int jjj=0; jjj<8; jjj++) rightIndex[jjj]= 20;
391  if( (nDataMuons==nEmulMuons) && (nDataMuons!=0) )
392  {
393  for(int hw=0; hw<nDataMuons; hw++)
394  {
395  int addDiffWin = 5;
396  for(int sw=0; sw<nEmulMuons; sw++)
397  {
398  if( emuMuonArray[sw][2] == dataMuonArray[hw][2] ) //make sure triggers are coming from same sector
399  {
400  int addDiff = 0;
401  int hwMode = (0x0f0000 & dataMuonArray[hw][1] )>>16;
402  int swMode = (0x0f0000 & emuMuonArray[sw][1] )>>16;
403  int thor = hwMode^swMode;
404  for(int jax=0; jax<4; jax++)
405  {
406  addDiff += 1 & (thor>>jax);
407  }
408  if( (addDiff <addDiffWin) && (emuMuonArray[sw][0]!=1) )
409  {
410  addDiffWin = addDiff;
411  rightIndex[hw] = sw;
412  }
413  }
414 
415  if( sw==nEmulMuons )
416  {
417  emuMuonArray[rightIndex[hw]][0]=1;
418  }
419  }
420  }
421 
422  for( int i=0; i<nEmulMuons; i++)
423  {
424  int hwModeM = (0x0f0000 & dataMuonArray[i][1] )>>16;
425  int swModeM = (0x0f0000 & emuMuonArray[rightIndex[i]][1] )>>16;
426  int thorM = hwModeM^swModeM;
427  for( int q=0; q<=22; q++)
428  {
429  int addDiff = (1<<q)&thorM;
430  if(addDiff != 0)
431  {
432  if(hwModeM == 0x1) badBitMode1->Fill(q);
433  if(hwModeM == 0x2) badBitMode2->Fill(q);
434  if(hwModeM == 0x3) badBitMode3->Fill(q);
435  if(hwModeM == 0x4) badBitMode4->Fill(q);
436  if(hwModeM == 0x5) badBitMode5->Fill(q);
437  if(hwModeM == 0x6) badBitMode6->Fill(q);
438  if(hwModeM == 0x7) badBitMode7->Fill(q);
439  if(hwModeM == 0x8) badBitMode8->Fill(q);
440  if(hwModeM == 0x9) badBitMode9->Fill(q);
441  if(hwModeM == 0xa) badBitMode10->Fill(q);
442  if(hwModeM == 0xb) badBitMode11->Fill(q);
443  if(hwModeM == 0xc) badBitMode12->Fill(q);
444  if(hwModeM == 0xd) badBitMode13->Fill(q);
445  if(hwModeM == 0xe) badBitMode14->Fill(q);
446  if(hwModeM == 0xf) badBitMode15->Fill(q);
447  }
448  }
449 
450  pt4Comp->Fill(hwModeM,swModeM);
451  if( hwModeM == swModeM)
452  {
453  int hwPhi1 = (0x0000ff & dataMuonArray[i][1]);
454  int swPhi1 = (0x0000ff & emuMuonArray[rightIndex[i]][1]);
455  int hwPhi2 = (0x000f00 & dataMuonArray[i][1])>>8;
456  int swPhi2 = (0x000f00 & emuMuonArray[rightIndex[i]][1])>>8;
457  int hwEta = (0x00f000 & dataMuonArray[i][1])>>12;
458  int swEta = (0x00f000 & emuMuonArray[rightIndex[i]][1])>>12;
459  int hwSign = (0x100000 & dataMuonArray[i][1])>>20;
460  int swSign = (0x100000 & emuMuonArray[rightIndex[i]][1])>>20;
461  int hwFr = (0x200000 & dataMuonArray[i][1])>>21;
462  int swFr = (0x200000 & emuMuonArray[rightIndex[i]][1])>>21;
463  pt1Comp->Fill(hwPhi1,swPhi1);
464  pt2Comp->Fill(hwPhi2,swPhi2);
465  pt3Comp->Fill(hwEta,swEta);
466  pt5Comp->Fill(hwSign,swSign);
467  pt6Comp->Fill(hwFr,swFr);
468  } else {
469  for(int ak=0; ak<=nLCTs; ak++)
470  {
471  if(lctArray[ak][1] == dataMuonArray[i][2])
472  {
473  mismatchSector->Fill(lctArray[ak][1]);
474  mismatchTime ->Fill(lctArray[ak][2]);
475  mismatchEndcap->Fill(lctArray[ak][3]);
476  mismatchPhi ->Fill(lctArray[ak][4]);
477  mismatchEta ->Fill(lctArray[ak][5]);
478  }
479  for(int akk=ak+1; akk<=nLCTs; akk++)
480  {
481  if(lctArray[ak][1] == lctArray[akk][1])
482  {
483  int delPhi = abs(lctArray[ak][4] - lctArray[akk][4]);
484  int delEta = abs(lctArray[ak][5] - lctArray[akk][5]);
485  int lowSta = (lctArray[ak][1] < lctArray[akk][1]) ? lctArray[ak][1] : lctArray[akk][1];
486  int hiSta = (lctArray[ak][1] > lctArray[akk][1]) ? lctArray[ak][1] : lctArray[akk][1];
487  switch(lowSta)
488  {
489  case 0:
490  switch(hiSta)
491  {
492  case 1:
493  mismatchDelPhi12->Fill(delPhi);
494  mismatchDelEta12->Fill(delEta);
495  case 2:
496  mismatchDelPhi13->Fill(delPhi);
497  mismatchDelEta13->Fill(delEta);
498  case 3:
499  mismatchDelPhi14->Fill(delPhi);
500  mismatchDelEta14->Fill(delEta);
501  break;
502  }
503  case 1:
504  switch(hiSta)
505  {
506  case 2:
507  mismatchDelPhi23->Fill(delPhi);
508  mismatchDelEta23->Fill(delEta);
509  case 3:
510  mismatchDelPhi24->Fill(delPhi);
511  mismatchDelEta24->Fill(delEta);
512  break;
513  }
514  case 2:
515  if(hiSta ==3)
516  {
517  mismatchDelPhi34->Fill(delPhi);
518  mismatchDelEta34->Fill(delEta);
519  }
520  break;
521  }
522  }
523  }
524  }
525  }
526  }
527  }
528 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
MonitorElement * badBitMode11
Definition: L1TdeCSCTF.h:51
CSCTFPtLUT * ptLUT_
Definition: L1TdeCSCTF.h:41
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
edm::InputTag lctProducer
Definition: L1TdeCSCTF.h:36
static int minEndcapId()
Definition: CSCDetId.h:238
MonitorElement * mismatchSector
Definition: L1TdeCSCTF.h:54
MonitorElement * badBitMode6
Definition: L1TdeCSCTF.h:50
MonitorElement * mismatchDelEta23
Definition: L1TdeCSCTF.h:63
MonitorElement * badBitMode14
Definition: L1TdeCSCTF.h:51
MonitorElement * mismatchDelPhi24
Definition: L1TdeCSCTF.h:62
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")
Definition: DQMStore.cc:1898
static int maxTriggerSectorId()
#define abs(x)
Definition: mlp_lapack.h:159
#define NULL
Definition: scimark2.h:8
MonitorElement * badBitMode9
Definition: L1TdeCSCTF.h:50
MonitorElement * pt5Comp
Definition: L1TdeCSCTF.h:52
edm::InputTag emulTrackProducer
Definition: L1TdeCSCTF.h:36
gbletadat globalEtaME(int phi_bend, int phi_local, int wire_group, int cscid) const
MonitorElement * mismatchDelPhi13
Definition: L1TdeCSCTF.h:62
MonitorElement * mismatchDelEta24
Definition: L1TdeCSCTF.h:63
MonitorElement * badBitMode10
Definition: L1TdeCSCTF.h:50
static int minTriggerSectorId()
MonitorElement * badBitMode13
Definition: L1TdeCSCTF.h:51
void Fill(long long x)
DQMStore * dbe
Definition: L1TdeCSCTF.h:44
MonitorElement * allLctBx
Definition: L1TdeCSCTF.h:61
MonitorElement * mismatchEta
Definition: L1TdeCSCTF.h:55
lclphidat localPhi(int strip, int pattern, int quality, int lr) const
Geometry Lookup Tables.
MonitorElement * badBitMode1
Definition: L1TdeCSCTF.h:49
MonitorElement * pt2Comp
Definition: L1TdeCSCTF.h:52
MonitorElement * mismatchDelEta13
Definition: L1TdeCSCTF.h:63
L1TdeCSCTF(edm::ParameterSet const &pset)
Definition: L1TdeCSCTF.cc:31
MonitorElement * badBitMode15
Definition: L1TdeCSCTF.h:51
MonitorElement * badBitMode12
Definition: L1TdeCSCTF.h:51
void analyze(edm::Event const &e, edm::EventSetup const &iSetup)
Definition: L1TdeCSCTF.cc:208
static int maxEndcapId()
Definition: CSCDetId.h:239
MonitorElement * pt4Comp
Definition: L1TdeCSCTF.h:52
MonitorElement * mismatchDelPhi23
Definition: L1TdeCSCTF.h:62
MonitorElement * badBitMode8
Definition: L1TdeCSCTF.h:50
MonitorElement * mismatchDelPhi34
Definition: L1TdeCSCTF.h:62
MonitorElement * bxData
Definition: L1TdeCSCTF.h:60
std::string outFile
Definition: L1TdeCSCTF.h:68
void endJob(void)
Definition: L1TdeCSCTF.cc:200
bool isValid() const
Definition: HandleBase.h:76
int eventNum
Definition: L1TdeCSCTF.h:38
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
MonitorElement * mismatchPhi
Definition: L1TdeCSCTF.h:55
MonitorElement * badBitMode5
Definition: L1TdeCSCTF.h:49
MonitorElement * endTrackBadFR
Definition: L1TdeCSCTF.h:57
int nDataMuons
Definition: L1TdeCSCTF.h:37
MonitorElement * mismatchDelEta12
Definition: L1TdeCSCTF.h:63
MonitorElement * mismatchDelPhi14
Definition: L1TdeCSCTF.h:62
MonitorElement * pt6Comp
Definition: L1TdeCSCTF.h:52
CSCSectorReceiverLUT * srLUTs_[2][6][5]
Definition: L1TdeCSCTF.h:70
MonitorElement * trackCountComp
Definition: L1TdeCSCTF.h:48
tuple tracks
Definition: testEve_cfg.py:39
void addUntrackedParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:203
class global_phi_data gblphidat
MonitorElement * badBitMode2
Definition: L1TdeCSCTF.h:49
MonitorElement * mismatchEndcap
Definition: L1TdeCSCTF.h:54
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
std::vector< DigiType >::const_iterator const_iterator
class local_phi_data lclphidat
Data Types.
static int triggerSubSectorFromLabels(int station, int chamber)
edm::InputTag dataTrackProducer
Definition: L1TdeCSCTF.h:36
T const * product() const
Definition: Handle.h:74
MonitorElement * bxEmu
Definition: L1TdeCSCTF.h:60
MonitorElement * badBitMode7
Definition: L1TdeCSCTF.h:50
MonitorElement * endTrackBadMode
Definition: L1TdeCSCTF.h:59
std::string const & label() const
Definition: InputTag.h:25
edm::ParameterSet ptLUTset
Definition: L1TdeCSCTF.h:42
MonitorElement * endTrackBadSector
Definition: L1TdeCSCTF.h:56
void beginJob()
Definition: L1TdeCSCTF.cc:93
MonitorElement * mismatchTime
Definition: L1TdeCSCTF.h:54
MonitorElement * pt1Comp
Definition: L1TdeCSCTF.h:52
MonitorElement * ptLUTOutput
Definition: L1TdeCSCTF.h:53
const L1MuTriggerScales * ts
Definition: L1TdeCSCTF.h:40
std::pair< const_iterator, const_iterator > Range
MonitorElement * badBitMode4
Definition: L1TdeCSCTF.h:49
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:642
class global_eta_data gbletadat
MonitorElement * mismatchDelEta34
Definition: L1TdeCSCTF.h:63
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
int nEmulMuons
Definition: L1TdeCSCTF.h:37
MonitorElement * pt3Comp
Definition: L1TdeCSCTF.h:52
std::string const & instance() const
Definition: InputTag.h:26
MonitorElement * mismatchDelEta14
Definition: L1TdeCSCTF.h:63
std::string m_dirName
Definition: L1TdeCSCTF.h:66
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
gblphidat globalPhiME(int phi_local, int wire_group, int cscid) const
MonitorElement * endTrackBadEta
Definition: L1TdeCSCTF.h:58
MonitorElement * badBitMode3
Definition: L1TdeCSCTF.h:49
MonitorElement * mismatchDelPhi12
Definition: L1TdeCSCTF.h:62