CMS 3D CMS Logo

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

#include <DTCertificationSummary.h>

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

 DTCertificationSummary (const edm::ParameterSet &pset)
 Constructor. More...
 
 ~DTCertificationSummary () 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 hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () 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
 
ESProxyIndex const * esGetTokenIndices (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::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)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void beginRun (const edm::Run &run, const edm::EventSetup &setup) override
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 DQM Client Diagnostic in offline mode. More...
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 DQM Client Diagnostic in online mode. More...
 
void endRun (const edm::Run &run, const edm::EventSetup &setup) override
 

Private Attributes

std::map< int, MonitorElement * > certFractions
 
MonitorElementcertMap
 
MonitorElementtotalCertFraction
 

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
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 Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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)
 
- Protected Attributes inherited from DQMEDHarvester
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

No description available.

Author
G. Cerminara - INFN Torino

Definition at line 17 of file DTCertificationSummary.h.

Constructor & Destructor Documentation

DTCertificationSummary::DTCertificationSummary ( const edm::ParameterSet pset)

Constructor.

Definition at line 21 of file DTCertificationSummary.cc.

21 {}
DTCertificationSummary::~DTCertificationSummary ( )
override

Destructor.

Definition at line 23 of file DTCertificationSummary.cc.

23 {}

Member Function Documentation

void DTCertificationSummary::beginRun ( const edm::Run run,
const edm::EventSetup setup 
)
overrideprivate

Definition at line 54 of file DTCertificationSummary.cc.

54 {}
void DTCertificationSummary::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprivatevirtual

DQM Client Diagnostic in offline mode.

Implements DQMEDHarvester.

Definition at line 58 of file DTCertificationSummary.cc.

References dqm::dqmstoreimpl::DQMStore::IGetter::get(), dqm::impl::MonitorElement::getBinContent(), min(), dqmMemoryStats::total, generateEDF::totalWeight, and makeMuonMisalignmentScenario::wheel.

58  {
59  // get the relevant summary histos
60  MonitorElement* effSummary = igetter.get("DT/05-ChamberEff/EfficiencyGlbSummary");
61  MonitorElement* resSummary = igetter.get("DT/02-Segments/ResidualsGlbSummary");
62  MonitorElement* segQualSummary = igetter.get("DT/02-Segments/segmentSummary");
63 
64  // check that all needed histos are there
65  if (effSummary == nullptr || resSummary == nullptr || segQualSummary == nullptr) {
66  LogWarning("DQM|DTMonitorClient|DTCertificationSummary")
67  << "*** Warning: not all needed summaries are present!" << endl;
68  return;
69  }
70 
71  // reset the MEs
73  certFractions[-2]->Fill(0.);
74  certFractions[-1]->Fill(0.);
75  certFractions[-0]->Fill(0.);
76  certFractions[1]->Fill(0.);
77  certFractions[2]->Fill(0.);
78  certMap->Reset();
79 
80  // loop over all sectors and wheels
81  for (int wheel = -2; wheel != 3; ++wheel) {
82  for (int sector = 1; sector != 13; ++sector) {
83  double eff = effSummary->getBinContent(sector, wheel + 3);
84  double res = resSummary->getBinContent(sector, wheel + 3);
85  double segQual = segQualSummary->getBinContent(sector, wheel + 3);
86 
87  double total = 0;
88  if (segQual != 0) {
89  total = min(res, eff);
90  } else {
91  total = eff;
92  }
93 
94  certMap->Fill(sector, wheel, total);
95  // can use variable weight depending on the sector
96  double weight = 1. / 12.;
97  certFractions[wheel]->Fill(certFractions[wheel]->getFloatValue() + weight * total);
98  double totalWeight = 1. / 60.;
100  }
101  }
102 }
Definition: weight.py:1
Definition: Electron.h:6
void Fill(long long x)
virtual void Reset()
reset ME (ie. contents, errors, etc)
MonitorElement * totalCertFraction
T min(T a, T b)
Definition: MathUtil.h:58
virtual double getBinContent(int binx) const
get content of bin (1-D)
std::map< int, MonitorElement * > certFractions
virtual double getFloatValue() const
void DTCertificationSummary::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  context 
)
overrideprivatevirtual

DQM Client Diagnostic in online mode.

Reimplemented from DQMEDHarvester.

Definition at line 25 of file DTCertificationSummary.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), dqm::dqmstoreimpl::DQMStore::IBooker::bookFloat(), dqm::impl::MonitorElement::Fill(), dqm::dqmstoreimpl::DQMStore::IGetter::get(), dqm::impl::MonitorElement::setAxisTitle(), dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), HLT_2018_cff::streams, and makeMuonMisalignmentScenario::wheel.

28  {
29  //FR moved here from beginJob
30 
31  // book the ME
32  ibooker.setCurrentFolder("DT/EventInfo");
33  // global fraction
34  if (!igetter.get("CertificationSummary")) {
35  totalCertFraction = ibooker.bookFloat("CertificationSummary");
37 
38  // certification map
39  certMap = ibooker.book2D("CertificationSummaryMap", "DT Certification Summary Map", 12, 1, 13, 5, -2, 3);
40  certMap->setAxisTitle("sector", 1);
41  certMap->setAxisTitle("wheel", 2);
42 
43  ibooker.setCurrentFolder("DT/EventInfo/CertificationContents");
44  // Wheel "fractions" -> will be 0 or 1
45  for (int wheel = -2; wheel != 3; ++wheel) {
46  stringstream streams;
47  streams << "DT_Wheel" << wheel;
48  certFractions[wheel] = ibooker.bookFloat(streams.str());
49  certFractions[wheel]->Fill(-1);
50  }
51  }
52 }
void Fill(long long x)
MonitorElement * totalCertFraction
std::map< int, MonitorElement * > certFractions
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void DTCertificationSummary::endRun ( const edm::Run run,
const edm::EventSetup setup 
)
overrideprivate

Definition at line 56 of file DTCertificationSummary.cc.

56 {}

Member Data Documentation

std::map<int, MonitorElement*> DTCertificationSummary::certFractions
private

Definition at line 44 of file DTCertificationSummary.h.

MonitorElement* DTCertificationSummary::certMap
private

Definition at line 43 of file DTCertificationSummary.h.

MonitorElement* DTCertificationSummary::totalCertFraction
private

Definition at line 42 of file DTCertificationSummary.h.