ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/kiesel/TreeWriter/treeWriter.h
Revision: 1.8
Committed: Fri Apr 19 10:13:27 2013 UTC (12 years ago) by kiesel
Content type: text/plain
Branch: MAIN
Changes since 1.7: +14 -10 lines
Log Message:
unsigned variables are unsigned

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 kiesel 1.8 void SetReportEvents(unsigned int nEvents) { reportEvery = nEvents; }
24     void SetLoggingVerbosity(unsigned 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 kiesel 1.8 TChain* inputTree;
29     susy::Event* event;
30 kiesel 1.1
31 kiesel 1.8 TFile* outFile;
32     TTree* tree;
33     TH1F* eventNumbers;
34 kiesel 1.1
35     private:
36     int processNEvents; // number of events to be processed
37 kiesel 1.8 unsigned int reportEvery;
38     bool skim; // true by default. eg. nJets, jet.pt, etc
39     unsigned int loggingVerbosity;
40     // 0: no output
41     // 1: only steps are shown
42     // 2: object multiplicity shown
43     // 3: detailed object info shown
44 kiesel 1.1
45 kiesel 1.4 // important dataset information
46     TH1F* pileupHisto;
47    
48 kiesel 1.1 // variables which will be stored in the tree
49     std::vector<tree::Photon> photon;
50     std::vector<tree::Jet> jet;
51 kiesel 1.4 std::vector<tree::Particle> electron;
52     std::vector<tree::Particle> muon;
53    
54 kiesel 1.1 float met;
55 kiesel 1.4 float met_phi;
56     float type1met;
57     float type1met_phi;
58 kiesel 1.1 float ht;
59     int nVertex;
60 kiesel 1.4 float pu_weight;
61 kiesel 1.1 };
62