ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/tschum/FWlite_Analysis/PlotTool.h
(Generate patch)

Comparing UserCode/tschum/FWlite_Analysis/PlotTool.h (file contents):
Revision 1.3 by thomsen, Wed Nov 18 14:53:42 2009 UTC vs.
Revision 1.16 by tschum, Fri Feb 12 15:21:17 2010 UTC

# Line 1 | Line 1
1   #ifndef PlotTool_h
2   #define PlotTool_h
3  
4 #ifndef ROOT_TClonesArray
4   #include "TClonesArray.h"
5 < #endif
6 <
7 < #include <string>
8 < #include <map>
9 < #include <iostream>
10 < #include <fstream>
11 < #include <sstream>
13 < #include <vector>
14 <
5 > #include "TFile.h"
6 > #include "TGraphAsymmErrors.h"
7 > #include "TF2.h"
8 > #include "TStopwatch.h"
9 > #include "TPostScript.h"
10 > #include "TLeafElement.h"
11 > #include "TMethod.h"
12   #include "TChain.h"
13   #include "TSystemDirectory.h"
14   #include "TList.h"
# Line 25 | Line 22
22   #include "TColor.h"
23   #include "TStyle.h"
24   #include "TROOT.h"
25 < #include "DataFormats/FWLite/interface/Handle.h"
26 < #include "DataFormats/FWLite/interface/Event.h"
27 < #if !defined(__CINT__) && !defined(__MAKECINT__)
28 < #include "DataFormats/PatCandidates/interface/Jet.h"
29 < #endif
30 < #include "DataFormats/Math/interface/deltaR.h"
31 < #include "TFile.h"
25 > #include "TSystem.h"
26 >
27 > #include <TLorentzVector.h>
28 >
29 > #include <string>
30 > #include <map>
31 > #include <iostream>
32 > #include <fstream>
33 > #include <sstream>
34 > #include <vector>
35 >
36 > #include "FWliteVariables.h"
37 >
38  
39   using namespace std;
40  
# Line 41 | Line 44 | class PlotTool : public TClonesArray {
44  
45   private:
46  
47 <  map< string, TCanvas* > canvases_;
48 <  map< string, TCanvas* > pads_;
47 >        map< string, TCanvas* > canvases_;
48 >        map< string, TCanvas* > pads_;
49  
50 <  void setCanvas(TCanvas* thisCanvas);
51 <  void setStats(TCanvas* thisCanvas, TPaveStats* thisStatsBox, TH1* thisHist, int counter);
52 <  void setColor(TH1* thisHist, int counter);
53 <  void setMathLabels(TH1* thisHist);
54 <  void setPalette(TCanvas* thisCanvas, TPaletteAxis* palette);
55 <  void setHistMax(TCanvas* thisCanvas, double maxEntry);
56 <  void setLegend(TCanvas* thisCanvas, TLegend* thisLeg, int counter);
57 <  void createColors();
50 >        void setCanvas(TCanvas* thisCanvas);
51 >        void setStats(TCanvas* thisCanvas, TPaveStats* thisStatsBox, TH1* thisHist,
52 >                        int counter);
53 >        void setColor(TH1* thisHist, int counter);
54 >        void setMathLabels(TH1* thisHist);
55 >        void setPalette(TCanvas* thisCanvas, TPaletteAxis* palette);
56 >        void setHistMax(TCanvas* thisCanvas, double maxEntry);
57 >        void setLegend(TCanvas* thisCanvas, TLegend* thisLeg, int counter);
58 >        void createColors();
59  
60   public:
61  
62 <  PlotTool();
63 <  ~PlotTool(){};
62 >        PlotTool();
63 >        ~PlotTool() {
64 >        }
65 >        ;
66 >
67 >        int init(string fileName = "",
68 >                        string dirPath = "/scratch/hh/current/cms/user/schum/",
69 >                        string treeName = "Events", string fileLabel="");
70 >
71 >        TH1* plot(int chainIndex, string histName, string cutName= "",
72 >                        int nEntries= -1, string bins = "" , string drwOpt = "");
73 >        int loop(vector<string> _histName, vector<string> _cutName,
74 >                        int nEntries= -1, string bins = "" , string drwOpt = "", bool correspond = false);
75 >        int loop(vector<string> _histName, string cutName= "", int nEntries= -1, string bins = "" ,
76 >                        string drwOpt = "");
77 >        int loop(string histName, vector<string> _cutName, int nEntries= -1, string bins = "" ,
78 >                        string drwOpt = "");
79 >        int loop(string histName, string cutName = "", int nEntries= -1, string bins = "" ,
80 >                        string drwOpt = "");
81 >
82 >
83 >        bool samePad_trees, samePad_vars, samePad_cuts, sameCanv_trees, sameCanv_vars, sameCanv_cuts;
84 >        
85 >        bool showLegend, logY, verbose, recreateTree, normHists;
86 >
87 >        vector<string> fileNames;  
88 >
89 >        string globalCuts, varBlockNames;
90  
91 +        int saveCanvases(string name="test",
92 +                        string path="/afs/naf.desy.de/group/cms/scratch/schum/");
93 +        int clearCanvases();
94 +        int updatePads();
95 +        int fillCanvases();
96  
97 <  int  init(string fileName = "", string dirPath = "/scratch/hh/current/cms/user/schum/", string treeName = "Events");
63 <  int  plot(int chainIndex, string histName, string cutName= "", int nEntries= -1, string drwOpt = "");
64 <  int  loop(vector<string> _histName, vector<string> _cutName, int nEntries= -1, string drwOpt = "", bool correspond = false);
65 <  int  loop(vector<string> _histName, string cutName= "", int nEntries= -1, string drwOpt = "");
66 <  int  loop(string histName, vector<string> _cutName, int nEntries= -1, string drwOpt = "");
67 <  int  loop(string histName, string cutName, int nEntries= -1, string drwOpt = "");
97 >        int setVariables(string label="");
98  
99 <  bool samePad_trees, samePad_vars, samePad_cuts, sameCanv_trees, sameCanv_vars, sameCanv_cuts;
70 <  bool showLegend, logY;
71 <  float*  TrackJetKT;
72 <  vector<string> fileNames;
99 >        vector<string> autoVars;
100  
74  int   saveCanvases(string type=".ps", string path="/afs/naf.desy.de/group/cms/scratch/schum/");
75  int  updatePads();
76  int  fillCanvases();
101  
102 +        ClassDef(PlotTool,4)
103  
79  ClassDef(PlotTool,4)
104  
105   };
106  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines