CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
DTTriggerEfficiencyTask Class Reference

#include <DTTriggerEfficiencyTask.h>

Inheritance diagram for DTTriggerEfficiencyTask:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 DTTriggerEfficiencyTask (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~DTTriggerEfficiencyTask ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze. More...
 
void beginJob ()
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
 To reset the MEs. More...
 
void beginRun (const edm::Run &run, const edm::EventSetup &context)
 BeginRun. More...
 
void bookChamberHistos (const DTChamberId &dtCh, std::string histoTag, std::string folder="")
 Book chamber granularity histograms. More...
 
void bookWheelHistos (int wheel, std::string histoTag, std::string folder="")
 Book wheel granularity histograms. More...
 
void endJob (void)
 EndJob. More...
 
bool hasRPCTriggers (const edm::Event &e)
 checks for RPC Triggers More...
 
std::string topFolder (std::string source)
 return the top folder More...
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Attributes

std::map< uint32_t, std::map
< std::string, MonitorElement * > > 
chamberHistos
 
DQMStoredbe
 
edm::EDGetTokenT
< L1MuDTChambPhContainer
dcc_Token_
 
edm::EDGetTokenT
< DTLocalTriggerCollection
ddu_Token_
 
bool detailedPlots
 
edm::EDGetTokenT
< L1MuGMTReadoutCollection
gmt_Token_
 
edm::InputTag inputTagSEG
 
int maxBXDDU
 
int minBXDDU
 
edm::ESHandle< DTGeometrymuonGeom
 
edm::EDGetTokenT
< reco::MuonCollection
muons_Token_
 
int nevents
 
int nMinHitsPhi
 
edm::ParameterSet parameters
 
float phiAccRange
 
bool processDCC
 
bool processDDU
 
std::vector< std::string > processTags
 
std::string SegmArbitration
 
DTTrigGeomUtilstrigGeomUtils
 
std::map< int, std::map
< std::string, MonitorElement * > > 
wheelHistos
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 44 of file DTTriggerEfficiencyTask.h.

Constructor & Destructor Documentation

DTTriggerEfficiencyTask::DTTriggerEfficiencyTask ( const edm::ParameterSet ps)

Constructor.

Definition at line 43 of file DTTriggerEfficiencyTask.cc.

References dbe, dcc_Token_, ddu_Token_, detailedPlots, edm::ParameterSet::getUntrackedParameter(), gmt_Token_, inputTagSEG, LogTrace, maxBXDDU, minBXDDU, muons_Token_, nMinHitsPhi, cppFunctionSkipper::operator, parameters, phiAccRange, processDCC, processDDU, processTags, SegmArbitration, and AlCaHLTBitMon_QueryRunRegistry::string.

43  : trigGeomUtils(0) {
44 
45  LogTrace ("DTDQM|DTMonitorModule|DTTriggerEfficiencyTask") << "[DTTriggerEfficiencyTask]: Constructor" << endl;
46 
47  parameters = ps;
49 
50  muons_Token_ = consumes<reco::MuonCollection>(
52  dcc_Token_ = consumes<L1MuDTChambPhContainer>(
54  ddu_Token_ = consumes<DTLocalTriggerCollection>(
57  gmt_Token_ = consumes<L1MuGMTReadoutCollection>(
59 
61 
62  detailedPlots = parameters.getUntrackedParameter<bool>("detailedAnalysis");
63  processDCC = parameters.getUntrackedParameter<bool>("processDCC");
64  processDDU = parameters.getUntrackedParameter<bool>("processDDU");
65  minBXDDU = parameters.getUntrackedParameter<int>("minBXDDU");
66  maxBXDDU = parameters.getUntrackedParameter<int>("maxBXDDU");
67 
68  nMinHitsPhi = parameters.getUntrackedParameter<int>("nMinHitsPhi");
69  phiAccRange = parameters.getUntrackedParameter<double>("phiAccRange");
70 
71  if (processDCC) processTags.push_back("DCC");
72  if (processDDU) processTags.push_back("DDU");
73 
74 }
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< L1MuDTChambPhContainer > dcc_Token_
edm::EDGetTokenT< L1MuGMTReadoutCollection > gmt_Token_
edm::EDGetTokenT< reco::MuonCollection > muons_Token_
#define LogTrace(id)
edm::EDGetTokenT< DTLocalTriggerCollection > ddu_Token_
std::vector< std::string > processTags
DTTriggerEfficiencyTask::~DTTriggerEfficiencyTask ( )
virtual

Destructor.

Definition at line 77 of file DTTriggerEfficiencyTask.cc.

References LogTrace, and nevents.

77  {
78 
79  LogTrace ("DTDQM|DTMonitorModule|DTTriggerEfficiencyTask") << "[DTTriggerEfficiencyTask]: analyzed " << nevents << " events" << endl;
80 
81 }
#define LogTrace(id)

Member Function Documentation

void DTTriggerEfficiencyTask::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Analyze.

Implements edm::EDAnalyzer.

Definition at line 130 of file DTTriggerEfficiencyTask.cc.

References reco::MuonSegmentMatch::BelongsToTrackByCleaning, reco::MuonSegmentMatch::BelongsToTrackByDR, reco::MuonSegmentMatch::BestInChamberByDR, chamberHistos, DTTrigGeomUtils::computeSCCoordinates(), dcc_Token_, ddu_Token_, detailedPlots, MuonSubdetId::DT, edm::Event::getByToken(), hasRPCTriggers(), RPCpg::mu, patZpeak::muons, muons_Token_, nevents, nMinHitsPhi, phiAccRange, processTags, DetId::rawId(), SegmArbitration, relativeConstraints::station, trigGeomUtils, wheelHistos, x, xdir, detailsBasic3DVector::y, and ydir.

130  {
131 
132  nevents++;
133 
134  if (!hasRPCTriggers(e)) { return; }
135 
136  map<DTChamberId,const L1MuDTChambPhDigi*> phBestDCC;
137  map<DTChamberId,const DTLocalTrigger*> phBestDDU;
138 
139  // Getting best DCC Stuff
141  e.getByToken(dcc_Token_, l1DTTPGPh);
142  vector<L1MuDTChambPhDigi> const* phTrigs = l1DTTPGPh->getContainer();
143 
144  vector<L1MuDTChambPhDigi>::const_iterator iph = phTrigs->begin();
145  vector<L1MuDTChambPhDigi>::const_iterator iphe = phTrigs->end();
146  for(; iph !=iphe ; ++iph) {
147 
148  int phwheel = iph->whNum();
149  int phsec = iph->scNum() + 1; // DTTF numbering [0:11] -> DT numbering [1:12]
150  int phst = iph->stNum();
151  int phcode = iph->code();
152 
153  DTChamberId chId(phwheel,phst,phsec);
154 
155  if( phcode < 7 && (phBestDCC.find(chId) == phBestDCC.end() ||
156  phcode>phBestDCC[chId]->code()) ) phBestDCC[chId] = &(*iph);
157  }
158 
159  //Getting Best DDU Stuff
161  e.getByToken(ddu_Token_, trigsDDU);
163 
164  for (detUnitIt=trigsDDU->begin();detUnitIt!=trigsDDU->end();++detUnitIt){
165 
166  const DTChamberId& id = (*detUnitIt).first;
167  const DTLocalTriggerCollection::Range& range = (*detUnitIt).second;
168 
169  DTLocalTriggerCollection::const_iterator trigIt = range.first;
170  DTLocalTriggerCollection::const_iterator trigEnd = range.second;
171  for (; trigIt!= trigEnd;++trigIt){
172  int quality = trigIt->quality();
173  if(quality>-1 && quality<7 &&
174  (phBestDDU.find(id) == phBestDDU.end() ||
175  quality>phBestDDU[id]->quality()) ) phBestDDU[id] = &(*trigIt);
176  }
177 
178  }
179 
180  //Getting Best Segments
181  vector<const DTRecSegment4D*> best4DSegments;
182 
184  e.getByToken(muons_Token_, muons);
185  reco::MuonCollection::const_iterator mu;
186 
187  for( mu = muons->begin(); mu != muons->end(); ++mu ) {
188 
189  // Make sure that is standalone muon
190  if( !((*mu).isStandAloneMuon()) ) {continue;}
191 
192  // Get the chambers compatible with the muon
193  const vector<reco::MuonChamberMatch> matchedChambers = (*mu).matches();
194  vector<reco::MuonChamberMatch>::const_iterator chamber;
195 
196  for( chamber = matchedChambers.begin(); chamber != matchedChambers.end(); ++chamber ) {
197 
198  // look only in DTs
199  if( chamber->detector() != MuonSubdetId::DT ) {continue;}
200 
201  // Get the matched segments in the chamber
202  const vector<reco::MuonSegmentMatch> matchedSegments = (*chamber).segmentMatches;
203  vector<reco::MuonSegmentMatch>::const_iterator segment;
204 
205  for( segment = matchedSegments.begin(); segment != matchedSegments.end(); ++segment ) {
206 
207  edm::Ref<DTRecSegment4DCollection> dtSegment = segment->dtSegmentRef;
208 
209  // Segment Arbitration
210  if( SegmArbitration == "SegmentArbitration"
211  && !((*segment).isMask(reco::MuonSegmentMatch::BestInChamberByDR)) ) {continue;}
212 
213  if( SegmArbitration == "SegmentAndTrackArbitration"
214  && (!((*segment).isMask(reco::MuonSegmentMatch::BestInChamberByDR)) ||
215  !((*segment).isMask(reco::MuonSegmentMatch::BelongsToTrackByDR))) ) {continue;}
216 
217  if( SegmArbitration == "SegmentAndTrackArbitrationCleaned"
218  && (!((*segment).isMask(reco::MuonSegmentMatch::BestInChamberByDR)) ||
219  !((*segment).isMask(reco::MuonSegmentMatch::BelongsToTrackByDR)) ||
220  !((*segment).isMask(reco::MuonSegmentMatch::BelongsToTrackByCleaning))) ) {continue;}
221 
222 
223  if( (*dtSegment).hasPhi() ) {
224  best4DSegments.push_back(&(*dtSegment));
225  }
226 
227  }// end loop on matched segments
228  }// end loop on compatible chambers
229  }// end loop on muons
230 
231  // Plot filling
232  vector<const DTRecSegment4D*>::const_iterator btrack;
233  for ( btrack = best4DSegments.begin(); btrack != best4DSegments.end(); ++btrack ){
234 
235  int wheel = (*btrack)->chamberId().wheel();
236  int station = (*btrack)->chamberId().station();
237  int scsector = 0;
238  float x, xdir, y, ydir;
239  trigGeomUtils->computeSCCoordinates((*btrack),scsector,x,xdir,y,ydir);
240  int nHitsPhi = (*btrack)->phiSegment()->degreesOfFreedom()+2;
241  DTChamberId dtChId(wheel,station,scsector);
242  uint32_t indexCh = dtChId.rawId();
243  map<string, MonitorElement*> &innerChME = chamberHistos[indexCh];
244  map<string, MonitorElement*> &innerWhME = wheelHistos[wheel];
245 
246  if (fabs(xdir)<phiAccRange && nHitsPhi>=nMinHitsPhi){
247 
248  vector<string>::const_iterator tagIt = processTags.begin();
249  vector<string>::const_iterator tagEnd = processTags.end();
250 
251  for (; tagIt!=tagEnd; ++tagIt) {
252 
253  int qual = (*tagIt) == "DCC" ?
254  phBestDCC.find(dtChId) != phBestDCC.end() ? phBestDCC[dtChId]->code() : -1 :
255  phBestDDU.find(dtChId) != phBestDDU.end() ? phBestDDU[dtChId]->quality() : -1;
256 
257  innerWhME.find((*tagIt) + "_TrigEffDenum")->second->Fill(scsector,station);
258  if ( qual>=0 && qual<7 ) {
259  innerWhME.find((*tagIt) + "_TrigEffNum")->second->Fill(scsector,station);
260  if ( qual>=4 ) {
261  innerWhME.find((*tagIt) + "_TrigEffCorrNum")->second->Fill(scsector,station);
262  }
263  }
264  if (detailedPlots) {
265  innerChME.find((*tagIt) + "_TrackPosvsAngle")->second->Fill(xdir,x);
266  if ( qual>=0 && qual<7 ) {
267  innerChME.find((*tagIt) + "_TrackPosvsAngleAnyQual")->second->Fill(xdir,x);
268  if ( qual>=4 ) {
269  innerChME.find((*tagIt) + "_TrackPosvsAngleCorr")->second->Fill(xdir,x);
270  }
271  }
272  }
273  }
274  }
275  }
276 
277 }
edm::EDGetTokenT< L1MuDTChambPhContainer > dcc_Token_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
edm::EDGetTokenT< reco::MuonCollection > muons_Token_
std::map< int, std::map< std::string, MonitorElement * > > wheelHistos
const int mu
Definition: Constants.h:22
static const unsigned int BestInChamberByDR
static const unsigned int BelongsToTrackByCleaning
edm::EDGetTokenT< DTLocalTriggerCollection > ddu_Token_
bool hasRPCTriggers(const edm::Event &e)
checks for RPC Triggers
std::vector< DTLocalTrigger >::const_iterator const_iterator
std::vector< std::string > processTags
static const unsigned int BelongsToTrackByDR
tuple muons
Definition: patZpeak.py:38
std::pair< const_iterator, const_iterator > Range
static const int DT
Definition: MuonSubdetId.h:12
std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos
Definition: DDAxes.h:10
void computeSCCoordinates(const DTRecSegment4D *track, int &scsec, float &x, float &xdir, float &y, float &ydir)
Compute track coordinates with SC sector numbering.
void DTTriggerEfficiencyTask::beginJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 84 of file DTTriggerEfficiencyTask.cc.

References LogTrace.

84  {
85 
86  LogTrace ("DTDQM|DTMonitorModule|DTTriggerEfficiencyTask") << "[DTTriggerEfficiencyTask]: BeginJob" << endl;
87 
88 }
#define LogTrace(id)
void DTTriggerEfficiencyTask::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
protectedvirtual

To reset the MEs.

Reimplemented from edm::EDAnalyzer.

Definition at line 116 of file DTTriggerEfficiencyTask.cc.

References LogTrace.

116  {
117 
118  LogTrace ("DTDQM|DTMonitorModule|DTTriggerEfficiencyTask") <<"[DTTriggerEfficiencyTask]: Begin of LS transition"<<endl;
119 
120 }
#define LogTrace(id)
void DTTriggerEfficiencyTask::beginRun ( const edm::Run run,
const edm::EventSetup context 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 90 of file DTTriggerEfficiencyTask.cc.

References bookChamberHistos(), bookWheelHistos(), detailedPlots, DTChamberId, edm::EventSetup::get(), LogTrace, muonGeom, nevents, processTags, and trigGeomUtils.

90  {
91 
92  LogTrace ("DTDQM|DTMonitorModule|DTTriggerEfficiencyTask") << "[DTTriggerEfficiencyTask]: BeginRun" << endl;
93 
94  nevents = 0;
95 
96  for (int wh=-2;wh<=2;++wh){
97  vector<string>::const_iterator tagIt = processTags.begin();
98  vector<string>::const_iterator tagEnd = processTags.end();
99  for (; tagIt!=tagEnd; ++tagIt) {
100  bookWheelHistos(wh,(*tagIt),"Task");
101  if (detailedPlots) {
102  for (int stat=1;stat<=4;++stat){
103  for (int sect=1;sect<=12;++sect){
104  bookChamberHistos(DTChamberId(wh,stat,sect),(*tagIt),"Segment");
105  }
106  }
107  }
108  }
109  }
110 
111  context.get<MuonGeometryRecord>().get(muonGeom);
113 
114 }
void bookChamberHistos(const DTChamberId &dtCh, std::string histoTag, std::string folder="")
Book chamber granularity histograms.
#define LogTrace(id)
edm::ESHandle< DTGeometry > muonGeom
const T & get() const
Definition: EventSetup.h:55
std::vector< std::string > processTags
void bookWheelHistos(int wheel, std::string histoTag, std::string folder="")
Book wheel granularity histograms.
void DTTriggerEfficiencyTask::bookChamberHistos ( const DTChamberId dtCh,
std::string  histoTag,
std::string  folder = "" 
)
protected

Book chamber granularity histograms.

Definition at line 308 of file DTTriggerEfficiencyTask.cc.

References chamberHistos, dbe, hltbtagharvestinganalyzer_cfi::histoName, LogTrace, bookConverter::max, min(), pileupCalc::nbins, DTTrigGeomUtils::phiRange(), DetId::rawId(), DTChamberId::sector(), DTChamberId::station(), relativeConstraints::station, topFolder(), trigGeomUtils, and DTChamberId::wheel().

Referenced by beginRun().

308  {
309 
310  int wh = dtCh.wheel();
311  int sc = dtCh.sector();
312  int st = dtCh.station();
313  stringstream wheel; wheel << wh;
314  stringstream station; station << st;
315  stringstream sector; sector << sc;
316 
317  string hwFolder = topFolder(histoType);
318  string bookingFolder = hwFolder + "Wheel" + wheel.str() + "/Sector" + sector.str() + "/Station" + station.str() + "/" + folder;
319  string histoTag = "_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
320 
321  dbe->setCurrentFolder(bookingFolder);
322 
323  LogTrace ("DTDQM|DTMonitorModule|DTTriggerEfficiencyTask")
324  << "[DTTriggerEfficiencyTask]: booking histos in " << bookingFolder << endl;
325 
326  float min, max;
327  int nbins;
328  trigGeomUtils->phiRange(dtCh,min,max,nbins,20);
329 
330  string histoName = histoType + "_TrackPosvsAngle" + histoTag;
331  string histoLabel = "Position vs Angle (phi)";
332  (chamberHistos[dtCh.rawId()])[histoType + "_TrackPosvsAngle"] =
333  dbe->book2D(histoName,histoLabel,12,-30.,30.,nbins,min,max);
334 
335  histoName = histoType + "_TrackPosvsAngleAnyQual" + histoTag;
336  histoLabel = "Position vs Angle (phi) for any qual triggers";
337  (chamberHistos[dtCh.rawId()])[histoType + "_TrackPosvsAngleAnyQual"] =
338  dbe->book2D(histoName,histoLabel,12,-30.,30.,nbins,min,max);
339 
340  histoName = histoType + "_TrackPosvsAngleCorr" + histoTag;
341  histoLabel = "Position vs Angle (phi) for correlated triggers";
342  (chamberHistos[dtCh.rawId()])[histoType + "_TrackPosvsAngleCorr"] =
343  dbe->book2D(histoName,histoLabel,12,-30.,30.,nbins,min,max);
344 
345 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
T min(T a, T b)
Definition: MathUtil.h:58
#define LogTrace(id)
void phiRange(const DTChamberId &id, float &min, float &max, int &nbins, float step=15)
Compute phi range in local chamber coordinates.
int sector() const
Definition: DTChamberId.h:61
std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos
int station() const
Return the station number.
Definition: DTChamberId.h:51
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
std::string topFolder(std::string source)
return the top folder
void DTTriggerEfficiencyTask::bookWheelHistos ( int  wheel,
std::string  histoTag,
std::string  folder = "" 
)
protected

Book wheel granularity histograms.

Definition at line 347 of file DTTriggerEfficiencyTask.cc.

References dbe, LogTrace, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), topFolder(), and wheelHistos.

Referenced by beginRun().

347  {
348 
349  stringstream wh; wh << wheel;
350  string basedir;
351  if (hTag.find("Summary") != string::npos ) {
352  basedir = topFolder(hTag); //Book summary histo outside folder directory
353  } else {
354  basedir = topFolder(hTag) + folder + "/" ;
355  }
356 
357  dbe->setCurrentFolder(basedir);
358 
359  string hTagName = "_W" + wh.str();
360 
361  LogTrace("DTDQM|DTMonitorModule|DTTriggerEfficiencyTask")
362  << "[DTTriggerEfficiencyTask]: booking histos in "<< basedir << endl;
363 
364  string hName = hTag + "_TrigEffDenum" + hTagName;
365  MonitorElement* me = dbe->book2D(hName.c_str(),hName.c_str(),12,1,13,4,1,5);
366 
367  me->setBinLabel(1,"MB1",2);
368  me->setBinLabel(2,"MB2",2);
369  me->setBinLabel(3,"MB3",2);
370  me->setBinLabel(4,"MB4",2);
371  me->setAxisTitle("Sector",1);
372 
373  wheelHistos[wheel][hTag + "_TrigEffDenum"] = me;
374 
375  hName = hTag + "_TrigEffNum" + hTagName;
376  me = dbe->book2D(hName.c_str(),hName.c_str(),12,1,13,4,1,5);
377 
378  me->setBinLabel(1,"MB1",2);
379  me->setBinLabel(2,"MB2",2);
380  me->setBinLabel(3,"MB3",2);
381  me->setBinLabel(4,"MB4",2);
382  me->setAxisTitle("Sector",1);
383 
384  wheelHistos[wheel][hTag + "_TrigEffNum"] = me;
385 
386  hName = hTag + "_TrigEffCorrNum" + hTagName;
387  me = dbe->book2D(hName.c_str(),hName.c_str(),12,1,13,4,1,5);
388 
389  me->setBinLabel(1,"MB1",2);
390  me->setBinLabel(2,"MB2",2);
391  me->setBinLabel(3,"MB3",2);
392  me->setBinLabel(4,"MB4",2);
393  me->setAxisTitle("Sector",1);
394 
395  wheelHistos[wheel][hTag + "_TrigEffCorrNum"] = me;
396 
397  return;
398 
399 }
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)
std::map< int, std::map< std::string, MonitorElement * > > wheelHistos
#define LogTrace(id)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::string topFolder(std::string source)
return the top folder
void DTTriggerEfficiencyTask::endJob ( void  )
protectedvirtual

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 123 of file DTTriggerEfficiencyTask.cc.

References LogTrace, and nevents.

123  {
124 
125  LogTrace ("DTDQM|DTMonitorModule|DTTriggerEfficiencyTask") << "[DTTriggerEfficiencyTask]: analyzed " << nevents << " events" << endl;
126 
127 }
#define LogTrace(id)
bool DTTriggerEfficiencyTask::hasRPCTriggers ( const edm::Event e)
protected

checks for RPC Triggers

Definition at line 279 of file DTTriggerEfficiencyTask.cc.

References edm::Event::getByToken(), and gmt_Token_.

Referenced by analyze().

279  {
280 
282  e.getByToken(gmt_Token_, gmtrc);
283 
284  std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
285  std::vector<L1MuGMTReadoutRecord>::const_iterator igmtrr = gmt_records.begin();
286  std::vector<L1MuGMTReadoutRecord>::const_iterator egmtrr = gmt_records.end();
287  for(; igmtrr!=egmtrr; igmtrr++) {
288 
289  std::vector<L1MuGMTExtendedCand> candsGMT = igmtrr->getGMTCands();
290  std::vector<L1MuGMTExtendedCand>::const_iterator candGMTIt = candsGMT.begin();
291  std::vector<L1MuGMTExtendedCand>::const_iterator candGMTEnd = candsGMT.end();
292 
293  for(; candGMTIt!=candGMTEnd; ++candGMTIt){
294  if(!candGMTIt->empty()) {
295  int quality = candGMTIt->quality();
296  if(candGMTIt->bx()==0 &&
297  (quality == 5 || quality == 7)){
298  return true;
299  }
300  }
301  }
302  }
303 
304  return false;
305 
306 }
edm::EDGetTokenT< L1MuGMTReadoutCollection > gmt_Token_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
std::string DTTriggerEfficiencyTask::topFolder ( std::string  source)
inlineprotected

return the top folder

Definition at line 72 of file DTTriggerEfficiencyTask.h.

Referenced by bookChamberHistos(), and bookWheelHistos().

72 { return source=="DCC" ? "DT/03-LocalTrigger-DCC/" : "DT/04-LocalTrigger-DDU/"; }
static std::string const source
Definition: EdmProvDump.cc:43

Member Data Documentation

std::map<uint32_t, std::map<std::string, MonitorElement*> > DTTriggerEfficiencyTask::chamberHistos
private

Definition at line 106 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), and bookChamberHistos().

DQMStore* DTTriggerEfficiencyTask::dbe
private
edm::EDGetTokenT<L1MuDTChambPhContainer> DTTriggerEfficiencyTask::dcc_Token_
private

Definition at line 97 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), and DTTriggerEfficiencyTask().

edm::EDGetTokenT<DTLocalTriggerCollection> DTTriggerEfficiencyTask::ddu_Token_
private

Definition at line 98 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), and DTTriggerEfficiencyTask().

bool DTTriggerEfficiencyTask::detailedPlots
private

Definition at line 89 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), beginRun(), and DTTriggerEfficiencyTask().

edm::EDGetTokenT<L1MuGMTReadoutCollection> DTTriggerEfficiencyTask::gmt_Token_
private

Definition at line 100 of file DTTriggerEfficiencyTask.h.

Referenced by DTTriggerEfficiencyTask(), and hasRPCTriggers().

edm::InputTag DTTriggerEfficiencyTask::inputTagSEG
private

Definition at line 99 of file DTTriggerEfficiencyTask.h.

Referenced by DTTriggerEfficiencyTask().

int DTTriggerEfficiencyTask::maxBXDDU
private

Definition at line 91 of file DTTriggerEfficiencyTask.h.

Referenced by DTTriggerEfficiencyTask().

int DTTriggerEfficiencyTask::minBXDDU
private

Definition at line 91 of file DTTriggerEfficiencyTask.h.

Referenced by DTTriggerEfficiencyTask().

edm::ESHandle<DTGeometry> DTTriggerEfficiencyTask::muonGeom
private

Definition at line 104 of file DTTriggerEfficiencyTask.h.

Referenced by beginRun().

edm::EDGetTokenT<reco::MuonCollection> DTTriggerEfficiencyTask::muons_Token_
private

Definition at line 96 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), and DTTriggerEfficiencyTask().

int DTTriggerEfficiencyTask::nevents
private

Definition at line 85 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), beginRun(), endJob(), and ~DTTriggerEfficiencyTask().

int DTTriggerEfficiencyTask::nMinHitsPhi
private

Definition at line 94 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), and DTTriggerEfficiencyTask().

edm::ParameterSet DTTriggerEfficiencyTask::parameters
private
float DTTriggerEfficiencyTask::phiAccRange
private

Definition at line 93 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), and DTTriggerEfficiencyTask().

bool DTTriggerEfficiencyTask::processDCC
private

Definition at line 89 of file DTTriggerEfficiencyTask.h.

Referenced by DTTriggerEfficiencyTask().

bool DTTriggerEfficiencyTask::processDDU
private

Definition at line 89 of file DTTriggerEfficiencyTask.h.

Referenced by DTTriggerEfficiencyTask().

std::vector<std::string> DTTriggerEfficiencyTask::processTags
private

Definition at line 90 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), beginRun(), and DTTriggerEfficiencyTask().

std::string DTTriggerEfficiencyTask::SegmArbitration
private

Definition at line 87 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), and DTTriggerEfficiencyTask().

DTTrigGeomUtils* DTTriggerEfficiencyTask::trigGeomUtils
private

Definition at line 105 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), beginRun(), and bookChamberHistos().

std::map<int, std::map<std::string, MonitorElement*> > DTTriggerEfficiencyTask::wheelHistos
private

Definition at line 107 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), and bookWheelHistos().