Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PSC_hit3.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: /PSC/Hit/LeftArm/Hit_HasTDCvsHasADC_LeftArm
6 // hnamepath: /PSC/Hit/RightArm/Hit_HasTDCvsHasADC_RightArm
7 // hnamepath: /PSC/Hit/LeftArm/Hit_tdcadcTimeDiffVsModule_LeftArm
8 // hnamepath: /PSC/Hit/RightArm/Hit_tdcadcTimeDiffVsModule_RightArm
9 
10 {
11  TDirectory *dir = (TDirectory*)gDirectory->FindObjectAny("PSC");
12  if(dir) dir->cd();
13 
14  TH2F* hStat_l = (TH2F*)gDirectory->Get("Hit/LeftArm/Hit_HasTDCvsHasADC_LeftArm");
15  TH2F* hStat_r = (TH2F*)gDirectory->Get("Hit/RightArm/Hit_HasTDCvsHasADC_RightArm");
16  TH2I* hTl = (TH2I*)gDirectory->Get("Hit/LeftArm/Hit_tdcadcTimeDiffVsModule_LeftArm");
17  TH2I* hTr = (TH2I*)gDirectory->Get("Hit/RightArm/Hit_tdcadcTimeDiffVsModule_RightArm");
18 
19  if(gPad == NULL){
20  TCanvas *c1 = new TCanvas("c1","Coarse PS Hit Monitor III",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  c1->Divide(2,2);
29 
30  double tsize = 0.0475;
31  gStyle->SetOptStat("emr");
32  if(hStat_l){
33  c1->cd(1);
34  hStat_l->SetTitleSize(tsize,"xy");
35  hStat_l->GetYaxis()->SetRange(hStat_l->FindFirstBinAbove(10.0,2),hStat_l->FindLastBinAbove(10.0,2));
36  hStat_l->SetMarkerColor(kRed);
37  hStat_l->SetMarkerSize(2.0);
38  hStat_l->DrawNormalized("text");
39  }
40 
41  if(hStat_r){
42  c1->cd(2);
43  hStat_r->SetTitleSize(tsize,"xy");
44  hStat_r->GetYaxis()->SetRange(hStat_r->FindFirstBinAbove(10.0,2),hStat_r->FindLastBinAbove(10.0,2));
45  hStat_r->SetMarkerColor(kRed);
46  hStat_r->SetMarkerSize(2.0);
47  hStat_r->DrawNormalized("text");
48  }
49 
50  if(hTl){
51  c1->cd(3);
52  hTl->SetTitleSize(tsize,"xy");
53  hTl->GetYaxis()->SetRange(hTl->FindFirstBinAbove(10.0,2),hTl->FindLastBinAbove(10.0,2));
54  hTl->Draw("colz");
55  }
56 
57  if(hTr){
58  c1->cd(4);
59  hTr->SetTitleSize(tsize,"xy");
60  hTr->GetYaxis()->SetRange(hTr->FindFirstBinAbove(10.0,2),hTr->FindLastBinAbove(10.0,2));
61  hTr->Draw("colz");
62  }
63 
64 }
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