-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 77751 b: "refs/heads/CMSSW_7_1_X" c: c9bd21f h: "refs/heads/CMSSW_7_1_X" i: 77749: 50e83cb 77747: 868e9aa 77743: 52284be v: v3
- Loading branch information
Florent Sylvain Lacroix
committed
Nov 12, 2009
1 parent
6e800a0
commit 3d595dc
Showing
3 changed files
with
156 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--- | ||
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e | ||
"refs/heads/CMSSW_7_1_X": e4cd4e5081bd6fae2370f1dae9fc58586828ef39 | ||
"refs/heads/CMSSW_7_1_X": c9bd21f0ac70a7da6b892874d6bbb5f14a5f8764 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#ifndef RecoParticleFlow_Benchmark_MatchMETBenchmark_h | ||
#define RecoParticleFlow_Benchmark_MatchMETBenchmark_h | ||
|
||
#include "DQMOffline/PFTau/interface/Benchmark.h" | ||
|
||
#include "DataFormats/Candidate/interface/CandidateFwd.h" | ||
#include "DataFormats/Candidate/interface/Candidate.h" | ||
|
||
#include "DataFormats/METReco/interface/METFwd.h" | ||
|
||
#include <vector> | ||
|
||
class MatchMETBenchmark : public Benchmark { | ||
|
||
public: | ||
|
||
MatchMETBenchmark(Mode mode) : Benchmark(mode) {} | ||
virtual ~MatchMETBenchmark(); | ||
|
||
/// book histograms | ||
void setup(); | ||
|
||
/// fill histograms with a given particle | ||
void fillOne( const reco::MET& candidate, | ||
const reco::MET& matchedCandidate ); | ||
|
||
|
||
protected: | ||
|
||
TH2F* delta_et_Over_et_VS_et_; | ||
TH2F* delta_et_VS_et_; | ||
TH2F* delta_phi_VS_et_; | ||
TH1F* delta_ex_; | ||
TH2F* RecEt_VS_TrueEt_; | ||
TH2F* delta_set_VS_set_; | ||
TH2F* delta_set_Over_set_VS_set_; | ||
TH2F* delta_ex_VS_set_; | ||
TH2F* RecSet_Over_TrueSet_VS_TrueSet_; | ||
|
||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
#include "DQMOffline/PFTau/interface/MatchMETBenchmark.h" | ||
#include "DataFormats/METReco/interface/MET.h" | ||
#include "DataFormats/Candidate/interface/Candidate.h" | ||
|
||
// #include "DQMServices/Core/interface/MonitorElement.h" | ||
// #include "DQMServices/Core/interface/DQMStore.h" | ||
|
||
#include <TROOT.h> | ||
#include <TFile.h> | ||
#include <TH1.h> | ||
#include <TH2.h> | ||
|
||
using namespace std; | ||
|
||
MatchMETBenchmark::~MatchMETBenchmark() {} | ||
|
||
void MatchMETBenchmark::setup() { | ||
|
||
PhaseSpace ptPS; | ||
PhaseSpace dptOvptPS; | ||
PhaseSpace dptPS; | ||
PhaseSpace dphiPS; | ||
PhaseSpace setPS; | ||
PhaseSpace dsetPS; | ||
PhaseSpace setOvsetPS; | ||
|
||
switch(mode_) { | ||
case VALIDATION: | ||
ptPS = PhaseSpace(100,0,1000); | ||
dptOvptPS = PhaseSpace( 200, -1, 1); | ||
dphiPS = PhaseSpace( 100, -3.2, 3.2); | ||
dptPS = PhaseSpace( 100, -500, 500); | ||
setPS = PhaseSpace( 300, 0.0, 3000); | ||
dsetPS = PhaseSpace( 300, 0.-1000, 1000); | ||
setOvsetPS = PhaseSpace( 500,0., 2.); | ||
break; | ||
case DQMOFFLINE: | ||
default: | ||
ptPS = PhaseSpace(50,0,200); | ||
dptOvptPS = PhaseSpace( 50, -1, 1); | ||
dphiPS = PhaseSpace( 50, -3.2, 3.2); | ||
dptPS = PhaseSpace( 50, -500, 500); | ||
setPS = PhaseSpace( 50, 0.0, 3000); | ||
dsetPS = PhaseSpace( 50, -1000.0, 1000); | ||
setOvsetPS = PhaseSpace( 100,0., 2.); | ||
break; | ||
} | ||
|
||
//float ptBins[11] = {0, 1, 2, 5, 10, 20, 50, 100, 200, 400, 1000}; | ||
|
||
delta_et_Over_et_VS_et_ = book2D("delta_et_Over_et_VS_et_", | ||
";ME_{T, true} (GeV);#DeltaME_{T}/ME_{T}", | ||
ptPS.n, ptPS.m, ptPS.M, | ||
dptOvptPS.n, dptOvptPS.m, dptOvptPS.M ); | ||
|
||
delta_et_VS_et_ = book2D("delta_et_VS_et_", | ||
";ME_{T, true} (GeV);#DeltaME_{T}", | ||
ptPS.n, ptPS.m, ptPS.M, | ||
dptPS.n, dptPS.m, dptPS.M ); | ||
|
||
delta_phi_VS_et_ = book2D("delta_phi_VS_et_", | ||
";ME_{T, true} (GeV);#Delta#phi", | ||
ptPS.n, ptPS.m, ptPS.M, | ||
dphiPS.n, dphiPS.m, dphiPS.M ); | ||
|
||
delta_ex_ = book1D("delta_ex_", | ||
"#DeltaME_{X}", | ||
ptPS.n, -ptPS.M, ptPS.M ); | ||
|
||
RecEt_VS_TrueEt_ = book2D("RecEt_VS_TrueEt_", | ||
";ME_{T, true} (GeV);ME_{T}", | ||
ptPS.n, ptPS.m, ptPS.M, | ||
ptPS.n, ptPS.m, ptPS.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, | ||
dptOvptPS.n, dptOvptPS.m, dptOvptPS.M ); | ||
|
||
delta_ex_VS_set_ = book2D("delta_ex_VS_set_", | ||
";SE_{T, true} (GeV);#DeltaE_{X}", | ||
setPS.n, setPS.m, setPS.M, | ||
ptPS.n, -ptPS.M, ptPS.M ); | ||
|
||
RecSet_Over_TrueSet_VS_TrueSet_ = book2D("RecSet_Over_TrueSet_VS_TrueSet_", | ||
";SE_{T, true} (GeV);SE_{T}/SE_{T}", | ||
setPS.n, setPS.m, setPS.M, | ||
setOvsetPS.n, setOvsetPS.m, setOvsetPS.M ); | ||
} | ||
|
||
void MatchMETBenchmark::fillOne(const reco::MET& cand, | ||
const reco::MET& matchedCand) { | ||
|
||
if( !isInRange(cand.pt(), cand.eta(), cand.phi() ) ) return; | ||
|
||
if ( matchedCand.pt()>0.001 ) delta_et_Over_et_VS_et_->Fill( matchedCand.pt(), (cand.pt() - matchedCand.pt())/matchedCand.pt() ); | ||
delta_et_VS_et_->Fill( matchedCand.pt(), cand.pt() - matchedCand.pt() ); | ||
delta_phi_VS_et_->Fill( matchedCand.pt(), cand.phi() - matchedCand.phi() ); | ||
delta_ex_->Fill(cand.px()-matchedCand.px()); | ||
delta_ex_->Fill(cand.py()-matchedCand.py()); | ||
RecEt_VS_TrueEt_->Fill(matchedCand.pt(),cand.pt()); | ||
delta_set_VS_set_->Fill(matchedCand.sumEt(),cand.sumEt()-matchedCand.sumEt()); | ||
if ( matchedCand.sumEt()>0.001 ) delta_set_Over_set_VS_set_->Fill(matchedCand.sumEt(),(cand.sumEt()-matchedCand.sumEt())/matchedCand.sumEt()); | ||
delta_ex_VS_set_->Fill(matchedCand.sumEt(),cand.px()-matchedCand.px()); | ||
delta_ex_VS_set_->Fill(matchedCand.sumEt(),cand.py()-matchedCand.py()); | ||
if ( matchedCand.sumEt()>0.001 ) RecSet_Over_TrueSet_VS_TrueSet_->Fill(matchedCand.sumEt(),cand.sumEt()/matchedCand.sumEt()); | ||
|
||
} |