CMS 3D CMS Logo

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