ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HbbAnalysis/src/HistosBase.cc
Revision: 1.6
Committed: Wed Jun 9 14:34:17 2010 UTC (14 years, 11 months ago) by amagnan
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +0 -0 lines
State: FILE REMOVED
Error occurred while calculating annotation data.
Log Message:
clean up histogram code, moved to analysis in UserCode/amagnan

File Contents

# Content
1 #include <iostream>
2 #include <fstream>
3 #include <sstream>
4
5 #include "UserCode/HbbAnalysis/interface/HistosBase.hh"
6
7 namespace HbbAnalysis {//namespace
8
9 HistosBase::HistosBase():
10 debug_(0)
11 {}
12
13 void HistosBase::CreateHistos(std::string & aObj, TFileDirectory & aDir, unsigned short aDebug){
14
15 debug_ = aDebug;
16
17 std::ostringstream lName;
18
19 lName << "p_pT";// << aObj;
20 p_pT = aDir.make<TH1F>(lName.str().c_str(),";p_{T} (GeV); n_{entries}/GeV",200,0.,200.);
21 lName.str("");
22
23 lName << "p_eta";// << aObj;
24 p_eta = aDir.make<TH1F>(lName.str().c_str(),";#eta;n_{entries}",80,-4,4);
25 lName.str("");
26
27 lName << "p_phi";// << aObj;
28 p_phi = aDir.make<TH1F>(lName.str().c_str(),";#phi;n_{entries}",64,-3.2,3.2);
29 lName.str("");
30
31 lName << "p_charge";// << aObj;
32 p_charge = aDir.make<TH1F>(lName.str().c_str(),";charge;n_{entries}",5,-2,3);
33 lName.str("");
34
35 lName << "p_pTvseta";//_" << aObj;
36 p_pTvseta = aDir.make<TH2F>(lName.str().c_str(),";#eta;p_{T} (GeV)",80,-4,4,200,0,200);
37 lName.str("");
38
39 lName << "p_pTvsphi";//_" << aObj;
40 p_pTvsphi = aDir.make<TH2F>(lName.str().c_str(),";#phi;p_{T} (GeV)",64,-3.2,3.2,200,0,200);
41 lName.str("");
42
43 lName << "p_etavsphi";//_" << aObj;
44 p_etavsphi = aDir.make<TH2F>(lName.str().c_str(),";#phi;#eta",64,-3.2,3.2,80,-4,4);
45 lName.str("");
46
47 }
48
49 void HistosBase::FillBaseHistograms(double aPT, double aEta, double aPhi, double aCharge){//FillHistograms
50
51 p_pT->Fill(aPT);
52 p_eta->Fill(aEta);
53 p_phi->Fill(aPhi);
54 p_charge->Fill(aCharge);
55
56 p_pTvseta->Fill(aEta,aPT);
57 p_pTvsphi->Fill(aPhi,aPT);
58 p_etavsphi->Fill(aPhi,aEta);
59
60 }//FillHistograms
61
62 }//namespace
63
64