EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
analysis_resolution.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file analysis_resolution.C
1 /*
2  Winston DeGraw (wdegraw@lbl.gov)
3  Rey Cruz-Torres (reynier@lbl.gov)
4  */
5 
6 // Forward-declaring functions
7 void prettyTH1F( TH1F * h1 , int color , int marker , float min , float max );
8 // ============================================================================================================================================
10  // -------------------------------------------------------------
11  // Some important parameters
12  const TString partic = "mu-"; // particle to be studied
13  const float Bfield = 3.0; // [T] Magnetic field
14  bool use_widths = true;
15  bool update_tab = true;
16  // -------------------------
17  // Binning
18  float eta_bin[] = {0.,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0}; const int size_eta_bin = sizeof(eta_bin)/sizeof(*eta_bin);
19  float mom_bin[] = {0.,1.,2.,3.,4.,5.,10.,15.,20.,25.,30.}; const int size_mom_bin = sizeof(mom_bin)/sizeof(*mom_bin);
20  // -------------------------
21  string Bfield_str = Form("%.1f",Bfield);
22  Bfield_str.replace(Bfield_str.find("."), sizeof(".") - 1, "_");
23  TString tab_name = Form("sigma_eta_%i_p_%i_",size_eta_bin-1,size_mom_bin-1) + partic + Form("_B%.1fT.txt",Bfield);
24  // -------------------------------------------------------------
25  // Some settings
26  TH1::SetDefaultSumw2();
27  TH2::SetDefaultSumw2();
28  gStyle -> SetOptStat(0);
29  // -------------------------------------------------------------
30  // Loading all the needed info from the root file
31  TFile * F = new TFile("../data/files_"+Bfield_str+"_T/total_"+partic+"_B_"+Form("%.1f",Bfield)+"T_FastTrackingEval.root");
32  TTree * T = (TTree*) F -> Get("tracks");
33  float gpx, gpy, gpz, px, py, pz;
34  T -> SetBranchAddress("gpx",&gpx);
35  T -> SetBranchAddress("gpy",&gpy);
36  T -> SetBranchAddress("gpz",&gpz);
37  T -> SetBranchAddress("px" ,&px );
38  T -> SetBranchAddress("py" ,&py );
39  T -> SetBranchAddress("pz" ,&pz );
40  int nEntries = T -> GetEntries();
41  // -------------------------------------------------------------
42  fstream tab;
43  float approx_sig_dpp[size_eta_bin-1][size_mom_bin-1] = {{0}};
44  float approx_sig_dth[size_eta_bin-1][size_mom_bin-1] = {{0}};
45  float approx_sig_dph[size_eta_bin-1][size_mom_bin-1] = {{0}};
46  TString temp_str;
47  if(use_widths){
48  tab.open("tables/"+tab_name);
49  if(!tab){cout << "Could not find file '" << tab_name << "'" << endl; use_widths = false; update_tab = true;}
50  else{
51  cout << "Loading parameters from file '" << tab_name << "'" << endl;
52  for(int et = 0 ; et < size_eta_bin-1 ; et++){ for(int p = 0 ; p < size_mom_bin-1 ; p++){tab >> approx_sig_dpp[et][p];}} //tab >> temp_str;
53  for(int et = 0 ; et < size_eta_bin-1 ; et++){ for(int p = 0 ; p < size_mom_bin-1 ; p++){tab >> approx_sig_dth[et][p];}} //tab >> temp_str;
54  for(int et = 0 ; et < size_eta_bin-1 ; et++){ for(int p = 0 ; p < size_mom_bin-1 ; p++){tab >> approx_sig_dph[et][p];}}
55  }
56  tab.close();
57  }
58 
59  float approx_sig_dpp_3_0[size_eta_bin-1][size_mom_bin-1] = {0}; float approx_sig_dpp_1_2[size_eta_bin-1][size_mom_bin-1] = {0};
60  float approx_sig_dth_3_0[size_eta_bin-1][size_mom_bin-1] = {0}; float approx_sig_dth_1_2[size_eta_bin-1][size_mom_bin-1] = {0};
61  float approx_sig_dph_3_0[size_eta_bin-1][size_mom_bin-1] = {0}; float approx_sig_dph_1_2[size_eta_bin-1][size_mom_bin-1] = {0};
62 
63  for(int et = 0 ; et < size_eta_bin-1 ; et++){
64  for(int p = 0 ; p < size_mom_bin-1 ; p++){
65  approx_sig_dpp_3_0[et][p] = 3.0*approx_sig_dpp[et][p]; approx_sig_dpp_1_2[et][p] = 1.2*approx_sig_dpp[et][p];
66  approx_sig_dth_3_0[et][p] = 3.0*approx_sig_dth[et][p]; approx_sig_dth_1_2[et][p] = 1.2*approx_sig_dth[et][p];
67  approx_sig_dph_3_0[et][p] = 3.0*approx_sig_dph[et][p]; approx_sig_dph_1_2[et][p] = 1.2*approx_sig_dph[et][p];
68  }
69  }
70  // -------------------------------------------------------------
71  // Defining histograms
72  TH1F *** h1_dpp_p_et_bins = new TH1F**[size_eta_bin-1]; // delta p / p vs. p in eta bins
73  TH1F *** h1_dth_p_et_bins = new TH1F**[size_eta_bin-1]; // delta theta vs. p in eta bins
74  TH1F *** h1_dph_p_et_bins = new TH1F**[size_eta_bin-1]; // delta phi vs. p in eta bins
75  for(int et = 0 ; et < size_eta_bin-1 ; et++){
76  h1_dpp_p_et_bins[et] = new TH1F*[size_mom_bin-1];
77  h1_dth_p_et_bins[et] = new TH1F*[size_mom_bin-1];
78  h1_dph_p_et_bins[et] = new TH1F*[size_mom_bin-1];
79  for(int p = 0 ; p < size_mom_bin-1 ; p++){
80  if(use_widths){
81  h1_dpp_p_et_bins[et][p] = new TH1F(Form("h1_dpp_p_et_bins_%i_%i",et,p),";dp/p;Counts" ,100,-approx_sig_dpp_3_0[et][p],approx_sig_dpp_3_0[et][p]);
82  h1_dth_p_et_bins[et][p] = new TH1F(Form("h1_dth_p_et_bins_%i_%i",et,p),";d#theta [rad];Counts",100,-approx_sig_dth_3_0[et][p],approx_sig_dth_3_0[et][p]);
83  h1_dph_p_et_bins[et][p] = new TH1F(Form("h1_dph_p_et_bins_%i_%i",et,p),";d#phi [rad];Counts" ,100,-approx_sig_dph_3_0[et][p],approx_sig_dph_3_0[et][p]);
84  }
85  else{
86  h1_dpp_p_et_bins[et][p] = new TH1F(Form("h1_dpp_p_et_bins_%i_%i",et,p),";dp/p;Counts" ,100,-0.08 ,0.08 );
87  h1_dth_p_et_bins[et][p] = new TH1F(Form("h1_dth_p_et_bins_%i_%i",et,p),";d#theta [rad];Counts",100,-0.0014,0.0014);
88  h1_dph_p_et_bins[et][p] = new TH1F(Form("h1_dph_p_et_bins_%i_%i",et,p),";d#phi [rad];Counts" ,100,-0.04 ,0.04 );
89  }
90 
91  h1_dpp_p_et_bins[et][p] -> SetTitle(Form("%.1f < |#eta| < %.1f, %.1f < p < %.1f GeV/c",eta_bin[et],eta_bin[et],mom_bin[p],mom_bin[p]));
92  h1_dth_p_et_bins[et][p] -> SetTitle(Form("%.1f < |#eta| < %.1f, %.1f < p < %.1f GeV/c",eta_bin[et],eta_bin[et],mom_bin[p],mom_bin[p]));
93  h1_dph_p_et_bins[et][p] -> SetTitle(Form("%.1f < |#eta| < %.1f, %.1f < p < %.1f GeV/c",eta_bin[et],eta_bin[et],mom_bin[p],mom_bin[p]));
94  }
95  }
96  // -------------------------------------------------------------
97  int color[] = {1,2,62,8,95,52,6,28,209,92,15};
98  int marker[] = {20,21,23,24,25,26,27,28,29,30};
99 
100  TH1F ** h1_dpp_v_p_et_bins = new TH1F*[size_eta_bin-1];
101  TH1F ** h1_dth_v_p_et_bins = new TH1F*[size_eta_bin-1];
102  TH1F ** h1_dph_v_p_et_bins = new TH1F*[size_eta_bin-1];
103 
104  for(int et = 0 ; et < size_eta_bin-1 ; et++){
105  h1_dpp_v_p_et_bins[et] = new TH1F(Form("h1_dpp_v_p_et_bins_%i",et),";p [GeV/c];dp/p [%]" ,size_mom_bin-1,mom_bin); prettyTH1F( h1_dpp_v_p_et_bins[et] , color[et] , marker[et] , 0. , 10. );
106  h1_dth_v_p_et_bins[et] = new TH1F(Form("h1_dth_v_p_et_bins_%i",et),";p [GeV/c];d#theta [mrad]",size_mom_bin-1,mom_bin); prettyTH1F( h1_dth_v_p_et_bins[et] , color[et] , marker[et] , 0. , 1. );
107  h1_dph_v_p_et_bins[et] = new TH1F(Form("h1_dph_v_p_et_bins_%i",et),";p [GeV/c];d#phi [mrad]" ,size_mom_bin-1,mom_bin); prettyTH1F( h1_dph_v_p_et_bins[et] , color[et] , marker[et] , 0. , 25. );
108  }
109 
110  TH1F ** h1_dpp_v_et_p_bins = new TH1F*[size_mom_bin-1];
111  TH1F ** h1_dth_v_et_p_bins = new TH1F*[size_mom_bin-1];
112  TH1F ** h1_dph_v_et_p_bins = new TH1F*[size_mom_bin-1];
113 
114  for(int p = 0 ; p < size_mom_bin-1 ; p++){
115  h1_dpp_v_et_p_bins[p] = new TH1F(Form("h1_dpp_v_et_p_bins_%i",p),";#eta;dp/p [%]" ,size_eta_bin-1,eta_bin); prettyTH1F( h1_dpp_v_et_p_bins[p] , color[p] , marker[p] , 0. , 10. );
116  h1_dth_v_et_p_bins[p] = new TH1F(Form("h1_dth_v_et_p_bins_%i",p),";#eta;d#theta [mrad]",size_eta_bin-1,eta_bin); prettyTH1F( h1_dth_v_et_p_bins[p] , color[p] , marker[p] , 0. , 1. );
117  h1_dph_v_et_p_bins[p] = new TH1F(Form("h1_dph_v_et_p_bins_%i",p),";#eta;d#phi [mrad]" ,size_eta_bin-1,eta_bin); prettyTH1F( h1_dph_v_et_p_bins[p] , color[p] , marker[p] , 0. , 25. );
118  }
119 
120  // -------------------------------------------------------------
121  // Declaring other useful variables and functions
122  float width_dpp[size_eta_bin-1][size_mom_bin-1] = {{0}};
123  float error_dpp[size_eta_bin-1][size_mom_bin-1] = {{0}};
124  float width_dth[size_eta_bin-1][size_mom_bin-1] = {{0}};
125  float error_dth[size_eta_bin-1][size_mom_bin-1] = {{0}};
126  float width_dph[size_eta_bin-1][size_mom_bin-1] = {{0}};
127  float error_dph[size_eta_bin-1][size_mom_bin-1] = {{0}};
128 
129  TF1 *** f_gaus_dpp = new TF1**[size_eta_bin-1];
130  TF1 *** f_gaus_dth = new TF1**[size_eta_bin-1];
131  TF1 *** f_gaus_dph = new TF1**[size_eta_bin-1];
132 
133  for(int et = 0 ; et < size_eta_bin-1 ; et++){
134  f_gaus_dpp[et] = new TF1*[size_mom_bin-1];
135  f_gaus_dth[et] = new TF1*[size_mom_bin-1];
136  f_gaus_dph[et] = new TF1*[size_mom_bin-1];
137 
138  for(int p = 0 ; p < size_mom_bin-1 ; p++){
139  if(use_widths){
140  f_gaus_dpp[et][p] = new TF1(Form("f_gaus_dpp_%i_%i",et,p),"gaus",-approx_sig_dpp_1_2[et][p],approx_sig_dpp_1_2[et][p]);
141  f_gaus_dth[et][p] = new TF1(Form("f_gaus_dth_%i_%i",et,p),"gaus",-approx_sig_dth_1_2[et][p],approx_sig_dth_1_2[et][p]);
142  f_gaus_dph[et][p] = new TF1(Form("f_gaus_dph_%i_%i",et,p),"gaus",-approx_sig_dph_1_2[et][p],approx_sig_dph_1_2[et][p]);
143  }
144  else{
145  f_gaus_dpp[et][p] = new TF1(Form("f_gaus_dpp_%i_%i",et,p),"gaus",-0.007 ,0.007 );
146  f_gaus_dth[et][p] = new TF1(Form("f_gaus_dth_%i_%i",et,p),"gaus",-0.0007,0.0007);
147  f_gaus_dph[et][p] = new TF1(Form("f_gaus_dph_%i_%i",et,p),"gaus",-0.02 ,0.02 );
148  }
149  }
150  }
151  // -------------------------------------------------------------
152  // Loop over entries of the tree
153  for(int ev = 0 ; ev < nEntries ; ev++){
154  T -> GetEntry(ev);
155  if(ev%1000000==0) cout << "Looping over entry " << ev << " out of " << nEntries << endl;
156 
157  // Calculating some variables
158  float gtheta = TMath::ACos(gpz/sqrt(gpx*gpx+gpy*gpy+gpz*gpz));
159  float theta = TMath::ACos(pz/sqrt(px*px+py*py+pz*pz));
160  float dth = theta - gtheta;
161 
162  float geta = -TMath::Log(TMath::Tan(gtheta/2.));
163 
164  float p_reco = sqrt(px*px+py*py+pz*pz);
165  float p_truth = sqrt(gpx*gpx+gpy*gpy+gpz*gpz);
166  float dp_p = (p_reco-p_truth)/p_truth;
167 
168  float gphi = TMath::ATan(gpy/gpx);
169  float phi = TMath::ATan(py/px);
170  float dph = phi - gphi;
171 
172  // Filling histograms
173  for(int et = 0 ; et < size_eta_bin-1 ; et++){
174  if( abs(geta) > eta_bin[et] && abs(geta) <= eta_bin[et+1] ){
175  for(int p = 0 ; p < size_mom_bin-1 ; p++){
176  if( p_truth > mom_bin[p] && p_truth <= mom_bin[p+1] ){
177  h1_dpp_p_et_bins[et][p] -> Fill( dp_p );
178  h1_dth_p_et_bins[et][p] -> Fill( dth );
179  h1_dph_p_et_bins[et][p] -> Fill( dph );
180  }
181  }
182  }
183  }
184  }
185  // -------------------------------------------------------------
186  // Doing fits
187  TCanvas ** c_fits_p = new TCanvas*[size_eta_bin-1];
188  TCanvas ** c_fits_th = new TCanvas*[size_eta_bin-1];
189  TCanvas ** c_fits_ph = new TCanvas*[size_eta_bin-1];
190 
191  for(int et = 0 ; et < size_eta_bin-1 ; et++){
192  c_fits_p [et] = new TCanvas(Form("c_fits_p_%i" ,et),Form("dp/p , %.1f<eta<%.1f",eta_bin[et],eta_bin[et+1]),1000,800); c_fits_p [et] -> Divide(3,2);
193  c_fits_th[et] = new TCanvas(Form("c_fits_th_%i",et),Form("dtheta, %.1f<eta<%.1f",eta_bin[et],eta_bin[et+1]),1000,800); c_fits_th[et] -> Divide(3,2);
194  c_fits_ph[et] = new TCanvas(Form("c_fits_ph_%i",et),Form("dphi , %.1f<eta<%.1f",eta_bin[et],eta_bin[et+1]),1000,800); c_fits_ph[et] -> Divide(3,2);
195 
196  for(int p = 0 ; p < size_mom_bin-1 ; p++){
197  // Momentum resolutions
198  c_fits_p [et] -> cd(p+1);
199  h1_dpp_p_et_bins[et][p] -> Draw(); h1_dpp_p_et_bins[et][p] -> Fit(Form("f_gaus_dpp_%i_%i",et,p),"R");
200  width_dpp[et][p] = f_gaus_dpp[et][p] -> GetParameter(2);
201  error_dpp[et][p] = (f_gaus_dpp[et][p] -> GetParError(2))*(f_gaus_dpp[et][p] -> GetChisquare())/(f_gaus_dpp[et][p] -> GetNDF());
202 
203  // Theta resolution
204  c_fits_th[et] -> cd(p+1);
205  h1_dth_p_et_bins[et][p] -> Draw(); h1_dth_p_et_bins[et][p] -> Fit(Form("f_gaus_dth_%i_%i",et,p),"R");
206  width_dth[et][p] = f_gaus_dth[et][p] -> GetParameter(2);
207  error_dth[et][p] = (f_gaus_dth[et][p] -> GetParError(2))*(f_gaus_dth[et][p] -> GetChisquare())/(f_gaus_dth[et][p] -> GetNDF());
208 
209  // Phi resolution
210  c_fits_ph[et] -> cd(p+1);
211  h1_dph_p_et_bins[et][p] -> Draw(); h1_dph_p_et_bins[et][p] -> Fit(Form("f_gaus_dph_%i_%i",et,p),"R");
212  width_dph[et][p] = f_gaus_dph[et][p] -> GetParameter(2);
213  error_dph[et][p] = (f_gaus_dph[et][p] -> GetParError(2))*(f_gaus_dph[et][p] -> GetChisquare())/(f_gaus_dph[et][p] -> GetNDF());
214 
215  // ----
216 
217  h1_dpp_v_p_et_bins[et] -> SetBinContent(p +1,width_dpp[et][p]*100. );
218  h1_dth_v_p_et_bins[et] -> SetBinContent(p +1,width_dth[et][p]*1000.);
219  h1_dph_v_p_et_bins[et] -> SetBinContent(p +1,width_dph[et][p]*1000.);
220  h1_dpp_v_et_p_bins[ p] -> SetBinContent(et+1,width_dpp[et][p]*100. );
221  h1_dth_v_et_p_bins[ p] -> SetBinContent(et+1,width_dth[et][p]*1000.);
222  h1_dph_v_et_p_bins[ p] -> SetBinContent(et+1,width_dph[et][p]*1000.);
223 
224  h1_dpp_v_p_et_bins[et] -> SetBinError (p +1,error_dpp[et][p]*100. );
225  h1_dth_v_p_et_bins[et] -> SetBinError (p +1,error_dth[et][p]*1000.);
226  h1_dph_v_p_et_bins[et] -> SetBinError (p +1,error_dph[et][p]*1000.);
227  h1_dpp_v_et_p_bins[ p] -> SetBinError (et+1,error_dpp[et][p]*100. );
228  h1_dth_v_et_p_bins[ p] -> SetBinError (et+1,error_dth[et][p]*1000.);
229  h1_dph_v_et_p_bins[ p] -> SetBinError (et+1,error_dph[et][p]*1000.);
230  }
231  }
232 
233  // -------------------------------------------------------------
234  // Updating table with width values
235  ofstream updated_tab;
236  if(update_tab){
237  updated_tab.open("tables/"+tab_name);
238  for(int et = 0 ; et < size_eta_bin-1 ; et++){
239  for(int p = 0 ; p < size_mom_bin-1 ; p++){
240  updated_tab << width_dpp[et][p];
241  if(p == size_mom_bin-2) updated_tab << "\n";
242  else updated_tab << "\t";
243  }
244  }
245  updated_tab << "\n";
246  for(int et = 0 ; et < size_eta_bin-1 ; et++){
247  for(int p = 0 ; p < size_mom_bin-1 ; p++){
248  updated_tab << width_dth[et][p];
249  if(p == size_mom_bin-2) updated_tab << "\n";
250  else updated_tab << "\t";
251  }
252  }
253  updated_tab << "\n";
254  for(int et = 0 ; et < size_eta_bin-1 ; et++){
255  for(int p = 0 ; p < size_mom_bin-1 ; p++){
256  updated_tab << width_dph[et][p];
257  if(p == size_mom_bin-2) updated_tab << "\n";
258  else updated_tab << "\t";
259  }
260  }
261  updated_tab.close();
262  }
263 
264  // -------------------------------------------------------------
265  // Plotting histograms
266  TCanvas * c1 = new TCanvas("c1","c1",1300,900);
267  c1 -> Divide(3,2);
268 
269  c1 -> cd(1);
270  h1_dpp_v_p_et_bins[0] -> Draw();
271  for(int et = 0 ; et < size_eta_bin-1 ; et++) h1_dpp_v_p_et_bins[et] -> Draw("same");
272  c1 -> cd(2);
273  h1_dth_v_p_et_bins[0] -> Draw();
274  for(int et = 0 ; et < size_eta_bin-1 ; et++) h1_dth_v_p_et_bins[et] -> Draw("same");
275  c1 -> cd(3);
276  h1_dph_v_p_et_bins[0] -> Draw();
277  for(int et = 0 ; et < size_eta_bin-1 ; et++) h1_dph_v_p_et_bins[et] -> Draw("same");
278  c1 -> cd(4);
279  h1_dpp_v_et_p_bins[0] -> Draw();
280  for(int p = 0 ; p < size_mom_bin-1 ; p++) h1_dpp_v_et_p_bins[p] -> Draw("same");
281  c1 -> cd(5);
282  h1_dth_v_et_p_bins[0] -> Draw();
283  for(int p = 0 ; p < size_mom_bin-1 ; p++) h1_dth_v_et_p_bins[p] -> Draw("same");
284  c1 -> cd(6);
285  h1_dph_v_et_p_bins[0] -> Draw();
286  for(int p = 0 ; p < size_mom_bin-1 ; p++) h1_dph_v_et_p_bins[p] -> Draw("same");
287  TLegend * leg1 = new TLegend(0.50,0.6,0.70,0.85);
288  leg1 -> SetLineColor(0);
289  for(int et = 0 ; et < size_eta_bin-1 ; et++) leg1 -> AddEntry(h1_dph_v_p_et_bins[et],Form("%.1f < |#eta| < %.1f",eta_bin[et],eta_bin[et+1]));
290  c1 -> cd(3);
291  leg1 -> Draw("same");
292  TLegend * leg2 = new TLegend(0.20,0.6,0.40,0.85);
293  leg2 -> SetLineColor(0);
294  for(int p = 0 ; p < size_mom_bin-1 ; p++) leg2 -> AddEntry(h1_dph_v_et_p_bins[p],Form("%.1f < p < %.1f GeV/c",mom_bin[p],mom_bin[p+1]));
295  c1 -> cd(6);
296  leg2 -> Draw("same");
297 
298  // -------------------------------------------------------------
299  // Saving fits to pdf
300  TString out_pdf_name = "fits_AllS_"+partic+"_B_"+Form("%.1f",Bfield)+"T.pdf";
301 
302  for(int et = 0 ; et < size_eta_bin-1 ; et++){
303  TString fname = out_pdf_name;
304  if(et == 0) fname+="(";
305  else if(et == size_eta_bin-2) fname+=")";
306  c_fits_p[et] -> Print(fname);
307  }
308 
309  // -------------------------------------------------------------
310  // Saving histograms
311  TFile * Fout = new TFile("histos_"+partic+"_B_"+Form("%.1f",Bfield)+"T.root","recreate");
312  for(int et = 0 ; et < size_eta_bin-1 ; et++){
313  h1_dpp_v_p_et_bins[et] -> Write(Form("h1_dpp_v_p_et_bins_%i",et));
314  h1_dth_v_p_et_bins[et] -> Write(Form("h1_dth_v_p_et_bins_%i",et));
315  h1_dph_v_p_et_bins[et] -> Write(Form("h1_dph_v_p_et_bins_%i",et));
316  }
317  for(int p = 0 ; p < size_mom_bin-1 ; p++){
318  h1_dpp_v_et_p_bins[p] -> Write(Form("h1_dpp_v_et_p_bins_%i",p));
319  h1_dth_v_et_p_bins[p] -> Write(Form("h1_dth_v_et_p_bins_%i",p));
320  h1_dph_v_et_p_bins[p] -> Write(Form("h1_dph_v_et_p_bins_%i",p));
321  }
322  c1 -> Write("c1");
323  Fout -> Close();
324 
325 }
326 // ============================================================================================================================================
327 void prettyTH1F( TH1F * h1 , int color , int marker , float min , float max ){
328  h1 -> SetLineWidth(2);
329  h1 -> SetLineColor(color);
330  h1 -> SetMarkerStyle(marker);
331  h1 -> SetMarkerColor(color);
332 
333  h1 -> SetMinimum(min);
334  h1 -> SetMaximum(max);
335 
336  h1 -> GetXaxis() -> CenterTitle();
337  h1 -> GetXaxis() -> SetNdivisions(107); // to draw less tick marks
338  h1 -> GetYaxis() -> CenterTitle();
339  h1 -> GetYaxis() -> SetNdivisions(107); // to draw less tick marks
340 
341  h1 -> SetMinimum(0.001);
342 }
343