CMS 3D CMS Logo

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

#include <DTNoiseAnalysisTest.h>

Inheritance diagram for DTNoiseAnalysisTest:
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

 DTNoiseAnalysisTest (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DTNoiseAnalysisTest () 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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void beginRun (edm::Run const &run, edm::EventSetup const &context) override
 BeginRun. More...
 
void bookHistos (DQMStore::IBooker &)
 book the summary histograms 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...
 
- 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 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 Member Functions

std::string getMEName (const DTChamberId &chID)
 Get the ME name. More...
 
std::string getSynchNoiseMEName (int wheelId) const
 

Private Attributes

bool bookingdone
 
bool detailedAnalysis
 
bool doSynchNoise
 
MonitorElementglbSummarySynchNoiseHisto
 
double maxSynchNoiseRate
 
const DTGeometrymuonGeom
 
edm::ESGetToken< DTGeometry, MuonGeometryRecordmuonGeomToken_
 
int nevents
 
int nMinEvts
 
std::map< int, MonitorElement * > noiseHistos
 
int noisyCellDef
 
std::map< int, MonitorElement * > noisyCellHistos
 
MonitorElementsummaryNoiseHisto
 
MonitorElementsummarySynchNoiseHisto
 
MonitorElementthreshChannelsHisto
 

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 29 of file DTNoiseAnalysisTest.h.

Constructor & Destructor Documentation

◆ DTNoiseAnalysisTest()

DTNoiseAnalysisTest::DTNoiseAnalysisTest ( const edm::ParameterSet ps)

Constructor.

Definition at line 32 of file DTNoiseAnalysisTest.cc.

References bookingdone, detailedAnalysis, doSynchNoise, edm::ParameterSet::getUntrackedParameter(), LogTrace, maxSynchNoiseRate, nevents, nMinEvts, and noisyCellDef.

33  : muonGeomToken_(esConsumes<edm::Transition::BeginRun>()) {
34  LogTrace("DTDQM|DTMonitorClient|DTNoiseAnalysisTest") << "[DTNoiseAnalysisTest]: Constructor";
35 
36  // get the cfi parameters
37  noisyCellDef = ps.getUntrackedParameter<int>("noisyCellDef", 500);
38 
39  // switch on/off the summaries for the Synchronous noise
40  doSynchNoise = ps.getUntrackedParameter<bool>("doSynchNoise", false);
41  detailedAnalysis = ps.getUntrackedParameter<bool>("detailedAnalysis", false);
42  maxSynchNoiseRate = ps.getUntrackedParameter<double>("maxSynchNoiseRate", 0.001);
43  nMinEvts = ps.getUntrackedParameter<int>("nEventsCert", 5000);
44 
45  nevents = 0;
46 
47  bookingdone = false;
48 }
#define LogTrace(id)
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_

◆ ~DTNoiseAnalysisTest()

DTNoiseAnalysisTest::~DTNoiseAnalysisTest ( )
override

Destructor.

Definition at line 50 of file DTNoiseAnalysisTest.cc.

References LogTrace, and nevents.

50  {
51  LogTrace("DTDQM|DTMonitorClient|DTNoiseAnalysisTest") << "DTNoiseAnalysisTest: analyzed " << nevents << " events";
52 }
#define LogTrace(id)

Member Function Documentation

◆ beginRun()

void DTNoiseAnalysisTest::beginRun ( edm::Run const &  run,
edm::EventSetup const &  context 
)
overrideprotected

BeginRun.

Definition at line 54 of file DTNoiseAnalysisTest.cc.

References visDQMUpload::context, muonGeom, and muonGeomToken_.

54  {
55  // Get the geometry
56  muonGeom = &context.getData(muonGeomToken_);
57 }
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
const DTGeometry * muonGeom

◆ bookHistos()

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

book the summary histograms

Definition at line 218 of file DTNoiseAnalysisTest.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), detailedAnalysis, doSynchNoise, glbSummarySynchNoiseHisto, HltBtagPostValidation_cff::histoName, noiseHistos, noisyCellHistos, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), summaryNoiseHisto, summarySynchNoiseHisto, threshChannelsHisto, and makeMuonMisalignmentScenario::wheel.

Referenced by dqmEndLuminosityBlock().

218  {
219  ibooker.setCurrentFolder("DT/05-Noise");
220  string histoName;
221 
222  for (int wh = -2; wh <= 2; wh++) {
223  stringstream wheel;
224  wheel << wh;
225  histoName = "NoiseRateSummary_W" + wheel.str();
226 
227  noiseHistos[wh] = ibooker.book1D(histoName.c_str(), histoName.c_str(), 100, 0, 2000);
228  noiseHistos[wh]->setAxisTitle("rate (Hz)", 1);
229  noiseHistos[wh]->setAxisTitle("entries", 2);
230  }
231  histoName = "NoiseRateSummary";
232 
233  noiseHistos[3] = ibooker.book1D(histoName.c_str(), histoName.c_str(), 100, 0, 2000);
234  noiseHistos[3]->setAxisTitle("rate (Hz)", 1);
235  noiseHistos[3]->setAxisTitle("entries", 2);
236 
237  for (int wh = -2; wh <= 2; wh++) {
238  stringstream wheel;
239  wheel << wh;
240  histoName = "NoiseSummary_W" + wheel.str();
241 
242  noisyCellHistos[wh] = ibooker.book2D(histoName.c_str(), "# of noisy channels", 12, 1, 13, 4, 1, 5);
243  noisyCellHistos[wh]->setBinLabel(1, "MB1", 2);
244  noisyCellHistos[wh]->setBinLabel(2, "MB2", 2);
245  noisyCellHistos[wh]->setBinLabel(3, "MB3", 2);
246  noisyCellHistos[wh]->setBinLabel(4, "MB4", 2);
247  noisyCellHistos[wh]->setAxisTitle("Sector", 1);
248  }
249 
250  histoName = "NoiseSummary";
251 
252  summaryNoiseHisto = ibooker.book2D(histoName.c_str(), "# of noisy channels", 12, 1, 13, 5, -2, 3);
253  summaryNoiseHisto->setAxisTitle("Sector", 1);
254  summaryNoiseHisto->setAxisTitle("Wheel", 2);
255 
256  if (detailedAnalysis) {
257  histoName = "NoisyChannels";
258 
259  threshChannelsHisto = ibooker.book1D(histoName.c_str(), "# of noisy channels vs threshold", 15, 500, 2000);
260  threshChannelsHisto->setAxisTitle("threshold", 1);
261  threshChannelsHisto->setAxisTitle("# noisy channels", 2);
262  }
263 
264  if (doSynchNoise) {
265  ibooker.setCurrentFolder("DT/05-Noise/SynchNoise/");
266  histoName = "SynchNoiseSummary";
267 
268  summarySynchNoiseHisto = ibooker.book2D(histoName.c_str(), "Summary Synch. Noise", 12, 1, 13, 5, -2, 3);
269  summarySynchNoiseHisto->setAxisTitle("Sector", 1);
271  histoName = "SynchNoiseGlbSummary";
272 
273  glbSummarySynchNoiseHisto = ibooker.book2D(histoName.c_str(), "Summary Synch. Noise", 12, 1, 13, 5, -2, 3);
276  }
277 }
MonitorElement * threshChannelsHisto
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
std::map< int, MonitorElement * > noisyCellHistos
MonitorElement * summarySynchNoiseHisto
std::map< int, MonitorElement * > noiseHistos
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
MonitorElement * glbSummarySynchNoiseHisto
MonitorElement * summaryNoiseHisto
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 288 of file DTNoiseAnalysisTest.cc.

288 {}

◆ dqmEndLuminosityBlock()

void DTNoiseAnalysisTest::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 59 of file DTNoiseAnalysisTest.cc.

References bookHistos(), bookingdone, DTGeometry::chambers(), DTTopology::channels(), detailedAnalysis, doSynchNoise, dqm::impl::MonitorElement::Fill(), DTTopology::firstChannel(), nano_mu_digi_cff::float, dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getFloatValue(), getMEName(), getSynchNoiseMEName(), dqm::legacy::MonitorElement::getTH2F(), glbSummarySynchNoiseHisto, timingPdfMaker::histo, nano_mu_digi_cff::layer, DTGeometry::layer(), LogTrace, maxSynchNoiseRate, cms::alpakatools::config::minBin, muonGeom, nevents, nMinEvts, hgchebackDigitizer_cfi::noise, noiseHistos, noisyCellDef, noisyCellHistos, plotFactory::plot, dqm::impl::MonitorElement::Reset(), nano_mu_digi_cff::sector, DTChamberId::sector(), dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setEntries(), DTLayer::specificTopology(), DTChamberId::station(), summaryNoiseHisto, summarySynchNoiseHisto, threshChannelsHisto, DTChamberId::wheel(), makeMuonMisalignmentScenario::wheel, and nano_mu_digi_cff::wire.

62  {
63  float chRate;
64 
65  if (!bookingdone) {
66  // book the histos
67  bookHistos(ibooker);
68  }
69  bookingdone = true;
70 
71  LogVerbatim("DTDQM|DTMonitorClient|DTNoiseAnalysisTest")
72  << "[DTNoiseAnalysisTest]: End of LS transition, performing the DQM client operation";
73 
74  // Reset the summary plots
75  for (map<int, MonitorElement*>::iterator plot = noiseHistos.begin(); plot != noiseHistos.end(); ++plot) {
76  (*plot).second->Reset();
77  }
78 
79  for (map<int, MonitorElement*>::iterator plot = noisyCellHistos.begin(); plot != noisyCellHistos.end(); ++plot) {
80  (*plot).second->Reset();
81  }
82 
84 
85  vector<const DTChamber*>::const_iterator ch_it = muonGeom->chambers().begin();
86  vector<const DTChamber*>::const_iterator ch_end = muonGeom->chambers().end();
87 
88  LogTrace("DTDQM|DTMonitorClient|DTNoiseAnalysisTest") << "[DTNoiseAnalysisTest]: Fill the summary histos";
89 
90  for (; ch_it != ch_end; ++ch_it) { // loop over chambers
91  DTChamberId chID = (*ch_it)->id();
92 
93  MonitorElement* histo = igetter.get(getMEName(chID));
94 
95  if (histo) { // check the pointer
96 
97  TH2F* histo_root = histo->getTH2F();
98 
99  for (int sl = 1; sl != 4; ++sl) { // loop over SLs
100  // skip theta SL in MB4 chambers
101  if (chID.station() == 4 && sl == 2)
102  continue;
103 
104  int binYlow = ((sl - 1) * 4) + 1;
105 
106  for (int layer = 1; layer <= 4; ++layer) { // loop over layers
107 
108  // Get the layer ID
109  DTLayerId layID(chID, sl, layer);
110 
111  int nWires = muonGeom->layer(layID)->specificTopology().channels();
112  int firstWire = muonGeom->layer(layID)->specificTopology().firstChannel();
113 
114  int binY = binYlow + (layer - 1);
115 
116  for (int wire = firstWire; wire != (nWires + firstWire); wire++) { // loop over wires
117 
118  double noise = histo_root->GetBinContent(wire, binY);
119  // fill the histos
120  noiseHistos[chID.wheel()]->Fill(noise);
121  noiseHistos[3]->Fill(noise);
122  int sector = chID.sector();
123  if (noise > noisyCellDef) {
124  if (sector == 13) {
125  sector = 4;
126  } else if (sector == 14) {
127  sector = 10;
128  }
129  noisyCellHistos[chID.wheel()]->Fill(sector, chID.station());
131  }
132  }
133  }
134  }
135  }
136  }
137 
138  if (detailedAnalysis) {
140  TH1F* histo = noiseHistos[3]->getTH1F();
141  for (int step = 0; step != 15; step++) {
142  int threshBin = step + 1;
143  int minBin = 26 + step * 5;
144  int nNoisyCh = histo->Integral(minBin, 101);
145  threshChannelsHisto->setBinContent(threshBin, nNoisyCh);
146  }
147  }
148 
149  // build the summary of synch noise
150 
151  if (doSynchNoise) {
152  LogTrace("DTDQM|DTMonitorClient|DTNoiseAnalysisTest")
153  << "[DTNoiseAnalysisTest]: fill summaries for synch noise" << endl;
156  for (int wheel = -2; wheel != 3; ++wheel) {
157  // Get the histo produced by DTDigiTask
158 
159  MonitorElement* histoNoiseSynch = igetter.get(getSynchNoiseMEName(wheel));
160  if (histoNoiseSynch != nullptr) {
161  for (int sect = 1; sect != 13; ++sect) { // loop over sectors
162  TH2F* histo = histoNoiseSynch->getTH2F();
163  float maxSectRate = 0;
164  for (int sta = 1; sta != 5; ++sta) {
165  if (nevents > 0)
166  chRate = histo->GetBinContent(sect, sta) / (float)nevents;
167  else
168  chRate = -1.0;
169  // in case nevents 0 e.g. counting not done
170  LogTrace("DTDQM|DTMonitorClient|DTNoiseAnalysisTest")
171  << " Wheel: " << wheel << " sect: " << sect << " station: " << sta << " rate is: " << chRate << endl;
172  if (chRate > maxSectRate)
173  maxSectRate = chRate;
174  }
175  summarySynchNoiseHisto->Fill(sect, wheel, maxSectRate > maxSynchNoiseRate ? 1 : 0);
176  float glbBinValue = 1 - 0.15 * maxSectRate / maxSynchNoiseRate;
177  glbSummarySynchNoiseHisto->Fill(sect, wheel, glbBinValue > 0 ? glbBinValue : 0);
178  }
179  } else {
180  LogWarning("DTDQM|DTMonitorClient|DTNoiseAnalysisTest")
181  << " Histo: " << getSynchNoiseMEName(wheel) << " not found!" << endl;
182  }
183  }
184  }
185 
186  string nEvtsName = "DT/EventInfo/Counters/nProcessedEventsNoise";
187 
188  MonitorElement* meProcEvts = igetter.get(nEvtsName);
189 
190  if (meProcEvts) {
191  int nProcEvts = meProcEvts->getFloatValue();
192  glbSummarySynchNoiseHisto->setEntries(nProcEvts < nMinEvts ? 10. : nProcEvts);
193  summarySynchNoiseHisto->setEntries(nProcEvts < nMinEvts ? 10. : nProcEvts);
194  } else {
197  LogVerbatim("DTDQM|DTMonitorClient|DTnoiseAnalysisTest")
198  << "[DTNoiseAnalysisTest] ME: " << nEvtsName << " not found!" << endl;
199  }
200 }
Log< level::Info, true > LogVerbatim
int station() const
Return the station number.
Definition: DTChamberId.h:45
MonitorElement * threshChannelsHisto
constexpr unsigned int minBin
virtual void setEntries(double nentries)
set # of entries
std::map< int, MonitorElement * > noisyCellHistos
#define LogTrace(id)
int firstChannel() const
Returns the wire number of the first wire.
Definition: DTTopology.h:79
void Fill(long long x)
std::string getSynchNoiseMEName(int wheelId) const
virtual TH2F * getTH2F() const
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
virtual double getFloatValue() const
void bookHistos(DQMStore::IBooker &)
book the summary histograms
std::string getMEName(const DTChamberId &chID)
Get the ME name.
const DTTopology & specificTopology() const
Definition: DTLayer.cc:37
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * summarySynchNoiseHisto
std::map< int, MonitorElement * > noiseHistos
const DTGeometry * muonGeom
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
MonitorElement * glbSummarySynchNoiseHisto
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:42
int sector() const
Definition: DTChamberId.h:52
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
Definition: DTGeometry.cc:84
step
Definition: StallMonitor.cc:83
Log< level::Warning, false > LogWarning
MonitorElement * summaryNoiseHisto
int channels() const
Returns the number of wires in the layer.
Definition: DTTopology.h:76
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
Definition: DTGeometry.cc:96

◆ getMEName()

string DTNoiseAnalysisTest::getMEName ( const DTChamberId chID)
private

Get the ME name.

Definition at line 202 of file DTNoiseAnalysisTest.cc.

References ALCARECODTCalibSynchCosmicsDQM_cff::folderName, nano_mu_digi_cff::sector, DTChamberId::sector(), DTChamberId::station(), relativeConstraints::station, AlCaHLTBitMon_QueryRunRegistry::string, DTChamberId::wheel(), and makeMuonMisalignmentScenario::wheel.

Referenced by dqmEndLuminosityBlock().

202  {
203  stringstream wheel;
204  wheel << chID.wheel();
205  stringstream station;
206  station << chID.station();
207  stringstream sector;
208  sector << chID.sector();
209 
210  string folderName = "DT/05-Noise/Wheel" + wheel.str() + "/Sector" + sector.str() + "/";
211 
212  string histoname =
213  folderName + string("NoiseRate") + "_W" + wheel.str() + "_St" + station.str() + "_Sec" + sector.str();
214 
215  return histoname;
216 }
int station() const
Return the station number.
Definition: DTChamberId.h:45
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:42
int sector() const
Definition: DTChamberId.h:52

◆ getSynchNoiseMEName()

string DTNoiseAnalysisTest::getSynchNoiseMEName ( int  wheelId) const
private

Definition at line 279 of file DTNoiseAnalysisTest.cc.

References ALCARECODTCalibSynchCosmicsDQM_cff::folderName, AlCaHLTBitMon_QueryRunRegistry::string, and makeMuonMisalignmentScenario::wheel.

Referenced by dqmEndLuminosityBlock().

279  {
280  stringstream wheel;
281  wheel << wheelId;
282  string folderName = "DT/05-Noise/SynchNoise/";
283  string histoname = folderName + string("SyncNoiseEvents") + "_W" + wheel.str();
284 
285  return histoname;
286 }

Member Data Documentation

◆ bookingdone

bool DTNoiseAnalysisTest::bookingdone
private

Definition at line 61 of file DTNoiseAnalysisTest.h.

Referenced by dqmEndLuminosityBlock(), and DTNoiseAnalysisTest().

◆ detailedAnalysis

bool DTNoiseAnalysisTest::detailedAnalysis
private

Definition at line 79 of file DTNoiseAnalysisTest.h.

Referenced by bookHistos(), dqmEndLuminosityBlock(), and DTNoiseAnalysisTest().

◆ doSynchNoise

bool DTNoiseAnalysisTest::doSynchNoise
private

Definition at line 78 of file DTNoiseAnalysisTest.h.

Referenced by bookHistos(), dqmEndLuminosityBlock(), and DTNoiseAnalysisTest().

◆ glbSummarySynchNoiseHisto

MonitorElement* DTNoiseAnalysisTest::glbSummarySynchNoiseHisto
private

Definition at line 76 of file DTNoiseAnalysisTest.h.

Referenced by bookHistos(), and dqmEndLuminosityBlock().

◆ maxSynchNoiseRate

double DTNoiseAnalysisTest::maxSynchNoiseRate
private

Definition at line 80 of file DTNoiseAnalysisTest.h.

Referenced by dqmEndLuminosityBlock(), and DTNoiseAnalysisTest().

◆ muonGeom

const DTGeometry* DTNoiseAnalysisTest::muonGeom
private

Definition at line 65 of file DTNoiseAnalysisTest.h.

Referenced by beginRun(), and dqmEndLuminosityBlock().

◆ muonGeomToken_

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

Definition at line 64 of file DTNoiseAnalysisTest.h.

Referenced by beginRun().

◆ nevents

int DTNoiseAnalysisTest::nevents
private

◆ nMinEvts

int DTNoiseAnalysisTest::nMinEvts
private

Definition at line 59 of file DTNoiseAnalysisTest.h.

Referenced by dqmEndLuminosityBlock(), and DTNoiseAnalysisTest().

◆ noiseHistos

std::map<int, MonitorElement*> DTNoiseAnalysisTest::noiseHistos
private

Definition at line 71 of file DTNoiseAnalysisTest.h.

Referenced by bookHistos(), and dqmEndLuminosityBlock().

◆ noisyCellDef

int DTNoiseAnalysisTest::noisyCellDef
private

Definition at line 68 of file DTNoiseAnalysisTest.h.

Referenced by dqmEndLuminosityBlock(), and DTNoiseAnalysisTest().

◆ noisyCellHistos

std::map<int, MonitorElement*> DTNoiseAnalysisTest::noisyCellHistos
private

Definition at line 72 of file DTNoiseAnalysisTest.h.

Referenced by bookHistos(), and dqmEndLuminosityBlock().

◆ summaryNoiseHisto

MonitorElement* DTNoiseAnalysisTest::summaryNoiseHisto
private

Definition at line 73 of file DTNoiseAnalysisTest.h.

Referenced by bookHistos(), and dqmEndLuminosityBlock().

◆ summarySynchNoiseHisto

MonitorElement* DTNoiseAnalysisTest::summarySynchNoiseHisto
private

Definition at line 75 of file DTNoiseAnalysisTest.h.

Referenced by bookHistos(), and dqmEndLuminosityBlock().

◆ threshChannelsHisto

MonitorElement* DTNoiseAnalysisTest::threshChannelsHisto
private

Definition at line 74 of file DTNoiseAnalysisTest.h.

Referenced by bookHistos(), and dqmEndLuminosityBlock().