CMS 3D CMS Logo

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

#include <DTSegmentAnalysisTest.h>

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

Public Member Functions

void beginRun (const edm::Run &, const edm::EventSetup &) override
 
void bookHistos (DQMStore::IBooker &)
 
 DTSegmentAnalysisTest (const edm::ParameterSet &ps)
 Constructor. More...
 
void endRun (edm::Run const &run, edm::EventSetup const &c) override
 
std::string getMEName (const DTChamberId &chID, std::string histoTag)
 Get the ME name. More...
 
void performClientDiagnostic (DQMStore::IGetter &)
 Perform client diagnostic operations. More...
 
 ~DTSegmentAnalysisTest () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQMEDHarvester ()
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &, edm::EventSetup const &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () 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
 
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)
 
 ~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
 
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::vector< ModuleDescription const * > &modules, 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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 
- 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

bool bookingdone
 
std::map< std::pair< int, int >, MonitorElement * > chi2Histos
 
bool detailedAnalysis
 
bool hltDQMMode
 
int maxPhiHit
 
int maxPhiZHit
 
edm::ESHandle< DTGeometrymuonGeom
 
int nevents
 
unsigned int nLumiSegs
 
int nMinEvts
 
bool normalizeHistoPlots
 
edm::ParameterSet parameters
 
bool runOnline
 
std::map< std::pair< int, int >, MonitorElement * > segmRecHitHistos
 
std::map< int, MonitorElement * > summaryHistos
 
std::string topHistoFolder
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
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
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 43 of file DTSegmentAnalysisTest.h.

Constructor & Destructor Documentation

DTSegmentAnalysisTest::DTSegmentAnalysisTest ( const edm::ParameterSet ps)

Constructor.

Definition at line 44 of file DTSegmentAnalysisTest.cc.

References edm::ParameterSet::getUntrackedParameter(), and LogTrace.

44  {
45 
46  LogTrace ("DTDQM|DTMonitorClient|DTSegmentAnalysisTest") << "[DTSegmentAnalysisTest]: Constructor";
47  parameters = ps;
48 
49  // get the cfi parameters
50  detailedAnalysis = parameters.getUntrackedParameter<bool>("detailedAnalysis",false);
51  normalizeHistoPlots = parameters.getUntrackedParameter<bool>("normalizeHistoPlots",false);
52  runOnline = parameters.getUntrackedParameter<bool>("runOnline",true);
53  // top folder for the histograms in DQMStore
54  topHistoFolder = ps.getUntrackedParameter<string>("topHistoFolder","DT/02-Segments");
55  // hlt DQM mode
56 
57  hltDQMMode = ps.getUntrackedParameter<bool>("hltDQMMode",false);
58  nMinEvts = ps.getUntrackedParameter<int>("nEventsCert", 5000);
59  maxPhiHit = ps.getUntrackedParameter<int>("maxPhiHit", 7);
60  maxPhiZHit = ps.getUntrackedParameter<int>("maxPhiZHit", 11);
61 
62  nevents = 0;
63 
64  bookingdone = false;
65 
66 }
T getUntrackedParameter(std::string const &, T const &) const
#define LogTrace(id)
DTSegmentAnalysisTest::~DTSegmentAnalysisTest ( )
override

Destructor.

Definition at line 69 of file DTSegmentAnalysisTest.cc.

References LogTrace.

69  {
70 
71  LogTrace ("DTDQM|DTMonitorClient|DTSegmentAnalysisTest") << "DTSegmentAnalysisTest: analyzed " << nevents << " events";
72 }
#define LogTrace(id)

Member Function Documentation

void DTSegmentAnalysisTest::beginRun ( const edm::Run run,
const edm::EventSetup context 
)
override

Definition at line 74 of file DTSegmentAnalysisTest.cc.

References edm::EventSetup::get(), and LogTrace.

74  {
75 
76  LogTrace ("DTDQM|DTMonitorClient|DTSegmentAnalysisTest") <<"[DTSegmentAnalysisTest]: BeginRun";
77 
78  context.get<MuonGeometryRecord>().get(muonGeom);
79 }
#define LogTrace(id)
edm::ESHandle< DTGeometry > muonGeom
T get() const
Definition: EventSetup.h:63
void DTSegmentAnalysisTest::bookHistos ( DQMStore::IBooker ibooker)

Definition at line 320 of file DTSegmentAnalysisTest.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), and makeMuonMisalignmentScenario::wheel.

320  {
321 
322  for(int wh=-2; wh<=2; wh++){
323  stringstream wheel; wheel << wh;
324  string histoName = "segmentSummary_W" + wheel.str();
325 
327 
328  summaryHistos[wh] = ibooker.book2D(histoName.c_str(),histoName.c_str(),12,1,13,4,1,5);
329  summaryHistos[wh]->setAxisTitle("Sector",1);
330  summaryHistos[wh]->setBinLabel(1,"MB1",2);
331  summaryHistos[wh]->setBinLabel(2,"MB2",2);
332  summaryHistos[wh]->setBinLabel(3,"MB3",2);
333  summaryHistos[wh]->setBinLabel(4,"MB4",2);
334 
335  if(detailedAnalysis){
336  for(int sect=1; sect<=14; sect++){
337  stringstream sector; sector << sect;
338  string chi2HistoName = "chi2BadSegmPercentual_W" + wheel.str() + "_Sec" + sector.str();
339  ibooker.setCurrentFolder(topHistoFolder + "/Wheel" + wheel.str() + "/Tests");
340  chi2Histos[make_pair(wh,sect)] = ibooker.book1D(chi2HistoName.c_str(),chi2HistoName.c_str(),4,1,5);
341  chi2Histos[make_pair(wh,sect)]->setBinLabel(1,"MB1");
342  chi2Histos[make_pair(wh,sect)]->setBinLabel(2,"MB2");
343  chi2Histos[make_pair(wh,sect)]->setBinLabel(3,"MB3");
344  chi2Histos[make_pair(wh,sect)]->setBinLabel(4,"MB4");
345 
346  string segmHistoName = "residualsOnSegmRecHitNumber_W" + wheel.str() + "_Sec" + sector.str();
347  segmRecHitHistos[make_pair(wh,sect)] = ibooker.book1D(segmHistoName.c_str(),segmHistoName.c_str(),4,1,5);
348  segmRecHitHistos[make_pair(wh,sect)]->setBinLabel(1,"MB1");
349  segmRecHitHistos[make_pair(wh,sect)]->setBinLabel(2,"MB2");
350  segmRecHitHistos[make_pair(wh,sect)]->setBinLabel(3,"MB3");
351  segmRecHitHistos[make_pair(wh,sect)]->setBinLabel(4,"MB4");
352 
353  }
354  }
355  }
356 
357  string histoName = "segmentSummary";
358 
360 
361  summaryHistos[3] = ibooker.book2D(histoName.c_str(),histoName.c_str(),12,1,13,5,-2,3);
362  summaryHistos[3]->setAxisTitle("Sector",1);
363  summaryHistos[3]->setAxisTitle("Wheel",2);
364 
365  summaryHistos[4] = ibooker.book2D("SegmentGlbSummary",histoName.c_str(),12,1,13,5,-2,3);
366  summaryHistos[4]->setAxisTitle("Sector",1);
367  summaryHistos[4]->setAxisTitle("Wheel",2);
368 
369 
370 }
std::map< std::pair< int, int >, MonitorElement * > segmRecHitHistos
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
std::map< std::pair< int, int >, MonitorElement * > chi2Histos
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
std::map< int, MonitorElement * > summaryHistos
void DTSegmentAnalysisTest::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 106 of file DTSegmentAnalysisTest.cc.

References DQMStore::IGetter::get(), LogTrace, DTTimeEvolutionHisto::normalizeTo(), and makeMuonMisalignmentScenario::wheel.

106  {
107 
108  if (!runOnline) {
109 
110  LogTrace ("DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
111  <<"[DTSegmentAnalysisTest]: endJob. Client called in offline mode , perform DQM client operation";
112 
113  performClientDiagnostic(igetter);
114  }
115 
116  if(normalizeHistoPlots) {
117  LogTrace ("DTDQM|DTMonitorClient|DTSegmentAnalysisTest") << " Performing time-histo normalization" << endl;
118  MonitorElement* hNevtPerLS = nullptr;
119 
120  if(hltDQMMode) hNevtPerLS = igetter.get(topHistoFolder + "/NevtPerLS");
121  else hNevtPerLS = igetter.get("DT/EventInfo/NevtPerLS");
122 
123  if(hNevtPerLS != nullptr) {
124  for(int wheel = -2; wheel != 3; ++wheel) { // loop over wheels
125  for(int sector = 1; sector <= 12; ++sector) { // loop over sectors
126  stringstream wheelstr; wheelstr << wheel;
127  stringstream sectorstr; sectorstr << sector;
128  string sectorHistoName = topHistoFolder + "/Wheel" + wheelstr.str() +
129  "/Sector" + sectorstr.str() +
130  "/NSegmPerEvent_W" + wheelstr.str() +
131  "_Sec" + sectorstr.str();
132 
133  //FR get the histo from here (igetter available!) ...
134  MonitorElement* histoGot=igetter.get(sectorHistoName);
135 
136  //FR ...and just make with it a DTTimeEvolutionHisto
137  DTTimeEvolutionHisto hNSegmPerLS(histoGot);
138 
139  hNSegmPerLS.normalizeTo(hNevtPerLS);
140  }
141  }
142  } else {
143  LogError ("DTDQM|DTMonitorClient|DTSegmentAnalysisTest") << "Histo NevtPerLS not found!" << endl;
144  }
145  }
146 }
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:302
#define LogTrace(id)
void performClientDiagnostic(DQMStore::IGetter &)
Perform client diagnostic operations.
void DTSegmentAnalysisTest::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  context 
)
overrideprotectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 82 of file DTSegmentAnalysisTest.cc.

References bookHistos(), edm::LuminosityBlockBase::id(), LogTrace, and edm::LuminosityBlockID::luminosityBlock().

83  {
84 
85  // book the histos
86 
87  if (!bookingdone) bookHistos(ibooker);
88  bookingdone = true;
89 
90  // counts number of lumiSegs
91  nLumiSegs = lumiSeg.id().luminosityBlock();
92 
93  if (runOnline) {
94  LogTrace ("DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
95  <<"[DTSegmentAnalysisTest]: End of LS " << nLumiSegs
96  << ". Client called in online mode , perform DQM client operation";
97 
98  performClientDiagnostic(igetter);
99  }
100 
101 }
void bookHistos(DQMStore::IBooker &)
#define LogTrace(id)
void performClientDiagnostic(DQMStore::IGetter &)
Perform client diagnostic operations.
void DTSegmentAnalysisTest::endRun ( edm::Run const &  run,
edm::EventSetup const &  c 
)
override

Definition at line 103 of file DTSegmentAnalysisTest.cc.

103  {
104 }
string DTSegmentAnalysisTest::getMEName ( const DTChamberId chID,
std::string  histoTag 
)

Get the ME name.

Definition at line 295 of file DTSegmentAnalysisTest.cc.

References DTChamberId::sector(), DTChamberId::station(), relativeConstraints::station, DTChamberId::wheel(), and makeMuonMisalignmentScenario::wheel.

295  {
296 
297  stringstream wheel; wheel << chID.wheel();
298  stringstream station; station << chID.station();
299  stringstream sector; sector << chID.sector();
300 
301  string folderName =
302  topHistoFolder + "/Wheel" + wheel.str() +
303  "/Sector" + sector.str() +
304  "/Station" + station.str() + "/";
305 
306  string histoname = folderName + histoTag
307  + "_W" + wheel.str()
308  + "_St" + station.str()
309  + "_Sec" + sector.str();
310 
311  if(histoTag == "numberOfSegments")
312  histoname =
313  topHistoFolder + "/Wheel" + wheel.str() + "/" +
314  histoTag + + "_W" + wheel.str();
315 
316  return histoname;
317 
318 }
int sector() const
Definition: DTChamberId.h:61
int station() const
Return the station number.
Definition: DTChamberId.h:51
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
void DTSegmentAnalysisTest::performClientDiagnostic ( DQMStore::IGetter igetter)

Perform client diagnostic operations.

Definition at line 148 of file DTSegmentAnalysisTest.cc.

References funct::abs(), stringResolutionProvider_cfi::bin, HcalObjRepresent::Fill(), DQMStore::IGetter::get(), QReport::getBadChannels(), MonitorElement::getFloatValue(), MonitorElement::getTH1F(), MonitorElement::getTH2F(), trackerHits::histo, createfilelist::int, genParticles_cff::map, pileupCalc::nbins, DTChamberId::sector(), DTChamberId::station(), electronIdCutBased_cfi::threshold, mps_merge::weight, and DTChamberId::wheel().

148  {
149 
150  summaryHistos[3]->Reset();
151  summaryHistos[4]->Reset();
152  vector<const DTChamber*>::const_iterator ch_it = muonGeom->chambers().begin();
153  vector<const DTChamber*>::const_iterator ch_end = muonGeom->chambers().end();
154 
155  for (; ch_it != ch_end; ++ch_it) {
156  DTChamberId chID = (*ch_it)->id();
157 
158  MonitorElement * hNHits = igetter.get(getMEName(chID, "h4DSegmNHits"));
159  MonitorElement * hSegmOcc = igetter.get(getMEName(chID, "numberOfSegments"));
160 
161  if (hNHits && hSegmOcc) {
162 
163  TH1F * hNHits_root = hNHits->getTH1F();
164  TH2F * hSegmOcc_root = hSegmOcc->getTH2F();
165  TH2F * summary_histo_root = summaryHistos[3]->getTH2F();
166 
167  int sector = chID.sector();
168  if(sector == 13) sector=4;
169  if(sector == 14) sector=10;
170 
171 
172  if((chID.station()!=4 && hNHits_root->GetMaximumBin() < maxPhiZHit)||
173  (chID.station()==4 && hNHits_root->GetMaximumBin() < maxPhiHit)){
174  summaryHistos[chID.wheel()]->setBinContent(sector, chID.station(),1);
175  if(summary_histo_root->GetBinContent(sector, chID.wheel()+3)<1)
176  summaryHistos[3]->setBinContent(sector, chID.wheel()+3,1);
177  }
178  else
179  summaryHistos[chID.wheel()]->setBinContent(sector, chID.station(),0);
180 
181  if(detailedAnalysis) {
182  if(chID.station()!=4)
183  segmRecHitHistos[make_pair(chID.wheel(),chID.sector())]->Fill(chID.station(),abs(12-hNHits_root->GetMaximumBin()));
184  else
185  segmRecHitHistos[make_pair(chID.wheel(),chID.sector())]->Fill(chID.station(),abs(8-hNHits_root->GetMaximumBin()));
186  }
187 
188  TH2F * summary2_histo_root = summaryHistos[3]->getTH2F();
189  float weight = 0.001;
190  if(hSegmOcc_root->GetBinContent(sector,chID.station())==0){
191  summaryHistos[chID.wheel()]->setBinContent(sector, chID.station(),2);
192  if(summary2_histo_root->GetBinContent(sector, chID.wheel()+3)<2)
193  summaryHistos[3]->setBinContent(sector, chID.wheel()+3,2);
194  } else {
195  // Fill the percentage of segment occupancy
196  weight = 1./4.;
197  if((sector == 4 || sector == 10) && chID.station() == 4) weight = 1./8.;
198  }
199  summaryHistos[4]->Fill(sector, chID.wheel(),weight);
200  } else {
201  LogVerbatim ("DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
202  << "[DTSegmentAnalysisTest]: histos not found!!"; // FIXME
203  }
204 
205  if(detailedAnalysis){ // switch on detailed analysis
206 
207  //test on chi2 segment quality
208 
209  MonitorElement * chi2_histo = igetter.get(getMEName(chID, "h4DChi2"));
210  if(chi2_histo) {
211  TH1F * chi2_histo_root = chi2_histo->getTH1F();
212  double threshold = parameters.getUntrackedParameter<double>("chi2Threshold", 5);
213  double maximum = chi2_histo_root->GetXaxis()->GetXmax();
214  double minimum = chi2_histo_root->GetXaxis()->GetXmin();
215  int nbins = chi2_histo_root->GetXaxis()->GetNbins();
216  int thresholdBin = int(threshold/((maximum-minimum)/nbins));
217 
218  double badSegments=0;
219  for(int bin=thresholdBin; bin<=nbins; bin++){
220  badSegments+=chi2_histo_root->GetBinContent(bin);
221  }
222 
223  if(chi2_histo_root->GetEntries()!=0){
224  double badSegmentsPercentual= badSegments/double(chi2_histo_root->GetEntries());
225  chi2Histos[make_pair(chID.wheel(),chID.sector())]->Fill(chID.station(),badSegmentsPercentual);
226  }
227  } else {
228  LogVerbatim ("DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
229  <<"[DTSegmentAnalysisTest]: Histo: " << getMEName(chID, "h4DChi2") << " not found!" << endl;
230  }
231  } // end of switch for detailed analysis
232 
233  } //loop over all the chambers
234 
235  string nEvtsName = "DT/EventInfo/Counters/nProcessedEventsSegment";
236 
237  MonitorElement * meProcEvts = igetter.get(nEvtsName);
238 
239  if (meProcEvts) {
240  int nProcEvts = meProcEvts->getFloatValue();
241  summaryHistos[4]->setEntries(nProcEvts < nMinEvts ? 10. : nProcEvts);
242  } else {
243  summaryHistos[4]->setEntries(nMinEvts + 1);
244  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") << "[DTOccupancyTest] ME: "
245  << nEvtsName << " not found!" << endl;
246  }
247 
248  if(detailedAnalysis){
249 
250  string chi2CriterionName = parameters.getUntrackedParameter<string>("chi2TestName","chi2InRange");
251  for(map<pair<int, int>, MonitorElement*> ::const_iterator histo = chi2Histos.begin();
252  histo != chi2Histos.end();
253  histo++) {
254 
255  const QReport * theChi2QReport = (*histo).second->getQReport(chi2CriterionName);
256  if(theChi2QReport) {
257  vector<dqm::me_util::Channel> badChannels = theChi2QReport->getBadChannels();
258  for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
259  channel != badChannels.end(); channel++) {
260 
261  LogError ("DTDQM|DTMonitorClient|DTSegmentAnalysisTest") << "Wheel: "<<(*histo).first.first
262  << " Sector: "<<(*histo).first.second
263  << " Bad stations: "<<(*channel).getBin()
264  <<" Contents : "<<(*channel).getContents();
265  }
266  }
267  }
268 
269 
270  string segmRecHitCriterionName = parameters.getUntrackedParameter<string>("segmRecHitTestName","segmRecHitInRange");
271  for(map<pair<int, int>, MonitorElement*> ::const_iterator histo = segmRecHitHistos.begin();
272  histo != segmRecHitHistos.end();
273  histo++) {
274 
275  const QReport * theSegmRecHitQReport = (*histo).second->getQReport(segmRecHitCriterionName);
276  if(theSegmRecHitQReport) {
277  vector<dqm::me_util::Channel> badChannels = theSegmRecHitQReport->getBadChannels();
278  for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
279  channel != badChannels.end(); channel++) {
280 
281  LogError ("DTDQM|DTMonitorClient|DTSegmentAnalysisTest") << "Wheel: "<<(*histo).first.first
282  << " Sector: "<<(*histo).first.second
283  << " Bad stations on recHit number: "
284  <<(*channel).getBin()
285  <<" Contents : "
286  <<(*channel).getContents();
287  }
288  }
289  }
290 
291  } // end of detailedAnalysis
292 }
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
Definition: DTGeometry.cc:84
const std::vector< DQMChannel > & getBadChannels() const
Definition: QReport.h:33
TH1F * getTH1F() const
double getFloatValue() const
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:302
Definition: weight.py:1
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::map< std::pair< int, int >, MonitorElement * > segmRecHitHistos
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TH2F * getTH2F() const
bin
set the eta bin as selection string.
std::string getMEName(const DTChamberId &chID, std::string histoTag)
Get the ME name.
std::map< std::pair< int, int >, MonitorElement * > chi2Histos
edm::ESHandle< DTGeometry > muonGeom
int sector() const
Definition: DTChamberId.h:61
std::map< int, MonitorElement * > summaryHistos
int station() const
Return the station number.
Definition: DTChamberId.h:51
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45

Member Data Documentation

bool DTSegmentAnalysisTest::bookingdone
private

Definition at line 83 of file DTSegmentAnalysisTest.h.

std::map< std::pair<int,int>, MonitorElement* > DTSegmentAnalysisTest::chi2Histos
private

Definition at line 89 of file DTSegmentAnalysisTest.h.

bool DTSegmentAnalysisTest::detailedAnalysis
private

Definition at line 75 of file DTSegmentAnalysisTest.h.

bool DTSegmentAnalysisTest::hltDQMMode
private

Definition at line 96 of file DTSegmentAnalysisTest.h.

int DTSegmentAnalysisTest::maxPhiHit
private

Definition at line 78 of file DTSegmentAnalysisTest.h.

int DTSegmentAnalysisTest::maxPhiZHit
private

Definition at line 79 of file DTSegmentAnalysisTest.h.

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

Definition at line 86 of file DTSegmentAnalysisTest.h.

int DTSegmentAnalysisTest::nevents
private

Definition at line 72 of file DTSegmentAnalysisTest.h.

unsigned int DTSegmentAnalysisTest::nLumiSegs
private

Definition at line 73 of file DTSegmentAnalysisTest.h.

int DTSegmentAnalysisTest::nMinEvts
private

Definition at line 76 of file DTSegmentAnalysisTest.h.

bool DTSegmentAnalysisTest::normalizeHistoPlots
private

Definition at line 92 of file DTSegmentAnalysisTest.h.

edm::ParameterSet DTSegmentAnalysisTest::parameters
private
bool DTSegmentAnalysisTest::runOnline
private

Definition at line 81 of file DTSegmentAnalysisTest.h.

std::map< std::pair<int,int>, MonitorElement* > DTSegmentAnalysisTest::segmRecHitHistos
private

Definition at line 90 of file DTSegmentAnalysisTest.h.

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

Definition at line 91 of file DTSegmentAnalysisTest.h.

std::string DTSegmentAnalysisTest::topHistoFolder
private

Definition at line 94 of file DTSegmentAnalysisTest.h.