CMS 3D CMS Logo

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

#include <METTesterPostProcessor.h>

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

 METTesterPostProcessor (const edm::ParameterSet &)
 
 ~METTesterPostProcessor () override
 
- 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 dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
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
 
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::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
 
bool registeredToConsumeMany (TypeID const &, 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::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void FillMETRes (std::string metdir, DQMStore::IGetter &)
 

Private Attributes

std::vector< std::string > met_dirs
 
MonitorElementmMETDifference_GenMETTrue_MET0to20
 
MonitorElementmMETDifference_GenMETTrue_MET100to150
 
MonitorElementmMETDifference_GenMETTrue_MET150to200
 
MonitorElementmMETDifference_GenMETTrue_MET200to300
 
MonitorElementmMETDifference_GenMETTrue_MET20to40
 
MonitorElementmMETDifference_GenMETTrue_MET300to400
 
MonitorElementmMETDifference_GenMETTrue_MET400to500
 
MonitorElementmMETDifference_GenMETTrue_MET40to60
 
MonitorElementmMETDifference_GenMETTrue_MET500
 
MonitorElementmMETDifference_GenMETTrue_MET60to80
 
MonitorElementmMETDifference_GenMETTrue_MET80to100
 
MonitorElementmMETDifference_GenMETTrue_METResolution
 

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<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 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<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)
 
- 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 27 of file METTesterPostProcessor.h.

Constructor & Destructor Documentation

◆ METTesterPostProcessor()

METTesterPostProcessor::METTesterPostProcessor ( const edm::ParameterSet iConfig)
explicit

Definition at line 18 of file METTesterPostProcessor.cc.

18 {}

◆ ~METTesterPostProcessor()

METTesterPostProcessor::~METTesterPostProcessor ( )
override

Definition at line 20 of file METTesterPostProcessor.cc.

20 {}

Member Function Documentation

◆ dqmEndJob()

void METTesterPostProcessor::dqmEndJob ( DQMStore::IBooker ibook_,
DQMStore::IGetter iget_ 
)
overrideprivatevirtual

Implements DQMEDHarvester.

Definition at line 23 of file METTesterPostProcessor.cc.

References trigObjTnPSource_cfi::bins, dqm::implementation::IBooker::book1D(), FillMETRes(), dqm::implementation::IGetter::getSubdirs(), mps_fire::i, createfilelist::int, met_dirs, mMETDifference_GenMETTrue_METResolution, seedmultiplicitymonitor_newtracking_cfi::nBins, dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

23  {
24  std::vector<std::string> subDirVec;
25  std::string RunDir = "JetMET/METValidation/";
26  iget_.setCurrentFolder(RunDir);
27  met_dirs = iget_.getSubdirs();
28  // bin definition for resolution plot -> last bin contains overflow too, but
29  // for plotting purposes show up to 1 TeV only
30  int nBins = 11;
31  float bins[] = {0., 20., 40., 60., 80., 100., 150., 200., 300., 400., 500., 1000};
32  // loop over met subdirectories
33  for (int i = 0; i < int(met_dirs.size()); i++) {
34  ibook_.setCurrentFolder(met_dirs[i]);
36  ibook_.book1D("METResolution_GenMETTrue_InMETBins", "METResolution_GenMETTrue_InMETBins", nBins, bins);
37  FillMETRes(met_dirs[i], iget_);
38  }
39 }
std::vector< std::string > met_dirs
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * mMETDifference_GenMETTrue_METResolution
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
void FillMETRes(std::string metdir, DQMStore::IGetter &)
virtual DQM_DEPRECATED std::vector< std::string > getSubdirs() const
Definition: DQMStore.cc:700

◆ FillMETRes()

void METTesterPostProcessor::FillMETRes ( std::string  metdir,
DQMStore::IGetter iget 
)
private

Definition at line 41 of file METTesterPostProcessor.cc.

References dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getMean(), dqm::impl::MonitorElement::getRMS(), dqm::legacy::MonitorElement::getRootObject(), mMETDifference_GenMETTrue_MET0to20, mMETDifference_GenMETTrue_MET100to150, mMETDifference_GenMETTrue_MET150to200, mMETDifference_GenMETTrue_MET200to300, mMETDifference_GenMETTrue_MET20to40, mMETDifference_GenMETTrue_MET300to400, mMETDifference_GenMETTrue_MET400to500, mMETDifference_GenMETTrue_MET40to60, mMETDifference_GenMETTrue_MET500, mMETDifference_GenMETTrue_MET60to80, mMETDifference_GenMETTrue_MET80to100, mMETDifference_GenMETTrue_METResolution, dqm::impl::MonitorElement::setBinContent(), and dqm::impl::MonitorElement::setBinError().

Referenced by dqmEndJob().

41  {
53 
54  mMETDifference_GenMETTrue_MET0to20 = iget.get(metdir + "/METResolution_GenMETTrue_MET0to20");
55  mMETDifference_GenMETTrue_MET20to40 = iget.get(metdir + "/METResolution_GenMETTrue_MET20to40");
56  mMETDifference_GenMETTrue_MET40to60 = iget.get(metdir + "/METResolution_GenMETTrue_MET40to60");
57  mMETDifference_GenMETTrue_MET60to80 = iget.get(metdir + "/METResolution_GenMETTrue_MET60to80");
58  mMETDifference_GenMETTrue_MET80to100 = iget.get(metdir + "/METResolution_GenMETTrue_MET80to100");
59  mMETDifference_GenMETTrue_MET100to150 = iget.get(metdir + "/METResolution_GenMETTrue_MET100to150");
60  mMETDifference_GenMETTrue_MET150to200 = iget.get(metdir + "/METResolution_GenMETTrue_MET150to200");
61  mMETDifference_GenMETTrue_MET200to300 = iget.get(metdir + "/METResolution_GenMETTrue_MET200to300");
62  mMETDifference_GenMETTrue_MET300to400 = iget.get(metdir + "/METResolution_GenMETTrue_MET300to400");
63  mMETDifference_GenMETTrue_MET400to500 = iget.get(metdir + "/METResolution_GenMETTrue_MET400to500");
64  mMETDifference_GenMETTrue_MET500 = iget.get(metdir + "/METResolution_GenMETTrue_MET500");
66  mMETDifference_GenMETTrue_MET0to20->getRootObject()) { // check one object, if existing, then the
67  // remaining ME's exist too
68  // for genmet none of these ME's are filled
80 
81  // the error computation should be done in a postProcessor in the harvesting
82  // step otherwise the histograms will be just summed
94  }
95 }
MonitorElement * mMETDifference_GenMETTrue_MET20to40
MonitorElement * mMETDifference_GenMETTrue_MET200to300
MonitorElement * mMETDifference_GenMETTrue_MET300to400
MonitorElement * mMETDifference_GenMETTrue_MET0to20
virtual double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * mMETDifference_GenMETTrue_MET60to80
MonitorElement * mMETDifference_GenMETTrue_MET80to100
MonitorElement * mMETDifference_GenMETTrue_MET400to500
MonitorElement * mMETDifference_GenMETTrue_MET150to200
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
MonitorElement * mMETDifference_GenMETTrue_MET500
MonitorElement * mMETDifference_GenMETTrue_METResolution
virtual double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * mMETDifference_GenMETTrue_MET40to60
TObject * getRootObject() const override
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * mMETDifference_GenMETTrue_MET100to150

Member Data Documentation

◆ met_dirs

std::vector<std::string> METTesterPostProcessor::met_dirs
private

Definition at line 34 of file METTesterPostProcessor.h.

Referenced by dqmEndJob().

◆ mMETDifference_GenMETTrue_MET0to20

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET0to20
private

Definition at line 37 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

◆ mMETDifference_GenMETTrue_MET100to150

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET100to150
private

Definition at line 42 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

◆ mMETDifference_GenMETTrue_MET150to200

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET150to200
private

Definition at line 43 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

◆ mMETDifference_GenMETTrue_MET200to300

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET200to300
private

Definition at line 44 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

◆ mMETDifference_GenMETTrue_MET20to40

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET20to40
private

Definition at line 38 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

◆ mMETDifference_GenMETTrue_MET300to400

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET300to400
private

Definition at line 45 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

◆ mMETDifference_GenMETTrue_MET400to500

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET400to500
private

Definition at line 46 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

◆ mMETDifference_GenMETTrue_MET40to60

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET40to60
private

Definition at line 39 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

◆ mMETDifference_GenMETTrue_MET500

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET500
private

Definition at line 47 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

◆ mMETDifference_GenMETTrue_MET60to80

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET60to80
private

Definition at line 40 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

◆ mMETDifference_GenMETTrue_MET80to100

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET80to100
private

Definition at line 41 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

◆ mMETDifference_GenMETTrue_METResolution

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_METResolution
private

Definition at line 48 of file METTesterPostProcessor.h.

Referenced by dqmEndJob(), and FillMETRes().