]>
Commit | Line | Data |
---|---|---|
b832d719 | 1 | //------------------------------------------------------------------------------ |
2 | // Implementation of AliTPCPerformanceSummary class. | |
3 | // It has only static member functions to extract some TPC Performance | |
4 | // parameters and produce trend graphs. | |
5 | // The function MakeReport is to be called for every run. It reads AliPerformanceTPC | |
6 | // and AliPerformanceDEdx objects from file and produces a | |
7 | // rootfile with the results stored in a TTree. | |
8 | // The function MakeReport needs a list of these rootfiles as input | |
9 | // and writes the output (tree and histograms) to another rootfile. | |
10 | // | |
814d192f | 11 | // by M.Knichel 15/10/2010 |
b832d719 | 12 | //------------------------------------------------------------------------------ |
13 | ||
14 | #include <fstream> | |
15 | ||
16 | #include "TSystem.h" | |
17 | #include "TMath.h" | |
18 | #include "TVectorD.h" | |
19 | #include "TList.h" | |
20 | #include "TFile.h" | |
21 | #include "TGrid.h" | |
22 | #include "TF1.h" | |
23 | #include "TH1.h" | |
24 | #include "TH2.h" | |
0cb93e70 | 25 | #include "TH3.h" |
b832d719 | 26 | #include "TProfile.h" |
27 | #include "THnSparse.h" | |
28 | #include "TTree.h" | |
29 | #include "TChain.h" | |
30 | #include "TGraph.h" | |
31 | #include "TPad.h" | |
32 | #include "TCanvas.h" | |
33 | ||
0cb93e70 | 34 | #include "AliGRPObject.h" |
35 | #include "AliTPCcalibDB.h" | |
36 | #include "AliTPCcalibDButil.h" | |
b832d719 | 37 | #include "TTreeStream.h" |
38 | #include "AliPerformanceTPC.h" | |
39 | #include "AliPerformanceDEdx.h" | |
40 | #include "AliPerformanceDCA.h" | |
f69eb048 | 41 | #include "AliPerformanceMatch.h" |
b832d719 | 42 | |
43 | #include "AliTPCPerformanceSummary.h" | |
44 | ||
c64cb1f6 | 45 | using std::ifstream; |
46 | ||
b832d719 | 47 | ClassImp(AliTPCPerformanceSummary) |
48 | ||
0cb93e70 | 49 | Bool_t AliTPCPerformanceSummary::fgForceTHnSparse = kFALSE; |
50 | ||
51 | ||
b832d719 | 52 | //_____________________________________________________________________________ |
9f5fbaba | 53 | void AliTPCPerformanceSummary::WriteToTTreeSRedirector(const AliPerformanceTPC* pTPC, const AliPerformanceDEdx* pTPCgain, const AliPerformanceMatch* pTPCMatch,const AliPerformanceMatch* pTPCPull, const AliPerformanceMatch* pConstrain, TTreeSRedirector* const pcstream, Int_t run) |
b832d719 | 54 | { |
0cb93e70 | 55 | // |
b832d719 | 56 | // Extracts performance parameters from pTPC and pTPCgain. |
57 | // Output is written to pcstream. | |
58 | // The run number must be provided since it is not stored in | |
59 | // AliPerformanceTPC or AliPerformanceDEdx. | |
60 | // | |
814d192f | 61 | if (run <= 0 ) { |
f69eb048 | 62 | if (pTPCMatch) {run = pTPCMatch->GetRunNumber(); } |
814d192f | 63 | if (pTPCgain) {run = pTPCgain->GetRunNumber(); } |
64 | if (pTPC) { run = pTPC->GetRunNumber(); } | |
65 | } | |
f69eb048 | 66 | TObjString runType; |
f1fb93e0 | 67 | |
68 | //AliTPCcalibDB *calibDB=0; | |
69 | ||
0cb93e70 | 70 | // AliTPCcalibDButil *dbutil =0; |
71 | Int_t startTimeGRP=0; | |
72 | Int_t stopTimeGRP=0; | |
73 | Int_t time=0; | |
814d192f | 74 | Int_t duration=0; |
f1fb93e0 | 75 | |
76 | //Float_t currentL3 =0; | |
77 | //Int_t polarityL3 = 0; | |
78 | //Float_t bz = 0; | |
79 | ||
80 | //calibDB = AliTPCcalibDB::Instance(); | |
81 | ||
0cb93e70 | 82 | // dbutil= new AliTPCcalibDButil; |
f69eb048 | 83 | |
f1fb93e0 | 84 | //printf("Processing run %d ...\n",run); |
85 | //if (calibDB) { | |
86 | //AliTPCcalibDB::Instance()->SetRun(run); | |
87 | ||
0cb93e70 | 88 | // dbutil->UpdateFromCalibDB(); |
89 | // dbutil->SetReferenceRun(run); | |
90 | // dbutil->UpdateRefDataFromOCDB(); | |
91 | ||
f1fb93e0 | 92 | //if (calibDB->GetGRP(run)){ |
93 | //startTimeGRP = AliTPCcalibDB::GetGRP(run)->GetTimeStart(); | |
94 | //stopTimeGRP = AliTPCcalibDB::GetGRP(run)->GetTimeEnd(); | |
95 | //currentL3 = AliTPCcalibDB::GetL3Current(run); | |
96 | //polarityL3 = AliTPCcalibDB::GetL3Polarity(run); | |
97 | //bz = AliTPCcalibDB::GetBz(run); | |
814d192f | 98 | |
f1fb93e0 | 99 | //} |
100 | //runType = AliTPCcalibDB::GetRunType(run).Data(); | |
101 | //} | |
0cb93e70 | 102 | time = (startTimeGRP+stopTimeGRP)/2; |
814d192f | 103 | duration = (stopTimeGRP-startTimeGRP); |
b832d719 | 104 | |
f69eb048 | 105 | if (!pcstream) return; |
0cb93e70 | 106 | (*pcstream)<<"tpcQA"<< |
107 | "run="<<run<< | |
108 | "time="<<time<< | |
109 | "startTimeGRP="<<startTimeGRP<< | |
110 | "stopTimeGRP="<<stopTimeGRP<< | |
5dff0b89 | 111 | "duration="<<duration<< |
0cb93e70 | 112 | "runType.="<<&runType; |
814d192f | 113 | if (pTPC) { |
114 | pTPC->GetTPCTrackHisto()->GetAxis(9)->SetRangeUser(0.5,1.5); | |
115 | pTPC->GetTPCTrackHisto()->GetAxis(7)->SetRangeUser(0.25,10); | |
116 | pTPC->GetTPCTrackHisto()->GetAxis(5)->SetRangeUser(-1,1); | |
f69eb048 | 117 | AnalyzeNCL(pTPC, pcstream); |
118 | AnalyzeDrift(pTPC, pcstream); | |
119 | AnalyzeDriftPos(pTPC, pcstream); | |
120 | AnalyzeDriftNeg(pTPC, pcstream); | |
121 | AnalyzeDCARPhi(pTPC, pcstream); | |
122 | AnalyzeDCARPhiPos(pTPC, pcstream); | |
123 | AnalyzeDCARPhiNeg(pTPC, pcstream); | |
124 | AnalyzeEvent(pTPC, pcstream); | |
10d5d625 | 125 | |
126 | AnalyzePt(pTPC,pcstream); | |
127 | AnalyzeChargeOverPt(pTPC,pcstream); | |
ac617c68 | 128 | AnalyzeQAPosNegDpT(pTPC,pcstream); |
129 | AnalyzeQADCAFitParameter(pTPC,pcstream); | |
10d5d625 | 130 | |
814d192f | 131 | pTPC->GetTPCTrackHisto()->GetAxis(9)->SetRangeUser(-10,10); |
132 | pTPC->GetTPCTrackHisto()->GetAxis(7)->SetRangeUser(0,100); | |
f69eb048 | 133 | pTPC->GetTPCTrackHisto()->GetAxis(5)->SetRangeUser(-10,10); |
814d192f | 134 | } |
f69eb048 | 135 | AnalyzeGain(pTPCgain, pcstream); |
136 | AnalyzeMatch(pTPCMatch, pcstream); | |
1833a193 | 137 | AnalyzePull(pTPCPull, pcstream); |
9f5fbaba | 138 | AnalyzeConstrain(pConstrain, pcstream); |
139 | ||
b832d719 | 140 | (*pcstream)<<"tpcQA"<<"\n"; |
b832d719 | 141 | } |
142 | ||
143 | //_____________________________________________________________________________ | |
9f5fbaba | 144 | void AliTPCPerformanceSummary::WriteToFile(const AliPerformanceTPC* pTPC, const AliPerformanceDEdx* pTPCgain, const AliPerformanceMatch* pMatch, const AliPerformanceMatch* pPull, const AliPerformanceMatch* pConstrain, const Char_t* outfile, Int_t run) |
b832d719 | 145 | { |
146 | // | |
147 | // Extracts performance parameters from pTPC and pTPCgain. | |
148 | // Output is written to a TTree saved in outfile. | |
149 | // The run number must be provided since it is not stored in | |
150 | // AliPerformanceTPC or AliPerformanceDEdx. | |
151 | // | |
152 | // The function creates a TTreeSRedirector and calls the | |
153 | // function WriteToTTreeSRedirector. | |
154 | // | |
155 | ||
f69eb048 | 156 | if (!outfile) return; |
b832d719 | 157 | TTreeSRedirector* pcstream = 0; |
158 | pcstream = new TTreeSRedirector(outfile); | |
f69eb048 | 159 | if (!pcstream) return; |
9f5fbaba | 160 | WriteToTTreeSRedirector(pTPC, pTPCgain, pMatch, pPull, pConstrain, pcstream, run); |
f69eb048 | 161 | if (pcstream) { delete pcstream; pcstream = 0; } |
b832d719 | 162 | |
163 | } | |
164 | ||
165 | //_____________________________________________________________________________ | |
166 | Int_t AliTPCPerformanceSummary::MakeReport(const Char_t* infile, const Char_t* outfile, Int_t run) | |
167 | { | |
168 | // | |
169 | // Reads QA information (AliPerformanceTPC and AliPerformanceDEdx) from | |
170 | // infile (this must be a rootfile) and writes the output to a TTree | |
171 | // stored in outfile. | |
172 | // The run number must be provided since it is not stored in | |
173 | // AliPerformanceTPC or AliPerformanceDEdx. | |
174 | // | |
175 | // The input objects must be named "AliPerformanceTPC" and | |
176 | // "AliPerformanceDEdxTPCInner" and stored in a TList which name must | |
177 | // be one of the following: "TPC", "TPCQA", "TPC_PerformanceQA" | |
178 | // or "TPC_PerformanceQA/TPC" (with directory) | |
179 | // | |
180 | ||
181 | if (!infile) return -1; | |
182 | if (!outfile) return -1; | |
183 | TFile *f =0; | |
184 | f=TFile::Open(infile,"read"); | |
185 | if (!f) { | |
186 | printf("File %s not available\n", infile); | |
187 | return -1; | |
188 | } | |
189 | TList* list = 0; | |
190 | list = dynamic_cast<TList*>(f->Get("TPC")); | |
191 | if (!list) { list = dynamic_cast<TList*>(f->Get("TPCQA")); } | |
b832d719 | 192 | if (!list) { list = dynamic_cast<TList*>(f->Get("TPC_PerformanceQA/TPCQA")); } |
0cb93e70 | 193 | if (!list) { list = dynamic_cast<TList*>(f->Get("TPC_PerformanceQA")); } |
1833a193 | 194 | if (!list) { list = dynamic_cast<TList*>(f->Get("ITSTPCMatch")); } |
b832d719 | 195 | if (!list) { |
196 | printf("QA %s not available\n", infile); | |
197 | return -1; | |
198 | } | |
199 | AliPerformanceTPC* pTPC = 0; | |
200 | AliPerformanceDEdx* pTPCgain = 0; | |
f69eb048 | 201 | AliPerformanceMatch* pTPCmatch = 0; |
1833a193 | 202 | AliPerformanceMatch* pTPCPull = 0; |
9f5fbaba | 203 | AliPerformanceMatch* pConstrain = 0; |
204 | ||
f69eb048 | 205 | if (list) { pTPC = dynamic_cast<AliPerformanceTPC*>(list->FindObject("AliPerformanceTPC")); } |
206 | if (list) { pTPCgain = dynamic_cast<AliPerformanceDEdx*>(list->FindObject("AliPerformanceDEdxTPCInner")); } | |
207 | if (list) { pTPCmatch = dynamic_cast<AliPerformanceMatch*>(list->FindObject("AliPerformanceMatchTPCITS")); } | |
1833a193 | 208 | if (list) { pTPCPull = dynamic_cast<AliPerformanceMatch*>(list->FindObject("AliPerformanceMatchITSTPC")); } |
9f5fbaba | 209 | if (list) { pConstrain = dynamic_cast<AliPerformanceMatch*>(list->FindObject("AliPerformanceMatchTPCConstrain")); } |
b832d719 | 210 | |
211 | Int_t returncode = 0; | |
9f5fbaba | 212 | WriteToFile(pTPC, pTPCgain, pTPCmatch , pTPCPull, pConstrain, outfile, run); |
b832d719 | 213 | if (f) { delete f; f=0; } |
214 | return returncode; | |
215 | } | |
216 | ||
217 | //_____________________________________________________________________________ | |
218 | Int_t AliTPCPerformanceSummary::ProduceTrends(const Char_t* infilelist, const Char_t* outfile) | |
219 | { | |
220 | // | |
221 | // Produces trend graphs. | |
222 | // | |
223 | // Input: infilelist is a textfile with one rootfile per line. | |
224 | // There should be one rootfile for each run, the rootfile must | |
225 | // contain the output of the MakeReport function | |
226 | // Output: the information for all runs is merged into a TTree | |
227 | // that is saved in outfile along with the trend graphs. | |
228 | // Trend graphs are stored as TCanvas objects to include axis labels etc. | |
229 | // | |
230 | ||
231 | if (!infilelist) return -1; | |
232 | if (!outfile) return -1; | |
233 | ||
234 | TChain* chain = new TChain("tpcQA"); | |
26a35193 | 235 | if(!chain) return -1; |
236 | ||
b832d719 | 237 | ifstream in; |
238 | in.open(infilelist); | |
239 | ||
240 | TString currentFile; | |
241 | while(in.good()) { | |
242 | in >> currentFile; | |
243 | ||
244 | if (!currentFile.Contains("root")) continue; // protection | |
245 | chain->Add(currentFile.Data()); | |
246 | } | |
247 | in.close(); | |
248 | //TTree *tree = chain; | |
249 | TTree *tree = chain->CopyTree("1"); | |
26a35193 | 250 | if(!tree) return -1; |
b832d719 | 251 | if (chain) { delete chain; chain=0; } |
252 | //TGraph* graph = dynamic_cast<TGraph*>(tree->DrawClone("run:run")); | |
253 | //TGraph *graph = (TGraph*)gPad->GetPrimitive("Graph"); | |
254 | ||
255 | TFile* out = new TFile(outfile,"RECREATE"); | |
26a35193 | 256 | if(!out) return -1; |
257 | ||
b832d719 | 258 | out->cd(); |
c6d45264 | 259 | const Char_t* condition = "meanTPCncl>0"; |
b832d719 | 260 | SaveGraph(tree,"meanTPCnclF","run",condition); |
261 | SaveGraph(tree,"rmsTPCnclF","run",condition); | |
262 | SaveGraph(tree,"meanTPCChi2","run",condition); | |
263 | SaveGraph(tree,"rmsTPCChi2","run",condition); | |
264 | SaveGraph(tree,"slopeATPCnclF","run",condition); | |
265 | SaveGraph(tree,"slopeCTPCnclF","run",condition); | |
266 | SaveGraph(tree,"slopeATPCnclFErr","run",condition); | |
267 | SaveGraph(tree,"slopeCTPCnclFErr","run",condition); | |
268 | SaveGraph(tree,"meanTPCncl","run",condition); | |
269 | SaveGraph(tree,"rmsTPCncl","run",condition); | |
270 | SaveGraph(tree,"slopeATPCncl","run",condition); | |
271 | SaveGraph(tree,"slopeCTPCncl","run",condition); | |
272 | SaveGraph(tree,"slopeATPCnclErr","run",condition); | |
273 | SaveGraph(tree,"slopeCTPCnclErr","run",condition); | |
274 | ||
275 | SaveGraph(tree,"offsetdRA","run",condition); | |
276 | SaveGraph(tree,"slopedRA","run",condition); | |
277 | SaveGraph(tree,"offsetdRC","run",condition); | |
278 | SaveGraph(tree,"slopedRC","run",condition); | |
279 | SaveGraph(tree,"offsetdRAErr","run",condition); | |
280 | SaveGraph(tree,"slopedRAErr","run",condition); | |
281 | SaveGraph(tree,"offsetdRCErr","run",condition); | |
282 | SaveGraph(tree,"slopedRCErr","run",condition); | |
283 | SaveGraph(tree,"offsetdRAchi2","run",condition); | |
284 | SaveGraph(tree,"slopedRAchi2","run",condition); | |
285 | SaveGraph(tree,"offsetdRCchi2","run",condition); | |
286 | SaveGraph(tree,"slopedRCchi2","run",condition); | |
287 | ||
288 | SaveGraph(tree,"offsetdRAPos","run",condition); | |
289 | ||
290 | SaveGraph(tree,"slopedRAPos","run",condition); | |
291 | SaveGraph(tree,"offsetdRCPos","run",condition); | |
292 | SaveGraph(tree,"slopedRCPos","run",condition); | |
293 | SaveGraph(tree,"offsetdRAErrPos","run",condition); | |
294 | SaveGraph(tree,"slopedRAErrPos","run",condition); | |
295 | SaveGraph(tree,"offsetdRCErrPos","run",condition); | |
296 | SaveGraph(tree,"slopedRCErrPos","run",condition); | |
297 | SaveGraph(tree,"offsetdRAchi2Pos","run",condition); | |
298 | SaveGraph(tree,"slopedRAchi2Pos","run",condition); | |
299 | SaveGraph(tree,"offsetdRCchi2Pos","run",condition); | |
300 | SaveGraph(tree,"slopedRCchi2Pos","run",condition); | |
301 | ||
302 | SaveGraph(tree,"offsetdRANeg","run",condition); | |
303 | SaveGraph(tree,"slopedRANeg","run",condition); | |
304 | SaveGraph(tree,"offsetdRCNeg","run",condition); | |
305 | SaveGraph(tree,"slopedRCNeg","run",condition); | |
306 | SaveGraph(tree,"offsetdRAErrNeg","run",condition); | |
307 | SaveGraph(tree,"slopedRAErrNeg","run",condition); | |
308 | SaveGraph(tree,"offsetdRCErrNeg","run",condition); | |
309 | SaveGraph(tree,"slopedRCErrNeg","run",condition); | |
310 | SaveGraph(tree,"offsetdRAchi2Neg","run",condition); | |
311 | SaveGraph(tree,"slopedRAchi2Neg","run",condition); | |
312 | SaveGraph(tree,"offsetdRCchi2Neg","run",condition); | |
313 | SaveGraph(tree,"slopedRCchi2Neg","run",condition); | |
314 | ||
315 | SaveGraph(tree,"offsetdZAPos","run",condition); | |
316 | SaveGraph(tree,"slopedZAPos","run",condition); | |
317 | SaveGraph(tree,"offsetdZCPos","run",condition); | |
318 | SaveGraph(tree,"slopedZCPos","run",condition); | |
319 | SaveGraph(tree,"offsetdZAErrPos","run",condition); | |
320 | SaveGraph(tree,"slopedZAErrPos","run",condition); | |
321 | SaveGraph(tree,"offsetdZCErrPos","run",condition); | |
322 | SaveGraph(tree,"slopedZCErrPos","run",condition); | |
323 | SaveGraph(tree,"offsetdZAchi2Pos","run",condition); | |
324 | SaveGraph(tree,"slopedZAchi2Pos","run",condition); | |
325 | SaveGraph(tree,"offsetdZCchi2Pos","run",condition); | |
326 | SaveGraph(tree,"slopedZCchi2Pos","run",condition); | |
327 | ||
328 | SaveGraph(tree,"offsetdZANeg","run",condition); | |
329 | SaveGraph(tree,"slopedZANeg","run",condition); | |
330 | SaveGraph(tree,"offsetdZCNeg","run",condition); | |
331 | SaveGraph(tree,"slopedZCNeg","run",condition); | |
332 | SaveGraph(tree,"offsetdZAErrNeg","run",condition); | |
333 | SaveGraph(tree,"slopedZAErrNeg","run",condition); | |
334 | SaveGraph(tree,"offsetdZCErrNeg","run",condition); | |
335 | SaveGraph(tree,"slopedZCErrNeg","run",condition); | |
336 | SaveGraph(tree,"offsetdZAchi2Neg","run",condition); | |
337 | SaveGraph(tree,"slopedZAchi2Neg","run",condition); | |
338 | SaveGraph(tree,"offsetdZCchi2Neg","run",condition); | |
339 | SaveGraph(tree,"slopedZCchi2Neg","run",condition); | |
340 | ||
341 | SaveGraph(tree,"offsetdZA","run",condition); | |
342 | SaveGraph(tree,"slopedZA","run",condition); | |
343 | SaveGraph(tree,"offsetdZC","run",condition); | |
344 | SaveGraph(tree,"slopedZC","run",condition); | |
345 | SaveGraph(tree,"offsetdZAErr","run",condition); | |
346 | SaveGraph(tree,"slopedZAErr","run",condition); | |
347 | SaveGraph(tree,"offsetdZCErr","run",condition); | |
348 | SaveGraph(tree,"slopedZCErr","run",condition); | |
349 | SaveGraph(tree,"offsetdZAchi2","run",condition); | |
350 | SaveGraph(tree,"slopedZAchi2","run",condition); | |
351 | SaveGraph(tree,"offsetdZCchi2","run",condition); | |
352 | SaveGraph(tree,"slopedZCchi2","run",condition); | |
353 | ||
354 | SaveGraph(tree,"meanVertX","run",condition); | |
355 | SaveGraph(tree,"rmsVertX","run",condition); | |
356 | SaveGraph(tree,"meanVertY","run",condition); | |
357 | SaveGraph(tree,"rmsVertY","run",condition); | |
358 | SaveGraph(tree,"meanVertZ","run",condition); | |
359 | SaveGraph(tree,"rmsVertZ","run",condition); | |
360 | SaveGraph(tree,"vertStatus","run",condition); | |
361 | SaveGraph(tree,"meanMult","run",condition); | |
362 | SaveGraph(tree,"rmsMult","run",condition); | |
363 | SaveGraph(tree,"meanMultPos","run",condition); | |
364 | SaveGraph(tree,"rmsMultPos","run",condition); | |
365 | SaveGraph(tree,"meanMultNeg","run",condition); | |
366 | SaveGraph(tree,"rmsMultNeg","run",condition); | |
367 | SaveGraph(tree,"vertAll","run",condition); | |
368 | SaveGraph(tree,"vertOK","run",condition); | |
369 | ||
10d5d625 | 370 | |
371 | SaveGraph(tree,"meanPtAPos","run",condition); | |
372 | SaveGraph(tree,"mediumPtAPos","run",condition); | |
373 | SaveGraph(tree,"highPtAPos","run",condition); | |
374 | SaveGraph(tree,"meanPtCPos","run",condition); | |
375 | SaveGraph(tree,"mediumPtCPos","run",condition); | |
376 | SaveGraph(tree,"highPtCPos","run",condition); | |
377 | SaveGraph(tree,"meanPtANeg","run",condition); | |
378 | SaveGraph(tree,"mediumPtANeg","run",condition); | |
379 | SaveGraph(tree,"highPtANeg","run",condition); | |
380 | SaveGraph(tree,"meanPtCNeg","run",condition); | |
381 | SaveGraph(tree,"mediumPtCNeg","run",condition); | |
382 | SaveGraph(tree,"highPtCNeg","run",condition); | |
383 | ||
384 | SaveGraph(tree,"qOverPt","run",condition); | |
385 | SaveGraph(tree,"qOverPtA","run",condition); | |
386 | SaveGraph(tree,"qOverPtC","run",condition); | |
1833a193 | 387 | |
9f5fbaba | 388 | SaveGraph(tree,"dcarAP0","run",condition); |
389 | SaveGraph(tree,"dcarAP1","run",condition); | |
390 | SaveGraph(tree,"dcarCP0","run",condition); | |
391 | SaveGraph(tree,"dcarCP1","run",condition); | |
392 | ||
1833a193 | 393 | condition = ""; |
394 | SaveGraph(tree,"tpcItsMatchA","run",condition); | |
395 | SaveGraph(tree,"tpcItsMatchHighPtA","run",condition); | |
396 | SaveGraph(tree,"tpcItsMatchC","run",condition); | |
397 | SaveGraph(tree,"tpcItsMatchHighPtC","run",condition); | |
398 | ||
399 | SaveGraph(tree,"phiPull","run",condition); | |
400 | SaveGraph(tree,"phiPullHighPt","run",condition); | |
401 | SaveGraph(tree,"ptPull","run",condition); | |
402 | SaveGraph(tree,"ptPullHighPt","run",condition); | |
403 | SaveGraph(tree,"yPull","run",condition); | |
404 | SaveGraph(tree,"yPullHighPt","run",condition); | |
405 | SaveGraph(tree,"zPull","run",condition); | |
406 | SaveGraph(tree,"zPullHighPt","run",condition); | |
407 | SaveGraph(tree,"lambdaPull","run",condition); | |
408 | SaveGraph(tree,"lambdaPullHighPt","run",condition); | |
409 | ||
9f5fbaba | 410 | SaveGraph(tree,"tpcConstrainPhiA","run",condition); |
411 | SaveGraph(tree,"tpcConstrainPhiC","run",condition); | |
412 | ||
ac617c68 | 413 | SaveGraph(tree,"deltaPt","run",condition); |
414 | SaveGraph(tree,"deltaPtchi2","run",condition); | |
415 | SaveGraph(tree,"deltaPtA","run",condition); | |
416 | SaveGraph(tree,"deltaPtchi2A","run",condition); | |
417 | SaveGraph(tree,"deltaPtC","run",condition); | |
418 | SaveGraph(tree,"deltaPtchi2C","run",condition); | |
419 | SaveGraph(tree,"deltaPtA_Err","run",condition); | |
420 | SaveGraph(tree,"deltaPtA_Err","run",condition); | |
421 | SaveGraph(tree,"deltaPtC_Err","run",condition); | |
422 | ||
423 | //////////////////////////////////////////////////////////////////////////////////////////////////////// | |
424 | //save dca fit parameters | |
425 | SaveGraph(tree,"dcar_posA_0","run",condition); | |
426 | SaveGraph(tree,"dcar_posA_1","run",condition); | |
427 | SaveGraph(tree,"dcar_posA_2","run",condition); | |
428 | SaveGraph(tree,"dcar_posA_chi2","run",condition); | |
429 | SaveGraph(tree,"dcar_posA_0_Err","run",condition); | |
430 | SaveGraph(tree,"dcar_posA_1_Err","run",condition); | |
431 | SaveGraph(tree,"dcar_posA_2_Err","run",condition); | |
432 | ||
433 | SaveGraph(tree,"dcaz_posA_0","run",condition); | |
434 | SaveGraph(tree,"dcaz_posA_1","run",condition); | |
435 | SaveGraph(tree,"dcaz_posA_2","run",condition); | |
436 | SaveGraph(tree,"dcaz_posA_chi2","run",condition); | |
437 | SaveGraph(tree,"dcaz_posA_0_Err","run",condition); | |
438 | SaveGraph(tree,"dcaz_posA_1_Err","run",condition); | |
439 | SaveGraph(tree,"dcaz_posA_2_Err","run",condition); | |
440 | ||
441 | SaveGraph(tree,"dcaz_posC_0","run",condition); | |
442 | SaveGraph(tree,"dcaz_posC_1","run",condition); | |
443 | SaveGraph(tree,"dcaz_posC_2","run",condition); | |
444 | SaveGraph(tree,"dcaz_posC_chi2","run",condition); | |
445 | SaveGraph(tree,"dcaz_posC_0_Err","run",condition); | |
446 | SaveGraph(tree,"dcaz_posC_1_Err","run",condition); | |
447 | SaveGraph(tree,"dcaz_posC_2_Err","run",condition); | |
448 | ||
449 | SaveGraph(tree,"dcar_posC_0","run",condition); | |
450 | SaveGraph(tree,"dcar_posC_1","run",condition); | |
451 | SaveGraph(tree,"dcar_posC_2","run",condition); | |
452 | SaveGraph(tree,"dcar_posC_chi2","run",condition); | |
453 | SaveGraph(tree,"dcar_posC_0_Err","run",condition); | |
454 | SaveGraph(tree,"dcar_posC_1_Err","run",condition); | |
455 | SaveGraph(tree,"dcar_posC_2_Err","run",condition); | |
456 | ||
457 | SaveGraph(tree,"dcar_negA_0","run",condition); | |
458 | SaveGraph(tree,"dcar_negA_1","run",condition); | |
459 | SaveGraph(tree,"dcar_negA_2","run",condition); | |
460 | SaveGraph(tree,"dcar_negA_chi2","run",condition); | |
461 | SaveGraph(tree,"dcar_negA_0_Err","run",condition); | |
462 | SaveGraph(tree,"dcar_negA_1_Err","run",condition); | |
463 | SaveGraph(tree,"dcar_negA_2_Err","run",condition); | |
464 | ||
465 | SaveGraph(tree,"dcaz_negA_0","run",condition); | |
466 | SaveGraph(tree,"dcaz_negA_1","run",condition); | |
467 | SaveGraph(tree,"dcaz_negA_2","run",condition); | |
468 | SaveGraph(tree,"dcaz_negA_chi2","run",condition); | |
469 | SaveGraph(tree,"dcaz_negA_0_Err","run",condition); | |
470 | SaveGraph(tree,"dcaz_negA_1_Err","run",condition); | |
471 | SaveGraph(tree,"dcaz_negA_2_Err","run",condition); | |
472 | ||
473 | SaveGraph(tree,"dcaz_negC_0","run",condition); | |
474 | SaveGraph(tree,"dcaz_negC_1","run",condition); | |
475 | SaveGraph(tree,"dcaz_negC_2","run",condition); | |
476 | SaveGraph(tree,"dcaz_negC_chi2","run",condition); | |
477 | SaveGraph(tree,"dcaz_negC_0_Err","run",condition); | |
478 | SaveGraph(tree,"dcaz_negC_1_Err","run",condition); | |
479 | SaveGraph(tree,"dcaz_negC_2_Err","run",condition); | |
480 | ||
481 | SaveGraph(tree,"dcar_negC_0","run",condition); | |
482 | SaveGraph(tree,"dcar_negC_1","run",condition); | |
483 | SaveGraph(tree,"dcar_negC_2","run",condition); | |
484 | SaveGraph(tree,"dcar_negC_chi2","run",condition); | |
485 | SaveGraph(tree,"dcar_negC_0_Err","run",condition); | |
486 | SaveGraph(tree,"dcar_negC_1_Err","run",condition); | |
487 | SaveGraph(tree,"dcar_negC_2_Err","run",condition); | |
488 | ||
489 | ||
490 | ||
491 | //////////////////////////////////////////////////////////////////////////////////////////////////////// | |
492 | ||
493 | ||
494 | tree->Write(); | |
b832d719 | 495 | |
496 | out->Close(); | |
497 | if (tree) { delete tree; tree=0; } | |
498 | if (out) { delete out; out=0; } | |
1833a193 | 499 | return 0; |
b832d719 | 500 | } |
501 | ||
502 | //_____________________________________________________________________________ | |
503 | Int_t AliTPCPerformanceSummary::SaveGraph(TTree* tree, const Char_t* y, const Char_t* x, const Char_t* condition) | |
504 | { | |
505 | // | |
506 | // Creates a Graph and writes the canvas to the current directory | |
507 | // called by ProduceTrends function. | |
508 | // | |
509 | ||
510 | TString s(y); | |
511 | s += ':'; | |
512 | s += x; | |
513 | tree->Draw(s.Data(),condition,"goff"); | |
514 | TCanvas* c = new TCanvas(s.Data(),s.Data()); | |
515 | c->cd(); | |
516 | TPad* p = new TPad("pad0","pad0",0,0,1,1); | |
517 | p->Draw(); | |
518 | p->cd(); | |
519 | if (tree->GetSelectedRows() > 0) { | |
520 | TGraph* graph = new TGraph(tree->GetSelectedRows(), tree->GetV2(), tree->GetV1()); | |
521 | graph->Draw("AP"); | |
522 | graph->GetXaxis()->SetTitle(x); | |
523 | graph->GetYaxis()->SetTitle(y); | |
524 | c->Write(s.Data()); | |
525 | delete graph; | |
526 | } | |
527 | //graph->Write(s.Data()); | |
528 | delete c; | |
529 | ||
530 | return 0; | |
531 | } | |
532 | ||
533 | //_____________________________________________________________________________ | |
70f4b25f | 534 | Int_t AliTPCPerformanceSummary::AnalyzeDCARPhi(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream) |
b832d719 | 535 | { |
536 | // | |
537 | // Analyse DCA R imperfections | |
538 | // | |
539 | ||
540 | if (!pcstream) return 8; | |
541 | if (!pTPC) return 8; | |
542 | ||
543 | // variables: | |
544 | static Double_t offsetdRA=0; | |
545 | static Double_t slopedRA=0; | |
546 | static Double_t offsetdRC=0; | |
547 | static Double_t slopedRC=0; | |
548 | static Double_t offsetdRAErr=0; | |
549 | static Double_t slopedRAErr=0; | |
550 | static Double_t offsetdRCErr=0; | |
551 | static Double_t slopedRCErr=0; | |
552 | static Double_t offsetdRAchi2=0; | |
553 | static Double_t slopedRAchi2=0; | |
554 | static Double_t offsetdRCchi2=0; | |
555 | static Double_t slopedRCchi2=0; | |
9f5fbaba | 556 | static Double_t dcarAP0 = 0; |
557 | static Double_t dcarAP1 = 0; | |
558 | static Double_t dcarCP0 = 0; | |
559 | static Double_t dcarCP1 = 0; | |
b832d719 | 560 | |
561 | //AliPerformanceTPC* pTPC = dynamic_cast<AliPerformanceTPC*>(pTPCObject); | |
0cb93e70 | 562 | |
b832d719 | 563 | TH1* his1D=0; |
564 | TH2* his2D=0; | |
0cb93e70 | 565 | TH3* his3D=0; |
566 | ||
28bb9d1f | 567 | if (pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_3_5_7")) { |
568 | his3D = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_3_5_7")); | |
26a35193 | 569 | if(!his3D) return 8; |
0cb93e70 | 570 | his3D->GetYaxis()->SetRangeUser(-1,1); |
571 | his3D->GetZaxis()->SetRangeUser(0.25,10); | |
572 | } | |
573 | ||
b832d719 | 574 | static TF1 *fpol1 = new TF1("fpol1","pol1"); |
575 | TObjArray arrayFit; | |
0cb93e70 | 576 | if (his3D && !fgForceTHnSparse) { |
577 | his2D = dynamic_cast<TH2*>(his3D->Project3D("xy")); | |
578 | } else { | |
579 | his2D = pTPC->GetTPCTrackHisto()->Projection(3,5); | |
580 | } | |
26a35193 | 581 | if(!his2D) return 8; |
0cb93e70 | 582 | |
583 | ||
b832d719 | 584 | his2D->FitSlicesY(0,0,-1,10,"QNR",&arrayFit); |
585 | delete his2D; | |
586 | his1D = (TH1*) arrayFit.At(1); | |
587 | his1D->Fit(fpol1,"QNRROB=0.8","QNR",-0.8,-0.1); | |
588 | offsetdRC=fpol1->GetParameter(0); | |
589 | slopedRC=fpol1->GetParameter(1); | |
590 | offsetdRCchi2=fpol1->GetChisquare(); | |
591 | slopedRCchi2=fpol1->GetChisquare(); | |
592 | // | |
593 | his1D->Fit(fpol1,"QNRROB=0.8","QNR",0.1,0.8); | |
594 | offsetdRA=fpol1->GetParameter(0); | |
595 | slopedRA=fpol1->GetParameter(1); | |
596 | offsetdRAErr=fpol1->GetParError(0); | |
597 | slopedRAErr=fpol1->GetParError(1); | |
598 | offsetdRAchi2=fpol1->GetChisquare(); | |
599 | slopedRAchi2=fpol1->GetChisquare(); | |
600 | // | |
601 | printf("DCA R QA report\n"); | |
602 | printf("offsetdRA\t%f\n",offsetdRA); | |
603 | printf("slopedRA\t%f\n",slopedRA); | |
604 | printf("offsetdRC\t%f\n",offsetdRC); | |
605 | printf("slopedRC\t%f\n",slopedRC); | |
9f5fbaba | 606 | |
607 | // | |
608 | //extraction of DCAr versus pt | |
609 | // | |
610 | TLinearFitter linearFit; | |
611 | linearFit.SetFormula("pol1"); | |
612 | TObjArray arrayWidth; | |
613 | TH1 *width; | |
614 | Int_t nXbins; | |
615 | Double_t x,y; | |
616 | Int_t pn = 1; | |
617 | ||
618 | if(!his3D) | |
619 | return 8; | |
620 | his3D->GetYaxis()->SetRangeUser(-1,1); | |
621 | ||
622 | //get his2D in A Side | |
623 | his3D->GetYaxis()->SetRangeUser(0,1); | |
624 | his3D->GetZaxis()->SetRangeUser(0.35,8); | |
625 | his2D = dynamic_cast<TH2*>(his3D->Project3D("xz")); | |
e01d9fa9 | 626 | if (his2D) |
627 | his2D->FitSlicesY(0,0,-1,0,"QNR",&arrayWidth); | |
248ee6f9 | 628 | |
9f5fbaba | 629 | width = dynamic_cast<TH1*>(arrayWidth.At(2)); |
248ee6f9 | 630 | if (width) |
631 | { | |
e01d9fa9 | 632 | nXbins = width->GetNbinsX(); |
9f5fbaba | 633 | for(Int_t i=2; i<nXbins; i++){ |
634 | x = width->GetBinCenter(i); | |
635 | if(x!=0) | |
636 | x = 1.0/(x*x); | |
637 | y = width->GetBinContent(i); | |
638 | y = y*y; | |
639 | linearFit.AddPoint(&x,y,1); | |
640 | } | |
641 | if(!linearFit.Eval()){ | |
642 | ||
643 | dcarAP0 = linearFit.GetParameter(0); | |
644 | if(dcarAP0!=0) | |
645 | pn = Int_t(TMath::Abs(dcarAP0)/dcarAP0); | |
646 | dcarAP0 = pn*TMath::Sqrt(TMath::Abs(dcarAP0)); | |
647 | ||
648 | dcarAP1 = linearFit.GetParameter(1); | |
649 | if(dcarAP1!=0) | |
650 | pn = Int_t(TMath::Abs(dcarAP1)/dcarAP1); | |
651 | dcarAP1 = pn*TMath::Sqrt(TMath::Abs(dcarAP1)); | |
652 | } | |
248ee6f9 | 653 | } |
9f5fbaba | 654 | |
655 | linearFit.ClearPoints(); | |
656 | ||
657 | //get his2D in C Side | |
658 | his3D->GetYaxis()->SetRangeUser(-1,-0.001); | |
659 | his2D = dynamic_cast<TH2*>(his3D->Project3D("xz")); | |
e01d9fa9 | 660 | if (his2D) |
661 | his2D->FitSlicesY(0,0,-1,0,"QNR",&arrayWidth); | |
248ee6f9 | 662 | width = dynamic_cast<TH1*>(arrayWidth.At(2)); |
663 | if (width) | |
664 | { | |
e01d9fa9 | 665 | nXbins = width->GetNbinsX(); |
9f5fbaba | 666 | for(Int_t i=2; i<nXbins; i++){ |
667 | x = width->GetBinCenter(i); | |
668 | if(x!=0) | |
669 | x = 1.0/(x*x); | |
670 | y = width->GetBinContent(i); | |
671 | y = y*y; | |
672 | linearFit.AddPoint(&x,y); | |
673 | } | |
674 | if(!linearFit.Eval()){ | |
675 | dcarCP0 = linearFit.GetParameter(0); | |
676 | if(dcarCP0!=0) | |
677 | pn = Int_t(TMath::Abs(dcarCP0)/dcarCP0); | |
678 | dcarCP0 = pn*TMath::Sqrt(TMath::Abs(dcarCP0)); | |
679 | ||
680 | dcarCP1 = linearFit.GetParameter(1); | |
681 | if(dcarCP1!=0) | |
682 | pn = Int_t(TMath::Abs(dcarCP1)/dcarCP1); | |
683 | dcarCP1 = pn*TMath::Sqrt(TMath::Abs(dcarCP1)); | |
684 | } | |
248ee6f9 | 685 | } |
9f5fbaba | 686 | his3D->GetYaxis()->SetRangeUser(-1,1); |
687 | his3D->GetZaxis()->SetRangeUser(0,20); | |
688 | ||
b832d719 | 689 | // |
690 | // dump values | |
691 | // | |
692 | (*pcstream)<<"tpcQA"<< | |
8d111632 | 693 | "offsetdRA="<< offsetdRA<< // mean r-phi distortion fit A side (DCA_rphi=[0]+[1]*tgl(theta)) - parameter [0] offset |
694 | "slopedRA="<< slopedRA<< // mean r-phi distortion fit A side (DCA_rphi=[0]+[1]*tgl(theta)) - parameter [1] slope | |
695 | "offsetdRC="<< offsetdRC<< // | |
696 | "slopedRC="<<slopedRC<< | |
697 | // | |
698 | "offsetdRAErr="<< offsetdRAErr<< | |
699 | "slopedRAErr="<< slopedRAErr<< | |
700 | "offsetdRCErr="<< offsetdRCErr<< | |
701 | "slopedRCErr="<<slopedRCErr<< | |
702 | // | |
703 | "offsetdRAchi2="<< offsetdRAchi2<< | |
704 | "slopedRAchi2="<< slopedRAchi2<< | |
705 | "offsetdRCchi2="<< offsetdRCchi2<< | |
706 | "slopedRCchi2="<<slopedRCchi2<< | |
707 | // | |
708 | "dcarAP0="<<dcarAP0<< | |
709 | "dcarAP1="<<dcarAP1<< | |
710 | "dcarCP0="<<dcarCP0<< | |
711 | "dcarCP1="<<dcarCP1; | |
b832d719 | 712 | |
713 | return 0; | |
714 | } | |
715 | ||
716 | //_____________________________________________________________________________ | |
70f4b25f | 717 | Int_t AliTPCPerformanceSummary::AnalyzeDCARPhiPos(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream) |
b832d719 | 718 | { |
719 | // | |
720 | // Analyse DCA R imperfections for positive particles | |
721 | // | |
722 | ||
723 | if (!pcstream) return 16; | |
724 | if (!pTPC) return 16; | |
725 | ||
726 | // variables: | |
727 | static Double_t offsetdRAPos=0; | |
728 | static Double_t slopedRAPos=0; | |
729 | static Double_t offsetdRCPos=0; | |
730 | static Double_t slopedRCPos=0; | |
731 | static Double_t offsetdRAErrPos=0; | |
732 | static Double_t slopedRAErrPos=0; | |
733 | static Double_t offsetdRCErrPos=0; | |
734 | static Double_t slopedRCErrPos=0; | |
735 | static Double_t offsetdRAchi2Pos=0; | |
736 | static Double_t slopedRAchi2Pos=0; | |
737 | static Double_t offsetdRCchi2Pos=0; | |
738 | static Double_t slopedRCchi2Pos=0; | |
739 | ||
740 | //AliPerformanceTPC* pTPC = dynamic_cast<AliPerformanceTPC*>(pTPCObject); | |
741 | TH1* his1D=0; | |
742 | TH2* his2D=0; | |
0cb93e70 | 743 | TH3* his3D=0; |
744 | ||
28bb9d1f | 745 | if (pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_7")) { |
746 | his3D = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_7")); | |
26a35193 | 747 | if(!his3D) return 16; |
0cb93e70 | 748 | his3D->GetYaxis()->SetRangeUser(-1,1); |
749 | his3D->GetZaxis()->SetRangeUser(0.25,10); | |
750 | } | |
751 | ||
b832d719 | 752 | static TF1 *fpol1 = new TF1("fpol1","pol1"); |
753 | TObjArray arrayFit; | |
0cb93e70 | 754 | if (his3D && !fgForceTHnSparse) { |
755 | his2D = dynamic_cast<TH2*>(his3D->Project3D("xy")); | |
756 | } else { | |
5ca104e5 | 757 | pTPC->GetTPCTrackHisto()->GetAxis(8)->SetRangeUser(0,1.5); |
0cb93e70 | 758 | his2D = pTPC->GetTPCTrackHisto()->Projection(3,5); |
5ca104e5 | 759 | pTPC->GetTPCTrackHisto()->GetAxis(8)->SetRangeUser(-1.5,1.5); |
0cb93e70 | 760 | } |
26a35193 | 761 | if(!his2D) return 16; |
0cb93e70 | 762 | |
b832d719 | 763 | his2D->FitSlicesY(0,0,-1,10,"QNR",&arrayFit); |
0cb93e70 | 764 | delete his2D; |
b832d719 | 765 | his1D = (TH1*) arrayFit.At(1); |
766 | his1D->Fit(fpol1,"QNRROB=0.8","QNR",-0.8,-0.1); | |
767 | offsetdRCPos=fpol1->GetParameter(0); | |
768 | slopedRCPos=fpol1->GetParameter(1); | |
769 | offsetdRCchi2Pos=fpol1->GetChisquare(); | |
770 | slopedRCchi2Pos=fpol1->GetChisquare(); | |
771 | // | |
772 | his1D->Fit(fpol1,"QNRROB=0.8","QNR",0.1,0.8); | |
773 | offsetdRAPos=fpol1->GetParameter(0); | |
774 | slopedRAPos=fpol1->GetParameter(1); | |
775 | offsetdRAErrPos=fpol1->GetParError(0); | |
776 | slopedRAErrPos=fpol1->GetParError(1); | |
777 | offsetdRAchi2Pos=fpol1->GetChisquare(); | |
778 | slopedRAchi2Pos=fpol1->GetChisquare(); | |
779 | // | |
780 | printf("DCA R QA Pos report\n"); | |
781 | printf("offsetdRAPos\t%f\n",offsetdRAPos); | |
782 | printf("slopedRAPos\t%f\n",slopedRAPos); | |
783 | printf("offsetdRCPos\t%f\n",offsetdRCPos); | |
784 | printf("slopedRCPos\t%f\n",slopedRCPos); | |
785 | // | |
786 | // dump values | |
787 | // | |
788 | (*pcstream)<<"tpcQA"<< | |
8d111632 | 789 | "offsetdRAPos="<< offsetdRAPos<< |
790 | "slopedRAPos="<< slopedRAPos<< | |
791 | "offsetdRCPos="<< offsetdRCPos<< | |
792 | "slopedRCPos="<<slopedRCPos<< | |
793 | // | |
794 | "offsetdRAErrPos="<< offsetdRAErrPos<< | |
795 | "slopedRAErrPos="<< slopedRAErrPos<< | |
796 | "offsetdRCErrPos="<< offsetdRCErrPos<< | |
797 | "slopedRCErrPos="<<slopedRCErrPos<< | |
798 | // | |
799 | "offsetdRAchi2Pos="<< offsetdRAchi2Pos<< | |
800 | "slopedRAchi2Pos="<< slopedRAchi2Pos<< | |
801 | "offsetdRCchi2Pos="<< offsetdRCchi2Pos<< | |
802 | "slopedRCchi2Pos="<<slopedRCchi2Pos; | |
b832d719 | 803 | |
804 | return 0; | |
805 | } | |
806 | ||
807 | //_____________________________________________________________________________ | |
70f4b25f | 808 | Int_t AliTPCPerformanceSummary::AnalyzeDCARPhiNeg(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream) |
b832d719 | 809 | { |
810 | // | |
811 | // Analyse DCA R imperfections for negative particles | |
812 | // | |
813 | if (!pcstream) return 32; | |
814 | if (!pTPC) return 32; | |
815 | ||
816 | // variables: | |
817 | static Double_t offsetdRANeg=0; | |
818 | static Double_t slopedRANeg=0; | |
819 | static Double_t offsetdRCNeg=0; | |
820 | static Double_t slopedRCNeg=0; | |
821 | static Double_t offsetdRAErrNeg=0; | |
822 | static Double_t slopedRAErrNeg=0; | |
823 | static Double_t offsetdRCErrNeg=0; | |
824 | static Double_t slopedRCErrNeg=0; | |
825 | static Double_t offsetdRAchi2Neg=0; | |
826 | static Double_t slopedRAchi2Neg=0; | |
827 | static Double_t offsetdRCchi2Neg=0; | |
828 | static Double_t slopedRCchi2Neg=0; | |
829 | ||
830 | //AliPerformanceTPC* pTPC = dynamic_cast<AliPerformanceTPC*>(pTPCObject); | |
831 | TH1* his1D=0; | |
832 | TH2* his2D=0; | |
0cb93e70 | 833 | TH3* his3D=0; |
834 | ||
28bb9d1f | 835 | if (pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_3_5_7")) { |
836 | his3D = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_3_5_7")); | |
26a35193 | 837 | if(!his3D) return 32; |
0cb93e70 | 838 | his3D->GetYaxis()->SetRangeUser(-1,1); |
839 | his3D->GetZaxis()->SetRangeUser(0.25,10); | |
840 | } | |
841 | ||
b832d719 | 842 | static TF1 *fpol1 = new TF1("fpol1","pol1"); |
843 | TObjArray arrayFit; | |
0cb93e70 | 844 | if (his3D && !fgForceTHnSparse) { |
845 | his2D = dynamic_cast<TH2*>(his3D->Project3D("xy")); | |
846 | } else { | |
5ca104e5 | 847 | pTPC->GetTPCTrackHisto()->GetAxis(8)->SetRangeUser(-1.5,0); |
0cb93e70 | 848 | his2D = pTPC->GetTPCTrackHisto()->Projection(3,5); |
5ca104e5 | 849 | pTPC->GetTPCTrackHisto()->GetAxis(8)->SetRangeUser(-1.5,1.5); |
0cb93e70 | 850 | } |
26a35193 | 851 | if(!his2D) return 32; |
852 | ||
b832d719 | 853 | his2D->FitSlicesY(0,0,-1,10,"QNR",&arrayFit); |
0cb93e70 | 854 | delete his2D; |
b832d719 | 855 | his1D = (TH1*) arrayFit.At(1); |
856 | his1D->Fit(fpol1,"QNRROB=0.8","QNR",-0.8,-0.1); | |
857 | offsetdRCNeg=fpol1->GetParameter(0); | |
858 | slopedRCNeg=fpol1->GetParameter(1); | |
859 | offsetdRCchi2Neg=fpol1->GetChisquare(); | |
860 | slopedRCchi2Neg=fpol1->GetChisquare(); | |
861 | // | |
862 | his1D->Fit(fpol1,"QNRROB=0.8","QNR",0.1,0.8); | |
863 | offsetdRANeg=fpol1->GetParameter(0); | |
864 | slopedRANeg=fpol1->GetParameter(1); | |
865 | offsetdRAErrNeg=fpol1->GetParError(0); | |
866 | slopedRAErrNeg=fpol1->GetParError(1); | |
867 | offsetdRAchi2Neg=fpol1->GetChisquare(); | |
868 | slopedRAchi2Neg=fpol1->GetChisquare(); | |
869 | // | |
870 | printf("DCA R QA Neg report\n"); | |
871 | printf("offsetdRANeg\t%f\n",offsetdRANeg); | |
872 | printf("slopedRANeg\t%f\n",slopedRANeg); | |
873 | printf("offsetdRCNeg\t%f\n",offsetdRCNeg); | |
874 | printf("slopedRCNeg\t%f\n",slopedRCNeg); | |
875 | // | |
876 | // dump drift QA values | |
877 | // | |
878 | (*pcstream)<<"tpcQA"<< | |
879 | "offsetdRANeg="<< offsetdRANeg<< | |
880 | "slopedRANeg="<< slopedRANeg<< | |
881 | "offsetdRCNeg="<< offsetdRCNeg<< | |
882 | "slopedRCNeg="<<slopedRCNeg<< | |
883 | // | |
884 | "offsetdRAErrNeg="<< offsetdRAErrNeg<< | |
885 | "slopedRAErrNeg="<< slopedRAErrNeg<< | |
886 | "offsetdRCErrNeg="<< offsetdRCErrNeg<< | |
887 | "slopedRCErrNeg="<<slopedRCErrNeg<< | |
888 | // | |
889 | "offsetdRAchi2Neg="<< offsetdRAchi2Neg<< | |
890 | "slopedRAchi2Neg="<< slopedRAchi2Neg<< | |
891 | "offsetdRCchi2Neg="<< offsetdRCchi2Neg<< | |
892 | "slopedRCchi2Neg="<<slopedRCchi2Neg; | |
893 | ||
894 | return 0; | |
895 | } | |
896 | ||
897 | //_____________________________________________________________________________ | |
70f4b25f | 898 | Int_t AliTPCPerformanceSummary::AnalyzeNCL(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream) |
b832d719 | 899 | { |
900 | // | |
901 | // Analyse number of TPC clusters | |
902 | // | |
903 | ||
904 | if (!pcstream) return 1; | |
905 | if (!pTPC) return 1; | |
906 | ||
907 | // variables: | |
908 | static Double_t meanTPCnclF=0; | |
8d111632 | 909 | static Double_t meanTPCnclFStat=0; |
910 | static Double_t meanTPCnclFErr=0; | |
b832d719 | 911 | static Double_t rmsTPCnclF=0; |
912 | static Double_t meanTPCChi2=0; | |
913 | static Double_t rmsTPCChi2=0; | |
914 | static Double_t slopeATPCnclF=0; | |
915 | static Double_t slopeCTPCnclF=0; | |
916 | static Double_t slopeATPCnclFErr=0; | |
917 | static Double_t slopeCTPCnclFErr=0; | |
918 | static Double_t meanTPCncl=0; | |
8d111632 | 919 | static Double_t meanTPCnclStat=0; |
920 | static Double_t meanTPCnclErr=0; | |
b832d719 | 921 | static Double_t rmsTPCncl=0; |
922 | static Double_t slopeATPCncl=0; | |
923 | static Double_t slopeCTPCncl=0; | |
924 | static Double_t slopeATPCnclErr=0; | |
925 | static Double_t slopeCTPCnclErr=0; | |
70f4b25f | 926 | // |
b832d719 | 927 | TH1* his1D=0; |
70f4b25f | 928 | TH3* his3D0=0; |
929 | TH3* his3D1=0; | |
930 | TH3* his3D2=0; | |
b832d719 | 931 | TProfile* hprof=0; |
932 | static TF1 *fpol1 = new TF1("fpol1","pol1"); | |
933 | // | |
934 | // all clusters | |
0cb93e70 | 935 | // only events with rec. vertex |
b832d719 | 936 | // eta cut - +-1 |
0cb93e70 | 937 | // pt cut - 0.250 GeV |
b832d719 | 938 | pTPC->GetTPCTrackHisto()->GetAxis(5)->SetRangeUser(-1.,1.); |
939 | pTPC->GetTPCTrackHisto()->GetAxis(7)->SetRangeUser(0.25,10); | |
0cb93e70 | 940 | |
28bb9d1f | 941 | if (pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_0_5_7")) { |
70f4b25f | 942 | his3D0 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_0_5_7")); |
26a35193 | 943 | if(!his3D0) return 1; |
70f4b25f | 944 | his3D0->GetYaxis()->SetRangeUser(-1,1); |
945 | his3D0->GetZaxis()->SetRangeUser(0.25,10); | |
0cb93e70 | 946 | } |
28bb9d1f | 947 | if (pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_1_5_7")) { |
70f4b25f | 948 | his3D1 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_1_5_7")); |
26a35193 | 949 | if(!his3D1) return 1; |
70f4b25f | 950 | his3D1->GetYaxis()->SetRangeUser(-1,1); |
951 | his3D1->GetZaxis()->SetRangeUser(0.25,10); | |
0cb93e70 | 952 | } |
28bb9d1f | 953 | if (pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_2_5_7")) { |
70f4b25f | 954 | his3D2 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_2_5_7")); |
26a35193 | 955 | if(!his3D2) return 1; |
70f4b25f | 956 | his3D2->GetYaxis()->SetRangeUser(-1,1); |
957 | his3D2->GetZaxis()->SetRangeUser(0.25,10); | |
958 | his3D2->GetXaxis()->SetRangeUser(0.4,1.1); | |
0cb93e70 | 959 | } |
960 | ||
961 | ||
70f4b25f | 962 | if (his3D0 && !fgForceTHnSparse) { |
963 | his1D = his3D0->Project3D("x"); | |
0cb93e70 | 964 | } else { |
965 | his1D = pTPC->GetTPCTrackHisto()->Projection(0); | |
966 | } | |
967 | ||
b832d719 | 968 | meanTPCncl= his1D->GetMean(); |
8d111632 | 969 | meanTPCnclStat= his1D->GetEntries(); |
970 | meanTPCnclErr= his1D->GetMeanError(); | |
b832d719 | 971 | rmsTPCncl= his1D->GetRMS(); |
8d111632 | 972 | |
b832d719 | 973 | delete his1D; |
0cb93e70 | 974 | |
70f4b25f | 975 | if (his3D1 && !fgForceTHnSparse) { |
976 | his1D = his3D1->Project3D("x"); | |
0cb93e70 | 977 | } else { |
978 | his1D = pTPC->GetTPCTrackHisto()->Projection(1); | |
979 | } | |
980 | ||
b832d719 | 981 | meanTPCChi2= his1D->GetMean(); |
982 | rmsTPCChi2= his1D->GetRMS(); | |
983 | delete his1D; | |
0cb93e70 | 984 | |
70f4b25f | 985 | if (his3D0 && !fgForceTHnSparse) { |
986 | hprof = (dynamic_cast<TH2*>(his3D0->Project3D("xy")))->ProfileX(); | |
0cb93e70 | 987 | } else { |
988 | hprof = pTPC->GetTPCTrackHisto()->Projection(0,5)->ProfileX(); | |
989 | } | |
26a35193 | 990 | if(!hprof) return 1; |
0cb93e70 | 991 | |
992 | hprof->Fit(fpol1,"QNR","QNR",0.1,0.8); | |
b832d719 | 993 | slopeATPCncl= fpol1->GetParameter(1); |
994 | slopeATPCnclErr= fpol1->GetParError(1); | |
0cb93e70 | 995 | hprof->Fit(fpol1,"QNR","QNR",-0.8,-0.1); |
b832d719 | 996 | slopeCTPCncl= fpol1->GetParameter(1); |
997 | slopeCTPCnclErr= fpol1->GetParameter(1); | |
998 | delete hprof; | |
0cb93e70 | 999 | |
b832d719 | 1000 | // |
1001 | // findable clusters | |
1002 | // | |
0cb93e70 | 1003 | |
70f4b25f | 1004 | if (his3D2 && !fgForceTHnSparse) { |
1005 | his1D = his3D2->Project3D("x"); | |
0cb93e70 | 1006 | } else { |
1007 | pTPC->GetTPCTrackHisto()->GetAxis(2)->SetRangeUser(0.4,1.1); | |
1008 | his1D = pTPC->GetTPCTrackHisto()->Projection(2); | |
1009 | } | |
814d192f | 1010 | |
b832d719 | 1011 | meanTPCnclF= his1D->GetMean(); |
8d111632 | 1012 | meanTPCnclFStat= his1D->GetEntries(); |
1013 | meanTPCnclFErr= his1D->GetMeanError(); | |
b832d719 | 1014 | rmsTPCnclF= his1D->GetRMS(); |
1015 | delete his1D; | |
0cb93e70 | 1016 | |
70f4b25f | 1017 | if (his3D2 && !fgForceTHnSparse) { |
1018 | his1D = (dynamic_cast<TH2*>(his3D2->Project3D("xy")))->ProfileX(); | |
0cb93e70 | 1019 | } else { |
1020 | pTPC->GetTPCTrackHisto()->GetAxis(2)->SetRangeUser(0.4,1.1); | |
1021 | his1D = pTPC->GetTPCTrackHisto()->Projection(2,5)->ProfileX(); | |
1022 | } | |
26a35193 | 1023 | if(!his1D) return 1; |
0cb93e70 | 1024 | |
1025 | his1D->Fit(fpol1,"QNR","QNR",0.1,0.8); | |
b832d719 | 1026 | slopeATPCnclF= fpol1->GetParameter(1); |
1027 | slopeATPCnclFErr= fpol1->GetParError(1); | |
0cb93e70 | 1028 | his1D->Fit(fpol1,"QNR","QNR",-0.8,-0.1); |
b832d719 | 1029 | slopeCTPCnclF= fpol1->GetParameter(1); |
1030 | slopeCTPCnclFErr= fpol1->GetParameter(1); | |
1031 | delete his1D; | |
0cb93e70 | 1032 | |
1033 | pTPC->GetTPCTrackHisto()->GetAxis(2)->SetRangeUser(0,10); | |
1034 | ||
b832d719 | 1035 | printf("Cluster QA report\n"); |
1036 | printf("meanTPCnclF=\t%f\n",meanTPCnclF); | |
1037 | printf("rmsTPCnclF=\t%f\n",rmsTPCnclF); | |
1038 | printf("slopeATPCnclF=\t%f\n",slopeATPCnclF); | |
1039 | printf("slopeCTPCnclF=\t%f\n",slopeCTPCnclF); | |
1040 | printf("meanTPCncl=\t%f\n",meanTPCncl); | |
1041 | printf("rmsTPCncl=\t%f\n",rmsTPCncl); | |
1042 | printf("slopeATPCncl=\t%f\n",slopeATPCncl); | |
1043 | printf("slopeCTPCncl=\t%f\n",slopeCTPCncl); | |
1044 | printf("meanTPCChi2=\t%f\n",meanTPCChi2); | |
1045 | printf("rmsTPCChi2=\t%f\n",rmsTPCChi2); | |
1046 | // | |
1047 | // dump results to the tree | |
1048 | // | |
1049 | (*pcstream)<<"tpcQA"<< | |
5dff0b89 | 1050 | "meanTPCnclF="<<meanTPCnclF << // mean number of cluster/number of findable cluster |
1051 | "meanTPCnclFStat="<<meanTPCnclFStat << // number of cluster/number of findable cluster - number of etries | |
1052 | "meanTPCnclFErr="<<meanTPCnclFErr << // error of mean number of cluster/number of findable cluster | |
1053 | "rmsTPCnclF="<<rmsTPCnclF << // RMS of distribution of number of cluster/number of findable cluster | |
1054 | "meanTPCChi2="<<meanTPCChi2 << // ???? | |
1055 | "rmsTPCChi2="<<rmsTPCChi2 << // ???? | |
1056 | "slopeATPCnclF="<< slopeATPCnclF<< // A side- fit of number of clusters/findable (Ncl=[0]+[1]*tan(\theta)) - parameter [1] slope | |
1057 | "slopeCTPCnclF="<< slopeCTPCnclF<< // C side- fit of number of clusters/findable (Ncl=[0]+[1]*tan(\theta)) - parameter [1] slope | |
1058 | "slopeATPCnclFErr="<< slopeATPCnclFErr<< // A side- fit of number of clusters/findable (Ncl=[0]+[1]*tan(\theta)) - error of parameter [1] slope | |
1059 | "slopeCTPCnclFErr="<< slopeCTPCnclFErr<< // C side- fit of number of clusters/findable (Ncl=[0]+[1]*tan(\theta)) - error of parameter [1] slope | |
1060 | "meanTPCncl="<<meanTPCncl << // mean number of cluster | |
1061 | "meanTPCnclStat="<<meanTPCnclStat << // number of cluster - number of etries in histogram | |
1062 | "meanTPCnclErr="<<meanTPCnclErr << // error of mean number of cluster | |
1063 | "rmsTPCncl="<< rmsTPCncl<< // rms of mean number of cluster | |
1064 | "slopeATPCncl="<< slopeATPCncl<< // A side- fit of number of clusters (Ncl=[0]+[1]*tan(\theta)) - parameter [1] slope | |
1065 | "slopeCTPCncl="<< slopeCTPCncl<< // C side - fit of number of clusters (Ncl=[0]+[1]*tan(\theta)) - parameter 1 - slope | |
1066 | "slopeATPCnclErr="<< slopeATPCnclErr<< // A side - fit of number of clusters (Ncl=[0]+[1]*tan(\theta)) - error of parameter 1 - slope | |
1067 | "slopeCTPCnclErr="<< slopeCTPCnclErr; // C side - fit of number of clusters (Ncl=[0]+[1]*tan(\theta)) - error of parameter 1 - slope | |
b832d719 | 1068 | |
1069 | return 0; | |
1070 | } | |
1071 | ||
1072 | //_____________________________________________________________________________ | |
70f4b25f | 1073 | Int_t AliTPCPerformanceSummary::AnalyzeDrift(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream) |
b832d719 | 1074 | { |
1075 | // | |
1076 | // Analyse DCA Z imperferctions (drift velocity) | |
1077 | // | |
1078 | ||
1079 | if (!pcstream) return 2; | |
1080 | if (!pTPC) return 2; | |
1081 | ||
1082 | // variables: | |
1083 | static Double_t offsetdZA=0; | |
1084 | static Double_t slopedZA=0; | |
1085 | static Double_t offsetdZC=0; | |
1086 | static Double_t slopedZC=0; | |
1087 | static Double_t offsetdZAErr=0; | |
1088 | static Double_t slopedZAErr=0; | |
1089 | static Double_t offsetdZCErr=0; | |
1090 | static Double_t slopedZCErr=0; | |
1091 | static Double_t offsetdZAchi2=0; | |
1092 | static Double_t slopedZAchi2=0; | |
1093 | static Double_t offsetdZCchi2=0; | |
1094 | static Double_t slopedZCchi2=0; | |
1095 | TH1* his1D=0; | |
1096 | TH2* his2D=0; | |
0cb93e70 | 1097 | TH3* his3D=0; |
1098 | ||
28bb9d1f | 1099 | if (pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_4_5_7")) { |
1100 | his3D = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_4_5_7")); | |
26a35193 | 1101 | if(!his3D) return 2; |
0cb93e70 | 1102 | his3D->GetYaxis()->SetRangeUser(-1,1); |
1103 | his3D->GetZaxis()->SetRangeUser(0.25,10); | |
26a35193 | 1104 | } |
1105 | ||
0cb93e70 | 1106 | if (his3D && !fgForceTHnSparse) { |
1107 | his2D = dynamic_cast<TH2*>(his3D->Project3D("xy")); | |
1108 | } else { | |
1109 | his2D = pTPC->GetTPCTrackHisto()->Projection(4,5); | |
1110 | } | |
26a35193 | 1111 | if(!his2D) return 2; |
0cb93e70 | 1112 | |
b832d719 | 1113 | static TF1 *fpol1 = new TF1("fpol1","pol1"); |
1114 | TObjArray arrayFit; | |
b832d719 | 1115 | his2D->FitSlicesY(0,0,-1,10,"QNR",&arrayFit); |
1116 | delete his2D; | |
1117 | his1D = (TH1*) arrayFit.At(1); | |
1118 | his1D->Fit(fpol1,"QNRROB=0.8","QNR",-0.8,-0.1); | |
1119 | offsetdZC=fpol1->GetParameter(0); | |
1120 | slopedZC=fpol1->GetParameter(1); | |
1121 | offsetdZCErr=fpol1->GetParError(0); | |
1122 | slopedZCErr=fpol1->GetParError(1); | |
1123 | offsetdZCchi2=fpol1->GetChisquare(); | |
1124 | slopedZCchi2=fpol1->GetChisquare(); | |
1125 | // | |
1126 | his1D->Fit(fpol1,"QNRROB=0.8","QNR",0.1,0.8); | |
1127 | offsetdZA=fpol1->GetParameter(0); | |
1128 | slopedZA=fpol1->GetParameter(1); | |
1129 | offsetdZAErr=fpol1->GetParError(0); | |
1130 | slopedZAErr=fpol1->GetParError(1); | |
1131 | offsetdZAchi2=fpol1->GetChisquare(); | |
1132 | slopedZAchi2=fpol1->GetChisquare(); | |
1133 | // | |
1134 | printf("Drift velocity QA report\n"); | |
1135 | printf("offsetdZA\t%f\n",offsetdZA); | |
1136 | printf("slopedZA\t%f\n",slopedZA); | |
1137 | printf("offsetdZC\t%f\n",offsetdZC); | |
1138 | printf("slopedZC\t%f\n",slopedZC); | |
1139 | // | |
1140 | // dump drift QA values | |
1141 | // | |
1142 | (*pcstream)<<"tpcQA"<< | |
8d111632 | 1143 | "offsetdZA="<< offsetdZA<< // |
b832d719 | 1144 | "slopedZA="<< slopedZA<< |
1145 | "offsetdZC="<< offsetdZC<< | |
1146 | "slopedZC="<<slopedZC<< | |
1147 | // | |
1148 | "offsetdZAErr="<< offsetdZAErr<< | |
1149 | "slopedZAErr="<< slopedZAErr<< | |
1150 | "offsetdZCErr="<< offsetdZCErr<< | |
1151 | "slopedZCErr="<<slopedZCErr<< | |
1152 | // | |
1153 | "offsetdZAchi2="<< offsetdZAchi2<< | |
1154 | "slopedZAchi2="<< slopedZAchi2<< | |
1155 | "offsetdZCchi2="<< offsetdZCchi2<< | |
1156 | "slopedZCchi2="<<slopedZCchi2; | |
1157 | ||
1158 | return 0; | |
1159 | } | |
1160 | ||
1161 | //_____________________________________________________________________________ | |
70f4b25f | 1162 | Int_t AliTPCPerformanceSummary::AnalyzeDriftPos(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream) |
b832d719 | 1163 | { |
1164 | // | |
1165 | // Analyse DCA Z imperferctions (drift velocity) | |
1166 | // for positive particles | |
1167 | // | |
1168 | if (!pcstream) return 64; | |
1169 | if (!pTPC) return 64; | |
1170 | ||
1171 | // variables: | |
1172 | static Double_t offsetdZAPos=0; | |
1173 | static Double_t slopedZAPos=0; | |
1174 | static Double_t offsetdZCPos=0; | |
1175 | static Double_t slopedZCPos=0; | |
1176 | static Double_t offsetdZAErrPos=0; | |
1177 | static Double_t slopedZAErrPos=0; | |
1178 | static Double_t offsetdZCErrPos=0; | |
1179 | static Double_t slopedZCErrPos=0; | |
1180 | static Double_t offsetdZAchi2Pos=0; | |
1181 | static Double_t slopedZAchi2Pos=0; | |
1182 | static Double_t offsetdZCchi2Pos=0; | |
1183 | static Double_t slopedZCchi2Pos=0; | |
1184 | TH1* his1D=0; | |
1185 | TH2* his2D=0; | |
0cb93e70 | 1186 | TH3* his3D=0; |
1187 | ||
28bb9d1f | 1188 | if (pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_4_5_7")) { |
1189 | his3D = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_4_5_7")); | |
26a35193 | 1190 | if(!his3D) return 64; |
0cb93e70 | 1191 | his3D->GetYaxis()->SetRangeUser(-1,1); |
1192 | his3D->GetZaxis()->SetRangeUser(0.25,10); | |
26a35193 | 1193 | } |
1194 | ||
0cb93e70 | 1195 | if (his3D && !fgForceTHnSparse) { |
1196 | his2D = dynamic_cast<TH2*>(his3D->Project3D("xy")); | |
1197 | } else { | |
1198 | his2D = pTPC->GetTPCTrackHisto()->Projection(4,5); | |
1199 | } | |
26a35193 | 1200 | if(!his2D) return 64; |
0cb93e70 | 1201 | |
b832d719 | 1202 | static TF1 *fpol1 = new TF1("fpol1","pol1"); |
1203 | TObjArray arrayFit; | |
b832d719 | 1204 | his2D->FitSlicesY(0,0,-1,10,"QNR",&arrayFit); |
1205 | delete his2D; | |
0cb93e70 | 1206 | |
b832d719 | 1207 | his1D = (TH1*) arrayFit.At(1); |
1208 | his1D->Fit(fpol1,"QNRROB=0.8","QNR",-0.8,-0.1); | |
1209 | offsetdZCPos=fpol1->GetParameter(0); | |
1210 | slopedZCPos=fpol1->GetParameter(1); | |
1211 | offsetdZCErrPos=fpol1->GetParError(0); | |
1212 | slopedZCErrPos=fpol1->GetParError(1); | |
1213 | offsetdZCchi2Pos=fpol1->GetChisquare(); | |
1214 | slopedZCchi2Pos=fpol1->GetChisquare(); | |
1215 | // | |
1216 | his1D->Fit(fpol1,"QNRROB=0.8","QNR",0.1,0.8); | |
1217 | offsetdZAPos=fpol1->GetParameter(0); | |
1218 | slopedZAPos=fpol1->GetParameter(1); | |
1219 | offsetdZAErrPos=fpol1->GetParError(0); | |
1220 | slopedZAErrPos=fpol1->GetParError(1); | |
1221 | offsetdZAchi2Pos=fpol1->GetChisquare(); | |
1222 | slopedZAchi2Pos=fpol1->GetChisquare(); | |
1223 | // | |
1224 | printf("Drift velocity QA report\n"); | |
1225 | printf("offsetdZAPos\t%f\n",offsetdZAPos); | |
1226 | printf("slopedZAPos\t%f\n",slopedZAPos); | |
1227 | printf("offsetdZCPos\t%f\n",offsetdZCPos); | |
1228 | printf("slopedZCPos\t%f\n",slopedZCPos); | |
1229 | // | |
1230 | // dump drift QA values | |
1231 | // | |
1232 | (*pcstream)<<"tpcQA"<< | |
1233 | "offsetdZAPos="<< offsetdZAPos<< | |
1234 | "slopedZAPos="<< slopedZAPos<< | |
1235 | "offsetdZCPos="<< offsetdZCPos<< | |
1236 | "slopedZCPos="<<slopedZCPos<< | |
1237 | // | |
1238 | "offsetdZAErrPos="<< offsetdZAErrPos<< | |
1239 | "slopedZAErrPos="<< slopedZAErrPos<< | |
1240 | "offsetdZCErrPos="<< offsetdZCErrPos<< | |
1241 | "slopedZCErrPos="<<slopedZCErrPos<< | |
1242 | // | |
1243 | "offsetdZAchi2Pos="<< offsetdZAchi2Pos<< | |
1244 | "slopedZAchi2Pos="<< slopedZAchi2Pos<< | |
1245 | "offsetdZCchi2Pos="<< offsetdZCchi2Pos<< | |
1246 | "slopedZCchi2Pos="<<slopedZCchi2Pos; | |
1247 | ||
1248 | return 0; | |
1249 | } | |
1250 | ||
1251 | //_____________________________________________________________________________ | |
70f4b25f | 1252 | Int_t AliTPCPerformanceSummary::AnalyzeDriftNeg(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream) |
b832d719 | 1253 | { |
1254 | // | |
1255 | // Analyse DCA Z imperferctions (drift velocity) | |
1256 | // for negative particles | |
1257 | // | |
1258 | if (!pcstream) return 128; | |
1259 | if (!pTPC) return 128; | |
1260 | ||
1261 | // variables: | |
1262 | static Double_t offsetdZANeg=0; | |
1263 | static Double_t slopedZANeg=0; | |
1264 | static Double_t offsetdZCNeg=0; | |
1265 | static Double_t slopedZCNeg=0; | |
1266 | static Double_t offsetdZAErrNeg=0; | |
1267 | static Double_t slopedZAErrNeg=0; | |
1268 | static Double_t offsetdZCErrNeg=0; | |
1269 | static Double_t slopedZCErrNeg=0; | |
1270 | static Double_t offsetdZAchi2Neg=0; | |
1271 | static Double_t slopedZAchi2Neg=0; | |
1272 | static Double_t offsetdZCchi2Neg=0; | |
1273 | static Double_t slopedZCchi2Neg=0; | |
1274 | TH1* his1D=0; | |
1275 | TH2* his2D=0; | |
0cb93e70 | 1276 | TH3* his3D=0; |
1277 | ||
0cb93e70 | 1278 | |
28bb9d1f | 1279 | if (pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_4_5_7")) { |
1280 | his3D = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_4_5_7")); | |
26a35193 | 1281 | if(!his3D) return 128; |
0cb93e70 | 1282 | his3D->GetYaxis()->SetRangeUser(-1,1); |
1283 | his3D->GetZaxis()->SetRangeUser(0.25,10); | |
1284 | } | |
1285 | if (his3D && !fgForceTHnSparse) { | |
1286 | his2D = dynamic_cast<TH2*>(his3D->Project3D("xy")); | |
1287 | } else { | |
1288 | his2D = pTPC->GetTPCTrackHisto()->Projection(4,5); | |
1289 | } | |
26a35193 | 1290 | if(!his2D) return 128; |
0cb93e70 | 1291 | |
b832d719 | 1292 | static TF1 *fpol1 = new TF1("fpol1","pol1"); |
1293 | TObjArray arrayFit; | |
b832d719 | 1294 | his2D->FitSlicesY(0,0,-1,10,"QNR",&arrayFit); |
1295 | delete his2D; | |
0cb93e70 | 1296 | |
b832d719 | 1297 | his1D = (TH1*) arrayFit.At(1); |
1298 | his1D->Fit(fpol1,"QNRROB=0.8","QNR",-0.8,-0.1); | |
1299 | offsetdZCNeg=fpol1->GetParameter(0); | |
1300 | slopedZCNeg=fpol1->GetParameter(1); | |
1301 | offsetdZCErrNeg=fpol1->GetParError(0); | |
1302 | slopedZCErrNeg=fpol1->GetParError(1); | |
1303 | offsetdZCchi2Neg=fpol1->GetChisquare(); | |
1304 | slopedZCchi2Neg=fpol1->GetChisquare(); | |
1305 | // | |
1306 | his1D->Fit(fpol1,"QNRROB=0.8","QNR",0.1,0.8); | |
1307 | offsetdZANeg=fpol1->GetParameter(0); | |
1308 | slopedZANeg=fpol1->GetParameter(1); | |
1309 | offsetdZAErrNeg=fpol1->GetParError(0); | |
1310 | slopedZAErrNeg=fpol1->GetParError(1); | |
1311 | offsetdZAchi2Neg=fpol1->GetChisquare(); | |
1312 | slopedZAchi2Neg=fpol1->GetChisquare(); | |
1313 | // | |
1314 | printf("Drift velocity QA report\n"); | |
1315 | printf("offsetdZANeg\t%f\n",offsetdZANeg); | |
1316 | printf("slopedZANeg\t%f\n",slopedZANeg); | |
1317 | printf("offsetdZCNeg\t%f\n",offsetdZCNeg); | |
1318 | printf("slopedZCNeg\t%f\n",slopedZCNeg); | |
1319 | // | |
1320 | // dump drift QA values | |
1321 | // | |
1322 | (*pcstream)<<"tpcQA"<< | |
1323 | "offsetdZANeg="<< offsetdZANeg<< | |
1324 | "slopedZANeg="<< slopedZANeg<< | |
1325 | "offsetdZCNeg="<< offsetdZCNeg<< | |
1326 | "slopedZCNeg="<<slopedZCNeg<< | |
1327 | // | |
1328 | "offsetdZAErrNeg="<< offsetdZAErrNeg<< | |
1329 | "slopedZAErrNeg="<< slopedZAErrNeg<< | |
1330 | "offsetdZCErrNeg="<< offsetdZCErrNeg<< | |
1331 | "slopedZCErrNeg="<<slopedZCErrNeg<< | |
1332 | // | |
1333 | "offsetdZAchi2Neg="<< offsetdZAchi2Neg<< | |
1334 | "slopedZAchi2Neg="<< slopedZAchi2Neg<< | |
1335 | "offsetdZCchi2Neg="<< offsetdZCchi2Neg<< | |
1336 | "slopedZCchi2Neg="<<slopedZCchi2Neg; | |
1337 | ||
1338 | return 0; | |
1339 | } | |
1340 | ||
1341 | //_____________________________________________________________________________ | |
70f4b25f | 1342 | Int_t AliTPCPerformanceSummary::AnalyzeGain(const AliPerformanceDEdx* pTPCgain, TTreeSRedirector* const pcstream) |
b832d719 | 1343 | { |
1344 | // | |
1345 | // Analyse Gain | |
1346 | // | |
1347 | ||
1348 | if (!pcstream) return 4; | |
1349 | if (!pTPCgain) return 4; | |
1350 | ||
1351 | static TVectorD meanMIPvsSector(36); | |
1352 | static TVectorD sector(36); | |
1353 | static Float_t meanMIP = 0; | |
1354 | static Float_t resolutionMIP = 0; | |
1355 | static Float_t attachSlopeC = 0; | |
1356 | static Float_t attachSlopeA = 0; | |
1357 | ||
69878f59 | 1358 | TH1 * his1D = 0; |
814d192f | 1359 | //TH1 * hisProj1D=0; |
1360 | TH2* his2D=0; | |
1361 | ||
69878f59 | 1362 | |
b832d719 | 1363 | meanMIPvsSector.Zero(); |
1364 | // | |
1365 | // select MIP particles | |
1366 | // | |
1367 | pTPCgain->GetDeDxHisto()->GetAxis(7)->SetRangeUser(0.4,0.55); | |
1368 | pTPCgain->GetDeDxHisto()->GetAxis(0)->SetRangeUser(35,60); | |
1369 | pTPCgain->GetDeDxHisto()->GetAxis(6)->SetRangeUser(80,160); | |
1370 | pTPCgain->GetDeDxHisto()->GetAxis(5)->SetRangeUser(-1,1); | |
1371 | // | |
1372 | // MIP position and resolution | |
814d192f | 1373 | // |
b832d719 | 1374 | TF1 gausFit("gausFit","gaus"); |
814d192f | 1375 | |
1376 | if (pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_0") && !fgForceTHnSparse) { | |
1377 | his1D = dynamic_cast<TH1*>(pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_0")->Clone()); | |
1378 | } else { | |
1379 | his1D = pTPCgain->GetDeDxHisto()->Projection(0); | |
1380 | } | |
26a35193 | 1381 | if(!his1D) return 4; |
814d192f | 1382 | his1D->Fit(&gausFit,"QN","QN"); |
1383 | ||
b832d719 | 1384 | meanMIP = gausFit.GetParameter(1); |
1385 | resolutionMIP = 0; | |
1386 | if (meanMIP!=0) resolutionMIP = gausFit.GetParameter(2)/meanMIP; | |
814d192f | 1387 | //removedtotest// delete his1D; |
b832d719 | 1388 | // |
1389 | // MIP position vs. dip angle (attachment) | |
814d192f | 1390 | // |
1391 | pTPCgain->GetDeDxHisto()->GetAxis(5)->SetRangeUser(-3,0); // C side | |
1392 | if (pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_c_0_5") && !fgForceTHnSparse) { | |
1393 | his2D = dynamic_cast<TH2*>(pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_c_0_5")->Clone()); | |
1394 | } else { | |
1395 | his2D = pTPCgain->GetDeDxHisto()->Projection(0,5); | |
1396 | } | |
26a35193 | 1397 | if(!his2D) return 4; |
1398 | ||
b832d719 | 1399 | TF1 * fpol = new TF1("fpol","pol1"); |
1400 | TObjArray arrayFit; | |
814d192f | 1401 | his2D->FitSlicesY(0,0,-1,10,"QN",&arrayFit); |
69878f59 | 1402 | his1D = (TH1*) arrayFit.At(1); |
b832d719 | 1403 | his1D->Fit(fpol,"QNROB=0.8","QNR",-1,0); |
1404 | attachSlopeC = fpol->GetParameter(1); | |
814d192f | 1405 | //removedtotest// delete his2D; |
1406 | //removedtotest// delete his1D; | |
b832d719 | 1407 | // |
814d192f | 1408 | pTPCgain->GetDeDxHisto()->GetAxis(5)->SetRangeUser(0,3); // A side |
1409 | if (pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_a_0_5") && !fgForceTHnSparse) { | |
1410 | his2D = dynamic_cast<TH2*>(pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_a_0_5")->Clone()); | |
1411 | } else { | |
1412 | his2D = pTPCgain->GetDeDxHisto()->Projection(0,5); | |
1413 | } | |
26a35193 | 1414 | if(!his2D) return 4; |
1415 | ||
b832d719 | 1416 | TF1 * fpolA = new TF1("fpolA","pol1"); |
1417 | TObjArray arrayFitA; | |
814d192f | 1418 | his2D->FitSlicesY(0,0,-1,10,"QN",&arrayFit); |
1419 | his1D = (TH1*) arrayFit.At(1); | |
1420 | his1D->Fit(fpolA,"QNROB=0.8","QN",0,1); | |
b832d719 | 1421 | attachSlopeA = fpolA->GetParameter(1); |
814d192f | 1422 | //removedtotest// delete his2D; |
1423 | //removedtotest// delete his1D; | |
b832d719 | 1424 | // |
1425 | // MIP position vs. sector | |
1426 | // | |
1427 | pTPCgain->GetDeDxHisto()->GetAxis(5)->SetRangeUser(-3,0); // C side | |
814d192f | 1428 | if (pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_c_0_1") && !fgForceTHnSparse) { |
1429 | his2D = dynamic_cast<TH2*>(pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_c_0_1")->Clone()); | |
1430 | } else { | |
1431 | his2D = pTPCgain->GetDeDxHisto()->Projection(0,1); | |
1432 | } | |
26a35193 | 1433 | if(!his2D) return 4; |
1434 | ||
b832d719 | 1435 | for(Int_t i = 0; i < 18; i++) { // loop over sectors; correct mapping to be checked! |
0285b6f5 | 1436 | //TH1* his1D=0; |
b832d719 | 1437 | Float_t phiLow = -TMath::Pi() + i*(20./360.)*(2*TMath::Pi()); |
1438 | Float_t phiUp = -TMath::Pi() + (i+1)*(20./360.)*(2*TMath::Pi()); | |
814d192f | 1439 | //pTPCgain->GetDeDxHisto()->GetAxis(1)->SetRangeUser(phiLow,phiUp); |
1440 | his2D->GetXaxis()->SetRangeUser(phiLow,phiUp); | |
1441 | //his1D = pTPCgain->GetDeDxHisto()->Projection(0); | |
1442 | his1D = his2D->ProjectionY(); | |
b832d719 | 1443 | TF1 gausFunc("gausFunc","gaus"); |
1444 | his1D->Fit(&gausFunc, "QN"); | |
1445 | meanMIPvsSector(i) = gausFunc.GetParameter(1); | |
1446 | sector(i)=i; | |
814d192f | 1447 | //removedtotest// delete his1D; |
b832d719 | 1448 | } |
814d192f | 1449 | //removedtotest// delete his2D; |
b832d719 | 1450 | // |
1451 | pTPCgain->GetDeDxHisto()->GetAxis(5)->SetRangeUser(0,3); // A side | |
814d192f | 1452 | if (pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_a_0_1") && !fgForceTHnSparse) { |
1453 | his2D = dynamic_cast<TH2*>(pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_a_0_1")->Clone()); | |
1454 | } else { | |
1455 | his2D = pTPCgain->GetDeDxHisto()->Projection(0,1); | |
1456 | } | |
26a35193 | 1457 | if(!his2D) return 4; |
1458 | ||
b832d719 | 1459 | for(Int_t i = 0; i < 18; i++) { // loop over sectors; correct mapping to be checked! |
69878f59 | 1460 | //TH1* his1D=0; |
b832d719 | 1461 | Float_t phiLow = -TMath::Pi() + i*(20./360.)*(2*TMath::Pi()); |
1462 | Float_t phiUp = -TMath::Pi() + (i+1)*(20./360.)*(2*TMath::Pi()); | |
814d192f | 1463 | //pTPCgain->GetDeDxHisto()->GetAxis(1)->SetRangeUser(phiLow,phiUp); |
1464 | his2D->GetXaxis()->SetRangeUser(phiLow,phiUp); | |
1465 | //his1D = pTPCgain->GetDeDxHisto()->Projection(0); | |
1466 | his1D = his2D->ProjectionY(); | |
b832d719 | 1467 | TF1 gausFunc("gausFunc","gaus"); |
1468 | his1D->Fit(&gausFunc, "QN"); | |
1469 | meanMIPvsSector(i+18) = gausFunc.GetParameter(1); | |
1470 | sector(i+18)=i+18; | |
814d192f | 1471 | //removedtotest// delete his1D; |
b832d719 | 1472 | } |
814d192f | 1473 | //removedtotest// delete his2D; |
b832d719 | 1474 | // |
1475 | printf("Gain QA report\n"); | |
1476 | printf("MIP mean\t%f\n",meanMIP); | |
1477 | printf("MIP resolution\t%f\n",resolutionMIP); | |
1478 | printf("MIPslopeA\t%f\n",attachSlopeA); | |
1479 | printf("MIPslopeC\t%f\n",attachSlopeC); | |
814d192f | 1480 | // |
1481 | ||
b832d719 | 1482 | (*pcstream)<<"tpcQA"<< |
1483 | "MIPattachSlopeC="<<attachSlopeC<< | |
1484 | "MIPattachSlopeA="<<attachSlopeA<< | |
1485 | "resolutionMIP="<<resolutionMIP<< | |
1486 | "meanMIPvsSector.="<<&meanMIPvsSector<< | |
1487 | "sector.="<<§or<< | |
1488 | "meanMIP="<<meanMIP; | |
1489 | ||
1490 | return 0; | |
1491 | } | |
1492 | ||
1493 | //_____________________________________________________________________________ | |
70f4b25f | 1494 | Int_t AliTPCPerformanceSummary::AnalyzeEvent(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream) |
b832d719 | 1495 | { |
1496 | // | |
1497 | // Analyse Primary Vertex Distribution and Multiplicities | |
1498 | // | |
1499 | if (!pcstream) return 1; | |
1500 | if (!pTPC) return 1; | |
1501 | // | |
1502 | // | |
1503 | // | |
1504 | static Double_t meanVertX=0; | |
1505 | static Double_t rmsVertX=0; | |
1506 | static Double_t meanVertY=0; | |
1507 | static Double_t rmsVertY=0; | |
1508 | static Double_t meanVertZ=0; | |
1509 | static Double_t rmsVertZ=0; | |
1510 | static Double_t vertStatus=0; | |
1511 | static Double_t meanMult=0; | |
1512 | static Double_t rmsMult=0; | |
1513 | static Double_t meanMultPos=0; | |
1514 | static Double_t rmsMultPos=0; | |
1515 | static Double_t meanMultNeg=0; | |
1516 | static Double_t rmsMultNeg=0; | |
1517 | static Double_t vertAll = 0; | |
1518 | static Double_t vertOK = 0; | |
1519 | ||
1520 | TH1* his1D=0; | |
820afb27 | 1521 | TH1* hc=0; |
28bb9d1f | 1522 | if (pTPC->GetHistos()->FindObject("h_tpc_event_6") && !fgForceTHnSparse) { |
1523 | his1D = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_6")->Clone()); | |
0cb93e70 | 1524 | } else { |
1525 | his1D = pTPC->GetTPCEventHisto()->Projection(6); | |
1526 | } | |
26a35193 | 1527 | if(!his1D) return 1; |
1528 | ||
b832d719 | 1529 | vertAll = his1D->GetEntries(); |
0cb93e70 | 1530 | vertOK = his1D->GetBinContent(2); |
b832d719 | 1531 | if (vertAll>=1) { |
1532 | vertStatus = vertOK / vertAll; | |
1533 | } | |
0cb93e70 | 1534 | |
1535 | delete his1D; | |
1536 | ||
1537 | pTPC->GetTPCEventHisto()->GetAxis(6)->SetRange(2,2); | |
1538 | ||
28bb9d1f | 1539 | if (pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_0") && !fgForceTHnSparse) { |
1540 | his1D = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_0")->Clone()); | |
0cb93e70 | 1541 | } else { |
1542 | his1D = pTPC->GetTPCEventHisto()->Projection(0); | |
1543 | } | |
26a35193 | 1544 | if(!his1D) return 1; |
1545 | ||
b832d719 | 1546 | meanVertX = his1D->GetMean(); |
1547 | rmsVertX = his1D->GetRMS(); | |
1548 | delete his1D; | |
1549 | ||
0cb93e70 | 1550 | |
1551 | ||
1552 | ||
28bb9d1f | 1553 | if (pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_1") && !fgForceTHnSparse) { |
1554 | his1D = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_1")->Clone()); | |
0cb93e70 | 1555 | } else { |
1556 | his1D = pTPC->GetTPCEventHisto()->Projection(1); | |
1557 | } | |
26a35193 | 1558 | if(!his1D) return 1; |
1559 | ||
b832d719 | 1560 | meanVertY = his1D->GetMean(); |
1561 | rmsVertY = his1D->GetRMS(); | |
1562 | delete his1D; | |
1563 | ||
0cb93e70 | 1564 | |
28bb9d1f | 1565 | if (pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_2") && !fgForceTHnSparse) { |
820afb27 | 1566 | hc = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_2")); |
1567 | if(!hc) return 1; | |
1568 | //his1D = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_2")->Clone()); | |
1569 | his1D = (TH1*)hc->Clone(); | |
0cb93e70 | 1570 | } else { |
1571 | his1D = pTPC->GetTPCEventHisto()->Projection(2); | |
820afb27 | 1572 | } |
26a35193 | 1573 | if(!his1D) return 1; |
1574 | ||
820afb27 | 1575 | meanVertZ = his1D->GetMean(); |
b832d719 | 1576 | rmsVertZ = his1D->GetRMS(); |
1577 | delete his1D; | |
1578 | ||
0cb93e70 | 1579 | |
28bb9d1f | 1580 | if (pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_3") && !fgForceTHnSparse) { |
820afb27 | 1581 | hc = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_3")); |
1582 | if(!hc) return 1; | |
1583 | //his1D = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_3")->Clone()); | |
1584 | his1D = (TH1*)hc->Clone(); | |
0cb93e70 | 1585 | } else { |
1586 | his1D = pTPC->GetTPCEventHisto()->Projection(3); | |
1587 | } | |
26a35193 | 1588 | if(!his1D) return 1; |
1589 | ||
b832d719 | 1590 | meanMult = his1D->GetMean(); |
1591 | rmsMult = his1D->GetRMS(); | |
1592 | delete his1D; | |
1593 | ||
0cb93e70 | 1594 | |
28bb9d1f | 1595 | if (pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_4") && !fgForceTHnSparse) { |
1596 | his1D = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_4")->Clone()); | |
0cb93e70 | 1597 | } else { |
1598 | his1D = pTPC->GetTPCEventHisto()->Projection(4); | |
1599 | } | |
26a35193 | 1600 | if(!his1D) return 1; |
1601 | ||
b832d719 | 1602 | meanMultPos = his1D->GetMean(); |
1603 | rmsMultPos = his1D->GetRMS(); | |
1604 | delete his1D; | |
1605 | ||
28bb9d1f | 1606 | if (pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_5") && !fgForceTHnSparse) { |
1607 | his1D = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_5")->Clone()); | |
0cb93e70 | 1608 | } else { |
1609 | his1D = pTPC->GetTPCEventHisto()->Projection(5); | |
1610 | } | |
26a35193 | 1611 | if(!his1D) return 1; |
1612 | ||
b832d719 | 1613 | meanMultNeg = his1D->GetMean(); |
1614 | rmsMultNeg = his1D->GetRMS(); | |
1615 | delete his1D; | |
1616 | ||
0cb93e70 | 1617 | pTPC->GetTPCEventHisto()->GetAxis(6)->SetRange(1,2); |
b832d719 | 1618 | // |
1619 | (*pcstream)<<"tpcQA"<< | |
1620 | "meanVertX="<<meanVertX<< | |
1621 | "rmsVertX="<<rmsVertX<< | |
1622 | "meanVertY="<<meanVertY<< | |
1623 | "rmsVertY="<<rmsVertY<< | |
1624 | "meanVertZ="<<meanVertZ<< | |
1625 | "rmsVertZ="<<rmsVertZ<< | |
1626 | "vertStatus="<<vertStatus<< | |
1627 | "vertAll="<<vertAll<< | |
1628 | "vertOK="<<vertOK<< | |
1629 | "meanMult="<<meanMult<< | |
1630 | "rmsMult="<<rmsMult<< | |
1631 | "meanMultPos="<<meanMultPos<< | |
1632 | "rmsMultPos="<<rmsMultPos<< | |
1633 | "meanMultNeg="<<meanMultNeg<< | |
1634 | "rmsMultNeg="<<rmsMultNeg; | |
1635 | ||
1636 | return 0; | |
1637 | } | |
f69eb048 | 1638 | |
1639 | //_____________________________________________________________________________ | |
70f4b25f | 1640 | Int_t AliTPCPerformanceSummary::AnalyzePt(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream) |
10d5d625 | 1641 | { |
1642 | // | |
1643 | // Analyse DCA R imperfections for positive particles | |
1644 | // | |
1645 | ||
1646 | if (!pcstream) return 256; | |
1647 | if (!pTPC) return 256; | |
1648 | ||
1649 | // variables: | |
1650 | static Double_t meanPtAPos = 0; | |
1651 | static Double_t mediumPtAPos = 0; | |
1652 | static Double_t highPtAPos = 0; | |
1653 | static Double_t meanPtCPos = 0; | |
1654 | static Double_t mediumPtCPos = 0; | |
1655 | static Double_t highPtCPos = 0; | |
1656 | ||
1657 | static Double_t meanPtANeg = 0; | |
1658 | static Double_t mediumPtANeg = 0; | |
1659 | static Double_t highPtANeg = 0; | |
1660 | static Double_t meanPtCNeg = 0; | |
1661 | static Double_t mediumPtCNeg = 0; | |
1662 | static Double_t highPtCNeg = 0; | |
1663 | ||
70f4b25f | 1664 | TH3* his3D1=0; |
1665 | TH3* his3D2=0; | |
10d5d625 | 1666 | |
1667 | if (pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_7")) { | |
1668 | ||
70f4b25f | 1669 | his3D1 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_7")); |
26a35193 | 1670 | if(!his3D1) return 256; |
10d5d625 | 1671 | |
70f4b25f | 1672 | his3D1->GetYaxis()->SetRangeUser(0.1,0.8); |
10d5d625 | 1673 | |
70f4b25f | 1674 | his3D1->GetZaxis()->SetRangeUser(0.25,10); |
1675 | meanPtAPos = his3D1->GetMean(3); | |
1676 | his3D1->GetZaxis()->SetRangeUser(2,5); | |
1677 | mediumPtAPos = his3D1->GetMean(3); | |
1678 | his3D1->GetZaxis()->SetRangeUser(5,10); | |
1679 | highPtAPos = his3D1->GetMean(3); | |
10d5d625 | 1680 | |
70f4b25f | 1681 | his3D1->GetYaxis()->SetRangeUser(-0.8,-0.1); |
10d5d625 | 1682 | |
70f4b25f | 1683 | his3D1->GetZaxis()->SetRangeUser(0.25,10); |
1684 | meanPtCPos = his3D1->GetMean(3); | |
1685 | his3D1->GetZaxis()->SetRangeUser(2,5); | |
1686 | mediumPtCPos = his3D1->GetMean(3); | |
1687 | his3D1->GetZaxis()->SetRangeUser(5,10); | |
1688 | highPtCPos = his3D1->GetMean(3); | |
10d5d625 | 1689 | |
70f4b25f | 1690 | his3D1->GetYaxis()->SetRangeUser(-1,1); |
1691 | his3D1->GetZaxis()->SetRangeUser(0.25,10); | |
10d5d625 | 1692 | } |
1693 | ||
1694 | ||
1695 | if (pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_3_5_7")) { | |
1696 | ||
70f4b25f | 1697 | his3D2 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_3_5_7")); |
26a35193 | 1698 | if(!his3D2) return 256; |
10d5d625 | 1699 | |
70f4b25f | 1700 | his3D2->GetYaxis()->SetRangeUser(0.1,0.8); |
1701 | ||
1702 | his3D2->GetZaxis()->SetRangeUser(0.25,10); | |
1703 | meanPtANeg = his3D2->GetMean(3); | |
1704 | his3D2->GetZaxis()->SetRangeUser(2,5); | |
1705 | mediumPtANeg = his3D2->GetMean(3); | |
1706 | his3D2->GetZaxis()->SetRangeUser(5,10); | |
1707 | highPtANeg = his3D2->GetMean(3); | |
10d5d625 | 1708 | |
70f4b25f | 1709 | his3D2->GetYaxis()->SetRangeUser(-0.8,-0.1); |
1710 | ||
1711 | his3D2->GetZaxis()->SetRangeUser(0.25,10); | |
1712 | meanPtCNeg = his3D2->GetMean(3); | |
1713 | his3D2->GetZaxis()->SetRangeUser(2,5); | |
1714 | mediumPtCNeg = his3D2->GetMean(3); | |
1715 | his3D2->GetZaxis()->SetRangeUser(5,10); | |
1716 | highPtCNeg = his3D2->GetMean(3); | |
10d5d625 | 1717 | |
70f4b25f | 1718 | his3D2->GetYaxis()->SetRangeUser(-1,1); |
1719 | his3D2->GetZaxis()->SetRangeUser(0.25,10); | |
10d5d625 | 1720 | } |
1721 | ||
1722 | ||
1723 | ||
1724 | // dump values | |
1725 | // | |
1726 | (*pcstream)<<"tpcQA"<< | |
1727 | "meanPtAPos="<< meanPtAPos<< | |
1728 | "mediumPtAPos="<< mediumPtAPos<< | |
1729 | "highPtAPos="<< highPtAPos<< | |
1730 | // | |
1731 | "meanPtCPos="<< meanPtCPos<< | |
1732 | "mediumPtCPos="<< mediumPtCPos<< | |
1733 | "highPtCPos="<< highPtCPos<< | |
1734 | // | |
1735 | "meanPtANeg="<< meanPtANeg<< | |
1736 | "mediumPtANeg="<< mediumPtANeg<< | |
1737 | "highPtANeg="<< highPtANeg<< | |
1738 | // | |
1739 | "meanPtCNeg="<< meanPtCNeg<< | |
1740 | "mediumPtCNeg="<< mediumPtCNeg<< | |
1741 | "highPtCNeg="<< highPtCNeg; | |
1742 | ||
1743 | ||
1744 | return 0; | |
1745 | } | |
1746 | ||
1747 | //_____________________________________________________________________________ | |
1748 | ||
70f4b25f | 1749 | Int_t AliTPCPerformanceSummary::AnalyzeChargeOverPt(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream){ |
10d5d625 | 1750 | // |
1751 | // Analyse DCA R imperfections for positive particles | |
1752 | // | |
1753 | ||
1754 | if (!pcstream) return 512; | |
1755 | if (!pTPC) return 512; | |
1756 | ||
1757 | // variables: | |
1758 | static Double_t qOverPt = 0; | |
1759 | static Double_t qOverPtA = 0; | |
1760 | static Double_t qOverPtC = 0; | |
1761 | ||
1762 | TH2* his2D=0; | |
70f4b25f | 1763 | TH1* his1D1=0; |
1764 | TH1* his1D2=0; | |
1765 | TH1* his1D3=0; | |
10d5d625 | 1766 | TF1 *fp1 = new TF1("fp1","pol2",-1.0,1.0); |
1767 | TF1 *fp2 = new TF1("fp2","pol2",-1.0,1.0); | |
1768 | TF1 *fp3 = new TF1("fp3","pol2",-1.0,1.0); | |
1769 | ||
1770 | if (pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_5_8")) { | |
1771 | ||
1772 | his2D = dynamic_cast<TH2*>(pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_5_8")); | |
26a35193 | 1773 | if(!his2D) return 512; |
10d5d625 | 1774 | |
70f4b25f | 1775 | his1D1 = his2D->ProjectionX(); |
1776 | his1D1->Fit(fp1,"R"); | |
10d5d625 | 1777 | if(fp1->GetParameter(2)!=0){ |
1778 | qOverPt = (-1.0)*(fp1->GetParameter(1)/(2.0*fp1->GetParameter(2))); | |
1779 | } | |
1780 | delete fp1; | |
70f4b25f | 1781 | delete his1D1; |
10d5d625 | 1782 | |
1783 | his2D->GetYaxis()->SetRangeUser(0.1,0.8); | |
70f4b25f | 1784 | his1D2 = his2D->ProjectionX(); |
1785 | his1D2->Fit(fp2,"R"); | |
10d5d625 | 1786 | if(fp2->GetParameter(2)!=0) |
1787 | qOverPtA = (-1.0)*(fp2->GetParameter(1)/(2.0*fp2->GetParameter(2))); | |
1788 | delete fp2; | |
70f4b25f | 1789 | delete his1D2; |
10d5d625 | 1790 | |
1791 | his2D->GetYaxis()->SetRangeUser(-0.8,-0.1); | |
70f4b25f | 1792 | his1D3 = his2D->ProjectionX(); |
1793 | his1D3->Fit(fp3,"R"); | |
10d5d625 | 1794 | if(fp3->GetParameter(2)!=0) |
1795 | qOverPtC = (-1.0)*(fp3->GetParameter(1)/(2.0*fp3->GetParameter(2))); | |
1796 | delete fp3; | |
70f4b25f | 1797 | delete his1D3; |
10d5d625 | 1798 | |
1799 | his2D->GetYaxis()->SetRangeUser(-1.0,1.0); | |
1800 | } | |
1801 | ||
1802 | ||
1803 | (*pcstream)<<"tpcQA"<< | |
1804 | "qOverPt="<< qOverPt<< | |
1805 | "qOverPtA="<< qOverPtA<< | |
1806 | "qOverPtC="<< qOverPtC; | |
1807 | ||
1808 | return 0; | |
1809 | } | |
1810 | ||
1833a193 | 1811 | Int_t AliTPCPerformanceSummary::AnalyzeMatch(const AliPerformanceMatch* pMatch, TTreeSRedirector* const pcstream) |
f69eb048 | 1812 | { |
1833a193 | 1813 | /* if ((pMatch == 0) or (0 == pcstream)) { printf("this will not work anyway..."); } |
1814 | printf("funtion not implemented");*/ | |
1815 | ||
1816 | if (!pcstream) return 1024; | |
1817 | if (!pMatch) return 1024; | |
1818 | static Double_t tpcItsMatchA = 0; | |
1819 | static Double_t tpcItsMatchHighPtA = 0; | |
1820 | static Double_t tpcItsMatchC = 0; | |
1821 | static Double_t tpcItsMatchHighPtC = 0; | |
1822 | ||
1823 | TH2 *h2D = 0; | |
1824 | TH2 *h2D1 = 0; | |
1825 | if(pMatch->GetHistos()->FindObject("h_tpc_match_trackingeff_all_2_3") && | |
1826 | pMatch->GetHistos()->FindObject("h_tpc_match_trackingeff_tpc_2_3")){ | |
1827 | h2D = dynamic_cast<TH2*>(pMatch->GetHistos()->FindObject("h_tpc_match_trackingeff_all_2_3")); | |
1828 | h2D1 = dynamic_cast<TH2*>(pMatch->GetHistos()->FindObject("h_tpc_match_trackingeff_tpc_2_3")); | |
8f5423ae | 1829 | |
1830 | if(!h2D) return 4; | |
1831 | if(!h2D1) return 4; | |
1833a193 | 1832 | |
1833 | h2D->GetXaxis()->SetRangeUser(0,1.5); | |
1834 | h2D1->GetXaxis()->SetRangeUser(0,1.5); | |
1835 | ||
1836 | Double_t entries,entries1; | |
1837 | entries = h2D->GetEffectiveEntries(); | |
1838 | entries1 = h2D1->GetEffectiveEntries(); | |
1839 | if(entries > 0) | |
1840 | tpcItsMatchA = entries1/entries; | |
1841 | ||
9f5fbaba | 1842 | h2D->GetYaxis()->SetRangeUser(4.01,20.); |
1843 | h2D1->GetYaxis()->SetRangeUser(4.01,20.); | |
1833a193 | 1844 | entries = h2D->GetEffectiveEntries(); |
1845 | entries1 = h2D1->GetEffectiveEntries(); | |
1846 | if(entries > 0) | |
9f5fbaba | 1847 | tpcItsMatchHighPtA = entries1/entries; |
1833a193 | 1848 | |
1849 | ||
9f5fbaba | 1850 | h2D->GetXaxis()->SetRangeUser(-1.5,-0.01); |
1851 | h2D1->GetXaxis()->SetRangeUser(-1.5,-0.01); | |
1833a193 | 1852 | h2D->GetYaxis()->SetRangeUser(0.0,20.); |
1853 | h2D1->GetYaxis()->SetRangeUser(0.0,20.); | |
1854 | ||
1855 | entries = h2D->GetEffectiveEntries(); | |
1856 | entries1 = h2D1->GetEffectiveEntries(); | |
1857 | if(entries > 0) | |
1858 | tpcItsMatchC = entries1/entries; | |
1859 | ||
9f5fbaba | 1860 | h2D->GetYaxis()->SetRangeUser(4.01,20.); |
1861 | h2D1->GetYaxis()->SetRangeUser(4.01,20.); | |
1833a193 | 1862 | entries = h2D->GetEffectiveEntries(); |
1863 | entries1 = h2D1->GetEffectiveEntries(); | |
1864 | if(entries > 0) | |
1865 | tpcItsMatchHighPtC = entries1/entries; | |
1866 | ||
1867 | h2D->GetXaxis()->SetRangeUser(-1.5,1.5); | |
1868 | h2D1->GetXaxis()->SetRangeUser(-1.5,1.5); | |
1869 | h2D->GetYaxis()->SetRangeUser(0.0,20.); | |
1870 | h2D1->GetYaxis()->SetRangeUser(0.0,20.); | |
1871 | // delete h2D; | |
1872 | // delete h2D1; | |
1873 | } | |
1874 | ||
1875 | (*pcstream)<<"tpcQA"<< | |
1876 | "tpcItsMatchA="<< tpcItsMatchA<< | |
1877 | "tpcItsMatchHighPtA="<< tpcItsMatchHighPtA<< | |
1878 | "tpcItsMatchC="<< tpcItsMatchC<< | |
1879 | "tpcItsMatchHighPtC="<< tpcItsMatchHighPtC; | |
1880 | ||
1881 | return 0; | |
1882 | } | |
1883 | ||
1884 | Int_t AliTPCPerformanceSummary::AnalyzePull(const AliPerformanceMatch* pPull, TTreeSRedirector* const pcstream) | |
1885 | { | |
1886 | /* if ((pPull == 0) or (0 == pcstream)) { printf("this will not work anyway..."); } | |
1887 | printf("funtion not implemented");*/ | |
1888 | ||
1889 | if (!pcstream) return 2048; | |
1890 | if (!pPull) return 2048; | |
1891 | static Double_t phiPull = 0; | |
1892 | static Double_t phiPullHighPt = 0; | |
1893 | static Double_t ptPull = 0; | |
1894 | static Double_t ptPullHighPt = 0; | |
1895 | static Double_t yPull = 0; | |
1896 | static Double_t yPullHighPt = 0; | |
1897 | static Double_t zPull = 0; | |
1898 | static Double_t zPullHighPt = 0; | |
1899 | static Double_t lambdaPull = 0; | |
1900 | static Double_t lambdaPullHighPt = 0; | |
1901 | ||
1902 | TH2 *h2D1 = 0; | |
1903 | if(pPull->GetHistos()->FindObject("h_tpc_match_pull_2_7")){ | |
1904 | h2D1 = dynamic_cast<TH2*>(pPull->GetHistos()->FindObject("h_tpc_match_pull_2_7")); | |
8f5423ae | 1905 | if(!h2D1) return 4; |
1833a193 | 1906 | phiPull = h2D1->GetMean(2); |
1907 | h2D1->SetAxisRange(0.0,1.0/5.0,"X"); | |
1908 | phiPullHighPt = h2D1->GetMean(2); | |
1909 | h2D1->SetAxisRange(0.0,10.0,"X"); | |
1910 | // delete h2D1; | |
1911 | } | |
1912 | ||
1913 | TH2 *h2D2 = 0; | |
1914 | if(pPull->GetHistos()->FindObject("h_tpc_match_pull_4_7")){ | |
1915 | h2D2 = dynamic_cast<TH2*>(pPull->GetHistos()->FindObject("h_tpc_match_pull_4_7")); | |
8f5423ae | 1916 | if(!h2D2) return 4; |
1833a193 | 1917 | ptPull = h2D2->GetMean(2); |
1918 | ||
1919 | h2D2->SetAxisRange(0.0,1.0/5.0,"X"); | |
1920 | ptPullHighPt = h2D2->GetMean(2); | |
1921 | h2D2->SetAxisRange(0.0,10.0,"X"); | |
1922 | // delete h2D2; | |
1923 | } | |
1924 | ||
1925 | TH2 *h2D3 = 0; | |
1926 | if(pPull->GetHistos()->FindObject("h_tpc_match_pull_0_7")){ | |
1927 | h2D3 = dynamic_cast<TH2*>(pPull->GetHistos()->FindObject("h_tpc_match_pull_0_7")); | |
8f5423ae | 1928 | if(!h2D3) return 4; |
1833a193 | 1929 | yPull = h2D3->GetMean(2); |
1930 | ||
1931 | h2D3->SetAxisRange(0.0,1.0/5.0,"X"); | |
1932 | yPullHighPt = h2D3->GetMean(2); | |
1933 | h2D3->SetAxisRange(0.0,10.0,"X"); | |
1934 | // delete h2D3; | |
1935 | } | |
1936 | ||
1937 | TH2 *h2D4 = 0; | |
1938 | if(pPull->GetHistos()->FindObject("h_tpc_match_pull_1_7")){ | |
1939 | h2D4 = dynamic_cast<TH2*>(pPull->GetHistos()->FindObject("h_tpc_match_pull_1_7")); | |
8f5423ae | 1940 | if(!h2D4) return 4; |
1833a193 | 1941 | zPull = h2D4->GetMean(2); |
1942 | ||
1943 | h2D4->SetAxisRange(0.0,1.0/5.0,"X"); | |
1944 | zPullHighPt = h2D4->GetMean(2); | |
1945 | h2D4->SetAxisRange(0.0,10.0,"X"); | |
1946 | // delete h2D4; | |
1947 | } | |
1948 | ||
1949 | TH2 *h2D5 = 0; | |
1950 | if(pPull->GetHistos()->FindObject("h_tpc_match_pull_3_7")){ | |
1951 | h2D5 = dynamic_cast<TH2*>(pPull->GetHistos()->FindObject("h_tpc_match_pull_3_7")); | |
8f5423ae | 1952 | if(!h2D5) return 4; |
1833a193 | 1953 | lambdaPull = h2D5->GetMean(2); |
1954 | ||
1955 | h2D5->SetAxisRange(0.0,1.0/5.0,"X"); | |
1956 | lambdaPullHighPt = h2D5->GetMean(2); | |
1957 | h2D5->SetAxisRange(0.0,10.0,"X"); | |
1958 | // delete h2D5; | |
1959 | } | |
1960 | ||
1961 | (*pcstream)<<"tpcQA"<< | |
1962 | "phiPull="<< phiPull<< | |
1963 | "phiPullHighPt="<< phiPullHighPt<< | |
1964 | "ptPull="<< ptPull<< | |
1965 | "ptPullHighPt="<< ptPullHighPt<< | |
1966 | "yPull="<< yPull<< | |
1967 | "yPullHighPt="<< yPullHighPt<< | |
1968 | "zPull="<< zPull<< | |
1969 | "zPullHighPt="<< zPullHighPt<< | |
1970 | "lambdaPull="<< lambdaPull<< | |
1971 | "lambdaPullHighPt="<< lambdaPullHighPt; | |
1972 | ||
1973 | return 0; | |
f69eb048 | 1974 | } |
9f5fbaba | 1975 | Int_t AliTPCPerformanceSummary::AnalyzeConstrain(const AliPerformanceMatch* pConstrain, TTreeSRedirector* pcstream) |
1976 | { | |
1977 | if (!pcstream) return 5126; | |
1978 | if (!pConstrain) return 5126; | |
1979 | ||
1980 | TH3* his3D=0; | |
1981 | static Double_t tpcConstrainPhiA = 0; | |
1982 | static Double_t tpcConstrainPhiC = 0; | |
1983 | ||
1984 | if (pConstrain->GetHistos()->FindObject("h_tpc_constrain_tpc_0_2_3")) { | |
1985 | ||
1986 | his3D = dynamic_cast<TH3*>(pConstrain->GetHistos()->FindObject("h_tpc_constrain_tpc_0_2_3"));//phi pull:pt:eta | |
1987 | if(!his3D) return 5126; | |
1988 | ||
1989 | his3D->GetZaxis()->SetRangeUser(0.0,1.0); | |
1990 | tpcConstrainPhiA = his3D->GetMean(1); | |
1991 | his3D->GetZaxis()->SetRangeUser(-1.0,-0.001); | |
1992 | tpcConstrainPhiC = his3D->GetMean(1); | |
1993 | } | |
1994 | ||
1995 | (*pcstream)<<"tpcQA"<< | |
1996 | "tpcConstrainPhiA="<<tpcConstrainPhiA << | |
1997 | "tpcConstrainPhiC="<< tpcConstrainPhiC; | |
1998 | ||
1999 | return 0; | |
2000 | } | |
ac617c68 | 2001 | |
2002 | //_____________________________________________________________________________ | |
2003 | Int_t AliTPCPerformanceSummary::AnalyzeQAPosNegDpT(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream) | |
2004 | { | |
2005 | //function which plot 1/Pt for negative and | |
2006 | //positive particles | |
2007 | ||
2008 | if (!pcstream) return 512; | |
2009 | if (!pTPC) return 512; | |
2010 | ||
2011 | TH3D* pos3=0; | |
2012 | TH3D* neg3=0; | |
2013 | TH1D* pos=0; | |
2014 | TH1D* neg=0; | |
2015 | TH1D* posC=0; | |
2016 | TH1D* negC=0; | |
2017 | TH1D* posA=0; | |
2018 | TH1D* negA=0; | |
2019 | static Double_t deltaPtC = 0; | |
2020 | static Double_t deltaPtchi2C = 0; | |
2021 | static Double_t slopeC = 0; | |
2022 | static Double_t deltaPtA = 0; | |
2023 | static Double_t deltaPtchi2A = 0; | |
2024 | static Double_t slopeA = 0; | |
2025 | static Double_t deltaPt = 0; | |
2026 | static Double_t deltaPtchi2 = 0; | |
2027 | static Double_t slope = 0; | |
2028 | static Double_t deltaPt_Err = 0; | |
2029 | static Double_t deltaPtA_Err = 0; | |
2030 | static Double_t deltaPtC_Err = 0; | |
2031 | ||
2032 | ||
2033 | //C side | |
2034 | ||
2035 | if(pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_0_5_7")) | |
2036 | { | |
2037 | pos3 = dynamic_cast<TH3D*>(pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_0_5_7")); | |
2038 | if(!pos3) return 512; | |
2039 | ||
2040 | pos = pos3->ProjectionZ("pos",71,-1,6,25); | |
2041 | posC = pos3->ProjectionZ("posC",71,-1,6,15); | |
2042 | posA = pos3->ProjectionZ("posA",71,-1,16,25); | |
2043 | } | |
2044 | ||
2045 | if(pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_0_5_7")){ | |
2046 | neg3 = dynamic_cast<TH3D*>(pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_0_5_7")); | |
2047 | if(!neg3) return 512; | |
2048 | ||
2049 | neg = neg3->ProjectionZ("neg",71,-1,6,25); | |
2050 | negC = neg3->ProjectionZ("negC",71,-1,6,15); | |
2051 | negA = neg3->ProjectionZ("negA",71,-1,16,25); | |
2052 | } | |
2053 | ||
004e3919 | 2054 | if(!pos) return 512; |
2055 | if(!neg) return 512; | |
2056 | if(!posA) return 512; | |
2057 | if(!negA) return 512; | |
2058 | if(!posC) return 512; | |
2059 | if(!negC) return 512; | |
ac617c68 | 2060 | |
2061 | pos->Sumw2(); | |
2062 | neg->Sumw2(); | |
2063 | posA->Sumw2(); | |
2064 | negA->Sumw2(); | |
2065 | posC->Sumw2(); | |
2066 | negC->Sumw2(); | |
2067 | ||
2068 | pos->Scale(1.,"width"); | |
2069 | neg->Scale(1.,"width"); | |
2070 | posA->Scale(1.,"width"); | |
2071 | negA->Scale(1.,"width"); | |
2072 | posC->Scale(1.,"width"); | |
2073 | negC->Scale(1.,"width"); | |
2074 | ||
2075 | //both sides | |
2076 | ||
2077 | TF1 fpt("fpt","[1]*exp(-1/((1/x))*[0])",0.1,10); | |
2078 | TF1 fpt2("fpt2","[1]*exp(-1/((1/x))*[0])",0.1,10); | |
5a188b89 | 2079 | fpt.SetParLimits(0,0.1,2.0); |
2080 | fpt2.SetParLimits(0,0.1,2.0); | |
2081 | fpt.SetParameters(0.5,1.0); | |
2082 | fpt2.SetParameters(0.5,1.0); | |
ac617c68 | 2083 | pos->Fit(&fpt,"","",1,4); pos->Fit(&fpt,"","",1,4); pos->Fit(&fpt,"","",1,4); |
2084 | neg->Fit(&fpt2,"","",1,4); neg->Fit(&fpt2,"","",1,4); neg->Fit(&fpt2,"","",1,4); | |
2085 | ||
2086 | slope = (fpt.GetParameter(0)+fpt2.GetParameter(0))/2.; | |
2087 | ||
2088 | TH1D* ratio = new TH1D(*pos); | |
2089 | ratio->Divide(neg); | |
2090 | ||
2091 | ratio->Draw(); | |
2092 | TF1 fptRatio("fptratio","[2]*exp(-1/((1/x)+[1])*[0])/exp(-1/((1/x)-[1])*[0])",0.1,10); | |
5a188b89 | 2093 | fptRatio.SetParLimits(0,0.1,2.0); |
2094 | fptRatio.SetParLimits(1,-0.1,0.1); | |
2095 | fptRatio.SetParameters(0.5,0.006,1.0); | |
ac617c68 | 2096 | fptRatio.FixParameter(0,slope); |
2097 | fptRatio.Draw(); | |
2098 | ratio->Fit(&fptRatio,"","",1,4); ratio->Fit(&fptRatio,"","",1,4); | |
2099 | ratio->Fit(&fptRatio,"","",1,4); | |
2100 | ||
2101 | deltaPt = fptRatio.GetParameter(1); | |
2102 | deltaPtchi2 = fptRatio.GetChisquare(); | |
2103 | ||
2104 | //get the errors | |
2105 | deltaPt_Err = fptRatio.GetParError(1); | |
2106 | ||
2107 | ||
2108 | //A side | |
2109 | ||
2110 | TF1 fptA("fptA","[1]*exp(-1/((1/x))*[0])",0.1,10); | |
2111 | TF1 fpt2A("fpt2A","[1]*exp(-1/((1/x))*[0])",0.1,10); | |
5a188b89 | 2112 | fptA.SetParLimits(0,0.1,2.0); |
2113 | fpt2A.SetParLimits(0,0.1,2.0); | |
2114 | fptA.SetParameters(0.5,1.0); | |
2115 | fpt2A.SetParameters(0.5,1.0); | |
ac617c68 | 2116 | posA->Fit(&fptA,"","",1,4); posA->Fit(&fptA,"","",1,4); posA->Fit(&fptA,"","",1,4); |
2117 | negA->Fit(&fpt2A,"","",1,4); negA->Fit(&fpt2A,"","",1,4); negA->Fit(&fpt2A,"","",1,4); | |
2118 | ||
2119 | slopeA = (fptA.GetParameter(0)+fpt2A.GetParameter(0))/2.; | |
2120 | ||
2121 | TH1D* ratioA = new TH1D(*posA); | |
2122 | ratioA->Divide(negA); | |
2123 | ||
2124 | ratioA->Draw(); | |
2125 | TF1 fptRatioA("fptratioA","[2]*exp(-1/((1/x)+[1])*[0])/exp(-1/((1/x)-[1])*[0])",0.1,10); | |
5a188b89 | 2126 | fptRatioA.SetParLimits(0,0.1,2.0); |
2127 | fptRatioA.SetParLimits(1,-0.1,0.1); | |
ac617c68 | 2128 | fptRatioA.SetParameters(0.5,0.006,1); |
2129 | fptRatioA.FixParameter(0,slopeA); | |
2130 | fptRatioA.Draw(); | |
2131 | ratioA->Fit(&fptRatioA,"","",1,4); ratio->Fit(&fptRatioA,"","",1,4); | |
2132 | ratioA->Fit(&fptRatioA,"","",1,4); | |
2133 | ||
2134 | deltaPtA = fptRatioA.GetParameter(1); | |
2135 | deltaPtchi2A = fptRatioA.GetChisquare(); | |
2136 | ||
2137 | //get the errors | |
2138 | deltaPtA_Err = fptRatioA.GetParError(1); | |
2139 | ||
2140 | delete ratioA; | |
2141 | delete pos; | |
2142 | delete neg; | |
2143 | ||
2144 | ||
2145 | //C side | |
2146 | TF1 fptC("fptC","[1]*exp(-1/((1/x))*[0])",0.1,10); | |
2147 | TF1 fpt2C("fpt2C","[1]*exp(-1/((1/x))*[0])",0.1,10); | |
5a188b89 | 2148 | fptC.SetParLimits(0,0.1,2.0); |
2149 | fpt2C.SetParLimits(0,0.1,2.0); | |
2150 | fptC.SetParameters(0.5,1.0); | |
2151 | fpt2C.SetParameters(0.5,1.0); | |
ac617c68 | 2152 | posC->Fit(&fptC,"","",1,4); posC->Fit(&fptC,"","",1,4); posC->Fit(&fptC,"","",1,4); |
2153 | negC->Fit(&fpt2C,"","",1,4); negC->Fit(&fpt2C,"","",1,4); negC->Fit(&fpt2C,"","",1,4); | |
2154 | ||
2155 | slopeC = (fptC.GetParameter(0)+fpt2C.GetParameter(0))/2.; | |
2156 | ||
2157 | TH1D* ratioC = new TH1D(*posC); | |
2158 | ratioC->Divide(negC); | |
2159 | ||
2160 | ratioC->Draw(); | |
2161 | TF1 fptRatioC("fptratioC","[2]*exp(-1/((1/x)+[1])*[0])/exp(-1/((1/x)-[1])*[0])",0.1,10); | |
5a188b89 | 2162 | fptRatioC.SetParLimits(0,0.1,2.0); |
2163 | fptRatioC.SetParLimits(1,-0.1,0.1); | |
2164 | fptRatioC.SetParameters(0.5,0.006,1.0); | |
ac617c68 | 2165 | fptRatioC.FixParameter(0,slopeC); |
2166 | fptRatioC.Draw(); | |
2167 | ratioC->Fit(&fptRatioC,"","",1,4); ratio->Fit(&fptRatioC,"","",1,4); | |
2168 | ratioC->Fit(&fptRatioC,"","",1,4); | |
2169 | ||
2170 | deltaPtC = fptRatioC.GetParameter(1); | |
2171 | deltaPtchi2C = fptRatioC.GetChisquare(); | |
2172 | ||
2173 | //get the errors | |
2174 | deltaPtC_Err = fptRatioC.GetParError(1); | |
2175 | ||
2176 | ||
2177 | delete posC; | |
2178 | delete negC; | |
2179 | delete ratioC; | |
2180 | ||
2181 | (*pcstream)<<"tpcQA"<< | |
2182 | "deltaPt="<< deltaPt<< | |
2183 | "deltaPtchi2="<< deltaPtchi2<< | |
2184 | "deltaPtA="<< deltaPtA<< | |
2185 | "deltaPtchi2A="<< deltaPtchi2A<< | |
2186 | "deltaPtC="<< deltaPtC<< | |
2187 | "deltaPtchi2C="<< deltaPtchi2C<< | |
2188 | "deltaPt_Err="<< deltaPt_Err<< | |
2189 | "deltaPtA_Err="<< deltaPtA_Err<< | |
2190 | "deltaPtC_Err="<< deltaPtC_Err; | |
2191 | ||
2192 | return 0; | |
2193 | } | |
2194 | ||
2195 | //_____________________________________________________________________________ | |
2196 | Int_t AliTPCPerformanceSummary::AnalyzeQADCAFitParameter(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream) | |
2197 | { | |
2198 | ||
2199 | // | |
2200 | //function which retrieve DCA fit parameters | |
2201 | // | |
2202 | ||
2203 | if (!pcstream) return 16; | |
2204 | if (!pTPC) return 16; | |
2205 | ||
2206 | TH3* dcar_pos3=0; | |
2207 | TH3* dcaz_pos3=0; | |
2208 | TH3* dcar_neg3=0; | |
2209 | TH3* dcaz_neg3=0; | |
2210 | ||
2211 | static Double_t dcar_posA_0=0; | |
2212 | static Double_t dcar_posA_1=0; | |
2213 | static Double_t dcar_posA_2=0; | |
2214 | static Double_t dcar_posA_chi2=0; | |
2215 | static Double_t dcar_posA_0_Err=0; | |
2216 | static Double_t dcar_posA_1_Err=0; | |
2217 | static Double_t dcar_posA_2_Err=0; | |
2218 | ||
2219 | static Double_t dcar_posC_0=0; | |
2220 | static Double_t dcar_posC_1=0; | |
2221 | static Double_t dcar_posC_2=0; | |
2222 | static Double_t dcar_posC_chi2=0; | |
2223 | static Double_t dcar_posC_0_Err=0; | |
2224 | static Double_t dcar_posC_1_Err=0; | |
2225 | static Double_t dcar_posC_2_Err=0; | |
2226 | ||
2227 | static Double_t dcaz_posA_0=0; | |
2228 | static Double_t dcaz_posA_1=0; | |
2229 | static Double_t dcaz_posA_2=0; | |
2230 | static Double_t dcaz_posA_chi2=0; | |
2231 | static Double_t dcaz_posA_0_Err=0; | |
2232 | static Double_t dcaz_posA_1_Err=0; | |
2233 | static Double_t dcaz_posA_2_Err=0; | |
2234 | ||
2235 | static Double_t dcaz_posC_0=0; | |
2236 | static Double_t dcaz_posC_1=0; | |
2237 | static Double_t dcaz_posC_2=0; | |
2238 | static Double_t dcaz_posC_chi2=0; | |
2239 | static Double_t dcaz_posC_0_Err=0; | |
2240 | static Double_t dcaz_posC_1_Err=0; | |
2241 | static Double_t dcaz_posC_2_Err=0; | |
2242 | ||
2243 | static Double_t dcar_negA_0=0; | |
2244 | static Double_t dcar_negA_1=0; | |
2245 | static Double_t dcar_negA_2=0; | |
2246 | static Double_t dcar_negA_chi2=0; | |
2247 | static Double_t dcar_negA_0_Err=0; | |
2248 | static Double_t dcar_negA_1_Err=0; | |
2249 | static Double_t dcar_negA_2_Err=0; | |
2250 | ||
2251 | static Double_t dcar_negC_0=0; | |
2252 | static Double_t dcar_negC_1=0; | |
2253 | static Double_t dcar_negC_2=0; | |
2254 | static Double_t dcar_negC_chi2=0; | |
2255 | static Double_t dcar_negC_0_Err=0; | |
2256 | static Double_t dcar_negC_1_Err=0; | |
2257 | static Double_t dcar_negC_2_Err=0; | |
2258 | ||
2259 | static Double_t dcaz_negA_0=0; | |
2260 | static Double_t dcaz_negA_1=0; | |
2261 | static Double_t dcaz_negA_2=0; | |
2262 | static Double_t dcaz_negA_chi2=0; | |
2263 | static Double_t dcaz_negA_0_Err=0; | |
2264 | static Double_t dcaz_negA_1_Err=0; | |
2265 | static Double_t dcaz_negA_2_Err=0; | |
2266 | ||
2267 | static Double_t dcaz_negC_0=0; | |
2268 | static Double_t dcaz_negC_1=0; | |
2269 | static Double_t dcaz_negC_2=0; | |
2270 | static Double_t dcaz_negC_chi2=0; | |
2271 | static Double_t dcaz_negC_0_Err=0; | |
2272 | static Double_t dcaz_negC_1_Err=0; | |
2273 | static Double_t dcaz_negC_2_Err=0; | |
2274 | ||
2275 | if (pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_6")) { | |
2276 | dcar_pos3 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_6")); | |
2277 | } | |
2278 | ||
2279 | if (pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_6")) { | |
2280 | dcaz_pos3 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_4_5_6")); | |
2281 | } | |
2282 | ||
2283 | if (pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_6")) { | |
2284 | dcar_neg3 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_3_5_6")); | |
2285 | } | |
2286 | ||
2287 | if (pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_6")) { | |
2288 | dcaz_neg3 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_4_5_6")); | |
2289 | } | |
2290 | ||
2291 | TF1 fit("fit","[0]+[1]*cos(x)+[2]*sin(x)",0,7); | |
2292 | ||
2293 | dcar_pos3->GetYaxis()->SetRangeUser(0,0.99); | |
2294 | TH1* dcar_posA = (dynamic_cast<TH2*>(dcar_pos3->Project3D("xz_1")))->ProfileX(); | |
2295 | dcar_posA->Fit(&fit,"NQ"); | |
2296 | dcar_posA_0 = fit.GetParameter(0); | |
2297 | dcar_posA_1 = fit.GetParameter(1); | |
2298 | dcar_posA_2 = fit.GetParameter(2); | |
2299 | dcar_posA_chi2 = fit.GetChisquare(); | |
2300 | dcar_posA_0_Err = fit.GetParError(0); | |
2301 | dcar_posA_1_Err = fit.GetParError(1); | |
2302 | dcar_posA_2_Err = fit.GetParError(2); | |
2303 | ||
2304 | dcar_pos3->GetYaxis()->SetRangeUser(-1.0,-0.01); | |
2305 | TH1* dcar_posC = (dynamic_cast<TH2*>(dcar_pos3->Project3D("xz_2")))->ProfileX(); | |
2306 | dcar_posC->Fit(&fit,"NQ"); | |
2307 | dcar_posC_0 = fit.GetParameter(0); | |
2308 | dcar_posC_1 = fit.GetParameter(1); | |
2309 | dcar_posC_2 = fit.GetParameter(2); | |
2310 | dcar_posC_chi2 = fit.GetChisquare(); | |
2311 | dcar_posC_0_Err = fit.GetParError(0); | |
2312 | dcar_posC_1_Err = fit.GetParError(1); | |
2313 | dcar_posC_2_Err = fit.GetParError(2); | |
2314 | ||
2315 | dcaz_pos3->GetYaxis()->SetRangeUser(0,0.99); | |
2316 | TH1* dcaz_posA = (dynamic_cast<TH2*>(dcaz_pos3->Project3D("xz_3")))->ProfileX(); | |
2317 | dcaz_posA->Fit(&fit,"NQ"); | |
2318 | dcaz_posA_0 = fit.GetParameter(0); | |
2319 | dcaz_posA_1 = fit.GetParameter(1); | |
2320 | dcaz_posA_2 = fit.GetParameter(2); | |
2321 | dcaz_posA_chi2 = fit.GetChisquare(); | |
2322 | dcaz_posA_0_Err = fit.GetParError(0); | |
2323 | dcaz_posA_1_Err = fit.GetParError(1); | |
2324 | dcaz_posA_2_Err = fit.GetParError(2); | |
2325 | ||
2326 | dcaz_pos3->GetYaxis()->SetRangeUser(-1.0,-0.01); | |
2327 | TH1* dcaz_posC = (dynamic_cast<TH2*>(dcaz_pos3->Project3D("xz_4")))->ProfileX(); | |
2328 | dcaz_posC->Fit(&fit,"NQ"); | |
2329 | dcaz_posC_0 = fit.GetParameter(0); | |
2330 | dcaz_posC_1 = fit.GetParameter(1); | |
2331 | dcaz_posC_2 = fit.GetParameter(2); | |
2332 | dcaz_posC_chi2 = fit.GetChisquare(); | |
2333 | dcaz_posC_0_Err = fit.GetParError(0); | |
2334 | dcaz_posC_1_Err = fit.GetParError(1); | |
2335 | dcaz_posC_2_Err = fit.GetParError(2); | |
2336 | ||
2337 | ||
2338 | ||
2339 | dcar_neg3->GetYaxis()->SetRangeUser(0,0.99); | |
2340 | TH1* dcar_negA = (dynamic_cast<TH2*>(dcar_neg3->Project3D("xz_1")))->ProfileX(); | |
2341 | dcar_negA->Fit(&fit,"NQ"); | |
2342 | dcar_negA_0 = fit.GetParameter(0); | |
2343 | dcar_negA_1 = fit.GetParameter(1); | |
2344 | dcar_negA_2 = fit.GetParameter(2); | |
2345 | dcar_negA_chi2 = fit.GetChisquare(); | |
2346 | dcar_negA_0_Err = fit.GetParError(0); | |
2347 | dcar_negA_1_Err = fit.GetParError(1); | |
2348 | dcar_negA_2_Err = fit.GetParError(2); | |
2349 | ||
2350 | dcar_neg3->GetYaxis()->SetRangeUser(-1.0,-0.01); | |
2351 | TH1* dcar_negC = (dynamic_cast<TH2*>(dcar_neg3->Project3D("xz_2")))->ProfileX(); | |
2352 | dcar_negC->Fit(&fit,"NQ"); | |
2353 | dcar_negC_0 = fit.GetParameter(0); | |
2354 | dcar_negC_1 = fit.GetParameter(1); | |
2355 | dcar_negC_2 = fit.GetParameter(2); | |
2356 | dcar_negC_chi2 = fit.GetChisquare(); | |
2357 | dcar_negC_0_Err = fit.GetParError(0); | |
2358 | dcar_negC_1_Err = fit.GetParError(1); | |
2359 | dcar_negC_2_Err = fit.GetParError(2); | |
2360 | ||
2361 | dcaz_neg3->GetYaxis()->SetRangeUser(0,0.99); | |
2362 | TH1* dcaz_negA = (dynamic_cast<TH2*>(dcaz_neg3->Project3D("xz_3")))->ProfileX(); | |
2363 | dcaz_negA->Fit(&fit,"NQ"); | |
2364 | dcaz_negA_0 = fit.GetParameter(0); | |
2365 | dcaz_negA_1 = fit.GetParameter(1); | |
2366 | dcaz_negA_2 = fit.GetParameter(2); | |
2367 | dcaz_negA_chi2 = fit.GetChisquare(); | |
2368 | dcaz_negA_0_Err = fit.GetParError(0); | |
2369 | dcaz_negA_1_Err = fit.GetParError(1); | |
2370 | dcaz_negA_2_Err = fit.GetParError(2); | |
2371 | ||
2372 | dcaz_neg3->GetYaxis()->SetRangeUser(-1.0,-0.01); | |
2373 | TH1* dcaz_negC = (dynamic_cast<TH2*>(dcaz_neg3->Project3D("xz_4")))->ProfileX(); | |
2374 | dcaz_negC->Fit(&fit,"NQ"); | |
2375 | dcaz_negC_0 = fit.GetParameter(0); | |
2376 | dcaz_negC_1 = fit.GetParameter(1); | |
2377 | dcaz_negC_2 = fit.GetParameter(2); | |
2378 | dcaz_negC_chi2 = fit.GetChisquare(); | |
2379 | dcaz_negC_0_Err = fit.GetParError(0); | |
2380 | dcaz_negC_1_Err = fit.GetParError(1); | |
2381 | dcaz_negC_2_Err = fit.GetParError(2); | |
2382 | ||
2383 | ||
2384 | // store results (shift in dca) in ttree | |
2385 | ||
2386 | (*pcstream)<<"tpcQA"<< | |
2387 | "dcar_posA_0="<< dcar_posA_0<< | |
2388 | "dcar_posA_1="<< dcar_posA_1<< | |
2389 | "dcar_posA_2="<< dcar_posA_2<< | |
2390 | "dcar_posA_chi2="<< dcar_posA_chi2<< | |
2391 | "dcar_posA_0_Err="<< dcar_posA_0_Err<< | |
2392 | "dcar_posA_1_Err="<< dcar_posA_1_Err<< | |
2393 | "dcar_posA_2_Err="<< dcar_posA_2_Err; | |
2394 | ||
2395 | (*pcstream)<<"tpcQA"<< | |
2396 | "dcaz_posA_0="<< dcaz_posA_0<< | |
2397 | "dcaz_posA_1="<< dcaz_posA_1<< | |
2398 | "dcaz_posA_2="<< dcaz_posA_2<< | |
2399 | "dcaz_posA_chi2="<< dcaz_posA_chi2<< | |
2400 | "dcaz_posA_0_Err="<< dcaz_posA_0_Err<< | |
2401 | "dcaz_posA_1_Err="<< dcaz_posA_1_Err<< | |
2402 | "dcaz_posA_2_Err="<< dcaz_posA_2_Err; | |
2403 | ||
2404 | (*pcstream)<<"tpcQA"<< | |
2405 | "dcaz_posC_0="<< dcaz_posC_0<< | |
2406 | "dcaz_posC_1="<< dcaz_posC_1<< | |
2407 | "dcaz_posC_2="<< dcaz_posC_2<< | |
2408 | "dcaz_posC_chi2="<< dcaz_posC_chi2<< | |
2409 | "dcaz_posC_0_Err="<< dcaz_posC_0_Err<< | |
2410 | "dcaz_posC_1_Err="<< dcaz_posC_1_Err<< | |
2411 | "dcaz_posC_2_Err="<< dcaz_posC_2_Err; | |
2412 | ||
2413 | (*pcstream)<<"tpcQA"<< | |
2414 | "dcar_posC_0="<< dcar_posC_0<< | |
2415 | "dcar_posC_1="<< dcar_posC_1<< | |
2416 | "dcar_posC_2="<< dcar_posC_2<< | |
2417 | "dcar_posC_chi2="<< dcar_posC_chi2<< | |
2418 | "dcar_posC_0_Err="<< dcar_posC_0_Err<< | |
2419 | "dcar_posC_1_Err="<< dcar_posC_1_Err<< | |
2420 | "dcar_posC_2_Err="<< dcar_posC_2_Err; | |
2421 | ||
2422 | ||
2423 | (*pcstream)<<"tpcQA"<< | |
2424 | "dcar_negA_0="<< dcar_negA_0<< | |
2425 | "dcar_negA_1="<< dcar_negA_1<< | |
2426 | "dcar_negA_2="<< dcar_negA_2<< | |
2427 | "dcar_negA_chi2="<< dcar_negA_chi2<< | |
2428 | "dcar_negA_0_Err="<< dcar_negA_0_Err<< | |
2429 | "dcar_negA_1_Err="<< dcar_negA_1_Err<< | |
2430 | "dcar_negA_2_Err="<< dcar_negA_2_Err; | |
2431 | ||
2432 | (*pcstream)<<"tpcQA"<< | |
2433 | "dcaz_negA_0="<< dcaz_negA_0<< | |
2434 | "dcaz_negA_1="<< dcaz_negA_1<< | |
2435 | "dcaz_negA_2="<< dcaz_negA_2<< | |
2436 | "dcaz_negA_chi2="<< dcaz_negA_chi2<< | |
2437 | "dcaz_negA_0_Err="<< dcaz_negA_0_Err<< | |
2438 | "dcaz_negA_1_Err="<< dcaz_negA_1_Err<< | |
2439 | "dcaz_negA_2_Err="<< dcaz_negA_2_Err; | |
2440 | ||
2441 | (*pcstream)<<"tpcQA"<< | |
2442 | "dcaz_negC_0="<< dcaz_negC_0<< | |
2443 | "dcaz_negC_1="<< dcaz_negC_1<< | |
2444 | "dcaz_negC_2="<< dcaz_negC_2<< | |
2445 | "dcaz_negC_chi2="<< dcaz_negC_chi2<< | |
2446 | "dcaz_negC_0_Err="<< dcaz_negC_0_Err<< | |
2447 | "dcaz_negC_1_Err="<< dcaz_negC_1_Err<< | |
2448 | "dcaz_negC_2_Err="<< dcaz_negC_2_Err; | |
2449 | ||
2450 | (*pcstream)<<"tpcQA"<< | |
2451 | "dcar_negC_0="<< dcar_negC_0<< | |
2452 | "dcar_negC_1="<< dcar_negC_1<< | |
2453 | "dcar_negC_2="<< dcar_negC_2<< | |
2454 | "dcar_negC_chi2="<< dcar_negC_chi2<< | |
2455 | "dcar_negC_0_Err="<< dcar_negC_0_Err<< | |
2456 | "dcar_negC_1_Err="<< dcar_negC_1_Err<< | |
2457 | "dcar_negC_2_Err="<< dcar_negC_2_Err; | |
2458 | ||
2459 | return 0; | |
2460 | } |