ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HbbAnalysis/src/HistosBase.cc
(Generate patch)

Comparing UserCode/HbbAnalysis/src/HistosBase.cc (file contents):
Revision 1.1 by amagnan, Wed Apr 15 10:24:16 2009 UTC vs.
Revision 1.4 by amagnan, Mon Jun 1 13:57:48 2009 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines