drawCuts.C
1 |
void drawCuts(){
|
---|---|
2 |
Float_t parCsR2[16],parCsR1[16],par202[16],par201[16]; |
3 |
ifstream myfile7; |
4 |
TString line7; |
5 |
Int_t count=-2;
|
6 |
myfile7.open("/media/user/work/data/analysisexp1804/presentPars/csi_r_ec.clb");
|
7 |
while (! myfile7.eof() ) {
|
8 |
line7.ReadLine(myfile7); |
9 |
if(count < 0){ |
10 |
count++; |
11 |
continue;
|
12 |
} |
13 |
if(line7.IsNull()) break; |
14 |
sscanf(line7.Data(),"%g %g", parCsR1+count,parCsR2+count);
|
15 |
count++; |
16 |
} |
17 |
|
18 |
cout << endl << " pars for CsR strips" << endl;
|
19 |
for(Int_t i=0;i<16;i++) cout << parCsR1[i] << " " << parCsR2[i] << endl; |
20 |
|
21 |
ifstream myfile5; |
22 |
TString line5; |
23 |
count=-2;
|
24 |
myfile5.open("/media/user/work/data/analysisexp1804/presentPars/SQ20.cal");
|
25 |
while (! myfile5.eof() ){
|
26 |
line5.ReadLine(myfile5); |
27 |
if(count < 0){ |
28 |
count++; |
29 |
continue;
|
30 |
} |
31 |
if(line5.IsNull()) break; |
32 |
sscanf(line5.Data(),"%g %g", par201+count,par202+count);
|
33 |
count++; |
34 |
} |
35 |
|
36 |
cout << endl << " pars for 20um strips" << endl;
|
37 |
for(Int_t i=0;i<16;i++) cout << par201[i] << " " << par202[i] << endl; |
38 |
|
39 |
|
40 |
TChain *t = new TChain("AnalysisxTree"); |
41 |
t->Add("/media/user/work/data/exp1804/h5_14_00*.root");
|
42 |
cout << t->GetEntries() << endl; |
43 |
|
44 |
|
45 |
TString gName,gDraw,gCut; |
46 |
TString gName1,gDraw1,gCut1; |
47 |
|
48 |
TGraph *g; |
49 |
|
50 |
// TCanvas *c1 = new TCanvas("c1","cuts",1800,1000);
|
51 |
// c1->Divide(4,4);
|
52 |
|
53 |
// for(Int_t i=0;i<16;i++){
|
54 |
|
55 |
// gName.Form("g%d",i+1);
|
56 |
// gDraw.Form("NeEvent.SQY_R[%d]:NeEvent.tSQY_R[%d]*0.3 - NeEvent.tF5[0]*0.125",i,i);
|
57 |
// gCut.Form("NeEvent.SQY_R[%d]>150",i);
|
58 |
|
59 |
// gDraw1.Form("NeEvent.SQY_R[%d]:NeEvent.tSQY_R[%d]*0.3 - NeEvent.tF5[0]*0.125",i,i);
|
60 |
// gCut1.Form("NeEvent.SQY_R[%d]>150 && NeEvent.tSQY_R[%d]*0.3 - NeEvent.tF5[0]*0.125 > -70 && NeEvent.tSQY_R[%d]*0.3 - NeEvent.tF5[0]*0.125<0",i,i,i);
|
61 |
|
62 |
|
63 |
// c1->cd(i+1);
|
64 |
// t->SetMarkerColor(kBlack);
|
65 |
// t->Draw(gDraw.Data(),gCut.Data(),"", 1000000, 0);
|
66 |
|
67 |
// t->SetMarkerColor(kRed);
|
68 |
// t->Draw(gDraw1.Data(),gCut1.Data(),"same", 1000000, 0);
|
69 |
|
70 |
|
71 |
// c1->Update();
|
72 |
// }
|
73 |
|
74 |
|
75 |
TCanvas *c1 = new TCanvas("c1","cuts",1800,1000); |
76 |
c1->Divide(4,4); |
77 |
|
78 |
for(Int_t i=0;i<16;i++){ |
79 |
|
80 |
gName.Form("g%d",i+1); |
81 |
gDraw.Form("NeEvent.SQ20[%d]*%f+%f:NeEvent.tSQ20[%d]*0.3 - NeEvent.tF5[0]*0.125",i,par202[i],par201[i],i);
|
82 |
gCut.Form("NeEvent.tSQ20[%d]>0 && NeEvent.tSQ20[%d]*0.3 - NeEvent.tF5[0]*0.125 > 0 && NeEvent.tSQ20[%d]*0.3 - NeEvent.tF5[0]*0.125<250",i,i,i);
|
83 |
|
84 |
gDraw1.Form("NeEvent.SQ20[%d]*%f+%f:NeEvent.tSQ20[%d]*0.3 - NeEvent.tF5[0]*0.125",i,par202[i],par201[i],i);
|
85 |
gCut1.Form("NeEvent.SQ20[%d]*%f+%f>1 && NeEvent.tSQ20[%d]>0 && NeEvent.tSQ20[%d]*0.3 - NeEvent.tF5[0]*0.125 > 30 && NeEvent.tSQ20[%d]*0.3 - NeEvent.tF5[0]*0.125<170",i,par202[i],par201[i],i,i,i);
|
86 |
|
87 |
|
88 |
c1->cd(i+1);
|
89 |
t->SetMarkerColor(kBlack); |
90 |
t->Draw(gDraw.Data(),gCut.Data(),"", 10000000, 0); |
91 |
|
92 |
t->SetMarkerColor(kRed); |
93 |
t->SetMarkerStyle(8);
|
94 |
t->Draw(gDraw1.Data(),gCut1.Data(),"same", 10000000, 0); |
95 |
|
96 |
|
97 |
c1->Update(); |
98 |
} |
99 |
|
100 |
|
101 |
|
102 |
|
103 |
// TCanvas *c1 = new TCanvas("c1","cuts",1800,1000);
|
104 |
// c1->Divide(4,4);
|
105 |
|
106 |
// for(Int_t i=0;i<16;i++){
|
107 |
|
108 |
// gName.Form("g%d",i+1);
|
109 |
// gDraw.Form("NeEvent.CsI_R[%d]*%f+%f:NeEvent.tCsI_R[%d]*0.3 - NeEvent.tF5[0]*0.125",i,parCsR2[i],parCsR1[i],i);
|
110 |
// // gCut.Form("NeEvent.tCsI_R[%d]>0 && NeEvent.tCsI_R[%d]*0.3 - NeEvent.tF5[0]*0.125 > 0 && NeEvent.tCsI_R[%d]*0.3 - NeEvent.tF5[0]*0.125<250",i,i,i);
|
111 |
// gCut.Form("trigger==3 && NeEvent.CsI_R[%d]*%f+%f>0 && NeEvent.tCsI_R[%d]*0.3 - NeEvent.tF5[0]*0.125>300 && NeEvent.tCsI_R[%d]*0.3 - NeEvent.tF5[0]*0.125<600",i,parCsR2[i],parCsR1[i],i,i);
|
112 |
|
113 |
// gDraw1.Form("NeEvent.CsI_R[%d]*%f+%f:NeEvent.tCsI_R[%d]*0.3 - NeEvent.tF5[0]*0.125",i,parCsR2[i],parCsR1[i],i);
|
114 |
// gCut1.Form("trigger==3 && NeEvent.CsI_R[%d]*%f+%f>0 && NeEvent.tCsI_R[%d]*0.3 - NeEvent.tF5[0]*0.125>365 && NeEvent.tCsI_R[%d]*0.3 - NeEvent.tF5[0]*0.125<430",i,parCsR2[i],parCsR1[i],i,i);
|
115 |
|
116 |
|
117 |
// c1->cd(i+1);
|
118 |
// t->SetMarkerColor(kBlack);
|
119 |
// t->Draw(gDraw.Data(),gCut.Data(),"", 1000000, 0);
|
120 |
// // if(i>0) t->Draw(gDraw.Data(),gCut.Data(),"same", 1000000, 0);
|
121 |
|
122 |
// t->SetMarkerColor(kRed);
|
123 |
// // t->SetMarkerStyle(8);
|
124 |
// t->Draw(gDraw1.Data(),gCut1.Data(),"same", 1000000, 0);
|
125 |
|
126 |
|
127 |
// c1->Update();
|
128 |
// }
|
129 |
|
130 |
// t->Draw("(NeEvent.F5[0]+NeEvent.F5[1]+NeEvent.F5[2]+NeEvent.F5[3]+NeEvent.F3[0]+NeEvent.F3[1]+NeEvent.F3[2]+NeEvent.F3[3]):(NeEvent.tF5[0]+NeEvent.tF5[1]+NeEvent.tF5[2]+NeEvent.tF5[3] - NeEvent.tF3[0]-NeEvent.tF3[1]-NeEvent.tF3[2]-NeEvent.tF3[3])*0.25*0.125 + 89.165>>(200,100,200,200,1000,20000)","","",100000,0);
|
131 |
|
132 |
|
133 |
|
134 |
// ->Draw("NeEvent.SQ20[7]:NeEvent.tSQ20[7]*0.3-NeEvent.F5[]*0.125","NeEvent.tSQ20[7]>0","", 741848, 0);
|
135 |
return;
|
136 |
} |