Skip to content
Snippets Groups Projects
Commit 9b311d5c authored by Jihee Kim's avatar Jihee Kim
Browse files

Debugging

parent 70716ea2
No related branches found
No related tags found
1 merge request!10Electron data set
......@@ -50,7 +50,8 @@ popd
pwd
mkdir -p results
root -b -q "ecal/scripts/makeplot.C(${E_start}, ${E_end}, \"${JUGGLER_DETECTOR}/${JUGGLER_REC_FILE}\", \"results/${JUGGLER_FILE_NAME_TAG}.txt\")"
root -b -q "ecal/scripts/makeplot.C(${E_start}, ${E_end}, \"${JUGGLER_DETECTOR}/${JUGGLER_REC_FILE}\")"
#root -b -q "ecal/scripts/makeplot.C(${E_start}, ${E_end}, \"${JUGGLER_DETECTOR}/${JUGGLER_REC_FILE}\", \"results/${JUGGLER_FILE_NAME_TAG}.txt\")"
#mkdir -p sim_output
#cp "${JUGGLER_DETECTOR}/${JUGGLER_REC_FILE}" sim_output/.
......
......@@ -2,7 +2,8 @@
// Read reconstruction ROOT output file
// Plot variables
////////////////////////////////////////
int makeplot(double e_start = 1.0, double e_end = 1.0, const char* input_fname = "sim_output/sim_emcal_electrons_output.root", const char *fout = "results/rec_1000k_info_1GeV.txt")
//int makeplot(double e_start = 1.0, double e_end = 1.0, const char* input_fname = "sim_output/sim_emcal_electrons_output.root", const char *fout = "results/rec_1000k_info_1GeV.txt")
int makeplot(double e_start = 1.0, double e_end = 1.0, const char* input_fname = "sim_output/sim_emcal_electrons_output.root")
{
// Setting figures
gROOT->SetStyle("Plain");
......@@ -16,9 +17,9 @@ int makeplot(double e_start = 1.0, double e_end = 1.0, const char* input_fname =
gStyle->SetPadRightMargin(0.14);
// Output ASCII file
FILE *fp = fopen(fout,"a");
if(!fp)
fprintf(stderr,"error: can't open %s\n", fout);
//FILE *fp = fopen(fout,"a");
//if(!fp)
// fprintf(stderr,"error: can't open %s\n", fout);
// Input ROOT file
TFile *f = new TFile(input_fname,"READ");
......@@ -126,7 +127,7 @@ int makeplot(double e_start = 1.0, double e_end = 1.0, const char* input_fname =
total_cluster_e += cluster_e;
}
// Writing into ASCII file
fprintf(fp,"%d\t%d\t%2.4f\n",ievent,ncluster,total_cluster_e);
//fprintf(fp,"%d\t%d\t%2.4f\n",ievent,ncluster,total_cluster_e);
// Select events with one cluster
if(ncluster == 1)
......@@ -244,6 +245,6 @@ int makeplot(double e_start = 1.0, double e_end = 1.0, const char* input_fname =
c9->SaveAs("results/electron_hit_pos_all_0GeVto30GeV.png");
c9->SaveAs("results/electron_hit_pos_all_0GeVto30GeV.pdf");
fclose(fp);
//fclose(fp);
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment