show_sim.C

Vratislav Chudoba, 09/07/2017 06:45 PM

Download (1.18 KB)

 
1
void show_sim()
2
{
3
        TFile *fr = new TFile("sim.root");
4
        TTree *tr = (TTree*)fr->Get("cbmsim");
5

    
6
        TCanvas *c1 = new TCanvas();
7
        c1->Divide(3,2);
8

    
9
        c1->cd(1);
10
        tr->Draw("RTelescope1Si1Point.fY:RTelescope1Si1Point.fX", "", "box");
11
//        tr->Draw("RTelescope1Si1Point.fX", "", "box");
12

    
13
        c1->cd(3);
14
        tr->Draw("RTelescope1Si1Point.fELoss+RTelescope1Si2Point.fELoss+RTelescope1CsIPoint.fELoss",
15
                        "RTelescope1Si1Point.fPID<3000 && RTelescope1Si2Point.fPID<3000 && RTelescope1CsIPoint.fPID<3000");
16

    
17
        c1->cd(2);
18
        tr->Draw("RTelescope1Si1Point.fPID", "RTelescope1Si1Point.fPID>800000000");
19

    
20
        c1->cd(3);
21
        tr->Draw("RTelescope1Si1Point.fPID", "RTelescope1Si1Point.fPID<800000000");
22

    
23
        c1->cd(4);
24
        tr->Draw("RTelescope1Si1Point.fELoss+RTelescope1Si2Point.fELoss+RTelescope1CsIPoint.fELoss", "");
25

    
26
        c1->cd(5);
27
                tr->Draw("RTelescope1Si1Point.fELoss+RTelescope1Si2Point.fELoss+RTelescope1CsIPoint.fELoss",
28
                                "RTelescope1Si1Point.fPID<3000 && RTelescope1Si2Point.fPID<3000 && RTelescope1CsIPoint.fPID<3000");
29

    
30
        c1->cd(6);
31
        tr->Draw("RTelescope1Si1Point.fELoss+RTelescope1Si2Point.fELoss+RTelescope1CsIPoint.fELoss",
32
                        "RTelescope1Si1Point.fPID>3000 && RTelescope1Si2Point.fPID>3000 && RTelescope1CsIPoint.fPID>3000");
33

    
34
}