CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
DTTriggerEfficiencyTask Class Reference

#include <DTTriggerEfficiencyTask.h>

Inheritance diagram for DTTriggerEfficiencyTask:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 DTTriggerEfficiencyTask (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DTTriggerEfficiencyTask () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 Analyze. More...
 
void bookChamberHistos (DQMStore::IBooker &ibooker, const DTChamberId &dtCh, std::string histoTag, std::string folder="")
 Book chamber granularity histograms. More...
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void bookWheelHistos (DQMStore::IBooker &ibooker, int wheel, std::string histoTag, std::string folder="")
 Book wheel granularity histograms. More...
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 BeginRun. More...
 
bool hasRPCTriggers (const edm::Event &e)
 checks for RPC Triggers More...
 
std::string topFolder ()
 return the top folder More...
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Attributes

std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos
 
bool checkRPCtriggers
 
bool detailedPlots
 
edm::EDGetTokenT< L1MuGMTReadoutCollectiongmt_Token_
 
edm::InputTag inputTagSEG
 
const DTGeometrymuonGeom
 
edm::ESGetToken< DTGeometry, MuonGeometryRecordmuonGeomToken_
 
edm::EDGetTokenT< reco::MuonCollectionmuons_Token_
 
int nevents
 To reset the MEs. More...
 
int nMinHitsPhi
 
edm::ParameterSet parameters
 
float phiAccRange
 
std::vector< std::string > processTags
 
bool processTM
 
std::string SegmArbitration
 
edm::EDGetTokenT< L1MuDTChambPhContainertm_Token_
 
DTTrigGeomUtilstrigGeomUtils
 
std::map< int, std::map< std::string, MonitorElement * > > wheelHistos
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 42 of file DTTriggerEfficiencyTask.h.

Constructor & Destructor Documentation

◆ DTTriggerEfficiencyTask()

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

Constructor.

Definition at line 41 of file DTTriggerEfficiencyTask.cc.

References checkRPCtriggers, detailedPlots, edm::ParameterSet::getUntrackedParameter(), gmt_Token_, inputTagSEG, LogTrace, muons_Token_, nMinHitsPhi, parameters, phiAccRange, processTags, processTM, SegmArbitration, AlCaHLTBitMon_QueryRunRegistry::string, and tm_Token_.

42  : muonGeomToken_(esConsumes<edm::Transition::BeginRun>()), trigGeomUtils(nullptr) {
43  LogTrace("DTDQM|DTMonitorModule|DTTriggerEfficiencyTask") << "[DTTriggerEfficiencyTask]: Constructor" << endl;
44 
45  parameters = ps;
46 
47  muons_Token_ = consumes<reco::MuonCollection>(parameters.getUntrackedParameter<edm::InputTag>("inputTagMuons"));
48  tm_Token_ = consumes<L1MuDTChambPhContainer>(parameters.getUntrackedParameter<edm::InputTag>("inputTagTM"));
50  gmt_Token_ = consumes<L1MuGMTReadoutCollection>(parameters.getUntrackedParameter<edm::InputTag>("inputTagGMT"));
51 
53 
54  detailedPlots = parameters.getUntrackedParameter<bool>("detailedAnalysis");
55  processTM = parameters.getUntrackedParameter<bool>("processTM");
56 
57  checkRPCtriggers = parameters.getUntrackedParameter<bool>("checkRPCtriggers");
58  nMinHitsPhi = parameters.getUntrackedParameter<int>("nMinHitsPhi");
59  phiAccRange = parameters.getUntrackedParameter<double>("phiAccRange");
60 
61  if (processTM)
62  processTags.push_back("TM");
63  if (!processTM)
64  LogError("DTDQM|DTMonitorModule|DTTriggerEfficiencyTask")
65  << "[DTTriggerEfficiencyTask]: Error, no trigger source (Twinmux) has been selected!!" << endl;
66 }
edm::EDGetTokenT< L1MuGMTReadoutCollection > gmt_Token_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
edm::EDGetTokenT< reco::MuonCollection > muons_Token_
edm::EDGetTokenT< L1MuDTChambPhContainer > tm_Token_
Log< level::Error, false > LogError
#define LogTrace(id)
T getUntrackedParameter(std::string const &, T const &) const
std::vector< std::string > processTags

◆ ~DTTriggerEfficiencyTask()

DTTriggerEfficiencyTask::~DTTriggerEfficiencyTask ( )
override

Destructor.

Definition at line 68 of file DTTriggerEfficiencyTask.cc.

References LogTrace, and nevents.

68  {
69  LogTrace("DTDQM|DTMonitorModule|DTTriggerEfficiencyTask")
70  << "[DTTriggerEfficiencyTask]: analyzed " << nevents << " events" << endl;
71 }
#define LogTrace(id)
int nevents
To reset the MEs.

Member Function Documentation

◆ analyze()

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

Analyze.

Reimplemented from DQMEDAnalyzer.

Definition at line 101 of file DTTriggerEfficiencyTask.cc.

References reco::MuonSegmentMatch::BelongsToTrackByCleaning, reco::MuonSegmentMatch::BelongsToTrackByDR, reco::MuonSegmentMatch::BestInChamberByDR, relativeConstraints::chamber, chamberHistos, checkRPCtriggers, DTTrigGeomUtils::computeSCCoordinates(), detailedPlots, MuonSubdetId::DT, MillePedeFileConverter_cfg::e, L1MuDTChambPhContainer::getContainer(), hasRPCTriggers(), amptDefaultParameters_cff::mu, PDWG_BPHSkim_cff::muons, muons_Token_, nevents, nMinHitsPhi, phiAccRange, processTags, DetId::rawId(), SegmArbitration, relativeConstraints::station, tm_Token_, trigGeomUtils, makeMuonMisalignmentScenario::wheel, wheelHistos, x, xdir, y, and ydir.

101  {
102  nevents++;
103 
104  if (checkRPCtriggers) { //For pre-2016 Era compatibility
105  if (!hasRPCTriggers(e)) {
106  return;
107  }
108  }
109 
110  map<DTChamberId, const L1MuDTChambPhDigi*> phBestTM;
111  // Getting best TM Stuff
113  e.getByToken(tm_Token_, l1DTTPGPh);
114  vector<L1MuDTChambPhDigi> const* phTrigs = l1DTTPGPh->getContainer();
115  //empty from dttfDigis, needs emulator working?
116  vector<L1MuDTChambPhDigi>::const_iterator iph = phTrigs->begin();
117  vector<L1MuDTChambPhDigi>::const_iterator iphe = phTrigs->end();
118  for (; iph != iphe; ++iph) {
119  int phwheel = iph->whNum();
120  int phsec = iph->scNum() + 1; // DTTF numbering [0:11] -> DT numbering [1:12]
121  int phst = iph->stNum();
122  int phcode = iph->code();
123 
124  DTChamberId chId(phwheel, phst, phsec);
125 
126  if (phcode < 7 && (phBestTM.find(chId) == phBestTM.end() || phcode > phBestTM[chId]->code()))
127  phBestTM[chId] = &(*iph);
128  }
129 
130  //Getting Best Segments
131  vector<const DTRecSegment4D*> best4DSegments;
132 
134  e.getByToken(muons_Token_, muons);
135  reco::MuonCollection::const_iterator mu;
136 
137  for (mu = muons->begin(); mu != muons->end(); ++mu) {
138  // Make sure that is standalone muon
139  if (!((*mu).isStandAloneMuon())) {
140  continue;
141  }
142 
143  // Get the chambers compatible with the muon
144  const vector<reco::MuonChamberMatch> matchedChambers = (*mu).matches();
145  vector<reco::MuonChamberMatch>::const_iterator chamber;
146 
147  for (chamber = matchedChambers.begin(); chamber != matchedChambers.end(); ++chamber) {
148  // look only in DTs
149  if (chamber->detector() != MuonSubdetId::DT) {
150  continue;
151  }
152 
153  // Get the matched segments in the chamber
154  const vector<reco::MuonSegmentMatch> matchedSegments = (*chamber).segmentMatches;
155  vector<reco::MuonSegmentMatch>::const_iterator segment;
156 
157  for (segment = matchedSegments.begin(); segment != matchedSegments.end(); ++segment) {
158  edm::Ref<DTRecSegment4DCollection> dtSegment = segment->dtSegmentRef;
159 
160  // Segment Arbitration
161  if (SegmArbitration == "SegmentArbitration" &&
162  !((*segment).isMask(reco::MuonSegmentMatch::BestInChamberByDR))) {
163  continue;
164  }
165 
166  if (SegmArbitration == "SegmentAndTrackArbitration" &&
167  (!((*segment).isMask(reco::MuonSegmentMatch::BestInChamberByDR)) ||
168  !((*segment).isMask(reco::MuonSegmentMatch::BelongsToTrackByDR)))) {
169  continue;
170  }
171 
172  if (SegmArbitration == "SegmentAndTrackArbitrationCleaned" &&
173  (!((*segment).isMask(reco::MuonSegmentMatch::BestInChamberByDR)) ||
174  !((*segment).isMask(reco::MuonSegmentMatch::BelongsToTrackByDR)) ||
175  !((*segment).isMask(reco::MuonSegmentMatch::BelongsToTrackByCleaning)))) {
176  continue;
177  }
178 
179  if ((*dtSegment).hasPhi()) {
180  best4DSegments.push_back(&(*dtSegment));
181  }
182 
183  } // end loop on matched segments
184  } // end loop on compatible chambers
185  } // end loop on muons
186 
187  // Plot filling
188  vector<const DTRecSegment4D*>::const_iterator btrack;
189  for (btrack = best4DSegments.begin(); btrack != best4DSegments.end(); ++btrack) {
190  int wheel = (*btrack)->chamberId().wheel();
191  int station = (*btrack)->chamberId().station();
192  int scsector = 0;
193  float x, xdir, y, ydir;
194  trigGeomUtils->computeSCCoordinates((*btrack), scsector, x, xdir, y, ydir);
195  int nHitsPhi = (*btrack)->phiSegment()->degreesOfFreedom() + 2;
196  DTChamberId dtChId(wheel, station, scsector);
197  uint32_t indexCh = dtChId.rawId();
198  map<string, MonitorElement*>& innerChME = chamberHistos[indexCh];
199  map<string, MonitorElement*>& innerWhME = wheelHistos[wheel];
200 
201  if (fabs(xdir) < phiAccRange && nHitsPhi >= nMinHitsPhi) {
202  vector<string>::const_iterator tagIt = processTags.begin();
203  vector<string>::const_iterator tagEnd = processTags.end();
204  for (; tagIt != tagEnd; ++tagIt) {
205  int qual = phBestTM.find(dtChId) != phBestTM.end() ? phBestTM[dtChId]->code() : -1;
206  innerWhME.find((*tagIt) + "_TrigEffDenum")->second->Fill(scsector, station);
207  if (qual >= 0 && qual < 7) {
208  innerWhME.find((*tagIt) + "_TrigEffNum")->second->Fill(scsector, station);
209  if (qual >= 4) {
210  innerWhME.find((*tagIt) + "_TrigEffCorrNum")->second->Fill(scsector, station);
211  }
212  }
213  if (detailedPlots) {
214  innerChME.find((*tagIt) + "_TrackPosvsAngle")->second->Fill(xdir, x);
215  if (qual >= 0 && qual < 7) {
216  innerChME.find((*tagIt) + "_TrackPosvsAngleAnyQual")->second->Fill(xdir, x);
217  if (qual >= 4) {
218  innerChME.find((*tagIt) + "_TrackPosvsAngleCorr")->second->Fill(xdir, x);
219  }
220  }
221  }
222  }
223  }
224  }
225 }
edm::EDGetTokenT< reco::MuonCollection > muons_Token_
edm::EDGetTokenT< L1MuDTChambPhContainer > tm_Token_
std::map< int, std::map< std::string, MonitorElement * > > wheelHistos
static const unsigned int BestInChamberByDR
static const unsigned int BelongsToTrackByCleaning
bool hasRPCTriggers(const edm::Event &e)
checks for RPC Triggers
Phi_Container const * getContainer() const
int nevents
To reset the MEs.
std::vector< std::string > processTags
static const unsigned int BelongsToTrackByDR
std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos
static constexpr int DT
Definition: MuonSubdetId.h:11
void computeSCCoordinates(const DTRecSegment4D *track, int &scsec, float &x, float &xdir, float &y, float &ydir)
Compute track coordinates with SC sector numbering.

◆ bookChamberHistos()

void DTTriggerEfficiencyTask::bookChamberHistos ( DQMStore::IBooker ibooker,
const DTChamberId dtCh,
std::string  histoTag,
std::string  folder = "" 
)
protected

Book chamber granularity histograms.

Definition at line 252 of file DTTriggerEfficiencyTask.cc.

References dqm::implementation::IBooker::book2D(), chamberHistos, printsummarytable::folder, fftjetimagerecorder_cfi::histoLabel, HltBtagPostValidation_cff::histoName, dtResolutionTest_cfi::histoTag, LogTrace, SiStripPI::max, SiStripPI::min, LaserClient_cfi::nbins, DTTrigGeomUtils::phiRange(), DetId::rawId(), DTChamberId::sector(), dqm::implementation::NavigatorBase::setCurrentFolder(), DTChamberId::station(), relativeConstraints::station, topFolder(), trigGeomUtils, DTChamberId::wheel(), and makeMuonMisalignmentScenario::wheel.

Referenced by bookHistograms().

255  {
256  int wh = dtCh.wheel();
257  int sc = dtCh.sector();
258  int st = dtCh.station();
259  stringstream wheel;
260  wheel << wh;
261  stringstream station;
262  station << st;
263  stringstream sector;
264  sector << sc;
265 
266  string hwFolder = topFolder();
267  string bookingFolder =
268  hwFolder + "Wheel" + wheel.str() + "/Sector" + sector.str() + "/Station" + station.str() + "/" + folder;
269  string histoTag = "_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
270 
271  ibooker.setCurrentFolder(bookingFolder);
272 
273  LogTrace("DTDQM|DTMonitorModule|DTTriggerEfficiencyTask")
274  << "[DTTriggerEfficiencyTask]: booking histos in " << bookingFolder << endl;
275 
276  float min, max;
277  int nbins;
278  trigGeomUtils->phiRange(dtCh, min, max, nbins, 20);
279 
280  string histoName = histoType + "_TrackPosvsAngle" + histoTag;
281  string histoLabel = "Position vs Angle (phi)";
282 
283  (chamberHistos[dtCh.rawId()])[histoType + "_TrackPosvsAngle"] =
284  ibooker.book2D(histoName, histoLabel, 12, -30., 30., nbins, min, max);
285 
286  histoName = histoType + "_TrackPosvsAngleAnyQual" + histoTag;
287  histoLabel = "Position vs Angle (phi) for any qual triggers";
288 
289  (chamberHistos[dtCh.rawId()])[histoType + "_TrackPosvsAngleAnyQual"] =
290  ibooker.book2D(histoName, histoLabel, 12, -30., 30., nbins, min, max);
291 
292  histoName = histoType + "_TrackPosvsAngleCorr" + histoTag;
293  histoLabel = "Position vs Angle (phi) for correlated triggers";
294 
295  (chamberHistos[dtCh.rawId()])[histoType + "_TrackPosvsAngleCorr"] =
296  ibooker.book2D(histoName, histoLabel, 12, -30., 30., nbins, min, max);
297 }
int station() const
Return the station number.
Definition: DTChamberId.h:42
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
std::string topFolder()
return the top folder
#define LogTrace(id)
void phiRange(const DTChamberId &id, float &min, float &max, int &nbins, float step=15)
Compute phi range in local chamber coordinates.
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
int sector() const
Definition: DTChamberId.h:49
std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos

◆ bookHistograms()

void DTTriggerEfficiencyTask::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  run,
edm::EventSetup const &  context 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 79 of file DTTriggerEfficiencyTask.cc.

References bookChamberHistos(), bookWheelHistos(), detailedPlots, LogTrace, nevents, processTags, and edm_modernize_messagelogger::stat.

81  {
82  LogTrace("DTDQM|DTMonitorModule|DTTriggerEfficiencyTask") << "[DTTriggerEfficiencyTask]: bookHistograms" << endl;
83 
84  nevents = 0;
85  for (int wh = -2; wh <= 2; ++wh) {
86  vector<string>::const_iterator tagIt = processTags.begin();
87  vector<string>::const_iterator tagEnd = processTags.end();
88  for (; tagIt != tagEnd; ++tagIt) {
89  bookWheelHistos(ibooker, wh, (*tagIt), "Task");
90  if (detailedPlots) {
91  for (int stat = 1; stat <= 4; ++stat) {
92  for (int sect = 1; sect <= 12; ++sect) {
93  bookChamberHistos(ibooker, DTChamberId(wh, stat, sect), (*tagIt), "Segment");
94  }
95  }
96  }
97  }
98  }
99 }
void bookWheelHistos(DQMStore::IBooker &ibooker, int wheel, std::string histoTag, std::string folder="")
Book wheel granularity histograms.
#define LogTrace(id)
void bookChamberHistos(DQMStore::IBooker &ibooker, const DTChamberId &dtCh, std::string histoTag, std::string folder="")
Book chamber granularity histograms.
int nevents
To reset the MEs.
std::vector< std::string > processTags

◆ bookWheelHistos()

void DTTriggerEfficiencyTask::bookWheelHistos ( DQMStore::IBooker ibooker,
int  wheel,
std::string  histoTag,
std::string  folder = "" 
)
protected

Book wheel granularity histograms.

Definition at line 299 of file DTTriggerEfficiencyTask.cc.

References makeHippyCampaign::basedir, dqm::implementation::IBooker::book2D(), printsummarytable::folder, LogTrace, hlt_dqm_clientPB-live_cfg::me, dqm::implementation::NavigatorBase::setCurrentFolder(), topFolder(), makeMuonMisalignmentScenario::wheel, and wheelHistos.

Referenced by bookHistograms().

299  {
300  stringstream wh;
301  wh << wheel;
302  string basedir;
303  if (hTag.find("Summary") != string::npos) {
304  basedir = topFolder(); //Book summary histo outside folder directory
305  } else {
306  basedir = topFolder() + folder + "/";
307  }
308 
309  ibooker.setCurrentFolder(basedir);
310 
311  string hTagName = "_W" + wh.str();
312 
313  LogTrace("DTDQM|DTMonitorModule|DTTriggerEfficiencyTask")
314  << "[DTTriggerEfficiencyTask]: booking histos in " << basedir << endl;
315 
316  string hName = hTag + "_TrigEffDenum" + hTagName;
317 
318  MonitorElement* me = ibooker.book2D(hName.c_str(), hName.c_str(), 12, 1, 13, 4, 1, 5);
319 
320  me->setBinLabel(1, "MB1", 2);
321  me->setBinLabel(2, "MB2", 2);
322  me->setBinLabel(3, "MB3", 2);
323  me->setBinLabel(4, "MB4", 2);
324  me->setAxisTitle("Sector", 1);
325 
326  wheelHistos[wheel][hTag + "_TrigEffDenum"] = me;
327 
328  hName = hTag + "_TrigEffNum" + hTagName;
329  me = ibooker.book2D(hName.c_str(), hName.c_str(), 12, 1, 13, 4, 1, 5);
330 
331  me->setBinLabel(1, "MB1", 2);
332  me->setBinLabel(2, "MB2", 2);
333  me->setBinLabel(3, "MB3", 2);
334  me->setBinLabel(4, "MB4", 2);
335  me->setAxisTitle("Sector", 1);
336 
337  wheelHistos[wheel][hTag + "_TrigEffNum"] = me;
338 
339  hName = hTag + "_TrigEffCorrNum" + hTagName;
340  me = ibooker.book2D(hName.c_str(), hName.c_str(), 12, 1, 13, 4, 1, 5);
341 
342  me->setBinLabel(1, "MB1", 2);
343  me->setBinLabel(2, "MB2", 2);
344  me->setBinLabel(3, "MB3", 2);
345  me->setBinLabel(4, "MB4", 2);
346  me->setAxisTitle("Sector", 1);
347 
348  wheelHistos[wheel][hTag + "_TrigEffCorrNum"] = me;
349 
350  return;
351 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
std::string topFolder()
return the top folder
std::map< int, std::map< std::string, MonitorElement * > > wheelHistos
#define LogTrace(id)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212

◆ dqmBeginRun()

void DTTriggerEfficiencyTask::dqmBeginRun ( const edm::Run run,
const edm::EventSetup context 
)
overrideprotectedvirtual

BeginRun.

Reimplemented from DQMEDAnalyzer.

Definition at line 73 of file DTTriggerEfficiencyTask.cc.

References visDQMUpload::context, muonGeom, muonGeomToken_, and trigGeomUtils.

73  {
74  // Get the geometry
75  muonGeom = &context.getData(muonGeomToken_);
77 }
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_

◆ hasRPCTriggers()

bool DTTriggerEfficiencyTask::hasRPCTriggers ( const edm::Event e)
protected

checks for RPC Triggers

Definition at line 227 of file DTTriggerEfficiencyTask.cc.

References MillePedeFileConverter_cfg::e, L1MuGMTReadoutCollection::getRecords(), gmt_Token_, and quality.

Referenced by analyze().

227  {
229  e.getByToken(gmt_Token_, gmtrc);
230 
231  std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
232  std::vector<L1MuGMTReadoutRecord>::const_iterator igmtrr = gmt_records.begin();
233  std::vector<L1MuGMTReadoutRecord>::const_iterator egmtrr = gmt_records.end();
234  for (; igmtrr != egmtrr; igmtrr++) {
235  std::vector<L1MuGMTExtendedCand> candsGMT = igmtrr->getGMTCands();
236  std::vector<L1MuGMTExtendedCand>::const_iterator candGMTIt = candsGMT.begin();
237  std::vector<L1MuGMTExtendedCand>::const_iterator candGMTEnd = candsGMT.end();
238 
239  for (; candGMTIt != candGMTEnd; ++candGMTIt) {
240  if (!candGMTIt->empty()) {
241  int quality = candGMTIt->quality();
242  if (candGMTIt->bx() == 0 && (quality == 5 || quality == 7)) {
243  return true;
244  }
245  }
246  }
247  }
248 
249  return false;
250 }
edm::EDGetTokenT< L1MuGMTReadoutCollection > gmt_Token_
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
string quality

◆ topFolder()

std::string DTTriggerEfficiencyTask::topFolder ( )
inlineprotected

return the top folder

Definition at line 69 of file DTTriggerEfficiencyTask.h.

Referenced by bookChamberHistos(), and bookWheelHistos().

69  {
70  return "DT/03-LocalTrigger-TM/"; //DDU no longer existing, leaving folder here for past references
71  }

Member Data Documentation

◆ chamberHistos

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

Definition at line 98 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), and bookChamberHistos().

◆ checkRPCtriggers

bool DTTriggerEfficiencyTask::checkRPCtriggers
private

Definition at line 83 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), and DTTriggerEfficiencyTask().

◆ detailedPlots

bool DTTriggerEfficiencyTask::detailedPlots
private

Definition at line 83 of file DTTriggerEfficiencyTask.h.

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

◆ gmt_Token_

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

Definition at line 92 of file DTTriggerEfficiencyTask.h.

Referenced by DTTriggerEfficiencyTask(), and hasRPCTriggers().

◆ inputTagSEG

edm::InputTag DTTriggerEfficiencyTask::inputTagSEG
private

Definition at line 91 of file DTTriggerEfficiencyTask.h.

Referenced by DTTriggerEfficiencyTask().

◆ muonGeom

const DTGeometry* DTTriggerEfficiencyTask::muonGeom
private

Definition at line 96 of file DTTriggerEfficiencyTask.h.

Referenced by dqmBeginRun().

◆ muonGeomToken_

edm::ESGetToken<DTGeometry, MuonGeometryRecord> DTTriggerEfficiencyTask::muonGeomToken_
private

Definition at line 95 of file DTTriggerEfficiencyTask.h.

Referenced by dqmBeginRun().

◆ muons_Token_

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

Definition at line 89 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), and DTTriggerEfficiencyTask().

◆ nevents

int DTTriggerEfficiencyTask::nevents
private

To reset the MEs.

Definition at line 79 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), bookHistograms(), and ~DTTriggerEfficiencyTask().

◆ nMinHitsPhi

int DTTriggerEfficiencyTask::nMinHitsPhi
private

Definition at line 87 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), and DTTriggerEfficiencyTask().

◆ parameters

edm::ParameterSet DTTriggerEfficiencyTask::parameters
private

Definition at line 94 of file DTTriggerEfficiencyTask.h.

Referenced by DTTriggerEfficiencyTask().

◆ phiAccRange

float DTTriggerEfficiencyTask::phiAccRange
private

Definition at line 86 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), and DTTriggerEfficiencyTask().

◆ processTags

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

Definition at line 84 of file DTTriggerEfficiencyTask.h.

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

◆ processTM

bool DTTriggerEfficiencyTask::processTM
private

Definition at line 83 of file DTTriggerEfficiencyTask.h.

Referenced by DTTriggerEfficiencyTask().

◆ SegmArbitration

std::string DTTriggerEfficiencyTask::SegmArbitration
private

Definition at line 81 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), and DTTriggerEfficiencyTask().

◆ tm_Token_

edm::EDGetTokenT<L1MuDTChambPhContainer> DTTriggerEfficiencyTask::tm_Token_
private

Definition at line 90 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), and DTTriggerEfficiencyTask().

◆ trigGeomUtils

DTTrigGeomUtils* DTTriggerEfficiencyTask::trigGeomUtils
private

Definition at line 97 of file DTTriggerEfficiencyTask.h.

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

◆ wheelHistos

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

Definition at line 99 of file DTTriggerEfficiencyTask.h.

Referenced by analyze(), and bookWheelHistos().