Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ CodeCuts/CosBin*
CodeCuts/CosBin17.tex
CodeCuts/Cuts.root
CodeCuts/TAGS
*CodeCuts/MaxLike*

CodeCuts/CosBin*
CodeCuts/MaxLike*
283 changes: 159 additions & 124 deletions CodeCuts/CodeCuts.h

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions CodeCuts/Codigo.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ void Codigo(){

Codecuts Cls;
// Only active the method if CodeCuts SIGMA particle was changed
//Cls.CodeCuts();
Cls.CodeCutsCosBin();
Cls.CodeCutsAsym();
Cls.CodeCuts();
// Cls.CodeCutsCosBin();
// Cls.CodeCutsAsym();
remove("Codigo_C_ACLiC_dict_rdict.pcm");
remove("Codigo_C.d");
remove("Codigo_C.so");
Expand Down
564 changes: 449 additions & 115 deletions CodeCuts/Histograms.h

Large diffs are not rendered by default.

19 changes: 0 additions & 19 deletions CodeCuts/SKIMS/ListFiles.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1 @@
./SKIMS/PARA/skim2_ce13_39_PARA_v3.root
./SKIMS/PARA/skim2_ce13_42_PARA_v3.root
./SKIMS/PARA/skim2_ce15_41_PARA_v3.root
./SKIMS/PARA/skim2_ce15_45_PARA_v3.root
./SKIMS/PARA/skim2_ce17_41_PARA_v3.root
./SKIMS/PARA/skim2_ce17_47_PARA_v3.root
./SKIMS/PARA/skim2_ce19_51_PARA_v3.root
./SKIMS/PARA/skim2_ce21_51_PARA_v3.root
./SKIMS/PARA/skim2_ce21_52_PARA_v3.root
./SKIMS/PARA/skim2_ce23_52_PARA_v3.root
./SKIMS/PERP/skim2_ce13_39_PERP_v3.root
./SKIMS/PERP/skim2_ce13_42_PERP_v3.root
./SKIMS/PERP/skim2_ce15_41_PERP_v3.root
./SKIMS/PERP/skim2_ce15_45_PERP_v3.root
./SKIMS/PERP/skim2_ce17_41_PERP_v3.root
./SKIMS/PERP/skim2_ce17_47_PERP_v3.root
./SKIMS/PERP/skim2_ce19_51_PERP_v3.root
./SKIMS/PERP/skim2_ce21_51_PERP_v3.root
./SKIMS/PERP/skim2_ce21_52_PERP_v3.root
./SKIMS/PERP/skim2_ce23_52_PERP_v3.root
1 change: 1 addition & 0 deletions CodeCuts/include/Libraries.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "Math/Functor.h"
#include "Math/IFunction.h"
#include "TVirtualFitter.h"
#include "TSpectrum.h"

#include <sstream>
#include <iostream>
Expand Down
9 changes: 9 additions & 0 deletions CodeCuts/include/Miscelaneous.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,13 @@ double GetPol(int, double, double, int, double, double);
void GetPolAv(vector<float>,vector<vector<int>>&,vector<vector<double>>&,double);

void GetPolAvTable();

void GetPolAvTableLatex(vector<vector<int>>,vector<vector<double>>,string,string ,string);

void GetEventPercent(vector<int>);

void GetEventPercentLatex(vector<int>,string,string,string);

void GetEventBackgroundSigmaLaTeX(vector<vector<double>>,string,string,string);

#endif
2 changes: 2 additions & 0 deletions CodeCuts/include/TPaveStateModify.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class TPaveStateModify{
vector<TH1*> Histos;
TPaveStats *Pave = NULL;
TList *ListText = NULL;
TText *Const = NULL;
double XSize;
double YSize;
double XStat;
Expand All @@ -40,6 +41,7 @@ class TPaveStateModify{

public:
TPaveStateModify(){}
TPaveStateModify(TH1 *,UInt_t = 1);
TPaveStateModify(TH1 *,TH1 *);
TPaveStateModify(TH1 *,vector<TH1*>);
void BoxOptStatActive(int);
Expand Down
139 changes: 82 additions & 57 deletions CodeCuts/src/Miscelaneous.C
Original file line number Diff line number Diff line change
Expand Up @@ -312,22 +312,22 @@ void GetPolAvTableLatex(vector<vector<int>> ItP,vector<vector<double>> AvP,strin
cout << setprecision(2);
fstream LTXT;
LTXT.open(Path,ios::out);

LTXT << setprecision(2);
LTXT << "\\begin{table}[H]" << endl
<< "\t\\centering" << endl
<< "\t\\begin{tabular}{|c|c|c|c|c|c|}" << endl
<< "\t\\hline" << endl
<< "\t\t$E_{\\gamma}$ Edge (GeV) & Energy Beam (GeV) & $\\bar{P}$ (Para) & N$^{\\circ}$ Events & $\\bar{P}$ (Perp) & N$^{\\circ}$ Events \\\\ \\hline\n"
<< "\t\t" << 1.3 << "\t&" << 4.199 << "\t&" << AvP[0][0]/ItP[0][0] << "\t&" << ItP[0][0] << "\t&" << AvP[0][1]/ItP[0][1] << "\t&" << ItP[0][1] << "\\\\\n"
<< "\t\t" << 1.5 << "\t&" << 4.072 << "\t&" << AvP[1][0]/ItP[1][0] << "\t&" << ItP[1][0] << "\t&" << AvP[1][1]/ItP[1][1] << "\t&" << ItP[1][1] << "\\\\\n"
<< "\t\t" << 1.5 << "\t&" << 4.482 << "\t&" << AvP[2][0]/ItP[2][0] << "\t&" << ItP[2][0] << "\t&" << AvP[2][1]/ItP[2][1] << "\t&" << ItP[2][1] << "\\\\\n"
<< "\t\t" << 1.7 << "\t&" << 4.072 << "\t&" << AvP[3][0]/ItP[3][0] << "\t&" << ItP[3][0] << "\t&" << AvP[3][1]/ItP[3][1] << "\t&" << ItP[3][1] << "\\\\\n"
<< "\t\t" << 1.7 << "\t&" << 4.726 << "\t&" << AvP[4][0]/ItP[4][0] << "\t&" << ItP[4][0] << "\t&" << AvP[4][1]/ItP[4][1] << "\t&" << ItP[4][1] << "\\\\\n"
<< "\t\t" << 1.7 << "\t&" << 4.756 << "\t&" << AvP[5][0]/ItP[5][0] << "\t&" << ItP[5][0] << "\t&" << AvP[5][1]/ItP[5][1] << "\t&" << ItP[5][1] << "\\\\\n"
<< "\t\t" << 1.9 << "\t&" << 5.052 << "\t&" << AvP[6][0]/ItP[6][0] << "\t&" << ItP[6][0] << "\t&" << AvP[6][1]/ItP[6][1] << "\t&" << ItP[6][1] << "\\\\\n"
<< "\t\t" << 2.1 << "\t&" << 5.052 << "\t&" << AvP[7][0]/ItP[7][0] << "\t&" << ItP[7][0] << "\t&" << AvP[7][1]/ItP[7][1] << "\t&" << ItP[7][1] << "\\\\\n"
<< "\t\t" << 2.1 << "\t&" << 5.166 << "\t&" << AvP[8][0]/ItP[8][0] << "\t&" << ItP[8][0] << "\t&" << AvP[8][1]/ItP[8][1] << "\t&" << ItP[8][1] << "\\\\\n"
<< "\t\t" << 2.3 << "\t&" << 5.166 << "\t&" << AvP[9][0]/ItP[9][0] << "\t&" << ItP[9][0] << "\t&" << AvP[9][1]/ItP[9][1] << "\t&" << ItP[9][1] << "\\\\\n"
<< "\t\t$E_{\\gamma}$ (GeV) & $E_{e}$ (GeV) & $\\bar{P}$ (Para) & N$^{\\circ}$ Eventos & $\\bar{P}$ (Perp) & N$^{\\circ}$ Eventos \\\\ \\hline\n"
<< "\t\t$" << 1.3 << "$\t&$" << 4.199 << "$\t&$" << AvP[0][0]/ItP[0][0] << "$\t&$" << ItP[0][0] << "$\t&$" << AvP[0][1]/ItP[0][1] << "$\t&$" << ItP[0][1] << "$\\\\\n"
<< "\t\t$" << 1.5 << "$\t&$" << 4.072 << "$\t&$" << AvP[1][0]/ItP[1][0] << "$\t&$" << ItP[1][0] << "$\t&$" << AvP[1][1]/ItP[1][1] << "$\t&$" << ItP[1][1] << "$\\\\\n"
<< "\t\t$" << 1.5 << "$\t&$" << 4.482 << "$\t&$" << AvP[2][0]/ItP[2][0] << "$\t&$" << ItP[2][0] << "$\t&$" << AvP[2][1]/ItP[2][1] << "$\t&$" << ItP[2][1] << "$\\\\\n"
<< "\t\t$" << 1.7 << "$\t&$" << 4.072 << "$\t&$" << AvP[3][0]/ItP[3][0] << "$\t&$" << ItP[3][0] << "$\t&$" << AvP[3][1]/ItP[3][1] << "$\t&$" << ItP[3][1] << "$\\\\\n"
<< "\t\t$" << 1.7 << "$\t&$" << 4.726 << "$\t&$" << AvP[4][0]/ItP[4][0] << "$\t&$" << ItP[4][0] << "$\t&$" << AvP[4][1]/ItP[4][1] << "$\t&$" << ItP[4][1] << "$\\\\\n"
<< "\t\t$" << 1.7 << "$\t&$" << 4.756 << "$\t&$" << AvP[5][0]/ItP[5][0] << "$\t&$" << ItP[5][0] << "$\t&$" << AvP[5][1]/ItP[5][1] << "$\t&$" << ItP[5][1] << "$\\\\\n"
<< "\t\t$" << 1.9 << "$\t&$" << 5.052 << "$\t&$" << AvP[6][0]/ItP[6][0] << "$\t&$" << ItP[6][0] << "$\t&$" << AvP[6][1]/ItP[6][1] << "$\t&$" << ItP[6][1] << "$\\\\\n"
<< "\t\t$" << 2.1 << "$\t&$" << 5.052 << "$\t&$" << AvP[7][0]/ItP[7][0] << "$\t&$" << ItP[7][0] << "$\t&$" << AvP[7][1]/ItP[7][1] << "$\t&$" << ItP[7][1] << "$\\\\\n"
<< "\t\t$" << 2.1 << "$\t&$" << 5.166 << "$\t&$" << AvP[8][0]/ItP[8][0] << "$\t&$" << ItP[8][0] << "$\t&$" << AvP[8][1]/ItP[8][1] << "$\t&$" << ItP[8][1] << "$\\\\\n"
<< "\t\t$" << 2.3 << "$\t&$" << 5.166 << "$\t&$" << AvP[9][0]/ItP[9][0] << "$\t&$" << ItP[9][0] << "$\t&$" << AvP[9][1]/ItP[9][1] << "$\t&$" << ItP[9][1] << "$\\\\\n"
<< "\t\t\\hline" << endl
<< "\t\\end{tabular}" << endl
<< "\t\\caption{" << Caption << "}" << endl
Expand Down Expand Up @@ -367,55 +367,80 @@ void GetEventPercent(vector<int> Events){
void GetEventPercentLatex(vector<int> Events,string Path,string Caption,string Label){
fstream LTXT;
LTXT.open(Path,ios::out);

LTXT << setprecision(4);
LTXT << "\\begin{table}[H]" << endl
<< "\t\\centering" << endl
<< "\t\\begin{tabular}{|c|c|c|c|}" << endl
<< "\t\t\\hline" << endl
<< "\t\tSection" << setw(43-7) <<"\t&" << "Cut done"
<< setw(33-8) << "\t&" << "Events" << "\t&" << "Events Percent $\\%$" << "\\\\\\hline\n"
<< "\t\t" << setw(43) <<"\t&" << "Initial Events"
<< setw(33-14) << "\t&" << Events[0] << "\t&" << double(Events[0]*100)/double(Events[0]) << "\\\\\n"
<< "\t\tVertex Cut" << setw(43-10) <<"\t&" << "Vertex \\textit{z} of $K^{+}$"
<< setw(33-28) << "\t&" << Events[1] << "\t&" << double(Events[1]*100)/double(Events[0]) << "\\\\\n"
<< "\t\t" << setw(43) <<"\t&" << "$\\Delta \\beta$ to $\\pi^{-}$"
<< setw(33-27) << "\t&" << Events[2] << "\t&" << double(Events[2]*100)/double(Events[0]) << "\\\\\n"
<< "\t\tParticle Identification" << setw(43-23) <<"\t&" << "$\\Delta \\beta$ to $p$"
<< setw(33-21) << "\t&" << Events[3] << "\t&" << double(Events[3]*100)/double(Events[0]) << "\\\\\n"
<< "\t\t" << setw(43) <<"\t&" << "$\\Delta \\beta$ to $K^{+}$"
<< setw(33-25) << "\t&" << Events[4] << "\t&" << double(Events[4]*100)/double(Events[0]) << "\\\\\n"
<< "\t\t$\\Delta t$ cut to most "
<< "likely photon" << setw(43-36) <<"\t&" << "$-1.0 < \\Delta t_{K^{+}} < 1.0$"
<< "\t&" << Events[5] << "\t&" << double(Events[5]*100)/double(Events[0]) << "\\\\\n"
<< "\t\t" << setw(43) <<"\t&" << "$\\phi_{p}$ cut"
<< setw(33-14) << "\t&" << Events[6] << "\t&" << double(Events[6]*100)/double(Events[0]) << "\\\\\n"
<< "\t\tFiduacial cuts" << setw(43-14) <<"\t&" << "$\\phi_{K^{+}}$ cut"
<< setw(33-18) << "\t&" << Events[7] << "\t&" << double(Events[7]*100)/double(Events[0]) << "\\\\\n"
<< "\t\t" << setw(43) <<"\t&" << "$\\phi_{\\pi^{-}}$ cut"
<< setw(33-20) << "\t&" << Events[8] << "\t&" << double(Events[8]*100)/double(Events[0]) << "\\\\\n"
<< "\t\t" << setw(43) <<"\t&" << "1"
<< setw(33-1) << "\t&" << Events[9] << "\t&" << double(Events[9]*100)/double(Events[0]) << "\\\\\n"
<< "\t\t" << setw(43) <<"\t&" << "2"
<< setw(33-1) << "\t&" << Events[10] << "\t&" << double(Events[10]*100)/double(Events[0]) << "\\\\\n"
<< "\t\tTager Epho" << setw(43-10) <<"\t&" << "3"
<< setw(33-1) << "\t&" << Events[11] << "\t&" << double(Events[11]*100)/double(Events[0]) << "\\\\\n"
<< "\t\t" << setw(43) <<"\t&" << "4"
<< setw(33-1) << "\t&" << Events[12] << "\t&" << double(Events[12]*100)/double(Events[0]) << "\\\\\n"
<< "\t\t" << setw(43) <<"\t&" << "5"
<< setw(33-1) << "\t&" << Events[13] << "\t&" << double(Events[13]*100)/double(Events[0]) << "\\\\\n"
<< "\t\tPhoto Pol" << setw(43-9) <<"\t&" << "Menor a 0.5"
<< setw(33-11) << "\t&" << Events[14] << "\t&" << double(Events[14]*100)/double(Events[0]) << "\\\\\n"
<< "\t\tKaones no Piones" << setw(43-16) <<"\t&" << ""
<< setw(33) << "\t&" << Events[15] << "\t&" << double(Events[15]*100)/double(Events[0]) << "\\\\\n"
<< "\t\tBackground remove by "
<< "$K^{+}\\Lambda^{0}$" << setw(43-39) << "\t&" << "Invariant Mass (8$\\sigma$)"
<< setw(33-26) << "\t&" << Events[16] << "\t&" << double(Events[16]*100)/double(Events[0]) << "\\\\\n"
<< "\t\tRescattering remove by "
<< "$K^{+}\\Lambda^{0}n$" << "\t&" << "Cut in the Missing Momentum"
<< setw(33-27) << "\t&" << Events[18] << "\t&" << double(Events[18]*100)/double(Events[0]) << "\\\\\n"
<< "\t\tBackground remove by "
<< "$K^{+}\\Lambda^{0}n$" << "\t&" << "it is in the code"
<< setw(33-17) << "\t&" << Events[17] << "\t&" << double(Events[17]*100)/double(Events[0]) << "\\\\\n"
<< "\t\tSección" << setw(43-7) <<"\t&" << "Corte realizado"
<< setw(33-8) << "\t&" << "Eventos" << "\t&" << "Porcentaje de eventos $\\%$" << "\\\\\\hline\n"
<< "\t\t" << setw(43) <<"\t&" << "Eventos iniciales"
<< setw(33-14) << "\t&$" << Events[0] << "$\t&$" << double(Events[0]*100)/double(Events[0]) << "$\\\\\n"
<< "\t\tCorte Vértice" << setw(43-10) <<"\t&" << "Vértice \\textit{z} para $K^{+}$"
<< setw(33-28) << "\t&$" << Events[1] << "$\t&$" << double(Events[1]*100)/double(Events[0]) << "$\\\\\n"
<< "\t\t" << setw(43) <<"\t&" << "$\\Delta \\beta$ para $\\pi^{-}$"
<< setw(33-27) << "\t&$" << Events[2] << "$\t&$" << double(Events[2]*100)/double(Events[0]) << "$\\\\\n"
<< "\t\tIdentificación de partículas" << setw(43-23) <<"\t&" << "$\\Delta \\beta$ para $p$"
<< setw(33-21) << "\t&$" << Events[3] << "$\t&$" << double(Events[3]*100)/double(Events[0]) << "$\\\\\n"
<< "\t\t" << setw(43) <<"\t&" << "$\\Delta \\beta$ para $K^{+}$"
<< setw(33-25) << "\t&$" << Events[4] << "$\t&$" << double(Events[4]*100)/double(Events[0]) << "$\\\\\n"
<< "\t\tCorte $\\Delta t$ para el "
<< "fotón mas probable" << setw(43-36) <<"\t&" << "$-1.0 < \\Delta t_{K^{+}} < 1.0$"
<< "\t&$" << Events[5] << "$\t&$" << double(Events[5]*100)/double(Events[0]) << "$\\\\\n"
<< "\t\t" << setw(43) <<"\t&" << "Corte $\\phi_{K^{+}}$"
<< setw(33-14) << "\t&$" << Events[6] << "$\t&$" << double(Events[6]*100)/double(Events[0]) << "$\\\\\n"
<< "\t\tCortes geométricos" << setw(43-14) <<"\t&" << "$Corte \\phi_{p}$"
<< setw(33-18) << "\t&$" << Events[7] << "$\t&$" << double(Events[7]*100)/double(Events[0]) << "$\\\\\n"
<< "\t\t" << setw(43) <<"\t&" << "$Corte \\phi_{\\pi^{-}}$"
<< setw(33-20) << "\t&$" << Events[8] << "$\t&$" << double(Events[8]*100)/double(Events[0]) << "$\\\\\n"
// << "\t\t" << setw(43) <<"\t&" << "1"
// << setw(33-1) << "\t&$" << Events[9] << "$\t&$" << double(Events[9]*100)/double(Events[0]) << "$\\\\\n"
// << "\t\t" << setw(43) <<"\t&" << "2"
// << setw(33-1) << "\t&$" << Events[10] << "\t&" << double(Events[10]*100)/double(Events[0]) << "$\\\\\n"
// << "\t\tTager Epho" << setw(43-10) <<"\t&" << "3"
// << setw(33-1) << "\t&$" << Events[11] << "\t&" << double(Events[11]*100)/double(Events[0]) << "$\\\\\n"
// << "\t\t" << setw(43) <<"\t&" << "4"
// << setw(33-1) << "\t&$" << Events[12] << "\t&" << double(Events[12]*100)/double(Events[0]) << "$\\\\\n"
// << "\t\t" << setw(43) <<"\t&" << "5"
// << setw(33-1) << "\t&$" << Events[13] << "\t&" << double(Events[13]*100)/double(Events[0]) << "$\\\\\n"
// << "\t\tPhoto Pol" << setw(43-9) <<"\t&" << "Menor a 0.5"
// << setw(33-11) << "\t&$" << Events[14] << "\t&" << double(Events[14]*100)/double(Events[0]) << "$\\\\\n"
<< "\t\tPiones mal identificados" << setw(43-16) <<"\t&" << ""
<< setw(33) << "\t&$" << Events[9] << "$\t&$" << double(Events[9]*100)/double(Events[0]) << "$\\\\\n"
<< "\t\tRuido proveniente de otros canales" << setw(43-16) <<"\t&" << ""
<< setw(33) << "\t&$" << Events[10] << "$\t&$" << double(Events[10]*100)/double(Events[0]) << "$\\\\\n"
<< "\t\tRuido proveniente de "
<< "$K^{+}\\Lambda^{0}n$" << setw(43-39) << "\t&" << "Masa invariante (8$\\sigma$)"
<< setw(33-26) << "\t&$" << Events[11] << "$\t&$" << double(Events[11]*100)/double(Events[0]) << "$\\\\\n"
<< "\t\tRedispersión proveniente de "
<< "$K^{+}\\Lambda^{0}n$" << "\t&" << "Corte en el Missing momentum"
<< setw(33-27) << "\t&$" << Events[12] << "$\t&$" << double(Events[12]*100)/double(Events[0]) << "$\\\\\n"
<< "\t\t\\hline" << endl
<< "\t\\end{tabular}" << endl
<< "\t\\caption{" << Caption << "}" << endl
<< "\t\\label{tab:" << Label << "}" << endl
<< "\\end{table}" << endl;

cout << "We Create: " << Path.substr(Path.find_last_of("/")+1,Path.size()-Path.find_last_of("/")) << endl;
LTXT.close();
}

void GetEventBackgroundSigmaLaTeX(vector<vector<double>> Events,string Path,string Caption,string Label){
fstream LTXT;
LTXT.open(Path,ios::out);

LTXT << "\\begin{table}[H]" << endl
<< "\t\\centering" << endl
<< "\t\\begin{tabular}{|c|c|c|}" << endl
<< "\t\t\\hline" << endl
<< "\t\t$\\Sigma^{-}$ Signal" << setw(43-7) << "\t&" << "Background"
<< "\t&" << "Events Background / Events $\\Sigma^{-}$ * 100 $\\%$" << "\\\\\\hline\n"
<< "\t\t" << "$1.1-1.3$" << "\t&$" << Events[0][0] << "$\t&$" << Events[1][0] << "$\t&$" << double(Events[1][0])/double(Events[0][0]) << "$\\\\\n"
<< "\t\t" << "$1.3-1.5$" << "\t&$" << Events[0][1] << "$\t&$" << Events[1][1] << "$\t&$" << double(Events[1][1])/double(Events[0][1]) << "$\\\\\n"
<< "\t\t" << "$1.5-1.7$" << "\t&$" << Events[0][2] << "$\t&$" << Events[1][2] << "$\t&$" << double(Events[1][2])/double(Events[0][2]) << "$\\\\\n"
<< "\t\t" << "$1.7-1.9$" << "\t&$" << Events[0][3] << "$\t&$" << Events[1][3] << "$\t&$" << double(Events[1][3])/double(Events[0][3]) << "$\\\\\n"
<< "\t\t" << "$1.9-2.1$" << "\t&$" << Events[0][4] << "$\t&$" << Events[1][4] << "$\t&$" << double(Events[1][4])/double(Events[0][4]) << "$\\\\\n"
<< "\t\t" << "$2.1-2.3$" << "\t&$" << Events[0][5] << "$\t&$" << Events[1][5] << "$\t&$" << double(Events[1][5])/double(Events[0][5]) << "$\\\\\n"
<< "\t\t\\hline" << endl
<< "\t\\end{tabular}" << endl
<< "\t\\caption{" << Caption << "}" << endl
Expand Down
41 changes: 36 additions & 5 deletions CodeCuts/src/TPaveStateModify.C
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,54 @@

using namespace std;

TPaveStateModify::TPaveStateModify(TH1 *PH,UInt_t L){
PrincipalHisto=PH;
Histos.push_back(PH);
gPad->Update();
Pave = (TPaveStats*)PrincipalHisto->FindObject("stats");
Pave->SetName("mystats");
ListText = Pave->GetListOfLines();

switch(L){
case 1:
Const = Pave->GetLineWith("Entries");
ListText->Remove(Const);
break;
case 2:
Const = Pave->GetLineWith("Entries");
ListText->Remove(Const);
Const = Pave->GetLineWith("Mean");
ListText->Remove(Const);
break;
}


}


TPaveStateModify::TPaveStateModify(TH1 *PH,TH1 *SH){
PrincipalHisto=PH;
Histos.push_back(PH);
Histos.push_back(SH);
gPad->Update();
Pave = (TPaveStats*)PrincipalHisto->FindObject("stats");
Pave->SetName("mystats");
ListText = Pave->GetListOfLines();
Const = Pave->GetLineWith("Entries");
ListText->Remove(Const);
}


TPaveStateModify::TPaveStateModify(TH1 *PH,vector<TH1*> SH){
PrincipalHisto=PH;
Histos = SH;
Histos.push_back(PH);
for (UInt_t i = 0; i < SH.size(); i++) Histos.push_back(SH[i]);
gPad->Update();
Pave = (TPaveStats*)PrincipalHisto->FindObject("stats");
Pave->SetName("mystats");
ListText = Pave->GetListOfLines();
Const = Pave->GetLineWith("Entries");
ListText->Remove(Const);
}

void TPaveStateModify::BoxOptStatActive(int it){
Expand Down Expand Up @@ -202,7 +233,7 @@ void TPaveStateModify::BoxOptStat(string TS,int Precision){
Obj << m;
StrObj = Obj.str();

STR = "Mean = " + StrObj;
STR = "Valor medio = " + StrObj;
myt = new TLatex(0,0,STR.c_str());
myt ->SetTextFont(42);
myt ->SetTextSize(TextSize);
Expand All @@ -217,7 +248,7 @@ void TPaveStateModify::BoxOptStat(string TS,int Precision){
Obj << M;
StrObj = Obj.str();

STR = "Mean Error = " + StrObj;
STR = "Error medio = " + StrObj;
myt = new TLatex(0,0,STR.c_str());
myt ->SetTextFont(42);
myt ->SetTextSize(TextSize);
Expand All @@ -232,7 +263,7 @@ void TPaveStateModify::BoxOptStat(string TS,int Precision){
Obj << e;
StrObj = Obj.str();

STR = "Entries = " + StrObj;
STR = "Entradas = " + StrObj;
myt = new TLatex(0,0,STR.c_str());
myt ->SetTextFont(42);
myt ->SetTextSize(TextSize);
Expand All @@ -241,7 +272,7 @@ void TPaveStateModify::BoxOptStat(string TS,int Precision){
break;

case 'n':
STR = "Name = " + n;
STR = "Nombre = " + n;
myt = new TLatex(0,0,STR.c_str());
myt ->SetTextFont(42);
myt ->SetTextSize(TextSize);
Expand Down