Skip to content

Commit

Permalink
add single top closure from ttbar
Browse files Browse the repository at this point in the history
  • Loading branch information
hua wei committed Mar 4, 2015
1 parent 746eabc commit 6cf3e79
Show file tree
Hide file tree
Showing 11 changed files with 1,666 additions and 7 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ And it will be involved into make command automatically and we do not have error

./LostLepton_MuCS_TTbar runList_inputfile.txt outputfile.root

./LostLepton_ElCS_TTbar runList_inputfile.txt outputfile.root
./LostLepton_ElCS_TTbar runList_ttbarfile.txt outputfile.root

./LostLepton_ElCS_SingleTop runList_singletopfile.txt outputfile.root

5.Make Closure Plots:

Expand Down
4 changes: 2 additions & 2 deletions Tool/ClosurePlots.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ int main()
ClosurePlots myClosurePlots;
myClosurePlots.Initialization();
myClosurePlots.SetScale(
25446993, //NEvents
806.1, //Xsec
1957900, //NEvents
70, //Xsec
1000 //Lumi in pb
);
//initialize the closure plots parameter we want to investigate
Expand Down
8 changes: 8 additions & 0 deletions Tool/EffsHeader_MuCS.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const double ttbar_mus_acc = 0.881829;
const double ttbar_mus_recoeff[8] = {0.906211,0.934775,0.94723,0.952031,0.958981,0.948467,0.948671,0.907143};
const double ttbar_mus_isoeff[8] = {0.523646,0.661701,0.767409,0.827249,0.856124,0.880562,0.893062,0.902887};
const double ttbar_els_acc = 0.901314;
const double ttbar_els_recoeff[8] = {0.323529,0.57732,0.780035,0.84218,0.859939,0.8662,0.886717,0.826568};
const double ttbar_els_isoeff[8] = {0.721818,0.840608,0.897508,0.929657,0.940256,0.950025,0.948119,0.958036};
const double ttbar_corrfactor_di_mus = 0.983865;
const double ttbar_corrfactor_di_els = 0.984722;
998 changes: 998 additions & 0 deletions Tool/LostLepton_MuCS_SingleTop.cc

Large diffs are not rendered by default.

565 changes: 565 additions & 0 deletions Tool/LostLepton_MuCS_SingleTop.h

Large diffs are not rendered by default.

68 changes: 68 additions & 0 deletions Tool/LostLepton_MuCS_TTbar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ int main(int argc, char* argv[])
myAccRecoIsoEffs.EffstoWeights();
myAccRecoIsoEffs.GetDiLeptonFactor();
myAccRecoIsoEffs.printAccRecoIsoEffs();
myAccRecoIsoEffs.printEffsHeader();

NTupleReader trCS(fChain);
//initialize the type3Ptr defined in the customize.h
Expand Down Expand Up @@ -1134,4 +1135,71 @@ void AccRecoIsoEffs::printAccRecoIsoEffs()

return ;
}
void AccRecoIsoEffs:: printEffsHeader()
{
ofstream EffsHeader;
EffsHeader.open ("EffsHeader_MuCS.h");

int i_cal = 0;

EffsHeader << " const double ttbar_mus_acc = " << mus_acc << ";" << std::endl;

EffsHeader << " const double ttbar_mus_recoeff[" << PT_BINS << "] = {";
for( i_cal = 0 ; i_cal < PT_BINS ; i_cal++ )
{
if( i_cal != PT_BINS-1 )
{
EffsHeader << mus_recoeff[i_cal] << ",";
}
else
{
EffsHeader << mus_recoeff[i_cal] << "};" << std::endl;
}
}

EffsHeader << " const double ttbar_mus_isoeff[" << PT_BINS << "] = {";
for( i_cal = 0 ; i_cal < PT_BINS ; i_cal++ )
{
if( i_cal != PT_BINS-1 )
{
EffsHeader << mus_isoeff[i_cal] << ",";
}
else
{
EffsHeader << mus_isoeff[i_cal] << "};" << std::endl;
}
}

EffsHeader << " const double ttbar_els_acc = " << els_acc << ";" << std::endl;

EffsHeader << " const double ttbar_els_recoeff[" << PT_BINS << "] = {";
for( i_cal = 0 ; i_cal < PT_BINS ; i_cal++ )
{
if( i_cal != PT_BINS-1 )
{
EffsHeader << els_recoeff[i_cal] << ",";
}
else
{
EffsHeader << els_recoeff[i_cal] << "};" << std::endl;
}
}

EffsHeader << " const double ttbar_els_isoeff[" << PT_BINS << "] = {";
for( i_cal = 0 ; i_cal < PT_BINS ; i_cal++ )
{
if( i_cal != PT_BINS-1 )
{
EffsHeader << els_isoeff[i_cal] << ",";
}
else
{
EffsHeader << els_isoeff[i_cal] << "};" << std::endl;
}
}

EffsHeader << " const double ttbar_corrfactor_di_mus = " << corrfactor_di_mus << ";" << std::endl;
EffsHeader << " const double ttbar_corrfactor_di_els = " << corrfactor_di_els << ";" << std::endl;

EffsHeader.close();
}
7 changes: 5 additions & 2 deletions Tool/LostLepton_MuCS_TTbar.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "SusyAnaTools/Tools/NTupleReader.h"

#define PT_BINS 8

//#define AC_BINS 1

//############################begin to defin class AccRecoIsoEffs###################

Expand All @@ -28,6 +28,8 @@ class AccRecoIsoEffs
void printAccRecoIsoEffs();
void printNormalizeFlowNumber();

void printEffsHeader();

//define the number of Pt bins we need in the calculation
//static int PT_BINS = 8;

Expand Down Expand Up @@ -394,7 +396,8 @@ bool FillChain(TChain *chain, const TString &inputFileList)


//############determine the pt bin number from generation level pt############
int Set_ptbin_number(double gen_pt
int Set_ptbin_number(
double gen_pt
)
{
int ptbin_num;
Expand Down
5 changes: 4 additions & 1 deletion Tool/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ LDFLAGS =

LIBS = $(shell root-config --glibs)

PROGRAMS = tupleTest makePlots LostLepton_MuCS_TTbar LostLepton_ElCS_TTbar ClosurePlots
PROGRAMS = tupleTest makePlots LostLepton_MuCS_TTbar LostLepton_ElCS_TTbar LostLepton_MuCS_SingleTop ClosurePlots

all: $(PROGRAMS)

Expand Down Expand Up @@ -49,6 +49,9 @@ LostLepton_MuCS_TTbar: $(ODIR)/LostLepton_MuCS_TTbar.o $(ODIR)/NTupleReader.o
LostLepton_ElCS_TTbar: $(ODIR)/LostLepton_ElCS_TTbar.o $(ODIR)/NTupleReader.o
$(LD) $^ $(LIBS) -L${CMSSW_BASE}/lib/${SCRAM_ARCH}/ -lrecipeAUXOxbridgeMT2 -o $@

LostLepton_MuCS_SingleTop: $(ODIR)/LostLepton_MuCS_SingleTop.o $(ODIR)/NTupleReader.o
$(LD) $^ $(LIBS) -L${CMSSW_BASE}/lib/${SCRAM_ARCH}/ -lrecipeAUXOxbridgeMT2 -o $@

ClosurePlots: $(ODIR)/ClosurePlots.o
$(LD) $^ $(LIBS) -o $@

Expand Down
11 changes: 11 additions & 0 deletions Tool/runList_singletop_flattree.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/eos/uscms/store/group/lpcsusyhad/PHYS14_720_Dec23_2014/malik/T_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/T_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/PHYS14_PU20bx25_PHYS14_25_V1-FLAT/150128_013337/0000/stopFlatNtuples_1.root
/eos/uscms/store/group/lpcsusyhad/PHYS14_720_Dec23_2014/malik/T_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/T_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/PHYS14_PU20bx25_PHYS14_25_V1-FLAT/150128_013337/0000/stopFlatNtuples_2.root
/eos/uscms/store/group/lpcsusyhad/PHYS14_720_Dec23_2014/malik/T_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/T_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/PHYS14_PU20bx25_PHYS14_25_V1-FLAT/150128_013337/0000/stopFlatNtuples_3.root
/eos/uscms/store/group/lpcsusyhad/PHYS14_720_Dec23_2014/malik/T_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/T_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/PHYS14_PU20bx25_PHYS14_25_V1-FLAT/150128_013337/0000/stopFlatNtuples_4.root
/eos/uscms/store/group/lpcsusyhad/PHYS14_720_Dec23_2014/malik/T_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/T_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/PHYS14_PU20bx25_PHYS14_25_V1-FLAT/150128_013337/0000/stopFlatNtuples_5.root
/eos/uscms/store/group/lpcsusyhad/PHYS14_720_Dec23_2014/malik/PU20bx25_Tbar_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/Tbar_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/PHYS14_PU20bx25_PHYS14_25_V1-FLAT/150128_013416/0000/stopFlatNtuples_1.root
/eos/uscms/store/group/lpcsusyhad/PHYS14_720_Dec23_2014/malik/PU20bx25_Tbar_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/Tbar_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/PHYS14_PU20bx25_PHYS14_25_V1-FLAT/150128_013416/0000/stopFlatNtuples_2.root
/eos/uscms/store/group/lpcsusyhad/PHYS14_720_Dec23_2014/malik/PU20bx25_Tbar_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/Tbar_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/PHYS14_PU20bx25_PHYS14_25_V1-FLAT/150128_013416/0000/stopFlatNtuples_3.root
/eos/uscms/store/group/lpcsusyhad/PHYS14_720_Dec23_2014/malik/PU20bx25_Tbar_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/Tbar_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/PHYS14_PU20bx25_PHYS14_25_V1-FLAT/150128_013416/0000/stopFlatNtuples_4.root
/eos/uscms/store/group/lpcsusyhad/PHYS14_720_Dec23_2014/malik/PU20bx25_Tbar_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/Tbar_tW-channel-DR_Tune4C_13TeV-CSA14-powheg-tauola/PHYS14_PU20bx25_PHYS14_25_V1-FLAT/150128_013416/0000/stopFlatNtuples_5.root

2 changes: 1 addition & 1 deletion Tool/runList_ttbar_skimmed_flattree.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/afs/cern.ch/user/h/hua/stop/AllHadronicSUSY/data/stop_ttbar_skimmed_tree.root
/uscms/home/hwei/work/stop/CMSSW_7_2_0/src/flattrees/stop_ttbar_skimmed_tree.root
1 change: 1 addition & 0 deletions Tool/runList_wjets_flattree.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
afdsa

0 comments on commit 6cf3e79

Please sign in to comment.