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::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources, edm::EndLuminosityBlockProducer > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 METTesterPostProcessor (const edm::ParameterSet &)
 
 ~METTesterPostProcessor ()
 
- Public Member Functions inherited from DQMEDHarvester
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQMEDHarvester (void)
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &, edm::EventSetup const &) override final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &) override
 
virtual void produce (edm::Event &, edm::EventSetup const &) override final
 
- Public Member Functions inherited from edm::one::EDProducer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources, edm::EndLuminosityBlockProducer >
 EDProducer ()=default
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- 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 ()
 
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, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- 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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

virtual void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &)
 
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 edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
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)
 

Detailed Description

Definition at line 28 of file METTesterPostProcessor.h.

Constructor & Destructor Documentation

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

Definition at line 18 of file METTesterPostProcessor.cc.

19 {
20 }
METTesterPostProcessor::~METTesterPostProcessor ( )

Definition at line 23 of file METTesterPostProcessor.cc.

24 {
25 }

Member Function Documentation

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

Implements DQMEDHarvester.

Definition at line 30 of file METTesterPostProcessor.cc.

References create_public_pileup_plots::bins, DQMStore::IBooker::book1D(), FillMETRes(), DQMStore::IGetter::getSubdirs(), mps_fire::i, createfilelist::int, met_dirs, mMETDifference_GenMETTrue_METResolution, DQMStore::IBooker::setCurrentFolder(), DQMStore::IGetter::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

31 {
32  std::vector<std::string> subDirVec;
33  std::string RunDir="JetMET/METValidation/";
34  iget_.setCurrentFolder(RunDir);
35  met_dirs=iget_.getSubdirs();
36  //bin definition for resolution plot -> last bin contains overflow too, but for plotting purposes show up to 1 TeV only
37  int nBins = 11;
38  float bins[] = {0.,20.,40.,60.,80.,100.,150.,200.,300.,400.,500.,1000};
39  //loop over met subdirectories
40  for (int i=0; i<int(met_dirs.size()); i++) {
41  ibook_.setCurrentFolder(met_dirs[i]);
42  mMETDifference_GenMETTrue_METResolution = ibook_.book1D("METResolution_GenMETTrue_InMETBins","METResolution_GenMETTrue_InMETBins",nBins, bins);
43  FillMETRes(met_dirs[i],iget_);
44  }
45 }
std::vector< std::string > met_dirs
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * mMETDifference_GenMETTrue_METResolution
std::vector< std::string > getSubdirs(void)
Definition: DQMStore.cc:323
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:347
void FillMETRes(std::string metdir, DQMStore::IGetter &)
void METTesterPostProcessor::FillMETRes ( std::string  metdir,
DQMStore::IGetter iget 
)
private

Definition at line 48 of file METTesterPostProcessor.cc.

References DQMStore::IGetter::get(), MonitorElement::getMean(), MonitorElement::getRMS(), 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, MonitorElement::setBinContent(), and MonitorElement::setBinError().

Referenced by dqmEndJob().

49 {
50 
62 
63  mMETDifference_GenMETTrue_MET0to20 = iget.get(metdir+"/METResolution_GenMETTrue_MET0to20");
64  mMETDifference_GenMETTrue_MET20to40 = iget.get(metdir+"/METResolution_GenMETTrue_MET20to40");
65  mMETDifference_GenMETTrue_MET40to60 = iget.get(metdir+"/METResolution_GenMETTrue_MET40to60");
66  mMETDifference_GenMETTrue_MET60to80 = iget.get(metdir+"/METResolution_GenMETTrue_MET60to80");
67  mMETDifference_GenMETTrue_MET80to100 = iget.get(metdir+"/METResolution_GenMETTrue_MET80to100");
68  mMETDifference_GenMETTrue_MET100to150 = iget.get(metdir+"/METResolution_GenMETTrue_MET100to150");
69  mMETDifference_GenMETTrue_MET150to200 = iget.get(metdir+"/METResolution_GenMETTrue_MET150to200");
70  mMETDifference_GenMETTrue_MET200to300 = iget.get(metdir+"/METResolution_GenMETTrue_MET200to300");
71  mMETDifference_GenMETTrue_MET300to400 = iget.get(metdir+"/METResolution_GenMETTrue_MET300to400");
72  mMETDifference_GenMETTrue_MET400to500 = iget.get(metdir+"/METResolution_GenMETTrue_MET400to500");
73  mMETDifference_GenMETTrue_MET500 = iget.get(metdir+"/METResolution_GenMETTrue_MET500");
74  if(mMETDifference_GenMETTrue_MET0to20 && mMETDifference_GenMETTrue_MET0to20->getRootObject()){//check one object, if existing, then the remaining ME's exist too
75  //for genmet none of these ME's are filled
87 
88  //the error computation should be done in a postProcessor in the harvesting step otherwise the histograms will be just summed
100  }
101 }
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * mMETDifference_GenMETTrue_MET20to40
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:305
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_MET200to300
MonitorElement * mMETDifference_GenMETTrue_MET300to400
MonitorElement * mMETDifference_GenMETTrue_MET0to20
MonitorElement * mMETDifference_GenMETTrue_MET60to80
MonitorElement * mMETDifference_GenMETTrue_MET80to100
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * mMETDifference_GenMETTrue_MET400to500
MonitorElement * mMETDifference_GenMETTrue_MET150to200
TObject * getRootObject(void) const
MonitorElement * mMETDifference_GenMETTrue_MET500
MonitorElement * mMETDifference_GenMETTrue_METResolution
MonitorElement * mMETDifference_GenMETTrue_MET40to60
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * mMETDifference_GenMETTrue_MET100to150

Member Data Documentation

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

Definition at line 35 of file METTesterPostProcessor.h.

Referenced by dqmEndJob().

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET0to20
private

Definition at line 38 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET100to150
private

Definition at line 43 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET150to200
private

Definition at line 44 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET200to300
private

Definition at line 45 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET20to40
private

Definition at line 39 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET300to400
private

Definition at line 46 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET400to500
private

Definition at line 47 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET40to60
private

Definition at line 40 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET500
private

Definition at line 48 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET60to80
private

Definition at line 41 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_MET80to100
private

Definition at line 42 of file METTesterPostProcessor.h.

Referenced by FillMETRes().

MonitorElement* METTesterPostProcessor::mMETDifference_GenMETTrue_METResolution
private

Definition at line 49 of file METTesterPostProcessor.h.

Referenced by dqmEndJob(), and FillMETRes().