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

# Content
1 #include<iostream>
2 #include<math.h>
3 #include<string>
4
5 #include "TSystem.h"
6 #include "TFile.h"
7 #include "TTree.h"
8 #include "TChain.h"
9 #include "TH1F.h"
10
11 #include "SusyEvent.h"
12 #include "TreeObjects.h"
13
14 class TreeWriter {
15 public :
16 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 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 void SkimEvents(bool skim_){ skim = skim_; }
26 void PileUpWeightFile( std::string pileupFileName );
27
28 TChain *inputTree;
29 susy::Event *event;
30
31 TFile *outFile;
32 TTree *tree;
33 TH1F *eventNumbers;
34
35 private:
36 int processNEvents; // number of events to be processed
37 int reportEvery;
38 int loggingVerbosity;
39 bool skim;
40
41 // important dataset information
42 TH1F* pileupHisto;
43
44 // variables which will be stored in the tree
45 std::vector<tree::Photon> photon;
46 std::vector<tree::Jet> jet;
47 std::vector<tree::Particle> electron;
48 std::vector<tree::Particle> muon;
49
50 float met;
51 float met_phi;
52 float type1met;
53 float type1met_phi;
54 float ht;
55 int nVertex;
56 float pu_weight;
57 };
58