ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/kiesel/TreeWriter/treeWriter.h
Revision: 1.7
Committed: Thu Apr 18 13:38:55 2013 UTC (12 years ago) by kiesel
Content type: text/plain
Branch: MAIN
Changes since 1.6: +6 -8 lines
Log Message:
treeWriter can now be compiled with g++

File Contents

# User Rev Content
1 kiesel 1.1 #include<iostream>
2     #include<math.h>
3 kiesel 1.7 #include<string>
4 kiesel 1.1
5 kiesel 1.7 #include "TSystem.h"
6 kiesel 1.1 #include "TFile.h"
7     #include "TTree.h"
8     #include "TChain.h"
9 kiesel 1.4 #include "TH1F.h"
10 kiesel 1.1
11     #include "SusyEvent.h"
12     #include "TreeObjects.h"
13    
14     class TreeWriter {
15     public :
16 kiesel 1.7 TreeWriter(std::string inputName, std::string outputName, int loggingVerbosity_);
17     TreeWriter(TChain* inputName, std::string outputName, int loggingVerbosity_);
18     void Init( std::string outputName, int loggingVerbosity_ );
19 kiesel 1.1 virtual ~TreeWriter();
20     virtual void Loop();
21    
22     void SetProcessNEvents(int nEvents) { processNEvents = nEvents; }
23     void SetReportEvents(int nEvents) { reportEvery = nEvents; }
24     void SetLoggingVerbosity(int logVerb) { loggingVerbosity = logVerb; }
25 kiesel 1.2 void SkimEvents(bool skim_){ skim = skim_; }
26 kiesel 1.7 void PileUpWeightFile( std::string pileupFileName );
27 kiesel 1.1
28     TChain *inputTree;
29     susy::Event *event;
30    
31     TFile *outFile;
32     TTree *tree;
33 kiesel 1.6 TH1F *eventNumbers;
34 kiesel 1.1
35     private:
36     int processNEvents; // number of events to be processed
37     int reportEvery;
38     int loggingVerbosity;
39     bool skim;
40    
41 kiesel 1.4 // important dataset information
42     TH1F* pileupHisto;
43    
44 kiesel 1.1 // variables which will be stored in the tree
45     std::vector<tree::Photon> photon;
46     std::vector<tree::Jet> jet;
47 kiesel 1.4 std::vector<tree::Particle> electron;
48     std::vector<tree::Particle> muon;
49    
50 kiesel 1.1 float met;
51 kiesel 1.4 float met_phi;
52     float type1met;
53     float type1met_phi;
54 kiesel 1.1 float ht;
55     int nVertex;
56 kiesel 1.4 float pu_weight;
57 kiesel 1.1 };
58