CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1TCSCTF.cc
Go to the documentation of this file.
1 /*
2  * \file L1TCSCTF.cc
3  *
4  * \author J. Berryhill
5  *
6  */
7 
10 
11 // includes to fetch all reguired data products from the edm::Event
17 
20 
21 
22 using namespace std;
23 using namespace edm;
24 
26 // if some piece of data is absent - configure corresponding source with 'null:'
27 // : csctfSource_( ps.getParameter< InputTag >("csctfSource") )
28  : gmtProducer( ps.getParameter< InputTag >("gmtProducer") ),
29  lctProducer( ps.getParameter< InputTag >("lctProducer") ),
30  trackProducer( ps.getParameter< InputTag >("trackProducer") ),
31  statusProducer( ps.getParameter< InputTag >("statusProducer") ),
32  mbProducer( ps.getParameter< InputTag >("mbProducer") )
33 {
34 
35  // verbosity switch
36  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
37 
38  if(verbose_) edm::LogInfo("DataNotFound") << "L1TCSCTF: constructor...." << endl;
39 
40 
41  dbe = NULL;
42  if ( ps.getUntrackedParameter<bool>("DQMStore", false) )
43  {
45  dbe->setVerbose(0);
46  }
47 
48  outputFile_ = ps.getUntrackedParameter<string>("outputFile", "");
49  if ( outputFile_.size() != 0 )
50  {
51  edm::LogInfo("DataNotFound") << "L1T Monitoring histograms will be saved to " << outputFile_.c_str() << endl;
52  }
53 
54  bool disable = ps.getUntrackedParameter<bool>("disableROOToutput", false);
55  if(disable){
56  outputFile_="";
57  }
58 
59  gangedME11a_ = ps.getUntrackedParameter<bool>("gangedME11a", false);
60 
61  if ( dbe !=NULL )
62  {
63  dbe->setCurrentFolder("L1T/L1TCSCTF");
64  }
65 
66  // instantiate standard on-fly SR LUTs from CSC TF emulator package
67  bzero(srLUTs_,sizeof(srLUTs_));
68  int endcap=1, sector=1; // assume SR LUTs are all same for every sector in either of endcaps
69  bool TMB07=true; // specific TMB firmware
70  // Create a dummy pset for SR LUTs
71  edm::ParameterSet srLUTset;
72  srLUTset.addUntrackedParameter<bool>("ReadLUTs", false);
73  srLUTset.addUntrackedParameter<bool>("Binary", false);
74  srLUTset.addUntrackedParameter<std::string>("LUTPath", "./");
75  for(int station=1,fpga=0; station<=4 && fpga<5; station++)
76  {
77  if(station==1)
78  for(int subSector=0; subSector<2 && fpga<5; subSector++)
79  srLUTs_[fpga++] = new CSCSectorReceiverLUT(endcap, sector, subSector+1, station, srLUTset, TMB07);
80  else
81  srLUTs_[fpga++] = new CSCSectorReceiverLUT(endcap, sector, 0, station, srLUTset, TMB07);
82  }
83 
84  //set Token(-s)
90 
91  gmtProducerToken_ = consumes<L1MuGMTReadoutCollection>(ps.getParameter< InputTag >("gmtProducer"));
92  statusToken_ = consumes<L1CSCStatusDigiCollection>(statusTag_);
93  corrlctsToken_ = consumes<CSCCorrelatedLCTDigiCollection>(corrlctsTag_);
94  tracksToken_ = consumes<L1CSCTrackCollection>(tracksTag_);
95  dtStubsToken_ = consumes<CSCTriggerContainer<csctf::TrackStub> >(dtStubsTag_);
96  mbtracksToken_ = consumes<L1CSCTrackCollection>(mbtracksTag_);
97 }
98 
100 {
101 
102  for(int i=0; i<5; i++)
103  delete srLUTs_[i]; //free the array of pointers
104 }
105 
107 {
108  m_scalesCacheID = -999;
109  m_ptScaleCacheID = -999;
110 
111  nev_ = 0;
112 
113  // get hold of back-end interface
114  DQMStore* dbe = 0;
115  dbe = Service<DQMStore>().operator->();
116 
117  if( dbe )
118  {
119  dbe->setCurrentFolder("L1T/L1TCSCTF");
120  dbe->rmdir("L1T/L1TCSCTF");
121  }
122 
123 
124  if( dbe )
125  {
126  dbe->setCurrentFolder("L1T/L1TCSCTF");
127 
128  // Error counting histogram:
129  // 1) checks TF data integrity (error rate - first bin),
130  // 2) monitors sychronization on input links (4 errors types: SE/SM/BX/AF; ORed for all time bins, links, and SPs),
131  // 3) reports FMM status (if in any SP FMM status != "Ready" - fill the last bin)
132  csctferrors = dbe->book1D("CSCTF_errors","CSCTF Errors",6,0,6);
133  csctferrors->setAxisTitle("Error type",1);
134  csctferrors->setAxisTitle("Number of Errors",2);
135  csctferrors->setBinLabel(1,"Corruptions",1);
136  csctferrors->setBinLabel(2,"Synch. Err.",1);
137  csctferrors->setBinLabel(3,"Synch. Mod.",1);
138  csctferrors->setBinLabel(4,"BX mismatch",1);
139  csctferrors->setBinLabel(5,"Time misalign.",1);
140  csctferrors->setBinLabel(6,"FMM != Ready",1);
141 
142  // Occupancy histogram Eta x Y, where Y:
143  // 1) Phi_packed of input LCTs from 1st, 2nd, 3rd, and 4th stations
144  // 2) Phi_packed of output tracks
145  // (all 12 SPs - 360 degree coveradge)
146  csctfoccupancies = dbe->book2D("CSCTF_occupancies", "CSCTF Occupancies", 64,-32,31,32,0,6.2);
147  csctfoccupancies->setAxisTitle("#eta",1);
148  csctfoccupancies->setAxisTitle("#phi",2);
149  csctfoccupancies->setBinLabel( 1,"-2.5", 1);
150  csctfoccupancies->setBinLabel( 8,"-2.1", 1);
151  csctfoccupancies->setBinLabel(18,"-1.6", 1);
152  csctfoccupancies->setBinLabel(26,"-1.2", 1);
153  csctfoccupancies->setBinLabel(32,"-0.9", 1);
154  csctfoccupancies->setBinLabel(33, "0.9", 1);
155  csctfoccupancies->setBinLabel(39, "1.2", 1);
156  csctfoccupancies->setBinLabel(47, "1.6", 1);
157  csctfoccupancies->setBinLabel(57, "2.1", 1);
158  csctfoccupancies->setBinLabel(64, "2.5", 1);
159 
160  // ... and for halo muons only
161  csctfoccupancies_H = dbe->book2D("CSCTF_occupancies_H", "CSCTF Halo Occupancies", 64,-32,31,32,0,6.2);
162  csctfoccupancies_H->setAxisTitle("#eta",1);
163  csctfoccupancies_H->setAxisTitle("#phi",2);
164  csctfoccupancies_H->setBinLabel( 1,"-2.5", 1);
165  csctfoccupancies_H->setBinLabel( 8,"-2.1", 1);
166  csctfoccupancies_H->setBinLabel(18,"-1.6", 1);
167  csctfoccupancies_H->setBinLabel(26,"-1.2", 1);
168  csctfoccupancies_H->setBinLabel(32,"-0.9", 1);
169  csctfoccupancies_H->setBinLabel(33, "0.9", 1);
170  csctfoccupancies_H->setBinLabel(39, "1.2", 1);
171  csctfoccupancies_H->setBinLabel(47, "1.6", 1);
172  csctfoccupancies_H->setBinLabel(57, "2.1", 1);
173  csctfoccupancies_H->setBinLabel(64, "2.5", 1);
174 
175  //haloDelEta12 = dbe->book1D("CSCTF_Halo_Eta12", "#Delta #eta_{12} for Halo Muons", 40, -0.20,0.30);
176  //haloDelEta112 = dbe->book1D("CSCTF_Halo_Eta112","#Delta #eta_{112} for Halo Muons", 40, -0.20,0.30);
177  //haloDelEta13 = dbe->book1D("CSCTF_Halo_Eta13", "#Delta #eta_{13} for Halo Muons", 40, -0.20,0.30);
178  //haloDelEta113 = dbe->book1D("CSCTF_Halo_Eta113","#Delta #eta_{113} for Halo Muons", 40, -0.20,0.30);
179 
180  // Quality VS Mode
181  trackModeVsQ = dbe->book2D("CSCTF_Track_ModeVsQual","CSC Track Mode Vs Quality", 19, -0.5, 18.5, 4, 0, 4);
182  trackModeVsQ->setAxisTitle("Track Type", 1);
183  trackModeVsQ->setBinLabel(1,"No Track",1);
184  trackModeVsQ->setBinLabel(2,"Bad Phi/Single",1);
185  trackModeVsQ->setBinLabel(3,"ME1-2-3",1);
186  trackModeVsQ->setBinLabel(4,"ME1-2-4",1);
187  trackModeVsQ->setBinLabel(5,"ME1-3-4",1);
188  trackModeVsQ->setBinLabel(6,"ME2-3-4",1);
189  trackModeVsQ->setBinLabel(7,"ME1-2",1);
190  trackModeVsQ->setBinLabel(8,"ME1-3",1);
191  trackModeVsQ->setBinLabel(9,"ME2-3",1);
192  trackModeVsQ->setBinLabel(10,"ME2-4",1);
193  trackModeVsQ->setBinLabel(11,"ME3-4",1);
194  trackModeVsQ->setBinLabel(12,"MB1-ME3",1);
195  trackModeVsQ->setBinLabel(13,"MB1-ME2",1);
196  trackModeVsQ->setBinLabel(14,"ME1-4",1);
197  trackModeVsQ->setBinLabel(15,"MB1-ME1",1);
198  trackModeVsQ->setBinLabel(16,"Halo Trigger",1);
199  trackModeVsQ->setBinLabel(17,"MB1-ME1-2",1);
200  trackModeVsQ->setBinLabel(18,"MB1-ME1-3",1);
201  trackModeVsQ->setBinLabel(19,"MB1-ME2-3",1);
202 
203  trackModeVsQ->setAxisTitle("Quality",2);
204  trackModeVsQ->setBinLabel(1,"0",2);
205  trackModeVsQ->setBinLabel(2,"1",2);
206  trackModeVsQ->setBinLabel(3,"2",2);
207  trackModeVsQ->setBinLabel(4,"3",2);
208 
209  // Mode
210  csctfTrackM = dbe->book1D("CSCTF_Track_Mode","CSC Track Mode", 19, -0.5, 18.5);
211  csctfTrackM->setAxisTitle("Track Type", 1);
212  csctfTrackM->setBinLabel(1,"No Track",1);
213  csctfTrackM->setBinLabel(2,"Bad Phi/Single",1);
214  csctfTrackM->setBinLabel(3,"ME1-2-3",1);
215  csctfTrackM->setBinLabel(4,"ME1-2-4",1);
216  csctfTrackM->setBinLabel(5,"ME1-3-4",1);
217  csctfTrackM->setBinLabel(6,"ME2-3-4",1);
218  csctfTrackM->setBinLabel(7,"ME1-2",1);
219  csctfTrackM->setBinLabel(8,"ME1-3",1);
220  csctfTrackM->setBinLabel(9,"ME2-3",1);
221  csctfTrackM->setBinLabel(10,"ME2-4",1);
222  csctfTrackM->setBinLabel(11,"ME3-4",1);
223  csctfTrackM->setBinLabel(12,"MB1-ME3",1);
224  csctfTrackM->setBinLabel(13,"MB1-ME2",1);
225  csctfTrackM->setBinLabel(14,"ME1-4",1);
226  csctfTrackM->setBinLabel(15,"MB1-ME1",1);
227  csctfTrackM->setBinLabel(16,"Halo Trigger",1);
228  csctfTrackM->setBinLabel(17,"MB1-ME1-2",1);
229  csctfTrackM->setBinLabel(18,"MB1-ME1-3",1);
230  csctfTrackM->setBinLabel(19,"MB1-ME2-3",1);
231 
232  // Chamber Occupancy
233  csctfChamberOccupancies = dbe->book2D("CSCTF_Chamber_Occupancies","CSCTF Chamber Occupancies", 54, -0.05, 5.35, 10, -5.5, 4.5);
234  csctfChamberOccupancies->setAxisTitle("Sector, (chambers 1-9 not labeled)",1);
238  csctfChamberOccupancies->setBinLabel(4,"ME-1b",2);
239  csctfChamberOccupancies->setBinLabel(5,"ME-1a",2);
240  csctfChamberOccupancies->setBinLabel(6,"ME+1a",2);
241  csctfChamberOccupancies->setBinLabel(7,"ME+1b",2);
244  csctfChamberOccupancies->setBinLabel(10,"ME+4",2);
251 
252  // Track Phi
253  csctfTrackPhi = dbe->book1D("CSCTF_Track_Phi", "CSCTF Track #phi",144,0,2*M_PI);
254  csctfTrackPhi->setAxisTitle("Track #phi", 1);
255 
256  // Track Eta
257  csctfTrackEta = dbe->book1D("CSCTF_Track_Eta", "CSCTF Track #eta",64,-32,32);
258  csctfTrackEta->setAxisTitle("Track #eta", 1);
259  csctfTrackEta->setBinLabel( 1,"-2.5", 1);
260  csctfTrackEta->setBinLabel( 8,"-2.1", 1);
261  csctfTrackEta->setBinLabel(18,"-1.6", 1);
262  csctfTrackEta->setBinLabel(26,"-1.2", 1);
263  csctfTrackEta->setBinLabel(32,"-0.9", 1);
264  csctfTrackEta->setBinLabel(33, "0.9", 1);
265  csctfTrackEta->setBinLabel(39, "1.2", 1);
266  csctfTrackEta->setBinLabel(47, "1.6", 1);
267  csctfTrackEta->setBinLabel(57, "2.1", 1);
268  csctfTrackEta->setBinLabel(64, "2.5", 1);
269 
270  // Track Eta Low Quality
271  csctfTrackEtaLowQ = dbe->book1D("CSCTF_Track_Eta_LowQ", "CSCTF Track #eta LQ",64,-32,32);
272  csctfTrackEtaLowQ->setAxisTitle("Track #eta", 1);
273  csctfTrackEtaLowQ->setBinLabel( 1,"-2.5", 1);
274  csctfTrackEtaLowQ->setBinLabel( 8,"-2.1", 1);
275  csctfTrackEtaLowQ->setBinLabel(18,"-1.6", 1);
276  csctfTrackEtaLowQ->setBinLabel(26,"-1.2", 1);
277  csctfTrackEtaLowQ->setBinLabel(32,"-0.9", 1);
278  csctfTrackEtaLowQ->setBinLabel(33, "0.9", 1);
279  csctfTrackEtaLowQ->setBinLabel(39, "1.2", 1);
280  csctfTrackEtaLowQ->setBinLabel(47, "1.6", 1);
281  csctfTrackEtaLowQ->setBinLabel(57, "2.1", 1);
282  csctfTrackEtaLowQ->setBinLabel(64, "2.5", 1);
283 
284 
285  // Track Eta High Quality
286  csctfTrackEtaHighQ = dbe->book1D("CSCTF_Track_Eta_HighQ", "CSCTF Track #eta HQ",64,-32,32);
287  csctfTrackEtaHighQ->setAxisTitle("Track #eta", 1);
288  csctfTrackEtaHighQ->setBinLabel( 1,"-2.5", 1);
289  csctfTrackEtaHighQ->setBinLabel( 8,"-2.1", 1);
290  csctfTrackEtaHighQ->setBinLabel(18,"-1.6", 1);
291  csctfTrackEtaHighQ->setBinLabel(26,"-1.2", 1);
292  csctfTrackEtaHighQ->setBinLabel(32,"-0.9", 1);
293  csctfTrackEtaHighQ->setBinLabel(33, "0.9", 1);
294  csctfTrackEtaHighQ->setBinLabel(39, "1.2", 1);
295  csctfTrackEtaHighQ->setBinLabel(47, "1.6", 1);
296  csctfTrackEtaHighQ->setBinLabel(57, "2.1", 1);
297  csctfTrackEtaHighQ->setBinLabel(64, "2.5", 1);
298 
299 
300  // Halo Phi
301  csctfTrackPhi_H = dbe->book1D("CSCTF_Track_Phi_H", "CSCTF Halo #phi",144,0,2*M_PI);
302  csctfTrackPhi_H->setAxisTitle("Track #phi", 1);
303 
304  // Halo Eta
305  csctfTrackEta_H = dbe->book1D("CSCTF_Track_Eta_H", "CSCTF Halo #eta",64,-32,32);
306  csctfTrackEta_H->setAxisTitle("Track #eta", 1);
307  csctfTrackEta_H->setBinLabel( 1,"-2.5", 1);
308  csctfTrackEta_H->setBinLabel( 8,"-2.1", 1);
309  csctfTrackEta_H->setBinLabel(18,"-1.6", 1);
310  csctfTrackEta_H->setBinLabel(26,"-1.2", 1);
311  csctfTrackEta_H->setBinLabel(32,"-0.9", 1);
312  csctfTrackEta_H->setBinLabel(33, "0.9", 1);
313  csctfTrackEta_H->setBinLabel(39, "1.2", 1);
314  csctfTrackEta_H->setBinLabel(47, "1.6", 1);
315  csctfTrackEta_H->setBinLabel(57, "2.1", 1);
316  csctfTrackEta_H->setBinLabel(64, "2.5", 1);
317 
318  // Track Timing
319  csctfbx = dbe->book2D("CSCTF_bx","CSCTF BX", 12,1,13, 7,-3,3) ;
320  csctfbx->setAxisTitle("Sector (Endcap)", 1);
321  csctfbx->setBinLabel( 1," 1 (+)",1);
322  csctfbx->setBinLabel( 2," 2 (+)",1);
323  csctfbx->setBinLabel( 3," 3 (+)",1);
324  csctfbx->setBinLabel( 4," 4 (+)",1);
325  csctfbx->setBinLabel( 5," 5 (+)",1);
326  csctfbx->setBinLabel( 6," 6 (+)",1);
327  csctfbx->setBinLabel( 7," 7 (-)",1);
328  csctfbx->setBinLabel( 8," 8 (-)",1);
329  csctfbx->setBinLabel( 9," 9 (-)",1);
330  csctfbx->setBinLabel(10,"10 (-)",1);
331  csctfbx->setBinLabel(11,"11 (-)",1);
332  csctfbx->setBinLabel(12,"12 (-)",1);
333 
334  csctfbx->setAxisTitle("CSCTF BX", 2);
335  csctfbx->setBinLabel( 1, "-3", 2);
336  csctfbx->setBinLabel( 2, "-2", 2);
337  csctfbx->setBinLabel( 3, "-1", 2);
338  csctfbx->setBinLabel( 4, "-0", 2);
339  csctfbx->setBinLabel( 5, " 1", 2);
340  csctfbx->setBinLabel( 6, " 2", 2);
341  csctfbx->setBinLabel( 7, " 3", 2);
342 
343  // Halo Timing
344  csctfbx_H = dbe->book2D("CSCTF_bx_H","CSCTF HALO BX", 12,1,13, 7,-3,3) ;
345  csctfbx_H->setAxisTitle("Sector (Endcap)", 1);
346  csctfbx_H->setBinLabel( 1," 1 (+)",1);
347  csctfbx_H->setBinLabel( 2," 2 (+)",1);
348  csctfbx_H->setBinLabel( 3," 3 (+)",1);
349  csctfbx_H->setBinLabel( 4," 4 (+)",1);
350  csctfbx_H->setBinLabel( 5," 5 (+)",1);
351  csctfbx_H->setBinLabel( 6," 6 (+)",1);
352  csctfbx_H->setBinLabel( 7," 7 (-)",1);
353  csctfbx_H->setBinLabel( 8," 8 (-)",1);
354  csctfbx_H->setBinLabel( 9," 9 (-)",1);
355  csctfbx_H->setBinLabel(10,"10 (-)",1);
356  csctfbx_H->setBinLabel(11,"11 (-)",1);
357  csctfbx_H->setBinLabel(12,"12 (-)",1);
358 
359  csctfbx_H->setAxisTitle("CSCTF BX", 2);
360  csctfbx_H->setBinLabel( 1, "-3", 2);
361  csctfbx_H->setBinLabel( 2, "-2", 2);
362  csctfbx_H->setBinLabel( 3, "-1", 2);
363  csctfbx_H->setBinLabel( 4, "-0", 2);
364  csctfbx_H->setBinLabel( 5, " 1", 2);
365  csctfbx_H->setBinLabel( 6, " 2", 2);
366  csctfbx_H->setBinLabel( 7, " 3", 2);
367 
368  // Number of Tracks Stubs
369  cscTrackStubNumbers = dbe->book1D("CSCTF_TrackStubs", "Number of Stubs in CSCTF Tracks", 5, 0, 5);
370  cscTrackStubNumbers->setBinLabel( 1, "0", 1);
371  cscTrackStubNumbers->setBinLabel( 2, "1", 1);
372  cscTrackStubNumbers->setBinLabel( 3, "2", 1);
373  cscTrackStubNumbers->setBinLabel( 4, "3", 1);
374  cscTrackStubNumbers->setBinLabel( 5, "4", 1);
375 
376  // Number of Tracks
377  csctfntrack = dbe->book1D("CSCTF_ntrack","Number of CSCTracks found per event", 5, 0, 5 ) ;
378  csctfntrack->setBinLabel( 1, "0", 1);
379  csctfntrack->setBinLabel( 2, "1", 1);
380  csctfntrack->setBinLabel( 3, "2", 1);
381  csctfntrack->setBinLabel( 4, "3", 1);
382  csctfntrack->setBinLabel( 5, "4", 1);
383  }
384 
385  char hname [200];
386  char htitle[200];
387 
388  for(int i=0; i<12; i++) {
389 
390  sprintf(hname ,"DTstubsTimeTrackMenTimeArrival_%d",i+1);
391  sprintf(htitle,"T_{track} - T_{DT stub} sector %d",i+1);
392 
393  DTstubsTimeTrackMenTimeArrival[i] = dbe->book2D(hname,htitle, 7,-3,3, 2,1,3);
394  DTstubsTimeTrackMenTimeArrival[i]->getTH2F()->SetMinimum(0);
395 
396  // axis makeup
397  DTstubsTimeTrackMenTimeArrival[i]->setAxisTitle("bx_{CSC track} - bx_{DT stub}",1);
399 
407 
410 
411  }
412 
413 
414  // NEW: CSC EVENT LCT PLOTS, Renjie Wang
415  csctflcts = dbe->book2D("CSCTF_LCT", "CSCTF LCTs", 12,1,13, 18,0,18);
416  csctflcts->setAxisTitle("CSCTF LCT BX",1);
417  csctflcts->setBinLabel(1,"1",1);
418  csctflcts->setBinLabel(2,"2",1);
419  csctflcts->setBinLabel(3,"3",1);
420  csctflcts->setBinLabel(4,"4",1);
421  csctflcts->setBinLabel(5,"5",1);
422  csctflcts->setBinLabel(6,"6",1);
423  csctflcts->setBinLabel(7,"7",1);
424  csctflcts->setBinLabel(8,"8",1);
425  csctflcts->setBinLabel(9,"9",1);
426  csctflcts->setBinLabel(10,"10",1);
427  csctflcts->setBinLabel(11,"11",1);
428  csctflcts->setBinLabel(12,"12",1);
429 
430  int ihist = 0;
431  for (int iEndcap = 0; iEndcap < 2; iEndcap++) {
432  for (int iStation = 1; iStation < 5; iStation++) {
433  for (int iRing = 1; iRing < 4; iRing++) {
434  if (iStation != 1 && iRing > 2) continue;
435  TString signEndcap="+";
436  if(iEndcap==0) signEndcap="-";
437 
438  char lcttitle[200];
439  snprintf(lcttitle,200,"ME%s%d/%d", signEndcap.Data(), iStation, iRing);
440  if(ihist<=8){
441  csctflcts -> setBinLabel(9-ihist,lcttitle,2);
442  }
443  else csctflcts -> setBinLabel(ihist+1,lcttitle,2);
444 
445  ihist++;
446  }
447  }
448  }
449 
450 
451  // plots for ME1/1 chambers
452  me11_lctStrip = dbe->book1D("CSC_ME11_LCT_Strip", "CSC_ME11_LCT_Strip", 223, 0, 223);
453  me11_lctStrip->setAxisTitle("Cathode HalfStrip, ME1/1", 1);
454 
455  me11_lctWire = dbe->book1D("CSC_ME11_LCT_Wire", "CSC_ME11_LCT_Wire", 112, 0, 112);
456  me11_lctWire->setAxisTitle("Anode Wiregroup, ME1/1", 1);
457 
458  me11_lctLocalPhi = dbe->book1D("CSC_ME11_LCT_LocalPhi", "CSC_ME11_LCT_LocalPhi", 200,0,1024);
459  me11_lctLocalPhi ->setAxisTitle("LCT Local #it{#phi}, ME1/1", 1);
460 
461  me11_lctPackedPhi = dbe->book1D("CSC_ME11_LCT_PackedPhi", "CSC_ME11_LCT_PackedPhi", 200,0,4096);
462  me11_lctPackedPhi ->setAxisTitle("LCT Packed #it{#phi}, ME1/1",1);
463 
464  me11_lctGblPhi = dbe->book1D("CSC_ME11_LCT_GblPhi", "CSC_ME11_LCT_GblPhi", 200, 0, 2*M_PI);
465  me11_lctGblPhi ->setAxisTitle("LCT Global #it{#phi}, ME1/1", 1);
466 
467  me11_lctGblEta = dbe->book1D("CSC_ME11_LCT_GblEta", "CSC_ME11_LCT_GblEta", 50, 0.9, 2.5);
468  me11_lctGblEta ->setAxisTitle("LCT Global #eta, ME1/1", 1);
469 
470 
471  // plots for ME4/2 chambers
472  me42_lctGblPhi = dbe->book1D("CSC_ME42_LCT_GblPhi", "CSC_ME42_LCT_GblPhi", 200, 0, 2*M_PI);
473  me42_lctGblPhi ->setAxisTitle("LCT Global #it{#phi}, ME4/2", 1);
474 
475  me42_lctGblEta = dbe->book1D("CSC_ME42_LCT_GblEta", "CSC_ME42_LCT_GblEta", 50, 0.9, 2.5);
476  me42_lctGblEta ->setAxisTitle("LCT Global #eta, ME4/2", 1);
477 
478 
479  //
480  csc_strip_MEplus11= dbe->book2D("csc_strip_MEplus11", "csc_strip_MEplus11", 36,1,37, 240,0,240);
481  csc_strip_MEplus11->setAxisTitle("Cathode HalfStrip", 2);
482  csc_strip_MEplus11->setAxisTitle("ME+1/1", 1);
483  csc_strip_MEplus12= dbe->book2D("csc_strip_MEplus12", "csc_strip_MEplus12", 36,1,37, 240,0,240);
484  csc_strip_MEplus12->setAxisTitle("Cathode HalfStrip", 2);
485  csc_strip_MEplus12->setAxisTitle("ME+1/2", 1);
486  csc_strip_MEplus13= dbe->book2D("csc_strip_MEplus13", "csc_strip_MEplus13", 36,1,37, 240,0,240);
487  csc_strip_MEplus13->setAxisTitle("Cathode HalfStrip", 2);
488  csc_strip_MEplus13->setAxisTitle("ME+1/3", 1);
489  csc_strip_MEplus21= dbe->book2D("csc_strip_MEplus21", "csc_strip_MEplus21", 18,1,19, 240,0,240);
490  csc_strip_MEplus21->setAxisTitle("Cathode HalfStrip", 2);
491  csc_strip_MEplus21->setAxisTitle("ME+2/1", 1);
492  csc_strip_MEplus22= dbe->book2D("csc_strip_MEplus22", "csc_strip_MEplus22", 36,1,37, 240,0,240);
493  csc_strip_MEplus22->setAxisTitle("Cathode HalfStrip", 2);
494  csc_strip_MEplus22->setAxisTitle("ME+2/2", 1);
495  csc_strip_MEplus31= dbe->book2D("csc_strip_MEplus31", "csc_strip_MEplus31", 18,1,19, 240,0,240);
496  csc_strip_MEplus31->setAxisTitle("Cathode HalfStrip", 2);
497  csc_strip_MEplus31->setAxisTitle("ME+3/1", 1);
498  csc_strip_MEplus32= dbe->book2D("csc_strip_MEplus32", "csc_strip_MEplus32", 36,1,37, 240,0,240);
499  csc_strip_MEplus32->setAxisTitle("Cathode HalfStrip", 2);
500  csc_strip_MEplus32->setAxisTitle("ME+3/2", 1);
501  csc_strip_MEplus41= dbe->book2D("csc_strip_MEplus41", "csc_strip_MEplus41", 18,1,19, 240,0,240);
502  csc_strip_MEplus41->setAxisTitle("Cathode HalfStrip", 2);
503  csc_strip_MEplus41->setAxisTitle("ME+4/1", 1);
504  csc_strip_MEplus42= dbe->book2D("csc_strip_MEplus42", "csc_strip_MEplus42", 36,1,37, 240,0,240);
505  csc_strip_MEplus42->setAxisTitle("Cathode HalfStrip", 2);
506  csc_strip_MEplus42->setAxisTitle("ME+4/2", 1);
507 
508  csc_strip_MEminus11= dbe->book2D("csc_strip_MEminus11", "csc_strip_MEminus11", 36,1,37, 240,0,240);
509  csc_strip_MEminus11->setAxisTitle("Cathode HalfStrip", 2);
510  csc_strip_MEminus11->setAxisTitle("ME-1/1", 1);
511  csc_strip_MEminus12= dbe->book2D("csc_strip_MEminus12", "csc_strip_MEminus12", 36,1,37, 240,0,240);
512  csc_strip_MEminus12->setAxisTitle("Cathode HalfStrip", 2);
513  csc_strip_MEminus12->setAxisTitle("ME-1/2", 1);
514  csc_strip_MEminus13= dbe->book2D("csc_strip_MEminus13", "csc_strip_MEminus13", 36,1,37, 240,0,240);
515  csc_strip_MEminus13->setAxisTitle("Cathode HalfStrip", 2);
516  csc_strip_MEminus13->setAxisTitle("ME-1/3", 1);
517  csc_strip_MEminus21= dbe->book2D("csc_strip_MEminus21", "csc_strip_MEminus21", 18,1,19, 240,0,240);
518  csc_strip_MEminus21->setAxisTitle("Cathode HalfStrip", 2);
519  csc_strip_MEminus21->setAxisTitle("ME-2/1", 1);
520  csc_strip_MEminus22= dbe->book2D("csc_strip_MEminus22", "csc_strip_MEminus22", 36,1,37, 240,0,240);
521  csc_strip_MEminus22->setAxisTitle("Cathode HalfStrip", 2);
522  csc_strip_MEminus22->setAxisTitle("ME-2/2", 1);
523  csc_strip_MEminus31= dbe->book2D("csc_strip_MEminus31", "csc_strip_MEminus31", 18,1,19, 240,0,240);
524  csc_strip_MEminus31->setAxisTitle("Cathode HalfStrip", 2);
525  csc_strip_MEminus31->setAxisTitle("ME-3/1", 1);
526  csc_strip_MEminus32= dbe->book2D("csc_strip_MEminus32", "csc_strip_MEminus32", 36,1,37, 240,0,240);
527  csc_strip_MEminus32->setAxisTitle("Cathode HalfStrip", 2);
528  csc_strip_MEminus32->setAxisTitle("ME-3/2", 1);
529  csc_strip_MEminus41= dbe->book2D("csc_strip_MEminus41", "csc_strip_MEminus41", 18,1,19, 240,0,240);
530  csc_strip_MEminus41->setAxisTitle("Cathode HalfStrip", 2);
531  csc_strip_MEminus41->setAxisTitle("ME-4/1", 1);
532  csc_strip_MEminus42= dbe->book2D("csc_strip_MEminus42", "csc_strip_MEminus42", 36,1,37, 240,0,240);
533  csc_strip_MEminus42->setAxisTitle("Cathode HalfStrip", 2);
534  csc_strip_MEminus42->setAxisTitle("ME-4/2", 1);
535 
536  csc_wire_MEplus11= dbe->book2D("csc_wire_MEplus11", "csc_wire_MEplus11", 36,1,37, 120,0,120);
537  csc_wire_MEplus11->setAxisTitle("Anode Wiregroup", 2);
538  csc_wire_MEplus11->setAxisTitle("ME+1/1", 1);
539  csc_wire_MEplus12= dbe->book2D("csc_wire_MEplus12", "csc_wire_MEplus12", 36,1,37, 120,0,120);
540  csc_wire_MEplus12->setAxisTitle("Anode Wiregroup", 2);
541  csc_wire_MEplus12->setAxisTitle("ME+1/2", 1);
542  csc_wire_MEplus13= dbe->book2D("csc_wire_MEplus13", "csc_wire_MEplus13", 36,1,37, 120,0,120);
543  csc_wire_MEplus13->setAxisTitle("Anode Wiregroup", 2);
544  csc_wire_MEplus13->setAxisTitle("ME+1/3", 1);
545  csc_wire_MEplus21= dbe->book2D("csc_wire_MEplus21", "csc_wire_MEplus21", 18,1,19, 120,0,120);
546  csc_wire_MEplus21->setAxisTitle("Anode Wiregroup", 2);
547  csc_wire_MEplus21->setAxisTitle("ME+2/1", 1);
548  csc_wire_MEplus22= dbe->book2D("csc_wire_MEplus22", "csc_wire_MEplus22", 36,1,37, 120,0,120);
549  csc_wire_MEplus22->setAxisTitle("Anode Wiregroup", 2);
550  csc_wire_MEplus22->setAxisTitle("ME+2/2", 1);
551  csc_wire_MEplus31= dbe->book2D("csc_wire_MEplus31", "csc_wire_MEplus31", 18,1,19, 120,0,120);
552  csc_wire_MEplus31->setAxisTitle("Anode Wiregroup", 2);
553  csc_wire_MEplus31->setAxisTitle("ME+3/1", 1);
554  csc_wire_MEplus32= dbe->book2D("csc_wire_MEplus32", "csc_wire_MEplus32", 36,1,37, 120,0,120);
555  csc_wire_MEplus32->setAxisTitle("Anode Wiregroup", 2);
556  csc_wire_MEplus32->setAxisTitle("ME+3/2", 1);
557  csc_wire_MEplus41= dbe->book2D("csc_wire_MEplus41", "csc_wire_MEplus41", 18,1,19, 120,0,120);
558  csc_wire_MEplus41->setAxisTitle("Anode Wiregroup", 2);
559  csc_wire_MEplus41->setAxisTitle("ME+4/1", 1);
560  csc_wire_MEplus42= dbe->book2D("csc_wire_MEplus42", "csc_wire_MEplus42", 36,1,37, 120,0,120);
561  csc_wire_MEplus42->setAxisTitle("Anode Wiregroup", 2);
562  csc_wire_MEplus42->setAxisTitle("ME+4/2", 1);
563 
564 
565  csc_wire_MEminus11= dbe->book2D("csc_wire_MEminus11", "csc_wire_MEminus11", 36,1,37, 120,0,120);
566  csc_wire_MEminus11->setAxisTitle("Anode Wiregroup", 2);
567  csc_wire_MEminus11->setAxisTitle("ME-1/1", 1);
568  csc_wire_MEminus12= dbe->book2D("csc_wire_MEminus12", "csc_wire_MEminus12", 36,1,37, 120,0,120);
569  csc_wire_MEminus12->setAxisTitle("Anode Wiregroup", 2);
570  csc_wire_MEminus12->setAxisTitle("ME-1/2", 1);
571  csc_wire_MEminus13= dbe->book2D("csc_wire_MEminus13", "csc_wire_MEminus13", 36,1,37, 120,0,120);
572  csc_wire_MEminus13->setAxisTitle("Anode Wiregroup", 2);
573  csc_wire_MEminus13->setAxisTitle("ME-1/3", 1);
574  csc_wire_MEminus21= dbe->book2D("csc_wire_MEminus21", "csc_wire_MEminus21", 18,1,19, 120,0,120);
575  csc_wire_MEminus21->setAxisTitle("Anode Wiregroup", 2);
576  csc_wire_MEminus21->setAxisTitle("ME-2/1", 1);
577  csc_wire_MEminus22= dbe->book2D("csc_wire_MEminus22", "csc_wire_MEminus22", 36,1,37, 120,0,120);
578  csc_wire_MEminus22->setAxisTitle("Anode Wiregroup", 2);
579  csc_wire_MEminus22->setAxisTitle("ME-2/2", 1);
580  csc_wire_MEminus31= dbe->book2D("csc_wire_MEminus31", "csc_wire_MEminus31", 18,1,19, 120,0,120);
581  csc_wire_MEminus31->setAxisTitle("Anode Wiregroup", 2);
582  csc_wire_MEminus31->setAxisTitle("ME-3/1", 1);
583  csc_wire_MEminus32= dbe->book2D("csc_wire_MEminus32", "csc_wire_MEminus32", 36,1,37, 120,0,120);
584  csc_wire_MEminus32->setAxisTitle("Anode Wiregroup", 2);
585  csc_wire_MEminus32->setAxisTitle("ME-3/2", 1);
586  csc_wire_MEminus41= dbe->book2D("csc_wire_MEminus41", "csc_wire_MEminus41", 18,1,19, 120,0,120);
587  csc_wire_MEminus41->setAxisTitle("Anode Wiregroup", 2);
588  csc_wire_MEminus41->setAxisTitle("ME-4/1", 1);
589  csc_wire_MEminus42= dbe->book2D("csc_wire_MEminus42", "csc_wire_MEminus42", 36,1,37, 120,0,120);
590  csc_wire_MEminus42->setAxisTitle("Anode Wiregroup", 2);
591  csc_wire_MEminus42->setAxisTitle("ME-4/2", 1);
592 
593 
594 
595 
596  for(int cscid = 1; cscid < 37; cscid++){
597  char bxtitle[100];
598  sprintf(bxtitle,"%d", cscid);
599 
600  csc_strip_MEplus11 ->setBinLabel(cscid,bxtitle,1);
601  csc_strip_MEplus12 ->setBinLabel(cscid,bxtitle,1);
602  csc_strip_MEplus13 ->setBinLabel(cscid,bxtitle,1);
603  csc_strip_MEplus22 ->setBinLabel(cscid,bxtitle,1);
604  csc_strip_MEplus32 ->setBinLabel(cscid,bxtitle,1);
605  csc_strip_MEplus42 ->setBinLabel(cscid,bxtitle,1);
606 
607  csc_strip_MEminus11 ->setBinLabel(cscid,bxtitle,1);
608  csc_strip_MEminus12 ->setBinLabel(cscid,bxtitle,1);
609  csc_strip_MEminus13 ->setBinLabel(cscid,bxtitle,1);
610  csc_strip_MEminus22 ->setBinLabel(cscid,bxtitle,1);
611  csc_strip_MEminus32 ->setBinLabel(cscid,bxtitle,1);
612  csc_strip_MEminus42 ->setBinLabel(cscid,bxtitle,1);
613 
614  csc_wire_MEplus11 ->setBinLabel(cscid,bxtitle,1);
615  csc_wire_MEplus12 ->setBinLabel(cscid,bxtitle,1);
616  csc_wire_MEplus13 ->setBinLabel(cscid,bxtitle,1);
617  csc_wire_MEplus22 ->setBinLabel(cscid,bxtitle,1);
618  csc_wire_MEplus32 ->setBinLabel(cscid,bxtitle,1);
619  csc_wire_MEplus42 ->setBinLabel(cscid,bxtitle,1);
620 
621  csc_wire_MEminus11 ->setBinLabel(cscid,bxtitle,1);
622  csc_wire_MEminus12 ->setBinLabel(cscid,bxtitle,1);
623  csc_wire_MEminus13 ->setBinLabel(cscid,bxtitle,1);
624  csc_wire_MEminus22 ->setBinLabel(cscid,bxtitle,1);
625  csc_wire_MEminus32 ->setBinLabel(cscid,bxtitle,1);
626  csc_wire_MEminus42 ->setBinLabel(cscid,bxtitle,1);
627  }
628 
629 
630  for(int cscid = 1; cscid < 19; cscid++){
631  char bxtitle[100];
632  sprintf(bxtitle,"%d", cscid);
633 
634  csc_strip_MEplus21 ->setBinLabel(cscid,bxtitle,1);
635  csc_strip_MEplus31 ->setBinLabel(cscid,bxtitle,1);
636  csc_strip_MEplus41 ->setBinLabel(cscid,bxtitle,1);
637 
638  csc_strip_MEminus21 ->setBinLabel(cscid,bxtitle,1);
639  csc_strip_MEminus31 ->setBinLabel(cscid,bxtitle,1);
640  csc_strip_MEminus41 ->setBinLabel(cscid,bxtitle,1);
641 
642  csc_wire_MEplus21 ->setBinLabel(cscid,bxtitle,1);
643  csc_wire_MEplus31 ->setBinLabel(cscid,bxtitle,1);
644  csc_wire_MEplus41 ->setBinLabel(cscid,bxtitle,1);
645 
646  csc_wire_MEminus21 ->setBinLabel(cscid,bxtitle,1);
647  csc_wire_MEminus31 ->setBinLabel(cscid,bxtitle,1);
648  csc_wire_MEminus41 ->setBinLabel(cscid,bxtitle,1);
649 
650  }
651 
652 
653 
654 
655 
656 
657 }
658 
659 
661 {
662 
663  if(verbose_) edm::LogInfo("DataNotFound") << "L1TCSCTF: end job...." << endl;
664  LogInfo("EndJob") << "analyzed " << nev_ << " events";
665 
666  if ( outputFile_.size() != 0 && dbe ) dbe->save(outputFile_);
667 
668  return;
669 }
670 
671 void L1TCSCTF::analyze(const Event& e, const EventSetup& c)
672 {
673 
675  c.get< L1MuTriggerPtScaleRcd >().cacheIdentifier() != m_ptScaleCacheID ){
676 
678  c.get< L1MuTriggerScalesRcd >().get(scales);
679  ts = scales.product();
681  c.get< L1MuTriggerPtScaleRcd >().get(ptscales);
682  tpts = ptscales.product();
683  m_scalesCacheID = c.get< L1MuTriggerScalesRcd >().cacheIdentifier();
684  m_ptScaleCacheID = c.get< L1MuTriggerPtScaleRcd >().cacheIdentifier();
685 
686  edm::LogInfo("L1TCSCTF") << "Changing triggerscales and triggerptscales...";
687  }
688 
689  int NumCSCTfTracksRep = 0;
690  nev_++;
691  if(verbose_) edm::LogInfo("DataNotFound") << "L1TCSCTF: analyze...." << endl;
692 
694  if( gmtProducer.label() != "null" )
695  { // GMT block
696  e.getByToken(gmtProducerToken_, pCollection);
697  if (!pCollection.isValid())
698  {
699  edm::LogInfo("DataNotFound") << "can't find L1MuGMTReadoutCollection with label "; // << csctfSource_.label() ;
700  return;
701  }
702 
703  L1MuGMTReadoutCollection const* gmtrc = pCollection.product();
704  vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
705  vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
706 
707  // Look if the readout window contains one (and only one CSC cands)
708  // to make it simpler I reject events with more than a CSC cand in the
709  // same readout window
710 
711  // count non-empty candidates in this bx
712  int bxWindow = 0;
713  int nCands = 0;
714 
715  for( RRItr = gmt_records.begin(); RRItr != gmt_records.end(); RRItr++ ) {
716  bxWindow++;
717 
718  // get the csc candidates
719  vector<L1MuRegionalCand> INPCands = RRItr->getCSCCands();
720  vector<L1MuRegionalCand>::const_iterator INPItr;
721 
722  BxInEvent_ = 0;
723  isCSCcand_ = false;
724  int nCandsBx = 0;
725 
726  for( INPItr = INPCands.begin(); INPItr != INPCands.end(); ++INPItr ) {
727  if(!INPItr->empty())
728  {
729  nCandsBx++;
730  nCands++;
731  BxInEvent_ = RRItr->getBxInEvent();
732  if (verbose_) edm::LogInfo("DataNotFound") << "cand " << nCandsBx << " -> assigned CSCTF bx: " << INPItr->bx() << endl;
733  }
734  }
735  if (verbose_)
736  if(nCandsBx) edm::LogInfo("DataNotFound") << nCandsBx << " cands in bx: " << BxInEvent_ << endl;
737  }
738 
739  if (nCands != 1) return;
740  else isCSCcand_ = true;
741  if (verbose_) edm::LogInfo("DataNotFound") << "bxWindow: " << bxWindow << endl;
742 
743  int ncsctftrack = 0;
744  if (verbose_)
745  {
746  edm::LogInfo("DataNotFound") << "\tCSCTFCand ntrack " << ncsctftrack << endl;
747  }
748  } // end of GMT block
749 
750  L1ABXN = -999;
751  if( statusProducer.label() != "null" )
752  {
754  e.getByToken(statusToken_, status);
755  bool integrity=status->first, se=false, sm=false, bx=false, af=false, fmm=false;
756  int nStat = 0;
757 
758  for(std::vector<L1CSCSPStatusDigi>::const_iterator stat=status->second.begin(); stat!=status->second.end(); stat++)
759  {
760  se |= stat->SEs()&0xFFF;
761  sm |= stat->SMs()&0xFFF;
762  bx |= stat->BXs()&0xFFF;
763  af |= stat->AFs()&0xFFF;
764  fmm|= stat->FMM()!=8;
765 
766  if(stat->VPs() != 0)
767  {
768  L1ABXN += stat->BXN();
769  nStat++;
770  }
771  }
772  // compute the average
773  if(nStat!=0) L1ABXN /= nStat;
774  if(integrity) csctferrors->Fill(0.5);
775  if(se) csctferrors->Fill(1.5);
776  if(sm) csctferrors->Fill(2.5);
777  if(bx) csctferrors->Fill(3.5);
778  if(af) csctferrors->Fill(4.5);
779  if(fmm) csctferrors->Fill(5.5);
780  }
781 
782  if( lctProducer.label() != "null" )
783  {
785  c.get<MuonGeometryRecord>().get( pDD );
787 
789  e.getByToken(corrlctsToken_, corrlcts);
790 
791  for(CSCCorrelatedLCTDigiCollection::DigiRangeIterator csc=corrlcts.product()->begin(); csc!=corrlcts.product()->end(); csc++)
792  {
793  CSCCorrelatedLCTDigiCollection::Range range1 = corrlcts.product()->get((*csc).first);
794  for(CSCCorrelatedLCTDigiCollection::const_iterator lct=range1.first; lct!=range1.second; lct++)
795  {
796  int endcap = (*csc).first.endcap()-1;
797  int station = (*csc).first.station()-1;
798  int sector = (*csc).first.triggerSector()-1;
799  int subSector = CSCTriggerNumbering::triggerSubSectorFromLabels((*csc).first);
800  int ring = (*csc).first.ring();
801  int cscId = (*csc).first.triggerCscId()-1;
802  int fpga = ( subSector ? subSector-1 : station+1 );
803  int strip = lct -> getStrip();
804  int keyWire = lct -> getKeyWG();
805  int bx = lct -> getBX();
806 
807  int endcapAssignment = 1;
808  int shift = 1;
809  float sectorArg = sector;
810  //float sectorArg = j;
811 
812  if( endcap == 1 ){
813  endcapAssignment = -1;
814  shift = 2;
815  //sectorArg = sector - 6;
816  }
817 
818  int signedStation = (station + shift)* endcapAssignment;
819  if( (station == 0) && (endcap == 0)) signedStation = subSector - 1;
820  if( (station == 0) && (endcap == 1)) signedStation = (-1)*subSector;
821 
822  float chamberArg1 = cscId * 0.1 + sectorArg;
823  //float chamberArg1 = i*0.1 + sectorArg;
824  //std::cout << "First" << i << " " << sectorArg << " " << chamberArg1 << std::endl;
825 
826  float chamberArg11 = chamberArg1;
827  if(sectorArg == 1) chamberArg1 = chamberArg11 - 0.1;
828  if(sectorArg == 2) chamberArg1 = chamberArg11 - 0.2;
829  if(sectorArg == 3) chamberArg1 = chamberArg11 - 0.3;
830  if(sectorArg == 4) chamberArg1 = chamberArg11 - 0.4;
831  if(sectorArg == 5) chamberArg1 = chamberArg11 - 0.5;
832 
833  //std::cout << "cscId, station, sector, endcap, sectorArg, chamber Arg: " << cscId << ", " << station << ", " <<sector << ", " << endcap << ", " << chamberArg1 << ", " << signedStation << std::endl;
834 
835  csctfChamberOccupancies->Fill(chamberArg1, signedStation);
836  //int bunchX = ( (lct->getBX()) - 6 );
837 
838  //int timingSectorArg = 3*(sector) + (lct->getMPCLink());
839  //if( endcap == 1) timingSectorArg = 3*(sector + 6) + (lct->getMPCLink());
840  //std::cout << "Sector, MPCLink, TSA, endcap: " << sector << ", " << lct->getMPCLink() << ", " << timingSectorArg << ", " << endcap << std::endl;
841 
842  //csctfbx->Fill(timingSectorArg, bunchX );
843  //std::cout << "LCT'S, encap: " << endcap << ", station: " << station << ", sector: " << sector << ", subSector: " << subSector << ", cscId: " << cscId << std:: endl;
844  //End JAG
845 
846  // Check if Det Id is within pysical range:
847  if( endcap<0||endcap>1 || sector<0||sector>6 || station<0||station>3 || cscId<0||cscId>8 || fpga<0||fpga>4)
848  {
849  edm::LogError("L1CSCTF: CSC TP are out of range: ")<<" endcap: "<<(endcap+1)<<" station: "<<(station+1) <<" sector: "<<(sector+1)<<" subSector: "<<subSector<<" fpga: "<<fpga<<" cscId: "<<(cscId+1);
850  continue;
851  }
852  lclphidat lclPhi;
853  try {
854  lclPhi = srLUTs_[fpga]->localPhi(lct->getStrip(), lct->getPattern(), lct->getQuality(), lct->getBend(), gangedME11a_);
855  } catch(cms::Exception &) {
856  bzero(&lclPhi,sizeof(lclPhi));
857  }
858 
859  gblphidat gblPhi;
860  try {
861  gblPhi = srLUTs_[fpga]->globalPhiME(lclPhi.phi_local, lct->getKeyWG(), cscId+1, gangedME11a_);
862  } catch(cms::Exception &) {
863  bzero(&gblPhi,sizeof(gblPhi));
864  }
865 
866  gbletadat gblEta;
867  try {
868  gblEta = srLUTs_[fpga]->globalEtaME(lclPhi.phi_bend_local, lclPhi.phi_local, lct->getKeyWG(), cscId+1, gangedME11a_);
869  } catch(cms::Exception &) {
870  bzero(&gblEta,sizeof(gblEta));
871  }
872 
873 
874  //TrackStub
875  csctf::TrackStub theStub((*lct), (*csc).first);
876  theStub.setPhiPacked(gblPhi.global_phi);
877  theStub.setEtaPacked(gblEta.global_eta);
878 
879  float etaG = theStub.etaValue();
880  float phiG = fmod( theStub.phiValue()+15.0*M_PI/180+(sector)*60.0*M_PI/180, 2.*M_PI );
881 
882  // BX plots
883  // minus side
884  if (endcap == 1 && station == 0 && ring == 1) { csctflcts -> Fill(bx, 8.5); }
885  if (endcap == 1 && station == 0 && ring == 2) { csctflcts -> Fill(bx, 7.5); }
886  if (endcap == 1 && station == 0 && ring == 3) { csctflcts -> Fill(bx, 6.5); }
887  if (endcap == 1 && station == 1 && ring == 1) { csctflcts -> Fill(bx, 5.5); }
888  if (endcap == 1 && station == 1 && ring == 2) { csctflcts -> Fill(bx, 4.5); }
889  if (endcap == 1 && station == 2 && ring == 1) { csctflcts -> Fill(bx, 3.5); }
890  if (endcap == 1 && station == 2 && ring == 2) { csctflcts -> Fill(bx, 2.5); }
891  if (endcap == 1 && station == 3 && ring == 1) { csctflcts -> Fill(bx, 1.5); }
892  if (endcap == 1 && station == 3 && ring == 2) { csctflcts -> Fill(bx, 0.5); }
893 
894  // plus side
895  if (endcap == 0 && station == 0 && ring == 1) { csctflcts -> Fill(bx, 9.5); }
896  if (endcap == 0 && station == 0 && ring == 2) { csctflcts -> Fill(bx, 10.5); }
897  if (endcap == 0 && station == 0 && ring == 3) { csctflcts -> Fill(bx, 11.5); }
898  if (endcap == 0 && station == 1 && ring == 1) { csctflcts -> Fill(bx, 12.5); }
899  if (endcap == 0 && station == 1 && ring == 2) { csctflcts -> Fill(bx, 13.5); }
900  if (endcap == 0 && station == 2 && ring == 1) { csctflcts -> Fill(bx, 14.5); }
901  if (endcap == 0 && station == 2 && ring == 2) { csctflcts -> Fill(bx, 15.5); }
902  if (endcap == 0 && station == 3 && ring == 1) { csctflcts -> Fill(bx, 16.5); }
903  if (endcap == 0 && station == 3 && ring == 2) { csctflcts -> Fill(bx, 17.5); }
904 
905  // only for ME1/1
906  if(station == 0 && ring == 1){
907  me11_lctStrip -> Fill(strip);
908  me11_lctWire -> Fill(keyWire);
909  me11_lctLocalPhi -> Fill(lclPhi.phi_local);
910  me11_lctPackedPhi-> Fill(theStub.phiPacked());
911  me11_lctGblPhi -> Fill(phiG);
912  me11_lctGblEta -> Fill(etaG);
913  }
914 
915  // only for ME4/2
916  if(station == 3 && ring == 2){
917  me42_lctGblPhi -> Fill(phiG);
918  me42_lctGblEta -> Fill(etaG);
919  }
920 
921 
922  //ME1/1
923  if (station == 0 && ring == 1){
924  int realID = cscId+6*sector+3*subSector;
925  if(realID>36) realID -= 36;
926  if(endcap == 0) { csc_strip_MEplus11 -> Fill(realID,strip); csc_wire_MEplus11 -> Fill(realID,keyWire); }
927  if(endcap == 1) { csc_strip_MEminus11 -> Fill(realID,strip); csc_wire_MEminus11 -> Fill(realID,keyWire); }
928  }
929  //ME1/2
930  if (station == 0 && ring == 2){
931  int realID = (cscId-3)+6*sector+3*subSector;
932  if(realID>36) realID -= 36;
933  if(endcap == 0) { csc_strip_MEplus12 -> Fill(realID,strip); csc_wire_MEplus12 -> Fill(realID,keyWire); }
934  if(endcap == 1) { csc_strip_MEminus12 -> Fill(realID,strip); csc_wire_MEminus12 -> Fill(realID,keyWire); }
935  }
936  //ME1/3
937  if (station == 0 && ring == 3){
938  int realID = (cscId-6)+6*sector+3*subSector;
939  if(realID>36) realID -= 36;
940  if(endcap == 0) { csc_strip_MEplus13 -> Fill(realID,strip); csc_wire_MEplus13 -> Fill(realID,keyWire); }
941  if(endcap == 1) { csc_strip_MEminus13 -> Fill(realID,strip); csc_wire_MEminus13 -> Fill(realID,keyWire); }
942  }
943  //ME2/1
944  if (station == 1 && ring == 1){
945  int realID = cscId+3*sector+2;
946  if(realID>18) realID -= 18;
947  if(endcap == 0) { csc_strip_MEplus21 -> Fill(realID,strip); csc_wire_MEplus21 -> Fill(realID,keyWire); }
948  if(endcap == 1) { csc_strip_MEminus21 -> Fill(realID,strip); csc_wire_MEminus21 -> Fill(realID,keyWire); }
949  }
950  //ME2/2
951  if (station == 1 && ring == 2){
952  int realID = (cscId-3)+6*sector+3;
953  if(realID>36) realID -= 36;
954  if(endcap == 0) { csc_strip_MEplus22 -> Fill(realID,strip); csc_wire_MEplus22 -> Fill(realID,keyWire); }
955  if(endcap == 1) { csc_strip_MEminus22 -> Fill(realID,strip); csc_wire_MEminus22 -> Fill(realID,keyWire); }
956  }
957  //ME3/1
958  if (station == 2 && ring == 1){
959  int realID = cscId+3*sector+2;
960  if(realID>18) realID -= 18;
961  if(endcap == 0) { csc_strip_MEplus31 -> Fill(realID,strip); csc_wire_MEplus31 -> Fill(realID,keyWire); }
962  if(endcap == 1) { csc_strip_MEminus31 -> Fill(realID,strip); csc_wire_MEminus31 -> Fill(realID,keyWire); }
963  }
964  //ME3/2
965  if (station == 2 && ring == 2){
966  int realID = (cscId-3)+6*sector+3;
967  if(realID>36) realID -= 36;
968  if(endcap == 0) { csc_strip_MEplus32 -> Fill(realID,strip); csc_wire_MEplus32 -> Fill(realID,keyWire); }
969  if(endcap == 1) { csc_strip_MEminus32 -> Fill(realID,strip); csc_wire_MEminus32 -> Fill(realID,keyWire); }
970  }
971  //ME4/1
972  if (station == 3 && ring == 1){
973  int realID = cscId+3*sector+2;
974  if(realID>18) realID -= 18;
975  if(endcap == 0) { csc_strip_MEplus41 -> Fill(realID,strip); csc_wire_MEplus41 -> Fill(realID,keyWire);}
976  if(endcap == 1) { csc_strip_MEminus41 -> Fill(realID,strip); csc_wire_MEminus41 -> Fill(realID,keyWire);}
977  }
978  //ME4/2
979  if (station == 3 && ring == 2){
980  int realID = (cscId-3)+6*sector+3;
981  if(realID>36) realID -= 36;
982  if(endcap == 0) { csc_strip_MEplus42 -> Fill(realID,strip); csc_wire_MEplus42 -> Fill(realID,keyWire); }
983  if(endcap == 1) { csc_strip_MEminus42 -> Fill(realID,strip); csc_wire_MEminus42 -> Fill(realID,keyWire); }
984  }
985 
986 
987 
988 
989 
990  // SR LUT gives packed eta and phi values -> normilize them to 1 by scale them to 'max' and shift by 'min'
991  //float etaP = gblEta.global_eta/127*1.5 + 0.9;
992  //float phiP = (gblPhi.global_phi);// + ( sector )*4096 + station*4096*12) * 1./(4*4096*12);
993  //std::cout << "LCT Eta & Phi Coordinates: " << etaP << ", " << phiP << "." << std::endl;
994  //csctfoccupancies->Fill( gblEta.global_eta/127. * 1.5 + 0.9, (gblPhi.global_phi + ( sector + (endcap?0:6) )*4096 + station*4096*12) * 1./(4*4096*12) );
995  }//lct != range1.scond
996  }//csc!=corrlcts.product()->end()
997  }// lctProducer.label() != "null"
998 
999 
1000 
1001  if( trackProducer.label() != "null" )
1002  {
1004  e.getByToken(tracksToken_, tracks);
1005  for(L1CSCTrackCollection::const_iterator trk=tracks->begin(); trk<tracks->end(); trk++)
1006  {
1007 
1008  NumCSCTfTracksRep++;
1009  long LUTAdd = trk->first.ptLUTAddress();
1010  int trigMode = ( (LUTAdd)&0xf0000 ) >> 16;
1011  int trEta = (trk->first.eta_packed() );
1012 
1013 
1014  // trk->first.endcap() = 2 for - endcap
1015  // = 1 for + endcap
1016  //int trEndcap = (trk->first.endcap()==2 ? trk->first.endcap()-3 : trk->first.endcap());
1017  if( trk->first.endcap() != 1)
1018  {
1019  int holder = trEta;
1020  trEta = -1*holder;
1021  trEta -= 1;
1022  }
1023 
1024  int trSector = 6*(trk->first.endcap()-1)+trk->first.sector();
1025  int trBX = trk->first.BX();
1026 
1027  //Here is what is done with output phi value:
1028  //output_phi = (phi / 32) * 3 /16
1029  //where:
1030  //phi is 12-bit phi, 4096 bins covering 62 degrees
1031  //output_phi is 5-bit value
1032 
1033  //Easy to see that output_phi can have values from 0 to 23, or 24 total combinations.
1034  //This gives per-bin phi value of 62/24 = 2.583333 degrees.
1035 
1036  // Sector 1 nominally starts at 15 degrees but there 1 degree overlap between sectors so 14 degrees effectively
1037  //double trPhi = trk->first.localPhi() * 62. / 24.;
1038  double trPhi = ts->getPhiScale()->getLowEdge(trk->first.localPhi());
1039  double trPhi02PI = fmod(trPhi +
1040  ((trSector-1)*M_PI/3) +
1041  (M_PI*14/180.), 2*M_PI);
1042 
1043  if (trigMode == 15) {
1044  csctfTrackPhi_H -> Fill( trPhi02PI );
1045  csctfTrackEta_H -> Fill( trEta );
1046  csctfoccupancies_H -> Fill( trEta, trPhi02PI );
1047  csctfbx_H -> Fill( trSector, trBX );
1048  }
1049  else{
1050  csctfTrackPhi -> Fill( trPhi02PI );
1051  csctfTrackEta -> Fill( trEta );
1052  csctfoccupancies -> Fill( trEta, trPhi02PI );
1053  csctfbx -> Fill( trSector, trBX );
1054 
1055  // Low Quality / High Quality Eta Distributions
1056  //|eta| < 2.1
1057  if (abs(trEta) < 24) {
1058  if (trigMode == 2 ||
1059  trigMode == 3 ||
1060  trigMode == 4 ||
1061  trigMode == 5 ||
1062  trigMode == 6 ||
1063  trigMode == 7 ||
1064  trigMode == 11 ||
1065  trigMode == 12 ||
1066  trigMode == 13 ||
1067  trigMode == 14 ) csctfTrackEtaHighQ -> Fill (trEta);
1068 
1069  if (trigMode == 8 ||
1070  trigMode == 9 ||
1071  trigMode == 10 ) csctfTrackEtaLowQ -> Fill (trEta);
1072  }
1073  else {//|eta| > 2.1
1074  if (trigMode == 2 ||
1075  trigMode == 3 ||
1076  trigMode == 4 ||
1077  trigMode == 5 ) csctfTrackEtaHighQ -> Fill (trEta);
1078  else
1079  csctfTrackEtaLowQ -> Fill (trEta);
1080  }
1081  }
1082 
1083  csctfTrackM->Fill( trk->first.modeExtended() );
1084 
1085  // we monitor the track quality only on the first link
1086  // so let's make sure to fill the plot if there is something that
1087  // is read from the hardware
1088  int trRank = trk->first.rank();
1089  if (trRank) {
1090  int trQuality = ((trRank>>5)&0x3);
1091  trackModeVsQ->Fill( trk->first.modeExtended(), trQuality );
1092  }
1093 
1094  /*
1095  OLD METHOD FOR FILLING HALO PLOTS, IMPROVED METHOD USING ASSOCIATED TRACK STUBS
1096  BELOW ~LINE 605
1097  if( trigMode == 15 )
1098  {
1099 
1100  double haloVals[4][4];
1101  for( int i = 0; i < 4; i++)
1102  {
1103  haloVals[i][0] = 0;
1104  }
1105 
1106  edm::Handle<CSCCorrelatedLCTDigiCollection> corrlcts;
1107  for(CSCCorrelatedLCTDigiCollection::DigiRangeIterator csc=corrlcts.product()->begin(); csc!=corrlcts.product()->end(); csc++)
1108  {
1109  CSCCorrelatedLCTDigiCollection::Range range1 = corrlcts.product()->get((*csc).first);
1110  for(CSCCorrelatedLCTDigiCollection::const_iterator lct=range1.first; lct!=range1.second; lct++)
1111  {
1112  int endcap = (*csc).first.endcap()-1;
1113  int station = (*csc).first.station()-1;
1114  int sector = (*csc).first.triggerSector()-1;
1115  int cscId = (*csc).first.triggerCscId()-1;
1116  int subSector = CSCTriggerNumbering::triggerSubSectorFromLabels((*csc).first);
1117  int fpga = ( subSector ? subSector-1 : station+1 );
1118 
1119  if(station != 4)
1120  {
1121  int modEnd = 1;
1122  if( endcap == 0 ) modEnd = -1;
1123  int indexHalo = modEnd + station;
1124  if(haloVals[indexHalo][0] == 1.0) haloVals[indexHalo][3] = 1.0;
1125  if(haloVals[indexHalo][0] == 0) haloVals[indexHalo][0] = 1.0;
1126  haloVals[indexHalo][1] = sector*1.0;
1127 
1128  lclphidat lclPhi;
1129  lclPhi = srLUTs_[fpga]->localPhi(lct->getStrip(), lct->getPattern(), lct->getQuality(), lct->getBend());
1130  gblphidat gblPhi;
1131  gblPhi = srLUTs_[fpga]->globalPhiME(lclPhi.phi_local, lct->getKeyWG(), cscId+1);
1132  gbletadat gblEta;
1133  gblEta = srLUTs_[fpga]->globalEtaME(lclPhi.phi_bend_local, lclPhi.phi_local, lct->getKeyWG(), cscId+1);
1134 
1135  haloVals[indexHalo][2] = gblEta.global_eta/127. * 1.5 + 0.9;
1136  } //station1 or 2
1137  } //lct first to second
1138  } //corrlcts
1139 
1140  if( (haloVals[0][0] == 1.) && (haloVals[1][0] == 1.) && (haloVals[0][3] != 1.) && (haloVals[1][3] != 1.) )
1141  {
1142  if( haloVals[0][1] == haloVals[1][1] ){
1143  double delEta23 = haloVals[1][2] - haloVals[0][2];
1144  haloDelEta23->Fill( delEta23 );
1145  }
1146  }
1147 
1148  if( (haloVals[2][0] == 1.) && (haloVals[3][0] == 1.) && (haloVals[2][3] != 1.) && (haloVals[3][3] != 1.) )
1149  {
1150  if( haloVals[2][1] == haloVals[3][1] ){
1151  double delEta23 = haloVals[3][2] - haloVals[2][2];
1152  haloDelEta23->Fill( delEta23 );
1153  }
1154  }
1155  } //halo trigger
1156  */
1157 
1158  int cscTrackStub = 0;
1159  //float haloEta[3];
1160  //for(int i=0; i<3; i++) haloEta[i]=-1.0;
1161  //bool haloME11 = false;
1162  CSCCorrelatedLCTDigiCollection lctsOfTracks=trk->second;
1163  for(CSCCorrelatedLCTDigiCollection::DigiRangeIterator trackStub=lctsOfTracks.begin(); trackStub!=lctsOfTracks.end(); trackStub++)
1164  {
1165  CSCCorrelatedLCTDigiCollection::Range range2 = lctsOfTracks.get((*trackStub).first);
1166  for(CSCCorrelatedLCTDigiCollection::const_iterator lct=range2.first; lct!=range2.second; lct++)
1167  {
1168 // int station = (*trackStub).first.station()-1;
1169 // if(station != 4)
1170 // {
1171 // // int endcap = (*trackStub).first.endcap()-1;
1172 // // int sector = (*trackStub).first.triggerSector()-1;
1173 // int cscId = (*trackStub).first.triggerCscId()-1;
1174 // int subSector = CSCTriggerNumbering::triggerSubSectorFromLabels((*trackStub).first);
1175 // int fpga = ( subSector ? subSector-1 : station+1 );
1176 
1177 // lclphidat lclPhi;
1178 // lclPhi = srLUTs_[fpga]->localPhi(lct->getStrip(), lct->getPattern(), lct->getQuality(), lct->getBend());
1179 // gblphidat gblPhi;
1180 // gblPhi = srLUTs_[fpga]->globalPhiME(lclPhi.phi_local, lct->getKeyWG(), cscId+1);
1181 // gbletadat gblEta;
1182 // gblEta = srLUTs_[fpga]->globalEtaME(lclPhi.phi_bend_local, lclPhi.phi_local, lct->getKeyWG(), cscId+1);
1183 // haloEta[station-1] = gblEta.global_eta/127. * 1.5 + 0.9;
1184 // if(station==1 && cscId<2) haloME11 = true;
1185 // }
1186  cscTrackStub++;
1187  }
1188  }
1189  cscTrackStubNumbers->Fill(cscTrackStub);
1190 
1191 // if(trigMode == 15)
1192 // {
1193 // float dEta13 = haloEta[2]-haloEta[0];
1194 // float dEta12 = haloEta[1]-haloEta[0];
1195 // if(haloME11)
1196 // {
1197 // if(haloEta[1]!=-1.0) haloDelEta112->Fill(dEta12);
1198 // if(haloEta[2]!=-1.0) haloDelEta113->Fill(dEta13);
1199 // } else {
1200 // if(haloEta[1]!=-1.0) haloDelEta12->Fill(dEta12);
1201 // if(haloEta[2]!=-1.0) haloDelEta13->Fill(dEta13);
1202 // }
1203 // }
1204  //
1205 
1206 
1207 
1208  }
1209  }
1210  csctfntrack->Fill(NumCSCTfTracksRep);
1211 
1212 
1213  if( mbProducer.label() != "null" )
1214  {
1215  // handle to needed collections
1217  e.getByToken(dtStubsToken_, dtStubs);
1219  e.getByToken(mbtracksToken_, tracks);
1220 
1221  // loop on the DT stubs
1222  std::vector<csctf::TrackStub> vstubs = dtStubs->get();
1223  for(std::vector<csctf::TrackStub>::const_iterator stub=vstubs.begin();
1224  stub!=vstubs.end(); stub++)
1225  {
1226  if (verbose_)
1227  {
1228  edm::LogInfo("DataNotFound") << "\n mbEndcap: " << stub->endcap();
1229  edm::LogInfo("DataNotFound") << "\n stub->getStrip()[FLAG]: " << stub->getStrip();
1230  edm::LogInfo("DataNotFound") << "\n stub->getKeyWG()[CAL]: " << stub->getKeyWG();
1231  edm::LogInfo("DataNotFound") << "\n stub->BX(): " << stub->BX();
1232  edm::LogInfo("DataNotFound") << "\n stub->sector(): " << stub->sector();
1233  edm::LogInfo("DataNotFound") << "\n stub->subsector(): " << stub->subsector();
1234  edm::LogInfo("DataNotFound") << "\n stub->station(): " << stub->station();
1235  edm::LogInfo("DataNotFound") << "\n stub->phiPacked(): " << stub->phiPacked();
1236  edm::LogInfo("DataNotFound") << "\n stub->getBend(): " << stub->getBend();
1237  edm::LogInfo("DataNotFound") << "\n stub->getQuality(): " << stub->getQuality();
1238  edm::LogInfo("DataNotFound") << "\n stub->cscid(): " << stub->cscid() << endl;
1239  }
1240  // define the sector ID
1241  int mbId = (stub->endcap()==2) ? 6 : 0;
1242  mbId += stub->sector();
1243  // *** do not fill if CalMB variable is set ***
1244  // horrible! They used the same class to write up the LCT and MB info,
1245  // but given the MB does not have strip and WG they replaced this two
1246  // with the flag and cal bits... :S
1247  if (stub->getKeyWG() == 0)
1248  {
1249  // if FLAG =1, muon belong to previous BX
1250  int bxDT = stub->BX()-stub->getStrip(); // correct by the FLAG
1251  int subDT = stub->subsector();
1252 
1253  // Fill the event only if CSC had or would have triggered
1254  if (isCSCcand_)
1255  {
1256  //look for tracks in the event and compare the matching DT stubs
1257  int trkBX = 0;
1258  for(L1CSCTrackCollection::const_iterator trk=tracks->begin(); trk<tracks->end(); trk++)
1259  {
1260  trkBX = trk->first.BX();
1261  int trkId = (trk->first.endcap()==2) ? 6 : 0;
1262  trkId += trk->first.sector();
1263  if (verbose_){
1264  edm::LogInfo("DataNotFound") << "\n trk BX: " << trkBX
1265  << " Sector: " << trkId
1266  << " SubSector: " << trk->first.subsector()
1267  << " Endcap: " << trk->first.endcap();
1268 
1269  edm::LogInfo("DataNotFound") << "\n DT BX: " << stub->BX()
1270  << " Sector: " << mbId
1271  << " SubSector: " << stub->subsector()
1272  << " Endcap: " << stub->endcap() << endl;
1273  }
1274 
1275  if (mbId == trkId)
1276  {
1277  if (verbose_) {
1278  edm::LogInfo("DataNotFound") << " --> MATCH" << endl;
1279  edm::LogInfo("DataNotFound") << "Fill :" << trkBX+6-bxDT << " -- " << subDT << " -- cands" << endl;
1280  }
1281  // DT bx ranges from 3 to 9
1282  // trk bx ranges from -3 to 3
1283  DTstubsTimeTrackMenTimeArrival[mbId-1]->Fill(bxDT-trkBX-6,subDT);//subsec
1284  }
1285  }// loop on the tracks
1286  }//if (isCSCcand_){
1287  }//if (stub->getKeyWG() == 0) {
1288  }
1289  }
1290 }
MonitorElement * DTstubsTimeTrackMenTimeArrival[12]
Definition: L1TCSCTF.h:164
MonitorElement * csctfoccupancies
Definition: L1TCSCTF.h:85
T getParameter(std::string const &) const
unsigned long long cacheIdentifier() const
MonitorElement * csctfTrackEtaHighQ
Definition: L1TCSCTF.h:97
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
MonitorElement * csctflcts
Definition: L1TCSCTF.h:106
DQMStore * dbe
Definition: L1TCSCTF.h:78
lclphidat localPhi(int strip, int pattern, int quality, int lr, const bool gangedME1a=false) const
Geometry Lookup Tables.
MonitorElement * csctfTrackPhi
Definition: L1TCSCTF.h:94
MonitorElement * csc_strip_MEminus22
Definition: L1TCSCTF.h:135
bool verbose_
Definition: L1TCSCTF.h:172
unsigned long long m_scalesCacheID
Definition: L1TCSCTF.h:182
MonitorElement * csctfTrackPhi_H
Definition: L1TCSCTF.h:98
void beginJob(void)
Definition: L1TCSCTF.cc:106
MonitorElement * csc_wire_MEplus31
Definition: L1TCSCTF.h:146
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
MonitorElement * csc_strip_MEplus21
Definition: L1TCSCTF.h:124
MonitorElement * csc_strip_MEplus11
Definition: L1TCSCTF.h:121
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
MonitorElement * csc_wire_MEminus13
Definition: L1TCSCTF.h:153
MonitorElement * csc_wire_MEminus22
Definition: L1TCSCTF.h:155
MonitorElement * me11_lctGblPhi
Definition: L1TCSCTF.h:113
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 * csc_wire_MEplus12
Definition: L1TCSCTF.h:142
MonitorElement * csc_wire_MEminus31
Definition: L1TCSCTF.h:156
#define NULL
Definition: scimark2.h:8
MonitorElement * csctfbx
Definition: L1TCSCTF.h:81
MonitorElement * csc_wire_MEminus32
Definition: L1TCSCTF.h:157
MonitorElement * csctfTrackEtaLowQ
Definition: L1TCSCTF.h:96
edm::InputTag mbProducer
Definition: L1TCSCTF.h:175
MonitorElement * csc_strip_MEminus12
Definition: L1TCSCTF.h:132
static void setGeometry(const edm::ESHandle< CSCGeometry > &thegeom)
MonitorElement * csctfTrackEta
Definition: L1TCSCTF.h:95
void analyze(const edm::Event &e, const edm::EventSetup &c)
Definition: L1TCSCTF.cc:671
MonitorElement * me11_lctWire
Definition: L1TCSCTF.h:110
MonitorElement * csc_strip_MEminus31
Definition: L1TCSCTF.h:136
std::string outputFile_
Definition: L1TCSCTF.h:171
unsigned phiPacked() const
Return the binned phi for this stub.
Definition: TrackStub.h:44
MonitorElement * csc_wire_MEminus21
Definition: L1TCSCTF.h:154
void Fill(long long x)
edm::InputTag statusProducer
Definition: L1TCSCTF.h:175
edm::EDGetTokenT< L1CSCStatusDigiCollection > statusToken_
Definition: L1TCSCTF.h:187
MonitorElement * csctfTrackEta_H
Definition: L1TCSCTF.h:99
MonitorElement * me42_lctGblPhi
Definition: L1TCSCTF.h:117
const L1MuTriggerScales * ts
Definition: L1TCSCTF.h:180
bool gangedME11a_
Definition: L1TCSCTF.h:176
gblphidat globalPhiME(int phi_local, int wire_group, int cscid, const bool gangedME1a=false) const
MonitorElement * cscTrackStubNumbers
Definition: L1TCSCTF.h:100
MonitorElement * csc_strip_MEminus32
Definition: L1TCSCTF.h:137
int L1ABXN
Definition: L1TCSCTF.h:168
MonitorElement * me11_lctStrip
Definition: L1TCSCTF.h:109
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
int BxInEvent_
Definition: L1TCSCTF.h:165
MonitorElement * csc_strip_MEminus42
Definition: L1TCSCTF.h:139
MonitorElement * csc_wire_MEplus41
Definition: L1TCSCTF.h:148
virtual ~L1TCSCTF()
Definition: L1TCSCTF.cc:99
double etaValue() const
return the Eta Value of this stub&#39;s position.
Definition: TrackStub.h:36
void endJob(void)
Definition: L1TCSCTF.cc:660
const L1MuScale * getPhiScale() const
get the phi scale
MonitorElement * csc_strip_MEplus13
Definition: L1TCSCTF.h:123
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * csc_strip_MEplus22
Definition: L1TCSCTF.h:125
int nev_
Definition: L1TCSCTF.h:170
MonitorElement * csc_wire_MEminus41
Definition: L1TCSCTF.h:158
L1TCSCTF(const edm::ParameterSet &ps)
Definition: L1TCSCTF.cc:25
MonitorElement * csctfChamberOccupancies
Definition: L1TCSCTF.h:93
bool isValid() const
Definition: HandleBase.h:76
MonitorElement * csc_wire_MEplus13
Definition: L1TCSCTF.h:143
edm::InputTag lctProducer
Definition: L1TCSCTF.h:175
#define M_PI
MonitorElement * csc_wire_MEplus21
Definition: L1TCSCTF.h:144
edm::EDGetTokenT< L1CSCTrackCollection > tracksToken_
Definition: L1TCSCTF.h:189
MonitorElement * csc_strip_MEminus41
Definition: L1TCSCTF.h:138
MonitorElement * me42_lctGblEta
Definition: L1TCSCTF.h:118
CSCSectorReceiverLUT * srLUTs_[5]
Definition: L1TCSCTF.h:178
MonitorElement * csc_strip_MEplus31
Definition: L1TCSCTF.h:126
MonitorElement * csc_wire_MEplus32
Definition: L1TCSCTF.h:147
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > corrlctsToken_
Definition: L1TCSCTF.h:188
double phiValue() const
return the Phi Value of this stub&#39;s position in local coordinates.
Definition: TrackStub.h:38
MonitorElement * csctferrors
Definition: L1TCSCTF.h:84
T const * product() const
Definition: Handle.h:81
tuple tracks
Definition: testEve_cfg.py:39
void addUntrackedParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:206
MonitorElement * csc_wire_MEminus42
Definition: L1TCSCTF.h:159
bool isCSCcand_
Definition: L1TCSCTF.h:166
class global_phi_data gblphidat
MonitorElement * csc_strip_MEplus41
Definition: L1TCSCTF.h:128
const T & get() const
Definition: EventSetup.h:55
MonitorElement * csctfTrackM
Definition: L1TCSCTF.h:101
edm::EDGetTokenT< L1CSCTrackCollection > mbtracksToken_
Definition: L1TCSCTF.h:191
T const * product() const
Definition: ESHandle.h:86
MonitorElement * csctfbx_H
Definition: L1TCSCTF.h:82
std::vector< CSCCorrelatedLCTDigi >::const_iterator const_iterator
class local_phi_data lclphidat
Data Types.
static int triggerSubSectorFromLabels(int station, int chamber)
MonitorElement * csctfntrack
Definition: L1TCSCTF.h:80
edm::InputTag trackProducer
Definition: L1TCSCTF.h:175
edm::EDGetTokenT< L1MuGMTReadoutCollection > gmtProducerToken_
Definition: L1TCSCTF.h:186
std::string const & label() const
Definition: InputTag.h:42
MonitorElement * csc_wire_MEplus42
Definition: L1TCSCTF.h:149
MonitorElement * trackModeVsQ
Definition: L1TCSCTF.h:102
MonitorElement * me11_lctGblEta
Definition: L1TCSCTF.h:114
gbletadat globalEtaME(int phi_bend, int phi_local, int wire_group, int cscid, const bool gangedME1a=false) const
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
MonitorElement * csc_strip_MEminus21
Definition: L1TCSCTF.h:134
MonitorElement * csctfoccupancies_H
Definition: L1TCSCTF.h:86
MonitorElement * csc_strip_MEplus32
Definition: L1TCSCTF.h:127
MonitorElement * csc_strip_MEplus12
Definition: L1TCSCTF.h:122
static unsigned int const shift
void setPhiPacked(const unsigned &phi_)
Definition: TrackStub.h:33
std::pair< const_iterator, const_iterator > Range
const L1MuTriggerPtScale * tpts
Definition: L1TCSCTF.h:181
MonitorElement * me11_lctLocalPhi
Definition: L1TCSCTF.h:111
MonitorElement * csc_strip_MEminus11
Definition: L1TCSCTF.h:131
MonitorElement * csc_strip_MEminus13
Definition: L1TCSCTF.h:133
unsigned long long m_ptScaleCacheID
Definition: L1TCSCTF.h:183
MonitorElement * csc_wire_MEplus11
Definition: L1TCSCTF.h:141
tuple status
Definition: ntuplemaker.py:245
TH2F * getTH2F(void) const
MonitorElement * csc_wire_MEminus12
Definition: L1TCSCTF.h:152
class global_eta_data gbletadat
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * csc_strip_MEplus42
Definition: L1TCSCTF.h:129
std::string const & instance() const
Definition: InputTag.h:43
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > dtStubsToken_
Definition: L1TCSCTF.h:190
edm::InputTag gmtProducer
Definition: L1TCSCTF.h:175
void setEtaPacked(const unsigned &eta_)
set Eta and Phi from integer values.
Definition: TrackStub.h:32
MonitorElement * me11_lctPackedPhi
Definition: L1TCSCTF.h:112
MonitorElement * csc_wire_MEplus22
Definition: L1TCSCTF.h:145
MonitorElement * csc_wire_MEminus11
Definition: L1TCSCTF.h:151