Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HistMacro_BCALReconstruction_p1.C
Go to the documentation of this file.
1 // hnamepath: /Independent/Hist_Reconstruction/BCALShowerPhiVsZ
2 // hnamepath: /Independent/Hist_Reconstruction/BCALShowerEnergy
3 // hnamepath: /Independent/Hist_Neutrals/BCALNeutralShowerEnergy
4 // hnamepath: /Independent/Hist_Neutrals/BCALNeutralShowerDeltaT
5 // hnamepath: /Independent/Hist_Neutrals/BCALNeutralShowerDeltaTVsE
6 
7 {
8  //Goto Path
9  TDirectory *locDirectory = (TDirectory*)gDirectory->FindObjectAny("Hist_Reconstruction");
10  if(!locDirectory)
11  return;
12  locDirectory->cd();
13 
14  //Get Histograms
15  TH2I* locHist_BCALShowerPhiVsZ = (TH2I*)gDirectory->Get("BCALShowerPhiVsZ");
16  TH1I* locHist_BCALShowerEnergy = (TH1I*)gDirectory->Get("BCALShowerEnergy");
17 
18  gDirectory->cd("../Hist_Neutrals");
19  TH1I* locHist_BCALNeutralShowerEnergy = (TH1I*)gDirectory->Get("BCALNeutralShowerEnergy"); //photon(?)
20  TH1I* locHist_BCALNeutralShowerDeltaT = (TH1I*)gDirectory->Get("BCALNeutralShowerDeltaT"); //photon(?)
21  TH2I* locHist_BCALNeutralShowerDeltaTVsE = (TH2I*)gDirectory->Get("BCALNeutralShowerDeltaTVsE"); //photon(?)
22 
23  //Get/Make Canvas
24  TCanvas *locCanvas = NULL;
25  if(TVirtualPad::Pad() == NULL)
26  locCanvas = new TCanvas("BCALReconstruction_p1", "BCALReconstruction_p1", 1200, 800); //for testing
27  else
28  locCanvas = gPad->GetCanvas();
29  locCanvas->Divide(3, 2);
30 
31  //Draw
32  locCanvas->cd(1);
33  gPad->SetTicks();
34  gPad->SetGrid();
35  if(locHist_BCALShowerPhiVsZ != NULL)
36  {
37  locHist_BCALShowerPhiVsZ->GetXaxis()->SetTitleSize(0.04);
38  locHist_BCALShowerPhiVsZ->GetYaxis()->SetTitleSize(0.04);
39  locHist_BCALShowerPhiVsZ->GetXaxis()->SetLabelSize(0.04);
40  locHist_BCALShowerPhiVsZ->GetYaxis()->SetLabelSize(0.04);
41  locHist_BCALShowerPhiVsZ->Draw("COLZ");
42  }
43 
44  locCanvas->cd(2);
45  gPad->SetTicks();
46  gPad->SetGrid();
47  if(locHist_BCALShowerEnergy != NULL)
48  {
49  locHist_BCALShowerEnergy->GetXaxis()->SetTitleSize(0.04);
50  locHist_BCALShowerEnergy->GetXaxis()->SetLabelSize(0.04);
51  locHist_BCALShowerEnergy->GetYaxis()->SetLabelSize(0.04);
52  locHist_BCALShowerEnergy->Draw();
53  }
54 
55  locCanvas->cd(3);
56  gPad->SetTicks();
57  gPad->SetGrid();
58  if(locHist_BCALNeutralShowerEnergy != NULL)
59  {
60  locHist_BCALNeutralShowerEnergy->GetXaxis()->SetTitleSize(0.04);
61  locHist_BCALNeutralShowerEnergy->GetXaxis()->SetLabelSize(0.04);
62  locHist_BCALNeutralShowerEnergy->GetYaxis()->SetLabelSize(0.04);
63  locHist_BCALNeutralShowerEnergy->Draw();
64  }
65 
66  locCanvas->cd(4);
67  gPad->SetTicks();
68  gPad->SetGrid();
69  if(locHist_BCALNeutralShowerDeltaT != NULL)
70  {
71  locHist_BCALNeutralShowerDeltaT->GetXaxis()->SetTitleSize(0.04);
72  locHist_BCALNeutralShowerDeltaT->GetXaxis()->SetLabelSize(0.04);
73  locHist_BCALNeutralShowerDeltaT->GetYaxis()->SetLabelSize(0.04);
74  locHist_BCALNeutralShowerDeltaT->Draw();
75  }
76 
77  locCanvas->cd(5);
78  gPad->SetTicks();
79  gPad->SetGrid();
80  if(locHist_BCALNeutralShowerDeltaTVsE != NULL)
81  {
82  locHist_BCALNeutralShowerDeltaTVsE->GetXaxis()->SetTitleSize(0.04);
83  locHist_BCALNeutralShowerDeltaTVsE->GetYaxis()->SetTitleSize(0.04);
84  locHist_BCALNeutralShowerDeltaTVsE->GetXaxis()->SetLabelSize(0.04);
85  locHist_BCALNeutralShowerDeltaTVsE->GetYaxis()->SetLabelSize(0.04);
86  locHist_BCALNeutralShowerDeltaTVsE->Draw("COLZ");
87  }
88 }
89 
TH1I * locHist_BCALNeutralShowerDeltaT
TH2I * locHist_BCALNeutralShowerDeltaTVsE
TDirectory * locDirectory
TH1I * locHist_BCALNeutralShowerEnergy
TH2I * locHist_BCALShowerPhiVsZ
TH1I * locHist_BCALShowerEnergy
TCanvas * locCanvas