]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/CalibMacros/guiAlias.C
1. Cleaning of the code
[u/mrichter/AliRoot.git] / TPC / CalibMacros / guiAlias.C
1 /*
2   //Make default Aliases for guiTime:
3   // 1. Run the guiTime
4   //  guiTime
5   // 2. Define aliases
6   .L $ALICE_ROOT/TPC/CalibMacros/guiAlias.C
7   Init();
8   // 3. Use aliases inside the guiTime
9   //    You can use them as custom cuts
10   //
11   // browse special streamers
12   gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros");
13   gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+")
14   AliXRDPROOFtoolkit tool;
15   TChain * chainDCS = tool.MakeChainRandom("time.txt","dcs",0,10000);
16   TChain * chainCTP = tool.MakeChainRandom("time.txt","ctp",0,10000);
17   TChain * chainAlign = tool.MakeChainRandom("time.txt","align",0,10000);
18   
19 */
20
21 TTree * guiTree =  guiTime->GetChain();
22
23 void guiAlias(){
24   guiTree =  guiTime->GetChain();
25   MakeAliasCE(4);
26   MakeAliasLT(4);
27   MakeAliasCosmic(4);   
28   guiTree->SetAlias("goCut","abs(goofie.fElements[3]-2.677)<0.1");  
29 }
30
31 void SetStyle(){ 
32   Float_t mx0=0.2, mx1=0.1, my0=0.15, my1=0.1;
33   guiTime->GetCanvas()->SetTicks(1,1);
34   guiTime->GetCanvas()->SetMargin(mx0,mx1,my0,my1);
35   gStyle->SetTitleYSize(0.03);
36   gStyle->SetTitleXSize(0.03);
37   gStyle->SetTitleXOffset(2);
38   gStyle->SetTitleYOffset(6);
39 }
40
41 void MakeAliasCE(Double_t deltaT){
42   //
43   // Aliases cuts for CE
44   //
45   guiTree->SetAlias("ceCut0", "tdriftCE.fElements[72]>100 && tdriftCE.fElements[73]>100");
46   guiTree->SetAlias("dceCutTime", Form("sqrt(dcea^2+dcec^2)<%f",deltaT*3600));
47   guiTree->SetAlias("ceCut","dceCutTime&&ceCut0");
48 };
49
50 void MakeAliasLT(Double_t deltaT){
51   guiTree->SetAlias("ltCut", Form("sqrt(dla^2+dlc^2)<%f", deltaT*3600)); 
52 }
53
54 void MakeAliasCosmic(Double_t deltaT){
55   guiTree->SetAlias("cosmicCut", Form("abs(dcosmic)<%f", deltaT*3600));
56   guiTree->SetAlias("itsCut", Form("((dits!=0)&&abs(dits)<%f)", deltaT*3600));
57 }
58
59
60 void SetGoofieAlias(){
61   //
62   // goofie aliases
63   //
64   guiTree->SetAlias("ptrelG","(goofie.fElements[17]/0.3426-1)");
65   guiTree->SetAlias("vdriftGN","goofie.fElements[3]/(1+ptrelG)");
66   //
67 }
68
69