diff --git a/dat/config.dat b/dat/config.dat index eb076f461db68..033e4cf46de4c 100644 --- a/dat/config.dat +++ b/dat/config.dat @@ -11,6 +11,7 @@ addfiles=/store/user/amarini/Nero/v0.8/RunIISpring15DR74/TTJets_TuneCUETP8M1_13T ### WW/WZ/ZZ### addfiles=/store/user/amarini/Nero/v0.8/RunIISpring15DR74/WW_TuneCUETP8M1_13TeV-pythia8 addfiles=/store/user/amarini/Nero/v0.8/RunIISpring15DR74/WZ_TuneCUETP8M1_13TeV-pythia8 +addfiles=/store/user/amarini/Nero/v0.8/RunIISpring15DR74/ZZ_TuneCUETP8M1_13TeV-pythia8 ### SIGNAL ### #addfiles=/store/user/jsalfeld/ChargedHiggs/NeroTuples/Hplus_Wh_18_5_2015 #Signal Tau Nu ; Private production @@ -58,7 +59,7 @@ Lumi=1 Smear=NONE config=ChargedHiggsTauNu|AddLabel("HplusToTauNu-M200"),AddLabel("HplusToTauNu-M250"),AddLabel("HplusToTauNu-M500"),AddLabel("HplusToTauNu-M900") -addConfig=ChargedHiggsTauNu|AddLabel('WW'),AddLabel('WZ'),AddLabel('TTJets'),AddLabel('DY'),AddLabel('QCD'),AddLabel('WJets') +addConfig=ChargedHiggsTauNu|AddLabel('WW'),AddLabel('WZ'),AddLabel('ZZ'),AddLabel('TTJets'),AddLabel('DY'),AddLabel('QCD'),AddLabel('WJets') #configure Analysis #config=AnalysisBase|Init() #config=Preselection| diff --git a/interface/AnalysisBase.hpp b/interface/AnalysisBase.hpp index 3378b908bc1c9..81aba36d15170 100644 --- a/interface/AnalysisBase.hpp +++ b/interface/AnalysisBase.hpp @@ -27,6 +27,7 @@ class AnalysisBase void Fill(string name, string syst , double value, double weight=1); void Fill2D(string name, string syst , double valueX,double valueY, double weight=1); TH1D* GetHisto(string name, string systname); + TH2D* GetHisto2D(string name, string systname); vector labels; inline vector& AllLabel(){return labels;} diff --git a/src/AnalysisBase.cpp b/src/AnalysisBase.cpp index 8a8d886bb2195..efa7785774577 100644 --- a/src/AnalysisBase.cpp +++ b/src/AnalysisBase.cpp @@ -32,6 +32,11 @@ TH1D* AnalysisBase::GetHisto(string name,string systname) return output_ -> Get(name,systname); } +TH2D* AnalysisBase::GetHisto2D(string name,string systname) +{ + return output_ -> Get2D(name,systname); +} + // vector AnalysisBase::AllLabel() // { // vector R; diff --git a/src/AnalysisChargedHiggsTauNu.cpp b/src/AnalysisChargedHiggsTauNu.cpp index e07977b30a534..95686534fc5fc 100644 --- a/src/AnalysisChargedHiggsTauNu.cpp +++ b/src/AnalysisChargedHiggsTauNu.cpp @@ -1,4 +1,5 @@ #include "interface/AnalysisChargedHiggsTauNu.hpp" +#include "interface/GeneralFunctions.hpp" void ChargedHiggsTauNu::Init() { @@ -12,6 +13,12 @@ void ChargedHiggsTauNu::Init() GetHisto("ChargedHiggsTauNu/CutFlow/CutFlow_"+l,"")->GetXaxis()->SetBinLabel(4,"N_{jets} #geq 3"); GetHisto("ChargedHiggsTauNu/CutFlow/CutFlow_"+l,"")->GetXaxis()->SetBinLabel(5,"N_{Bjets} #geq 1"); GetHisto("ChargedHiggsTauNu/CutFlow/CutFlow_"+l,"")->GetXaxis()->SetBinLabel(6,"MET > 60 GeV"); + //GetHisto("ChargedHiggsTauNu/CutFlow/CutFlow_"+l,"")->GetXaxis()->SetBinLabel(7,"R_{sr}^{Max} < 1.96"); + //GetHisto("ChargedHiggsTauNu/CutFlow/CutFlow_"+l,"")->GetXaxis()->SetBinLabel(7,"R_{sr}^{Max} < 140"); + GetHisto("ChargedHiggsTauNu/CutFlow/CutFlow_"+l,"")->GetXaxis()->SetBinLabel(7,"R_{coll}^{Min}>40"); + GetHisto("ChargedHiggsTauNu/CutFlow/CutFlow_"+l,"")->GetXaxis()->SetBinLabel(8,"R_{bb}^{Min}>40"); + //GetHisto("ChargedHiggsTauNu/CutFlow/CutFlow_"+l,"")->GetXaxis()->SetBinLabel(7,"#Delta #phi (Tau,Jet1)<2.09"); + cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo NTaus_" <GetXaxis()->SetTitle("Number of selected hadronic taus"); cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo Tau1Pt_" <GetXaxis()->SetTitle("p_{T}^{#tau}(leading #tau) [GeV]"); cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo Tau1Eta_" <GetXaxis()->SetTitle("E_{T}^{miss} [GeV]"); + cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo EtMissVsMt_" <GetXaxis()->SetTitle("m_{T} [GeV]"); + GetHisto2D("ChargedHiggsTauNu/Vars/EtMissVsMt_"+l,"")->GetYaxis()->SetTitle("E_{T}^{miss} [GeV]"); + + cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo DPhiJetMetVsDPhiTauMet_" <GetXaxis()->SetTitle("#Delta #phi(#tau,MET)"); + GetHisto2D("ChargedHiggsTauNu/Vars/DPhiJet1MetVsDPhiTauMet_"+l,"")->GetYaxis()->SetTitle("#Delta #phi(Jet1,MET)"); + + Book2D( "ChargedHiggsTauNu/Vars/DPhiJet2MetVsDPhiTauMet_"+l,"DPhiJetMetVsDPhiTauMet "+l,50,0,TMath::Pi(),50,0,TMath::Pi()); + GetHisto2D("ChargedHiggsTauNu/Vars/DPhiJet2MetVsDPhiTauMet_"+l,"")->GetXaxis()->SetTitle("#Delta #phi(#tau,MET)"); + GetHisto2D("ChargedHiggsTauNu/Vars/DPhiJet2MetVsDPhiTauMet_"+l,"")->GetYaxis()->SetTitle("#Delta #phi(Jet2,MET)"); + + Book2D( "ChargedHiggsTauNu/Vars/DPhiJet3MetVsDPhiTauMet_"+l,"DPhiJetMetVsDPhiTauMet "+l,50,0,TMath::Pi(),50,0,TMath::Pi()); + GetHisto2D("ChargedHiggsTauNu/Vars/DPhiJet3MetVsDPhiTauMet_"+l,"")->GetXaxis()->SetTitle("#Delta #phi(#tau,MET)"); + GetHisto2D("ChargedHiggsTauNu/Vars/DPhiJet3MetVsDPhiTauMet_"+l,"")->GetYaxis()->SetTitle("#Delta #phi(Jet3,MET)"); + + cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo RCollMin_" <GetXaxis()->SetTitle("R_{coll}^{min}"); + + cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo RbbMin_" <GetXaxis()->SetTitle("R_{bb}^{min}"); + + cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo RsrMax_" <GetXaxis()->SetTitle("R_{sr}^{max}"); + + cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo DPhiTauJet1_" <GetXaxis()->SetTitle("#Delta #phi (#tau, leading jet)"); + + cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo RCollMinVsMt_" <GetXaxis()->SetTitle("m_{T} [GeV]"); + GetHisto2D("ChargedHiggsTauNu/Vars/RCollMinVsMt_"+l,"")->GetYaxis()->SetTitle("R_{Coll}^{min}"); + + cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo RbbMinVsMt_" <GetXaxis()->SetTitle("m_{T} [GeV]"); + GetHisto2D("ChargedHiggsTauNu/Vars/RbbMinVsMt_"+l,"")->GetYaxis()->SetTitle("R_{bb}^{min}"); + + cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo RsrMaxVsMt_" <GetXaxis()->SetTitle("m_{T} [GeV]"); + GetHisto2D("ChargedHiggsTauNu/Vars/RsrMaxVsMt_"+l,"")->GetYaxis()->SetTitle("R_{sr}^{Max}"); + + cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo DPhiTauJet1VsMt_" <GetXaxis()->SetTitle("m_{T} [GeV]"); + GetHisto2D("ChargedHiggsTauNu/Vars/DPhiTauJet1VsMt_"+l,"")->GetYaxis()->SetTitle("#Delta #phi (#tau, leading jet)"); cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo Mt_" <Eta() ,e->weight()); } - Fill("ChargedHiggsTauNu/Vars/NBjets_"+label,systname, e->Bjets() ,e->weight()); + Fill("ChargedHiggsTauNu/Vars/NBjets_"+label,systname, e->Bjets() ,e->weight()); //At least one b-jet if ( e->Bjets() <1 ) return EVENT_NOT_USED; Fill("ChargedHiggsTauNu/CutFlow/CutFlow_"+label,systname,4,e->weight()); - + Jet * bj1 = e->LeadBjet(); if (bj1 != NULL) { @@ -146,15 +212,64 @@ int ChargedHiggsTauNu::analyze(Event*e,string systname) Fill("ChargedHiggsTauNu/Vars/MaxDEtaBjetJets_"+label,systname, DEtaMax ,e->weight()); Fill("ChargedHiggsTauNu/Vars/MaxInvMassBjetJets_"+label,systname, InvMassMax ,e->weight()); + Fill("ChargedHiggsTauNu/Vars/EtMiss_"+label,systname, e->GetMet().Pt() ,e->weight()); - + Fill2D("ChargedHiggsTauNu/Vars/EtMissVsMt_"+label,systname,e->Mt(),e->GetMet().Pt(),e->weight()); //MET>60GeV if ( e->GetMet().Pt() <60 ) return EVENT_NOT_USED; Fill("ChargedHiggsTauNu/CutFlow/CutFlow_"+label,systname,5,e->weight()); + + + double DPhiEtMissJet1=fabs(ChargedHiggs::deltaPhi(e->GetMet().Phi(),(e->GetJet(0))->Phi())); + double DPhiEtMissJet2=fabs(ChargedHiggs::deltaPhi(e->GetMet().Phi(),(e->GetJet(1))->Phi())); + double DPhiEtMissJet3=fabs(ChargedHiggs::deltaPhi(e->GetMet().Phi(),(e->GetJet(2))->Phi())); + double DPhiEtMissTau=fabs(ChargedHiggs::deltaPhi(e->GetMet().Phi(),t1->Phi())); + + Fill2D("ChargedHiggsTauNu/Vars/DPhiJet1MetVsDPhiTauMet_"+label,systname,DPhiEtMissTau,DPhiEtMissJet1,e->weight()); + Fill2D("ChargedHiggsTauNu/Vars/DPhiJet2MetVsDPhiTauMet_"+label,systname,DPhiEtMissTau,DPhiEtMissJet2,e->weight()); + Fill2D("ChargedHiggsTauNu/Vars/DPhiJet3MetVsDPhiTauMet_"+label,systname,DPhiEtMissTau,DPhiEtMissJet3,e->weight()); + + + double RbbMin=min(min(sqrt(pow(DPhiEtMissJet1,2)+pow(TMath::Pi()-DPhiEtMissTau,2)),sqrt(pow(DPhiEtMissJet2,2)+pow(TMath::Pi()-DPhiEtMissTau,2))),sqrt(pow(DPhiEtMissJet3,2)+pow(TMath::Pi()-DPhiEtMissTau,2))); + double RCollMin=min(min(sqrt(pow(TMath::Pi()-DPhiEtMissJet1,2)+pow(DPhiEtMissTau,2)),sqrt(pow(TMath::Pi()-DPhiEtMissJet2,2)+pow(DPhiEtMissTau,2))),sqrt(pow(TMath::Pi()-DPhiEtMissJet3,2)+pow(DPhiEtMissTau,2))); + double RsrMax=min(min(sqrt(pow(TMath::Pi()-DPhiEtMissJet1,2)+pow(TMath::Pi()-DPhiEtMissTau,2)),sqrt(pow(TMath::Pi()-DPhiEtMissJet2,2)+pow(TMath::Pi()-DPhiEtMissTau,2))),sqrt(pow(TMath::Pi()-DPhiEtMissJet3,2)+pow(TMath::Pi()-DPhiEtMissTau,2))); + double DPhiTauJet1=fabs(ChargedHiggs::deltaPhi(t1->Phi(),(e->GetJet(0))->Phi())); + + Fill("ChargedHiggsTauNu/Vars/RbbMin_"+label,systname,RbbMin,e->weight()); + + Fill("ChargedHiggsTauNu/Vars/RCollMin_"+label,systname,RCollMin,e->weight()); + Fill("ChargedHiggsTauNu/Vars/RsrMax_"+label,systname,RsrMax,e->weight()); + + Fill("ChargedHiggsTauNu/Vars/DPhiTauJet1_"+label,systname,DPhiTauJet1,e->weight()); + + Fill2D("ChargedHiggsTauNu/Vars/RbbMinVsMt_"+label,systname,e->Mt(),RbbMin,e->weight()); + + Fill2D("ChargedHiggsTauNu/Vars/RCollMinVsMt_"+label,systname,e->Mt(),RCollMin,e->weight()); + + Fill2D("ChargedHiggsTauNu/Vars/RsrMaxVsMt_"+label,systname,e->Mt(),RsrMax,e->weight()); + + Fill2D("ChargedHiggsTauNu/Vars/DPhiTauJet1VsMt_"+label,systname,e->Mt(),DPhiTauJet1,e->weight()); + + //Angular Cuts + + //if ( RsrMax >1.963 ) return EVENT_NOT_USED; + //Fill("ChargedHiggsTauNu/CutFlow/CutFlow_"+label,systname,6,e->weight()); + + //if ( RsrMax*TMath::RadToDeg()>140) return EVENT_NOT_USED; + //Fill("ChargedHiggsTauNu/CutFlow/CutFlow_"+label,systname,6,e->weight()); + + if ( RCollMin*TMath::RadToDeg() <40 ) return EVENT_NOT_USED; + Fill("ChargedHiggsTauNu/CutFlow/CutFlow_"+label,systname,6,e->weight()); + + if ( RbbMin*TMath::RadToDeg() <40 ) return EVENT_NOT_USED; + Fill("ChargedHiggsTauNu/CutFlow/CutFlow_"+label,systname,7,e->weight()); + + //if ( DPhiTauJet1 > 2.089) return EVENT_NOT_USED; + //Fill("ChargedHiggsTauNu/CutFlow/CutFlow_"+label,systname,6,e->weight()); Fill("ChargedHiggsTauNu/Vars/Mt_"+label,systname, e->Mt() ,e->weight());