1
|
#include "TLine.h"
|
2
|
#include "TPad.h"
|
3
|
#include "TCutG.h"
|
4
|
|
5
|
void showT1Sim()
|
6
|
{
|
7
|
|
8
|
TFile *fc = new TFile("cut.root", "READ");
|
9
|
TCutG *cHe = (TCutG*)fc->Get("cut3He");
|
10
|
|
11
|
TFile *fcPos = new TFile("cutsPos.root", "READ");
|
12
|
TCutG *c3He = (TCutG*)fcPos->Get("c3HePos");
|
13
|
TCutG *c6He = (TCutG*)fcPos->Get("c6HePos");
|
14
|
|
15
|
TFile *fr = new TFile("sim_digi.root", "READ");
|
16
|
TTree *tr = (TTree*)fr->Get("er");
|
17
|
tr->AddFriend("out", "output.root");
|
18
|
|
19
|
|
20
|
|
21
|
TCanvas *c3 = new TCanvas("c3", "Telescope info", 1200, 800);
|
22
|
c3->Divide(3,2);
|
23
|
|
24
|
c3->cd(1);
|
25
|
|
26
|
tr->Draw("ERQTelescopeSiDigi_DoubleSi_SD1_XY_0_X.fEdep*1000:ERQTelescopeSiDigi_DoubleSi_SD2_XY_1_X.fEdep*1000",
|
27
|
"ERQTelescopeSiDigi_DoubleSi_SD1_XY_0_X.fEdep*1000<6 && ERQTelescopeSiDigi_DoubleSi_SD2_XY_1_X.fEdep*1000<70","");
|
28
|
cHe->Draw("same");
|
29
|
|
30
|
c3->cd(2);
|
31
|
|
32
|
|
33
|
|
34
|
tr->Draw("ERQTelescopeTrack_DoubleSi_SD2_XY_1.fTelescopeY:ERQTelescopeTrack_DoubleSi_SD2_XY_1.fTelescopeX", "cut3He", "col");
|
35
|
|
36
|
c3->cd(3);
|
37
|
tr->Draw("ERQTelescopeTrack_DoubleSi_SD2_XY_1.fTelescopeY:ERQTelescopeTrack_DoubleSi_SD2_XY_1.fTelescopeX", "", "col");
|
38
|
c3He->SetLineWidth(3);
|
39
|
c3He->SetLineColor(kRed);
|
40
|
c3He->Draw("same");
|
41
|
c6He->Draw("same");
|
42
|
c6He->SetLineWidth(3);
|
43
|
c6He->SetLineColor(kGreen);
|
44
|
|
45
|
|
46
|
c3->cd(4);
|
47
|
tr->Draw("(MCTrack.fEnergy - MCTrack.fMass)*1000", "MCTrack.fPdgCode == 1000010010");
|
48
|
tr->Draw("(MCTrack.fEnergy - MCTrack.fMass)*1000", "MCTrack.fPdgCode == 2212");
|
49
|
tr->Draw("ERQTelescopeSiDigi_DoubleSi_SD1_XY_0_X.fEdep*1000:ERQTelescopeSiDigi_DoubleSi_SD2_XY_1_X.fEdep*1000",
|
50
|
"ERQTelescopeSiDigi_DoubleSi_SD1_XY_0_X.fEdep*1000<6 && ERQTelescopeSiDigi_DoubleSi_SD2_XY_1_X.fEdep*1000<70","");
|
51
|
cHe->Draw("same");
|
52
|
tr->SetMarkerColor(kRed);
|
53
|
tr->Draw("ERQTelescopeSiDigi_DoubleSi_SD1_XY_0_X.fEdep*1000:ERQTelescopeSiDigi_DoubleSi_SD2_XY_1_X.fEdep*1000",
|
54
|
"ERQTelescopeSiDigi_DoubleSi_SD1_XY_0_X.fEdep*1000<6 "
|
55
|
"&& ERQTelescopeSiDigi_DoubleSi_SD2_XY_1_X.fEdep*1000<70 "
|
56
|
"&& cut3He","same");
|
57
|
|
58
|
|
59
|
c3->cd(5);
|
60
|
tr->Draw("ERQTelescopeSiDigi_DoubleSi_SD1_XY_0_X.fEdep*1000:ERQTelescopeSiDigi_DoubleSi_SD2_XY_1_X.fEdep*1000","","col");
|
61
|
|
62
|
|
63
|
c3->cd(6);
|
64
|
tr->Draw("ERQTelescopeSiPoint_DoubleSi_SD2_XY_1_X.fY:ERQTelescopeSiPoint_DoubleSi_SD2_XY_1_X.fX", "", "col");
|
65
|
|
66
|
|
67
|
|
68
|
TCanvas *c1 = new TCanvas("c1", "Telescope info", 1200, 800);
|
69
|
c1->Divide(3,2);
|
70
|
|
71
|
c1->cd(1);
|
72
|
tr->Draw("ERQTelescopeTrack_DoubleSi_SD2_XY_1.fTelescopeY:ERQTelescopeTrack_DoubleSi_SD2_XY_1.fTelescopeX", "", "col");
|
73
|
c3He->Draw("same");
|
74
|
|
75
|
c1->cd(2);
|
76
|
|
77
|
tr->Draw("energy", "energy>0");
|
78
|
|
79
|
|
80
|
c1->cd(3);
|
81
|
|
82
|
tr->Draw("energy*1000", "energy>0 && cut3He");
|
83
|
|
84
|
c1->cd(4);
|
85
|
tr->Draw("particle.Theta()*TMath::RadToDeg()", "");
|
86
|
tr->Draw("particle.Phi()*TMath::RadToDeg()", "");
|
87
|
tr->Draw("particle.Theta()*TMath::RadToDeg():particle.Phi()*TMath::RadToDeg()", "");
|
88
|
tr->Draw("particle.fP.fY:particle.fP.fX", "");
|
89
|
tr->Draw("ERQTelescopeTrack_DoubleSi_SD2_XY_1.fSumEdep*1000", "cut3He", "");
|
90
|
|
91
|
|
92
|
|
93
|
c1->cd(6);
|
94
|
|
95
|
tr->Draw("MCTrack.fEnergy*1000-2809", "MCTrack.fPdgCode == 1000020030");
|
96
|
tr->Draw("MCTrack.fEnergy*1000-2809", "MCTrack.fPdgCode == 1000020030 && ERQTelescopeTrack_DoubleSi_SD2_XY_1.fSumEdep");
|
97
|
|
98
|
|
99
|
|
100
|
c1->cd(5);
|
101
|
tr->Draw("MCTrack.fEnergy*1000-2809 - energy*1000", "energy>0 && cut3He");
|
102
|
tr->Draw("MCTrack.fEnergy*1000-2809", "MCTrack.fPdgCode == 1000020030");
|
103
|
tr->Draw("MCTrack.fEnergy*1000-2809 - ERQTelescopeTrack_DoubleSi_SD2_XY_1.fSumEdep*1000", "cut3He && MCTrack.fPdgCode == 1000020030");
|
104
|
|
105
|
|
106
|
|
107
|
|
108
|
}
|