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 |
|
9 |
#include "SusyEvent.h"
|
10 |
#include "TreeObjects.h"
|
11 |
|
12 |
class TreeWriter {
|
13 |
public :
|
14 |
TreeWriter(TString inputName, TString outputName, int loggingVerbosity_);
|
15 |
virtual ~TreeWriter();
|
16 |
virtual void Loop();
|
17 |
|
18 |
void SetProcessNEvents(int nEvents) { processNEvents = nEvents; }
|
19 |
void SetReportEvents(int nEvents) { reportEvery = nEvents; }
|
20 |
void SetLoggingVerbosity(int logVerb) { loggingVerbosity = logVerb; }
|
21 |
void SkimEvents(bool skim_){ skim = skim_; }
|
22 |
|
23 |
TChain *inputTree;
|
24 |
susy::Event *event;
|
25 |
|
26 |
TFile *outFile;
|
27 |
TTree *tree;
|
28 |
|
29 |
float getPtFromMatchedJet( susy::Photon, susy::Event );
|
30 |
float deltaR( TLorentzVector, TLorentzVector );
|
31 |
|
32 |
private:
|
33 |
int processNEvents; // number of events to be processed
|
34 |
int reportEvery;
|
35 |
int loggingVerbosity;
|
36 |
bool skim;
|
37 |
|
38 |
// variables which will be stored in the tree
|
39 |
std::vector<tree::Photon> photon;
|
40 |
std::vector<tree::Jet> jet;
|
41 |
float met;
|
42 |
float ht;
|
43 |
int nVertex;
|
44 |
int nElectron;
|
45 |
};
|
46 |
|