CMS 3D CMS Logo

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

#include <PhotonDataCertification.h>

Inheritance diagram for PhotonDataCertification:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
 PhotonDataCertification (const edm::ParameterSet &pset)
 
 ~PhotonDataCertification () 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 ()
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
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 endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) 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::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () 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
 
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
 
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

float invMassZtest (std::string path, TString name, DQMStore::IGetter &)
 

Private Attributes

edm::ParameterSet parameters_
 
MonitorElementreportSummary_
 
MonitorElementreportSummaryMap_
 
bool verbose_
 

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>
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)
 
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< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 43 of file PhotonDataCertification.h.

Constructor & Destructor Documentation

◆ PhotonDataCertification()

PhotonDataCertification::PhotonDataCertification ( const edm::ParameterSet pset)
explicit

Definition at line 21 of file PhotonDataCertification.cc.

23 {
24  parameters_ = pset;
25  verbose_ = parameters_.getParameter<bool>("verbose");
26 
27  if (verbose_)
28  cout << ">>> Constructor (PhotonDataCertification) <<<" << endl;
29 }

References gather_cfg::cout, and muonDTDigis_cfi::pset.

◆ ~PhotonDataCertification()

PhotonDataCertification::~PhotonDataCertification ( )
override

Definition at line 31 of file PhotonDataCertification.cc.

31 {}

Member Function Documentation

◆ dqmEndJob()

void PhotonDataCertification::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overridevirtual

Implements DQMEDHarvester.

Definition at line 34 of file PhotonDataCertification.cc.

34  {
35  using namespace RooFit;
36  if (verbose_)
37  std::cout << ">>> endJob (PhotonDataCertification) <<<" << std::endl;
38 
39  //booking histograms according to naming conventions
40  ibooker.setCurrentFolder("Egamma/EventInfo/");
41  reportSummary_ = ibooker.bookFloat("reportSummary");
42  reportSummaryMap_ = ibooker.book2D("reportSummaryMap", "reportSummaryMap", 3, 0, 3, 1, 0, 1);
43 
44  TH2F* reportSummaryMapTH2 = reportSummaryMap_->getTH2F();
45  reportSummaryMapTH2->GetXaxis()->SetBinLabel(1, "EB");
46  reportSummaryMapTH2->GetXaxis()->SetBinLabel(2, "EE");
47  reportSummaryMapTH2->GetXaxis()->SetBinLabel(3, "Total");
48  reportSummaryMapTH2->GetYaxis()->SetBinLabel(1, "InvMassTest");
49 
50  float EBResult = invMassZtest(
51  "Egamma/stdPhotonAnalyzer/InvMass/h_02_invMassIsoPhotonsEBarrel", "invMassIsolatedPhotonsEB", igetter);
52 
53  float EEResult = invMassZtest(
54  "Egamma/stdPhotonAnalyzer/InvMass/h_03_invMassIsoPhotonsEEndcap", "invMassIsolatedPhotonsEE", igetter);
55 
56  float AllResult = invMassZtest(
57  "Egamma/stdPhotonAnalyzer/InvMass/h_01_invMassAllIsolatedPhotons", "invMassAllIsolatedPhotons", igetter);
58 
59  if (verbose_) {
60  std::cout << "EBResult: " << EBResult << std::endl;
61  std::cout << "EEResult: " << EEResult << std::endl;
62  std::cout << "AllResult: " << AllResult << std::endl;
63  }
64 
65  reportSummaryMapTH2->SetBinContent(1, 1, EBResult);
66  reportSummaryMapTH2->SetBinContent(2, 1, EEResult);
67  reportSummaryMapTH2->SetBinContent(3, 1, AllResult);
68  reportSummary_->Fill(AllResult);
69 }

References dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookFloat(), gather_cfg::cout, dqm::legacy::MonitorElement::getTH2F(), and dqm::implementation::NavigatorBase::setCurrentFolder().

◆ invMassZtest()

float PhotonDataCertification::invMassZtest ( std::string  path,
TString  name,
DQMStore::IGetter  
)
private

Definition at line 71 of file PhotonDataCertification.cc.

71  {
72  float ZMass = 91.2;
73  float ZWidth = 2.5;
74  MonitorElement* TestElem = nullptr;
75  TestElem = igetter.get(path);
76  if (TestElem == nullptr)
77  return 0;
78  TH1F* TestHist = TestElem->getTH1F();
79  if (TestHist == nullptr)
80  return 0;
81  RooMsgService::instance().setGlobalKillBelow(RooFit::WARNING);
82  RooRealVar mass("mass", "Mass_{2#gamma}", 0, 200, "GeV");
83  RooRealVar mRes("M_{Z}", "Z Mass", ZMass, 70, 110);
84  RooRealVar gamma("#Gamma", "#Gamma", ZWidth, 0, 10.0);
85  RooBreitWigner BreitWigner("BreitWigner", "Breit-Wigner", mass, mRes, gamma);
86  RooDataHist test(name, name, mass, TestHist);
87 
88  BreitWigner.fitTo(test, RooFit::Range(80, 100), RooFit::PrintLevel(-1000));
89 
90  if (std::abs(mRes.getValV() - ZMass) < ZWidth) {
91  return 1.0;
92  } else if (std::abs(mRes.getValV() - ZMass) < gamma.getValV()) {
93  return 0.9;
94  } else {
95  return 0.0;
96  }
97 }

References funct::abs(), CustomPhysics_cfi::gamma, dqm::implementation::IGetter::get(), dqm::legacy::MonitorElement::getTH1F(), instance, EgHLTOffHistBins_cfi::mass, Skims_PA_cff::name, castor_dqm_sourceclient_file_cfg::path, ctpps_dqm_sourceclient-live_cfg::test, remoteMonitoring_LED_IterMethod_cfg::WARNING, and ExhumeParameters_cfi::ZMass.

Member Data Documentation

◆ parameters_

edm::ParameterSet PhotonDataCertification::parameters_
private

◆ reportSummary_

MonitorElement* PhotonDataCertification::reportSummary_
private

Definition at line 54 of file PhotonDataCertification.h.

◆ reportSummaryMap_

MonitorElement* PhotonDataCertification::reportSummaryMap_
private

Definition at line 55 of file PhotonDataCertification.h.

◆ verbose_

bool PhotonDataCertification::verbose_
private

Definition at line 53 of file PhotonDataCertification.h.

PhotonDataCertification::reportSummary_
MonitorElement * reportSummary_
Definition: PhotonDataCertification.h:54
PhotonDataCertification::invMassZtest
float invMassZtest(std::string path, TString name, DQMStore::IGetter &)
Definition: PhotonDataCertification.cc:71
Range
PixelRecoRange< float > Range
Definition: PixelTripletHLTGenerator.cc:31
gather_cfg.cout
cout
Definition: gather_cfg.py:144
CustomPhysics_cfi.gamma
gamma
Definition: CustomPhysics_cfi.py:17
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
dqm::legacy::MonitorElement::getTH1F
virtual TH1F * getTH1F() const
Definition: MonitorElement.h:478
test
Definition: SmallWORMDict.h:13
ctpps_dqm_sourceclient-live_cfg.test
test
Definition: ctpps_dqm_sourceclient-live_cfg.py:7
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
remoteMonitoring_LED_IterMethod_cfg.WARNING
WARNING
Definition: remoteMonitoring_LED_IterMethod_cfg.py:427
PhotonDataCertification::reportSummaryMap_
MonitorElement * reportSummaryMap_
Definition: PhotonDataCertification.h:55
instance
static PFTauRenderPlugin instance
Definition: PFTauRenderPlugin.cc:70
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
PhotonDataCertification::parameters_
edm::ParameterSet parameters_
Definition: PhotonDataCertification.h:51
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ExhumeParameters_cfi.ZMass
ZMass
Definition: ExhumeParameters_cfi.py:20
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
PhotonDataCertification::verbose_
bool verbose_
Definition: PhotonDataCertification.h:53
dqm::legacy::MonitorElement::getTH2F
virtual TH2F * getTH2F() const
Definition: MonitorElement.h:490