#ifndef GUARD_TDANA #define GUARD_TDANA //#include "TDHistSet.hh" //#include "Histtest.hh" #include "TDSuperAna.hh" #include //#include #include "TDExcelPlot.hh" #include "TDCanvMan.hh" #include std::ostream& TexTable(std::ostream& os, std::vector > thetable, char * caption) { int cols=thetable.size(); int rows=(thetable[0]).size(); std::string colstring="|l||"; for(int c=0;c!=cols-1;++c)colstring+="c|"; os<<" \\begin{table}[H] \\begin{sideways}"< >::iterator col=thetable.begin(); col!=thetable.end(); ++col) { if(col!=thetable.begin())os<<" & "; os<<(*col)[row]; } os<<" \\\\ "< > higgsacceptances; //TD vectors to store table information until all the mass points are done. std::vector > higgsacceptances2; std::vector > likelihoodvector;//TD vectors to store table information until all the mass points are done. bool start=true; // for(int higgsmass=110; higgsmass!=210; higgsmass+=10) //TD to loop over mass points // { //for(int weightype=0; weightype<3; ++weightype) //TD to loop over weights - check that this still works, and that they are properly labled. //{ // //int higgsmass=160; //td normally 160 int higgsmass=mass; int weightype=2; TDSuperAna *SA=new TDSuperAna(false,"/data/nglas08/b/stdenis/hww_1fb_results/", diltype, AnaTextFile, weightype, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile, CutTableTexFile, higgsmass); //SA->mirclikelihood(true); // to test whether getting the limit from loaded histograms works SA->RunSubAnas(); SA->XSroutine2(); //not clear, I know; corresponds to 20-20 et cuts SA->XSroutine3(); //not clear, I know; corresponds to 20-10 et cuts SA->XSroutine4(); //not clear, I know; corresponds to 20-10 BUT NOT 20-20 et cuts ( abit useless due to lack of stats.) ////SA->XSroutine(); //old xs method (uses histograms and was more difficult to use.) SA->GetHistSets()->SetInnateColors(); SA->DrawUnscaledPlots("HIST BOX"); SA->ScaleHistSets(); SA->GetSRB("MVA_TMlpANN_fine_ee", "MVA_TMlpANN_fine_ee_srb"); SA->GetSRB("MVA_TMlpANN_fine_emu", "MVA_TMlpANN_fine_emu_srb"); SA->GetSRB("MVA_TMlpANN_fine_mumu", "MVA_TMlpANN_fine_mumu_srb"); SA->GetSRDYB("MVA_TMlpANN_fine_ee", "MVA_TMlpANN_fine_ee_srdyb"); SA->GetSRDYB("MVA_TMlpANN_fine_emu", "MVA_TMlpANN_fine_emu_srdyb"); SA->GetSRDYB("MVA_TMlpANN_fine_mumu", "MVA_TMlpANN_fine_mumu_srdyb"); //SA->GetUCSD("MVA2_TMlpANN_cut1","MVA2_TMlpANN_cut1_ucsd"); SA->SavePlots(); /*SA->LoadPlots(); SA->GetSRB("MVA_TMlpANN_fine_ee", "MVA_TMlpANN_fine_ee_srb"); SA->GetSRB("MVA_TMlpANN_fine_emu", "MVA_TMlpANN_fine_emu_srb"); SA->GetSRB("MVA_TMlpANN_fine_mumu", "MVA_TMlpANN_fine_mumu_srb"); SA->GetSRDYB("MVA_TMlpANN_fine_ee", "MVA_TMlpANN_fine_ee_srdyb"); SA->GetSRDYB("MVA_TMlpANN_fine_emu", "MVA_TMlpANN_fine_emu_srdyb"); SA->GetSRDYB("MVA_TMlpANN_fine_mumu", "MVA_TMlpANN_fine_mumu_srdyb"); SA->GetHistSets()->SetInnateColors();*/ // SA->ScaleHistSets(); SA->DrawScaledPlots("HIST BOX"); //SA->DrawPlots("HIST"); // SA->DrawRickPlots(); //SA->TomLikehisdata(); //SA->NN(); //TD at present just saves the trees for TMVA. //SA->TMVAnalysis(); //this does not work - it was an attempt to run the TMVA training in the program. //SA->JetNet(); //have not checked whether this works for a while //SA->likelihood(true);//TD simulation 7708 code //SA->likelihood(false);//TD Data 7708 code //SA->TomLikelihood7708(); //uses tom's method with 7708 systematics //SA->TomLikelihoodTop(); //uses tom's method with his systematics /*SA->TomLikelihoodTop("MVA2_CFMlpANN_cut2_0"); SA->TomLikelihoodTop("MVA2_CFMlpANN_cut2_1"); SA->TomLikelihoodTop("MVA2_CFMlpANN_cut2_2"); SA->TomLikelihoodTop("MVA2_CFMlpANN_cut2_3"); SA->TomLikelihoodTop("MVA2_CFMlpANN_cut2_4"); SA->TomLikelihoodTop("MVA2_CFMlpANN_cut2_5"); SA->TomLikelihoodTop("MVA2_CFMlpANN_cut2_6");*/ //SA->TomLikelihoodTop("MVA2_CFMlpANN_cut2_7"); /*SA->TomLikelihoodTop("MVA2_CFMlpANN_cut2_8"); SA->TomLikelihoodTop("MVA2_CFMlpANN_cut2_9");*/ //SA->TomLikelihoodTop("dilDR"); //SA->TomLikelihoodTop("dilDphi_TMVA"); // SA->TomLikelihoodTop("MVA2_TMlpANN_cut1", false); //SA->TomLikelihoodTop2D("MVA2_TMlpANN_2D", true); //"true" indicates that the lengthy frequentist method is to be used too. //SA->TomLikelihoodTop2D("MVA2_TMlpANN_2D_binexp"); //SA->TomLikelihoodTop2D("MVA2_TMlpANN_2D_small", true); SA->TomLikelihoodemu_justtheerrorplots(); //draws the error plots used in TomLikelihoodemu. SA->TomLikelihoodemu_NN_justtheerrorplots(); //SA->TomLikelihoodemu(); // SA->TomLikelihoodDilDphi(false); // SA->TMLP2_justtheerrorplots(); // SA->TomLikelihoodNNnp(false); // SA->TomLikelihoodNNshape(false); //isthis still available? SA->TomLikelihood_NN_shape_emu(); // SA->TomLikelihood_NN_shape_emu_wgamma(); //SA->TomLikelihoodDetailed(10);//detailed is a 'per-dilepton' analysis (depricated due to empty histograms (low stats)) //SA->TomLikelihoodDetailed(20);//the number is the binning of the histograms - this was a test at one point. SA->WWXS(); // TD estimates the WW XS. gives a ratio of the integrals of the histograms SA->GetMaxEtCutError(); SA->GetNNDYCutError(); SA->GetMetSigCutEff(); SA->PrintAcceptances(AcceptanceTexfile); SA->PrintAcceptances2(AcceptanceTexfile); SA->PrintAcceptances3(AcceptanceTexfile); SA->PrintNNAcceptances3(AcceptanceTexfile); SA->PrintAcceptances2Generic(AcceptanceTexfile, "MVA2_TMlpANN_cut1_samesign", "MVA2_TMlpANN_cut1_samesign_ee", "MVA2_TMlpANN_cut1_samesign_emu", "MVA2_TMlpANN_cut1_samesign_mumu"); SA->PrintAcceptances2Generic(AcceptanceTexfile, "WWmetmag", "WWmetmag_ee", "WWmetmag_emu","WWmetmag_mumu"); SA->PrintAcceptances2Generic(AcceptanceTexfile, "MVA2_TMlpANN_cut1_samesign_cmupcmup", "MVA2_TMlpANN_cut1_samesign_cmupcmup", "MVA2_TMlpANN_cut1_samesign_cmupcmup", "MVA2_TMlpANN_cut1_samesign_cmupcmup"); SA->PrintAcceptances2Generic(AcceptanceTexfile, "MVA2_TMlpANN_cut1_samesign_tcetce", "MVA2_TMlpANN_cut1_samesign_tcetce", "MVA2_TMlpANN_cut1_samesign_tcetce", "MVA2_TMlpANN_cut1_samesign_tcetce"); /* SA->PrintAcceptances2Generic(AcceptanceTexfile, "HighMllControlNNDYCut_dildphi", "HighMllControlNNDYCut_dildphi_ee", "HighMllControlNNDYCut_dildphi_emu", "HighMllControlNNDYCut_dildphi_mumu"); //hists1 SA->PrintAcceptances2Generic(AcceptanceTexfile, "ZPeakNNInputVar_dildphi", "ZPeakNNInputVar_dildphi_ee", "ZPeakNNInputVar_dildphi_emu", "ZPeakNNInputVar_dildphi_mumu"); //hists1 SA->PrintAcceptances2Generic(AcceptanceTexfile, "ZPeakNNDYCut_dildphi", "ZPeakNNDYCut_dildphi_ee", "ZPeakNNDYCut_dildphi_emu", "ZPeakNNDYCut_dildphi_mumu"); //hists1 SA->PrintAcceptances2Generic(AcceptanceTexfile, "HighMllControlNNInputVar_dildphi", "HighMllControlNNInputVar_dildphi_ee", "HighMllControlNNInputVar_dildphi_emu", "HighMllControlNNInputVar_dildphi_mumu"); //hists1 */ /* SA->PrintAcceptances2Generic(AcceptanceTexfile, "NNInputVar_dildphi", "NNInputVar_dildphi_ee", "NNInputVar_dildphi_emu", "NNInputVar_dildphi_mumu");//hists2 SA->PrintAcceptances2Generic(AcceptanceTexfile, "NNDYCut_dildphi", "NNDYCut_dildphi_ee", "NNDYCut_dildphi_emu", "NNDYCut_dildphi_mumu");//hists2 SA->PrintAcceptances2Generic(AcceptanceTexfile, "LepEtControlNNInputVar_dildphi", "LepEtControlNNInputVar_dildphi_ee", "LepEtControlNNInputVar_dildphi_emu", "LepEtControlNNInputVar_dildphi_mumu"); //hists2 SA->PrintAcceptances2Generic(AcceptanceTexfile, "LepEtControlNNDYCut_dildphi", "LepEtControlNNDYCut_dildphi_ee", "LepEtControlNNDYCut_dildphi_emu", "LepEtControlNNDYCut_dildphi_mumu"); //hists2 */ /* SA->PrintAcceptances2Generic(AcceptanceTexfile, "WWNNlowCut_dildphi", "WWNNlowCut_dildphi_ee", "WWNNlowCut_dildphi_emu", "WWNNlowCut_dildphi_mumu"); //hists3 SA->PrintAcceptances2Generic(AcceptanceTexfile, "WWNNmidCut_dildphi", "WWNNmidCut_dildphi_ee", "WWNNmidCut_dildphi_emu", "WWNNmidCut_dildphi_mumu"); //hists3 SA->PrintAcceptances2Generic(AcceptanceTexfile, "WWNNhighCut_dildphi", "WWNNhighCut_dildphi_ee", "WWNNhighCut_dildphi_emu", "WWNNhighCut_dildphi_mumu"); //hists3 */ /* SA->PrintAcceptances2Generic(AcceptanceTexfile, "LowMllControlNNInputVar_dildphi", "LowMllControlNNInputVar_dildphi_ee", "LowMllControlNNInputVar_dildphi_emu", "LowMllControlNNInputVar_dildphi_mumu");//hists4 SA->PrintAcceptances2Generic(AcceptanceTexfile, "LowMllControlNNDYCut_dildphi", "LowMllControlNNDYCut_dildphi_ee", "LowMllControlNNDYCut_dildphi_emu", "LowMllControlNNDYCut_dildphi_mumu");//hists4 SA->PrintAcceptances2Generic(AcceptanceTexfile, "NNDYCutMid_dildphi", "NNDYCutMid_dildphi_ee", "NNDYCutMid_dildphi_emu", "NNDYCutMid_dildphi_mumu");//hists4 */ /* SA->PrintAcceptances2Generic(AcceptanceTexfile, "LMetHMetSNNInputVar_dildphi", "LMetHMetSNNInputVar_dildphi_ee", "LMetHMetSNNInputVar_dildphi_emu", "LMetHMetSNNInputVar_dildphi_mumu");//hists5 SA->PrintAcceptances2Generic(AcceptanceTexfile, "LMetSHMetNNInputVar_dildphi", "LMetSHMetNNInputVar_dildphi_ee", "LMetSHMetNNInputVar_dildphi_emu", "LMetSHMetNNInputVar_dildphi_mumu");//hists5 */ SA->doKS(); if(start) { higgsacceptances.push_back(SA->getDatasets());//TD this fills in the first column of the vector once, they being the row lables. higgsacceptances2.push_back(SA->getDatasets()); likelihoodvector.push_back(SA->GetLikelihoodTypes()); //TD this fills in the first column of the vector, they being the row lables. start=false; } likelihoodvector.push_back(SA->GetLikelihoodValues());//TD these vectors build the columns up of the tables they suppy std::cout<<"likelihoodvector.size()"<getAcceptanceVector());//TD these vectors build the columns up of the tables they suppy higgsacceptances2.push_back(SA->getAcceptanceVector2()); //SA->TomLikelihoodemu(); delete SA; // } //} std::cout<<" end likelihoodvector.size()"<200) mass=160; // return 0; std::ofstream AnaTextFile; std::ofstream ExcelTextFile; std::ofstream ExcelDataFile; std::ofstream ExcelMassFile; std::ofstream CutTableFile; std::ofstream CutTableTexFile; AnaTextFile.open("results/AnaTextFile.txt"); ExcelTextFile.open("results/ExcelTextFile.txt"); ExcelDataFile.open("results/ExcelDataFile.txt"); ExcelMassFile.open("results/ExcelMassFile.txt"); CutTableFile.open("results/CutTableFile.txt"); CutTableTexFile.open("results/CutTableTexFile.tex"); setupTex(CutTableTexFile); //for(int diltype=0; diltype<31; ++diltype) runSuperAna(diltype, AnaTextFile, ExcelTextFile, ExcelDataFile); runSuperAna(-1, AnaTextFile, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile, CutTableTexFile, mass); //runSuperAna(1, AnaTextFile, ExcelTextFile, ExcelDataFile); /*runSuperAna(0, AnaTextFile, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile); runSuperAna(1, AnaTextFile, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile); :runSuperAna(17, AnaTextFile, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile); runSuperAna(18, AnaTextFile, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile); runSuperAna(19, AnaTextFile, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile); runSuperAna(20, AnaTextFile, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile); runSuperAna(21, AnaTextFile, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile); runSuperAna(22, AnaTextFile, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile); runSuperAna(23, AnaTextFile, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile); runSuperAna(24, AnaTextFile, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile); runSuperAna(25, AnaTextFile, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile); runSuperAna(29, AnaTextFile, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile); runSuperAna(30, AnaTextFile, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile); runSuperAna(31, AnaTextFile, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile);*/ //runSuperAna(32, AnaTextFile, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile, CutTableTexFile); //runSuperAna(33, AnaTextFile, ExcelTextFile, ExcelDataFile, ExcelMassFile, CutTableFile, CutTableTexFile); AnaTextFile.close(); ExcelTextFile.close(); ExcelDataFile.close(); ExcelMassFile.close(); CutTableFile.close(); CutTableTexFile<<" \\end{document}"<