#include <PFMETMonitor.h>
Public Member Functions | |
void | fillOne (const reco::MET &met, const reco::MET &matchedMet, float &minVal, float &maxVal) |
PFMETMonitor (Benchmark::Mode mode=Benchmark::DEFAULT) | |
void | setDirectory (TDirectory *dir) |
set directory (to use in ROOT) | |
void | setParameters (const edm::ParameterSet ¶meterSet) |
set the parameters | |
void | setup (const edm::ParameterSet ¶meterSet) |
book histograms | |
void | setup () |
book histograms | |
virtual | ~PFMETMonitor () |
Protected Attributes | |
CandidateBenchmark | candBench_ |
bool | createMETSpecificHistos_ |
TH1F * | delta_ex_ |
TH2F * | delta_ex_VS_set_ |
TH2F * | delta_set_Over_set_VS_set_ |
TH2F * | delta_set_VS_set_ |
bool | histogramBooked_ |
MatchCandidateBenchmark | matchCandBench_ |
TH1F * | px_ |
TH1F * | sumEt_ |
std::vector< double > | variablePtBins_ |
Definition at line 11 of file PFMETMonitor.h.
PFMETMonitor::PFMETMonitor | ( | Benchmark::Mode | mode = Benchmark::DEFAULT | ) | [inline] |
Definition at line 15 of file PFMETMonitor.h.
: Benchmark(mode), candBench_(mode), matchCandBench_(mode) {}
PFMETMonitor::~PFMETMonitor | ( | ) | [virtual] |
Definition at line 12 of file PFMETMonitor.cc.
{}
void PFMETMonitor::fillOne | ( | const reco::MET & | met, |
const reco::MET & | matchedMet, | ||
float & | minVal, | ||
float & | maxVal | ||
) |
Definition at line 152 of file PFMETMonitor.cc.
References candBench_, createMETSpecificHistos_, delta_ex_, delta_ex_VS_set_, delta_set_Over_set_VS_set_, delta_set_VS_set_, reco::LeafCandidate::eta(), MatchCandidateBenchmark::fillOne(), CandidateBenchmark::fillOne(), Benchmark::isInRange(), matchCandBench_, reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), reco::LeafCandidate::px(), px_, reco::LeafCandidate::py(), reco::MET::sumEt(), and sumEt_.
Referenced by PFMETDQMAnalyzer::analyze().
{ candBench_.fillOne(met); matchCandBench_.fillOne(met, matchedMet); if (createMETSpecificHistos_) { if( !isInRange(met.pt(), met.eta(), met.phi() ) ) return; if (px_) px_->Fill(met.px()); if (delta_ex_) { delta_ex_->Fill(met.px()-matchedMet.px()); delta_ex_->Fill(met.py()-matchedMet.py()); } if (sumEt_) sumEt_->Fill( met.sumEt()); if (delta_ex_VS_set_) { delta_ex_VS_set_->Fill(matchedMet.sumEt(), met.px()-matchedMet.px()); delta_ex_VS_set_->Fill(matchedMet.sumEt(), met.py()-matchedMet.py()); } if (delta_set_VS_set_) delta_set_VS_set_->Fill(matchedMet.sumEt(),met.sumEt()-matchedMet.sumEt()); if (delta_set_Over_set_VS_set_ && matchedMet.sumEt()>0.001 ) { float setRes = (met.sumEt() - matchedMet.sumEt())/matchedMet.sumEt(); if (setRes > maxVal) maxVal = setRes; if (setRes < minVal) minVal = setRes; delta_set_Over_set_VS_set_->Fill(matchedMet.sumEt(),setRes); } } }
void PFMETMonitor::setDirectory | ( | TDirectory * | dir | ) | [virtual] |
set directory (to use in ROOT)
Reimplemented from Benchmark.
Definition at line 145 of file PFMETMonitor.cc.
References candBench_, matchCandBench_, and Benchmark::setDirectory().
void PFMETMonitor::setParameters | ( | const edm::ParameterSet & | parameterSet | ) |
set the parameters
Definition at line 15 of file PFMETMonitor.cc.
References candBench_, createMETSpecificHistos_, delta_ex_, delta_ex_VS_set_, delta_set_Over_set_VS_set_, delta_set_VS_set_, edm::ParameterSet::getParameter(), matchCandBench_, Benchmark::mode_, px_, Benchmark::setParameters(), Benchmark::setRange(), sumEt_, and variablePtBins_.
Referenced by PFMETDQMAnalyzer::PFMETDQMAnalyzer().
{ mode_ = (Benchmark::Mode) parameterSet.getParameter<int>( "mode" ); variablePtBins_ = parameterSet.getParameter< std::vector<double> >( "VariablePtBins" ); createMETSpecificHistos_ = parameterSet.getParameter<bool>( "CreateMETSpecificHistos" ); setRange( parameterSet.getParameter<double>("ptMin"), parameterSet.getParameter<double>("ptMax"), parameterSet.getParameter<double>("etaMin"), parameterSet.getParameter<double>("etaMax"), parameterSet.getParameter<double>("phiMin"), parameterSet.getParameter<double>("phiMax") ); candBench_.setParameters(mode_); matchCandBench_.setParameters(mode_); px_ = 0; sumEt_ = 0; delta_ex_ = 0; delta_ex_VS_set_ = 0; delta_set_VS_set_ = 0; delta_set_Over_set_VS_set_ = 0; }
void PFMETMonitor::setup | ( | void | ) |
book histograms
Definition at line 39 of file PFMETMonitor.cc.
References Benchmark::book1D(), Benchmark::book2D(), candBench_, createMETSpecificHistos_, delta_ex_, delta_ex_VS_set_, delta_set_Over_set_VS_set_, delta_set_VS_set_, i, Benchmark::PhaseSpace::m, Benchmark::PhaseSpace::M, matchCandBench_, Benchmark::PhaseSpace::n, jptDQMConfig_cff::ptBins, px_, MatchCandidateBenchmark::setup(), CandidateBenchmark::setup(), sumEt_, and variablePtBins_.
Referenced by PFMETDQMAnalyzer::beginJob().
{ candBench_.setup(); matchCandBench_.setup(); if (createMETSpecificHistos_) { float* ptBins = new float[variablePtBins_.size()]; for (size_t i = 0; i < variablePtBins_.size(); i++) { ptBins[i] = variablePtBins_[i]; } PhaseSpace pxPS = PhaseSpace( 50, 0, 200); PhaseSpace dpxPS = PhaseSpace( 50, -500, 500); PhaseSpace dptPS = PhaseSpace( 200, -500, 500); PhaseSpace setPS = PhaseSpace( 50, 0.0, 3000); PhaseSpace dsetPS = PhaseSpace( 50, -1000.0, 1000); PhaseSpace setOvsetPS = PhaseSpace( 100,0., 2.); px_ = book1D("px_", "px_;p_{X} (GeV)", pxPS.n, pxPS.m, pxPS.M); sumEt_ = book1D("sumEt_", "sumEt_;#sumE_{T}", setPS.n, setPS.m, setPS.M); delta_ex_ = book1D("delta_ex_", "#DeltaME_{X}", dpxPS.n, dpxPS.m, dpxPS.M); delta_ex_VS_set_ = book2D("delta_ex_VS_set_", ";SE_{T, true} (GeV);#DeltaE_{X}", setPS.n, setPS.m, setPS.M, dpxPS.n, dpxPS.m, dpxPS.M ); delta_set_VS_set_ = book2D("delta_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}", setPS.n, setPS.m, setPS.M, dsetPS.n, dsetPS.m, dsetPS.M ); delta_set_Over_set_VS_set_ = book2D("delta_set_Over_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}/SE_{T}", setPS.n, setPS.m, setPS.M, setOvsetPS.n, setOvsetPS.m, setOvsetPS.M ); } }
void PFMETMonitor::setup | ( | const edm::ParameterSet & | parameterSet | ) |
book histograms
Definition at line 76 of file PFMETMonitor.cc.
References Benchmark::book1D(), Benchmark::book2D(), candBench_, createMETSpecificHistos_, delta_ex_, delta_ex_VS_set_, delta_set_Over_set_VS_set_, delta_set_VS_set_, edm::ParameterSet::getParameter(), i, matchCandBench_, jptDQMConfig_cff::ptBins, px_, MatchCandidateBenchmark::setup(), CandidateBenchmark::setup(), sumEt_, and variablePtBins_.
{ candBench_.setup(parameterSet); matchCandBench_.setup(parameterSet); if (createMETSpecificHistos_) { float* ptBins = new float[variablePtBins_.size()]; for (size_t i = 0; i < variablePtBins_.size(); i++) { ptBins[i] = variablePtBins_[i]; } edm::ParameterSet pxPS = parameterSet.getParameter<edm::ParameterSet>("DeltaPxHistoParameter"); edm::ParameterSet dpxPS = parameterSet.getParameter<edm::ParameterSet>("DeltaPxHistoParameter"); edm::ParameterSet dptPS = parameterSet.getParameter<edm::ParameterSet>("DeltaPtHistoParameter"); edm::ParameterSet setPS = parameterSet.getParameter<edm::ParameterSet>("SumEtHistoParameter"); edm::ParameterSet dsetPS = parameterSet.getParameter<edm::ParameterSet>("DeltaSumEtHistoParameter"); edm::ParameterSet setOvsetPS = parameterSet.getParameter<edm::ParameterSet>("DeltaSumEtOvSumEtHistoParameter"); if (pxPS.getParameter<bool>("switchOn")) { px_ = book1D("px_", "px_;p_{X} (GeV)", pxPS.getParameter<int32_t>("nBin"), pxPS.getParameter<double>("xMin"), pxPS.getParameter<double>("xMax")); } if (setPS.getParameter<bool>("switchOn")) { sumEt_ = book1D("sumEt_", "sumEt_;#sumE_{T}", setPS.getParameter<int32_t>("nBin"), setPS.getParameter<double>("xMin"), setPS.getParameter<double>("xMax")); } if (dpxPS.getParameter<bool>("switchOn")) { delta_ex_ = book1D("delta_ex_", "#DeltaME_{X}", dpxPS.getParameter<int32_t>("nBin"), dpxPS.getParameter<double>("xMin"), dpxPS.getParameter<double>("xMax")); } if (dpxPS.getParameter<bool>("switchOn")) { delta_ex_VS_set_ = book2D("delta_ex_VS_set_", ";SE_{T, true} (GeV);#DeltaE_{X}", setPS.getParameter<int32_t>("nBin"), setPS.getParameter<double>("xMin"), setPS.getParameter<double>("xMax"), dptPS.getParameter<int32_t>("nBin"), dptPS.getParameter<double>("xMin"), dptPS.getParameter<double>("xMax")); } if (dsetPS.getParameter<bool>("switchOn")) { delta_set_VS_set_ = book2D("delta_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}", setPS.getParameter<int32_t>("nBin"), setPS.getParameter<double>("xMin"), setPS.getParameter<double>("xMax"), dsetPS.getParameter<int32_t>("nBin"), dsetPS.getParameter<double>("xMin"), dsetPS.getParameter<double>("xMax")); } if (setOvsetPS.getParameter<bool>("switchOn")) { delta_set_Over_set_VS_set_ = book2D("delta_set_Over_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}/SE_{T}", setPS.getParameter<int32_t>("nBin"), setPS.getParameter<double>("xMin"), setPS.getParameter<double>("xMax"), setOvsetPS.getParameter<int32_t>("nBin"), setOvsetPS.getParameter<double>("xMin"), setOvsetPS.getParameter<double>("xMax")); } } }
CandidateBenchmark PFMETMonitor::candBench_ [protected] |
Definition at line 47 of file PFMETMonitor.h.
Referenced by fillOne(), setDirectory(), setParameters(), and setup().
bool PFMETMonitor::createMETSpecificHistos_ [protected] |
Definition at line 50 of file PFMETMonitor.h.
Referenced by fillOne(), setParameters(), and setup().
TH1F* PFMETMonitor::delta_ex_ [protected] |
Definition at line 40 of file PFMETMonitor.h.
Referenced by fillOne(), setParameters(), and setup().
TH2F* PFMETMonitor::delta_ex_VS_set_ [protected] |
Definition at line 41 of file PFMETMonitor.h.
Referenced by fillOne(), setParameters(), and setup().
TH2F* PFMETMonitor::delta_set_Over_set_VS_set_ [protected] |
Definition at line 43 of file PFMETMonitor.h.
Referenced by fillOne(), setParameters(), and setup().
TH2F* PFMETMonitor::delta_set_VS_set_ [protected] |
Definition at line 42 of file PFMETMonitor.h.
Referenced by fillOne(), setParameters(), and setup().
bool PFMETMonitor::histogramBooked_ [protected] |
Definition at line 51 of file PFMETMonitor.h.
MatchCandidateBenchmark PFMETMonitor::matchCandBench_ [protected] |
Definition at line 48 of file PFMETMonitor.h.
Referenced by fillOne(), setDirectory(), setParameters(), and setup().
TH1F* PFMETMonitor::px_ [protected] |
Definition at line 38 of file PFMETMonitor.h.
Referenced by fillOne(), setParameters(), and setup().
TH1F* PFMETMonitor::sumEt_ [protected] |
Definition at line 39 of file PFMETMonitor.h.
Referenced by fillOne(), setParameters(), and setup().
std::vector<double> PFMETMonitor::variablePtBins_ [protected] |
Definition at line 45 of file PFMETMonitor.h.
Referenced by setParameters(), and setup().