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 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 () 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)
 

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 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::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)
 
- Protected Attributes inherited from DQMEDHarvester
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

No description available.

Author
G. Cerminara - INFN Torino

Definition at line 19 of file DTCertificationSummary.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 25 of file DTCertificationSummary.cc.

25 {}
DTCertificationSummary::~DTCertificationSummary ( )
override

Destructor.

Definition at line 28 of file DTCertificationSummary.cc.

28 {}

Member Function Documentation

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

Definition at line 62 of file DTCertificationSummary.cc.

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

DQM Client Diagnostic in offline mode.

Implements DQMEDHarvester.

Definition at line 71 of file DTCertificationSummary.cc.

References DQMStore::IGetter::get(), MonitorElement::getBinContent(), min(), pileupDistInMC::total, and makeMuonMisalignmentScenario::wheel.

71  {
72 
73  // get the relevant summary histos
74  MonitorElement* effSummary = igetter.get("DT/05-ChamberEff/EfficiencyGlbSummary");
75  MonitorElement* resSummary = igetter.get("DT/02-Segments/ResidualsGlbSummary");
76  MonitorElement* segQualSummary = igetter.get("DT/02-Segments/segmentSummary");
77 
78  // check that all needed histos are there
79  if(effSummary == nullptr || resSummary == nullptr || segQualSummary == nullptr) {
80  LogWarning("DQM|DTMonitorClient|DTCertificationSummary") << "*** Warning: not all needed summaries are present!" << endl;
81  return;
82  }
83 
84  // reset the MEs
86  certFractions[-2]->Fill(0.);
87  certFractions[-1]->Fill(0.);
88  certFractions[-0]->Fill(0.);
89  certFractions[1]->Fill(0.);
90  certFractions[2]->Fill(0.);
91  certMap->Reset();
92 
93  // loop over all sectors and wheels
94  for(int wheel = -2; wheel != 3; ++wheel) {
95  for(int sector = 1; sector != 13; ++sector) {
96  double eff = effSummary->getBinContent(sector, wheel+3);
97  double res = resSummary->getBinContent(sector, wheel+3);
98  double segQual = segQualSummary->getBinContent(sector, wheel+3);
99 
100  double total = 0;
101  if(segQual != 0) {
102  total = min(res,eff);
103  } else {
104  total = eff;
105  }
106 
107  certMap->Fill(sector,wheel,total);
108  // can use variable weight depending on the sector
109  double weight = 1./12.;
110  certFractions[wheel]->Fill(certFractions[wheel]->getFloatValue() + weight*total);
111  double totalWeight = 1./60.;
113  }
114  }
115 
116 }
double getFloatValue() const
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:307
Definition: weight.py:1
Definition: Electron.h:6
void Fill(long long x)
MonitorElement * totalCertFraction
T min(T a, T b)
Definition: MathUtil.h:58
void Reset()
reset ME (ie. contents, errors, etc)
std::map< int, MonitorElement * > certFractions
double getBinContent(int binx) const
get content of bin (1-D)
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 33 of file DTCertificationSummary.cc.

References DQMStore::IBooker::book2D(), DQMStore::IBooker::bookFloat(), MonitorElement::Fill(), DQMStore::IGetter::get(), MonitorElement::setAxisTitle(), DQMStore::IBooker::setCurrentFolder(), and makeMuonMisalignmentScenario::wheel.

34  {
35 
36  //FR moved here from beginJob
37 
38  // book the ME
39  ibooker.setCurrentFolder("DT/EventInfo");
40  // global fraction
41  if (! igetter.get("CertificationSummary")) {
42  totalCertFraction = ibooker.bookFloat("CertificationSummary");
44 
45  // certification map
46  certMap = ibooker.book2D("CertificationSummaryMap","DT Certification Summary Map",12,1,13,5,-2,3);
47  certMap->setAxisTitle("sector",1);
48  certMap->setAxisTitle("wheel",2);
49 
50  ibooker.setCurrentFolder("DT/EventInfo/CertificationContents");
51  // Wheel "fractions" -> will be 0 or 1
52  for(int wheel = -2; wheel != 3; ++wheel) {
53  stringstream streams;
54  streams << "DT_Wheel" << wheel;
55  certFractions[wheel] = ibooker.bookFloat(streams.str());
56  certFractions[wheel]->Fill(-1);
57  }
58  }
59 }
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:307
void Fill(long long x)
MonitorElement * totalCertFraction
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
std::map< int, MonitorElement * > certFractions
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:112
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 67 of file DTCertificationSummary.cc.

67  {
68 
69 }

Member Data Documentation

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

Definition at line 45 of file DTCertificationSummary.h.

MonitorElement* DTCertificationSummary::certMap
private

Definition at line 44 of file DTCertificationSummary.h.

MonitorElement* DTCertificationSummary::totalCertFraction
private

Definition at line 43 of file DTCertificationSummary.h.