drawReco.C

Vitaliy Schetinin, 04/12/2018 10:22 PM

Download (2.06 KB)

 
1
{
2
        TFile* f = new TFile("sim_digi.root");
3
           TTree* t = (TTree*)f->Get("er");
4
           t->AddFriend("er","reco.root");
5

    
6
        TCanvas *c1 = new TCanvas("c1", "Telescope Coordinate reconstruction", 1400, 1000);
7
        c1->Divide(3,2);
8

    
9
        c1->cd(1);
10
        gPad->SetLogy();
11
        TH1F *T1X = new TH1F("T1X","T1 Xreco-Xsim",100,-1,1);
12
        T1X->GetXaxis()->SetTitle("Xreco-Xsim[cm]");
13
        //T1deE->GetYaxis()->SetTitle("de");
14
        t->Draw("ERQTelescopeTrack_T1_DoubleSi_SD2_XY_0.fTelescopeGlobalX-ERQTelescopeSiPoint_T1_DoubleSi_SD2_XY_0_Y.fX>>T1X","","gof");
15
        T1X->Draw();
16

    
17
        c1->cd(2);
18
        gPad->SetLogy();
19
        TH1F *T1Y = new TH1F("T1Y","T1 Yreco-Ysim",100,-1,1);
20
        T1Y->GetXaxis()->SetTitle("Yreco-Ysim[cm]");
21
        //T1deE->GetYaxis()->SetTitle("de");
22
        t->Draw("ERQTelescopeTrack_T1_DoubleSi_SD2_XY_0.fTelescopeGlobalY-ERQTelescopeSiPoint_T1_DoubleSi_SD2_XY_0_Y.fY>>T1Y","","gof");
23
        T1Y->Draw();
24

    
25
        c1->cd(3);
26
        gPad->SetLogy();
27
        TH1F *T1Z = new TH1F("T1Z","T1 Zreco-Zsim",100,-1,1);
28
        T1Z->GetXaxis()->SetTitle("Zreco-Zsim[cm]");
29
        //T1deE->GetYaxis()->SetTitle("de");
30
        t->Draw("ERQTelescopeTrack_T1_DoubleSi_SD2_XY_0.fTelescopeGlobalZ-ERQTelescopeSiPoint_T1_DoubleSi_SD2_XY_0_Y.fZ>>T1Z","","gof");
31
        T1Z->Draw();
32

    
33
        c1->cd(4);
34
        gPad->SetLogy();
35
        TH1F *T2X = new TH1F("T2X","T2 Xreco-Xsim",100,-1,1);
36
        T2X->GetXaxis()->SetTitle("Xreco-Xsim[cm]");
37
        //T1deE->GetYaxis()->SetTitle("de");
38
        t->Draw("ERQTelescopeTrack_T2_DoubleSi_SD2_XY_1.fTelescopeGlobalX-ERQTelescopeSiPoint_T2_DoubleSi_SD2_XY_1_YX.fX>>T2X","","gof");
39
        T2X->Draw();
40

    
41
        c1->cd(5);
42
        gPad->SetLogy();
43
        TH1F *T2Y = new TH1F("T2Y","T2 Yreco-Ysim",100,-1,1);
44
        T2Y->GetXaxis()->SetTitle("Yreco-Ysim[cm]");
45
        //T1deE->GetYaxis()->SetTitle("de");
46
        t->Draw("ERQTelescopeTrack_T2_DoubleSi_SD2_XY_1.fTelescopeGlobalY-ERQTelescopeSiPoint_T2_DoubleSi_SD2_XY_1_Y.fY>>T2Y","","gof");
47
        T2Y->Draw();
48

    
49
        c1->cd(6);
50
        gPad->SetLogy();
51
        TH1F *T2Z = new TH1F("T2Z","T2 Zreco-Zsim",100,-1,1);
52
        T2Z->GetXaxis()->SetTitle("Zreco-Zsim[cm]");
53
        //T1deE->GetYaxis()->SetTitle("de");
54
        t->Draw("ERQTelescopeTrack_T2_DoubleSi_SD2_XY_1.fTelescopeGlobalZ-ERQTelescopeSiPoint_T2_DoubleSi_SD2_XY_1_Y.fZ>>T2Z","","gof");
55
        T2Z->Draw();
56

    
57

    
58

    
59
}