#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 > 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->TomLikehisdata(); 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->SavePlots(); //SA->LoadPlots(); //SA->GetHistSets()->SetInnateColors(); //SA->ScaleHistSets(); SA->DrawScaledPlots("HIST BOX"); //SA->DrawPlots("HIST"); SA->DrawRickPlots(); SA->NN(); //TD at present just saves the trees for TMVA. //SA->TMVAnalysis(); //SA->JetNet(); SA->likelihood(true);//TD simulation SA->likelihood(false);//TD Data //SA->TomLikelihood7708(); SA->TomLikelihoodTop(); /*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->TomLikelihoodemu(); //SA->TomLikelihoodDetailed(10);//detailed is a 'per-dilepton' analysis (depricated due to empty histograms) //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->PrintAcceptances(AcceptanceTexfile); if(start) { higgsacceptances.push_back(SA->getDatasets());//TD this fills in the first column of the vector once, they being the row lables. 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 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}"<