2 //Make default Aliases for guiTime:
6 .L $ALICE_ROOT/TPC/CalibMacros/guiAlias.C
8 // 3. Use aliases inside the guiTime
9 // You can use them as custom cuts
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);
21 TObjArray *picArray = new TObjArray;
23 TTree * guiTree = guiTime->GetChain();
26 guiTree = guiTime->GetChain();
35 Float_t mx0=0.15, mx1=0.05, my0=0.15, my1=0.1;
36 guiTime->GetCanvas()->SetTicks(1,1);
37 guiTime->GetCanvas()->SetMargin(mx0,mx1,my0,my1);
38 gStyle->SetTitleYSize(0.03);
39 gStyle->SetTitleXSize(0.03);
40 gStyle->SetTitleXOffset(2);
41 gStyle->SetTitleYOffset(6);
44 void MakeAliasCE(Double_t deltaT){
46 // Aliases cuts for CE
48 guiTree->SetAlias("ceCut0", "tdriftCE.fElements[72]>100 && tdriftCE.fElements[73]>100");
49 guiTree->SetAlias("dceCutTime", Form("sqrt(dcea^2+dcec^2)<%f",deltaT*3600));
50 guiTree->SetAlias("ceCut","dceCutTime&&ceCut0");
53 void MakeAliasLT(Double_t deltaT){
54 guiTree->SetAlias("ltCut", Form("sqrt(dla^2+dlc^2)<%f", deltaT*3600));
57 void MakeAliasCosmic(Double_t deltaT){
58 guiTree->SetAlias("cosmicCut", Form("abs(dcosmic)<%f", deltaT*3600));
59 guiTree->SetAlias("itsCut", Form("((dits!=0)&&abs(dits)<%f)", deltaT*3600));
63 void SetGoofieAlias(){
67 guiTree->SetAlias("ptrelG","(goofie.fElements[17]/0.3426-1)");
68 guiTree->SetAlias("vdriftGN","goofie.fElements[3]/(1+ptrelG)");
69 guiTree->SetAlias("goCut","goofie.fElements[3]>0");
77 void DrawLaserDrift(){
79 // laser calibration default picture
83 // draw laser residuals A side -C side - when it is defined
86 guiTree->Draw("CEgrDriftA-CEgrDriftC","CEgrDriftA>0&&CEgrDriftC>0");
87 his=(TH1*)htemp->Clone();
89 his->SetTitle("#Delta CE time");
90 his->SetName("#Delta CE time");
91 his->GetXaxis()->SetTitle("#Delta T (time bin)");
93 picArray->AddLast(his);
95 // laser drift CE correction
97 guiTree->Draw("100*(vdriftCEA-vdriftCEC)","CEgrDriftA>0&&CEgrDriftC>0");
98 his=(TH1*)htemp->Clone();
100 his->SetTitle("#Delta CE drift");
101 his->SetName("#Delta CE drift");
102 his->GetXaxis()->SetTitle("#Delta v_{drift} (%) (laser A side - C side)");
104 picArray->AddLast(his);
106 // laser track drift correction
108 guiTree->Draw("100*(vdriftLTA-vdriftLTC)","abs(dlaserA)<500&&abs(dlaserC)<500&&vdriftLTA!=0&&vdriftLTC!=0");
109 his=(TH1*)htemp->Clone();
110 his->SetDirectory(0);
111 his->SetTitle("#Delta LaserTracks drift");
112 his->SetName("#Delta LaserTracks drift");
113 his->GetXaxis()->SetTitle("#Delta v_{drift} (%) (laser A side - C side)");
115 picArray->AddLast(his);
117 // laser track drift correction: time
119 guiTree->Draw("100*(vdriftLTA-vdriftLTC):time","abs(dlaserA)<500&&abs(dlaserC)<500&&vdriftLTA!=0&&vdriftLTC!=0","colz");
120 his=(TH1*)htemp->Clone();
121 his->SetDirectory(0);
123 his->SetTitle("#Delta LaserTracks drift");
124 his->SetName("#Delta LaserTracks drift");
125 his->GetYaxis()->SetTitle("#Delta v_{drift} (%) (laser A side - C side)");
126 his->GetXaxis()->SetTitle("time");
127 his->GetXaxis()->SetTimeDisplay(kTRUE);
129 picArray->AddLast(his);
133 guiTree->Draw("250*(vlaserA0-vlaserC0)","abs(dlaserA)<500&&abs(dlaserC)<500&&vdriftLTA!=0&&vdriftLTC!=0");
134 his=(TH1*)htemp->Clone();
135 his->SetDirectory(0);
136 his->SetTitle("#Delta LaserTracks offset");
137 his->SetName("#Delta LaserTracks offset");
138 his->GetXaxis()->SetTitle("#Delta z0 (cm) (laser A side - C side)");
140 picArray->AddLast(his);
146 // ITS/TPC drift velocity correction
148 guiTree->Draw("100*(ALIGN_ITSP_TPC_DRIFTVD-ALIGN_ITSM_TPC_DRIFTVD)","abs(dits)<3000&&ALIGN_ITSM_TPC_DRIFTVD!=0");
149 his=(TH1*)htemp->Clone();
150 his->SetDirectory(0);
151 his->SetTitle("#Delta ITS/TPC drift correction positive and negative extrapolation");
152 his->SetName("#Delta ITS/TPC drift correction");
153 his->GetXaxis()->SetTitle("#Delta v_{dcorr} (%)");
155 picArray->AddLast(his);
157 // comparison with laser
159 guiTree->Draw("100*(vdriftLTA-vdriftITS)","abs(dlaserA)<3600&&vdriftLTA!=0&&abs(dits)<3600");
160 his=(TH1*)htemp->Clone();
161 his->SetDirectory(0);
162 his->SetTitle("#Delta ITS/TPC drift correction - Laser track corr");
163 his->SetName("#Delta ITS/TPC drift correction - laser track corr");
164 his->GetXaxis()->SetTitle("#Delta v_{dcorr} (%)");
166 picArray->AddLast(his);
168 guiTree->Draw("100*(vdriftLTA-ALIGN_ITS_TPC_DRIFTVD)","abs(dlaserA)<3600&&vdriftLTA!=0&&abs(dits)<3600");
169 his=(TH1*)htemp->Clone();
170 his->SetDirectory(0);
171 his->SetTitle("#Delta ITS/TPC non smmoth drift correction - Laser track corr");
172 his->SetName("#Delta ITS/TPC non smooth drift correction - laser track corr");
173 his->GetXaxis()->SetTitle("#Delta v_{dcorr} (%)");
175 picArray->AddLast(his);
177 guiTree->Draw("100*(vdriftLTA-vdriftP)","abs(dlaserA)<1800&&vdriftLTA!=0&&abs(dp)<1800");
178 his=(TH1*)htemp->Clone();
179 his->SetDirectory(0);
180 his->SetTitle("#Delta TPC/TPC - Laser track corr");
181 his->SetName("#Delta TPC/TPC - Laser track corr");
182 his->GetXaxis()->SetTitle("#Delta v_{dcorr} (%)");
184 picArray->AddLast(his);
193 guiTree->SetAlias("vdriftCE0","250/CEgrDriftA");
194 guiTree->SetAlias("vdriftCE1","vdriftCE0/(1+ptrel0)");