CMS 3D CMS Logo

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

#include <DTChamberEfficiencyTest.h>

Inheritance diagram for DTChamberEfficiencyTest:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 DTChamberEfficiencyTest (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DTChamberEfficiencyTest () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endProcessBlockProduce (edm::ProcessBlock &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
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
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void bookHistos (DQMStore::IBooker &, const DTChamberId &ch)
 book the new ME More...
 
void bookHistos (DQMStore::IBooker &)
 book the report summary More...
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 DQM Client Diagnostic. More...
 
std::string getMEName (std::string histoTag, const DTChamberId &chID)
 Get the ME name. More...
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Private Attributes

bool bookingdone
 
const DTGeometrymuonGeom
 
edm::ESGetToken< DTGeometry, MuonGeometryRecordmuonGeomToken_
 
int nevents
 
unsigned int nLumiSegs
 
edm::ParameterSet parameters
 
int prescaleFactor
 
int run
 
std::map< int, MonitorElement * > summaryHistos
 
std::map< std::string, MonitorElement * > xEfficiencyHistos
 
std::map< std::string, MonitorElement * > xVSyEffHistos
 
std::map< std::string, MonitorElement * > yEfficiencyHistos
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 42 of file DTChamberEfficiencyTest.h.

Constructor & Destructor Documentation

◆ DTChamberEfficiencyTest()

DTChamberEfficiencyTest::DTChamberEfficiencyTest ( const edm::ParameterSet ps)

Constructor.

Definition at line 28 of file DTChamberEfficiencyTest.cc.

References bookingdone, edm::ParameterSet::getUntrackedParameter(), nevents, parameters, and prescaleFactor.

29  : muonGeomToken_(esConsumes<edm::Transition::EndLuminosityBlock>()) {
30  edm::LogVerbatim("DTDQM|DTMonitorClient|DTChamberEfficiencyTest") << "[DTChamberEfficiencyTest]: Constructor";
31 
32  parameters = ps;
33 
34  prescaleFactor = parameters.getUntrackedParameter<int>("diagnosticPrescale", 1);
35 
36  nevents = 0;
37 
38  bookingdone = false;
39 }
Log< level::Info, true > LogVerbatim
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_

◆ ~DTChamberEfficiencyTest()

DTChamberEfficiencyTest::~DTChamberEfficiencyTest ( )
override

Destructor.

Definition at line 41 of file DTChamberEfficiencyTest.cc.

References nevents.

41  {
42  edm::LogVerbatim("DTDQM|DTMonitorClient|DTChamberEfficiencyTest")
43  << "DTChamberEfficiencyTest: analyzed " << nevents << " events";
44 }
Log< level::Info, true > LogVerbatim

Member Function Documentation

◆ bookHistos() [1/2]

void DTChamberEfficiencyTest::bookHistos ( DQMStore::IBooker ibooker,
const DTChamberId ch 
)
protected

book the new ME

Definition at line 207 of file DTChamberEfficiencyTest.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), hgcalTBTopologyTester_cfi::sector, DTChamberId::sector(), dqm::implementation::NavigatorBase::setCurrentFolder(), DTChamberId::station(), relativeConstraints::station, DTChamberId::wheel(), makeMuonMisalignmentScenario::wheel, xEfficiencyHistos, xVSyEffHistos, and yEfficiencyHistos.

Referenced by dqmEndLuminosityBlock().

207  {
208  stringstream wheel;
209  wheel << chId.wheel();
210  stringstream station;
211  station << chId.station();
212  stringstream sector;
213  sector << chId.sector();
214 
215  string HistoName = "W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str();
216  string xEfficiencyHistoName = "xEfficiency_" + HistoName;
217  string yEfficiencyHistoName = "yEfficiency_" + HistoName;
218  string xVSyEffHistoName = "xVSyEff_" + HistoName;
219 
220  ibooker.setCurrentFolder("DT/01-DTChamberEfficiency/Wheel" + wheel.str() + "/Sector" + sector.str() + "/Station" +
221  station.str());
222 
224  ibooker.book1D(xEfficiencyHistoName.c_str(), xEfficiencyHistoName.c_str(), 25, -250., 250.);
226  ibooker.book1D(yEfficiencyHistoName.c_str(), yEfficiencyHistoName.c_str(), 25, -250., 250.);
228  ibooker.book2D(xVSyEffHistoName.c_str(), xVSyEffHistoName.c_str(), 25, -250., 250., 25, -250., 250.);
229 }
std::map< std::string, MonitorElement * > xEfficiencyHistos
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
std::map< std::string, MonitorElement * > xVSyEffHistos
std::map< std::string, MonitorElement * > yEfficiencyHistos
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
std::string HistoName
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

◆ bookHistos() [2/2]

void DTChamberEfficiencyTest::bookHistos ( DQMStore::IBooker ibooker)
protected

book the report summary

Definition at line 231 of file DTChamberEfficiencyTest.cc.

References dqm::implementation::IBooker::book2D(), HltBtagPostValidation_cff::histoName, dqm::implementation::NavigatorBase::setCurrentFolder(), summaryHistos, and makeMuonMisalignmentScenario::wheel.

231  {
232  for (int wh = -2; wh <= 2; wh++) {
233  stringstream wheel;
234  wheel << wh;
235  string histoName = "chEfficiencySummary_W" + wheel.str();
236 
237  ibooker.setCurrentFolder("DT/01-DTChamberEfficiency");
238  summaryHistos[wh] = ibooker.book2D(histoName.c_str(), histoName.c_str(), 12, 1, 13, 4, 1, 5);
239  summaryHistos[wh]->setAxisTitle("Sector", 1);
240  summaryHistos[wh]->setBinLabel(1, "MB1", 2);
241  summaryHistos[wh]->setBinLabel(2, "MB2", 2);
242  summaryHistos[wh]->setBinLabel(3, "MB3", 2);
243  summaryHistos[wh]->setBinLabel(4, "MB4", 2);
244  }
245 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
std::map< int, MonitorElement * > summaryHistos
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

◆ dqmEndJob()

void DTChamberEfficiencyTest::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 186 of file DTChamberEfficiencyTest.cc.

186  {
187  edm::LogVerbatim("DTDQM|DTMonitorClient|DTChamberEfficiencyTest") << "[DTChamberEfficiencyTest] endjob called!";
188 }
Log< level::Info, true > LogVerbatim

◆ dqmEndLuminosityBlock()

void DTChamberEfficiencyTest::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  context 
)
overrideprotectedvirtual

DQM Client Diagnostic.

Reimplemented from DQMEDHarvester.

Definition at line 46 of file DTChamberEfficiencyTest.cc.

References bookHistos(), bookingdone, DTGeometry::chambers(), visDQMUpload::context, dqm::implementation::IGetter::get(), MonitorElementData::QReport::getBadChannels(), getMEName(), dqm::legacy::MonitorElement::getTH2F(), edm::ParameterSet::getUntrackedParameter(), edm::LuminosityBlockBase::id(), edm::LuminosityBlockID::luminosityBlock(), muonGeom, muonGeomToken_, nLumiSegs, parameters, prescaleFactor, fileinputsource_cfi::sec, hgcalTBTopologyTester_cfi::sector, DTChamberId::sector(), DTChamberId::station(), relativeConstraints::station, summaryHistos, DTChamberId::wheel(), makeMuonMisalignmentScenario::wheel, photonAnalyzer_cfi::xBin, xEfficiencyHistos, xVSyEffHistos, photonAnalyzer_cfi::yBin, and yEfficiencyHistos.

49  {
50  if (!bookingdone) {
51  // Get the DT Geometry
52  muonGeom = &context.getData(muonGeomToken_);
53 
54  // Loop over all the chambers
55  vector<const DTChamber*>::const_iterator ch_it = muonGeom->chambers().begin();
56  vector<const DTChamber*>::const_iterator ch_end = muonGeom->chambers().end();
57  for (; ch_it != ch_end; ++ch_it) {
58  // histo booking
59  bookHistos(ibooker, (*ch_it)->id());
60  }
61 
62  //summary histo booking
63  bookHistos(ibooker);
64  }
65 
66  bookingdone = true;
67 
68  edm::LogVerbatim("DTDQM|DTMonitorClient|DTChamberEfficiencyTest")
69  << "[DTChamberEfficiencyTest]: End of LS transition, performing the DQM client operation";
70 
71  // counts number of lumiSegs
72  nLumiSegs = lumiSeg.id().luminosityBlock();
73 
74  // prescale factor
75  if (nLumiSegs % prescaleFactor != 0)
76  return;
77 
78  edm::LogVerbatim("DTDQM|DTMonitorClient|DTChamberEfficiencyTest")
79  << "[DTChamberEfficiencyTest]: " << nLumiSegs << " updates";
80 
81  vector<const DTChamber*>::const_iterator ch_it = muonGeom->chambers().begin();
82  vector<const DTChamber*>::const_iterator ch_end = muonGeom->chambers().end();
83 
84  edm::LogVerbatim("DTDQM|DTMonitorClient|DTChamberEfficiencyTest")
85  << "[DTChamberEfficiencyTest]: ChamberEfficiency tests results";
86 
87  // Loop over the chambers
88  for (; ch_it != ch_end; ++ch_it) {
89  DTChamberId chID = (*ch_it)->id();
90 
91  stringstream wheel;
92  wheel << chID.wheel();
93  stringstream station;
94  station << chID.station();
95  stringstream sector;
96  sector << chID.sector();
97 
98  string HistoName = "W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str();
99 
100  // Get the ME produced by EfficiencyTask Source
101 
102  MonitorElement* GoodSegDen_histo = igetter.get(getMEName("hEffGoodSegVsPosDen", chID));
103  MonitorElement* GoodCloseSegNum_histo = igetter.get(getMEName("hEffGoodCloseSegVsPosNum", chID));
104 
105  // ME -> TH1F
106  if (GoodSegDen_histo && GoodCloseSegNum_histo) {
107  TH2F* GoodSegDen_histo_root = GoodSegDen_histo->getTH2F();
108  TH2F* GoodCloseSegNum_histo_root = GoodCloseSegNum_histo->getTH2F();
109 
110  int lastBinX = (*GoodSegDen_histo_root).GetNbinsX();
111  TH1D* proxN = GoodCloseSegNum_histo_root->ProjectionX();
112  TH1D* proxD = GoodSegDen_histo_root->ProjectionX();
113 
114  int lastBinY = (*GoodSegDen_histo_root).GetNbinsY();
115  TH1D* proyN = GoodCloseSegNum_histo_root->ProjectionY();
116  TH1D* proyD = GoodSegDen_histo_root->ProjectionY();
117 
118  for (int xBin = 1; xBin <= lastBinX; xBin++) {
119  if (proxD->GetBinContent(xBin) != 0) {
120  float Xefficiency = proxN->GetBinContent(xBin) / proxD->GetBinContent(xBin);
121  xEfficiencyHistos.find(HistoName)->second->setBinContent(xBin, Xefficiency);
122  }
123 
124  for (int yBin = 1; yBin <= lastBinY; yBin++) {
125  if (GoodSegDen_histo_root->GetBinContent(xBin, yBin) != 0) {
126  float XvsYefficiency = GoodCloseSegNum_histo_root->GetBinContent(xBin, yBin) /
127  GoodSegDen_histo_root->GetBinContent(xBin, yBin);
128  xVSyEffHistos.find(HistoName)->second->setBinContent(xBin, yBin, XvsYefficiency);
129  }
130  }
131  }
132 
133  for (int yBin = 1; yBin <= lastBinY; yBin++) {
134  if (proyD->GetBinContent(yBin) != 0) {
135  float Yefficiency = proyN->GetBinContent(yBin) / proyD->GetBinContent(yBin);
136  yEfficiencyHistos.find(HistoName)->second->setBinContent(yBin, Yefficiency);
137  }
138  }
139  }
140  } // loop on chambers
141 
142  // ChamberEfficiency test on X axis
143  string XEfficiencyCriterionName =
144  parameters.getUntrackedParameter<string>("XEfficiencyTestName", "ChEfficiencyInRangeX");
145  for (map<string, MonitorElement*>::const_iterator hXEff = xEfficiencyHistos.begin(); hXEff != xEfficiencyHistos.end();
146  hXEff++) {
147  const QReport* theXEfficiencyQReport = (*hXEff).second->getQReport(XEfficiencyCriterionName);
148  if (theXEfficiencyQReport) {
149  vector<dqm::me_util::Channel> badChannels = theXEfficiencyQReport->getBadChannels();
150  for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
151  channel++) {
152  edm::LogError("DTDQM|DTMonitorClient|DTChamberEfficiencyTest")
153  << "Chamber : " << (*hXEff).first << " Bad XChamberEfficiency channels: " << (*channel).getBin()
154  << " Contents : " << (*channel).getContents();
155  }
156  }
157  }
158 
159  // ChamberEfficiency test on Y axis
160  string YEfficiencyCriterionName =
161  parameters.getUntrackedParameter<string>("YEfficiencyTestName", "ChEfficiencyInRangeY");
162  for (map<string, MonitorElement*>::const_iterator hYEff = yEfficiencyHistos.begin(); hYEff != yEfficiencyHistos.end();
163  hYEff++) {
164  const QReport* theYEfficiencyQReport = (*hYEff).second->getQReport(YEfficiencyCriterionName);
165  if (theYEfficiencyQReport) {
166  vector<dqm::me_util::Channel> badChannels = theYEfficiencyQReport->getBadChannels();
167  for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
168  channel++) {
169  edm::LogError("DTDQM|DTMonitorClient|DTChamberEfficiencyTest")
170  << "Chamber : " << (*hYEff).first << " Bad YChamberEfficiency channels: " << (*channel).getBin()
171  << " Contents : " << (*channel).getContents();
172  }
173  }
174  }
175 
176  //Fill the report summary histos
177  for (int wh = -2; wh <= 2; wh++) {
178  for (int sec = 1; sec <= 12; sec++) {
179  for (int st = 1; st <= 4; st++) {
180  summaryHistos[wh]->Fill(sec, st, 1);
181  }
182  }
183  }
184 }
std::map< std::string, MonitorElement * > xEfficiencyHistos
Log< level::Info, true > LogVerbatim
int station() const
Return the station number.
Definition: DTChamberId.h:42
void bookHistos(DQMStore::IBooker &, const DTChamberId &ch)
book the new ME
const std::vector< DQMChannel > & getBadChannels() const
Log< level::Error, false > LogError
std::map< std::string, MonitorElement * > xVSyEffHistos
T getUntrackedParameter(std::string const &, T const &) const
virtual TH2F * getTH2F() const
std::string getMEName(std::string histoTag, const DTChamberId &chID)
Get the ME name.
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
std::map< std::string, MonitorElement * > yEfficiencyHistos
std::map< int, MonitorElement * > summaryHistos
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:697
std::string HistoName
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
int sector() const
Definition: DTChamberId.h:49
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
Definition: DTGeometry.cc:84

◆ getMEName()

string DTChamberEfficiencyTest::getMEName ( std::string  histoTag,
const DTChamberId chID 
)
protected

Get the ME name.

Definition at line 190 of file DTChamberEfficiencyTest.cc.

References ctppsRandomDQMSource_cfi::folderName, dtChamberEfficiencyTest_cfi::folderRoot, edm::ParameterSet::getUntrackedParameter(), dtResolutionTest_cfi::histoTag, parameters, hgcalTBTopologyTester_cfi::sector, DTChamberId::sector(), DTChamberId::station(), relativeConstraints::station, DTChamberId::wheel(), and makeMuonMisalignmentScenario::wheel.

Referenced by dqmEndLuminosityBlock().

190  {
191  stringstream wheel;
192  wheel << chID.wheel();
193  stringstream station;
194  station << chID.station();
195  stringstream sector;
196  sector << chID.sector();
197 
198  string folderRoot = parameters.getUntrackedParameter<string>("folderRoot", "Collector/FU0/");
199  string folderName = folderRoot + "DT/01-DTChamberEfficiency/Task/Wheel" + wheel.str() + "/Sector" + sector.str() +
200  "/Station" + station.str() + "/";
201 
202  string histoname = folderName + histoTag + "_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str();
203 
204  return histoname;
205 }
int station() const
Return the station number.
Definition: DTChamberId.h:42
T getUntrackedParameter(std::string const &, T const &) const
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
int sector() const
Definition: DTChamberId.h:49

Member Data Documentation

◆ bookingdone

bool DTChamberEfficiencyTest::bookingdone
private

Definition at line 74 of file DTChamberEfficiencyTest.h.

Referenced by dqmEndLuminosityBlock(), and DTChamberEfficiencyTest().

◆ muonGeom

const DTGeometry* DTChamberEfficiencyTest::muonGeom
private

Definition at line 79 of file DTChamberEfficiencyTest.h.

Referenced by dqmEndLuminosityBlock().

◆ muonGeomToken_

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

Definition at line 78 of file DTChamberEfficiencyTest.h.

Referenced by dqmEndLuminosityBlock().

◆ nevents

int DTChamberEfficiencyTest::nevents
private

Definition at line 69 of file DTChamberEfficiencyTest.h.

Referenced by DTChamberEfficiencyTest(), and ~DTChamberEfficiencyTest().

◆ nLumiSegs

unsigned int DTChamberEfficiencyTest::nLumiSegs
private

Definition at line 70 of file DTChamberEfficiencyTest.h.

Referenced by dqmEndLuminosityBlock().

◆ parameters

edm::ParameterSet DTChamberEfficiencyTest::parameters
private

◆ prescaleFactor

int DTChamberEfficiencyTest::prescaleFactor
private

Definition at line 71 of file DTChamberEfficiencyTest.h.

Referenced by dqmEndLuminosityBlock(), and DTChamberEfficiencyTest().

◆ run

int DTChamberEfficiencyTest::run
private

◆ summaryHistos

std::map<int, MonitorElement *> DTChamberEfficiencyTest::summaryHistos
private

Definition at line 84 of file DTChamberEfficiencyTest.h.

Referenced by bookHistos(), and dqmEndLuminosityBlock().

◆ xEfficiencyHistos

std::map<std::string, MonitorElement *> DTChamberEfficiencyTest::xEfficiencyHistos
private

Definition at line 81 of file DTChamberEfficiencyTest.h.

Referenced by bookHistos(), and dqmEndLuminosityBlock().

◆ xVSyEffHistos

std::map<std::string, MonitorElement *> DTChamberEfficiencyTest::xVSyEffHistos
private

Definition at line 83 of file DTChamberEfficiencyTest.h.

Referenced by bookHistos(), and dqmEndLuminosityBlock().

◆ yEfficiencyHistos

std::map<std::string, MonitorElement *> DTChamberEfficiencyTest::yEfficiencyHistos
private

Definition at line 82 of file DTChamberEfficiencyTest.h.

Referenced by bookHistos(), and dqmEndLuminosityBlock().