FEDRA emulsion software from the OPERA Collaboration
check_aligned.C File Reference

Functions

void a ()
 
void check_aligned ()
 
void check_corr ()
 
void check_diff ()
 
void check_shrinkage ()
 

Function Documentation

◆ a()

void a ( )
79{
80 cshr_1->cd(); couples->Draw("(s2.eY-s1.eY)/(s2.eZ-s1.eZ):(s2.eX-s1.eX)/(s2.eZ-s1.eZ)");
81 cshr_3->cd(); couples->Draw("eCHI2");
82}
TTree * couples
Definition: check_cp.C:50

◆ check_aligned()

void check_aligned ( )
2{
4}
void check_diff()
Definition: check_aligned.C:8

◆ check_corr()

void check_corr ( )
28{
29 TCanvas *diff = new TCanvas("corr","corr");
30 diff->Clear();
31 diff->Divide(2,2);
32 gStyle->SetOptFit(0001);
33
34 corr_1->cd();
35 couples->Draw("s1.eTX-(s2.eX-s1.eX)/(s2.eZ-s1.eZ):(s2.eX-s1.eX)/(s2.eZ-s1.eZ)","pid2>-1&&eCHI2P<1.2&&abs(s1.eTY)<.1&&abs(s2.eTY)<.1");
36 corr_2->cd();
37 couples->Draw("s1.eTX-(s2.eX+s2.eTX*10-s1.eX-s1.eTX*10)/(s2.eZ-s1.eZ):(s2.eX-s1.eX)/(s2.eZ-s1.eZ)","pid2>-1&&eCHI2P<1.2&&abs(s1.eTY)<.1&&abs(s2.eTY)<.1");
38
39 corr_3->cd();
40 couples->Draw("eCHI2","pid2>-1&&abs(s1.eTY)<.1&&abs(s2.eTY)<.1");
41 corr_4->cd();
42 couples->Draw("eCHI2P","pid2>-1&&abs(s1.eTY)<.1&&abs(s2.eTY)<.1");
43}
new TCanvas()

◆ check_diff()

void check_diff ( )
9{
10 TCanvas *diff = new TCanvas("diff","diff");
11 diff->Clear();
12 diff->Divide(2,2);
13 gStyle->SetOptFit(0001);
14
15 diff_1->cd();
16 couples->Draw("s1.eTX-(s2.eX-s1.eX)/(s2.eZ-s1.eZ):(s2.eX-s1.eX)/(s2.eZ-s1.eZ)","pid2>-1&&eCHI2P<1.2&&abs(s1.eTY)<.1&&abs(s2.eTY)<.1");
17 diff_2->cd();
18 couples->Draw("s2.eTX-(s2.eX-s1.eX)/(s2.eZ-s1.eZ):(s2.eX-s1.eX)/(s2.eZ-s1.eZ)","pid2>-1&&eCHI2P<1.2&&abs(s1.eTY)<.1&&abs(s2.eTY)<.1");
19
20 diff_3->cd();
21 couples->Draw("eCHI2","pid2>-1&&abs(s1.eTY)<.1&&abs(s2.eTY)<.1");
22 diff_4->cd();
23 couples->Draw("eCHI2P","pid2>-1&&abs(s1.eTY)<.1&&abs(s2.eTY)<.1");
24}

◆ check_shrinkage()

void check_shrinkage ( )
47{
48 // this function check shrinkage and/or distance between linked planes
49 // Note: do not use s.* (linked segment parameters), because them could
50 // be different from the "base angle" calculated here directly
51
52 TCanvas *cshr = new TCanvas("cshr","shrinkage");
53 cshr->Clear();
54 cshr->Divide(2,2);
55 gStyle->SetOptFit(0001);
56
57 cshr_1->cd();
58 couples->Draw("s1.eTX-(s2.eX-s1.eX)/(s2.eZ-s1.eZ):(s2.eX-s1.eX)/(s2.eZ-s1.eZ)","pid2>-1&&eCHI2<1.5","prof");
59 htemp->Fit("pol1","w","",-.4,.4);
60 float p0 = htemp->GetFunction("pol1")->GetParameter(0);
61 float p1 = htemp->GetFunction("pol1")->GetParameter(1);
62 char str[160]="";
63 sprintf(str,"s1.eTX*(1-(%f))-(%f)-(s2.eX-s1.eX)/(s2.eZ-s1.eZ):(s2.eX-s1.eX)/(s2.eZ-s1.eZ)",p1,p0);
64 cshr_3->cd(); couples->Draw(str,"pid2>-1&&eCHI2<1.5","prof");
65 htemp->Fit("pol1","w","",-.4,.4);
66
67 cshr_2->cd();
68 couples->Draw("s2.eTX-(s2.eX-s1.eX)/(s2.eZ-s1.eZ):(s2.eX-s1.eX)/(s2.eZ-s1.eZ)","pid2>-1&&eCHI2<1.5","prof");
69 htemp->Fit("pol1","w","",-.4,.4);
70 p0 = htemp->GetFunction("pol1")->GetParameter(0);
71 p1 = htemp->GetFunction("pol1")->GetParameter(1);
72 sprintf(str,"s2.eTX*(1-(%f))-(%f)-(s2.eX-s1.eX)/(s2.eZ-s1.eZ):(s2.eX-s1.eX)/(s2.eZ-s1.eZ)",p1,p0);
73 cshr_4->cd(); couples->Draw(str,"pid2>-1&&eCHI2<1.5","prof");
74 htemp->Fit("pol1","w","",-.4,.4);
75}