File indexing completed on 2024-11-16 09:02:47
0001
0002
0003
0004 R__LOAD_LIBRARY(EpicAnalysis)
0005 #include "PostProcessor.h"
0006
0007
0008 void postprocess_xsecQ(
0009 TString infile="out/xsecQ.crossCheck.root"
0010 ) {
0011
0012
0013
0014
0015 AnalysisDelphes *A = new AnalysisDelphes();
0016 A->diagonalPtXZ = true;
0017
0018
0019 PostProcessor *P = new PostProcessor(infile);
0020
0021
0022 TString tableFile = P->GetPngDir() + "/table_counts_qbins.txt";
0023 P->StartTextFile(tableFile,"Counts and averages in bins of Q2");
0024
0025
0026
0027
0028 for(int bpt : P->GetBinNums("pt")) {
0029 for(int bx : P->GetBinNums("x")) {
0030 for(int bz : P->GetBinNums("z")) {
0031 if(A->CheckDiagonal(bpt,bx,bz,-1)) continue;
0032
0033
0034 P->AppendToTextFile(tableFile,Form("\nKinematic Bin: %d =========================",bpt));
0035
0036
0037 for(int by : P->GetBinNums("y")) {
0038 for(int bfs : P->GetBinNums("finalState")) {
0039
0040
0041 for(int bq : P->GetBinNums("q2")) {
0042
0043
0044 if(P->GetBinCut("q2",bq)->GetCutType()=="Full") continue;
0045
0046
0047 P->DumpAve(
0048 tableFile,
0049 A->GetHistosName(bpt,bx,bz,bq,by,bfs),
0050 "q2");
0051 };
0052
0053
0054
0055 P->FinishDumpAve(tableFile);
0056 }};
0057 }}};
0058
0059
0060 P->PrintTextFile(tableFile);
0061 cout << tableFile << " written" << endl;
0062
0063
0064 P->Finish();
0065 };