Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ST_Monitoring_Pid.C
Go to the documentation of this file.
1 // File: ST_Monitoring_2D.C
2 // Created: 05/21/2015
3 // Creator: Mahmoud Kamel, mkame006@fiu.edu
4 // Purpose: Displaying histograms for online monitoring purposes
5 //void ST_Monitoring_2D()
7  // Define the directory that contains the histograms
8  TDirectory *dir = (TDirectory*)gDirectory->FindObjectAny("st_tracking");
9  //gDirectory->ls();
10  if(dir) dir->cd();
11 
12  // Grab 2D histograms
13  TH2I *h2_dedx_P_mag = (TH2I*)gDirectory->FindObjectAny("h2_dedx_P_mag");
14  TH2I *h2_dedx_P_mag_postv = (TH2I*)gDirectory->FindObjectAny("h2_dedx_P_mag_postv");
15  TH2I *h2_dedx_P_mag_negtv= (TH2I*)gDirectory->FindObjectAny("h2_dedx_P_mag_negtv");
16  TH2I *h2_dedx__theta = (TH2I*)gDirectory->FindObjectAny("h2_dedx__theta");
17  //Create the canvas
18  if(gPad == NULL)
19  {
20  TCanvas *c1 = new TCanvas("c1","Start Counter 2D Histograms", 200, 10, 600, 480);
21  c1->cd(0);
22  c1->Draw();
23  c1->Update();
24  }
25  if(!gPad) return;
26  TCanvas *c1 = gPad->GetCanvas();
27  c1->Divide(2,1);
28  gStyle->SetOptStat(10);
29  gStyle->SetTitleFontSize(0.04);
30  c1->cd(1);
31  gPad->SetTicks();
32  gPad->SetGrid();
33  gPad->SetLogz();
34 
35  if(h2_dedx_P_mag_postv) h2_dedx_P_mag_postv->Draw("colz");
36 
37  h2_dedx_P_mag_postv->GetYaxis()->SetLabelSize(.02);
38  h2_dedx_P_mag_postv->GetYaxis()->SetTitle("#frac{dE}{dx} (au)");
39  h2_dedx_P_mag_postv->GetYaxis()->CenterTitle();
40  h2_dedx_P_mag_postv->GetYaxis()->SetTitleOffset(1.25);
41 
42  h2_dedx_P_mag_postv->GetXaxis()->CenterTitle();
43  h2_dedx_P_mag_postv->GetZaxis()->SetLabelFont(20);
44  h2_dedx_P_mag_postv->GetZaxis()->SetLabelSize(0.02);
45 
46 
47  c1->cd(2);
48  gPad->SetTicks();
49  gPad->SetGrid();
50  gPad->SetLogz();
51  if(h2_dedx_P_mag_negtv) h2_dedx_P_mag_negtv->Draw("colz");
52  h2_dedx_P_mag_negtv->GetYaxis()->SetLabelSize(.02);
53  h2_dedx_P_mag_negtv->GetYaxis()->SetTitle("#frac{dE}{dx} (au)");
54  h2_dedx_P_mag_negtv->GetYaxis()->CenterTitle();
55  h2_dedx_P_mag_negtv->GetXaxis()->CenterTitle();
56  h2_dedx_P_mag_negtv->GetYaxis()->SetTitleOffset(1.25);
57  h2_dedx_P_mag_negtv->GetZaxis()->SetLabelFont(20);
58  h2_dedx_P_mag_negtv->GetZaxis()->SetLabelSize(0.02);
59 
60 }
static TH2I * h2_dedx_P_mag
Double_t c1[2][NMODULES]
Definition: tw_corr.C:68
static TH2I * h2_dedx_P_mag_negtv
static TH2I * h2_dedx_P_mag_postv
void ST_Monitoring_Pid()
TDirectory * dir
Definition: bcal_hist_eff.C:31