ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/kiesel/TreeWriter/treeWriter.h
Revision: 1.4
Committed: Sat Apr 13 09:53:02 2013 UTC (12 years ago) by kiesel
Content type: text/plain
Branch: MAIN
Changes since 1.3: +12 -1 lines
Log Message:
added pileup weights and electrons + muons

File Contents

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