ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HbbAnalysis/src/HistosMETBase.cc
Revision: 1.3
Committed: Wed Nov 4 13:59:18 2009 UTC (15 years, 6 months ago) by amagnan
Content type: text/plain
Branch: MAIN
CVS Tags: v00-05-00, HbbAnaFor35X, v00-04-02, v00-04-01, v00-04-00
Changes since 1.2: +2 -2 lines
Log Message:
bug in MET histos

File Contents

# Content
1 #include <iostream>
2 #include <fstream>
3
4 #include "UserCode/HbbAnalysis/interface/HistosMETBase.hh"
5
6 namespace HbbAnalysis {//namespace
7
8 void HistosMETBase::Initialise(TFileDirectory & aDir, std::string aName, bool aDoGenMatched){
9
10 p_MET = aDir.make<TH1F>("p_MET",";MET (GeV.c^{-1});N_{entries}",200,0,200);
11 p_MEx = aDir.make<TH1F>("p_MEx",";MEX (GeV.c^{-1});N_{entries}",200,-100,100);
12 p_MEy = aDir.make<TH1F>("p_MEy",";MEY (GeV.c^{-1});N_{entries}",200,-100,100);
13 p_SumET = aDir.make<TH1F>("p_SumET",";SumET (GeV.c^{-1});N_{entries}",500,0,1000);
14 p_phi = aDir.make<TH1F>("p_phi",";#phi;N_{entries}",64,-3.2,3.2);
15 p_mEtSig = aDir.make<TH1F>("p_mEtSig",";MET/#sigma_{MET};N_{entries}",100,0,10);
16
17 p_genMET_MET = aDir.make<TH1F>("p_genMET_MET",";MET (GeV.c^{-1});N_{entries}",200,0,200);
18 p_genMET_MEx = aDir.make<TH1F>("p_genMET_MEx",";MEX (GeV.c^{-1});N_{entries}",200,-100,100);
19 p_genMET_MEy = aDir.make<TH1F>("p_genMET_MEy",";MEY (GeV.c^{-1});N_{entries}",200,-100,100);
20 p_genMET_SumET = aDir.make<TH1F>("p_genMET_SumET",";SumET (GeV.c^{-1});N_{entries}",500,0,1000);
21 p_genMET_phi = aDir.make<TH1F>("p_genMET_phi",";#phi;N_{entries}",64,-3.2,3.2);
22 p_genMET_mEtSig = aDir.make<TH1F>("p_genMET_mEtSig",";MET/#sigma_{MET};N_{entries}",100,0,10);
23
24 p_RecoOverGen_MET = aDir.make<TH1F>("p_RecoOverGen_MET",";MET^{reco}/MET^{gen};N_{entries}",500,0,100);
25 p_RecoOverGen_MEx = aDir.make<TH1F>("p_RecoOverGen_MEx",";MEx^{reco}/MEx^{gen};N_{entries}",500,-50,50);
26 p_RecoOverGen_MEy = aDir.make<TH1F>("p_RecoOverGen_MEy",";MEy^{reco}/MEy^{gen};N_{entries}",500,-50,50);
27 p_RecoOverGen_SumET = aDir.make<TH1F>("p_RecoOverGen_SumET",";SumET^{reco}/SumET^{gen};N_{entries}",500,0,5);
28
29 }
30
31 void HistosMETBase::FillEventHistograms(const HbbAnalysis::Met & aMet)
32 {
33 p_MET->Fill(aMet.recoVars().mET);
34 p_MEx->Fill(aMet.recoVars().mEx);
35 p_MEy->Fill(aMet.recoVars().mEy);
36 p_SumET->Fill(aMet.recoVars().sumET);
37 p_phi->Fill(aMet.recoVars().phi);
38 p_mEtSig->Fill(aMet.recoVars().mEtSig);
39
40 if (aMet.genVars().mET > 0){
41 p_genMET_MET->Fill(aMet.genVars().mET);
42 p_genMET_MEx->Fill(aMet.genVars().mEx);
43 p_genMET_MEy->Fill(aMet.genVars().mEy);
44 p_genMET_SumET->Fill(aMet.genVars().sumET);
45 p_genMET_phi->Fill(aMet.genVars().phi);
46 p_genMET_mEtSig->Fill(aMet.genVars().mEtSig);
47
48 if (aMet.genVars().mET) p_RecoOverGen_MET->Fill(aMet.recoVars().mET/aMet.genVars().mET);
49 if (aMet.genVars().mEx) p_RecoOverGen_MEx->Fill(aMet.recoVars().mEx/aMet.genVars().mEx);
50 if (aMet.genVars().mEy) p_RecoOverGen_MEy->Fill(aMet.recoVars().mEy/aMet.genVars().mEy);
51 if (aMet.genVars().sumET) p_RecoOverGen_SumET->Fill(aMet.recoVars().sumET/aMet.genVars().sumET);
52 }
53
54
55 }
56
57 }//namespace
58
59