00001 #ifndef HZZ2L2NU_INCLUDE_DILEPTONTREES_H_ 00002 #define HZZ2L2NU_INCLUDE_DILEPTONTREES_H_ 00003 00004 #include <array> 00005 #include <optional> 00006 #include <tuple> 00007 #include <vector> 00008 00009 #include <boost/program_options.hpp> 00010 #include <TFile.h> 00011 #include <TTree.h> 00012 #include <TTreeReaderValue.h> 00013 00014 #include <EventTrees.h> 00015 #include <Dataset.h> 00016 #include <GenZZBuilder.h> 00017 #include <Options.h> 00018 00019 00032 class DileptonTrees final : public EventTrees { 00033 public: 00034 DileptonTrees(Options const &options, Dataset &dataset); 00035 00037 static boost::program_options::options_description OptionsDescription(); 00038 00040 bool ProcessEvent(); 00041 00042 private: 00043 enum class LeptonCat : int { 00044 kEE = 0, 00045 kMuMu = 1, 00046 kEMu = 2 00047 }; 00048 00049 enum class JetCat : int { 00050 kEq0J, 00051 kGEq1J, 00052 kVbf 00053 }; 00054 00062 std::optional<std::tuple<LeptonCat, Lepton const *, Lepton const *>> 00063 CheckLeptons() const; 00064 00066 void FillMoreVariables(std::array<Lepton, 2> const &leptons, 00067 std::vector<Jet> const &jets); 00068 00069 static double constexpr kNominalMZ_ = 91.1876; 00070 00072 bool storeMoreVariables_; 00073 00075 double ptMissCut_; 00076 00082 std::optional<GenZZBuilder> genZZBuilder_; 00083 00084 TTreeReaderValue<ULong64_t> srcEvent_; 00085 00086 Int_t leptonCat_, jetCat_, numPVGood_; 00087 Float_t llPt_, llEta_, llPhi_, llMass_; 00088 Float_t missPt_, missPhi_; 00089 Float_t mT_; 00090 00091 TTreeReaderValue<int> srcNumPVGood_; 00092 00093 ULong64_t event_; 00094 Float_t genMZZ_; 00095 Int_t leptonCharge_[2]; 00096 Float_t leptonPt_[2], leptonEta_[2], leptonPhi_[2], leptonMass_[2]; 00097 static int const maxSize_ = 32; 00098 Int_t jetSize_; 00099 Float_t jetPt_[maxSize_], jetEta_[maxSize_], jetPhi_[maxSize_], 00100 jetMass_[maxSize_]; 00101 }; 00102 00103 #endif // HZZ2L2NU_INCLUDE_DILEPTONTREES_H_