Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PS_eff.C
Go to the documentation of this file.
1 // The following are special comments used by RootSpy to know
2 // which histograms to fetch for the macro.
3 //
4 
5 // hnamepath: /PSPair/PSC/PSC_PSCIDLeftVsIDRight
6 // hnamepath: /PSPair/PSC_PS/PS_PSCIDLeftVsIDRight
7 
8 {
9  TDirectory *dir = (TDirectory*)gDirectory->FindObjectAny("PSPair");
10  if(dir) dir->cd();
11 
12  TH2F *id_LR_D =(TH2F*)gDirectory->Get("PSC/PSC_PSCIDLeftVsIDRight");
13  TH2F *id_LR_N =(TH2F*)gDirectory->Get("PSC_PS/PS_PSCIDLeftVsIDRight");
14 
15  TH2F *eff = (TH2F*)id_LR_N->Clone();
16  eff->Sumw2();
17  eff->Divide(id_LR_N,id_LR_D);
18 
19  if(gPad == NULL){
20  TCanvas *c1 = new TCanvas("c1","Fine PS Efficiency",150,10,990,660);
21  c1->cd(0);
22  c1->Draw();
23  c1->Update();
24  }
25 
26  if(!gPad) return;
27  TCanvas* c1 = gPad->GetCanvas();
28 
29  double tsize = 0.045;
30  gStyle->SetOptStat("");
31  eff->SetTitle("Fine PS Efficiency: N(PSC,PS) / N(PSC)");
32  eff->SetTitleSize(tsize);
33  eff->SetTitleSize(tsize,"xy");
34  eff->Draw("colz");
35 
36 }
double tsize
Definition: DIRC_digihit.C:36
Double_t c1[2][NMODULES]
Definition: tw_corr.C:68
TDirectory * dir
Definition: bcal_hist_eff.C:31