--- UserCode/kiesel/TreeWriter/treeWriter.h 2013/04/09 07:28:02 1.1 +++ UserCode/kiesel/TreeWriter/treeWriter.h 2013/04/18 13:38:55 1.7 @@ -1,33 +1,36 @@ #include #include +#include +#include "TSystem.h" #include "TFile.h" #include "TTree.h" #include "TChain.h" -#include "TString.h" +#include "TH1F.h" #include "SusyEvent.h" #include "TreeObjects.h" class TreeWriter { public : - TreeWriter(TString inputName, TString outputName ); + TreeWriter(std::string inputName, std::string outputName, int loggingVerbosity_); + TreeWriter(TChain* inputName, std::string outputName, int loggingVerbosity_); + void Init( std::string outputName, int loggingVerbosity_ ); virtual ~TreeWriter(); virtual void Loop(); void SetProcessNEvents(int nEvents) { processNEvents = nEvents; } void SetReportEvents(int nEvents) { reportEvery = nEvents; } void SetLoggingVerbosity(int logVerb) { loggingVerbosity = logVerb; } - void DontSkimEvents(){ skim = false; } + void SkimEvents(bool skim_){ skim = skim_; } + void PileUpWeightFile( std::string pileupFileName ); TChain *inputTree; susy::Event *event; TFile *outFile; TTree *tree; - - float getPtFromMatchedJet( susy::Photon, susy::Event ); - float deltaR( TLorentzVector, TLorentzVector ); + TH1F *eventNumbers; private: int processNEvents; // number of events to be processed @@ -35,12 +38,21 @@ class TreeWriter { int loggingVerbosity; bool skim; + // important dataset information + TH1F* pileupHisto; + // variables which will be stored in the tree std::vector photon; std::vector jet; + std::vector electron; + std::vector muon; + float met; + float met_phi; + float type1met; + float type1met_phi; float ht; int nVertex; - int nElectron; + float pu_weight; };