Skip to content

Commit

Permalink
Merge pull request cms-sw#26 from kfiekas/ChargedHiggsTauNuPlots3
Browse files Browse the repository at this point in the history
Angular cuts for tau nu final state
  • Loading branch information
amarini committed Jul 14, 2015
2 parents f3064c9 + bb8003e commit 4d2fe53
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 5 deletions.
3 changes: 2 additions & 1 deletion dat/config.dat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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|
1 change: 1 addition & 0 deletions interface/AnalysisBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> labels;
inline vector<string>& AllLabel(){return labels;}
Expand Down
5 changes: 5 additions & 0 deletions src/AnalysisBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> AnalysisBase::AllLabel()
// {
// vector<string> R;
Expand Down
123 changes: 119 additions & 4 deletions src/AnalysisChargedHiggsTauNu.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "interface/AnalysisChargedHiggsTauNu.hpp"
#include "interface/GeneralFunctions.hpp"

void ChargedHiggsTauNu::Init()
{
Expand All @@ -12,14 +13,20 @@ 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_" <<l<<endl;
Book( "ChargedHiggsTauNu/Vars/NTaus_"+l,"NTaus "+l,1000,0,1000);
GetHisto("ChargedHiggsTauNu/Vars/NTaus_"+l,"")->GetXaxis()->SetTitle("Number of selected hadronic taus");

cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo Tau1Pt_" <<l<<endl;
Book( "ChargedHiggsTauNu/Vars/Tau1Pt_"+l,"Jet1Pt "+l,1000,0,1000);
Book( "ChargedHiggsTauNu/Vars/Tau1Pt_"+l,"Tau1Pt "+l,1000,0,1000);
GetHisto("ChargedHiggsTauNu/Vars/Tau1Pt_"+l,"")->GetXaxis()->SetTitle("p_{T}^{#tau}(leading #tau) [GeV]");

cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo Tau1Eta_" <<l<<endl;
Expand Down Expand Up @@ -62,6 +69,65 @@ void ChargedHiggsTauNu::Init()
Book( "ChargedHiggsTauNu/Vars/EtMiss_"+l,"EtMiss "+l,1000,0,1000);
GetHisto("ChargedHiggsTauNu/Vars/EtMiss_"+l,"")->GetXaxis()->SetTitle("E_{T}^{miss} [GeV]");

cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo EtMissVsMt_" <<l<<endl;

Book2D( "ChargedHiggsTauNu/Vars/EtMissVsMt_"+l,"EtMissVsMt "+l,1000,0,1000,1000,0,1000);
GetHisto2D("ChargedHiggsTauNu/Vars/EtMissVsMt_"+l,"")->GetXaxis()->SetTitle("m_{T} [GeV]");
GetHisto2D("ChargedHiggsTauNu/Vars/EtMissVsMt_"+l,"")->GetYaxis()->SetTitle("E_{T}^{miss} [GeV]");

cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo DPhiJetMetVsDPhiTauMet_" <<l<<endl;

Book2D( "ChargedHiggsTauNu/Vars/DPhiJet1MetVsDPhiTauMet_"+l,"DPhiJetMetVsDPhiTauMet "+l,50,0,TMath::Pi(),50,0,TMath::Pi());
GetHisto2D("ChargedHiggsTauNu/Vars/DPhiJet1MetVsDPhiTauMet_"+l,"")->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_" <<l<<endl;
Book( "ChargedHiggsTauNu/Vars/RCollMin_"+l,"RCollMin "+l,100,0,2*TMath::Pi());
GetHisto("ChargedHiggsTauNu/Vars/RCollMin_"+l,"")->GetXaxis()->SetTitle("R_{coll}^{min}");

cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo RbbMin_" <<l<<endl;
Book( "ChargedHiggsTauNu/Vars/RbbMin_"+l,"RbbMin "+l,100,0,2*TMath::Pi());
GetHisto("ChargedHiggsTauNu/Vars/RbbMin_"+l,"")->GetXaxis()->SetTitle("R_{bb}^{min}");

cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo RsrMax_" <<l<<endl;
Book( "ChargedHiggsTauNu/Vars/RsrMax_"+l,"RsrMax "+l,100,0,2*TMath::Pi());
GetHisto("ChargedHiggsTauNu/Vars/RsrMax_"+l,"")->GetXaxis()->SetTitle("R_{sr}^{max}");

cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo DPhiTauJet1_" <<l<<endl;
Book( "ChargedHiggsTauNu/Vars/DPhiTauJet1_"+l,"DPhiTauJet1 "+l,50,0,TMath::Pi());
GetHisto("ChargedHiggsTauNu/Vars/DPhiTauJet1_"+l,"")->GetXaxis()->SetTitle("#Delta #phi (#tau, leading jet)");

cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo RCollMinVsMt_" <<l<<endl;

Book2D( "ChargedHiggsTauNu/Vars/RCollMinVsMt_"+l,"RCollMinVsMt "+l,1000,0,1000,100,0,2*TMath::Pi());
GetHisto2D("ChargedHiggsTauNu/Vars/RCollMinVsMt_"+l,"")->GetXaxis()->SetTitle("m_{T} [GeV]");
GetHisto2D("ChargedHiggsTauNu/Vars/RCollMinVsMt_"+l,"")->GetYaxis()->SetTitle("R_{Coll}^{min}");

cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo RbbMinVsMt_" <<l<<endl;

Book2D( "ChargedHiggsTauNu/Vars/RbbMinVsMt_"+l,"RbbMinVsMt "+l,1000,0,1000,100,0,2*TMath::Pi());
GetHisto2D("ChargedHiggsTauNu/Vars/RbbMinVsMt_"+l,"")->GetXaxis()->SetTitle("m_{T} [GeV]");
GetHisto2D("ChargedHiggsTauNu/Vars/RbbMinVsMt_"+l,"")->GetYaxis()->SetTitle("R_{bb}^{min}");

cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo RsrMaxVsMt_" <<l<<endl;

Book2D( "ChargedHiggsTauNu/Vars/RsrMaxVsMt_"+l,"RsrMaxVsMt "+l,1000,0,1000,100,0,2*TMath::Pi());
GetHisto2D("ChargedHiggsTauNu/Vars/RsrMaxVsMt_"+l,"")->GetXaxis()->SetTitle("m_{T} [GeV]");
GetHisto2D("ChargedHiggsTauNu/Vars/RsrMaxVsMt_"+l,"")->GetYaxis()->SetTitle("R_{sr}^{Max}");

cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo DPhiTauJet1VsMt_" <<l<<endl;

Book2D( "ChargedHiggsTauNu/Vars/DPhiTauJet1VsMt_"+l,"DPhiTauJet1VsMt "+l,1000,0,1000,50,0,TMath::Pi());
GetHisto2D("ChargedHiggsTauNu/Vars/DPhiTauJet1VsMt_"+l,"")->GetXaxis()->SetTitle("m_{T} [GeV]");
GetHisto2D("ChargedHiggsTauNu/Vars/DPhiTauJet1VsMt_"+l,"")->GetYaxis()->SetTitle("#Delta #phi (#tau, leading jet)");

cout <<"[ChargedHiggsTauNu]::[Init]::[INFO] Boking Histo Mt_" <<l<<endl;
Book( "ChargedHiggsTauNu/Vars/Mt_"+l,"Mt "+l,1000,0,1000);
Expand Down Expand Up @@ -119,14 +185,14 @@ int ChargedHiggsTauNu::analyze(Event*e,string systname)
Fill("ChargedHiggsTauNu/Vars/Jet1Eta_"+label,systname,j1->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)
{
Expand All @@ -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());

Expand Down

0 comments on commit 4d2fe53

Please sign in to comment.