]>
Commit | Line | Data |
---|---|---|
13ba3684 | 1 | |
4070f709 | 2 | gSystem->Load("libSTAT"); |
13ba3684 | 3 | TStatToolkit stat; |
4 | Int_t npoints; | |
5 | Double_t chi2; | |
6 | TVectorD vec; | |
7 | TMatrixD mat; | |
8 | ||
9 | ||
10 | TObjArray * array = AliTPCCalibViewerGUI::ShowGUI("laserTree.root"); | |
11 | AliTPCCalibViewerGUI * viewer = (AliTPCCalibViewerGUI*)array->At(0); | |
12 | TTree * tree = viewer->GetViewer()->GetTree(); | |
13 | TFile fp("/data/calib/CalibTreePulser_run33834_Cside.root"); | |
14 | tree->AddFriend(treePulser,"P."); | |
15 | ||
16 | ||
17 | tree->SetAlias("dt","(sector%36>30)*2+(sector<36)*0.3"); | |
18 | tree->SetAlias("T","T0_100_220.fElements-P..StandardTime0.fElements"); | |
19 | tree->SetAlias("Tm","T0_100_220_Median.fElements"); | |
20 | tree->SetAlias("Q","Q_100_220.fElements"); | |
21 | tree->SetAlias("Qm","Q_100_220_Median.fElements"); | |
22 | ||
23 | tree->SetAlias("Qcut","abs(Q/Qm-2)<1.4&&Q>6&&Q<200"); | |
24 | tree->SetAlias("Tcut","abs(T-Tm)<2"); | |
25 | ||
26 | ||
27 | ||
28 | TString strSector=""; | |
29 | { | |
30 | for (Int_t isec=54;isec<71;isec+=1){ | |
31 | if (isec!=64) { | |
32 | strSector+="(sector=="; | |
33 | strSector+=isec; | |
34 | strSector+=")++"; | |
35 | strSector+="(lx.fElements-195.)*(sector=="; | |
36 | strSector+=isec; | |
37 | strSector+=")++"; | |
38 | strSector+="((lx.fElements-195)^2)*(sector=="; | |
39 | strSector+=isec; | |
40 | strSector+=")++"; | |
41 | } | |
42 | } | |
43 | } | |
44 | ||
45 | ||
46 | TCut cutA="Tcut&&Qcut&§or%36>17"; | |
47 | ||
48 | TString *strFitG =stat.FitPlane(tree,"T+dt","gx.fElements++gy.fElements",cutA,chi2,npoints,vec,mat); | |
49 | ||
50 | TString *strFitGL =stat.FitPlane(tree,"T+dt","lx.fElements++ly.fElements++gx.fElements++gy.fElements",cutA,chi2,npoints,vec,mat); | |
51 | ||
52 | TString *strFitGL2 =stat.FitPlane(tree,"T+dt","lx.fElements++ly.fElements++gx.fElements++gy.fElements++lx.fElements^2++ly.fElements^2",cutA,chi2,npoints,vec,mat); | |
53 | ||
54 | TString *strFitGLA =stat.FitPlane(tree,"T+dt",strSector+"lx.fElements++ly.fElements++gx.fElements++gy.fElements++lx.fElements^2++ly.fElements^2",cutA,chi2,npoints,vec,mat); | |
55 | ||
56 | ||
57 | tree->SetAlias("tfitG",strFitG->Data()) | |
58 | tree->SetAlias("tfitGL",strFitGL->Data()) | |
59 | tree->SetAlias("tfitGL2",strFitGL2->Data()) | |
60 | tree->SetAlias("tfitGLA",strFitGLA->Data()) | |
61 | ||
62 |