Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ccal_comp2.C
Go to the documentation of this file.
1 // hnamepath: /ccal/comp_cxy
2 // hnamepath: /ccal/comp_fxy
3 // hnamepath: /ccal/comp_bcdt_full
4 // hnamepath: /ccal/comp_bcdt
5 // hnamepath: /ccal/comp_fcdt
6 
7 {
8 
9  TDirectory *dir = (TDirectory*)gDirectory->FindObjectAny("ccal");
10  if(dir) dir->cd();
11 
12  TH2F* comp_cxy = (TH2F*)gDirectory->FindObjectAny( "comp_cxy" );
13  TH2F* comp_fxy = (TH2F*)gDirectory->FindObjectAny( "comp_fxy" );
14  TH1F* comp_bcdt_full = (TH1F*)gDirectory->FindObjectAny( "comp_bcdt_full" );
15  TH1F* comp_bcdt = (TH1F*)gDirectory->FindObjectAny( "comp_bcdt" );
16  TH1F* comp_fcdt = (TH1F*)gDirectory->FindObjectAny( "comp_fcdt" );
17 
18  if(gPad == NULL){
19 
20  TCanvas *c1 = new TCanvas( "c1", "CCAL Compton Monitor", 800, 800 );
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  if( comp_cxy ){
31 
32  comp_cxy->SetStats( 0 );
33  comp_cxy->GetXaxis()->SetRangeUser(-10.4,10.4);
34  comp_cxy->GetYaxis()->SetRangeUser(-10.4,10.4);
35  //TPad *p1 = (TPad*)c1->cd( 1 );
36  //p1->SetLogz();
37  c1->cd( 1 );
38  comp_cxy->Draw("COLZ");
39  }
40 
41  if( comp_fxy ){
42 
43  comp_fxy->SetStats( 0 );
44  comp_fxy->GetXaxis()->SetTitle("x_{fcal} [cm]");
45  comp_fxy->GetYaxis()->SetTitle("y_{fcal} [cm]");
46  c1->cd( 2 );
47  comp_fxy->Draw("COLZ");
48  }
49 
50  if( comp_bcdt_full && comp_bcdt ){
51 
52  comp_bcdt_full->SetStats( 0 );
53  comp_bcdt->SetStats( 0 );
54 
55  comp_bcdt_full->SetLineColor( kBlack );
56  comp_bcdt->SetLineColor( kRed );
57 
58  comp_bcdt_full->GetXaxis()->SetRangeUser(10,80);
59  comp_bcdt->GetXaxis()->SetRangeUser(10,80);
60 
61  comp_bcdt_full->SetTitle("CCAL Shower Time - Beam Time");
62  comp_bcdt_full->GetXaxis()->SetTitle("t_{ccal}-t_{beam} [ns]");
63 
64  c1->cd( 3 );
65  comp_bcdt_full->Draw();
66  //comp_bcdt->Draw("same");
67  }
68 
69  if( comp_fcdt ){
70 
71  comp_fcdt->SetStats( 0 );
72  comp_fcdt->GetXaxis()->SetRangeUser(0,40);
73  c1->cd( 4 );
74  comp_fcdt->Draw();
75  }
76 
77 }
Double_t c1[2][NMODULES]
Definition: tw_corr.C:68
TDirectory * dir
Definition: bcal_hist_eff.C:31