ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HbbAnalysis/src/HistosBase.cc
Revision: 1.1.1.1 (vendor branch)
Committed: Wed Apr 15 10:24:16 2009 UTC (16 years ago) by amagnan
Content type: text/plain
Branch: v00-00-00
CVS Tags: HbbAnaFor22X
Changes since 1.1: +0 -0 lines
Log Message:
Imported sources

File Contents

# User Rev Content
1 amagnan 1.1 #include <iostream>
2     #include <fstream>
3    
4     #include "UserCode/HbbAnalysis/interface/HistosBase.hh"
5    
6     namespace HbbAnalysis {//namespace
7    
8     void HistosBase::CreateHistos(std::string aObj, TFileDirectory aDir){
9    
10     std::ostringstream lName;
11    
12     lName << "p_pT_" << aObj;
13     p_pT = aDir.make<TH1F>(lName.str().c_str(),";p_{T} (GeV); n_{entries}/GeV",200,0.,200.);
14     lName.str("");
15    
16     lName << "p_eta_" << aObj;
17     p_eta = aDir.make<TH1F>(lName.str().c_str(),";#eta;n_{entries}",80,-4,4);
18     lName.str("");
19    
20     lName << "p_phi_" << aObj;
21     p_phi = aDir.make<TH1F>(lName.str().c_str(),";#phi;n_{entries}",64,-3.2,3.2);
22     lName.str("");
23    
24     lName << "p_pTvseta_" << aObj;
25     p_pTvseta = aDir.make<TH2F>(lName.str().c_str(),";#eta;p_{T} (GeV)",80,-4,4,200,0,200);
26     lName.str("");
27    
28     lName << "p_pTvsphi_" << aObj;
29     p_pTvsphi = aDir.make<TH2F>(lName.str().c_str(),";#phi;p_{T} (GeV)",64,-3.2,3.2,200,0,200);
30     lName.str("");
31    
32     lName << "p_etavsphi_" << aObj;
33     p_etavsphi = aDir.make<TH2F>(lName.str().c_str(),";#phi;#eta",64,-3.2,3.2,80,-4,4);
34     lName.str("");
35    
36     }
37    
38     void HistosBase::FillBaseHistograms(double aPT, double aEta, double aPhi){//FillHistograms
39    
40     p_pT->Fill(aPT);
41     p_eta->Fill(aEta);
42     p_phi->Fill(aPhi);
43    
44     p_pTvseta->Fill(aEta,aPT);
45     p_pTvsphi->Fill(aPhi,aPT);
46     p_etavsphi->Fill(aPhi,aEta);
47    
48     }//FillHistograms
49    
50     }//namespace
51    
52