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::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

 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 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 ()
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
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
 
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
 
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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
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
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
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)
 
template<Transition B>
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 (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
- 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

No description available.

Author
G. Cerminara - INFN Torino

Definition at line 17 of file DTCertificationSummary.h.

Constructor & Destructor Documentation

◆ DTCertificationSummary()

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

Constructor.

Definition at line 21 of file DTCertificationSummary.cc.

21 {}

◆ ~DTCertificationSummary()

DTCertificationSummary::~DTCertificationSummary ( )
override

Destructor.

Definition at line 23 of file DTCertificationSummary.cc.

23 {}

Member Function Documentation

◆ beginRun()

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

Definition at line 54 of file DTCertificationSummary.cc.

54 {}

◆ dqmEndJob()

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.

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 }

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

◆ dqmEndLuminosityBlock()

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.

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 }

References dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookFloat(), dqm::impl::MonitorElement::Fill(), dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), HLT_Fake1_cff::streams, and makeMuonMisalignmentScenario::wheel.

◆ endRun()

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

Definition at line 56 of file DTCertificationSummary.cc.

56 {}

Member Data Documentation

◆ certFractions

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

Definition at line 44 of file DTCertificationSummary.h.

◆ certMap

MonitorElement* DTCertificationSummary::certMap
private

Definition at line 43 of file DTCertificationSummary.h.

◆ totalCertFraction

MonitorElement* DTCertificationSummary::totalCertFraction
private

Definition at line 42 of file DTCertificationSummary.h.

DTCertificationSummary::totalCertFraction
MonitorElement * totalCertFraction
Definition: DTCertificationSummary.h:42
dqm::implementation::IBooker::bookFloat
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
min
T min(T a, T b)
Definition: MathUtil.h:58
generateEDF.totalWeight
totalWeight
Definition: generateEDF.py:688
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::impl::MonitorElement::Reset
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
Definition: MonitorElement.cc:354
HLT_Fake1_cff.streams
streams
Definition: HLT_Fake1_cff.py:13
dqm::impl::MonitorElement::getFloatValue
virtual double getFloatValue() const
Definition: MonitorElement.cc:917
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
res
Definition: Electron.h:6
DTCertificationSummary::certFractions
std::map< int, MonitorElement * > certFractions
Definition: DTCertificationSummary.h:44
dqm::implementation::IBooker::book2D
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:177
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:651
dqmMemoryStats.total
total
Definition: dqmMemoryStats.py:152
DTCertificationSummary::certMap
MonitorElement * certMap
Definition: DTCertificationSummary.h:43
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:592
weight
Definition: weight.py:1