00001 #ifndef HZZ2L2NU_INCLUDE_EVENTTREES_H_ 00002 #define HZZ2L2NU_INCLUDE_EVENTTREES_H_ 00003 00004 #include <string> 00005 #include <vector> 00006 00007 #include <TFile.h> 00008 #include <TTree.h> 00009 00010 #include <AnalysisCommon.h> 00011 #include <Dataset.h> 00012 #include <Options.h> 00013 00014 00027 class EventTrees : public AnalysisCommon { 00028 public: 00034 EventTrees(Options const &options, Dataset &dataset, 00035 std::string const treeName = "Vars"); 00036 00038 void CreateWeightBranches(); 00039 00041 void PostProcessing(); 00042 00043 protected: 00045 template<typename... Args> 00046 void AddBranch(Args... args) { 00047 tree_->Branch(args...); 00048 } 00049 00055 void FillTree(); 00056 00057 private: 00059 bool storeWeightSyst_; 00060 00062 TFile outputFile_; 00063 00065 TTree *tree_; 00066 00068 Float_t weight_; 00069 00076 std::vector<Float_t> systWeights_; 00077 }; 00078 00079 #endif // HZZ2L2NU_INCLUDE_EVENTTREES_H_ 00080