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.
11 // by M.Knichel 15/10/2010
12 //------------------------------------------------------------------------------
27 #include "THnSparse.h"
34 #include "AliGRPObject.h"
35 #include "AliTPCcalibDB.h"
36 #include "AliTPCcalibDButil.h"
37 #include "TTreeStream.h"
38 #include "AliPerformanceTPC.h"
39 #include "AliPerformanceDEdx.h"
40 #include "AliPerformanceDCA.h"
41 #include "AliPerformanceMatch.h"
43 #include "AliTPCPerformanceSummary.h"
47 ClassImp(AliTPCPerformanceSummary)
49 Bool_t AliTPCPerformanceSummary::fgForceTHnSparse = kFALSE;
52 //_____________________________________________________________________________
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)
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.
62 if (pTPCMatch) {run = pTPCMatch->GetRunNumber(); }
63 if (pTPCgain) {run = pTPCgain->GetRunNumber(); }
64 if (pTPC) { run = pTPC->GetRunNumber(); }
68 //AliTPCcalibDB *calibDB=0;
70 // AliTPCcalibDButil *dbutil =0;
76 //Float_t currentL3 =0;
77 //Int_t polarityL3 = 0;
80 //calibDB = AliTPCcalibDB::Instance();
82 // dbutil= new AliTPCcalibDButil;
84 //printf("Processing run %d ...\n",run);
86 //AliTPCcalibDB::Instance()->SetRun(run);
88 // dbutil->UpdateFromCalibDB();
89 // dbutil->SetReferenceRun(run);
90 // dbutil->UpdateRefDataFromOCDB();
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);
100 //runType = AliTPCcalibDB::GetRunType(run).Data();
102 time = (startTimeGRP+stopTimeGRP)/2;
103 duration = (stopTimeGRP-startTimeGRP);
105 if (!pcstream) return;
106 (*pcstream)<<"tpcQA"<<
109 "startTimeGRP="<<startTimeGRP<<
110 "stopTimeGRP="<<stopTimeGRP<<
111 "duration="<<duration<<
112 "runType.="<<&runType;
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);
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);
126 AnalyzePt(pTPC,pcstream);
127 AnalyzeChargeOverPt(pTPC,pcstream);
128 AnalyzeQAPosNegDpT(pTPC,pcstream);
129 AnalyzeQADCAFitParameter(pTPC,pcstream);
130 AnalyzeOcc(pTPC,pcstream);
132 pTPC->GetTPCTrackHisto()->GetAxis(9)->SetRangeUser(-10,10);
133 pTPC->GetTPCTrackHisto()->GetAxis(7)->SetRangeUser(0,100);
134 pTPC->GetTPCTrackHisto()->GetAxis(5)->SetRangeUser(-10,10);
136 AnalyzeGain(pTPCgain, pcstream);
137 AnalyzeMatch(pTPCMatch, pcstream);
138 AnalyzePull(pTPCPull, pcstream);
139 AnalyzeConstrain(pConstrain, pcstream);
141 (*pcstream)<<"tpcQA"<<"\n";
144 //_____________________________________________________________________________
145 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)
148 // Extracts performance parameters from pTPC and pTPCgain.
149 // Output is written to a TTree saved in outfile.
150 // The run number must be provided since it is not stored in
151 // AliPerformanceTPC or AliPerformanceDEdx.
153 // The function creates a TTreeSRedirector and calls the
154 // function WriteToTTreeSRedirector.
157 if (!outfile) return;
158 TTreeSRedirector* pcstream = 0;
159 pcstream = new TTreeSRedirector(outfile);
160 if (!pcstream) return;
161 WriteToTTreeSRedirector(pTPC, pTPCgain, pMatch, pPull, pConstrain, pcstream, run);
162 if (pcstream) { delete pcstream; pcstream = 0; }
166 //_____________________________________________________________________________
167 Int_t AliTPCPerformanceSummary::MakeReport(const Char_t* infile, const Char_t* outfile, Int_t run)
170 // Reads QA information (AliPerformanceTPC and AliPerformanceDEdx) from
171 // infile (this must be a rootfile) and writes the output to a TTree
172 // stored in outfile.
173 // The run number must be provided since it is not stored in
174 // AliPerformanceTPC or AliPerformanceDEdx.
176 // The input objects must be named "AliPerformanceTPC" and
177 // "AliPerformanceDEdxTPCInner" and stored in a TList which name must
178 // be one of the following: "TPC", "TPCQA", "TPC_PerformanceQA"
179 // or "TPC_PerformanceQA/TPC" (with directory)
182 if (!infile) return -1;
183 if (!outfile) return -1;
185 f=TFile::Open(infile,"read");
187 printf("File %s not available\n", infile);
191 list = dynamic_cast<TList*>(f->Get("TPC"));
192 if (!list) { list = dynamic_cast<TList*>(f->Get("TPCQA")); }
193 if (!list) { list = dynamic_cast<TList*>(f->Get("TPC_PerformanceQA/TPCQA")); }
194 if (!list) { list = dynamic_cast<TList*>(f->Get("TPC_PerformanceQA")); }
195 if (!list) { list = dynamic_cast<TList*>(f->Get("ITSTPCMatch")); }
197 printf("QA %s not available\n", infile);
200 AliPerformanceTPC* pTPC = 0;
201 AliPerformanceDEdx* pTPCgain = 0;
202 AliPerformanceMatch* pTPCmatch = 0;
203 AliPerformanceMatch* pTPCPull = 0;
204 AliPerformanceMatch* pConstrain = 0;
206 if (list) { pTPC = dynamic_cast<AliPerformanceTPC*>(list->FindObject("AliPerformanceTPC")); }
207 if (list) { pTPCgain = dynamic_cast<AliPerformanceDEdx*>(list->FindObject("AliPerformanceDEdxTPCInner")); }
208 if (list) { pTPCmatch = dynamic_cast<AliPerformanceMatch*>(list->FindObject("AliPerformanceMatchTPCITS")); }
209 if (list) { pTPCPull = dynamic_cast<AliPerformanceMatch*>(list->FindObject("AliPerformanceMatchITSTPC")); }
210 if (list) { pConstrain = dynamic_cast<AliPerformanceMatch*>(list->FindObject("AliPerformanceMatchTPCConstrain")); }
212 Int_t returncode = 0;
213 WriteToFile(pTPC, pTPCgain, pTPCmatch , pTPCPull, pConstrain, outfile, run);
214 if (f) { delete f; f=0; }
218 //_____________________________________________________________________________
219 Int_t AliTPCPerformanceSummary::ProduceTrends(const Char_t* infilelist, const Char_t* outfile)
222 // Produces trend graphs.
224 // Input: infilelist is a textfile with one rootfile per line.
225 // There should be one rootfile for each run, the rootfile must
226 // contain the output of the MakeReport function
227 // Output: the information for all runs is merged into a TTree
228 // that is saved in outfile along with the trend graphs.
229 // Trend graphs are stored as TCanvas objects to include axis labels etc.
232 if (!infilelist) return -1;
233 if (!outfile) return -1;
235 TChain* chain = new TChain("tpcQA");
236 if(!chain) return -1;
245 if (!currentFile.Contains("root")) continue; // protection
246 chain->Add(currentFile.Data());
249 //TTree *tree = chain;
250 TTree *tree = chain->CopyTree("1");
252 if (chain) { delete chain; chain=0; }
253 //TGraph* graph = dynamic_cast<TGraph*>(tree->DrawClone("run:run"));
254 //TGraph *graph = (TGraph*)gPad->GetPrimitive("Graph");
256 TFile* out = new TFile(outfile,"RECREATE");
260 const Char_t* condition = "meanTPCncl>0";
261 SaveGraph(tree,"meanTPCnclF","run",condition);
262 SaveGraph(tree,"rmsTPCnclF","run",condition);
263 SaveGraph(tree,"meanTPCChi2","run",condition);
264 SaveGraph(tree,"rmsTPCChi2","run",condition);
265 SaveGraph(tree,"slopeATPCnclF","run",condition);
266 SaveGraph(tree,"slopeCTPCnclF","run",condition);
267 SaveGraph(tree,"slopeATPCnclFErr","run",condition);
268 SaveGraph(tree,"slopeCTPCnclFErr","run",condition);
269 SaveGraph(tree,"meanTPCncl","run",condition);
270 SaveGraph(tree,"rmsTPCncl","run",condition);
271 SaveGraph(tree,"slopeATPCncl","run",condition);
272 SaveGraph(tree,"slopeCTPCncl","run",condition);
273 SaveGraph(tree,"slopeATPCnclErr","run",condition);
274 SaveGraph(tree,"slopeCTPCnclErr","run",condition);
276 SaveGraph(tree,"offsetdRA","run",condition);
277 SaveGraph(tree,"slopedRA","run",condition);
278 SaveGraph(tree,"offsetdRC","run",condition);
279 SaveGraph(tree,"slopedRC","run",condition);
280 SaveGraph(tree,"offsetdRAErr","run",condition);
281 SaveGraph(tree,"slopedRAErr","run",condition);
282 SaveGraph(tree,"offsetdRCErr","run",condition);
283 SaveGraph(tree,"slopedRCErr","run",condition);
284 SaveGraph(tree,"offsetdRAchi2","run",condition);
285 SaveGraph(tree,"slopedRAchi2","run",condition);
286 SaveGraph(tree,"offsetdRCchi2","run",condition);
287 SaveGraph(tree,"slopedRCchi2","run",condition);
289 SaveGraph(tree,"offsetdRAPos","run",condition);
291 SaveGraph(tree,"slopedRAPos","run",condition);
292 SaveGraph(tree,"offsetdRCPos","run",condition);
293 SaveGraph(tree,"slopedRCPos","run",condition);
294 SaveGraph(tree,"offsetdRAErrPos","run",condition);
295 SaveGraph(tree,"slopedRAErrPos","run",condition);
296 SaveGraph(tree,"offsetdRCErrPos","run",condition);
297 SaveGraph(tree,"slopedRCErrPos","run",condition);
298 SaveGraph(tree,"offsetdRAchi2Pos","run",condition);
299 SaveGraph(tree,"slopedRAchi2Pos","run",condition);
300 SaveGraph(tree,"offsetdRCchi2Pos","run",condition);
301 SaveGraph(tree,"slopedRCchi2Pos","run",condition);
303 SaveGraph(tree,"offsetdRANeg","run",condition);
304 SaveGraph(tree,"slopedRANeg","run",condition);
305 SaveGraph(tree,"offsetdRCNeg","run",condition);
306 SaveGraph(tree,"slopedRCNeg","run",condition);
307 SaveGraph(tree,"offsetdRAErrNeg","run",condition);
308 SaveGraph(tree,"slopedRAErrNeg","run",condition);
309 SaveGraph(tree,"offsetdRCErrNeg","run",condition);
310 SaveGraph(tree,"slopedRCErrNeg","run",condition);
311 SaveGraph(tree,"offsetdRAchi2Neg","run",condition);
312 SaveGraph(tree,"slopedRAchi2Neg","run",condition);
313 SaveGraph(tree,"offsetdRCchi2Neg","run",condition);
314 SaveGraph(tree,"slopedRCchi2Neg","run",condition);
316 SaveGraph(tree,"offsetdZAPos","run",condition);
317 SaveGraph(tree,"slopedZAPos","run",condition);
318 SaveGraph(tree,"offsetdZCPos","run",condition);
319 SaveGraph(tree,"slopedZCPos","run",condition);
320 SaveGraph(tree,"offsetdZAErrPos","run",condition);
321 SaveGraph(tree,"slopedZAErrPos","run",condition);
322 SaveGraph(tree,"offsetdZCErrPos","run",condition);
323 SaveGraph(tree,"slopedZCErrPos","run",condition);
324 SaveGraph(tree,"offsetdZAchi2Pos","run",condition);
325 SaveGraph(tree,"slopedZAchi2Pos","run",condition);
326 SaveGraph(tree,"offsetdZCchi2Pos","run",condition);
327 SaveGraph(tree,"slopedZCchi2Pos","run",condition);
329 SaveGraph(tree,"offsetdZANeg","run",condition);
330 SaveGraph(tree,"slopedZANeg","run",condition);
331 SaveGraph(tree,"offsetdZCNeg","run",condition);
332 SaveGraph(tree,"slopedZCNeg","run",condition);
333 SaveGraph(tree,"offsetdZAErrNeg","run",condition);
334 SaveGraph(tree,"slopedZAErrNeg","run",condition);
335 SaveGraph(tree,"offsetdZCErrNeg","run",condition);
336 SaveGraph(tree,"slopedZCErrNeg","run",condition);
337 SaveGraph(tree,"offsetdZAchi2Neg","run",condition);
338 SaveGraph(tree,"slopedZAchi2Neg","run",condition);
339 SaveGraph(tree,"offsetdZCchi2Neg","run",condition);
340 SaveGraph(tree,"slopedZCchi2Neg","run",condition);
342 SaveGraph(tree,"offsetdZA","run",condition);
343 SaveGraph(tree,"slopedZA","run",condition);
344 SaveGraph(tree,"offsetdZC","run",condition);
345 SaveGraph(tree,"slopedZC","run",condition);
346 SaveGraph(tree,"offsetdZAErr","run",condition);
347 SaveGraph(tree,"slopedZAErr","run",condition);
348 SaveGraph(tree,"offsetdZCErr","run",condition);
349 SaveGraph(tree,"slopedZCErr","run",condition);
350 SaveGraph(tree,"offsetdZAchi2","run",condition);
351 SaveGraph(tree,"slopedZAchi2","run",condition);
352 SaveGraph(tree,"offsetdZCchi2","run",condition);
353 SaveGraph(tree,"slopedZCchi2","run",condition);
355 SaveGraph(tree,"meanVertX","run",condition);
356 SaveGraph(tree,"rmsVertX","run",condition);
357 SaveGraph(tree,"meanVertY","run",condition);
358 SaveGraph(tree,"rmsVertY","run",condition);
359 SaveGraph(tree,"meanVertZ","run",condition);
360 SaveGraph(tree,"rmsVertZ","run",condition);
361 SaveGraph(tree,"vertStatus","run",condition);
362 SaveGraph(tree,"meanMult","run",condition);
363 SaveGraph(tree,"rmsMult","run",condition);
364 SaveGraph(tree,"meanMultPos","run",condition);
365 SaveGraph(tree,"rmsMultPos","run",condition);
366 SaveGraph(tree,"meanMultNeg","run",condition);
367 SaveGraph(tree,"rmsMultNeg","run",condition);
368 SaveGraph(tree,"vertAll","run",condition);
369 SaveGraph(tree,"vertOK","run",condition);
372 SaveGraph(tree,"meanPtAPos","run",condition);
373 SaveGraph(tree,"mediumPtAPos","run",condition);
374 SaveGraph(tree,"highPtAPos","run",condition);
375 SaveGraph(tree,"meanPtCPos","run",condition);
376 SaveGraph(tree,"mediumPtCPos","run",condition);
377 SaveGraph(tree,"highPtCPos","run",condition);
378 SaveGraph(tree,"meanPtANeg","run",condition);
379 SaveGraph(tree,"mediumPtANeg","run",condition);
380 SaveGraph(tree,"highPtANeg","run",condition);
381 SaveGraph(tree,"meanPtCNeg","run",condition);
382 SaveGraph(tree,"mediumPtCNeg","run",condition);
383 SaveGraph(tree,"highPtCNeg","run",condition);
385 SaveGraph(tree,"qOverPt","run",condition);
386 SaveGraph(tree,"qOverPtA","run",condition);
387 SaveGraph(tree,"qOverPtC","run",condition);
389 SaveGraph(tree,"dcarAP0","run",condition);
390 SaveGraph(tree,"dcarAP1","run",condition);
391 SaveGraph(tree,"dcarCP0","run",condition);
392 SaveGraph(tree,"dcarCP1","run",condition);
395 SaveGraph(tree,"tpcItsMatchA","run",condition);
396 SaveGraph(tree,"tpcItsMatchHighPtA","run",condition);
397 SaveGraph(tree,"tpcItsMatchC","run",condition);
398 SaveGraph(tree,"tpcItsMatchHighPtC","run",condition);
400 SaveGraph(tree,"phiPull","run",condition);
401 SaveGraph(tree,"phiPullHighPt","run",condition);
402 SaveGraph(tree,"ptPull","run",condition);
403 SaveGraph(tree,"ptPullHighPt","run",condition);
404 SaveGraph(tree,"yPull","run",condition);
405 SaveGraph(tree,"yPullHighPt","run",condition);
406 SaveGraph(tree,"zPull","run",condition);
407 SaveGraph(tree,"zPullHighPt","run",condition);
408 SaveGraph(tree,"lambdaPull","run",condition);
409 SaveGraph(tree,"lambdaPullHighPt","run",condition);
411 SaveGraph(tree,"tpcConstrainPhiA","run",condition);
412 SaveGraph(tree,"tpcConstrainPhiC","run",condition);
414 SaveGraph(tree,"deltaPt","run",condition);
415 SaveGraph(tree,"deltaPtchi2","run",condition);
416 SaveGraph(tree,"deltaPtA","run",condition);
417 SaveGraph(tree,"deltaPtchi2A","run",condition);
418 SaveGraph(tree,"deltaPtC","run",condition);
419 SaveGraph(tree,"deltaPtchi2C","run",condition);
420 SaveGraph(tree,"deltaPtA_Err","run",condition);
421 SaveGraph(tree,"deltaPtA_Err","run",condition);
422 SaveGraph(tree,"deltaPtC_Err","run",condition);
424 ////////////////////////////////////////////////////////////////////////////////////////////////////////
425 //save dca fit parameters
426 SaveGraph(tree,"dcar_posA_0","run",condition);
427 SaveGraph(tree,"dcar_posA_1","run",condition);
428 SaveGraph(tree,"dcar_posA_2","run",condition);
429 SaveGraph(tree,"dcar_posA_chi2","run",condition);
430 SaveGraph(tree,"dcar_posA_0_Err","run",condition);
431 SaveGraph(tree,"dcar_posA_1_Err","run",condition);
432 SaveGraph(tree,"dcar_posA_2_Err","run",condition);
434 SaveGraph(tree,"dcaz_posA_0","run",condition);
435 SaveGraph(tree,"dcaz_posA_1","run",condition);
436 SaveGraph(tree,"dcaz_posA_2","run",condition);
437 SaveGraph(tree,"dcaz_posA_chi2","run",condition);
438 SaveGraph(tree,"dcaz_posA_0_Err","run",condition);
439 SaveGraph(tree,"dcaz_posA_1_Err","run",condition);
440 SaveGraph(tree,"dcaz_posA_2_Err","run",condition);
442 SaveGraph(tree,"dcaz_posC_0","run",condition);
443 SaveGraph(tree,"dcaz_posC_1","run",condition);
444 SaveGraph(tree,"dcaz_posC_2","run",condition);
445 SaveGraph(tree,"dcaz_posC_chi2","run",condition);
446 SaveGraph(tree,"dcaz_posC_0_Err","run",condition);
447 SaveGraph(tree,"dcaz_posC_1_Err","run",condition);
448 SaveGraph(tree,"dcaz_posC_2_Err","run",condition);
450 SaveGraph(tree,"dcar_posC_0","run",condition);
451 SaveGraph(tree,"dcar_posC_1","run",condition);
452 SaveGraph(tree,"dcar_posC_2","run",condition);
453 SaveGraph(tree,"dcar_posC_chi2","run",condition);
454 SaveGraph(tree,"dcar_posC_0_Err","run",condition);
455 SaveGraph(tree,"dcar_posC_1_Err","run",condition);
456 SaveGraph(tree,"dcar_posC_2_Err","run",condition);
458 SaveGraph(tree,"dcar_negA_0","run",condition);
459 SaveGraph(tree,"dcar_negA_1","run",condition);
460 SaveGraph(tree,"dcar_negA_2","run",condition);
461 SaveGraph(tree,"dcar_negA_chi2","run",condition);
462 SaveGraph(tree,"dcar_negA_0_Err","run",condition);
463 SaveGraph(tree,"dcar_negA_1_Err","run",condition);
464 SaveGraph(tree,"dcar_negA_2_Err","run",condition);
466 SaveGraph(tree,"dcaz_negA_0","run",condition);
467 SaveGraph(tree,"dcaz_negA_1","run",condition);
468 SaveGraph(tree,"dcaz_negA_2","run",condition);
469 SaveGraph(tree,"dcaz_negA_chi2","run",condition);
470 SaveGraph(tree,"dcaz_negA_0_Err","run",condition);
471 SaveGraph(tree,"dcaz_negA_1_Err","run",condition);
472 SaveGraph(tree,"dcaz_negA_2_Err","run",condition);
474 SaveGraph(tree,"dcaz_negC_0","run",condition);
475 SaveGraph(tree,"dcaz_negC_1","run",condition);
476 SaveGraph(tree,"dcaz_negC_2","run",condition);
477 SaveGraph(tree,"dcaz_negC_chi2","run",condition);
478 SaveGraph(tree,"dcaz_negC_0_Err","run",condition);
479 SaveGraph(tree,"dcaz_negC_1_Err","run",condition);
480 SaveGraph(tree,"dcaz_negC_2_Err","run",condition);
482 SaveGraph(tree,"dcar_negC_0","run",condition);
483 SaveGraph(tree,"dcar_negC_1","run",condition);
484 SaveGraph(tree,"dcar_negC_2","run",condition);
485 SaveGraph(tree,"dcar_negC_chi2","run",condition);
486 SaveGraph(tree,"dcar_negC_0_Err","run",condition);
487 SaveGraph(tree,"dcar_negC_1_Err","run",condition);
488 SaveGraph(tree,"dcar_negC_2_Err","run",condition);
490 SaveGraph(tree,"iroc_A_side","run",condition);
491 SaveGraph(tree,"iroc_C_side","run",condition);
492 SaveGraph(tree,"oroc_A_side","run",condition);
493 SaveGraph(tree,"oroc_C_side","run",condition);
496 SaveGraph(tree,"TPC_Occ_IROC.","run",condition);
497 SaveGraph(tree,"TPC_Occ_OROC.","run",condition);
498 ////////////////////////////////////////////////////////////////////////////////////////////////////////
502 if (tree) { delete tree; tree=0; }
503 if (out) { delete out; out=0; }
507 //_____________________________________________________________________________
508 Int_t AliTPCPerformanceSummary::SaveGraph(TTree* tree, const Char_t* y, const Char_t* x, const Char_t* condition)
511 // Creates a Graph and writes the canvas to the current directory
512 // called by ProduceTrends function.
518 tree->Draw(s.Data(),condition,"goff");
519 TCanvas* c = new TCanvas(s.Data(),s.Data());
521 TPad* p = new TPad("pad0","pad0",0,0,1,1);
524 if (tree->GetSelectedRows() > 0) {
525 TGraph* graph = new TGraph(tree->GetSelectedRows(), tree->GetV2(), tree->GetV1());
527 graph->GetXaxis()->SetTitle(x);
528 graph->GetYaxis()->SetTitle(y);
532 //graph->Write(s.Data());
538 //_____________________________________________________________________________
539 Int_t AliTPCPerformanceSummary::AnalyzeDCARPhi(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream)
542 // Analyse DCA R imperfections
545 if (!pcstream) return 8;
549 static Double_t offsetdRA=0;
550 static Double_t slopedRA=0;
551 static Double_t offsetdRC=0;
552 static Double_t slopedRC=0;
553 static Double_t offsetdRAErr=0;
554 static Double_t slopedRAErr=0;
555 static Double_t offsetdRCErr=0;
556 static Double_t slopedRCErr=0;
557 static Double_t offsetdRAchi2=0;
558 static Double_t slopedRAchi2=0;
559 static Double_t offsetdRCchi2=0;
560 static Double_t slopedRCchi2=0;
561 static Double_t dcarAP0 = 0;
562 static Double_t dcarAP1 = 0;
563 static Double_t dcarCP0 = 0;
564 static Double_t dcarCP1 = 0;
566 //AliPerformanceTPC* pTPC = dynamic_cast<AliPerformanceTPC*>(pTPCObject);
572 if (pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_3_5_7")) {
573 his3D = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_3_5_7"));
575 his3D->GetYaxis()->SetRangeUser(-1,1);
576 his3D->GetZaxis()->SetRangeUser(0.25,10);
579 static TF1 *fpol1 = new TF1("fpol1","pol1");
581 if (his3D && !fgForceTHnSparse) {
582 his2D = dynamic_cast<TH2*>(his3D->Project3D("xy"));
584 his2D = pTPC->GetTPCTrackHisto()->Projection(3,5);
589 his2D->FitSlicesY(0,0,-1,10,"QNR",&arrayFit);
591 his1D = (TH1*) arrayFit.At(1);
592 his1D->Fit(fpol1,"QNRROB=0.8","QNR",-0.8,-0.1);
593 offsetdRC=fpol1->GetParameter(0);
594 slopedRC=fpol1->GetParameter(1);
595 offsetdRCchi2=fpol1->GetChisquare();
596 slopedRCchi2=fpol1->GetChisquare();
598 his1D->Fit(fpol1,"QNRROB=0.8","QNR",0.1,0.8);
599 offsetdRA=fpol1->GetParameter(0);
600 slopedRA=fpol1->GetParameter(1);
601 offsetdRAErr=fpol1->GetParError(0);
602 slopedRAErr=fpol1->GetParError(1);
603 offsetdRAchi2=fpol1->GetChisquare();
604 slopedRAchi2=fpol1->GetChisquare();
606 printf("DCA R QA report\n");
607 printf("offsetdRA\t%f\n",offsetdRA);
608 printf("slopedRA\t%f\n",slopedRA);
609 printf("offsetdRC\t%f\n",offsetdRC);
610 printf("slopedRC\t%f\n",slopedRC);
613 //extraction of DCAr versus pt
615 TLinearFitter linearFit;
616 linearFit.SetFormula("pol1");
617 TObjArray arrayWidth;
625 his3D->GetYaxis()->SetRangeUser(-1,1);
627 //get his2D in A Side
628 his3D->GetYaxis()->SetRangeUser(0,1);
629 his3D->GetZaxis()->SetRangeUser(0.35,8);
630 his2D = dynamic_cast<TH2*>(his3D->Project3D("xz"));
632 his2D->FitSlicesY(0,0,-1,0,"QNR",&arrayWidth);
634 width = dynamic_cast<TH1*>(arrayWidth.At(2));
637 nXbins = width->GetNbinsX();
638 for(Int_t i=2; i<nXbins; i++){
639 x = width->GetBinCenter(i);
642 y = width->GetBinContent(i);
644 linearFit.AddPoint(&x,y,1);
646 if(!linearFit.Eval()){
648 dcarAP0 = linearFit.GetParameter(0);
650 pn = Int_t(TMath::Abs(dcarAP0)/dcarAP0);
651 dcarAP0 = pn*TMath::Sqrt(TMath::Abs(dcarAP0));
653 dcarAP1 = linearFit.GetParameter(1);
655 pn = Int_t(TMath::Abs(dcarAP1)/dcarAP1);
656 dcarAP1 = pn*TMath::Sqrt(TMath::Abs(dcarAP1));
660 linearFit.ClearPoints();
662 //get his2D in C Side
663 his3D->GetYaxis()->SetRangeUser(-1,-0.001);
664 his2D = dynamic_cast<TH2*>(his3D->Project3D("xz"));
666 his2D->FitSlicesY(0,0,-1,0,"QNR",&arrayWidth);
667 width = dynamic_cast<TH1*>(arrayWidth.At(2));
670 nXbins = width->GetNbinsX();
671 for(Int_t i=2; i<nXbins; i++){
672 x = width->GetBinCenter(i);
675 y = width->GetBinContent(i);
677 linearFit.AddPoint(&x,y);
679 if(!linearFit.Eval()){
680 dcarCP0 = linearFit.GetParameter(0);
682 pn = Int_t(TMath::Abs(dcarCP0)/dcarCP0);
683 dcarCP0 = pn*TMath::Sqrt(TMath::Abs(dcarCP0));
685 dcarCP1 = linearFit.GetParameter(1);
687 pn = Int_t(TMath::Abs(dcarCP1)/dcarCP1);
688 dcarCP1 = pn*TMath::Sqrt(TMath::Abs(dcarCP1));
691 his3D->GetYaxis()->SetRangeUser(-1,1);
692 his3D->GetZaxis()->SetRangeUser(0,20);
697 (*pcstream)<<"tpcQA"<<
698 "offsetdRA="<< offsetdRA<<
699 "slopedRA="<< slopedRA<<
700 "offsetdRC="<< offsetdRC<<
701 "slopedRC="<<slopedRC<<
703 "offsetdRAErr="<< offsetdRAErr<<
704 "slopedRAErr="<< slopedRAErr<<
705 "offsetdRCErr="<< offsetdRCErr<<
706 "slopedRCErr="<<slopedRCErr<<
708 "offsetdRAchi2="<< offsetdRAchi2<<
709 "slopedRAchi2="<< slopedRAchi2<<
710 "offsetdRCchi2="<< offsetdRCchi2<<
711 "slopedRCchi2="<<slopedRCchi2<<
713 "dcarAP0="<<dcarAP0<<
714 "dcarAP1="<<dcarAP1<<
715 "dcarCP0="<<dcarCP0<<
721 //_____________________________________________________________________________
722 Int_t AliTPCPerformanceSummary::AnalyzeDCARPhiPos(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream)
725 // Analyse DCA R imperfections for positive particles
728 if (!pcstream) return 16;
729 if (!pTPC) return 16;
732 static Double_t offsetdRAPos=0;
733 static Double_t slopedRAPos=0;
734 static Double_t offsetdRCPos=0;
735 static Double_t slopedRCPos=0;
736 static Double_t offsetdRAErrPos=0;
737 static Double_t slopedRAErrPos=0;
738 static Double_t offsetdRCErrPos=0;
739 static Double_t slopedRCErrPos=0;
740 static Double_t offsetdRAchi2Pos=0;
741 static Double_t slopedRAchi2Pos=0;
742 static Double_t offsetdRCchi2Pos=0;
743 static Double_t slopedRCchi2Pos=0;
745 //AliPerformanceTPC* pTPC = dynamic_cast<AliPerformanceTPC*>(pTPCObject);
750 if (pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_7")) {
751 his3D = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_7"));
752 if(!his3D) return 16;
753 his3D->GetYaxis()->SetRangeUser(-1,1);
754 his3D->GetZaxis()->SetRangeUser(0.25,10);
757 static TF1 *fpol1 = new TF1("fpol1","pol1");
759 if (his3D && !fgForceTHnSparse) {
760 his2D = dynamic_cast<TH2*>(his3D->Project3D("xy"));
762 pTPC->GetTPCTrackHisto()->GetAxis(8)->SetRangeUser(0,1.5);
763 his2D = pTPC->GetTPCTrackHisto()->Projection(3,5);
764 pTPC->GetTPCTrackHisto()->GetAxis(8)->SetRangeUser(-1.5,1.5);
766 if(!his2D) return 16;
768 his2D->FitSlicesY(0,0,-1,10,"QNR",&arrayFit);
770 his1D = (TH1*) arrayFit.At(1);
771 his1D->Fit(fpol1,"QNRROB=0.8","QNR",-0.8,-0.1);
772 offsetdRCPos=fpol1->GetParameter(0);
773 slopedRCPos=fpol1->GetParameter(1);
774 offsetdRCchi2Pos=fpol1->GetChisquare();
775 slopedRCchi2Pos=fpol1->GetChisquare();
777 his1D->Fit(fpol1,"QNRROB=0.8","QNR",0.1,0.8);
778 offsetdRAPos=fpol1->GetParameter(0);
779 slopedRAPos=fpol1->GetParameter(1);
780 offsetdRAErrPos=fpol1->GetParError(0);
781 slopedRAErrPos=fpol1->GetParError(1);
782 offsetdRAchi2Pos=fpol1->GetChisquare();
783 slopedRAchi2Pos=fpol1->GetChisquare();
785 printf("DCA R QA Pos report\n");
786 printf("offsetdRAPos\t%f\n",offsetdRAPos);
787 printf("slopedRAPos\t%f\n",slopedRAPos);
788 printf("offsetdRCPos\t%f\n",offsetdRCPos);
789 printf("slopedRCPos\t%f\n",slopedRCPos);
793 (*pcstream)<<"tpcQA"<<
794 "offsetdRAPos="<< offsetdRAPos<<
795 "slopedRAPos="<< slopedRAPos<<
796 "offsetdRCPos="<< offsetdRCPos<<
797 "slopedRCPos="<<slopedRCPos<<
799 "offsetdRAErrPos="<< offsetdRAErrPos<<
800 "slopedRAErrPos="<< slopedRAErrPos<<
801 "offsetdRCErrPos="<< offsetdRCErrPos<<
802 "slopedRCErrPos="<<slopedRCErrPos<<
804 "offsetdRAchi2Pos="<< offsetdRAchi2Pos<<
805 "slopedRAchi2Pos="<< slopedRAchi2Pos<<
806 "offsetdRCchi2Pos="<< offsetdRCchi2Pos<<
807 "slopedRCchi2Pos="<<slopedRCchi2Pos;
812 //_____________________________________________________________________________
813 Int_t AliTPCPerformanceSummary::AnalyzeDCARPhiNeg(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream)
816 // Analyse DCA R imperfections for negative particles
818 if (!pcstream) return 32;
819 if (!pTPC) return 32;
822 static Double_t offsetdRANeg=0;
823 static Double_t slopedRANeg=0;
824 static Double_t offsetdRCNeg=0;
825 static Double_t slopedRCNeg=0;
826 static Double_t offsetdRAErrNeg=0;
827 static Double_t slopedRAErrNeg=0;
828 static Double_t offsetdRCErrNeg=0;
829 static Double_t slopedRCErrNeg=0;
830 static Double_t offsetdRAchi2Neg=0;
831 static Double_t slopedRAchi2Neg=0;
832 static Double_t offsetdRCchi2Neg=0;
833 static Double_t slopedRCchi2Neg=0;
835 //AliPerformanceTPC* pTPC = dynamic_cast<AliPerformanceTPC*>(pTPCObject);
840 if (pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_3_5_7")) {
841 his3D = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_3_5_7"));
842 if(!his3D) return 32;
843 his3D->GetYaxis()->SetRangeUser(-1,1);
844 his3D->GetZaxis()->SetRangeUser(0.25,10);
847 static TF1 *fpol1 = new TF1("fpol1","pol1");
849 if (his3D && !fgForceTHnSparse) {
850 his2D = dynamic_cast<TH2*>(his3D->Project3D("xy"));
852 pTPC->GetTPCTrackHisto()->GetAxis(8)->SetRangeUser(-1.5,0);
853 his2D = pTPC->GetTPCTrackHisto()->Projection(3,5);
854 pTPC->GetTPCTrackHisto()->GetAxis(8)->SetRangeUser(-1.5,1.5);
856 if(!his2D) return 32;
858 his2D->FitSlicesY(0,0,-1,10,"QNR",&arrayFit);
860 his1D = (TH1*) arrayFit.At(1);
861 his1D->Fit(fpol1,"QNRROB=0.8","QNR",-0.8,-0.1);
862 offsetdRCNeg=fpol1->GetParameter(0);
863 slopedRCNeg=fpol1->GetParameter(1);
864 offsetdRCchi2Neg=fpol1->GetChisquare();
865 slopedRCchi2Neg=fpol1->GetChisquare();
867 his1D->Fit(fpol1,"QNRROB=0.8","QNR",0.1,0.8);
868 offsetdRANeg=fpol1->GetParameter(0);
869 slopedRANeg=fpol1->GetParameter(1);
870 offsetdRAErrNeg=fpol1->GetParError(0);
871 slopedRAErrNeg=fpol1->GetParError(1);
872 offsetdRAchi2Neg=fpol1->GetChisquare();
873 slopedRAchi2Neg=fpol1->GetChisquare();
875 printf("DCA R QA Neg report\n");
876 printf("offsetdRANeg\t%f\n",offsetdRANeg);
877 printf("slopedRANeg\t%f\n",slopedRANeg);
878 printf("offsetdRCNeg\t%f\n",offsetdRCNeg);
879 printf("slopedRCNeg\t%f\n",slopedRCNeg);
881 // dump drift QA values
883 (*pcstream)<<"tpcQA"<<
884 "offsetdRANeg="<< offsetdRANeg<<
885 "slopedRANeg="<< slopedRANeg<<
886 "offsetdRCNeg="<< offsetdRCNeg<<
887 "slopedRCNeg="<<slopedRCNeg<<
889 "offsetdRAErrNeg="<< offsetdRAErrNeg<<
890 "slopedRAErrNeg="<< slopedRAErrNeg<<
891 "offsetdRCErrNeg="<< offsetdRCErrNeg<<
892 "slopedRCErrNeg="<<slopedRCErrNeg<<
894 "offsetdRAchi2Neg="<< offsetdRAchi2Neg<<
895 "slopedRAchi2Neg="<< slopedRAchi2Neg<<
896 "offsetdRCchi2Neg="<< offsetdRCchi2Neg<<
897 "slopedRCchi2Neg="<<slopedRCchi2Neg;
902 //_____________________________________________________________________________
903 Int_t AliTPCPerformanceSummary::AnalyzeNCL(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream)
906 // Analyse number of TPC clusters
909 if (!pcstream) return 1;
913 static Double_t meanTPCnclF=0;
914 static Double_t rmsTPCnclF=0;
915 static Double_t meanTPCChi2=0;
916 static Double_t rmsTPCChi2=0;
917 static Double_t slopeATPCnclF=0;
918 static Double_t slopeCTPCnclF=0;
919 static Double_t slopeATPCnclFErr=0;
920 static Double_t slopeCTPCnclFErr=0;
921 static Double_t meanTPCncl=0;
922 static Double_t rmsTPCncl=0;
923 static Double_t slopeATPCncl=0;
924 static Double_t slopeCTPCncl=0;
925 static Double_t slopeATPCnclErr=0;
926 static Double_t slopeCTPCnclErr=0;
933 static TF1 *fpol1 = new TF1("fpol1","pol1");
936 // only events with rec. vertex
938 // pt cut - 0.250 GeV
939 pTPC->GetTPCTrackHisto()->GetAxis(5)->SetRangeUser(-1.,1.);
940 pTPC->GetTPCTrackHisto()->GetAxis(7)->SetRangeUser(0.25,10);
942 if (pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_0_5_7")) {
943 his3D0 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_0_5_7"));
944 if(!his3D0) return 1;
945 his3D0->GetYaxis()->SetRangeUser(-1,1);
946 his3D0->GetZaxis()->SetRangeUser(0.25,10);
948 if (pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_1_5_7")) {
949 his3D1 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_1_5_7"));
950 if(!his3D1) return 1;
951 his3D1->GetYaxis()->SetRangeUser(-1,1);
952 his3D1->GetZaxis()->SetRangeUser(0.25,10);
954 if (pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_2_5_7")) {
955 his3D2 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_2_5_7"));
956 if(!his3D2) return 1;
957 his3D2->GetYaxis()->SetRangeUser(-1,1);
958 his3D2->GetZaxis()->SetRangeUser(0.25,10);
959 his3D2->GetXaxis()->SetRangeUser(0.4,1.1);
963 if (his3D0 && !fgForceTHnSparse) {
964 his1D = his3D0->Project3D("x");
966 his1D = pTPC->GetTPCTrackHisto()->Projection(0);
969 meanTPCncl= his1D->GetMean();
970 rmsTPCncl= his1D->GetRMS();
973 if (his3D1 && !fgForceTHnSparse) {
974 his1D = his3D1->Project3D("x");
976 his1D = pTPC->GetTPCTrackHisto()->Projection(1);
979 meanTPCChi2= his1D->GetMean();
980 rmsTPCChi2= his1D->GetRMS();
983 if (his3D0 && !fgForceTHnSparse) {
984 hprof = (dynamic_cast<TH2*>(his3D0->Project3D("xy")))->ProfileX();
986 hprof = pTPC->GetTPCTrackHisto()->Projection(0,5)->ProfileX();
990 hprof->Fit(fpol1,"QNR","QNR",0.1,0.8);
991 slopeATPCncl= fpol1->GetParameter(1);
992 slopeATPCnclErr= fpol1->GetParError(1);
993 hprof->Fit(fpol1,"QNR","QNR",-0.8,-0.1);
994 slopeCTPCncl= fpol1->GetParameter(1);
995 slopeCTPCnclErr= fpol1->GetParameter(1);
1002 if (his3D2 && !fgForceTHnSparse) {
1003 his1D = his3D2->Project3D("x");
1005 pTPC->GetTPCTrackHisto()->GetAxis(2)->SetRangeUser(0.4,1.1);
1006 his1D = pTPC->GetTPCTrackHisto()->Projection(2);
1009 meanTPCnclF= his1D->GetMean();
1010 rmsTPCnclF= his1D->GetRMS();
1013 if (his3D2 && !fgForceTHnSparse) {
1014 his1D = (dynamic_cast<TH2*>(his3D2->Project3D("xy")))->ProfileX();
1016 pTPC->GetTPCTrackHisto()->GetAxis(2)->SetRangeUser(0.4,1.1);
1017 his1D = pTPC->GetTPCTrackHisto()->Projection(2,5)->ProfileX();
1019 if(!his1D) return 1;
1021 his1D->Fit(fpol1,"QNR","QNR",0.1,0.8);
1022 slopeATPCnclF= fpol1->GetParameter(1);
1023 slopeATPCnclFErr= fpol1->GetParError(1);
1024 his1D->Fit(fpol1,"QNR","QNR",-0.8,-0.1);
1025 slopeCTPCnclF= fpol1->GetParameter(1);
1026 slopeCTPCnclFErr= fpol1->GetParameter(1);
1029 pTPC->GetTPCTrackHisto()->GetAxis(2)->SetRangeUser(0,10);
1031 printf("Cluster QA report\n");
1032 printf("meanTPCnclF=\t%f\n",meanTPCnclF);
1033 printf("rmsTPCnclF=\t%f\n",rmsTPCnclF);
1034 printf("slopeATPCnclF=\t%f\n",slopeATPCnclF);
1035 printf("slopeCTPCnclF=\t%f\n",slopeCTPCnclF);
1036 printf("meanTPCncl=\t%f\n",meanTPCncl);
1037 printf("rmsTPCncl=\t%f\n",rmsTPCncl);
1038 printf("slopeATPCncl=\t%f\n",slopeATPCncl);
1039 printf("slopeCTPCncl=\t%f\n",slopeCTPCncl);
1040 printf("meanTPCChi2=\t%f\n",meanTPCChi2);
1041 printf("rmsTPCChi2=\t%f\n",rmsTPCChi2);
1043 // dump results to the tree
1045 (*pcstream)<<"tpcQA"<<
1046 "meanTPCnclF="<<meanTPCnclF <<
1047 "rmsTPCnclF="<<rmsTPCnclF <<
1048 "meanTPCChi2="<<meanTPCChi2 <<
1049 "rmsTPCChi2="<<rmsTPCChi2 <<
1050 "slopeATPCnclF="<< slopeATPCnclF<<
1051 "slopeCTPCnclF="<< slopeCTPCnclF<<
1052 "slopeATPCnclFErr="<< slopeATPCnclFErr<<
1053 "slopeCTPCnclFErr="<< slopeCTPCnclFErr<<
1054 "meanTPCncl="<<meanTPCncl <<
1055 "rmsTPCncl="<< rmsTPCncl<<
1056 "slopeATPCncl="<< slopeATPCncl<<
1057 "slopeCTPCncl="<< slopeCTPCncl<<
1058 "slopeATPCnclErr="<< slopeATPCnclErr<<
1059 "slopeCTPCnclErr="<< slopeCTPCnclErr;
1064 //_____________________________________________________________________________
1065 Int_t AliTPCPerformanceSummary::AnalyzeDrift(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream)
1068 // Analyse DCA Z imperferctions (drift velocity)
1071 if (!pcstream) return 2;
1072 if (!pTPC) return 2;
1075 static Double_t offsetdZA=0;
1076 static Double_t slopedZA=0;
1077 static Double_t offsetdZC=0;
1078 static Double_t slopedZC=0;
1079 static Double_t offsetdZAErr=0;
1080 static Double_t slopedZAErr=0;
1081 static Double_t offsetdZCErr=0;
1082 static Double_t slopedZCErr=0;
1083 static Double_t offsetdZAchi2=0;
1084 static Double_t slopedZAchi2=0;
1085 static Double_t offsetdZCchi2=0;
1086 static Double_t slopedZCchi2=0;
1091 if (pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_4_5_7")) {
1092 his3D = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_4_5_7"));
1093 if(!his3D) return 2;
1094 his3D->GetYaxis()->SetRangeUser(-1,1);
1095 his3D->GetZaxis()->SetRangeUser(0.25,10);
1098 if (his3D && !fgForceTHnSparse) {
1099 his2D = dynamic_cast<TH2*>(his3D->Project3D("xy"));
1101 his2D = pTPC->GetTPCTrackHisto()->Projection(4,5);
1103 if(!his2D) return 2;
1105 static TF1 *fpol1 = new TF1("fpol1","pol1");
1107 his2D->FitSlicesY(0,0,-1,10,"QNR",&arrayFit);
1109 his1D = (TH1*) arrayFit.At(1);
1110 his1D->Fit(fpol1,"QNRROB=0.8","QNR",-0.8,-0.1);
1111 offsetdZC=fpol1->GetParameter(0);
1112 slopedZC=fpol1->GetParameter(1);
1113 offsetdZCErr=fpol1->GetParError(0);
1114 slopedZCErr=fpol1->GetParError(1);
1115 offsetdZCchi2=fpol1->GetChisquare();
1116 slopedZCchi2=fpol1->GetChisquare();
1118 his1D->Fit(fpol1,"QNRROB=0.8","QNR",0.1,0.8);
1119 offsetdZA=fpol1->GetParameter(0);
1120 slopedZA=fpol1->GetParameter(1);
1121 offsetdZAErr=fpol1->GetParError(0);
1122 slopedZAErr=fpol1->GetParError(1);
1123 offsetdZAchi2=fpol1->GetChisquare();
1124 slopedZAchi2=fpol1->GetChisquare();
1126 printf("Drift velocity QA report\n");
1127 printf("offsetdZA\t%f\n",offsetdZA);
1128 printf("slopedZA\t%f\n",slopedZA);
1129 printf("offsetdZC\t%f\n",offsetdZC);
1130 printf("slopedZC\t%f\n",slopedZC);
1132 // dump drift QA values
1134 (*pcstream)<<"tpcQA"<<
1135 "offsetdZA="<< offsetdZA<<
1136 "slopedZA="<< slopedZA<<
1137 "offsetdZC="<< offsetdZC<<
1138 "slopedZC="<<slopedZC<<
1140 "offsetdZAErr="<< offsetdZAErr<<
1141 "slopedZAErr="<< slopedZAErr<<
1142 "offsetdZCErr="<< offsetdZCErr<<
1143 "slopedZCErr="<<slopedZCErr<<
1145 "offsetdZAchi2="<< offsetdZAchi2<<
1146 "slopedZAchi2="<< slopedZAchi2<<
1147 "offsetdZCchi2="<< offsetdZCchi2<<
1148 "slopedZCchi2="<<slopedZCchi2;
1153 //_____________________________________________________________________________
1154 Int_t AliTPCPerformanceSummary::AnalyzeDriftPos(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream)
1157 // Analyse DCA Z imperferctions (drift velocity)
1158 // for positive particles
1160 if (!pcstream) return 64;
1161 if (!pTPC) return 64;
1164 static Double_t offsetdZAPos=0;
1165 static Double_t slopedZAPos=0;
1166 static Double_t offsetdZCPos=0;
1167 static Double_t slopedZCPos=0;
1168 static Double_t offsetdZAErrPos=0;
1169 static Double_t slopedZAErrPos=0;
1170 static Double_t offsetdZCErrPos=0;
1171 static Double_t slopedZCErrPos=0;
1172 static Double_t offsetdZAchi2Pos=0;
1173 static Double_t slopedZAchi2Pos=0;
1174 static Double_t offsetdZCchi2Pos=0;
1175 static Double_t slopedZCchi2Pos=0;
1180 if (pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_4_5_7")) {
1181 his3D = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_4_5_7"));
1182 if(!his3D) return 64;
1183 his3D->GetYaxis()->SetRangeUser(-1,1);
1184 his3D->GetZaxis()->SetRangeUser(0.25,10);
1187 if (his3D && !fgForceTHnSparse) {
1188 his2D = dynamic_cast<TH2*>(his3D->Project3D("xy"));
1190 his2D = pTPC->GetTPCTrackHisto()->Projection(4,5);
1192 if(!his2D) return 64;
1194 static TF1 *fpol1 = new TF1("fpol1","pol1");
1196 his2D->FitSlicesY(0,0,-1,10,"QNR",&arrayFit);
1199 his1D = (TH1*) arrayFit.At(1);
1200 his1D->Fit(fpol1,"QNRROB=0.8","QNR",-0.8,-0.1);
1201 offsetdZCPos=fpol1->GetParameter(0);
1202 slopedZCPos=fpol1->GetParameter(1);
1203 offsetdZCErrPos=fpol1->GetParError(0);
1204 slopedZCErrPos=fpol1->GetParError(1);
1205 offsetdZCchi2Pos=fpol1->GetChisquare();
1206 slopedZCchi2Pos=fpol1->GetChisquare();
1208 his1D->Fit(fpol1,"QNRROB=0.8","QNR",0.1,0.8);
1209 offsetdZAPos=fpol1->GetParameter(0);
1210 slopedZAPos=fpol1->GetParameter(1);
1211 offsetdZAErrPos=fpol1->GetParError(0);
1212 slopedZAErrPos=fpol1->GetParError(1);
1213 offsetdZAchi2Pos=fpol1->GetChisquare();
1214 slopedZAchi2Pos=fpol1->GetChisquare();
1216 printf("Drift velocity QA report\n");
1217 printf("offsetdZAPos\t%f\n",offsetdZAPos);
1218 printf("slopedZAPos\t%f\n",slopedZAPos);
1219 printf("offsetdZCPos\t%f\n",offsetdZCPos);
1220 printf("slopedZCPos\t%f\n",slopedZCPos);
1222 // dump drift QA values
1224 (*pcstream)<<"tpcQA"<<
1225 "offsetdZAPos="<< offsetdZAPos<<
1226 "slopedZAPos="<< slopedZAPos<<
1227 "offsetdZCPos="<< offsetdZCPos<<
1228 "slopedZCPos="<<slopedZCPos<<
1230 "offsetdZAErrPos="<< offsetdZAErrPos<<
1231 "slopedZAErrPos="<< slopedZAErrPos<<
1232 "offsetdZCErrPos="<< offsetdZCErrPos<<
1233 "slopedZCErrPos="<<slopedZCErrPos<<
1235 "offsetdZAchi2Pos="<< offsetdZAchi2Pos<<
1236 "slopedZAchi2Pos="<< slopedZAchi2Pos<<
1237 "offsetdZCchi2Pos="<< offsetdZCchi2Pos<<
1238 "slopedZCchi2Pos="<<slopedZCchi2Pos;
1243 //_____________________________________________________________________________
1244 Int_t AliTPCPerformanceSummary::AnalyzeDriftNeg(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream)
1247 // Analyse DCA Z imperferctions (drift velocity)
1248 // for negative particles
1250 if (!pcstream) return 128;
1251 if (!pTPC) return 128;
1254 static Double_t offsetdZANeg=0;
1255 static Double_t slopedZANeg=0;
1256 static Double_t offsetdZCNeg=0;
1257 static Double_t slopedZCNeg=0;
1258 static Double_t offsetdZAErrNeg=0;
1259 static Double_t slopedZAErrNeg=0;
1260 static Double_t offsetdZCErrNeg=0;
1261 static Double_t slopedZCErrNeg=0;
1262 static Double_t offsetdZAchi2Neg=0;
1263 static Double_t slopedZAchi2Neg=0;
1264 static Double_t offsetdZCchi2Neg=0;
1265 static Double_t slopedZCchi2Neg=0;
1271 if (pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_4_5_7")) {
1272 his3D = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_4_5_7"));
1273 if(!his3D) return 128;
1274 his3D->GetYaxis()->SetRangeUser(-1,1);
1275 his3D->GetZaxis()->SetRangeUser(0.25,10);
1277 if (his3D && !fgForceTHnSparse) {
1278 his2D = dynamic_cast<TH2*>(his3D->Project3D("xy"));
1280 his2D = pTPC->GetTPCTrackHisto()->Projection(4,5);
1282 if(!his2D) return 128;
1284 static TF1 *fpol1 = new TF1("fpol1","pol1");
1286 his2D->FitSlicesY(0,0,-1,10,"QNR",&arrayFit);
1289 his1D = (TH1*) arrayFit.At(1);
1290 his1D->Fit(fpol1,"QNRROB=0.8","QNR",-0.8,-0.1);
1291 offsetdZCNeg=fpol1->GetParameter(0);
1292 slopedZCNeg=fpol1->GetParameter(1);
1293 offsetdZCErrNeg=fpol1->GetParError(0);
1294 slopedZCErrNeg=fpol1->GetParError(1);
1295 offsetdZCchi2Neg=fpol1->GetChisquare();
1296 slopedZCchi2Neg=fpol1->GetChisquare();
1298 his1D->Fit(fpol1,"QNRROB=0.8","QNR",0.1,0.8);
1299 offsetdZANeg=fpol1->GetParameter(0);
1300 slopedZANeg=fpol1->GetParameter(1);
1301 offsetdZAErrNeg=fpol1->GetParError(0);
1302 slopedZAErrNeg=fpol1->GetParError(1);
1303 offsetdZAchi2Neg=fpol1->GetChisquare();
1304 slopedZAchi2Neg=fpol1->GetChisquare();
1306 printf("Drift velocity QA report\n");
1307 printf("offsetdZANeg\t%f\n",offsetdZANeg);
1308 printf("slopedZANeg\t%f\n",slopedZANeg);
1309 printf("offsetdZCNeg\t%f\n",offsetdZCNeg);
1310 printf("slopedZCNeg\t%f\n",slopedZCNeg);
1312 // dump drift QA values
1314 (*pcstream)<<"tpcQA"<<
1315 "offsetdZANeg="<< offsetdZANeg<<
1316 "slopedZANeg="<< slopedZANeg<<
1317 "offsetdZCNeg="<< offsetdZCNeg<<
1318 "slopedZCNeg="<<slopedZCNeg<<
1320 "offsetdZAErrNeg="<< offsetdZAErrNeg<<
1321 "slopedZAErrNeg="<< slopedZAErrNeg<<
1322 "offsetdZCErrNeg="<< offsetdZCErrNeg<<
1323 "slopedZCErrNeg="<<slopedZCErrNeg<<
1325 "offsetdZAchi2Neg="<< offsetdZAchi2Neg<<
1326 "slopedZAchi2Neg="<< slopedZAchi2Neg<<
1327 "offsetdZCchi2Neg="<< offsetdZCchi2Neg<<
1328 "slopedZCchi2Neg="<<slopedZCchi2Neg;
1333 //_____________________________________________________________________________
1334 Int_t AliTPCPerformanceSummary::AnalyzeGain(const AliPerformanceDEdx* pTPCgain, TTreeSRedirector* const pcstream)
1340 if (!pcstream) return 4;
1341 if (!pTPCgain) return 4;
1343 static TVectorD meanMIPvsSector(36);
1344 static TVectorD sector(36);
1345 static Float_t meanMIP = 0;
1346 static Float_t resolutionMIP = 0;
1347 static Float_t attachSlopeC = 0;
1348 static Float_t attachSlopeA = 0;
1349 static Float_t meanMIPele = 0;
1350 static Float_t resolutionMIPele = 0;
1351 static Float_t electroMIPSeparation = 0;
1354 //TH1 * hisProj1D=0;
1357 meanMIPvsSector.Zero();
1359 // select MIP particles
1361 pTPCgain->GetDeDxHisto()->GetAxis(7)->SetRangeUser(0.4,0.55);
1362 pTPCgain->GetDeDxHisto()->GetAxis(0)->SetRangeUser(35,60);
1363 pTPCgain->GetDeDxHisto()->GetAxis(6)->SetRangeUser(80,160);
1364 pTPCgain->GetDeDxHisto()->GetAxis(5)->SetRangeUser(-1,1);
1366 // MIP position and resolution
1368 TF1 gausFit("gausFit","gaus");
1370 if (pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_0") && !fgForceTHnSparse) {
1371 his1D = dynamic_cast<TH1*>(pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_0")->Clone());
1373 his1D = pTPCgain->GetDeDxHisto()->Projection(0);
1375 if(!his1D) return 4;
1376 his1D->Fit(&gausFit,"QN","QN");
1378 meanMIP = gausFit.GetParameter(1);
1380 if (meanMIP!=0) resolutionMIP = gausFit.GetParameter(2)/meanMIP;
1381 //removedtotest// delete his1D;
1384 // MIP position vs. dip angle (attachment)
1386 pTPCgain->GetDeDxHisto()->GetAxis(5)->SetRangeUser(-3,0); // C side
1387 if (pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_c_0_5") && !fgForceTHnSparse) {
1388 his2D = dynamic_cast<TH2*>(pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_c_0_5")->Clone());
1390 his2D = pTPCgain->GetDeDxHisto()->Projection(0,5);
1392 if(!his2D) return 4;
1394 TF1 * fpol = new TF1("fpol","pol1");
1396 his2D->FitSlicesY(0,0,-1,10,"QN",&arrayFit);
1397 his1D = (TH1*) arrayFit.At(1);
1398 his1D->Fit(fpol,"QNROB=0.8","QNR",-1,0);
1399 attachSlopeC = fpol->GetParameter(1);
1400 //removedtotest// delete his2D;
1401 //removedtotest// delete his1D;
1403 pTPCgain->GetDeDxHisto()->GetAxis(5)->SetRangeUser(0,3); // A side
1404 if (pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_a_0_5") && !fgForceTHnSparse) {
1405 his2D = dynamic_cast<TH2*>(pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_a_0_5")->Clone());
1407 his2D = pTPCgain->GetDeDxHisto()->Projection(0,5);
1409 if(!his2D) return 4;
1411 TF1 * fpolA = new TF1("fpolA","pol1");
1412 TObjArray arrayFitA;
1413 //FitSlicesY(TF1* f1 = 0, Int_t firstxbin = 0, Int_t lastxbin = -1, Int_t cut = 0, Option_t* option = "QNR", TObjArray* arr = 0)
1414 his2D->FitSlicesY(0,0,-1,10,"QN",&arrayFit);
1415 his1D = (TH1*) arrayFit.At(1);
1416 his1D->Fit(fpolA,"QNROB=0.8","QN",0,1);
1417 attachSlopeA = fpolA->GetParameter(1);
1418 //removedtotest// delete his2D;
1419 //removedtotest// delete his1D;
1421 // MIP position vs. sector
1423 pTPCgain->GetDeDxHisto()->GetAxis(5)->SetRangeUser(-3,0); // C side
1424 if (pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_c_0_1") && !fgForceTHnSparse) {
1425 his2D = dynamic_cast<TH2*>(pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_c_0_1")->Clone());
1427 his2D = pTPCgain->GetDeDxHisto()->Projection(0,1);
1429 if(!his2D) return 4;
1431 for(Int_t i = 0; i < 18; i++) { // loop over sectors; correct mapping to be checked!
1433 Float_t phiLow = -TMath::Pi() + i*(20./360.)*(2*TMath::Pi());
1434 Float_t phiUp = -TMath::Pi() + (i+1)*(20./360.)*(2*TMath::Pi());
1435 //pTPCgain->GetDeDxHisto()->GetAxis(1)->SetRangeUser(phiLow,phiUp);
1436 his2D->GetXaxis()->SetRangeUser(phiLow,phiUp);
1437 //his1D = pTPCgain->GetDeDxHisto()->Projection(0);
1438 his1D = his2D->ProjectionY();
1439 TF1 gausFunc("gausFunc","gaus");
1440 his1D->Fit(&gausFunc, "QN");
1441 meanMIPvsSector(i) = gausFunc.GetParameter(1);
1443 //removedtotest// delete his1D;
1445 //removedtotest// delete his2D;
1447 pTPCgain->GetDeDxHisto()->GetAxis(5)->SetRangeUser(0,3); // A side
1448 if (pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_a_0_1") && !fgForceTHnSparse) {
1449 his2D = dynamic_cast<TH2*>(pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mips_a_0_1")->Clone());
1451 his2D = pTPCgain->GetDeDxHisto()->Projection(0,1);
1453 if(!his2D) return 4;
1455 for(Int_t i = 0; i < 18; i++) { // loop over sectors; correct mapping to be checked!
1457 Float_t phiLow = -TMath::Pi() + i*(20./360.)*(2*TMath::Pi());
1458 Float_t phiUp = -TMath::Pi() + (i+1)*(20./360.)*(2*TMath::Pi());
1459 //pTPCgain->GetDeDxHisto()->GetAxis(1)->SetRangeUser(phiLow,phiUp);
1460 his2D->GetXaxis()->SetRangeUser(phiLow,phiUp);
1461 //his1D = pTPCgain->GetDeDxHisto()->Projection(0);
1462 his1D = his2D->ProjectionY();
1463 TF1 gausFunc("gausFunc","gaus");
1464 his1D->Fit(&gausFunc, "QN");
1465 meanMIPvsSector(i+18) = gausFunc.GetParameter(1);
1467 //removedtotest// delete his1D;
1469 //removedtotest// delete his2D;
1475 pTPCgain->GetDeDxHisto()->GetAxis(7)->SetRangeUser(0.32,0.38); // momenta
1476 pTPCgain->GetDeDxHisto()->GetAxis(0)->SetRangeUser(70,100); // dedx
1477 pTPCgain->GetDeDxHisto()->GetAxis(6)->SetRangeUser(80,160); // nr clusters
1478 pTPCgain->GetDeDxHisto()->GetAxis(5)->SetRangeUser(-1,1); // eta
1480 TF1 gausFitEle("gausFitEle","gaus");
1482 if (pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mipsele_0") && !fgForceTHnSparse) {
1483 his1D = dynamic_cast<TH1*>(pTPCgain->GetHistos()->FindObject("h_tpc_dedx_mipsele_0")->Clone());
1485 his1D = pTPCgain->GetDeDxHisto()->Projection(0);
1487 if(!his1D) return 4;
1488 his1D->Fit(&gausFitEle,"QN","QN");
1490 meanMIPele = gausFitEle.GetParameter(1);
1491 resolutionMIPele = 0;
1492 if (meanMIPele!=0) resolutionMIPele = gausFitEle.GetParameter(2)/meanMIPele;
1494 //restore cuts as before
1495 pTPCgain->GetDeDxHisto()->GetAxis(7)->SetRangeUser(0.4,0.55);
1496 pTPCgain->GetDeDxHisto()->GetAxis(0)->SetRangeUser(35,60);
1497 pTPCgain->GetDeDxHisto()->GetAxis(6)->SetRangeUser(80,160);
1498 pTPCgain->GetDeDxHisto()->GetAxis(5)->SetRangeUser(-1,1);
1501 // separation between electrons and MIPs
1503 electroMIPSeparation = TMath::Abs((meanMIP-meanMIPele));
1505 printf("Gain QA report\n");
1506 printf("MIP mean\t%f\n",meanMIP);
1507 printf("MIP resolution\t%f\n",resolutionMIP);
1508 printf("MIPslopeA\t%f\n",attachSlopeA);
1509 printf("MIPslopeC\t%f\n",attachSlopeC);
1510 printf("Electons energy loss MIP mean\t%f\n",meanMIPele);
1511 printf("Electons MIP resolution\t%f\n",resolutionMIPele);
1514 (*pcstream)<<"tpcQA"<<
1515 "MIPattachSlopeC="<<attachSlopeC<<
1516 "MIPattachSlopeA="<<attachSlopeA<<
1517 "resolutionMIP="<<resolutionMIP<<
1518 "meanMIPvsSector.="<<&meanMIPvsSector<<
1519 "sector.="<<§or<<
1520 "meanMIP="<<meanMIP<<
1521 "meanMIPele="<<meanMIPele<<
1522 "resolutionMIPele="<<resolutionMIPele<<
1523 "electroMIPSeparation="<<electroMIPSeparation;
1528 //_____________________________________________________________________________
1529 Int_t AliTPCPerformanceSummary::AnalyzeEvent(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream)
1532 // Analyse Primary Vertex Distribution and Multiplicities
1534 if (!pcstream) return 1;
1535 if (!pTPC) return 1;
1539 static Double_t meanVertX=0;
1540 static Double_t rmsVertX=0;
1541 static Double_t meanVertY=0;
1542 static Double_t rmsVertY=0;
1543 static Double_t meanVertZ=0;
1544 static Double_t rmsVertZ=0;
1545 static Double_t vertStatus=0;
1546 static Double_t meanMult=0;
1547 static Double_t rmsMult=0;
1548 static Double_t meanMultPos=0;
1549 static Double_t rmsMultPos=0;
1550 static Double_t meanMultNeg=0;
1551 static Double_t rmsMultNeg=0;
1552 static Double_t vertAll = 0;
1553 static Double_t vertOK = 0;
1557 if (pTPC->GetHistos()->FindObject("h_tpc_event_6") && !fgForceTHnSparse) {
1558 his1D = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_6")->Clone());
1560 his1D = pTPC->GetTPCEventHisto()->Projection(6);
1562 if(!his1D) return 1;
1564 vertAll = his1D->GetEntries();
1565 vertOK = his1D->GetBinContent(2);
1567 vertStatus = vertOK / vertAll;
1572 pTPC->GetTPCEventHisto()->GetAxis(6)->SetRange(2,2);
1574 if (pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_0") && !fgForceTHnSparse) {
1575 his1D = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_0")->Clone());
1577 his1D = pTPC->GetTPCEventHisto()->Projection(0);
1579 if(!his1D) return 1;
1581 meanVertX = his1D->GetMean();
1582 rmsVertX = his1D->GetRMS();
1588 if (pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_1") && !fgForceTHnSparse) {
1589 his1D = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_1")->Clone());
1591 his1D = pTPC->GetTPCEventHisto()->Projection(1);
1593 if(!his1D) return 1;
1595 meanVertY = his1D->GetMean();
1596 rmsVertY = his1D->GetRMS();
1600 if (pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_2") && !fgForceTHnSparse) {
1601 hc = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_2"));
1603 //his1D = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_2")->Clone());
1604 his1D = (TH1*)hc->Clone();
1606 his1D = pTPC->GetTPCEventHisto()->Projection(2);
1608 if(!his1D) return 1;
1610 meanVertZ = his1D->GetMean();
1611 rmsVertZ = his1D->GetRMS();
1615 if (pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_3") && !fgForceTHnSparse) {
1616 hc = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_3"));
1618 //his1D = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_3")->Clone());
1619 his1D = (TH1*)hc->Clone();
1621 his1D = pTPC->GetTPCEventHisto()->Projection(3);
1623 if(!his1D) return 1;
1625 meanMult = his1D->GetMean();
1626 rmsMult = his1D->GetRMS();
1630 if (pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_4") && !fgForceTHnSparse) {
1631 his1D = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_4")->Clone());
1633 his1D = pTPC->GetTPCEventHisto()->Projection(4);
1635 if(!his1D) return 1;
1637 meanMultPos = his1D->GetMean();
1638 rmsMultPos = his1D->GetRMS();
1641 if (pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_5") && !fgForceTHnSparse) {
1642 his1D = dynamic_cast<TH1*>(pTPC->GetHistos()->FindObject("h_tpc_event_recvertex_5")->Clone());
1644 his1D = pTPC->GetTPCEventHisto()->Projection(5);
1646 if(!his1D) return 1;
1648 meanMultNeg = his1D->GetMean();
1649 rmsMultNeg = his1D->GetRMS();
1652 pTPC->GetTPCEventHisto()->GetAxis(6)->SetRange(1,2);
1654 (*pcstream)<<"tpcQA"<<
1655 "meanVertX="<<meanVertX<<
1656 "rmsVertX="<<rmsVertX<<
1657 "meanVertY="<<meanVertY<<
1658 "rmsVertY="<<rmsVertY<<
1659 "meanVertZ="<<meanVertZ<<
1660 "rmsVertZ="<<rmsVertZ<<
1661 "vertStatus="<<vertStatus<<
1662 "vertAll="<<vertAll<<
1664 "meanMult="<<meanMult<<
1665 "rmsMult="<<rmsMult<<
1666 "meanMultPos="<<meanMultPos<<
1667 "rmsMultPos="<<rmsMultPos<<
1668 "meanMultNeg="<<meanMultNeg<<
1669 "rmsMultNeg="<<rmsMultNeg;
1674 //_____________________________________________________________________________
1675 Int_t AliTPCPerformanceSummary::AnalyzePt(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream)
1678 // Analyse DCA R imperfections for positive particles
1681 if (!pcstream) return 256;
1682 if (!pTPC) return 256;
1685 static Double_t meanPtAPos = 0;
1686 static Double_t mediumPtAPos = 0;
1687 static Double_t highPtAPos = 0;
1688 static Double_t meanPtCPos = 0;
1689 static Double_t mediumPtCPos = 0;
1690 static Double_t highPtCPos = 0;
1692 static Double_t meanPtANeg = 0;
1693 static Double_t mediumPtANeg = 0;
1694 static Double_t highPtANeg = 0;
1695 static Double_t meanPtCNeg = 0;
1696 static Double_t mediumPtCNeg = 0;
1697 static Double_t highPtCNeg = 0;
1702 if (pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_7")) {
1704 his3D1 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_7"));
1705 if(!his3D1) return 256;
1707 his3D1->GetYaxis()->SetRangeUser(0.1,0.8);
1709 his3D1->GetZaxis()->SetRangeUser(0.25,10);
1710 meanPtAPos = his3D1->GetMean(3);
1711 his3D1->GetZaxis()->SetRangeUser(2,5);
1712 mediumPtAPos = his3D1->GetMean(3);
1713 his3D1->GetZaxis()->SetRangeUser(5,10);
1714 highPtAPos = his3D1->GetMean(3);
1716 his3D1->GetYaxis()->SetRangeUser(-0.8,-0.1);
1718 his3D1->GetZaxis()->SetRangeUser(0.25,10);
1719 meanPtCPos = his3D1->GetMean(3);
1720 his3D1->GetZaxis()->SetRangeUser(2,5);
1721 mediumPtCPos = his3D1->GetMean(3);
1722 his3D1->GetZaxis()->SetRangeUser(5,10);
1723 highPtCPos = his3D1->GetMean(3);
1725 his3D1->GetYaxis()->SetRangeUser(-1,1);
1726 his3D1->GetZaxis()->SetRangeUser(0.25,10);
1730 if (pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_3_5_7")) {
1732 his3D2 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_3_5_7"));
1733 if(!his3D2) return 256;
1735 his3D2->GetYaxis()->SetRangeUser(0.1,0.8);
1737 his3D2->GetZaxis()->SetRangeUser(0.25,10);
1738 meanPtANeg = his3D2->GetMean(3);
1739 his3D2->GetZaxis()->SetRangeUser(2,5);
1740 mediumPtANeg = his3D2->GetMean(3);
1741 his3D2->GetZaxis()->SetRangeUser(5,10);
1742 highPtANeg = his3D2->GetMean(3);
1744 his3D2->GetYaxis()->SetRangeUser(-0.8,-0.1);
1746 his3D2->GetZaxis()->SetRangeUser(0.25,10);
1747 meanPtCNeg = his3D2->GetMean(3);
1748 his3D2->GetZaxis()->SetRangeUser(2,5);
1749 mediumPtCNeg = his3D2->GetMean(3);
1750 his3D2->GetZaxis()->SetRangeUser(5,10);
1751 highPtCNeg = his3D2->GetMean(3);
1753 his3D2->GetYaxis()->SetRangeUser(-1,1);
1754 his3D2->GetZaxis()->SetRangeUser(0.25,10);
1761 (*pcstream)<<"tpcQA"<<
1762 "meanPtAPos="<< meanPtAPos<<
1763 "mediumPtAPos="<< mediumPtAPos<<
1764 "highPtAPos="<< highPtAPos<<
1766 "meanPtCPos="<< meanPtCPos<<
1767 "mediumPtCPos="<< mediumPtCPos<<
1768 "highPtCPos="<< highPtCPos<<
1770 "meanPtANeg="<< meanPtANeg<<
1771 "mediumPtANeg="<< mediumPtANeg<<
1772 "highPtANeg="<< highPtANeg<<
1774 "meanPtCNeg="<< meanPtCNeg<<
1775 "mediumPtCNeg="<< mediumPtCNeg<<
1776 "highPtCNeg="<< highPtCNeg;
1782 //_____________________________________________________________________________
1784 Int_t AliTPCPerformanceSummary::AnalyzeChargeOverPt(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream){
1786 // Analyse DCA R imperfections for positive particles
1789 if (!pcstream) return 512;
1790 if (!pTPC) return 512;
1793 static Double_t qOverPt = 0;
1794 static Double_t qOverPtA = 0;
1795 static Double_t qOverPtC = 0;
1801 TF1 *fp1 = new TF1("fp1","pol2",-1.0,1.0);
1802 TF1 *fp2 = new TF1("fp2","pol2",-1.0,1.0);
1803 TF1 *fp3 = new TF1("fp3","pol2",-1.0,1.0);
1805 if (pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_5_8")) {
1807 his2D = dynamic_cast<TH2*>(pTPC->GetHistos()->FindObject("h_tpc_track_all_recvertex_5_8"));
1808 if(!his2D) return 512;
1810 his1D1 = his2D->ProjectionX();
1811 his1D1->Fit(fp1,"R");
1812 if(fp1->GetParameter(2)!=0){
1813 qOverPt = (-1.0)*(fp1->GetParameter(1)/(2.0*fp1->GetParameter(2)));
1818 his2D->GetYaxis()->SetRangeUser(0.1,0.8);
1819 his1D2 = his2D->ProjectionX();
1820 his1D2->Fit(fp2,"R");
1821 if(fp2->GetParameter(2)!=0)
1822 qOverPtA = (-1.0)*(fp2->GetParameter(1)/(2.0*fp2->GetParameter(2)));
1826 his2D->GetYaxis()->SetRangeUser(-0.8,-0.1);
1827 his1D3 = his2D->ProjectionX();
1828 his1D3->Fit(fp3,"R");
1829 if(fp3->GetParameter(2)!=0)
1830 qOverPtC = (-1.0)*(fp3->GetParameter(1)/(2.0*fp3->GetParameter(2)));
1834 his2D->GetYaxis()->SetRangeUser(-1.0,1.0);
1838 (*pcstream)<<"tpcQA"<<
1839 "qOverPt="<< qOverPt<<
1840 "qOverPtA="<< qOverPtA<<
1841 "qOverPtC="<< qOverPtC;
1846 Int_t AliTPCPerformanceSummary::AnalyzeMatch(const AliPerformanceMatch* pMatch, TTreeSRedirector* const pcstream)
1848 /* if ((pMatch == 0) or (0 == pcstream)) { printf("this will not work anyway..."); }
1849 printf("funtion not implemented");*/
1851 if (!pcstream) return 1024;
1852 if (!pMatch) return 1024;
1853 static Double_t tpcItsMatchA = 0;
1854 static Double_t tpcItsMatchHighPtA = 0;
1855 static Double_t tpcItsMatchC = 0;
1856 static Double_t tpcItsMatchHighPtC = 0;
1860 if(pMatch->GetHistos()->FindObject("h_tpc_match_trackingeff_all_2_3") &&
1861 pMatch->GetHistos()->FindObject("h_tpc_match_trackingeff_tpc_2_3")){
1862 h2D = dynamic_cast<TH2*>(pMatch->GetHistos()->FindObject("h_tpc_match_trackingeff_all_2_3"));
1863 h2D1 = dynamic_cast<TH2*>(pMatch->GetHistos()->FindObject("h_tpc_match_trackingeff_tpc_2_3"));
1868 h2D->GetXaxis()->SetRangeUser(0,1.5);
1869 h2D1->GetXaxis()->SetRangeUser(0,1.5);
1871 Double_t entries,entries1;
1872 entries = h2D->GetEffectiveEntries();
1873 entries1 = h2D1->GetEffectiveEntries();
1875 tpcItsMatchA = entries1/entries;
1877 h2D->GetYaxis()->SetRangeUser(4.01,20.);
1878 h2D1->GetYaxis()->SetRangeUser(4.01,20.);
1879 entries = h2D->GetEffectiveEntries();
1880 entries1 = h2D1->GetEffectiveEntries();
1882 tpcItsMatchHighPtA = entries1/entries;
1885 h2D->GetXaxis()->SetRangeUser(-1.5,-0.01);
1886 h2D1->GetXaxis()->SetRangeUser(-1.5,-0.01);
1887 h2D->GetYaxis()->SetRangeUser(0.0,20.);
1888 h2D1->GetYaxis()->SetRangeUser(0.0,20.);
1890 entries = h2D->GetEffectiveEntries();
1891 entries1 = h2D1->GetEffectiveEntries();
1893 tpcItsMatchC = entries1/entries;
1895 h2D->GetYaxis()->SetRangeUser(4.01,20.);
1896 h2D1->GetYaxis()->SetRangeUser(4.01,20.);
1897 entries = h2D->GetEffectiveEntries();
1898 entries1 = h2D1->GetEffectiveEntries();
1900 tpcItsMatchHighPtC = entries1/entries;
1902 h2D->GetXaxis()->SetRangeUser(-1.5,1.5);
1903 h2D1->GetXaxis()->SetRangeUser(-1.5,1.5);
1904 h2D->GetYaxis()->SetRangeUser(0.0,20.);
1905 h2D1->GetYaxis()->SetRangeUser(0.0,20.);
1910 (*pcstream)<<"tpcQA"<<
1911 "tpcItsMatchA="<< tpcItsMatchA<<
1912 "tpcItsMatchHighPtA="<< tpcItsMatchHighPtA<<
1913 "tpcItsMatchC="<< tpcItsMatchC<<
1914 "tpcItsMatchHighPtC="<< tpcItsMatchHighPtC;
1919 Int_t AliTPCPerformanceSummary::AnalyzePull(const AliPerformanceMatch* pPull, TTreeSRedirector* const pcstream)
1921 /* if ((pPull == 0) or (0 == pcstream)) { printf("this will not work anyway..."); }
1922 printf("funtion not implemented");*/
1924 if (!pcstream) return 2048;
1925 if (!pPull) return 2048;
1926 static Double_t phiPull = 0;
1927 static Double_t phiPullHighPt = 0;
1928 static Double_t ptPull = 0;
1929 static Double_t ptPullHighPt = 0;
1930 static Double_t yPull = 0;
1931 static Double_t yPullHighPt = 0;
1932 static Double_t zPull = 0;
1933 static Double_t zPullHighPt = 0;
1934 static Double_t lambdaPull = 0;
1935 static Double_t lambdaPullHighPt = 0;
1938 if(pPull->GetHistos()->FindObject("h_tpc_match_pull_2_7")){
1939 h2D1 = dynamic_cast<TH2*>(pPull->GetHistos()->FindObject("h_tpc_match_pull_2_7"));
1941 phiPull = h2D1->GetMean(2);
1942 h2D1->SetAxisRange(0.0,1.0/5.0,"X");
1943 phiPullHighPt = h2D1->GetMean(2);
1944 h2D1->SetAxisRange(0.0,10.0,"X");
1949 if(pPull->GetHistos()->FindObject("h_tpc_match_pull_4_7")){
1950 h2D2 = dynamic_cast<TH2*>(pPull->GetHistos()->FindObject("h_tpc_match_pull_4_7"));
1952 ptPull = h2D2->GetMean(2);
1954 h2D2->SetAxisRange(0.0,1.0/5.0,"X");
1955 ptPullHighPt = h2D2->GetMean(2);
1956 h2D2->SetAxisRange(0.0,10.0,"X");
1961 if(pPull->GetHistos()->FindObject("h_tpc_match_pull_0_7")){
1962 h2D3 = dynamic_cast<TH2*>(pPull->GetHistos()->FindObject("h_tpc_match_pull_0_7"));
1964 yPull = h2D3->GetMean(2);
1966 h2D3->SetAxisRange(0.0,1.0/5.0,"X");
1967 yPullHighPt = h2D3->GetMean(2);
1968 h2D3->SetAxisRange(0.0,10.0,"X");
1973 if(pPull->GetHistos()->FindObject("h_tpc_match_pull_1_7")){
1974 h2D4 = dynamic_cast<TH2*>(pPull->GetHistos()->FindObject("h_tpc_match_pull_1_7"));
1976 zPull = h2D4->GetMean(2);
1978 h2D4->SetAxisRange(0.0,1.0/5.0,"X");
1979 zPullHighPt = h2D4->GetMean(2);
1980 h2D4->SetAxisRange(0.0,10.0,"X");
1985 if(pPull->GetHistos()->FindObject("h_tpc_match_pull_3_7")){
1986 h2D5 = dynamic_cast<TH2*>(pPull->GetHistos()->FindObject("h_tpc_match_pull_3_7"));
1988 lambdaPull = h2D5->GetMean(2);
1990 h2D5->SetAxisRange(0.0,1.0/5.0,"X");
1991 lambdaPullHighPt = h2D5->GetMean(2);
1992 h2D5->SetAxisRange(0.0,10.0,"X");
1996 (*pcstream)<<"tpcQA"<<
1997 "phiPull="<< phiPull<<
1998 "phiPullHighPt="<< phiPullHighPt<<
1999 "ptPull="<< ptPull<<
2000 "ptPullHighPt="<< ptPullHighPt<<
2002 "yPullHighPt="<< yPullHighPt<<
2004 "zPullHighPt="<< zPullHighPt<<
2005 "lambdaPull="<< lambdaPull<<
2006 "lambdaPullHighPt="<< lambdaPullHighPt;
2010 Int_t AliTPCPerformanceSummary::AnalyzeConstrain(const AliPerformanceMatch* pConstrain, TTreeSRedirector* pcstream)
2012 if (!pcstream) return 5126;
2013 if (!pConstrain) return 5126;
2016 static Double_t tpcConstrainPhiA = 0;
2017 static Double_t tpcConstrainPhiC = 0;
2019 if (pConstrain->GetHistos()->FindObject("h_tpc_constrain_tpc_0_2_3")) {
2021 his3D = dynamic_cast<TH3*>(pConstrain->GetHistos()->FindObject("h_tpc_constrain_tpc_0_2_3"));//phi pull:pt:eta
2022 if(!his3D) return 5126;
2024 his3D->GetZaxis()->SetRangeUser(0.0,1.0);
2025 tpcConstrainPhiA = his3D->GetMean(1);
2026 his3D->GetZaxis()->SetRangeUser(-1.0,-0.001);
2027 tpcConstrainPhiC = his3D->GetMean(1);
2030 (*pcstream)<<"tpcQA"<<
2031 "tpcConstrainPhiA="<<tpcConstrainPhiA <<
2032 "tpcConstrainPhiC="<< tpcConstrainPhiC;
2037 //_____________________________________________________________________________
2038 Int_t AliTPCPerformanceSummary::AnalyzeQAPosNegDpT(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream)
2040 //function which plot 1/Pt for negative and
2041 //positive particles
2043 if (!pcstream) return 512;
2044 if (!pTPC) return 512;
2054 static Double_t deltaPtC = 0;
2055 static Double_t deltaPtchi2C = 0;
2056 static Double_t slopeC = 0;
2057 static Double_t deltaPtA = 0;
2058 static Double_t deltaPtchi2A = 0;
2059 static Double_t slopeA = 0;
2060 static Double_t deltaPt = 0;
2061 static Double_t deltaPtchi2 = 0;
2062 static Double_t slope = 0;
2063 static Double_t deltaPt_Err = 0;
2064 static Double_t deltaPtA_Err = 0;
2065 static Double_t deltaPtC_Err = 0;
2070 if(pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_0_5_7"))
2072 pos3 = dynamic_cast<TH3D*>(pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_0_5_7"));
2073 if(!pos3) return 512;
2075 pos = pos3->ProjectionZ("pos",71,-1,6,25);
2076 posC = pos3->ProjectionZ("posC",71,-1,6,15);
2077 posA = pos3->ProjectionZ("posA",71,-1,16,25);
2080 if(pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_0_5_7")){
2081 neg3 = dynamic_cast<TH3D*>(pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_0_5_7"));
2082 if(!neg3) return 512;
2084 neg = neg3->ProjectionZ("neg",71,-1,6,25);
2085 negC = neg3->ProjectionZ("negC",71,-1,6,15);
2086 negA = neg3->ProjectionZ("negA",71,-1,16,25);
2089 if(!pos) return 512;
2090 if(!neg) return 512;
2091 if(!posA) return 512;
2092 if(!negA) return 512;
2093 if(!posC) return 512;
2094 if(!negC) return 512;
2103 pos->Scale(1.,"width");
2104 neg->Scale(1.,"width");
2105 posA->Scale(1.,"width");
2106 negA->Scale(1.,"width");
2107 posC->Scale(1.,"width");
2108 negC->Scale(1.,"width");
2112 TF1 fpt("fpt","[1]*exp(-1/((1/x))*[0])",0.1,10);
2113 TF1 fpt2("fpt2","[1]*exp(-1/((1/x))*[0])",0.1,10);
2114 fpt.SetParameters(1,0.5);
2115 fpt2.SetParameters(1,0.5);
2116 pos->Fit(&fpt,"","",1,4); pos->Fit(&fpt,"","",1,4); pos->Fit(&fpt,"","",1,4);
2117 neg->Fit(&fpt2,"","",1,4); neg->Fit(&fpt2,"","",1,4); neg->Fit(&fpt2,"","",1,4);
2119 slope = (fpt.GetParameter(0)+fpt2.GetParameter(0))/2.;
2121 TH1D* ratio = new TH1D(*pos);
2125 TF1 fptRatio("fptratio","[2]*exp(-1/((1/x)+[1])*[0])/exp(-1/((1/x)-[1])*[0])",0.1,10);
2126 fptRatio.SetParameters(0.5,0.006,1);
2127 fptRatio.FixParameter(0,slope);
2129 ratio->Fit(&fptRatio,"","",1,4); ratio->Fit(&fptRatio,"","",1,4);
2130 ratio->Fit(&fptRatio,"","",1,4);
2132 deltaPt = fptRatio.GetParameter(1);
2133 deltaPtchi2 = fptRatio.GetChisquare();
2136 deltaPt_Err = fptRatio.GetParError(1);
2141 TF1 fptA("fptA","[1]*exp(-1/((1/x))*[0])",0.1,10);
2142 TF1 fpt2A("fpt2A","[1]*exp(-1/((1/x))*[0])",0.1,10);
2143 fptA.SetParameters(1,0.5);
2144 fpt2A.SetParameters(1,0.5);
2145 posA->Fit(&fptA,"","",1,4); posA->Fit(&fptA,"","",1,4); posA->Fit(&fptA,"","",1,4);
2146 negA->Fit(&fpt2A,"","",1,4); negA->Fit(&fpt2A,"","",1,4); negA->Fit(&fpt2A,"","",1,4);
2148 slopeA = (fptA.GetParameter(0)+fpt2A.GetParameter(0))/2.;
2150 TH1D* ratioA = new TH1D(*posA);
2151 ratioA->Divide(negA);
2154 TF1 fptRatioA("fptratioA","[2]*exp(-1/((1/x)+[1])*[0])/exp(-1/((1/x)-[1])*[0])",0.1,10);
2155 fptRatioA.SetParameters(0.5,0.006,1);
2156 fptRatioA.FixParameter(0,slopeA);
2158 ratioA->Fit(&fptRatioA,"","",1,4); ratio->Fit(&fptRatioA,"","",1,4);
2159 ratioA->Fit(&fptRatioA,"","",1,4);
2161 deltaPtA = fptRatioA.GetParameter(1);
2162 deltaPtchi2A = fptRatioA.GetChisquare();
2165 deltaPtA_Err = fptRatioA.GetParError(1);
2173 TF1 fptC("fptC","[1]*exp(-1/((1/x))*[0])",0.1,10);
2174 TF1 fpt2C("fpt2C","[1]*exp(-1/((1/x))*[0])",0.1,10);
2175 fptC.SetParameters(1,0.5);
2176 fpt2C.SetParameters(1,0.5);
2177 posC->Fit(&fptC,"","",1,4); posC->Fit(&fptC,"","",1,4); posC->Fit(&fptC,"","",1,4);
2178 negC->Fit(&fpt2C,"","",1,4); negC->Fit(&fpt2C,"","",1,4); negC->Fit(&fpt2C,"","",1,4);
2180 slopeC = (fptC.GetParameter(0)+fpt2C.GetParameter(0))/2.;
2182 TH1D* ratioC = new TH1D(*posC);
2183 ratioC->Divide(negC);
2186 TF1 fptRatioC("fptratioC","[2]*exp(-1/((1/x)+[1])*[0])/exp(-1/((1/x)-[1])*[0])",0.1,10);
2187 fptRatioC.SetParameters(0.5,0.006,1);
2188 fptRatioC.FixParameter(0,slopeC);
2190 ratioC->Fit(&fptRatioC,"","",1,4); ratio->Fit(&fptRatioC,"","",1,4);
2191 ratioC->Fit(&fptRatioC,"","",1,4);
2193 deltaPtC = fptRatioC.GetParameter(1);
2194 deltaPtchi2C = fptRatioC.GetChisquare();
2197 deltaPtC_Err = fptRatioC.GetParError(1);
2204 (*pcstream)<<"tpcQA"<<
2205 "deltaPt="<< deltaPt<<
2206 "deltaPtchi2="<< deltaPtchi2<<
2207 "deltaPtA="<< deltaPtA<<
2208 "deltaPtchi2A="<< deltaPtchi2A<<
2209 "deltaPtC="<< deltaPtC<<
2210 "deltaPtchi2C="<< deltaPtchi2C<<
2211 "deltaPt_Err="<< deltaPt_Err<<
2212 "deltaPtA_Err="<< deltaPtA_Err<<
2213 "deltaPtC_Err="<< deltaPtC_Err;
2218 //_____________________________________________________________________________
2219 Int_t AliTPCPerformanceSummary::AnalyzeQADCAFitParameter(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream)
2223 //function which retrieve DCA fit parameters
2226 if (!pcstream) return 16;
2227 if (!pTPC) return 16;
2234 static Double_t dcar_posA_0=0;
2235 static Double_t dcar_posA_1=0;
2236 static Double_t dcar_posA_2=0;
2237 static Double_t dcar_posA_chi2=0;
2238 static Double_t dcar_posA_0_Err=0;
2239 static Double_t dcar_posA_1_Err=0;
2240 static Double_t dcar_posA_2_Err=0;
2242 static Double_t dcar_posC_0=0;
2243 static Double_t dcar_posC_1=0;
2244 static Double_t dcar_posC_2=0;
2245 static Double_t dcar_posC_chi2=0;
2246 static Double_t dcar_posC_0_Err=0;
2247 static Double_t dcar_posC_1_Err=0;
2248 static Double_t dcar_posC_2_Err=0;
2250 static Double_t dcaz_posA_0=0;
2251 static Double_t dcaz_posA_1=0;
2252 static Double_t dcaz_posA_2=0;
2253 static Double_t dcaz_posA_chi2=0;
2254 static Double_t dcaz_posA_0_Err=0;
2255 static Double_t dcaz_posA_1_Err=0;
2256 static Double_t dcaz_posA_2_Err=0;
2258 static Double_t dcaz_posC_0=0;
2259 static Double_t dcaz_posC_1=0;
2260 static Double_t dcaz_posC_2=0;
2261 static Double_t dcaz_posC_chi2=0;
2262 static Double_t dcaz_posC_0_Err=0;
2263 static Double_t dcaz_posC_1_Err=0;
2264 static Double_t dcaz_posC_2_Err=0;
2266 static Double_t dcar_negA_0=0;
2267 static Double_t dcar_negA_1=0;
2268 static Double_t dcar_negA_2=0;
2269 static Double_t dcar_negA_chi2=0;
2270 static Double_t dcar_negA_0_Err=0;
2271 static Double_t dcar_negA_1_Err=0;
2272 static Double_t dcar_negA_2_Err=0;
2274 static Double_t dcar_negC_0=0;
2275 static Double_t dcar_negC_1=0;
2276 static Double_t dcar_negC_2=0;
2277 static Double_t dcar_negC_chi2=0;
2278 static Double_t dcar_negC_0_Err=0;
2279 static Double_t dcar_negC_1_Err=0;
2280 static Double_t dcar_negC_2_Err=0;
2282 static Double_t dcaz_negA_0=0;
2283 static Double_t dcaz_negA_1=0;
2284 static Double_t dcaz_negA_2=0;
2285 static Double_t dcaz_negA_chi2=0;
2286 static Double_t dcaz_negA_0_Err=0;
2287 static Double_t dcaz_negA_1_Err=0;
2288 static Double_t dcaz_negA_2_Err=0;
2290 static Double_t dcaz_negC_0=0;
2291 static Double_t dcaz_negC_1=0;
2292 static Double_t dcaz_negC_2=0;
2293 static Double_t dcaz_negC_chi2=0;
2294 static Double_t dcaz_negC_0_Err=0;
2295 static Double_t dcaz_negC_1_Err=0;
2296 static Double_t dcaz_negC_2_Err=0;
2298 if (pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_6")) {
2299 dcar_pos3 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_6"));
2302 if (pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_6")) {
2303 dcaz_pos3 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_4_5_6"));
2306 if (pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_6")) {
2307 dcar_neg3 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_3_5_6"));
2310 if (pTPC->GetHistos()->FindObject("h_tpc_track_pos_recvertex_3_5_6")) {
2311 dcaz_neg3 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_track_neg_recvertex_4_5_6"));
2314 TF1 fit("fit","[0]+[1]*cos(x)+[2]*sin(x)",0,7);
2316 dcar_pos3->GetYaxis()->SetRangeUser(0,0.99);
2317 TH1* dcar_posA = (dynamic_cast<TH2*>(dcar_pos3->Project3D("xz_1")))->ProfileX();
2318 dcar_posA->Fit(&fit,"NQ");
2319 dcar_posA_0 = fit.GetParameter(0);
2320 dcar_posA_1 = fit.GetParameter(1);
2321 dcar_posA_2 = fit.GetParameter(2);
2322 dcar_posA_chi2 = fit.GetChisquare();
2323 dcar_posA_0_Err = fit.GetParError(0);
2324 dcar_posA_1_Err = fit.GetParError(1);
2325 dcar_posA_2_Err = fit.GetParError(2);
2327 dcar_pos3->GetYaxis()->SetRangeUser(-1.0,-0.01);
2328 TH1* dcar_posC = (dynamic_cast<TH2*>(dcar_pos3->Project3D("xz_2")))->ProfileX();
2329 dcar_posC->Fit(&fit,"NQ");
2330 dcar_posC_0 = fit.GetParameter(0);
2331 dcar_posC_1 = fit.GetParameter(1);
2332 dcar_posC_2 = fit.GetParameter(2);
2333 dcar_posC_chi2 = fit.GetChisquare();
2334 dcar_posC_0_Err = fit.GetParError(0);
2335 dcar_posC_1_Err = fit.GetParError(1);
2336 dcar_posC_2_Err = fit.GetParError(2);
2338 dcaz_pos3->GetYaxis()->SetRangeUser(0,0.99);
2339 TH1* dcaz_posA = (dynamic_cast<TH2*>(dcaz_pos3->Project3D("xz_3")))->ProfileX();
2340 dcaz_posA->Fit(&fit,"NQ");
2341 dcaz_posA_0 = fit.GetParameter(0);
2342 dcaz_posA_1 = fit.GetParameter(1);
2343 dcaz_posA_2 = fit.GetParameter(2);
2344 dcaz_posA_chi2 = fit.GetChisquare();
2345 dcaz_posA_0_Err = fit.GetParError(0);
2346 dcaz_posA_1_Err = fit.GetParError(1);
2347 dcaz_posA_2_Err = fit.GetParError(2);
2349 dcaz_pos3->GetYaxis()->SetRangeUser(-1.0,-0.01);
2350 TH1* dcaz_posC = (dynamic_cast<TH2*>(dcaz_pos3->Project3D("xz_4")))->ProfileX();
2351 dcaz_posC->Fit(&fit,"NQ");
2352 dcaz_posC_0 = fit.GetParameter(0);
2353 dcaz_posC_1 = fit.GetParameter(1);
2354 dcaz_posC_2 = fit.GetParameter(2);
2355 dcaz_posC_chi2 = fit.GetChisquare();
2356 dcaz_posC_0_Err = fit.GetParError(0);
2357 dcaz_posC_1_Err = fit.GetParError(1);
2358 dcaz_posC_2_Err = fit.GetParError(2);
2362 dcar_neg3->GetYaxis()->SetRangeUser(0,0.99);
2363 TH1* dcar_negA = (dynamic_cast<TH2*>(dcar_neg3->Project3D("xz_1")))->ProfileX();
2364 dcar_negA->Fit(&fit,"NQ");
2365 dcar_negA_0 = fit.GetParameter(0);
2366 dcar_negA_1 = fit.GetParameter(1);
2367 dcar_negA_2 = fit.GetParameter(2);
2368 dcar_negA_chi2 = fit.GetChisquare();
2369 dcar_negA_0_Err = fit.GetParError(0);
2370 dcar_negA_1_Err = fit.GetParError(1);
2371 dcar_negA_2_Err = fit.GetParError(2);
2373 dcar_neg3->GetYaxis()->SetRangeUser(-1.0,-0.01);
2374 TH1* dcar_negC = (dynamic_cast<TH2*>(dcar_neg3->Project3D("xz_2")))->ProfileX();
2375 dcar_negC->Fit(&fit,"NQ");
2376 dcar_negC_0 = fit.GetParameter(0);
2377 dcar_negC_1 = fit.GetParameter(1);
2378 dcar_negC_2 = fit.GetParameter(2);
2379 dcar_negC_chi2 = fit.GetChisquare();
2380 dcar_negC_0_Err = fit.GetParError(0);
2381 dcar_negC_1_Err = fit.GetParError(1);
2382 dcar_negC_2_Err = fit.GetParError(2);
2384 dcaz_neg3->GetYaxis()->SetRangeUser(0,0.99);
2385 TH1* dcaz_negA = (dynamic_cast<TH2*>(dcaz_neg3->Project3D("xz_3")))->ProfileX();
2386 dcaz_negA->Fit(&fit,"NQ");
2387 dcaz_negA_0 = fit.GetParameter(0);
2388 dcaz_negA_1 = fit.GetParameter(1);
2389 dcaz_negA_2 = fit.GetParameter(2);
2390 dcaz_negA_chi2 = fit.GetChisquare();
2391 dcaz_negA_0_Err = fit.GetParError(0);
2392 dcaz_negA_1_Err = fit.GetParError(1);
2393 dcaz_negA_2_Err = fit.GetParError(2);
2395 dcaz_neg3->GetYaxis()->SetRangeUser(-1.0,-0.01);
2396 TH1* dcaz_negC = (dynamic_cast<TH2*>(dcaz_neg3->Project3D("xz_4")))->ProfileX();
2397 dcaz_negC->Fit(&fit,"NQ");
2398 dcaz_negC_0 = fit.GetParameter(0);
2399 dcaz_negC_1 = fit.GetParameter(1);
2400 dcaz_negC_2 = fit.GetParameter(2);
2401 dcaz_negC_chi2 = fit.GetChisquare();
2402 dcaz_negC_0_Err = fit.GetParError(0);
2403 dcaz_negC_1_Err = fit.GetParError(1);
2404 dcaz_negC_2_Err = fit.GetParError(2);
2407 // store results (shift in dca) in ttree
2409 (*pcstream)<<"tpcQA"<<
2410 "dcar_posA_0="<< dcar_posA_0<<
2411 "dcar_posA_1="<< dcar_posA_1<<
2412 "dcar_posA_2="<< dcar_posA_2<<
2413 "dcar_posA_chi2="<< dcar_posA_chi2<<
2414 "dcar_posA_0_Err="<< dcar_posA_0_Err<<
2415 "dcar_posA_1_Err="<< dcar_posA_1_Err<<
2416 "dcar_posA_2_Err="<< dcar_posA_2_Err;
2418 (*pcstream)<<"tpcQA"<<
2419 "dcaz_posA_0="<< dcaz_posA_0<<
2420 "dcaz_posA_1="<< dcaz_posA_1<<
2421 "dcaz_posA_2="<< dcaz_posA_2<<
2422 "dcaz_posA_chi2="<< dcaz_posA_chi2<<
2423 "dcaz_posA_0_Err="<< dcaz_posA_0_Err<<
2424 "dcaz_posA_1_Err="<< dcaz_posA_1_Err<<
2425 "dcaz_posA_2_Err="<< dcaz_posA_2_Err;
2427 (*pcstream)<<"tpcQA"<<
2428 "dcaz_posC_0="<< dcaz_posC_0<<
2429 "dcaz_posC_1="<< dcaz_posC_1<<
2430 "dcaz_posC_2="<< dcaz_posC_2<<
2431 "dcaz_posC_chi2="<< dcaz_posC_chi2<<
2432 "dcaz_posC_0_Err="<< dcaz_posC_0_Err<<
2433 "dcaz_posC_1_Err="<< dcaz_posC_1_Err<<
2434 "dcaz_posC_2_Err="<< dcaz_posC_2_Err;
2436 (*pcstream)<<"tpcQA"<<
2437 "dcar_posC_0="<< dcar_posC_0<<
2438 "dcar_posC_1="<< dcar_posC_1<<
2439 "dcar_posC_2="<< dcar_posC_2<<
2440 "dcar_posC_chi2="<< dcar_posC_chi2<<
2441 "dcar_posC_0_Err="<< dcar_posC_0_Err<<
2442 "dcar_posC_1_Err="<< dcar_posC_1_Err<<
2443 "dcar_posC_2_Err="<< dcar_posC_2_Err;
2446 (*pcstream)<<"tpcQA"<<
2447 "dcar_negA_0="<< dcar_negA_0<<
2448 "dcar_negA_1="<< dcar_negA_1<<
2449 "dcar_negA_2="<< dcar_negA_2<<
2450 "dcar_negA_chi2="<< dcar_negA_chi2<<
2451 "dcar_negA_0_Err="<< dcar_negA_0_Err<<
2452 "dcar_negA_1_Err="<< dcar_negA_1_Err<<
2453 "dcar_negA_2_Err="<< dcar_negA_2_Err;
2455 (*pcstream)<<"tpcQA"<<
2456 "dcaz_negA_0="<< dcaz_negA_0<<
2457 "dcaz_negA_1="<< dcaz_negA_1<<
2458 "dcaz_negA_2="<< dcaz_negA_2<<
2459 "dcaz_negA_chi2="<< dcaz_negA_chi2<<
2460 "dcaz_negA_0_Err="<< dcaz_negA_0_Err<<
2461 "dcaz_negA_1_Err="<< dcaz_negA_1_Err<<
2462 "dcaz_negA_2_Err="<< dcaz_negA_2_Err;
2464 (*pcstream)<<"tpcQA"<<
2465 "dcaz_negC_0="<< dcaz_negC_0<<
2466 "dcaz_negC_1="<< dcaz_negC_1<<
2467 "dcaz_negC_2="<< dcaz_negC_2<<
2468 "dcaz_negC_chi2="<< dcaz_negC_chi2<<
2469 "dcaz_negC_0_Err="<< dcaz_negC_0_Err<<
2470 "dcaz_negC_1_Err="<< dcaz_negC_1_Err<<
2471 "dcaz_negC_2_Err="<< dcaz_negC_2_Err;
2473 (*pcstream)<<"tpcQA"<<
2474 "dcar_negC_0="<< dcar_negC_0<<
2475 "dcar_negC_1="<< dcar_negC_1<<
2476 "dcar_negC_2="<< dcar_negC_2<<
2477 "dcar_negC_chi2="<< dcar_negC_chi2<<
2478 "dcar_negC_0_Err="<< dcar_negC_0_Err<<
2479 "dcar_negC_1_Err="<< dcar_negC_1_Err<<
2480 "dcar_negC_2_Err="<< dcar_negC_2_Err;
2485 //_____________________________________________________________________________
2486 Int_t AliTPCPerformanceSummary::AnalyzeOcc(const AliPerformanceTPC* pTPC, TTreeSRedirector* const pcstream)
2489 //function which make trending of occupany per side and IROC-OROC
2492 if (!pcstream) return 16;
2493 if (!pTPC) return 16;
2499 static Double_t norm=0;
2500 static Double_t mean_occ_chamber=0;
2501 static Double_t rms_mean_occ_chamber=0;
2502 static Float_t occ_chamber=0;
2503 static Double_t rmsNr = 3.0;
2504 static Int_t n_chamber_lowOcc = 0;
2505 static Double_t minOcc= 0;
2507 //nr of chamber within the thresholds
2508 static Int_t iroc_A_side =0;
2509 static Int_t oroc_A_side=0;
2510 static Int_t iroc_C_side =0;
2511 static Int_t oroc_C_side =0;
2513 //occupancy for each chamber, normalized to the total occupancy
2514 static TVectorF meanOccArray_iroc(36);
2515 static TVectorF meanOccArray_oroc(36);
2517 if (pTPC->GetHistos()->FindObject("h_tpc_clust_0_1_2")) {
2518 h3D_1 = dynamic_cast<TH3*>(pTPC->GetHistos()->FindObject("h_tpc_clust_0_1_2"));
2521 //////////////////////////////////////////
2523 h3D_1->GetZaxis()->SetRangeUser(0,0.99); //A side
2524 h3D_1->GetXaxis()->SetRangeUser(0,160); //IROC + OROC
2525 his2D = dynamic_cast<TH2*>(h3D_1->Project3D("xy_A_norm"));
2526 if(!his2D) return 4;
2527 his1D = his2D->ProjectionX();
2528 norm = his1D->Integral();
2529 printf("normalization: \t%f\n",norm);
2530 if (norm < 0.001) norm=0.00001;
2533 //////////////////////////////////////////
2535 h3D_1->GetZaxis()->SetRangeUser(0,0.99); //A_side
2536 h3D_1->GetXaxis()->SetRangeUser(0,63); //IROC
2538 his2D = dynamic_cast<TH2*>(h3D_1->Project3D("xy_A_side_IROC"));
2539 if(!his2D) return 4;
2541 printf("-------------- A_IROC occupancy \t\n");
2543 for(Int_t i = 0; i < 18; i++) { //fill IROC A_side
2544 Float_t phiLow = i*(20./360.)*(2*TMath::Pi());
2545 Float_t phiUp = (i+1)*(20./360.)*(2*TMath::Pi());
2546 his2D->GetXaxis()->SetRangeUser(phiLow,phiUp);
2547 his1D = his2D->ProjectionX();
2548 occ_chamber = (his1D->Integral()) / norm;
2549 printf("%d occ_chamber \t%f \t phiLow phiUp \t%f %f \n",i, occ_chamber, phiLow, phiUp);
2550 meanOccArray_iroc[i]= occ_chamber;//fill array with occupancy for each chamber
2551 mean_occ_chamber += occ_chamber;//compute the average occupancy
2552 rms_mean_occ_chamber += occ_chamber*occ_chamber;
2557 mean_occ_chamber /= 18; //nr of sectors
2558 rms_mean_occ_chamber /= 18; //nr of sectors
2560 rms_mean_occ_chamber = TMath::Sqrt( TMath::Abs(rms_mean_occ_chamber - (mean_occ_chamber*mean_occ_chamber)) );
2561 minOcc = mean_occ_chamber - rmsNr*rms_mean_occ_chamber;
2563 printf("mean_occ_chamber +- rms_mean_occ_chamber \t%f\t%f \n", mean_occ_chamber, rms_mean_occ_chamber);
2564 printf("min Occ allowed (threshold) \t%f \n", minOcc);
2566 for (Int_t i = 0; i<18; i++) {
2567 if (meanOccArray_iroc[i] < minOcc) {n_chamber_lowOcc++;}
2569 iroc_A_side = (18 - n_chamber_lowOcc); //nr of iroc above the thr
2570 printf("Nr of iroc_A_side \t%i \n \n ",iroc_A_side);
2573 rms_mean_occ_chamber=0;
2577 ////////////////////////////////////////////
2579 h3D_1->GetZaxis()->SetRangeUser(0,0.99); //A_side
2580 h3D_1->GetXaxis()->SetRangeUser(64,160); //OROC
2582 his2D = dynamic_cast<TH2*>(h3D_1->Project3D("xy_A_side_OROC"));
2583 if(!his2D) return 4;
2585 printf("-------------- A_OROC occupancy \t\n");
2587 for(Int_t i = 0; i < 18; i++) {
2588 Float_t phiLow = i*(20./360.)*(2*TMath::Pi());
2589 Float_t phiUp = (i+1)*(20./360.)*(2*TMath::Pi());
2590 his2D->GetXaxis()->SetRangeUser(phiLow,phiUp);
2591 his1D = his2D->ProjectionX();
2592 occ_chamber = (his1D->Integral()) / norm;
2593 printf("%d occ_chamber \t%f \t phiLow phiUp \t%f %f \n",i, occ_chamber, phiLow, phiUp);
2594 meanOccArray_oroc[i]= occ_chamber;//fill array with occupancy for each chamber
2595 mean_occ_chamber += occ_chamber;//compute the average occupancy
2596 rms_mean_occ_chamber += occ_chamber*occ_chamber;
2601 mean_occ_chamber /= 18; //nr of sectors
2602 rms_mean_occ_chamber /= 18; //nr of sectors
2604 rms_mean_occ_chamber = TMath::Sqrt( TMath::Abs(rms_mean_occ_chamber - (mean_occ_chamber*mean_occ_chamber)) );
2605 minOcc = mean_occ_chamber - rmsNr*rms_mean_occ_chamber;
2607 printf("mean_occ_chamber +- rms_mean_occ_chamber \t%f\t%f \n", mean_occ_chamber, rms_mean_occ_chamber);
2608 printf("min Occ allowed (threshold) \t%f \n", minOcc);
2610 for (Int_t i = 0; i<18; i++) {
2611 if (meanOccArray_oroc[i] < minOcc) {n_chamber_lowOcc++;}
2613 oroc_A_side = (18 - n_chamber_lowOcc); //variable stored in the trending
2614 printf("Nr of oroc_A_side \t%i \n \n ",oroc_A_side);
2617 rms_mean_occ_chamber=0;
2622 ////////////////////////////////////////////////////////////////////////////////
2624 //////////////////////////////////////////
2627 h3D_1->GetZaxis()->SetRangeUser(-1,-0.001); //C side
2628 h3D_1->GetXaxis()->SetRangeUser(0,160); //IROC + OROC
2629 his2D = dynamic_cast<TH2*>(h3D_1->Project3D("xy_C_norm"));
2630 if(!his2D) return 4;
2631 his1D = his2D->ProjectionX();
2632 norm = his1D->Integral();
2633 printf("normalization: \t%f\n",norm);
2634 if (norm < 0.001) norm=0.00001;
2637 //////////////////////////////////////////
2639 h3D_1->GetZaxis()->SetRangeUser(-1,-0.001); //C_side
2640 h3D_1->GetXaxis()->SetRangeUser(0,63); //IROC
2642 his2D = dynamic_cast<TH2*>(h3D_1->Project3D("xy_C_side_IROC"));
2643 if(!his2D) return 4;
2645 printf("-------------- C_IROC occupancy \t\n");
2647 for(Int_t i = 0; i < 18; i++) {
2648 Float_t phiLow = i*(20./360.)*(2*TMath::Pi());
2649 Float_t phiUp = (i+1)*(20./360.)*(2*TMath::Pi());
2650 his2D->GetXaxis()->SetRangeUser(phiLow,phiUp);
2651 his1D = his2D->ProjectionX();
2652 occ_chamber = (his1D->Integral()) / norm;
2653 printf("%d occ_chamber \t%f \t phiLow phiUp \t%f %f \n",i, occ_chamber, phiLow, phiUp);
2654 meanOccArray_iroc[18+i]= occ_chamber;//fill array with occupancy for each chamber, C side, therefore index 18+i
2655 mean_occ_chamber += occ_chamber;//compute the average occupancy
2656 rms_mean_occ_chamber += occ_chamber*occ_chamber;
2661 mean_occ_chamber /= 18; //nr of sectors
2662 rms_mean_occ_chamber /= 18; //nr of sectors
2664 rms_mean_occ_chamber = TMath::Sqrt( TMath::Abs(rms_mean_occ_chamber - (mean_occ_chamber*mean_occ_chamber)) );
2665 minOcc = mean_occ_chamber - rmsNr*rms_mean_occ_chamber;
2667 printf("mean_occ_chamber +- rms_mean_occ_chamber \t%f\t%f \n", mean_occ_chamber, rms_mean_occ_chamber);
2668 printf("min Occ allowed (threshold) \t%f \n", minOcc);
2670 for (Int_t i = 18; i<36; i++) {
2671 if (meanOccArray_iroc[i] < minOcc) {n_chamber_lowOcc++;}
2673 iroc_C_side = (18 - n_chamber_lowOcc); //variable stored in the trending
2674 printf("Nr of iroc_C_side \t%i \n \n ",iroc_C_side);
2677 rms_mean_occ_chamber=0;
2682 ////////////////////////////////////////////
2684 h3D_1->GetZaxis()->SetRangeUser(-1,-0.001); //C_side
2685 h3D_1->GetXaxis()->SetRangeUser(64,160); //OROC
2687 his2D = dynamic_cast<TH2*>(h3D_1->Project3D("xy_C_side_OROC"));
2688 if(!his2D) return 4;
2690 printf("-------------- C_OROC occupancy \t\n");
2692 for(Int_t i = 0; i < 18; i++) {
2693 Float_t phiLow = i*(20./360.)*(2*TMath::Pi());
2694 Float_t phiUp = (i+1)*(20./360.)*(2*TMath::Pi());
2695 his2D->GetXaxis()->SetRangeUser(phiLow,phiUp);
2696 his1D = his2D->ProjectionX();
2697 occ_chamber = (his1D->Integral()) / norm;
2698 printf("%d occ_chamber \t%f \t phiLow phiUp \t%f %f \n",i, occ_chamber, phiLow, phiUp);
2699 meanOccArray_oroc[18+i]= occ_chamber;//fill array with occupancy for each chamber
2700 mean_occ_chamber += occ_chamber;//compute the average occupancy
2701 rms_mean_occ_chamber += occ_chamber*occ_chamber;
2706 mean_occ_chamber /= 18; //nr of sectors
2707 rms_mean_occ_chamber /= 18; //nr of sectors
2709 rms_mean_occ_chamber = TMath::Sqrt( TMath::Abs(rms_mean_occ_chamber - (mean_occ_chamber*mean_occ_chamber)) );
2710 minOcc = mean_occ_chamber - rmsNr*rms_mean_occ_chamber;
2712 printf("mean_occ_chamber +- rms_mean_occ_chamber \t%f\t%f \n", mean_occ_chamber, rms_mean_occ_chamber);
2713 printf("min Occ allowed (threshold) \t%f \n", minOcc);
2715 for (Int_t i = 18; i<36; i++) {
2716 if (meanOccArray_oroc[i] < minOcc) {n_chamber_lowOcc++;}
2718 oroc_C_side = (18 - n_chamber_lowOcc); //variable stored in the trending
2719 printf("Nr of oroc_C_side \t%i \n \n ",oroc_C_side);
2722 rms_mean_occ_chamber=0;
2727 (*pcstream)<<"tpcQA"<<
2728 "iroc_A_side="<< iroc_A_side<<
2729 "oroc_A_side="<< oroc_A_side<<
2730 "iroc_C_side="<< iroc_C_side<<
2731 "oroc_C_side="<< oroc_C_side<<
2733 "TPC_Occ_IROC.="<< &meanOccArray_iroc<<
2735 "TPC_Occ_OROC.="<< &meanOccArray_oroc;