10 gStyle->SetOptStat(0);
12 unsigned col_ele = kBlue+2;
13 unsigned col_cpi = kOrange+7;
16 TChain chain(
"event");
17 chain.Add(
"eicana_disreco_nc_1k.root");
20 TCanvas* ctemp =
new TCanvas();
22 vector< TString > observables;
23 vector< TString > observables_name;
25 vector< float > plots_ymax;
26 vector< float > plots_xmin;
27 vector< float > plots_xmax;
30 observables.push_back(
"em_evtgen_eta" );
31 observables_name.push_back(
"#eta_{true}" );
32 plots_ymax.push_back(0.3);
33 plots_xmin.push_back(-5.);
34 plots_xmax.push_back(5.);
37 observables.push_back(
"-1*log(tan(em_cluster_theta/2.0))" );
38 observables_name.push_back(
"#eta_{cluster}" );
39 plots_ymax.push_back(0.3);
40 plots_xmin.push_back(-5.);
41 plots_xmax.push_back(5.);
44 observables.push_back(
"em_cluster_prob" );
45 observables_name.push_back(
"em_cluster probablility" );
46 plots_ymax.push_back(0.3);
47 plots_xmin.push_back(0.0);
48 plots_xmax.push_back(1.0);
51 observables.push_back(
"em_cluster_e / em_track_ptotal" );
52 observables_name.push_back(
"E/p" );
53 plots_ymax.push_back(0.3);
54 plots_xmin.push_back(0.0);
55 plots_xmax.push_back(100.0);
58 TString name_ele_base(
"h_ele_");
59 TString name_cpi_base(
"h_cpi_");
61 for (
unsigned i = 0;
i < observables.size();
i++ )
63 cout <<
"Plotting " << observables.at(
i) << endl;
67 TString name_ele_i = name_ele_base;
70 TString name_cpi_i = name_cpi_base;
73 TH1F* h_ele =
new TH1F( name_ele_i,
"", 100, plots_xmin.at(
i), plots_xmax.at(
i));
74 TH1F* h_cpi =
new TH1F( name_cpi_i,
"", 100, plots_xmin.at(
i), plots_xmax.at(
i));
77 h_ele->Scale(1./h_ele->Integral());
78 h_ele->GetXaxis()->SetTitle( observables_name.at(
i) );
79 h_ele->GetYaxis()->SetRangeUser(0, plots_ymax.at(
i) );
80 h_ele->SetLineColor(col_ele);
81 h_ele->SetFillColor(col_ele);
82 h_ele->SetFillStyle(0);
85 h_cpi->Scale(1./h_cpi->Integral());
86 h_cpi->SetLineColor(col_cpi);
87 h_cpi->SetFillColor(col_cpi);
88 h_cpi->SetFillStyle(1001);
91 TCanvas *c1 =
new TCanvas();
94 h_cpi->DrawClone(
"sames");
95 h_ele->DrawClone(
"sames");
99 c1->Print( Form(
"plots/compare_observables_%d.eps",
i ) );
100 c1->Print( Form(
"plots/compare_observables_%d.png",
i ) );