CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTLocalTriggerTask.cc
Go to the documentation of this file.
1 /*
2  * \file DTLocalTriggerTask.cc
3  *
4  * \author M. Zanetti - INFN Padova
5  *
6 */
7 
9 
10 // Framework
12 
13 // DT trigger
15 
16 // Geometry
22 
23 //Root
24 #include"TH1.h"
25 #include"TAxis.h"
26 
27 #include <sstream>
28 #include <iostream>
29 #include <fstream>
30 
31 
32 using namespace edm;
33 using namespace std;
34 
36  trigGeomUtils(0),
37  isLocalRun(ps.getUntrackedParameter<bool>("localrun", true))
38  {
39  if (!isLocalRun) {
40  ltcDigiCollectionToken_ = consumes<LTCDigiCollection>(
41  ps.getParameter<edm::InputTag>("ltcDigiCollectionTag"));
42  }
43 
44  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerTask") << "[DTLocalTriggerTask]: Constructor"<<endl;
45 
46  tpMode = ps.getUntrackedParameter<bool>("testPulseMode", false);
47  detailedAnalysis = ps.getUntrackedParameter<bool>("detailedAnalysis", false);
48  doTMTheta = ps.getUntrackedParameter<bool>("enableTMTheta", false);
49  tm_Token_ = consumes<L1MuDTChambPhContainer>(
50  edm::InputTag(ps.getUntrackedParameter<string>("tm_label", "dttpgprod")));
52  tmTh_Token_ = consumes<L1MuDTChambThContainer>(edm::InputTag(tmTh_label_));
53 
54  //cout << "[DTLocalTriggerTask] ThetaTriggerLabel=" << tmTh_label_ << endl;
55 
56  ros_Token_ = consumes<DTLocalTriggerCollection>(
57  edm::InputTag(ps.getUntrackedParameter<string>("ros_label", "dtunpacker")));
58  seg_Token_ = consumes<DTRecSegment4DCollection>(
59  edm::InputTag(ps.getUntrackedParameter<string>("seg_label", "dt4DSegments")));
60 
61  if (tpMode) {
62  baseFolderTM = "DT/11-LocalTriggerTP-TM/";
63  baseFolderDDU = "DT/12-LocalTriggerTP-DDU/";
64  }
65  else {
66  baseFolderTM = "DT/03-LocalTrigger-TM/";
67  baseFolderDDU = "DT/04-LocalTrigger-DDU/";
68  }
69 
70  parameters = ps;
71 
72 }
73 
74 
76 
77  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerTask") << "[DTLocalTriggerTask]: analyzed " << nevents << " events" << endl;
78  if (trigGeomUtils) { delete trigGeomUtils; }
79 
80 }
81 
83 
84  nevents = 0;
85  context.get<MuonGeometryRecord>().get(muonGeom);
87 
88 }
89 
90 void DTLocalTriggerTask::bookHistograms(DQMStore::IBooker & ibooker, edm::Run const & iRun, edm::EventSetup const & context) {
91 
92  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerTask") << "[DTLocalTriggerTask]: bookHistograms" << endl;
93 
94  if(parameters.getUntrackedParameter<bool>("staticBooking", true)) { // Static histo booking
95 
96  vector<string> trigSources;
97  if(parameters.getUntrackedParameter<bool>("localrun", true)) {
98  trigSources.push_back("");
99  }
100  else {
101  trigSources.push_back("_DTonly");
102  trigSources.push_back("_NoDT");
103  trigSources.push_back("_DTalso");
104  }
105  vector<string>::const_iterator trigSrcIt = trigSources.begin();
106  vector<string>::const_iterator trigSrcEnd = trigSources.end();
107 
108  if(parameters.getUntrackedParameter<bool>("process_tm", true)) {
109  bookBarrelHistos(ibooker, "TM_ErrorsChamberID");
110  }
111 
112  if (tpMode) {
113  for (int stat=1;stat<5;++stat){
114  for (int wh=-2;wh<3;++wh){
115  for (int sect=1;sect<13;++sect){
116  DTChamberId dtChId(wh,stat,sect);
117 
118  if (parameters.getUntrackedParameter<bool>("process_tm", true)){ // TM data
119  bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","TM_BXvsQual"+(*trigSrcIt));
120  bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","TM_QualvsPhirad"+(*trigSrcIt));
121  }
122 
123  if (parameters.getUntrackedParameter<bool>("process_ros", true)){ // DDU data
124  bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","DDU_BXvsQual"+(*trigSrcIt));
125  }
126 
127  }
128  }
129  } // end of loop
130  }
131  else {
132  for (;trigSrcIt!=trigSrcEnd;++trigSrcIt){
133  for (int wh=-2;wh<3;++wh){
134  if (parameters.getUntrackedParameter<bool>("process_tm", true) &&
135  parameters.getUntrackedParameter<bool>("process_ros", true)){ // TM+DDU data
136  bookWheelHistos(ibooker, wh,"COM_BXDiff"+(*trigSrcIt));
137  }
138  for (int sect=1;sect<13;++sect){
139  for (int stat=1;stat<5;++stat){
140  DTChamberId dtChId(wh,stat,sect);
141  if (parameters.getUntrackedParameter<bool>("process_tm", true)){ // TM data
142 
143  bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","TM_BXvsQual"+(*trigSrcIt));
144  if (detailedAnalysis) {
145  bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","TM_QualvsPhirad"+(*trigSrcIt));
146  bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","TM_QualvsPhibend"+(*trigSrcIt));
147  }
148  bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","TM_Flag1stvsQual"+(*trigSrcIt));
149  bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","TM_BestQual"+(*trigSrcIt));
150  if (stat!=4 && doTMTheta){
151  bookHistos(ibooker, dtChId,"LocalTriggerTheta","TM_PositionvsBX"+(*trigSrcIt));
152  bookHistos(ibooker, dtChId,"LocalTriggerTheta","TM_QualityvsBX"+(*trigSrcIt));
153 
154  bookHistos(ibooker, dtChId,"LocalTriggerTheta","TM_PositionvsQual"+(*trigSrcIt));
155 
156  bookHistos(ibooker, dtChId,"LocalTriggerTheta","TM_ThetaBXvsQual"+(*trigSrcIt));
157  bookHistos(ibooker, dtChId,"LocalTriggerTheta","TM_ThetaBestQual"+(*trigSrcIt));
158  }
159 
160  if (parameters.getUntrackedParameter<bool>("process_seg", true)){ // TM + Segemnt
161  bookHistos(ibooker, dtChId,"Segment","TM_PhitkvsPhitrig"+(*trigSrcIt));
162  bookHistos(ibooker, dtChId,"Segment","TM_PhibtkvsPhibtrig"+(*trigSrcIt));
163  bookHistos(ibooker, dtChId,"Segment","TM_PhiResidual"+(*trigSrcIt));
164  bookHistos(ibooker, dtChId,"Segment","TM_PhiResidualvsLUTPhi"+(*trigSrcIt));
165  bookHistos(ibooker, dtChId,"Segment","TM_PhibResidual"+(*trigSrcIt));
166  bookHistos(ibooker, dtChId,"Segment","TM_HitstkvsQualtrig"+(*trigSrcIt));
167  bookHistos(ibooker, dtChId,"Segment","TM_TrackPosvsAngle"+(*trigSrcIt));
168  bookHistos(ibooker, dtChId,"Segment","TM_TrackPosvsAngleandTrig"+(*trigSrcIt));
169  bookHistos(ibooker, dtChId,"Segment","TM_TrackPosvsAngleandTrigHHHL"+(*trigSrcIt));
170  if(stat!=4){
171  bookHistos(ibooker, dtChId,"Segment","TM_TrackThetaPosvsAngle"+(*trigSrcIt)); // theta view
172  bookHistos(ibooker, dtChId,"Segment","TM_TrackThetaPosvsAngleandTrig"+(*trigSrcIt));
173  bookHistos(ibooker, dtChId,"Segment","TM_TrackThetaPosvsAngleandTrigH"+(*trigSrcIt)); // TM theta quality not available!
174  }
175  }
176 
177  }
178 
179  if (parameters.getUntrackedParameter<bool>("process_ros", true)){ // DDU data
180 
181  bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","DDU_BXvsQual"+(*trigSrcIt));
182  bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","DDU_Flag1stvsQual"+(*trigSrcIt));
183  bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","DDU_BestQual"+(*trigSrcIt));
184  if(stat!=4){ // theta view
185  bookHistos(ibooker, dtChId,"LocalTriggerTheta","DDU_ThetaBXvsQual"+(*trigSrcIt));
186  bookHistos(ibooker, dtChId,"LocalTriggerTheta","DDU_ThetaBestQual"+(*trigSrcIt));
187  }
188 
189  if (parameters.getUntrackedParameter<bool>("process_seg", true)){ // DDU + Segment
190  bookHistos(ibooker, dtChId,"Segment","DDU_HitstkvsQualtrig"+(*trigSrcIt));
191  bookHistos(ibooker, dtChId,"Segment","DDU_TrackPosvsAngle"+(*trigSrcIt));
192  bookHistos(ibooker, dtChId,"Segment","DDU_TrackPosvsAngleandTrig"+(*trigSrcIt));
193  bookHistos(ibooker, dtChId,"Segment","DDU_TrackPosvsAngleandTrigHHHL"+(*trigSrcIt));
194  if(stat!=4){
195  bookHistos(ibooker, dtChId,"Segment","DDU_TrackThetaPosvsAngle"+(*trigSrcIt)); // theta view
196  bookHistos(ibooker, dtChId,"Segment","DDU_TrackThetaPosvsAngleandTrig"+(*trigSrcIt));
197  bookHistos(ibooker, dtChId,"Segment","DDU_TrackThetaPosvsAngleandTrigH"+(*trigSrcIt));
198  }
199  }
200 
201  }
202 
203  if (parameters.getUntrackedParameter<bool>("process_tm", true) &&
204  parameters.getUntrackedParameter<bool>("process_ros", true)){ // TM+DDU data
205  bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","COM_QualDDUvsQualTM"+(*trigSrcIt));
206  }
207 
208  }
209  }
210  for (int sect=13;sect<15;++sect){
211  DTChamberId dtChId(wh,4,sect);
212  if (parameters.getUntrackedParameter<bool>("process_tm", true) &&
213  parameters.getUntrackedParameter<bool>("process_seg", true)){ // TM+SEG LUTs data
214  bookHistos(ibooker, dtChId,"Segment","TM_PhitkvsPhitrig"+(*trigSrcIt));
215  bookHistos(ibooker, dtChId,"Segment","TM_PhibtkvsPhibtrig"+(*trigSrcIt));
216  bookHistos(ibooker, dtChId,"Segment","TM_PhiResidual"+(*trigSrcIt));
217  bookHistos(ibooker, dtChId,"Segment","TM_PhiResidualvsLUTPhi"+(*trigSrcIt));
218  bookHistos(ibooker, dtChId,"Segment","TM_PhibResidual"+(*trigSrcIt));
219  }
220  }
221  }
222  }// end of loop
223  }
224 
225  }
226 
227 
228 }
229 
230 
232 
233  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerTask") << "[DTLocalTriggerTask]: Begin of LS transition" << endl;
234 
235  if(lumiSeg.id().luminosityBlock()%parameters.getUntrackedParameter<int>("ResetCycle", 3) == 0) {
236  for(map<uint32_t, map<string, MonitorElement*> > ::const_iterator histo = digiHistos.begin();
237  histo != digiHistos.end();
238  histo++) {
239  for(map<string, MonitorElement*> ::const_iterator ht = (*histo).second.begin();
240  ht != (*histo).second.end();
241  ht++) {
242  (*ht).second->Reset();
243  }
244  }
245  }
246 
247 }
248 
250  if (!nevents){
251 
253  e.getByToken(tm_Token_, l1DTTPGPh);
255  e.getByToken(tmTh_Token_, l1DTTPGTh);
256 
257  useTM = (l1DTTPGPh.isValid() || l1DTTPGTh.isValid()) && parameters.getUntrackedParameter<bool>("process_tm", true) ;
258 
260  e.getByToken(ros_Token_,l1DDUTrigs);
261  useDDU = l1DDUTrigs.isValid() && parameters.getUntrackedParameter<bool>("process_ros", true) ;
262 
263  Handle<DTRecSegment4DCollection> all4DSegments;
264  e.getByToken(seg_Token_, all4DSegments);
265  useSEG = all4DSegments.isValid() && parameters.getUntrackedParameter<bool>("process_seg", true) ;
266 
267  }
268 
269 
270  nevents++;
271 
272  triggerSource(e);
273 
274  if ( useTM ) {
276  e.getByToken(tm_Token_, l1DTTPGPh);
277  vector<L1MuDTChambPhDigi> const* l1PhTrig = l1DTTPGPh->getContainer();
278 
280  e.getByToken(tmTh_Token_, l1DTTPGTh);
281 
282  vector<L1MuDTChambThDigi> const* l1ThTrig = l1DTTPGTh->getContainer();
283 
284  runTMAnalysis(l1PhTrig, l1ThTrig);
285  }
286  if ( useDDU ) {
288  e.getByToken(ros_Token_, l1DDUTrigs);
289 
290  runDDUAnalysis(l1DDUTrigs);
291  }
292  if ( !tpMode && useSEG ) {
294  e.getByToken(seg_Token_, segments4D);
295 
296  runSegmentAnalysis(segments4D);
297  }
298  if ( !tpMode && useTM && useDDU ) {
300  }
301 
302 
303 }
304 
305 
306 void DTLocalTriggerTask::bookBarrelHistos(DQMStore::IBooker & ibooker, string histoTag) {
307 
308  bool isTM = histoTag.substr(0,2) == "TM";
309  ibooker.setCurrentFolder(topFolder(isTM));
310  if (histoTag == "TM_ErrorsChamberID") {
311  tm_IDDataErrorPlot = ibooker.book1D(histoTag.c_str(),"TM Data ID Error",5,-2,3);
312  tm_IDDataErrorPlot->setAxisTitle("wheel",1);
313  }
314 
315  return;
316 
317 }
318 
319 void DTLocalTriggerTask::bookHistos(DQMStore::IBooker & ibooker, const DTChamberId& dtCh, string folder, string histoTag) {
320 
321  int wh=dtCh.wheel();
322  int sc=dtCh.sector();
323  stringstream wheel; wheel << wh;
324  stringstream station; station << dtCh.station();
325  stringstream sector; sector << sc;
326 
327  double minBX=0;
328  double maxBX=0;
329  int rangeBX=0;
330 
331  string histoType = histoTag.substr(3,histoTag.find("_",3)-3);
332  bool isTM = histoTag.substr(0,2) == "TM";
333 
334  ibooker.setCurrentFolder(topFolder(isTM) + "Wheel" + wheel.str() +
335  "/Sector" + sector.str() +
336  "/Station" + station.str() + "/" + folder);
337 
338  string histoName = histoTag + "_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
339 
340  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerTask") << "[DTLocalTriggerTask]: booking " << topFolder(isTM) << "Wheel" << wheel.str()
341  << "/Sector" << sector.str()
342  << "/Station"<< station.str() << "/" << folder << "/" << histoName << endl;
343 
344  if (histoType.find("BX") != string::npos){
345  if (histoTag.substr(0,2) == "TM"){
346  minBX= parameters.getUntrackedParameter<int>("minBXTM",-2) - 0.5;
347  maxBX= parameters.getUntrackedParameter<int>("maxBXTM",2) + 0.5;
348  }
349  else {
350  minBX= parameters.getUntrackedParameter<int>("minBXDDU",0) - 0.5;
351  maxBX= parameters.getUntrackedParameter<int>("maxBXDDU",20) + 0.5;
352  }
353  rangeBX = (int)(maxBX-minBX);
354  }
355 
356  if ( folder == "LocalTriggerPhiIn") {
357 
358  if( histoType == "BXvsQual" ){
359  (digiHistos[dtCh.rawId()])[histoTag] =
360  ibooker.book2D(histoName,"BX vs trigger quality",7,-0.5,6.5,rangeBX,minBX,maxBX);
361  setQLabels((digiHistos[dtCh.rawId()])[histoTag],1);
362  return ;
363  }
364  if( histoType == "BestQual" ){
365  (digiHistos[dtCh.rawId()])[histoTag] =
366  ibooker.book1D(histoName,"Trigger quality of best primitives",7,-0.5,6.5);
367  setQLabels((digiHistos[dtCh.rawId()])[histoTag],1);
368  return ;
369  }
370  if( histoType == "QualvsPhirad" ){
371  (digiHistos[dtCh.rawId()])[histoTag] =
372  ibooker.book2D(histoName,"Trigger quality vs local position",100,-500.,500.,7,-0.5,6.5);
373  setQLabels((digiHistos[dtCh.rawId()])[histoTag],2);
374  return ;
375  }
376  if( histoType == "QualvsPhibend" ) {
377  (digiHistos[dtCh.rawId()])[histoTag] =
378  ibooker.book2D(histoName,"Trigger quality vs local direction",200,-40.,40.,7,-0.5,6.5);
379  setQLabels((digiHistos[dtCh.rawId()])[histoTag],2);
380  return ;
381  }
382  if( histoType == "Flag1stvsQual" ) {
383  (digiHistos[dtCh.rawId()])[histoTag] =
384  ibooker.book2D(histoName,"1st/2nd trig flag vs quality",7,-0.5,6.5,2,-0.5,1.5);
385  setQLabels((digiHistos[dtCh.rawId()])[histoTag],1);
386  return ;
387  }
388  if( histoType == "QualDDUvsQualTM" ){
389  (digiHistos[dtCh.rawId()])[histoTag] =
390  ibooker.book2D(histoName,"DDU quality vs TM quality",8,-1.5,6.5,8,-1.5,6.5);
391  setQLabels((digiHistos[dtCh.rawId()])[histoTag],1);
392  setQLabels((digiHistos[dtCh.rawId()])[histoTag],2);
393  return ;
394  }
395 
396  }
397  else if ( folder == "LocalTriggerTheta") {
398 
399  if( histoType == "PositionvsBX" ) {
400  (digiHistos[dtCh.rawId()])[histoTag] =
401  ibooker.book2D(histoName,"Theta trigger position vs BX",rangeBX,minBX,maxBX,7,-0.5,6.5);
402  return ;
403  }
404  if( histoType == "PositionvsQual" ) {
405  (digiHistos[dtCh.rawId()])[histoTag] =
406  ibooker.book2D(histoName,"Theta trigger position vs quality",2,0.5,2.5,7,-0.5,6.5);
407  setQLabelsTheta((digiHistos[dtCh.rawId()])[histoTag],1);
408  return ;
409  }
410  if( histoType == "ThetaBXvsQual" ) {
411  (digiHistos[dtCh.rawId()])[histoTag] =
412  ibooker.book2D(histoName,"BX vs trigger quality",2,0.5,2.5,rangeBX,minBX,maxBX);
413  setQLabelsTheta((digiHistos[dtCh.rawId()])[histoTag],1);
414  }
415  if( histoType == "ThetaBestQual" ){ //It does not make sense: 7 positions, how to define best?
416  (digiHistos[dtCh.rawId()])[histoTag] =
417  ibooker.book1D(histoName,"Trigger quality of best primitives (theta)",2,0.5,2.5); // 0 = not fired, 1 = L, 2 = H
418  setQLabelsTheta((digiHistos[dtCh.rawId()])[histoTag],1);
419  return ;
420  }
421 
422  }
423  else if ( folder == "Segment") {
424 
425  if( histoType.find("TrackThetaPosvsAngle" ) == 0 ) {
426 
427  string histoLabel = "Position vs Angle (theta)";
428  if (histoType.find("andTrigH") != string::npos) histoLabel += " for H triggers";
429  else if (histoType.find("andTrig") != string::npos) histoLabel += " for triggers";
430 
431  float min,max;
432  int nbins;
433  trigGeomUtils->thetaRange(dtCh,min,max,nbins);
434  (digiHistos[dtCh.rawId()])[histoTag] =
435  ibooker.book2D(histoName,histoLabel,16,-40.,40.,nbins,min,max);
436  return ;
437  }
438  if( histoType.find("TrackPosvsAngle") == 0 ){
439 
440  float min,max;
441  int nbins;
442  trigGeomUtils->phiRange(dtCh,min,max,nbins);
443 
444  string histoLabel = "Position vs Angle (phi)";
445  if (histoType.find("andTrigHHHL") != string::npos) histoLabel += " for HH/HL triggers";
446  else if (histoType.find("andTrig") != string::npos) histoLabel += " for triggers";
447 
448  (digiHistos[dtCh.rawId()])[histoTag] =
449  ibooker.book2D(histoName,histoLabel,16,-40.,40.,nbins,min,max);
450  return ;
451  }
452  if( histoType == "PhitkvsPhitrig" ){
453  (digiHistos[dtCh.rawId()])[histoTag] =
454  ibooker.book2D(histoName,"Local position: segment vs trigger",100,-500.,500.,100,-500.,500.);
455  return ;
456  }
457  if( histoType == "PhibtkvsPhibtrig" ){
458  (digiHistos[dtCh.rawId()])[histoTag] =
459  ibooker.book2D(histoName,"Local direction : segment vs trigger",200,-40.,40.,200,-40.,40.);
460  return ;
461  }
462  if( histoType == "PhiResidual" ){
463  (digiHistos[dtCh.rawId()])[histoTag] =
464  ibooker.book1D(histoName,"Trigger local position - Segment local position (correlated triggers)",400,-10.,10.);
465  return ;
466  }
467  if( histoType == "PhibResidual" ){
468  (digiHistos[dtCh.rawId()])[histoTag] =
469  ibooker.book1D(histoName,"Trigger local direction - Segment local direction (correlated triggers)",500,-10.,10.);
470  return ;
471  }
472  if( histoType == "HitstkvsQualtrig" ){
473  (digiHistos[dtCh.rawId()])[histoTag] =
474  ibooker.book2D(histoName,"Segment hits (phi) vs trigger quality",7,-0.5,6.5,10,0.5,10.5);
475  setQLabels((digiHistos[dtCh.rawId()])[histoTag],1);
476  return ;
477  }
478 
479  }
480 
481 }
482 
483 void DTLocalTriggerTask::bookWheelHistos(DQMStore::IBooker & ibooker, int wh, string histoTag) {
484 
485  stringstream wheel; wheel << wh;
486 
487  string histoType = histoTag.substr(3,histoTag.find("_",3)-3);
488  bool isTM = histoTag.substr(0,2) == "TM";
489 
490  ibooker.setCurrentFolder(topFolder(isTM) + "Wheel" + wheel.str() + "/");
491 
492  string histoName = histoTag + "_W" + wheel.str();
493 
494  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerTask") << "[DTLocalTriggerTask]: booking " << topFolder(isTM)
495  << "Wheel" << wheel.str() << "/" << histoName << endl;
496 
497  if( histoType.find("BXDiff") != string::npos ){
498  MonitorElement *me = ibooker.bookProfile2D(histoName,"DDU-TM BX Difference",12,1,13,4,1,5,0.,20.);
499  me->setAxisTitle("Sector",1);
500  me->setAxisTitle("station",2);
501  (wheelHistos[wh])[histoTag] = me;
502  return ;
503  }
504 
505 }
506 
507 void DTLocalTriggerTask::runTMAnalysis(std::vector<L1MuDTChambPhDigi> const* phTrigs,
508  std::vector<L1MuDTChambThDigi> const* thTrigs ) {
509 
510  //exit(0);
511 
512  string histoType ;
513  string histoTag ;
514 
515 
516  // define best quality trigger segment (phi and theta)
517  // in any station start from 1 and zero is kept empty
518  for (int i=0;i<5;++i){
519  for (int j=0;j<6;++j){
520  for (int k=0;k<13;++k){
521  phcode_best[j][i][k] = -1;
522  thcode_best[j][i][k] = -1;
523  }
524  }
525  }
526 
527  vector<L1MuDTChambPhDigi>::const_iterator iph = phTrigs->begin();
528  vector<L1MuDTChambPhDigi>::const_iterator iphe = phTrigs->end();
529  for(; iph !=iphe ; ++iph) {
530 
531  int phwheel = iph->whNum();
532  int phsec = iph->scNum() + 1; // SM The track finder goes from 0 to 11. I need them from 1 to 12 !!!!!
533  int phst = iph->stNum();
534  int phbx = iph->bxNum();
535  int phcode = iph->code();
536  int phi1st = iph->Ts2Tag();
537 
538  // FIXME: workaround for TM data with station ID
539  if(phst == 0) {
540  tm_IDDataErrorPlot->Fill(phwheel);
541  continue;
542  }
543 
544  if(phcode>phcode_best[phwheel+3][phst][phsec] && phcode<7) {
545  phcode_best[phwheel+3][phst][phsec]=phcode;
546  iphbest[phwheel+3][phst][phsec] = &(*iph);
547  }
548 
549  DTChamberId dtChId(phwheel,phst,phsec);
550 
551  float x = trigGeomUtils->trigPos(&(*iph));
552  float angle = trigGeomUtils->trigDir(&(*iph));
553  uint32_t indexCh = dtChId.rawId();
554 
555  map<string, MonitorElement*> &innerME = digiHistos[indexCh];
556 
557  if (tpMode) {
558  innerME.find("TM_BXvsQual"+trigsrc)->second->Fill(phcode,phbx-phi1st); // SM BX vs Qual Phi view (1st tracks)
559  innerME.find("TM_QualvsPhirad"+trigsrc)->second->Fill(x,phcode); // SM Qual vs radial angle Phi view
560  }
561  else {
562  innerME.find("TM_BXvsQual"+trigsrc)->second->Fill(phcode,phbx-phi1st); // SM BX vs Qual Phi view (1st tracks)
563  innerME.find("TM_Flag1stvsQual"+trigsrc)->second->Fill(phcode,phi1st); // SM Qual 1st/2nd track flag Phi view
564  if (detailedAnalysis) {
565  innerME.find("TM_QualvsPhirad"+trigsrc)->second->Fill(x,phcode); // SM Qual vs radial angle Phi view
566  innerME.find("TM_QualvsPhibend"+trigsrc)->second->Fill(angle,phcode); // SM Qual vs bending Phi view
567  }
568  }
569 
570  }
571 
572  if (doTMTheta) {
573  int thcode[7];
574  vector<L1MuDTChambThDigi>::const_iterator ith = thTrigs->begin();
575  vector<L1MuDTChambThDigi>::const_iterator ithe = thTrigs->end();
576  for(; ith != ithe; ++ith) {
577  int thwheel = ith->whNum();
578  int thsec = ith->scNum() + 1; // SM The track finder goes from 0 to 11. I need them from 1 to 12 !!!!!
579  int thst = ith->stNum();
580  int thbx = ith->bxNum();
581 
582  for (int pos=0; pos<7; pos++) {
583  thcode[pos] = ith->code(pos);
584 
585  if(thcode[pos]>thcode_best[thwheel+3][thst][thsec] ) {
586  thcode_best[thwheel+3][thst][thsec]=thcode[pos];
587  ithbest[thwheel+3][thst][thsec] = &(*ith);
588  }
589  }
590 
591  DTChamberId dtChId(thwheel,thst,thsec);
592  uint32_t indexCh = dtChId.rawId();
593 
594  map<string, MonitorElement*> &innerME = digiHistos[indexCh];
595 
596  for (int pos=0; pos<7; pos++) { //SM fill position for non zero position bit in theta view
597  if(thcode[pos]>0){ //Fired
598  innerME.find("TM_PositionvsBX"+trigsrc)->second->Fill(thbx,pos); // SM BX vs Position Theta view
599  innerME.find("TM_PositionvsQual"+trigsrc)->second->Fill(thcode[pos],pos); //code = pos + qual; so 0, 1, 2 for 0, L, H resp.
600  innerME.find("TM_ThetaBXvsQual"+trigsrc)->second->Fill(thcode[pos],thbx); //code = pos + qual; so 0, 1, 2 for 0, L, H resp.
601  }
602  }
603  }
604  }
605 
606 
607  // Fill Quality plots with best TM triggers in phi & theta
608  if (!tpMode) {
609  for (int st=1;st<5;++st){
610  for (int wh=-2;wh<3;++wh){
611  for (int sc=1;sc<13;++sc){
612  if (phcode_best[wh+3][st][sc]>-1 && phcode_best[wh+3][st][sc]<7){
613  DTChamberId id(wh,st,sc);
614  uint32_t indexCh = id.rawId();
615  map<string, MonitorElement*> &innerME = digiHistos[indexCh];
616 
617  innerME.find("TM_BestQual"+trigsrc)->second->Fill(phcode_best[wh+3][st][sc]); // Best Qual Trigger Phi view
618  }
619  if (thcode_best[wh+3][st][sc]>0 && thcode_best[wh+3][st][sc]<3){
620  DTChamberId id(wh,st,sc);
621  uint32_t indexCh = id.rawId();
622  map<string, MonitorElement*> &innerME = digiHistos[indexCh];
623 
624  innerME.find("TM_ThetaBestQual"+trigsrc)->second->Fill(thcode_best[wh+3][st][sc]); // Best Qual Trigger Theta view
625  }
626  }
627  }
628  }
629  }
630 }
631 
633 
635 
636  for (int i=0;i<5;++i){
637  for (int j=0;j<6;++j){
638  for (int k=0;k<13;++k){
639  dduphcode_best[j][i][k] = -1;
640  dduthcode_best[j][i][k] = -1;
641  }
642  }
643  }
644 
645  for (detUnitIt=trigsDDU->begin();
646  detUnitIt!=trigsDDU->end();
647  ++detUnitIt){
648 
649  const DTChamberId& id = (*detUnitIt).first;
650  const DTLocalTriggerCollection::Range& range = (*detUnitIt).second;
651  uint32_t indexCh = id.rawId();
652  map<string, MonitorElement*> &innerME = digiHistos[indexCh];
653 
654  int wh = id.wheel();
655  int sec = id.sector();
656  int st = id.station();
657 
658  for (DTLocalTriggerCollection::const_iterator trigIt = range.first;
659  trigIt!=range.second;
660  ++trigIt){
661 
662  int bx = trigIt->bx();
663  int quality = trigIt->quality();
664  int thqual = trigIt->trTheta();
665  int flag1st = trigIt->secondTrack() ? 1 : 0;
666 
667  // check if SC data exist: fill for any trigger
668  if( quality>-1 && quality<7 ) { // it is a phi trigger
669 
670  if(quality>dduphcode_best[wh+3][st][sec]) {
671  dduphcode_best[wh+3][st][sec]=quality;
672  iphbestddu[wh+3][st][sec] = &(*trigIt);
673  }
674 
675  if(tpMode) {
676  innerME.find("DDU_BXvsQual"+trigsrc)->second->Fill(quality,bx-flag1st); // SM BX vs Qual Phi view
677  }
678  else {
679  innerME.find("DDU_BXvsQual"+trigsrc)->second->Fill(quality,bx-flag1st); // SM BX vs Qual Phi view
680  innerME.find("DDU_Flag1stvsQual"+trigsrc)->second->Fill(quality,flag1st); // SM Quality vs 1st/2nd track flag Phi view
681  }
682  }
683  if( thqual>0 && !tpMode ) { // it is a theta trigger
684 
685  if(thqual>dduthcode_best[wh+3][st][sec] ) {
686  dduthcode_best[wh+3][st][sec]=thqual;
687  }
688 
689  innerME.find("DDU_ThetaBXvsQual"+trigsrc)->second->Fill(thqual,bx); // SM BX vs Qual Theta view
690  }
691  }
692 
693  // Fill Quality plots with best ddu triggers in phi & theta
694  if (!tpMode) {
695  if (dduphcode_best[wh+3][st][sec]>-1 &&
696  dduphcode_best[wh+3][st][sec]<7){
697 
698  innerME.find("DDU_BestQual"+trigsrc)->second->Fill(dduphcode_best[wh+3][st][sec]); // Best Qual Trigger Phi view
699  }
700  if (dduthcode_best[wh+3][st][sec]>0){
701  innerME.find("DDU_ThetaBestQual"+trigsrc)->second->Fill(dduthcode_best[wh+3][st][sec]); // Best Qual Trigger Theta view
702  }
703  }
704  }
705 }
706 
707 
709 
711 
712  // Find best tracks & good tracks
713  memset(track_ok,false,450*sizeof(bool));
714 
715  DTRecSegment4DCollection::id_iterator chamberId;
716  vector<const DTRecSegment4D*> best4DSegments;
717 
718  // Preliminary loop finds best 4D Segment and high quality ones
719  for (chamberId = segments4D->id_begin(); chamberId != segments4D->id_end(); ++chamberId){
720 
721  DTRecSegment4DCollection::range range = segments4D->get(*chamberId);
722  const DTRecSegment4D* tmpBest=0;
723  int tmpdof = 0;
724  int dof = 0;
725 
726  for ( track = range.first; track != range.second; ++track){
727 
728  if( (*track).hasPhi() ) {
729 
730  dof = (*track).phiSegment()->degreesOfFreedom();
731  if ( dof>tmpdof ){
732  tmpBest = &(*track);
733  tmpdof = dof;
734 
735  int wheel = (*track).chamberId().wheel();
736  int sector = (*track).chamberId().sector();
737  int station = (*track).chamberId().station();
738  if (sector==13){
739  sector=4;
740  }
741  else if (sector==14){
742  sector=10;
743  }
744  track_ok[wheel+3][station][sector] = (!track_ok[wheel+3][station][sector] && dof>=2);
745  }
746 
747  }
748  }
749  if (tmpBest) best4DSegments.push_back(tmpBest);
750  }
751 
752  vector<const DTRecSegment4D*>::const_iterator btrack;
753 
754  for ( btrack = best4DSegments.begin(); btrack != best4DSegments.end(); ++btrack ){
755 
756  if( (*btrack)->hasPhi() ) { // Phi component
757 
758  int wheel = (*btrack)->chamberId().wheel();
759  int station = (*btrack)->chamberId().station();
760  int sector = (*btrack)->chamberId().sector();
761  int scsector = 0;
762  float x_track, y_track, x_angle, y_angle;
763  trigGeomUtils->computeSCCoordinates((*btrack),scsector,x_track,x_angle,y_track,y_angle);
764  int nHitsPhi = (*btrack)->phiSegment()->degreesOfFreedom()+2;
765 
766  DTChamberId dtChId(wheel,station,sector); // get chamber for LUTs histograms (Sectors 1 to 14)
767  uint32_t indexCh = dtChId.rawId();
768  map<string, MonitorElement*> &innerMECh = digiHistos[indexCh];
769 
770  DTChamberId dtChIdSC = DTChamberId(wheel,station,scsector); // get chamber for histograms SC granularity (sectors 1 to 12)
771  indexCh = dtChIdSC.rawId();
772  map<string, MonitorElement*> &innerME = digiHistos[indexCh];
773 
774  if (useDDU &&
775  dduphcode_best[wheel+3][station][scsector] > -1 &&
776  dduphcode_best[wheel+3][station][scsector] < 7 ) {
777 
778  // SM hits of the track vs quality of the trigger
779  innerME.find("DDU_HitstkvsQualtrig"+trigsrc)->second->Fill(dduphcode_best[wheel+3][station][scsector],nHitsPhi);
780 
781  }
782 
783  if (useTM &&
784  phcode_best[wheel+3][station][scsector] > -1 &&
785  phcode_best[wheel+3][station][scsector] < 7 ) {
786 
787  innerME.find("TM_HitstkvsQualtrig"+trigsrc)->second->Fill(phcode_best[wheel+3][station][scsector],nHitsPhi);
788 
789  if (phcode_best[wheel+3][station][scsector]>3 && nHitsPhi>=7){
790 
791  float x_trigger = trigGeomUtils->trigPos(iphbest[wheel+3][station][scsector]);
792  float angle_trigger = trigGeomUtils->trigDir(iphbest[wheel+3][station][scsector]);
793  trigGeomUtils->trigToSeg(station,x_trigger,x_angle);
794 
795  innerMECh.find("TM_PhitkvsPhitrig"+trigsrc)->second->Fill(x_trigger,x_track);
796  innerMECh.find("TM_PhibtkvsPhibtrig"+trigsrc)->second->Fill(angle_trigger,x_angle);
797  innerMECh.find("TM_PhiResidual"+trigsrc)->second->Fill(x_trigger-x_track);
798  innerMECh.find("TM_PhibResidual"+trigsrc)->second->Fill(angle_trigger-x_angle);
799  }
800  }
801 
802 
803  if (useTM) {
804 
805  // check for triggers elsewhere in the sector
806  bool trigFlagTM =false;
807  for (int ist=1; ist<5; ist++){
808  if (ist!=station &&
809  phcode_best[wheel+3][ist][scsector]>=2 &&
810  phcode_best[wheel+3][ist][scsector]<7 &&
811  track_ok[wheel+3][ist][scsector]==true){
812  trigFlagTM = true;
813  break;
814  }
815  }
816 
817  if (trigFlagTM && fabs(x_angle)<40. && nHitsPhi>=7){
818 
819  // position vs angle of track for reconstruced tracks (denom. for trigger efficiency)
820  innerME.find("TM_TrackPosvsAngle"+trigsrc)->second->Fill(x_angle,x_track);
821  if (phcode_best[wheel+3][station][scsector] >= 2 && phcode_best[wheel+3][station][scsector] < 7) {
822  innerME.find("TM_TrackPosvsAngleandTrig"+trigsrc)->second->Fill(x_angle,x_track);
823  if (phcode_best[wheel+3][station][scsector] > 4){ //HH & HL Triggers
824  innerME.find("TM_TrackPosvsAngleandTrigHHHL"+trigsrc)->second->Fill(x_angle,x_track);
825  }
826  }
827 
828  }
829 
830  if ((*btrack)->hasZed() && trigFlagTM && fabs(y_angle)<40. && (*btrack)->zSegment()->degreesOfFreedom()>=1){
831 
832  // position va angle of track for reconstruced tracks (denom. for trigger efficiency) along theta direction
833  innerME.find("TM_TrackThetaPosvsAngle"+trigsrc)->second->Fill(y_angle,y_track);
834  if (thcode_best[wheel+3][station][scsector] > 0) {
835  innerME.find("TM_TrackThetaPosvsAngleandTrig"+trigsrc)->second->Fill(y_angle,y_track);
836  if (thcode_best[wheel+3][station][scsector] == 2) {
837  innerME.find("TM_TrackThetaPosvsAngleandTrigH"+trigsrc)->second->Fill(y_angle,y_track);
838  }
839  }
840 
841  }
842  }
843 
844  if (useDDU) {
845 
846  // check for triggers elsewhere in the sector
847  bool trigFlagDDU =false;
848  for (int ist=1; ist<5; ist++){
849  if (ist!=station &&
850  dduphcode_best[wheel+3][ist][scsector]>=2 &&
851  dduphcode_best[wheel+3][ist][scsector]<7 &&
852  track_ok[wheel+3][ist][scsector]==true){
853  trigFlagDDU = true;
854  break;
855  }
856  }
857 
858  if (trigFlagDDU && fabs(x_angle)<40. && nHitsPhi>=7){
859 
860  // position vs angle of track for reconstruced tracks (denom. for trigger efficiency)
861  innerME.find("DDU_TrackPosvsAngle"+trigsrc)->second->Fill(x_angle,x_track);
862  if (dduphcode_best[wheel+3][station][scsector] >= 2 && dduphcode_best[wheel+3][station][scsector] < 7) {
863  innerME.find("DDU_TrackPosvsAngleandTrig"+trigsrc)->second->Fill(x_angle,x_track);
864  if (dduphcode_best[wheel+3][station][scsector] > 4){ //HH & HL Triggers
865  innerME.find("DDU_TrackPosvsAngleandTrigHHHL"+trigsrc)->second->Fill(x_angle,x_track);
866  }
867  }
868 
869  }
870 
871  if ((*btrack)->hasZed() && trigFlagDDU && fabs(y_angle)<40. && (*btrack)->zSegment()->degreesOfFreedom()>=1){
872 
873  // position va angle of track for reconstruced tracks (denom. for trigger efficiency) along theta direction
874  innerME.find("DDU_TrackThetaPosvsAngle"+trigsrc)->second->Fill(y_angle,y_track);
875  if (dduthcode_best[wheel+3][station][scsector] > 0) {
876  innerME.find("DDU_TrackThetaPosvsAngleandTrig"+trigsrc)->second->Fill(y_angle,y_track);
877  if (dduthcode_best[wheel+3][station][scsector] == 3) {
878  innerME.find("DDU_TrackThetaPosvsAngleandTrigH"+trigsrc)->second->Fill(y_angle,y_track);
879  }
880  }
881 
882  }
883  }
884  }
885  }
886 
887 }
888 
889 
891 
892  string histoType ;
893  string histoTag ;
894 
895  for (int st=1;st<5;++st){
896  for (int wh=-2;wh<3;++wh){
897  for (int sc=1;sc<13;++sc){
898  if ( (phcode_best[wh+3][st][sc]>-1 && phcode_best[wh+3][st][sc]<7) ||
899  (dduphcode_best[wh+3][st][sc]>-1 && dduphcode_best[wh+3][st][sc]<7) ){
900  DTChamberId id(wh,st,sc);
901  uint32_t indexCh = id.rawId();
902  map<string, MonitorElement*> &innerME = digiHistos[indexCh];
903 
904  innerME.find("COM_QualDDUvsQualTM"+trigsrc)->second->Fill(phcode_best[wh+3][st][sc],dduphcode_best[wh+3][st][sc]);
905  if ( (phcode_best[wh+3][st][sc]>-1 && phcode_best[wh+3][st][sc]<7) &&
906  (dduphcode_best[wh+3][st][sc]>-1 && dduphcode_best[wh+3][st][sc]<7) ){
907  int bxDDU = iphbestddu[wh+3][st][sc]->bx() - iphbestddu[wh+3][st][sc]->secondTrack();
908  int bxTM = iphbest[wh+3][st][sc]->bxNum() - iphbest[wh+3][st][sc]->Ts2Tag();
909  (wheelHistos[wh]).find("COM_BXDiff"+trigsrc)->second->Fill(sc,st,bxDDU-bxTM);
910  }
911  }
912  }
913  }
914  }
915 
916 }
917 
919 
920  TH1* histo = me->getTH1();
921  if (!histo) return;
922 
923  TAxis* axis=0;
924  if (iaxis==1) {
925  axis=histo->GetXaxis();
926  }
927  else if(iaxis==2) {
928  axis=histo->GetYaxis();
929  }
930  if (!axis) return;
931 
932  string labels[7] = {"LI","LO","HI","HO","LL","HL","HH"};
933  int istart = axis->GetXmin()<-1 ? 2 : 1;
934  for (int i=0;i<7;i++) {
935  axis->SetBinLabel(i+istart,labels[i].c_str());
936  }
937 
938 }
939 
941 
942  TH1* histo = me->getTH1();
943  if (!histo) return;
944 
945  TAxis* axis=0;
946  if (iaxis==1) {
947  axis=histo->GetXaxis();
948  }
949  else if(iaxis==2) {
950  axis=histo->GetYaxis();
951  }
952  if (!axis) return;
953 
954  string labels[2] = {"L","H"};
955  int istart = axis->GetXmin()<-1 ? 2 : 1;
956  for (int i=0;i<2;i++) {
957  axis->SetBinLabel(i+istart,labels[i].c_str());
958  }
959 
960 }
961 
962 
963 
965 
966 
967  if (!isLocalRun){
968 
969  Handle<LTCDigiCollection> ltcdigis;
970  e.getByToken(ltcDigiCollectionToken_, ltcdigis);
971 
972  for (std::vector<LTCDigi>::const_iterator ltc_it = ltcdigis->begin(); ltc_it != ltcdigis->end(); ltc_it++){
973 
974  size_t otherTriggerSum=0;
975  for (size_t i = 1; i < 6; i++) {
976  otherTriggerSum += size_t((*ltc_it).HasTriggered(i));
977  }
978  if ((*ltc_it).HasTriggered(0) && otherTriggerSum == 0)
979  trigsrc = "_DTonly";
980  else if (!(*ltc_it).HasTriggered(0))
981  trigsrc = "_NoDT";
982  else if ((*ltc_it).HasTriggered(0) && otherTriggerSum > 0)
983  trigsrc = "_DTalso";
984 
985  }
986  return;
987  }
988 
989  trigsrc = "";
990  return;
991 
992 }
993 
994 // Local Variables:
995 // show-trailing-whitespace: t
996 // truncate-lines: t
997 // End:
LuminosityBlockID id() const
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
std::pair< const_iterator, const_iterator > range
iterator range
Definition: RangeMap.h:50
void thetaRange(const DTChamberId &id, float &min, float &max, int &nbins, float step=15)
Compute theta range in local chamber coordinates.
int phcode_best[6][5][13]
virtual int degreesOfFreedom() const
return the DOF of the segment
std::map< int, std::map< std::string, MonitorElement * > > wheelHistos
void runTMAnalysis(std::vector< L1MuDTChambPhDigi > const *phTrigs, std::vector< L1MuDTChambThDigi > const *thTrigs)
Run analysis on TM data.
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
int thcode_best[6][5][13]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Book the histograms.
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
float trigDir(const L1MuDTChambPhDigi *trig)
Return local direction (trigger RF) for a given trigger primitive.
int dduphcode_best[6][5][13]
void setQLabelsTheta(MonitorElement *me, short int iaxis)
void dqmBeginRun(const edm::Run &, const edm::EventSetup &)
Beginrun.
edm::InputTag tmTh_label_
virtual DTChamberId chamberId() const
The (specific) DetId of the chamber on which the segment resides.
MonitorElement * tm_IDDataErrorPlot
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
bool track_ok[6][5][15]
std::string & topFolder(bool isTM)
Get the Top folder (different between Physics and TP and TM/DDU)
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
int dduthcode_best[6][5][13]
void runSegmentAnalysis(edm::Handle< DTRecSegment4DCollection > &segments4D)
Run analysis using DT 4D segments.
void Fill(long long x)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
edm::EDGetTokenT< DTRecSegment4DCollection > seg_Token_
edm::EDGetTokenT< L1MuDTChambPhContainer > tm_Token_
MonitorElement * bookProfile2D(Args &&...args)
Definition: DQMStore.h:163
void trigToSeg(int st, float &x, float dir)
Compute Trigger x coordinate in chamber RF.
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
int j
Definition: DBlmapReader.cc:9
TH1 * getTH1(void) const
edm::EDGetTokenT< L1MuDTChambThContainer > tmTh_Token_
T min(T a, T b)
Definition: MathUtil.h:58
DTLocalTriggerTask(const edm::ParameterSet &ps)
Constructor.
bool isValid() const
Definition: HandleBase.h:75
#define LogTrace(id)
edm::EDGetTokenT< DTLocalTriggerCollection > ros_Token_
edm::ESHandle< DTGeometry > muonGeom
void phiRange(const DTChamberId &id, float &min, float &max, int &nbins, float step=15)
Compute phi range in local chamber coordinates.
void bookHistos(DQMStore::IBooker &, const DTChamberId &dtCh, std::string folder, std::string histoTag)
const DTLocalTrigger * iphbestddu[6][5][13]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
void runDDUvsTMAnalysis(std::string &trigsrc)
Run analysis on ROS data.
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
const T & get() const
Definition: EventSetup.h:56
const L1MuDTChambThDigi * ithbest[6][5][13]
LuminosityBlockNumber_t luminosityBlock() const
void setQLabels(MonitorElement *me, short int iaxis)
Set Quality labels.
std::vector< DTLocalTrigger >::const_iterator const_iterator
return(e1-e2)*(e1-e2)+dp *dp
edm::ParameterSet parameters
bool secondTrack() const
DTTrigGeomUtils * trigGeomUtils
const L1MuDTChambPhDigi * iphbest[6][5][13]
int sector() const
Definition: DTChamberId.h:61
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
To reset the MEs.
virtual ~DTLocalTriggerTask()
Destructor.
void bookWheelHistos(DQMStore::IBooker &, int wh, std::string histoTag)
Book the histograms.
void triggerSource(const edm::Event &e)
Get the L1A source.
std::pair< const_iterator, const_iterator > Range
float trigPos(const L1MuDTChambPhDigi *trig)
Return local position (trigger RF) for a given trigger primitive.
int station() const
Return the station number.
Definition: DTChamberId.h:51
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void bookBarrelHistos(DQMStore::IBooker &, std::string histoTag)
Book the histograms.
std::map< uint32_t, std::map< std::string, MonitorElement * > > digiHistos
void computeSCCoordinates(const DTRecSegment4D *track, int &scsec, float &x, float &xdir, float &y, float &ydir)
Compute track coordinates with SC sector numbering.
uint16_t bx() const
tuple folder
Histograms Source for live online DQM in P5
Definition: Run.h:43
void runDDUAnalysis(edm::Handle< DTLocalTriggerCollection > &trigsDDU)
Run analysis on ROS data.
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11