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.2 by tschum, Fri Nov 13 15:41:42 2009 UTC vs.
Revision 1.12 by thomsen, Wed Dec 16 16:33:28 2009 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 24 | Line 21
21   #include "TLegendEntry.h"
22   #include "TColor.h"
23   #include "TStyle.h"
24 < #include "TROOT.h"
24 > #include "TROOT.h"
25 > #include "TSystem.h"
26 > #include "DataFormats/FWLite/interface/Handle.h"
27 > #include "DataFormats/FWLite/interface/Event.h"
28 > #if !defined(__CINT__) && !defined(__MAKECINT__)
29 > #include "DataFormats/PatCandidates/interface/Jet.h"
30 > #include <DataFormats/DetId/interface/DetId.h>
31 > #include <DataFormats/CaloRecHit/interface/CaloCluster.h>
32 > #include <DataFormats/CaloTowers/interface/CaloTower.h>
33 > #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h"
34 > #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
35 > #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetup.h"
36 > #include "DataFormats/Math/interface/deltaR.h"
37 > #endif
38 > #include <TLorentzVector.h>
39 >
40 > #include <string>
41 > #include <map>
42 > #include <iostream>
43 > #include <fstream>
44 > #include <sstream>
45 > #include <vector>
46 >
47  
48   using namespace std;
49  
# Line 34 | Line 53 | class PlotTool : public TClonesArray {
53  
54   private:
55  
56 <  map< string, TCanvas* > canvases_;
57 <  map< string, TCanvas* > pads_;
56 >        map< string, TCanvas* > canvases_;
57 >        map< string, TCanvas* > pads_;
58  
59 <  void setCanvas(TCanvas* thisCanvas);
60 <  void setStats(TCanvas* thisCanvas, TPaveStats* thisStatsBox, TH1* thisHist, int counter);
61 <  void setColor(TH1* thisHist, int counter);
62 <  void setMathLabels(TH1* thisHist);
63 <  void setPalette(TCanvas* thisCanvas, TPaletteAxis* palette);
64 <  void setHistMax(TCanvas* thisCanvas, double maxEntry);
65 <  void setLegend(TCanvas* thisCanvas, TLegend* thisLeg, int counter);
66 <  void createColors();
59 >        void setCanvas(TCanvas* thisCanvas);
60 >        void setStats(TCanvas* thisCanvas, TPaveStats* thisStatsBox, TH1* thisHist,
61 >                        int counter);
62 >        void setColor(TH1* thisHist, int counter);
63 >        void setMathLabels(TH1* thisHist);
64 >        void setPalette(TCanvas* thisCanvas, TPaletteAxis* palette);
65 >        void setHistMax(TCanvas* thisCanvas, double maxEntry);
66 >        void setLegend(TCanvas* thisCanvas, TLegend* thisLeg, int counter);
67 >        void createColors();
68  
69   public:
70  
71 <  PlotTool();
72 <  ~PlotTool(){};
73 <
71 >        PlotTool();
72 >        ~PlotTool() {
73 >        }
74 >        ;
75 >
76 >        int init(string fileName = "",
77 >                        string dirPath = "/scratch/hh/current/cms/user/schum/",
78 >                        string treeName = "Events", string fileLabel="");
79 >        int plot(int chainIndex, string histName, string cutName= "",
80 >                        int nEntries= -1, string drwOpt = "");
81 >        int loop(vector<string> _histName, vector<string> _cutName,
82 >                        int nEntries= -1, string drwOpt = "", bool correspond = false);
83 >        int loop(vector<string> _histName, string cutName= "", int nEntries= -1,
84 >                        string drwOpt = "");
85 >        int loop(string histName, vector<string> _cutName, int nEntries= -1,
86 >                        string drwOpt = "");
87 >        int loop(string histName, string cutName = "", int nEntries= -1,
88 >                        string drwOpt = "");
89 >
90 >        int  plotEff(int chainIndex, string histName, string cutName, int nEntries, double fitXmin = 30, double fitXmax = 130, string fitFormula="expo");
91 >
92 >        bool samePad_trees, samePad_vars, samePad_cuts, sameCanv_trees,
93 >                        sameCanv_vars, sameCanv_cuts;
94 >        bool showLegend, logY, addTrackJets, addHitDetInfo, diTrackMass, addTrigger, verbose, addEventInfo, addTower, recreateTree ;
95 >        float *TrackJetKT, *TrackDetE, *TrackDetEECAL, * towet, * toweta, * towphi, * towen, * towem, * towhd, * towoe;
96 >        vector<string> fileNames;  
97 >
98 >        string globalCuts;
99 >        int* towid_phi, *towid_eta, *towid;
100 >
101 >        int saveCanvases(string name="test",
102 >                        string path="/afs/naf.desy.de/group/cms/scratch/schum/");
103 >        int clearCanvases();
104 >        int updatePads();
105 >        int fillCanvases();
106  
107 <  int  init(string fileName = "", string dirPath = "/scratch/hh/current/cms/user/schum/", string treeName = "Events");
56 <  int  plot(int chainIndex, string histName, string cutName= "", int nEntries= -1, string drwOpt = "");
57 <  int  loop(vector<string> _histName, vector<string> _cutName, int nEntries= -1, string drwOpt = "", bool correspond = false);
58 <  int  loop(vector<string> _histName, string cutName= "", int nEntries= -1, string drwOpt = "");
59 <  int  loop(string histName, vector<string> _cutName, int nEntries= -1, string drwOpt = "");
60 <  int  loop(string histName, string cutName, int nEntries= -1, string drwOpt = "");
107 >        int setVariables(string label="");
108  
109 <  bool samePad_trees, samePad_vars, samePad_cuts, sameCanv_trees, sameCanv_vars, sameCanv_cuts;
63 <  bool showLegend, logY;
109 >        vector<string> autoVars;
110  
65  int   saveCanvases(string type=".ps", string path="/afs/naf.desy.de/group/cms/scratch/schum/");
66  int  updatePads();
67  int  fillCanvases();
111  
112 +        ClassDef(PlotTool,4)
113  
70  ClassDef(PlotTool,4)
114  
115   };
116  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines