Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Plot_BCAL_LED_Ratio_low_up_quadavg.C
Go to the documentation of this file.
1 #include <unistd.h>
2 using namespace std;
3 
4 
5 void split(const std::string &s, char delim, std::vector<std::string> &elems) {
6  std::stringstream ss;
7  ss.str(s);
8  std::string item;
9  while (std::getline(ss, item, delim)) {
10  elems.push_back(item);
11  }
12 }
13 
14 TFile *GetReferenceFile(Int_t run, TString variation = "default"){
15  char command[1024];
16  // first get the location of the file
17  sprintf(command, "ccdb dump %s:%i:%s", "/BCAL/LED_monitoring/reference_file", run, variation.Data());
18  FILE* inputPipe = gSystem->OpenPipe(command, "r");
19  if(inputPipe == NULL)
20  return NULL;
21  //get the first (comment) line
22  char buff[1024];
23  if(fgets(buff, sizeof(buff), inputPipe) == NULL)
24  return NULL;
25  //get the actual data
26  if(fgets(buff, sizeof(buff), inputPipe) == NULL)
27  return NULL;
28  stringstream ss;
29  ss << buff;
30  char url_base[1024], path_name[1024];
31  ss >> url_base >> path_name;
32  //Close the pipe
33  gSystem->ClosePipe(inputPipe);
34 
35  // build URL of the location of the file
36  stringstream ss_url;
37  //cout << url_base << endl;
38  //cout << table_name << endl;
39  ss_url << url_base << "/" << path_name;
40  // figure out the name of the file
41  vector<string> tokens;
42  split(path_name, '/', tokens);
43  string filename = *(tokens.end()-1);
44  // download the file if it doesn't already exist
45  ifstream f(filename.c_str());
46  if(!f.good()) {
47  sprintf(command, "curl -O %s", ss_url.str().c_str());
48  gSystem->Exec(command);
49  } else {
50  f.close();
51  }
52 
53 
54  // open it and return
55  TFile *rootfile = new TFile(filename.c_str());
56 
57  // error check
58 
59  return rootfile;
60 }
61 
62 void Plot_BCAL_LED_Ratio_low_up_quadavg(string infilename = "hd_root.root", int run = 20000)
63 {
64  cout << "Starting ploting" << "\n";
65  // #include <TRandom.h>
66 
67  //gROOT->Reset();
68 gStyle->SetPalette(1,0);
69 gStyle->SetOptStat(kFALSE);
70 // gStyle->SetOptStat(11111111);
71 gStyle->SetPadRightMargin(0.15);
72 gStyle->SetPadLeftMargin(0.15);
73 gStyle->SetPadBottomMargin(0.15);
74 //
75 
76  char string[256];
77  //char path[256];
78  Int_t j,k;
79  Int_t n;
80  Int_t errorbars = 0;
81 
82  TProfile *run1_low_up_1 = NULL;
83  TProfile *run1_low_up_2 = NULL;
84  TProfile *run1_low_up_3 = NULL;
85  TProfile *run1_low_up_4 = NULL;
86 
87  TProfile *run2_low_up_1 = NULL;
88  TProfile *run2_low_up_2 = NULL;
89  TProfile *run2_low_up_3 = NULL;
90  TProfile *run2_low_up_4 = NULL;
91 
92  TH1D *run1_high_up_1_hist=NULL;
93  TH1D *run1_high_up_2_hist=NULL;
94  TH1D *run1_high_up_3_hist=NULL;
95  TH1D *run1_high_up_4_hist=NULL;
96 
97  TH1D *run2_high_up_1_hist=NULL;
98  TH1D *run2_high_up_2_hist=NULL;
99  TH1D *run2_high_up_3_hist=NULL;
100  TH1D *run2_high_up_4_hist=NULL;
101 
102  TH1D *run1_low_up_1_hist = NULL;
103  TH1D *run1_low_up_2_hist = NULL;
104  TH1D *run1_low_up_3_hist = NULL;
105  TH1D *run1_low_up_4_hist = NULL;
106 
107  TH1D *run2_low_up_1_hist = NULL;
108  TH1D *run2_low_up_2_hist = NULL;
109  TH1D *run2_low_up_3_hist = NULL;
110  TH1D *run2_low_up_4_hist = NULL;
111 
112 // sprintf(string,"hd_root.root");
113 // sprintf(string,"0%03i/bcalled0%03i.root",runnumber1,runnumber1);
114  printf ("Histogram input filename=%s\n",infilename.c_str());
115  TFile *run1in = new TFile(infilename.c_str(),"read");
116 
117 // TProfile *sector1_up_peak_vevent1 = (TProfile*)run1in->Get("bcalLED/sector1_up_peak_vevent1");
118 // if (sector1_up_peak_vevent1->FindLastBinAbove(0,1) > 100)
119  run1_low_up_1 = (TProfile*)run1in->Get("bcalLED/high_bias_down_sector_1_peak_vchannel");
120 
121 // TProfile *sector2_up_peak_vevent1 = (TProfile*)run1in->Get("bcalLED/sector2_up_peak_vevent1");
122 // if (sector2_up_peak_vevent1->FindLastBinAbove(0,1) > 100)
123  run1_low_up_2 = (TProfile*)run1in->Get("bcalLED/high_bias_down_sector_2_peak_vchannel");
124 
125 // TProfile *sector3_up_peak_vevent1 = (TProfile*)run1in->Get("bcalLED/sector3_up_peak_vevent1");
126 // if (sector3_up_peak_vevent1->FindLastBinAbove(0,1) > 100)
127  run1_low_up_3 = (TProfile*)run1in->Get("bcalLED/high_bias_down_sector_3_peak_vchannel");
128 
129 // TProfile *sector4_up_peak_vevent1 = (TProfile*)run1in->Get("bcalLED/sector4_up_peak_vevent1");
130 // if (sector4_up_peak_vevent1->FindLastBinAbove(0,1) > 100)
131  run1_low_up_4 = (TProfile*)run1in->Get("bcalLED/high_bias_down_sector_4_peak_vchannel");
132 
133  //sprintf(string,"BCAL_LED_Reference_Spring2016.root");
134  //printf ("Histogram input filename=%s\n",string);
135  //TFile *run2in = new TFile(string,"read");
136  TFile *run2in = GetReferenceFile(run);
137 
138  run2_low_up_1 = (TProfile*)run2in->Get("bcalLED/low_bias_up_sector_1_peak_vchannel");
139  run2_low_up_2 = (TProfile*)run2in->Get("bcalLED/low_bias_up_sector_2_peak_vchannel");
140  run2_low_up_3 = (TProfile*)run2in->Get("bcalLED/low_bias_up_sector_3_peak_vchannel");
141  run2_low_up_4 = (TProfile*)run2in->Get("bcalLED/low_bias_up_sector_4_peak_vchannel");
142 
143  cout << "input profiles, projecting into histograms" << "\n";
144 
145  run1_low_up_1_hist = run1_low_up_1->ProjectionX("run1_low_up_1_projectionx");
146  run1_low_up_2_hist = run1_low_up_2->ProjectionX("run1_low_up_2_projectionx");
147  run1_low_up_3_hist = run1_low_up_3->ProjectionX("run1_low_up_3_projectionx");
148  run1_low_up_4_hist = run1_low_up_4->ProjectionX("run1_low_up_4_projectionx");
149 
150  run2_low_up_1_hist = run2_low_up_1->ProjectionX("run2_low_up_1_projectionx");
151  run2_low_up_2_hist = run2_low_up_2->ProjectionX("run2_low_up_2_projectionx");
152  run2_low_up_3_hist = run2_low_up_3->ProjectionX("run2_low_up_3_projectionx");
153  run2_low_up_4_hist = run2_low_up_4->ProjectionX("run2_low_up_4_projectionx");
154 
155  cout << "profiles projected into histograms" << "\n";
156 
157  run1_low_up_1_hist->SetTitle("6v Upstream sector 1");
158  run1_low_up_2_hist->SetTitle("6v Upstream sector 2");
159  run1_low_up_3_hist->SetTitle("6v Upstream sector 3");
160  run1_low_up_4_hist->SetTitle("6v Upstream sector 4");
161 
162  cout << "Dividing over quadrant average" << "\n";
163 
164  double quad1sector1avgrun1 = run1_low_up_1_hist->Integral(0,191);
165  double quad2sector1avgrun1 = run1_low_up_1_hist->Integral(192,383);
166  double quad3sector1avgrun1 = run1_low_up_1_hist->Integral(384,575);
167  double quad4sector1avgrun1 = run1_low_up_1_hist->Integral(576,767);
168  double quad5sector1avgrun1 = run1_low_up_1_hist->Integral(768,959);
169  double quad6sector1avgrun1 = run1_low_up_1_hist->Integral(960,1151);
170  double quad7sector1avgrun1 = run1_low_up_1_hist->Integral(1152,1343);
171  double quad8sector1avgrun1 = run1_low_up_1_hist->Integral(1344,1535);
172 
173  double quad1sector2avgrun1 = run1_low_up_2_hist->Integral(0,191);
174  double quad2sector2avgrun1 = run1_low_up_2_hist->Integral(192,383);
175  double quad3sector2avgrun1 = run1_low_up_2_hist->Integral(384,575);
176  double quad4sector2avgrun1 = run1_low_up_2_hist->Integral(576,767);
177  double quad5sector2avgrun1 = run1_low_up_2_hist->Integral(768,959);
178  double quad6sector2avgrun1 = run1_low_up_2_hist->Integral(960,1151);
179  double quad7sector2avgrun1 = run1_low_up_2_hist->Integral(1152,1343);
180  double quad8sector2avgrun1 = run1_low_up_2_hist->Integral(1344,1535);
181 
182  double quad1sector3avgrun1 = run1_low_up_3_hist->Integral(0,191);
183  double quad2sector3avgrun1 = run1_low_up_3_hist->Integral(192,383);
184  double quad3sector3avgrun1 = run1_low_up_3_hist->Integral(384,575);
185  double quad4sector3avgrun1 = run1_low_up_3_hist->Integral(576,767);
186  double quad5sector3avgrun1 = run1_low_up_3_hist->Integral(768,959);
187  double quad6sector3avgrun1 = run1_low_up_3_hist->Integral(960,1151);
188  double quad7sector3avgrun1 = run1_low_up_3_hist->Integral(1152,1343);
189  double quad8sector3avgrun1 = run1_low_up_3_hist->Integral(1344,1535);
190 
191  double quad1sector4avgrun1 = run1_low_up_4_hist->Integral(0,191);
192  double quad2sector4avgrun1 = run1_low_up_4_hist->Integral(192,383);
193  double quad3sector4avgrun1 = run1_low_up_4_hist->Integral(384,575);
194  double quad4sector4avgrun1 = run1_low_up_4_hist->Integral(576,767);
195  double quad5sector4avgrun1 = run1_low_up_4_hist->Integral(768,959);
196  double quad6sector4avgrun1 = run1_low_up_4_hist->Integral(960,1151);
197  double quad7sector4avgrun1 = run1_low_up_4_hist->Integral(1152,1343);
198  double quad8sector4avgrun1 = run1_low_up_4_hist->Integral(1344,1535);
199 
200  double quad1avgrun1 = quad1sector1avgrun1 + quad1sector2avgrun1 + quad1sector3avgrun1 + quad1sector4avgrun1;
201  double quad2avgrun1 = quad2sector1avgrun1 + quad2sector2avgrun1 + quad2sector3avgrun1 + quad2sector4avgrun1;
202  double quad3avgrun1 = quad3sector1avgrun1 + quad3sector2avgrun1 + quad3sector3avgrun1 + quad3sector4avgrun1;
203  double quad4avgrun1 = quad4sector1avgrun1 + quad4sector2avgrun1 + quad4sector3avgrun1 + quad4sector4avgrun1;
204  double quad5avgrun1 = quad5sector1avgrun1 + quad5sector2avgrun1 + quad5sector3avgrun1 + quad5sector4avgrun1;
205  double quad6avgrun1 = quad6sector1avgrun1 + quad6sector2avgrun1 + quad6sector3avgrun1 + quad6sector4avgrun1;
206  double quad7avgrun1 = quad7sector1avgrun1 + quad7sector2avgrun1 + quad7sector3avgrun1 + quad7sector4avgrun1;
207  double quad8avgrun1 = quad8sector1avgrun1 + quad8sector2avgrun1 + quad8sector3avgrun1 + quad8sector4avgrun1;
208 
209  double quadav, bincontent1, bincontent2, bincontent3, bincontent4;
210 
211  for (int chid=0; chid < 1536 ; chid++)
212  {
213  quadav=0;
214  bincontent1=0;
215  bincontent2=0;
216  bincontent3=0;
217  bincontent4=0;
218  if (chid < 192 && chid > -1) {quadav = quad1avgrun1;}
219  if (chid < 384 && chid > 191) {quadav = quad2avgrun1;}
220  if (chid < 576 && chid > 383) {quadav = quad3avgrun1;}
221  if (chid < 768 && chid > 575) {quadav = quad4avgrun1;}
222  if (chid < 960 && chid > 767) {quadav = quad5avgrun1;}
223  if (chid < 1152 && chid > 959) {quadav = quad6avgrun1;}
224  if (chid < 1344 && chid > 1151) {quadav = quad7avgrun1;}
225  if (chid < 1536 && chid > 1343) {quadav = quad8avgrun1;}
226  bincontent1 = run1_low_up_1_hist->GetBinContent(chid);
227  bincontent2 = run1_low_up_2_hist->GetBinContent(chid);
228  bincontent3 = run1_low_up_3_hist->GetBinContent(chid);
229  bincontent4 = run1_low_up_4_hist->GetBinContent(chid);
230  run1_low_up_1_hist->SetBinContent(chid, bincontent1/quadav);
231  run1_low_up_2_hist->SetBinContent(chid, bincontent2/quadav);
232  run1_low_up_3_hist->SetBinContent(chid, bincontent3/quadav);
233  run1_low_up_4_hist->SetBinContent(chid, bincontent4/quadav);
234  }
235 
236  double quad1sector1avgrun2 = run2_low_up_1_hist->Integral(0,191);
237  double quad2sector1avgrun2 = run2_low_up_1_hist->Integral(192,383);
238  double quad3sector1avgrun2 = run2_low_up_1_hist->Integral(384,575);
239  double quad4sector1avgrun2 = run2_low_up_1_hist->Integral(576,767);
240  double quad5sector1avgrun2 = run2_low_up_1_hist->Integral(768,959);
241  double quad6sector1avgrun2 = run2_low_up_1_hist->Integral(960,1151);
242  double quad7sector1avgrun2 = run2_low_up_1_hist->Integral(1152,1343);
243  double quad8sector1avgrun2 = run2_low_up_1_hist->Integral(1344,1535);
244 
245  double quad1sector2avgrun2 = run2_low_up_2_hist->Integral(0,191);
246  double quad2sector2avgrun2 = run2_low_up_2_hist->Integral(192,383);
247  double quad3sector2avgrun2 = run2_low_up_2_hist->Integral(384,575);
248  double quad4sector2avgrun2 = run2_low_up_2_hist->Integral(576,767);
249  double quad5sector2avgrun2 = run2_low_up_2_hist->Integral(768,959);
250  double quad6sector2avgrun2 = run2_low_up_2_hist->Integral(960,1151);
251  double quad7sector2avgrun2 = run2_low_up_2_hist->Integral(1152,1343);
252  double quad8sector2avgrun2 = run2_low_up_2_hist->Integral(1344,1535);
253 
254  double quad1sector3avgrun2 = run2_low_up_3_hist->Integral(0,191);
255  double quad2sector3avgrun2 = run2_low_up_3_hist->Integral(192,383);
256  double quad3sector3avgrun2 = run2_low_up_3_hist->Integral(384,575);
257  double quad4sector3avgrun2 = run2_low_up_3_hist->Integral(576,767);
258  double quad5sector3avgrun2 = run2_low_up_3_hist->Integral(768,959);
259  double quad6sector3avgrun2 = run2_low_up_3_hist->Integral(960,1151);
260  double quad7sector3avgrun2 = run2_low_up_3_hist->Integral(1152,1343);
261  double quad8sector3avgrun2 = run2_low_up_3_hist->Integral(1344,1535);
262 
263  double quad1sector4avgrun2 = run2_low_up_4_hist->Integral(0,191);
264  double quad2sector4avgrun2 = run2_low_up_4_hist->Integral(192,383);
265  double quad3sector4avgrun2 = run2_low_up_4_hist->Integral(384,575);
266  double quad4sector4avgrun2 = run2_low_up_4_hist->Integral(576,767);
267  double quad5sector4avgrun2 = run2_low_up_4_hist->Integral(768,959);
268  double quad6sector4avgrun2 = run2_low_up_4_hist->Integral(960,1151);
269  double quad7sector4avgrun2 = run2_low_up_4_hist->Integral(1152,1343);
270  double quad8sector4avgrun2 = run2_low_up_4_hist->Integral(1344,1535);
271 
272  double quad1avgrun2 = quad1sector1avgrun2 + quad1sector2avgrun2 + quad1sector3avgrun2 + quad1sector4avgrun2;
273  double quad2avgrun2 = quad2sector1avgrun2 + quad2sector2avgrun2 + quad2sector3avgrun2 + quad2sector4avgrun2;
274  double quad3avgrun2 = quad3sector1avgrun2 + quad3sector2avgrun2 + quad3sector3avgrun2 + quad3sector4avgrun2;
275  double quad4avgrun2 = quad4sector1avgrun2 + quad4sector2avgrun2 + quad4sector3avgrun2 + quad4sector4avgrun2;
276  double quad5avgrun2 = quad5sector1avgrun2 + quad5sector2avgrun2 + quad5sector3avgrun2 + quad5sector4avgrun2;
277  double quad6avgrun2 = quad6sector1avgrun2 + quad6sector2avgrun2 + quad6sector3avgrun2 + quad6sector4avgrun2;
278  double quad7avgrun2 = quad7sector1avgrun2 + quad7sector2avgrun2 + quad7sector3avgrun2 + quad7sector4avgrun2;
279  double quad8avgrun2 = quad8sector1avgrun2 + quad8sector2avgrun2 + quad8sector3avgrun2 + quad8sector4avgrun2;
280 
281  for (int chid=0; chid < 1536 ; chid++)
282  {
283  quadav=0;
284  bincontent1=0;
285  bincontent2=0;
286  bincontent3=0;
287  bincontent4=0;
288  if (chid < 192 && chid > -1) {quadav = quad1avgrun2;}
289  if (chid < 384 && chid > 191) {quadav = quad2avgrun2;}
290  if (chid < 576 && chid > 383) {quadav = quad3avgrun2;}
291  if (chid < 768 && chid > 575) {quadav = quad4avgrun2;}
292  if (chid < 960 && chid > 767) {quadav = quad5avgrun2;}
293  if (chid < 1152 && chid > 959) {quadav = quad6avgrun2;}
294  if (chid < 1344 && chid > 1151) {quadav = quad7avgrun2;}
295  if (chid < 1536 && chid > 1343) {quadav = quad8avgrun2;}
296  bincontent1 = run2_low_up_1_hist->GetBinContent(chid);
297  bincontent2 = run2_low_up_2_hist->GetBinContent(chid);
298  bincontent3 = run2_low_up_3_hist->GetBinContent(chid);
299  bincontent4 = run2_low_up_4_hist->GetBinContent(chid);
300  run2_low_up_1_hist->SetBinContent(chid, bincontent1/quadav);
301  run2_low_up_2_hist->SetBinContent(chid, bincontent2/quadav);
302  run2_low_up_3_hist->SetBinContent(chid, bincontent3/quadav);
303  run2_low_up_4_hist->SetBinContent(chid, bincontent4/quadav);
304  }
305 
306 
307  cout << "Dividing histograms" << "\n";
308 
309  run1_low_up_1_hist->Divide(run2_low_up_1_hist);
310  run1_low_up_2_hist->Divide(run2_low_up_2_hist);
311  run1_low_up_3_hist->Divide(run2_low_up_3_hist);
312  run1_low_up_4_hist->Divide(run2_low_up_4_hist);
313 
314  cout << "Histograms divided" << "\n";
315  run1_low_up_1_hist->SetMinimum(0.8);
316  run1_low_up_1_hist->SetMaximum(1.2);
317  run1_low_up_2_hist->SetMinimum(0.8);
318  run1_low_up_2_hist->SetMaximum(1.2);
319  run1_low_up_3_hist->SetMinimum(0.8);
320  run1_low_up_3_hist->SetMaximum(1.2);
321  run1_low_up_4_hist->SetMinimum(0.8);
322  run1_low_up_4_hist->SetMaximum(1.2);
323 
324 // run1_low_up_1_hist->SetMaximum(run1_low_up_1_hist->GetBinContent(run1_low_up_1_hist->GetMaximumBin())*1.05);
325 // run1_low_up_1_hist->SetMinimum(run1_low_up_1_hist->GetMinimum(0.1)*0.95);
326 //
327 // run1_low_up_2_hist->SetMaximum(run1_low_up_2_hist->GetBinContent(run1_low_up_2_hist->GetMaximumBin())*1.05);
328 // run1_low_up_2_hist->SetMinimum(run1_low_up_2_hist->GetMinimum(0.1)*0.95);
329 //
330 // run1_low_up_3_hist->SetMaximum(run1_low_up_3_hist->GetBinContent(run1_low_up_3_hist->GetMaximumBin())*1.01);
331 // run1_low_up_3_hist->SetMinimum(run1_low_up_3_hist->GetMinimum(0.1)*0.95);
332 //
333 // run1_low_up_4_hist->SetMaximum(run1_low_up_4_hist->GetBinContent(run1_low_up_4_hist->GetMaximumBin())*1.01);
334 // run1_low_up_4_hist->SetMinimum(run1_low_up_4_hist->GetMinimum(0.1)*0.95);
335 
336 
337 
338  TCanvas *c1 = new TCanvas("c1","c1 pedsubpeak ",200,10,1200,1200);
339  c1->Divide(2,2);
340 
341 ////////////////////////////////////////////////
342  TVirtualPad *c1_1 = c1->cd(1);
343  c1_1->SetBorderMode(0);
344  c1_1->SetFillColor(0);
345 
346  c1_1->SetGridx();
347  c1_1->SetGridy();
348  c1_1->SetBorderMode(0);
349  c1_1->SetFillColor(0);
350 
351  if (errorbars ==0) {run1_low_up_1_hist->Draw("hist p");}
352  else {run1_low_up_1_hist->Draw("E1 X0");}
353  run1_low_up_1_hist->SetMarkerColor(2);
354  run1_low_up_1_hist->SetMarkerStyle(2);
355 
356 
357  sprintf(string,"Run ratio to reference");
358 // sprintf(string,"Run %05d ratio to reference",runnumber1);
359  TLatex *t1 = new TLatex(0.15,0.92,string);
360  t1->SetNDC();
361  t1->SetTextSize(0.03);
362  t1->Draw();
363 
364 ///////////////////////////////////////////////////////////////////////////
365  TVirtualPad *c1_2 = c1->cd(2);
366  c1_2->SetBorderMode(0);
367  c1_2->SetFillColor(0);
368 
369  c1_2->SetGridx();
370  c1_2->SetGridy();
371  c1_2->SetBorderMode(0);
372  c1_2->SetFillColor(0);
373 
374  if (errorbars ==0) {run1_low_up_2_hist->Draw("hist p");}
375  else {run1_low_up_2_hist->Draw("E1 X0");}
376  run1_low_up_2_hist->SetMarkerColor(2);
377  run1_low_up_2_hist->SetMarkerStyle(2);
378 
379 ///////////////////////////////////////////////////////////////////////////
380  TVirtualPad *c1_3 = c1->cd(3);
381  c1_3->SetBorderMode(0);
382  c1_3->SetFillColor(0);
383 
384 
385  c1_3->SetGridx();
386  c1_3->SetGridy();
387  c1_3->SetBorderMode(0);
388  c1_3->SetFillColor(0);
389 
390  if (errorbars ==0) {run1_low_up_3_hist->Draw("hist p");}
391  else {run1_low_up_3_hist->Draw("E1 X0");}
392  run1_low_up_3_hist->SetMarkerColor(2);
393  run1_low_up_3_hist->SetMarkerStyle(2);
394 
395 
396  ///////////////////////////////////////////////////////////////////////////
397  TVirtualPad *c1_4 = c1->cd(4);
398  c1_4->SetBorderMode(0);
399  c1_4->SetFillColor(0);
400 
401  c1_4->SetGridx();
402  c1_4->SetGridy();
403  c1_4->SetBorderMode(0);
404  c1_4->SetFillColor(0);
405 
406  if (errorbars ==0) {run1_low_up_4_hist->Draw("hist p");}
407  else {run1_low_up_4_hist->Draw("E1 X0");}
408  run1_low_up_4_hist->SetMarkerColor(2);
409  run1_low_up_4_hist->SetMarkerStyle(2);
410 
411 ///////////////////////////////////////////////////////////////////////////
412 
413 // sprintf(string,"bcalled_lowup_quadavg.pdf");
414 // sprintf(string,"bcalled_%05d_lowup.pdf",runnumber1);
415 // c1->SaveAs(string);
416 
417 //gApplication->Terminate();
418 }
419 
char string[256]
sprintf(text,"Post KinFit Cut")
TString filename
Double_t c1[2][NMODULES]
Definition: tw_corr.C:68
void Plot_BCAL_LED_Ratio_low_up_quadavg(string infilename="hd_root.root", int run=20000)
TF1 * f
Definition: FitGains.C:21
TLatex * t1
TFile * GetReferenceFile(Int_t run, TString variation="default")
void split(const std::string &s, char delim, std::vector< std::string > &elems)
printf("string=%s", string)