SusyNtuple
|
00001 #ifndef SusyAna_Susy2LepCutflow_h 00002 #define SusyAna_Susy2LepCutflow_h 00003 00004 00005 // Common Packages 00006 00007 // Root Packages 00008 #include "TTree.h" 00009 #include "TChain.h" 00010 00011 // SusyNtuple 00012 #include "SusyNtuple/SusyNtAna.h" 00013 #include "SusyNtuple/SusyNtTools.h" 00014 00015 #include <fstream> 00016 00018 00022 class Susy2LepCutflow : public SusyNtAna 00023 { 00024 00025 public: 00026 00027 Susy2LepCutflow(); 00028 virtual ~Susy2LepCutflow(){}; 00029 00030 // Propagate the input TChain 00031 void setChain(TChain* chain) { m_input_chain = chain; } 00032 00033 // Begin is called before looping on entries 00034 virtual void Begin(TTree *tree); 00035 // Terminate is called after looping is finished 00036 virtual void Terminate(); 00037 00038 // Main event loop function 00039 virtual Bool_t Process(Long64_t entry); 00040 00041 // Event cleaning cuts 00042 bool passEventCleaning(int cutflags, const MuonVector& preMuons, const MuonVector& baseMuons, 00043 const JetVector& baseJets); 00044 // Full event selection. Specify which leptons to use. 00045 bool selectEvent(const LeptonVector& leptons, const LeptonVector& baseLeptons); 00046 00047 // Signal regions 00048 bool passSR1(const LeptonVector& leptons, const JetVector& jets, const Met* met); 00049 bool passSR2(const LeptonVector& leptons, const JetVector& jets, const Met* met); 00050 bool passSR3(const LeptonVector& leptons, const JetVector& jets, const Met* met); 00051 bool passSR4(const LeptonVector& leptons, const JetVector& jets, const Met* met); 00052 bool passSR5(const LeptonVector& leptons, const JetVector& jets, const Met* met); 00053 00054 // Cut methods 00055 bool passNLepCut(const LeptonVector& leptons); 00056 bool passNBaseLepCut(const LeptonVector& baseLeptons); 00057 bool passTrigger(const LeptonVector& leptons, const Met* met); 00058 bool sameFlavor(const LeptonVector& leptons); 00059 bool oppositeFlavor(const LeptonVector& leptons); 00060 bool sameSign(const LeptonVector& leptons); 00061 bool oppositeSign(const LeptonVector& leptons); 00062 bool passMll(const LeptonVector& leptons, float mll = 20); 00063 00064 // Signal Region Cuts 00065 bool passJetVeto(const JetVector& jets); 00066 bool passZVeto(const LeptonVector& leptons, float Zlow = 81.2, float Zhigh = 101.2); 00067 bool passMETRel(const Met *met, const LeptonVector& leptons, 00068 const JetVector& jets, float maxMet = 100); 00069 bool passbJetVeto(const JetVector& jets); 00070 bool passge2Jet(const JetVector& jets); 00071 bool passdPhi(TLorentzVector v0, TLorentzVector v1, float cut); 00072 bool passMT2(const LeptonVector& leptons, const Met* met, float cut); 00073 00074 00075 // Dump cutflow - if derived class uses different cut ordering, 00076 // override this method 00077 virtual void dumpEventCounters(); 00078 00079 // debug check 00080 bool debugEvent(); 00081 00082 ClassDef(Susy2LepCutflow, 1); 00083 00084 protected: 00085 00086 TChain* m_input_chain; // input chain being processed 00087 00088 // Cut variables 00089 uint m_nLepMin; // min leptons 00090 uint m_nLepMax; // max leptons 00091 bool m_cutNBaseLep; // apply nLep cuts to baseline leptons as well as signal 00092 00093 DiLepEvtType m_ET; // Dilepton event type to store cf 00094 00095 // Event counters 00096 uint n_readin; 00097 uint n_pass_grl; 00098 uint n_pass_LAr; 00099 uint n_pass_tileErr; 00100 uint n_pass_ttc; 00101 uint n_pass_BadJet; 00102 uint n_pass_BadMuon; 00103 uint n_pass_goodVtx; 00104 uint n_pass_Cosmic; 00105 uint n_pass_flavor[ET_N]; 00106 uint n_pass_nLep[ET_N]; 00107 uint n_pass_mll[ET_N]; 00108 uint n_pass_os[ET_N]; 00109 uint n_pass_ss[ET_N]; 00110 uint n_pass_trig[ET_N]; 00111 00112 // SR1 counts 00113 uint n_pass_SR1jv[ET_N]; 00114 uint n_pass_SR1Zv[ET_N]; 00115 uint n_pass_SR1MET[ET_N]; 00116 00117 // SR2 counts 00118 uint n_pass_SR2jv[ET_N]; 00119 uint n_pass_SR2MET[ET_N]; 00120 00121 // SR3 counts 00122 uint n_pass_SR3ge2j[ET_N]; 00123 uint n_pass_SR3Zv[ET_N]; 00124 uint n_pass_SR3bjv[ET_N]; 00125 uint n_pass_SR3mct[ET_N]; 00126 uint n_pass_SR3MET[ET_N]; 00127 00128 // SR4 counts 00129 uint n_pass_SR4jv[ET_N]; 00130 uint n_pass_SR4MET[ET_N]; 00131 uint n_pass_SR4Zv[ET_N]; 00132 uint n_pass_SR4L0pt[ET_N]; 00133 uint n_pass_SR4SUMpt[ET_N]; 00134 uint n_pass_SR4dPhiMETLL[ET_N]; 00135 uint n_pass_SR4dPhiMETL1[ET_N]; 00136 00137 // SR5 counts 00138 uint n_pass_SR5jv[ET_N]; 00139 uint n_pass_SR5Zv[ET_N]; 00140 uint n_pass_SR5MET[ET_N]; 00141 uint n_pass_SR5MT2[ET_N]; 00142 00143 00144 00145 }; 00146 00147 #endif