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

Functions

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

Function Documentation

◆ a()

void a ( )
60{
61 cshr_1->cd(); couples->Draw("(s2.eY-s1.eY)/(s2.eZ-s1.eZ):(s2.eX-s1.eX)/(s2.eZ-s1.eZ)");
62 cshr_3->cd(); couples->Draw("eCHI2");
63}
TTree * couples
Definition: check_cp.C:50

◆ check_aligned()

void check_aligned ( )
2{
4 // check_shrinkage();
5}
void check_diff()
Definition: check_aligned.C:8

◆ 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&&eCHI2<1.5&&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&&eCHI2<1.5&&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}
new TCanvas()

◆ check_shrinkage()

void check_shrinkage ( )
28{
29 // this function check shrinkage and/or distance between linked planes
30 // Note: do not use s.* (linked segment parameters), because them could
31 // be different from the "base angle" calculated here directly
32
33 TCanvas *cshr = new TCanvas("cshr","shrinkage");
34 cshr->Clear();
35 cshr->Divide(2,2);
36 gStyle->SetOptFit(0001);
37
38 cshr_1->cd();
39 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");
40 htemp->Fit("pol1","w","",-.4,.4);
41 float p0 = htemp->GetFunction("pol1")->GetParameter(0);
42 float p1 = htemp->GetFunction("pol1")->GetParameter(1);
43 char str[160]="";
44 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);
45 cshr_3->cd(); couples->Draw(str,"pid2>-1&&eCHI2<1.5","prof");
46 htemp->Fit("pol1","w","",-.4,.4);
47
48 cshr_2->cd();
49 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");
50 htemp->Fit("pol1","w","",-.4,.4);
51 p0 = htemp->GetFunction("pol1")->GetParameter(0);
52 p1 = htemp->GetFunction("pol1")->GetParameter(1);
53 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);
54 cshr_4->cd(); couples->Draw(str,"pid2>-1&&eCHI2<1.5","prof");
55 htemp->Fit("pol1","w","",-.4,.4);
56}