SusyNtuple
|
00001 #ifdef FOO // dantrim July 5 :: this class is obsolete, hide it from compiler 00002 00003 #ifndef DilTrigLogic_h 00004 #define DilTrigLogic_h 00005 00006 #include "TFile.h" 00007 #include "THnSparse.h" 00008 00009 #include "DGTriggerReweight/triggerReweight2Lep.h" 00010 00011 #include "SusyNt.h" 00012 #include "SusyDefs.h" //AT-2014-11-06 can be remove ? 00013 #include "SusyNtuple/SusyNtSys.h" 00014 00015 using namespace Susy; 00016 using namespace NtSys; 00017 using namespace std; 00018 00019 00020 enum DilTriggerRegion 00021 { 00022 DTR_EE_A = 0, 00023 DTR_EE_B, 00024 DTR_MM_A, 00025 DTR_MM_B, 00026 DTR_MM_C, 00027 DTR_MM_D, 00028 DTR_MM_E, 00029 DTR_EM_A, 00030 DTR_EM_B, 00031 DTR_UNKNOWN, 00032 DTR_N 00033 }; 00034 00036 00042 class DilTrigLogic 00043 { 00044 00045 public: 00046 00047 // Default constructor and destructor for now 00048 DilTrigLogic(string period = "Moriond", bool useReweightUtils=true); 00049 virtual ~DilTrigLogic(); 00050 00051 // Three basic methods to interact with the trigger package: 00052 // 1.) return true if event and objects match to correct trigger. 00053 // 2.) return true if correct event trigger fired 00054 // 3.) return true if objects match to correct trigger 00055 bool passDilTrig(LeptonVector leptons, float met, Event* evt); 00056 bool passDilEvtTrig(LeptonVector leptons, float met, Event* evt); 00057 bool passDilTrigMatch(LeptonVector leptons, float met, Event* evt); 00058 00059 // Regions taken from this talk: 00060 // https://indico.cern.ch/getFile.py/access?contribId=1&resId=0&materialId=slides&confId=199022 00061 // pt0 = leading Pt, pt1 = subleading Pt. 00062 DilTriggerRegion getEETrigRegion(float pt0, float pt1); 00063 DilTriggerRegion getMMTrigRegion(float pt0, float pt1, float met); 00064 DilTriggerRegion getEMTrigRegion(float ept, float mpt); 00065 00066 // Methods to check Evt Trigger and trigger matching 00067 bool passEvtTrigger(uint evtflag, DilTriggerRegion dtr); 00068 bool passTriggerMatch(uint flag0, uint flag1, DilTriggerRegion dtr); 00069 00070 // Trigger reweighting 00071 double getTriggerWeight(LeptonVector leptons, bool isMC, 00072 float met, int njets, int NPV, 00073 SusyNtSys sys = NtSys::NOM); 00074 double getTriggerWeightEE(LeptonVector leptons, SusyNtSys sys); 00075 double getTriggerWeightEM(LeptonVector leptons, int NPV, SusyNtSys sys); 00076 double getTriggerWeightMM(LeptonVector leptons, float met, 00077 int njets, int NPV, SusyNtSys sys); 00078 00079 // Debug method 00080 void debugFlag(uint flag); 00081 00082 // Currently we check that the mc events fall within 00083 // a given region, not actually checking the trigger. 00084 // If the user wants to use the MC 00085 // trigger as is, simply set this flag. 00086 void useMCTrigger(){ m_useMCTrig = true; }; 00087 00088 // New trigger has been added but is not ready for 00089 // official use. This flag is to be set if we want 00090 // to use the trigger for data and also for MC 00091 // reweighting. 00092 void useDiumuonMetTrigger(){ m_useDimuonMetTrigger = true; }; 00093 00094 protected: 00095 00096 // 00097 // Triger reweighting 00098 // 00099 00100 triggerReweight2Lep* m_triggerWeight; // Trigger reweighting object 00101 00102 private: 00103 00104 bool m_useMCTrig; // flag to actually check MC trig 00105 00106 //Period period; // Period 00107 //ElectronVector m_elecs; // Electron vector for easy access 00108 //MuonVector m_muons; // Muon vector for easy access 00109 00110 bool m_useDimuonMetTrigger; // True to use Met Trigger 00111 00112 }; 00113 00114 #endif 00115 00116 #endif