CMS 3D CMS Logo

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

#include <ElectronOfflineClient.h>

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

 ElectronOfflineClient (const edm::ParameterSet &)
 
void finalize (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter) override
 
 ~ElectronOfflineClient () override
 
- 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 Attributes

std::string effHistoTitle_
 

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 ElectronDqmHarvesterBase
void beginJob () override
 
MonitorElementbookH1 (DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
 
MonitorElementbookH1andDivide (DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
 
MonitorElementbookH1andDivide (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, const std::string &name, const std::string &num, const std::string &denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
 
MonitorElementbookH1withSumw2 (DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
 
MonitorElementbookH2 (DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
 
MonitorElementbookH2andDivide (DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
 
MonitorElementbookH2andDivide (DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, const std::string &num, const std::string &denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
 
MonitorElementbookH2withSumw2 (DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
 
MonitorElementbookP1 (DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="E1 P")
 
MonitorElementcloneH1 (DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, MonitorElement *original, const std::string &title="")
 
MonitorElementcloneH1 (DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, const std::string &original, const std::string &title="")
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 
 ElectronDqmHarvesterBase (const edm::ParameterSet &conf)
 
bool finalStepDone ()
 
MonitorElementget (DQMStore::IGetter &iGetter, const std::string &name)
 
MonitorElementprofileX (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
 
MonitorElementprofileX (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, const std::string &me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
 
MonitorElementprofileY (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
 
MonitorElementprofileY (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, const std::string &me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
 
void remove (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, const std::string &name)
 
void setBookEfficiencyFlag (const bool &)
 
void setBookIndex (short)
 
void setBookPrefix (const std::string &)
 
void setBookStatOverflowFlag (const bool &)
 
int verbosity ()
 
 ~ElectronDqmHarvesterBase () override
 
- 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

Definition at line 6 of file ElectronOfflineClient.h.

Constructor & Destructor Documentation

ElectronOfflineClient::ElectronOfflineClient ( const edm::ParameterSet conf)
explicit

Definition at line 11 of file ElectronOfflineClient.cc.

References effHistoTitle_, edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

13  {
14  effHistoTitle_ = conf.getParameter<std::string>("EffHistoTitle") ;
15  }
T getParameter(std::string const &) const
ElectronDqmHarvesterBase(const edm::ParameterSet &conf)
ElectronOfflineClient::~ElectronOfflineClient ( )
override

Definition at line 17 of file ElectronOfflineClient.cc.

18  {}

Member Function Documentation

void ElectronOfflineClient::finalize ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter 
)
overridevirtual

Reimplemented from ElectronDqmHarvesterBase.

Definition at line 20 of file ElectronOfflineClient.cc.

References ElectronDqmHarvesterBase::bookH1andDivide(), effHistoTitle_, and ElectronDqmHarvesterBase::setBookIndex().

21  {
22 // MonitorElement * h1_matchedEle_eta = get("matchedEle_eta");
23 // MonitorElement * h1_matchedEle_eta_golden = get("matchedEle_eta_golden");
24 // MonitorElement * h1_matchedEle_eta_shower = get("matchedEle_eta_shower");
25 // //MonitorElement * h1_matchedEle_eta_bbrem = get("matchedEle_eta_bbrem");
26 // //MonitorElement * h1_matchedEle_eta_narrow = get("matchedEle_eta_narrow");
27 // MonitorElement * h1_matchedEle_eta_goldenFrac = cloneH1("matchedEle_eta_goldenFrac","matchedEle_eta","fraction of golden electrons") ;
28 // MonitorElement * h1_matchedEle_eta_showerFrac = cloneH1("matchedEle_eta_showerFrac","matchedEle_eta","fraction of showering electrons") ;
29 // //MonitorElement * h1_matchedEle_eta_bbremFrac = cloneH1("matchedEle_eta_bbremFrac","matchedEle_eta","fraction of bbrem electrons") ;
30 // //MonitorElement * h1_matchedEle_eta_narrowFrac = cloneH1("matchedEle_eta_narrowFrac","matchedEle_eta","fraction of narrow electrons") ;
31 // int nb, nbins=h_matchedEle_eta->getNbinsX() ;
32 // for ( nb=0 ; nb<nbins ; ++nb )
33 // {
34 // float content = h1_matchedEle_eta->getBinContent(nb) ;
35 // if (content==0.) continue ;
36 // float contgold =( h1_matchedEle_eta_golden->getBinContent(nb))/content ;
37 // float contshower =( h1_matchedEle_eta_shower->getBinContent(nb))/content ;
38 // //float contbbrem =( h1_matchedEle_eta_bbrem->getBinContent(nb))/content ;
39 // //float contnarrow =( h1_matchedEle_eta_narrow->getBinContent(nb))/content ;
40 // h1_matchedEle_eta_goldenFrac ->setBinContent(nb,contgold) ;
41 // h1_matchedEle_eta_showerFrac ->setBinContent(nb,contshower) ;
42 // //h1_matchedEle_eta_bbremFrac ->setBinContent(nb,contbbrem) ;
43 // //h1_matchedEle_eta_narrowFrac ->setBinContent(nb,contnarrow) ;
44 // }
45 // remove(iBooker,iGetter, "matchedEle_eta") ;
46 // remove(iBooker,iGetter, "matchedEle_eta_golden") ;
47 // remove(iBooker,iGetter, "matchedEle_eta_shower") ;
48 // //remove(iBooker,iGetter, "matchedEle_eta_bbrem") ;
49 // //remove(iBooker,iGetter, "matchedEle_eta_narrow") ;
50 
51  setBookIndex(100) ;
52  if (effHistoTitle_=="")
53  {
54  bookH1andDivide(iBooker,iGetter, "ptEff","matchedObject_Pt","matchingObject_Pt","p_{T} (GeV/c)","Efficiency","efficiency vs p_{T}") ;
55  bookH1andDivide(iBooker,iGetter, "etaEff","matchedObject_Eta","matchingObject_Eta","#eta","Efficiency","efficiency vs #eta") ;
56  // bookH1andDivide(iBooker,iGetter, "absEtaEff","matchedObject_AbsEta","matchingObject_AbsEta","|#eta|","Efficiency","efficiency vs |#eta|") ;
57  bookH1andDivide(iBooker,iGetter, "phiEff","matchedObject_Phi","matchingObject_Phi","#phi (rad)","Efficiency","efficiency vs #phi") ;
58 // bookH1andDivide(iBooker,iGetter, "zEff","matchedObject_Z","matchingObject_Z","z (cm)","Efficiency","efficiency vs z") ;
59  }
60  else
61  {
62  bookH1andDivide(iBooker,iGetter, "ptEff","matchedObject_Pt","matchingObject_Pt","p_{T} (GeV/c)","Efficiency",effHistoTitle_) ;
63  bookH1andDivide(iBooker,iGetter, "etaEff","matchedObject_Eta","matchingObject_Eta","#eta","Efficiency",effHistoTitle_) ;
64  // bookH1andDivide(iBooker,iGetter, "absEtaEff","matchedObject_AbsEta","matchingObject_AbsEta","|#eta|","Efficiency",effHistoTitle_) ;
65  bookH1andDivide(iBooker,iGetter, "phiEff","matchedObject_Phi","matchingObject_Phi","#phi (rad)","Efficiency",effHistoTitle_) ;
66 // bookH1andDivide(iBooker,iGetter, "zEff","matchedObject_Z","matchingObject_Z","z (cm)","Efficiency",effHistoTitle_) ;
67  }
68 
69  remove(iBooker,iGetter, "matchedObject_Pt") ; // A.C.
70  remove(iBooker,iGetter, "matchedObject_Eta") ;
71 // remove(iBooker,iGetter, "matchedObject_AbsEta") ;
72  remove(iBooker,iGetter, "matchedObject_Phi") ;
73 // remove(iBooker,iGetter, "matchedObject_Z") ;
74 
75  remove(iBooker,iGetter, "matchingObject_Pt") ;
76  remove(iBooker,iGetter, "matchingObject_Eta") ;
77 // remove(iBooker,iGetter, "matchingObject_AbsEta") ;/**/ //A.C.
78  remove(iBooker, iGetter, "matchingObject_Phi") ;
79 // remove(iBooker,iGetter, "matchingObject_Z") ;
80  }
MonitorElement * bookH1andDivide(DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="")

Member Data Documentation

std::string ElectronOfflineClient::effHistoTitle_
private

Definition at line 17 of file ElectronOfflineClient.h.

Referenced by ElectronOfflineClient(), and finalize().