40 #include <TFriendElement.h>
45 #include <TProfile2D.h>
51 #include <TObjString.h>
56 #include <TTreeStream.h>
59 #include "AliMathBase.h"
80 fListOfObjectsToBeDeleted(0),
81 fTreeMustBeDeleted(0),
96 fListOfObjectsToBeDeleted(0),
97 fTreeMustBeDeleted(0),
117 fListOfObjectsToBeDeleted(0),
118 fTreeMustBeDeleted(0),
136 fListOfObjectsToBeDeleted(0),
137 fTreeMustBeDeleted(0),
145 fFile =
new TFile(fileName,
"read");
159 if (
this == ¶m)
return (*
this);
177 fTree->SetCacheSize(0);
200 fTree->SetCacheSize(0);
233 TString removeString =
"!#";
234 TString replaceString =
"";
235 TString searchString =
"";
236 TString normString =
"";
238 listOfVariables->Add(
new TObjString(
"channel"));
239 listOfVariables->Add(
new TObjString(
"gx"));
240 listOfVariables->Add(
new TObjString(
"gy"));
241 listOfVariables->Add(
new TObjString(
"lx"));
242 listOfVariables->Add(
new TObjString(
"ly"));
243 listOfVariables->Add(
new TObjString(
"pad"));
244 listOfVariables->Add(
new TObjString(
"row"));
245 listOfVariables->Add(
new TObjString(
"rpad"));
246 listOfVariables->Add(
new TObjString(
"sector"));
248 Int_t nVariables = listOfVariables->GetEntriesFast();
249 Int_t nNorm = listOfNormalizationVariables->GetEntriesFast();
251 Int_t *varLengths =
new Int_t[nVariables];
252 for (Int_t i = 0; i < nVariables; i++) {
253 varLengths[i] = ((TObjString*)listOfVariables->At(i))->String().Length();
255 Int_t *normLengths =
new Int_t[nNorm];
256 for (Int_t i = 0; i < nNorm; i++) {
257 normLengths[i] = ((TObjString*)listOfNormalizationVariables->At(i))->String().Length();
260 Int_t *varSort =
new Int_t[nVariables];
261 TMath::Sort(nVariables, varLengths, varSort, kTRUE);
262 Int_t *normSort =
new Int_t[nNorm];
263 TMath::Sort(nNorm, normLengths, normSort, kTRUE);
267 for (Int_t ivar = 0; ivar < nVariables; ivar++) {
270 searchString = ((TObjString*)listOfVariables->At(varSort[ivar]))->String();
274 for (Int_t i = 0; i < searchString.Length(); i++) {
275 replaceString.Append(searchString[i]);
276 if (i == 0) replaceString.Append(removeString);
280 for (Int_t inorm = 0; inorm < nNorm; inorm++) {
282 normString = ((TObjString*)listOfNormalizationVariables->At(normSort[inorm]))->String();
284 str.ReplaceAll(searchString + normString, replaceString + normString);
298 str.ReplaceAll(removeString,
"");
300 if (printDrawCommand) std::cout <<
"The string looks now like: " << str.Data() << std::endl;
301 delete [] varLengths;
302 delete [] normLengths;
312 Int_t
AliTPCCalibViewer::EasyDraw(
const char* drawCommand,
const char* sector,
const char* cuts,
const char* drawOptions, Bool_t writeDrawCommand)
const {
322 TString drawStr(drawCommand);
323 TString sectorStr(sector);
327 Bool_t dangerousToDraw = drawStr.Contains(
":") || drawStr.Contains(
">>");
328 if (dangerousToDraw) {
329 Warning(
"EasyDraw",
"The draw string must not contain ':' or '>>'. Using only first variable for drawing!");
332 drawStr.Resize(drawStr.First(
":"));
335 TString drawOptionsStr(
"");
337 Int_t rndNumber = rnd.Integer(10000);
339 if (drawOptions && strcmp(drawOptions,
"") != 0)
340 drawOptionsStr += drawOptions;
342 drawOptionsStr +=
"profcolz";
344 TProfile2D *prof2D=0x0;
345 const TString profName=TString::Format(
"prof%d",rndNumber);
347 TString secLabel =
"";
349 TString secStr=sectorStr;
350 secStr.ReplaceAll(
"S",
"");
351 if (secStr.IsDigit()) {
352 const Int_t secDigit=secStr.Atoi();
358 if (sectorStr.Contains(
"S"))
361 if ( secDigit%36<18 )
366 secLabel += Form(
"%02d",secDigit%18);
367 secLabel +=
";row;pad";
370 if (sectorStr ==
"A") {
372 drawStr += rndNumber;
374 cutStr +=
"(sector/18)%2==0 ";
375 prof2D =
new TProfile2D(profName,
"A-Side;x (cm); y (cm)",330,-250,250,330,-250,250);
377 else if (sectorStr ==
"C") {
379 drawStr += rndNumber;
381 cutStr +=
"(sector/18)%2==1 ";
382 prof2D =
new TProfile2D(profName,
"C-Side;x (cm); y (cm)",330,-250,250,330,-250,250);
384 else if (sectorStr ==
"ALL") {
386 drawStr += rndNumber;
388 prof2D =
new TProfile2D(profName,
"A&C-Side average;x (cm); y (cm)",330,-250,250,330,-250,250);
390 else if (sectorStr.Contains(
"S")) {
392 drawStr += rndNumber;
394 TString sec=sectorStr;
396 Int_t isec = sec.Atoi();
397 cutStr +=
"sector%36=="+sec+
" ";
398 prof2D =
new TProfile2D(profName,secLabel,159,0,159,140,-70,70);
400 else if (sectorStr.IsDigit()) {
401 Int_t isec = sectorStr.Atoi();
403 drawStr += rndNumber;
404 if (isec < 36 && isec >= 0){
406 prof2D =
new TProfile2D(profName,secLabel,63,0,63,108,-54,54);
407 }
else if (isec < 72 && isec >= 36) {
409 prof2D =
new TProfile2D(profName,secLabel,96,0,96,140,-70,70);
411 Error(
"EasyDraw",
"The TPC contains only sectors between 0 and 71.");
414 cutStr +=
"(sector==";
419 if (cuts && cuts[0] != 0) {
420 if (cutStr.Length() != 0) cutStr +=
"&& ";
427 if (writeDrawCommand) std::cout <<
"fTree->Draw(\"" << drawStr <<
"\", \"" << cutStr <<
"\", \"" << drawOptionsStr <<
"\");" << std::endl;
428 Int_t returnValue =
fTree->Draw(drawStr.Data(), cutStr.Data(), drawOptionsStr.Data());
438 Int_t
AliTPCCalibViewer::EasyDraw(
const char* drawCommand, Int_t sector,
const char* cuts,
const char* drawOptions, Bool_t writeDrawCommand)
const {
446 if (sector >= 0 && sector < 72) {
447 return EasyDraw(drawCommand, Form(
"%i", sector), cuts, drawOptions, writeDrawCommand);
449 Error(
"EasyDraw",
"The TPC contains only sectors between 0 and 71.");
455 Int_t
AliTPCCalibViewer::EasyDraw1D(
const char* drawCommand,
const char* sector,
const char* cuts,
const char* drawOptions, Bool_t writeDrawCommand)
const {
465 TString drawStr(drawCommand);
466 TString sectorStr(sector);
467 TString drawOptionsStr(drawOptions);
471 if (sectorStr ==
"A")
472 cutStr +=
"(sector/18)%2==0 ";
473 else if (sectorStr ==
"C")
474 cutStr +=
"(sector/18)%2==1 ";
475 else if (sectorStr.IsDigit()) {
476 Int_t isec = sectorStr.Atoi();
477 if (isec < 0 || isec > 71) {
478 Error(
"EasyDraw",
"The TPC contains only sectors between 0 and 71.");
481 cutStr +=
"(sector==";
485 else if (sectorStr.Contains(
"S")) {
486 TString sec=sectorStr;
488 cutStr +=
"sector%36=="+sec+
" ";
491 if (cuts && cuts[0] != 0) {
492 if (cutStr.Length() != 0) cutStr +=
"&& ";
500 if (writeDrawCommand) std::cout <<
"fTree->Draw(\"" << drawStr <<
"\", \"" << cutStr <<
"\", \"" << drawOptionsStr <<
"\");" << std::endl;
501 Int_t returnValue =
fTree->Draw(drawStr.Data(), cutStr.Data(), drawOptionsStr.Data());
502 if (returnValue == -1)
return -1;
504 TObject *obj = (gPad) ? gPad->GetPrimitive(
"htemp") : 0;
505 if (!obj) obj = (TH1F*)gDirectory->Get(
"htemp");
506 if (!obj) obj = gPad->GetPrimitive(
"tempHist");
507 if (!obj) obj = (TH1F*)gDirectory->Get(
"tempHist");
508 if (!obj) obj = gPad->GetPrimitive(
"Graph");
509 if (!obj) obj = (TH1F*)gDirectory->Get(
"Graph");
523 if (sector >= 0 && sector < 72) {
524 return EasyDraw1D(drawCommand, Form(
"%i",sector), cuts, drawOptions, writeDrawCommand);
526 Error(
"EasyDraw",
"The TPC contains only sectors between 0 and 71.");
537 TString *str =
new TString(histo->GetTitle());
538 str->ReplaceAll(replaceString,
"");
539 histo->SetTitle(str->Data());
541 if (histo->GetXaxis()) {
542 str =
new TString(histo->GetXaxis()->GetTitle());
543 str->ReplaceAll(replaceString,
"");
544 histo->GetXaxis()->SetTitle(str->Data());
547 if (histo->GetYaxis()) {
548 str =
new TString(histo->GetYaxis()->GetTitle());
549 str->ReplaceAll(replaceString,
"");
550 histo->GetYaxis()->SetTitle(str->Data());
553 if (histo->GetZaxis()) {
554 str =
new TString(histo->GetZaxis()->GetTitle());
555 str->ReplaceAll(replaceString,
"");
556 histo->GetZaxis()->SetTitle(str->Data());
562 Int_t
AliTPCCalibViewer::DrawHisto1D(
const char* drawCommand, Int_t sector,
const char* cuts,
const char *sigmas, Bool_t plotMean, Bool_t plotMedian, Bool_t plotLTM)
const {
569 if (sector >= 0 && sector < 72) {
570 return DrawHisto1D(drawCommand, Form(
"%i", sector), cuts, sigmas, plotMean, plotMedian, plotLTM);
572 Error(
"DrawHisto1D",
"The TPC contains only sectors between 0 and 71.");
577 Int_t
AliTPCCalibViewer::DrawHisto1D(
const char* drawCommand,
const char* sector,
const char* cuts,
const char *sigmas, Bool_t plotMean, Bool_t plotMedian, Bool_t plotLTM)
const {
584 Int_t oldOptStat =
gStyle->GetOptStat();
585 gStyle->SetOptStat(0000000);
586 Double_t ltmFraction = 0.8;
588 TObjArray *sigmasTokens = TString(sigmas).Tokenize(
";");
589 TVectorF nsigma(sigmasTokens->GetEntriesFast());
590 for (Int_t i = 0; i < sigmasTokens->GetEntriesFast(); i++) {
591 TString str(((TObjString*)sigmasTokens->At(i))->GetString());
592 Double_t sig = (str.IsFloat()) ? str.Atof() : 0;
597 TString drawStr(drawCommand);
598 Bool_t dangerousToDraw = drawStr.Contains(
":") || drawStr.Contains(
">>");
599 if (dangerousToDraw) {
600 Warning(
"DrawHisto1D",
"The draw string must not contain ':' or '>>'.");
603 drawStr +=
" >> tempHist";
604 Int_t entries =
EasyDraw1D(drawStr.Data(), sector, cuts);
605 TH1F *
htemp = (TH1F*)gDirectory->Get(
"tempHist");
607 Double_t *values =
fTree->GetV1();
609 Double_t mean = TMath::Mean(entries, values);
610 Double_t median = TMath::Median(entries, values);
611 Double_t sigma = TMath::RMS(entries, values);
612 Double_t maxY = htemp->GetMaximum();
614 TLegend * legend =
new TLegend(.7,.7, .99, .99,
"Statistical information");
619 TLine* line =
new TLine(mean, 0, mean, maxY);
621 line->SetLineColor(kRed);
622 line->SetLineWidth(2);
623 line->SetLineStyle(1);
625 legend->AddEntry(line, Form(
"Mean: %f", mean),
"l");
627 for (Int_t i = 0; i < nsigma.GetNoElements(); i++) {
628 TLine* linePlusSigma =
new TLine(mean + nsigma[i] * sigma, 0, mean + nsigma[i] * sigma, maxY);
630 linePlusSigma->SetLineColor(kRed);
631 linePlusSigma->SetLineStyle(2 + i);
632 linePlusSigma->Draw();
633 TLine* lineMinusSigma =
new TLine(mean - nsigma[i] * sigma, 0, mean - nsigma[i] * sigma, maxY);
635 lineMinusSigma->SetLineColor(kRed);
636 lineMinusSigma->SetLineStyle(2 + i);
637 lineMinusSigma->Draw();
638 legend->AddEntry(lineMinusSigma, Form(
"%i #sigma = %f",(Int_t)(nsigma[i]), (Float_t)(nsigma[i] * sigma)),
"l");
643 TLine* line =
new TLine(median, 0, median, maxY);
645 line->SetLineColor(kBlue);
646 line->SetLineWidth(2);
647 line->SetLineStyle(1);
649 legend->AddEntry(line, Form(
"Median: %f", median),
"l");
651 for (Int_t i = 0; i < nsigma.GetNoElements(); i++) {
652 TLine* linePlusSigma =
new TLine(median + nsigma[i] * sigma, 0, median + nsigma[i]*sigma, maxY);
654 linePlusSigma->SetLineColor(kBlue);
655 linePlusSigma->SetLineStyle(2 + i);
656 linePlusSigma->Draw();
657 TLine* lineMinusSigma =
new TLine(median - nsigma[i] * sigma, 0, median - nsigma[i]*sigma, maxY);
659 lineMinusSigma->SetLineColor(kBlue);
660 lineMinusSigma->SetLineStyle(2 + i);
661 lineMinusSigma->Draw();
662 legend->AddEntry(lineMinusSigma, Form(
"%i #sigma = %f",(Int_t)(nsigma[i]), (Float_t)(nsigma[i] * sigma)),
"l");
668 Double_t ltm =
GetLTM(entries, values, <mRms, ltmFraction);
669 TLine* line =
new TLine(ltm, 0, ltm, maxY);
671 line->SetLineColor(kGreen+2);
672 line->SetLineWidth(2);
673 line->SetLineStyle(1);
675 legend->AddEntry(line, Form(
"LTM: %f", ltm),
"l");
677 for (Int_t i = 0; i < nsigma.GetNoElements(); i++) {
678 TLine* linePlusSigma =
new TLine(ltm + nsigma[i] * ltmRms, 0, ltm + nsigma[i] * ltmRms, maxY);
680 linePlusSigma->SetLineColor(kGreen+2);
681 linePlusSigma->SetLineStyle(2+i);
682 linePlusSigma->Draw();
684 TLine* lineMinusSigma =
new TLine(ltm - nsigma[i] * ltmRms, 0, ltm - nsigma[i] * ltmRms, maxY);
686 lineMinusSigma->SetLineColor(kGreen+2);
687 lineMinusSigma->SetLineStyle(2+i);
688 lineMinusSigma->Draw();
689 legend->AddEntry(lineMinusSigma, Form(
"%i #sigma = %f", (Int_t)(nsigma[i]), (Float_t)(nsigma[i] * ltmRms)),
"l");
692 if (!plotMean && !plotMedian && !plotLTM)
return -1;
694 gStyle->SetOptStat(oldOptStat);
699 Int_t
AliTPCCalibViewer::SigmaCut(
const char* drawCommand, Int_t sector,
const char* cuts, Float_t sigmaMax, Bool_t plotMean, Bool_t plotMedian, Bool_t plotLTM, Bool_t pm,
const char *sigmas, Float_t sigmaStep)
const {
717 if (sector >= 0 && sector < 72) {
718 return SigmaCut(drawCommand, Form(
"%i", sector), cuts, sigmaMax, plotMean, plotMedian, plotLTM, pm, sigmas, sigmaStep);
720 Error(
"SigmaCut",
"The TPC contains only sectors between 0 and 71.");
725 Int_t
AliTPCCalibViewer::SigmaCut(
const char* drawCommand,
const char* sector,
const char* cuts, Float_t sigmaMax, Bool_t plotMean, Bool_t plotMedian, Bool_t plotLTM, Bool_t pm,
const char *sigmas, Float_t sigmaStep)
const {
733 Double_t ltmFraction = 0.8;
735 TString drawStr(drawCommand);
736 Bool_t dangerousToDraw = drawStr.Contains(
":") || drawStr.Contains(
">>");
737 if (dangerousToDraw) {
738 Warning(
"SigmaCut",
"The draw string must not contain ':' or '>>'.");
741 drawStr +=
" >> tempHist";
743 Int_t entries =
EasyDraw1D(drawStr.Data(), sector, cuts,
"goff");
744 TH1F *
htemp = (TH1F*)gDirectory->Get(
"tempHist");
746 Double_t *values =
fTree->GetV1();
748 Double_t mean = TMath::Mean(entries, values);
749 Double_t median = TMath::Median(entries, values);
750 Double_t sigma = TMath::RMS(entries, values);
752 TLegend * legend =
new TLegend(.7,.7, .99, .99,
"Cumulative");
754 TH1F *cutHistoMean = 0;
755 TH1F *cutHistoMedian = 0;
756 TH1F *cutHistoLTM = 0;
758 TObjArray *sigmasTokens = TString(sigmas).Tokenize(
";");
759 TVectorF nsigma(sigmasTokens->GetEntriesFast());
760 for (Int_t i = 0; i < sigmasTokens->GetEntriesFast(); i++) {
761 TString str(((TObjString*)sigmasTokens->At(i))->GetString());
762 Double_t sig = (str.IsFloat()) ? str.Atof() : 0;
771 cutHistoMean->SetLineColor(kRed);
772 legend->AddEntry(cutHistoMean,
"Mean",
"l");
773 cutHistoMean->SetTitle(Form(
"%s, cumulative; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
774 cutHistoMean->Draw();
775 DrawLines(cutHistoMean, nsigma, legend, kRed, pm);
781 if (cutHistoMedian) {
783 cutHistoMedian->SetLineColor(kBlue);
784 legend->AddEntry(cutHistoMedian,
"Median",
"l");
785 cutHistoMedian->SetTitle(Form(
"%s, cumulative; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
786 if (plotMean && cutHistoMean) cutHistoMedian->Draw(
"same");
787 else cutHistoMedian->Draw();
788 DrawLines(cutHistoMedian, nsigma, legend, kBlue, pm);
793 Double_t ltm =
GetLTM(entries, values, <mRms, ltmFraction);
797 cutHistoLTM->SetLineColor(kGreen+2);
798 legend->AddEntry(cutHistoLTM,
"LTM",
"l");
799 cutHistoLTM->SetTitle(Form(
"%s, cumulative; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
800 if ((plotMean && cutHistoMean) || (plotMedian && cutHistoMedian)) cutHistoLTM->Draw(
"same");
801 else cutHistoLTM->Draw();
802 DrawLines(cutHistoLTM, nsigma, legend, kGreen+2, pm);
805 if (!plotMean && !plotMedian && !plotLTM)
return -1;
811 Int_t
AliTPCCalibViewer::SigmaCutNew(
const char* drawCommand,
const char* sector,
const char* cuts, Float_t , Bool_t plotMean, Bool_t plotMedian, Bool_t plotLTM, Bool_t ,
const char *sigmas, Float_t )
const {
821 TString drawStr(drawCommand);
822 drawStr +=
" >> tempHist";
824 Int_t entries =
EasyDraw1D(drawStr.Data(), sector, cuts,
"goff");
825 TH1F *
htemp = (TH1F*)gDirectory->Get(
"tempHist");
826 TGraph *cutGraphMean = 0;
829 Double_t *values =
fTree->GetV1();
830 Int_t *index =
new Int_t[entries];
831 Float_t *xarray =
new Float_t[entries];
832 Float_t *yarray =
new Float_t[entries];
833 TMath::Sort(entries, values, index, kFALSE);
835 Double_t mean = TMath::Mean(entries, values);
837 Double_t sigma = TMath::RMS(entries, values);
839 TLegend * legend =
new TLegend(.7,.7, .99, .99,
"Cumulative");
843 TObjArray *sigmasTokens = TString(sigmas).Tokenize(
";");
844 TVectorF nsigma(sigmasTokens->GetEntriesFast());
845 for (Int_t i = 0; i < sigmasTokens->GetEntriesFast(); i++) {
846 TString str(((TObjString*)sigmasTokens->At(i))->GetString());
847 Double_t sig = (str.IsFloat()) ? str.Atof() : 0;
853 for (Int_t i = 0; i < entries; i++) {
854 xarray[i] = TMath::Abs(values[index[i]] - mean) / sigma;
855 yarray[i] = float(i) / float(entries);
857 cutGraphMean =
new TGraph(entries, xarray, yarray);
860 cutGraphMean->SetLineColor(kRed);
861 legend->AddEntry(cutGraphMean,
"Mean",
"l");
862 cutGraphMean->SetTitle(Form(
"%s, Cumulative; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
863 cutGraphMean->Draw(
"alu");
864 DrawLines(cutGraphMean, nsigma, legend, kRed, kTRUE);
897 if (!plotMean && !plotMedian && !plotLTM)
return -1;
903 Int_t
AliTPCCalibViewer::Integrate(
const char* drawCommand, Int_t sector,
const char* cuts, Float_t sigmaMax, Bool_t plotMean, Bool_t plotMedian, Bool_t plotLTM,
const char *sigmas, Float_t sigmaStep)
const {
915 if (sector >= 0 && sector < 72) {
916 return Integrate(drawCommand, Form(
"%i", sector), cuts, sigmaMax, plotMean, plotMedian, plotLTM, sigmas, sigmaStep);
918 Error(
"Integrate",
"The TPC contains only sectors between 0 and 71.");
924 Int_t
AliTPCCalibViewer::IntegrateOld(
const char* drawCommand,
const char* sector,
const char* cuts, Float_t sigmaMax, Bool_t plotMean, Bool_t plotMedian, Bool_t plotLTM,
const char *sigmas, Float_t sigmaStep)
const {
937 Double_t ltmFraction = 0.8;
939 TString drawStr(drawCommand);
940 drawStr +=
" >> tempHist";
942 Int_t entries =
EasyDraw1D(drawStr.Data(), sector, cuts,
"goff");
943 TH1F *
htemp = (TH1F*)gDirectory->Get(
"tempHist");
945 Double_t *values =
fTree->GetV1();
947 Double_t mean = TMath::Mean(entries, values);
948 Double_t median = TMath::Median(entries, values);
949 Double_t sigma = TMath::RMS(entries, values);
951 TObjArray *sigmasTokens = TString(sigmas).Tokenize(
";");
952 TVectorF nsigma(sigmasTokens->GetEntriesFast());
953 for (Int_t i = 0; i < sigmasTokens->GetEntriesFast(); i++) {
954 TString str(((TObjString*)sigmasTokens->At(i))->GetString());
955 Double_t sig = (str.IsFloat()) ? str.Atof() : 0;
960 TLegend * legend =
new TLegend(.7,.7, .99, .99,
"Integrated histogram");
962 TH1F *integralHistoMean = 0;
963 TH1F *integralHistoMedian = 0;
964 TH1F *integralHistoLTM = 0;
968 if (integralHistoMean) {
970 integralHistoMean->SetLineColor(kRed);
971 legend->AddEntry(integralHistoMean,
"Mean",
"l");
972 integralHistoMean->SetTitle(Form(
"%s, integrated; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
973 integralHistoMean->Draw();
974 DrawLines(integralHistoMean, nsigma, legend, kRed, kTRUE);
979 if (integralHistoMedian) {
981 integralHistoMedian->SetLineColor(kBlue);
982 legend->AddEntry(integralHistoMedian,
"Median",
"l");
983 integralHistoMedian->SetTitle(Form(
"%s, integrated; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
984 if (plotMean && integralHistoMean) integralHistoMedian->Draw(
"same");
985 else integralHistoMedian->Draw();
986 DrawLines(integralHistoMedian, nsigma, legend, kBlue, kTRUE);
991 Double_t ltm =
GetLTM(entries, values, <mRms, ltmFraction);
993 if (integralHistoLTM) {
995 integralHistoLTM->SetLineColor(kGreen+2);
996 legend->AddEntry(integralHistoLTM,
"LTM",
"l");
997 integralHistoLTM->SetTitle(Form(
"%s, integrated; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
998 if ((plotMean && integralHistoMean) || (plotMedian && integralHistoMedian)) integralHistoLTM->Draw(
"same");
999 else integralHistoLTM->Draw();
1000 DrawLines(integralHistoLTM, nsigma, legend, kGreen+2, kTRUE);
1003 if (!plotMean && !plotMedian && !plotLTM)
return -1;
1009 Int_t
AliTPCCalibViewer::Integrate(
const char* drawCommand,
const char* sector,
const char* cuts, Float_t , Bool_t plotMean, Bool_t plotMedian, Bool_t plotLTM,
const char *sigmas, Float_t )
const {
1021 Double_t ltmFraction = 0.8;
1023 TString drawStr(drawCommand);
1024 Bool_t dangerousToDraw = drawStr.Contains(
":") || drawStr.Contains(
">>");
1025 if (dangerousToDraw) {
1026 Warning(
"Integrate",
"The draw string must not contain ':' or '>>'.");
1029 drawStr +=
" >> tempHist";
1031 Int_t entries =
EasyDraw1D(drawStr.Data(), sector, cuts,
"goff");
1032 TH1F *
htemp = (TH1F*)gDirectory->Get(
"tempHist");
1033 TGraph *integralGraphMean = 0;
1034 TGraph *integralGraphMedian = 0;
1035 TGraph *integralGraphLTM = 0;
1036 Double_t *values =
fTree->GetV1();
1037 Int_t *index =
new Int_t[entries];
1038 Float_t *xarray =
new Float_t[entries];
1039 Float_t *yarray =
new Float_t[entries];
1040 TMath::Sort(entries, values, index, kFALSE);
1042 Double_t mean = TMath::Mean(entries, values);
1043 Double_t median = TMath::Median(entries, values);
1044 Double_t sigma = TMath::RMS(entries, values);
1047 TObjArray *sigmasTokens = TString(sigmas).Tokenize(
";");
1048 TVectorF nsigma(sigmasTokens->GetEntriesFast());
1049 for (Int_t i = 0; i < sigmasTokens->GetEntriesFast(); i++) {
1050 TString str(((TObjString*)sigmasTokens->At(i))->GetString());
1051 Double_t sig = (str.IsFloat()) ? str.Atof() : 0;
1054 delete sigmasTokens;
1056 TLegend * legend =
new TLegend(.7,.7, .99, .99,
"Integrated histogram");
1060 for (Int_t i = 0; i < entries; i++) {
1061 xarray[i] = (values[index[i]] - mean) / sigma;
1062 yarray[i] = float(i) / float(entries);
1064 integralGraphMean =
new TGraph(entries, xarray, yarray);
1065 if (integralGraphMean) {
1067 integralGraphMean->SetLineColor(kRed);
1068 legend->AddEntry(integralGraphMean,
"Mean",
"l");
1069 integralGraphMean->SetTitle(Form(
"%s, integrated; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
1070 integralGraphMean->Draw(
"alu");
1071 DrawLines(integralGraphMean, nsigma, legend, kRed, kTRUE);
1075 for (Int_t i = 0; i < entries; i++) {
1076 xarray[i] = (values[index[i]] - median) / sigma;
1077 yarray[i] = float(i) / float(entries);
1079 integralGraphMedian =
new TGraph(entries, xarray, yarray);
1080 if (integralGraphMedian) {
1082 integralGraphMedian->SetLineColor(kBlue);
1083 legend->AddEntry(integralGraphMedian,
"Median",
"l");
1084 integralGraphMedian->SetTitle(Form(
"%s, integrated; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
1085 if (plotMean && integralGraphMean) integralGraphMedian->Draw(
"samelu");
1086 else integralGraphMedian->Draw(
"alu");
1087 DrawLines(integralGraphMedian, nsigma, legend, kBlue, kTRUE);
1091 Double_t ltmRms = 0;
1092 Double_t ltm =
GetLTM(entries, values, <mRms, ltmFraction);
1093 for (Int_t i = 0; i < entries; i++) {
1094 xarray[i] = (values[index[i]] - ltm) / ltmRms;
1095 yarray[i] = float(i) / float(entries);
1097 integralGraphLTM =
new TGraph(entries, xarray, yarray);
1098 if (integralGraphLTM) {
1100 integralGraphLTM->SetLineColor(kGreen+2);
1101 legend->AddEntry(integralGraphLTM,
"LTM",
"l");
1102 integralGraphLTM->SetTitle(Form(
"%s, integrated; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
1103 if ((plotMean && integralGraphMean) || (plotMedian && integralGraphMedian)) integralGraphLTM->Draw(
"samelu");
1104 else integralGraphLTM->Draw(
"alu");
1105 DrawLines(integralGraphLTM, nsigma, legend, kGreen+2, kTRUE);
1112 if (!plotMean && !plotMedian && !plotLTM)
return -1;
1123 for (Int_t i = 0; i < nsigma.GetNoElements(); i++) {
1125 Int_t bin = histogram->GetXaxis()->FindBin(nsigma[i]);
1126 TLine* lineUp =
new TLine(nsigma[i], 0, nsigma[i], histogram->GetBinContent(bin));
1128 lineUp->SetLineColor(color);
1129 lineUp->SetLineStyle(2 + i);
1131 TLine* lineLeft =
new TLine(nsigma[i], histogram->GetBinContent(bin), 0, histogram->GetBinContent(bin));
1133 lineLeft->SetLineColor(color);
1134 lineLeft->SetLineStyle(2 + i);
1136 legend->AddEntry(lineLeft, Form(
"Fraction(%f #sigma) = %f",nsigma[i], histogram->GetBinContent(bin)),
"l");
1139 Int_t bin = histogram->GetXaxis()->FindBin(nsigma[i]);
1140 TLine* lineUp1 =
new TLine(nsigma[i], 0, nsigma[i], histogram->GetBinContent(bin));
1142 lineUp1->SetLineColor(color);
1143 lineUp1->SetLineStyle(2 + i);
1145 TLine* lineLeft1 =
new TLine(nsigma[i], histogram->GetBinContent(bin), histogram->GetBinLowEdge(0)+histogram->GetBinWidth(0), histogram->GetBinContent(bin));
1147 lineLeft1->SetLineColor(color);
1148 lineLeft1->SetLineStyle(2 + i);
1150 legend->AddEntry(lineLeft1, Form(
"Fraction(+%f #sigma) = %f",nsigma[i], histogram->GetBinContent(bin)),
"l");
1151 bin = histogram->GetXaxis()->FindBin(-nsigma[i]);
1152 TLine* lineUp2 =
new TLine(-nsigma[i], 0, -nsigma[i], histogram->GetBinContent(bin));
1154 lineUp2->SetLineColor(color);
1155 lineUp2->SetLineStyle(2 + i);
1157 TLine* lineLeft2 =
new TLine(-nsigma[i], histogram->GetBinContent(bin), histogram->GetBinLowEdge(0)+histogram->GetBinWidth(0), histogram->GetBinContent(bin));
1159 lineLeft2->SetLineColor(color);
1160 lineLeft2->SetLineStyle(2 + i);
1162 legend->AddEntry(lineLeft2, Form(
"Fraction(-%f #sigma) = %f",nsigma[i], histogram->GetBinContent(bin)),
"l");
1173 for (Int_t i = 0; i < nsigma.GetNoElements(); i++) {
1175 TLine* lineUp =
new TLine(nsigma[i], 0, nsigma[i], graph->Eval(nsigma[i]));
1177 lineUp->SetLineColor(color);
1178 lineUp->SetLineStyle(2 + i);
1180 TLine* lineLeft =
new TLine(nsigma[i], graph->Eval(nsigma[i]), 0, graph->Eval(nsigma[i]));
1182 lineLeft->SetLineColor(color);
1183 lineLeft->SetLineStyle(2 + i);
1185 legend->AddEntry(lineLeft, Form(
"Fraction(%f #sigma) = %f",nsigma[i], graph->Eval(nsigma[i])),
"l");
1188 TLine* lineUp1 =
new TLine(nsigma[i], 0, nsigma[i], graph->Eval(nsigma[i]));
1190 lineUp1->SetLineColor(color);
1191 lineUp1->SetLineStyle(2 + i);
1193 TLine* lineLeft1 =
new TLine(nsigma[i], graph->Eval(nsigma[i]), graph->GetHistogram()->GetXaxis()->GetBinLowEdge(0), graph->Eval(nsigma[i]));
1195 lineLeft1->SetLineColor(color);
1196 lineLeft1->SetLineStyle(2 + i);
1198 legend->AddEntry(lineLeft1, Form(
"Fraction(+%f #sigma) = %f",nsigma[i], graph->Eval(nsigma[i])),
"l");
1199 TLine* lineUp2 =
new TLine(-nsigma[i], 0, -nsigma[i], graph->Eval(-nsigma[i]));
1201 lineUp2->SetLineColor(color);
1202 lineUp2->SetLineStyle(2 + i);
1204 TLine* lineLeft2 =
new TLine(-nsigma[i], graph->Eval(-nsigma[i]), graph->GetHistogram()->GetXaxis()->GetBinLowEdge(0), graph->Eval(-nsigma[i]));
1206 lineLeft2->SetLineColor(color);
1207 lineLeft2->SetLineStyle(2 + i);
1209 legend->AddEntry(lineLeft2, Form(
"Fraction(-%f #sigma) = %f",nsigma[i], graph->Eval(-nsigma[i])),
"l");
1232 Int_t bin = TMath::Nint( (Float_t)(value - binLow) / (Float_t)(binUp - binLow) * (nbins-1) ) + 1;
1234 if (value < binLow) bin = 0;
1235 if (value > binUp) bin = nbins + 1;
1244 Double_t *ddata =
new Double_t[n];
1245 Double_t mean = 0, lsigma = 0;
1247 for (UInt_t i = 0; i < (UInt_t)n; i++) {
1248 ddata[nPoints]= array[nPoints];
1251 Int_t hh = TMath::Min(TMath::Nint(fraction * nPoints), Int_t(n));
1252 AliMathBase::EvaluateUni(nPoints, ddata, mean, lsigma, hh);
1253 if (sigma) *sigma = lsigma;
1275 Float_t *
array = histogram->GetArray();
1276 Int_t nbins = histogram->GetXaxis()->GetNbins();
1277 Float_t binLow = histogram->GetXaxis()->GetXmin();
1278 Float_t binUp = histogram->GetXaxis()->GetXmax();
1283 TH1F*
AliTPCCalibViewer::SigmaCut(Int_t n,
const Float_t *
array, Float_t mean, Float_t sigma, Int_t nbins, Float_t binLow, Float_t binUp, Float_t sigmaMax, Float_t sigmaStep, Bool_t pm){
1292 if (sigma == 0)
return 0;
1293 Float_t binWidth = (binUp-binLow)/(nbins - 1);
1294 if (sigmaStep <= 0) sigmaStep = binWidth;
1295 Int_t kbins = (Int_t)(sigmaMax * sigma / sigmaStep) + 1;
1296 if (pm) kbins = 2 * (Int_t)(sigmaMax * sigma / sigmaStep) + 1;
1297 Float_t kbinLow = !pm ? 0 : -sigmaMax;
1298 Float_t kbinUp = sigmaMax;
1299 TH1F *hist =
new TH1F(
"sigmaCutHisto",
"Cumulative; Multiples of #sigma; Fraction of included data", kbins, kbinLow, kbinUp);
1300 hist->SetDirectory(0);
1304 Double_t normalization = 0;
1305 for (Int_t i = 0; i <= n; i++) {
1306 normalization += array[i];
1317 for (Float_t iDelta = 0; iDelta <= sigmaMax * sigma; iDelta += sigmaStep) {
1319 Double_t valueP = array[
GetBin(mean, nbins, binLow, binUp)];
1320 Double_t valueM = array[
GetBin(mean-binWidth, nbins, binLow, binUp)];
1323 for (Float_t x = binWidth; x <= iDelta; x += binWidth) {
1324 valueP += (mean + x <= binUp) ? array[
GetBin(mean + x, nbins, binLow, binUp)] : 0;
1325 valueM += (mean-binWidth - x >= binLow) ? array[
GetBin(mean-binWidth - x, nbins, binLow, binUp)] : 0;
1329 if (valueP / normalization > 100)
printf(
"+++ Error, value to big: %f, normalization with %f will fail +++ \n", valueP, normalization);
1330 if (valueP / normalization > 100)
return hist;
1331 if (valueM / normalization > 100)
printf(
"+++ Error, value to big: %f, normalization with %f will fail +++ \n", valueM, normalization);
1332 if (valueM / normalization > 100)
return hist;
1333 valueP = (valueP / normalization);
1334 valueM = (valueM / normalization);
1336 Int_t bin =
GetBin(iDelta/sigma, kbins, kbinLow, kbinUp);
1337 hist->SetBinContent(bin, valueP);
1338 bin =
GetBin(-iDelta/sigma, kbins, kbinLow, kbinUp);
1339 hist->SetBinContent(bin, valueM);
1342 Int_t bin =
GetBin(iDelta/sigma, kbins, kbinLow, kbinUp);
1343 hist->SetBinContent(bin, valueP + valueM);
1350 if (!pm) hist->SetMaximum(1.2);
1359 printf(
"SigmaCut with variable binsize, Not yet implemented\n");
1378 Float_t *
array = histogram->GetArray();
1379 Int_t nbins = histogram->GetXaxis()->GetNbins();
1380 Float_t binLow = histogram->GetXaxis()->GetXmin();
1381 Float_t binUp = histogram->GetXaxis()->GetXmax();
1386 TH1F*
AliTPCCalibViewer::Integrate(Int_t n,
const Float_t *
const array, Int_t nbins, Float_t binLow, Float_t binUp, Float_t mean, Float_t sigma, Float_t sigmaMax, Float_t sigmaStep){
1394 Bool_t givenUnits = kTRUE;
1395 if (sigma != 0 && sigmaMax != 0) givenUnits = kFALSE;
1398 sigmaMax = (binUp - binLow) / 2.;
1401 Float_t binWidth = (binUp-binLow)/(nbins - 1);
1402 if (sigmaStep <= 0) sigmaStep = binWidth;
1403 Int_t kbins = (Int_t)(sigmaMax * sigma / sigmaStep) + 1;
1404 Float_t kbinLow = givenUnits ? binLow : -sigmaMax;
1405 Float_t kbinUp = givenUnits ? binUp : sigmaMax;
1407 if (givenUnits) hist =
new TH1F(
"integratedHisto",
"Integrated Histogram; Given x; Fraction of included data", kbins, kbinLow, kbinUp);
1408 if (!givenUnits) hist =
new TH1F(
"integratedHisto",
"Integrated Histogram; Multiples of #sigma; Fraction of included data", kbins, kbinLow, kbinUp);
1409 hist->SetDirectory(0);
1414 Double_t normalization = 0;
1415 for (Int_t i = 1; i <= n; i++) {
1416 normalization += array[i];
1427 for (Float_t iDelta = mean - sigmaMax * sigma; iDelta <= mean + sigmaMax * sigma; iDelta += sigmaStep) {
1430 for (Float_t x = mean - sigmaMax * sigma; x <= iDelta; x += binWidth) {
1431 value += (x <= binUp && x >= binLow) ? array[
GetBin(x, nbins, binLow, binUp)] : 0;
1433 if (value / normalization > 100)
printf(
"+++ Error, value to big: %f, normalization with %f will fail +++ \n", value, normalization);
1434 if (value / normalization > 100)
return hist;
1435 Int_t bin =
GetBin(iDelta/sigma, kbins, kbinLow, kbinUp);
1438 value = (value / normalization);
1439 hist->SetBinContent(bin, value);
1461 TString drawStr(desiredData);
1462 drawStr.Append(
":channel");
1466 for (Int_t sec = 0; sec < 72; sec++) {
1468 entries =
EasyDraw1D(drawStr.Data(), (Int_t)sec, cuts,
"goff");
1469 if (entries == -1)
return 0;
1470 const Double_t *pchannel =
fTree->GetV2();
1471 const Double_t *pvalue =
fTree->GetV1();
1472 for (Int_t i = 0; i < entries; i++)
1473 roc->
SetValue((UInt_t)(pchannel[i]), (Float_t)(pvalue[i]));
1475 return createdCalPad;
1486 TString drawStr(desiredData);
1487 drawStr.Append(
":channel.fElements:sector");
1490 Int_t entries =
fTree->Draw(drawStr, cuts,
"goff");
1491 const Double_t *pvalue =
fTree->GetV1();
1492 const Double_t *pchannel =
fTree->GetV2();
1493 const Double_t *psector =
fTree->GetV3();
1495 for (Int_t ientry=0; ientry<entries; ientry++){
1496 Int_t sector= TMath::Nint(psector[ientry]);
1498 if (roc) roc->
SetValue((UInt_t)(pchannel[ientry]), (Float_t)(pvalue[ientry]));
1508 return createdCalPad;
1517 TString drawStr(desiredData);
1518 drawStr.Append(
":channel");
1520 Int_t entries =
EasyDraw1D(drawStr.Data(), (Int_t)sector, cuts,
"goff");
1521 if (entries == -1)
return 0;
1523 for (Int_t i = 0; i < entries; i++)
1534 TObjString* str = 0;
1535 if (!
fTree)
return 0;
1536 Int_t nentries =
fTree->GetListOfBranches()->GetEntries();
1537 for (Int_t i = 0; i < nentries; i++) {
1538 str =
new TObjString(
fTree->GetListOfBranches()->At(i)->GetName());
1539 str->String().ReplaceAll(
"_Median",
"");
1540 str->String().ReplaceAll(
"_Mean",
"");
1541 str->String().ReplaceAll(
"_RMS",
"");
1542 str->String().ReplaceAll(
"_LTM",
"");
1543 str->String().ReplaceAll(
"_OutlierCutted",
"");
1544 str->String().ReplaceAll(
".",
"");
1545 if (!arr->FindObject(str) &&
1546 !(str->String() ==
"channel" || str->String() ==
"gx" || str->String() ==
"gy" ||
1547 str->String() ==
"lx" || str->String() ==
"ly" || str->String() ==
"pad" ||
1548 str->String() ==
"row" || str->String() ==
"rpad" || str->String() ==
"sector" ))
1553 if (
fTree->GetListOfFriends()) {
1554 for (Int_t ifriend = 0; ifriend <
fTree->GetListOfFriends()->GetEntries(); ifriend++){
1557 if (TString(
fTree->GetListOfFriends()->At(ifriend)->ClassName()) !=
"TFriendElement")
continue;
1558 TFriendElement *friendElement = (TFriendElement*)
fTree->GetListOfFriends()->At(ifriend);
1559 if (friendElement->GetTree() == 0)
continue;
1561 for (Int_t i = 0; i < friendElement->GetTree()->GetListOfBranches()->GetEntries(); i++) {
1563 str =
new TObjString(friendElement->GetTree()->GetListOfBranches()->At(i)->GetName());
1564 str->String().ReplaceAll(
"_Median",
"");
1565 str->String().ReplaceAll(
"_Mean",
"");
1566 str->String().ReplaceAll(
"_RMS",
"");
1567 str->String().ReplaceAll(
"_LTM",
"");
1568 str->String().ReplaceAll(
"_OutlierCutted",
"");
1569 str->String().ReplaceAll(
".",
"");
1570 if (!(str->String() ==
"channel" || str->String() ==
"gx" || str->String() ==
"gy" ||
1571 str->String() ==
"lx" || str->String() ==
"ly" || str->String() ==
"pad" ||
1572 str->String() ==
"row" || str->String() ==
"rpad" || str->String() ==
"sector" )){
1574 str->String().Insert(0,
".");
1575 str->String().Insert(0, friendElement->GetName());
1576 if (!arr->FindObject(str)) arr->Add(str);
1589 TIterator* iter = arr->MakeIterator();
1591 TObjString* currentStr = 0;
1592 while ( (currentStr = (TObjString*)(iter->Next())) ) {
1593 std::cout << currentStr->GetString().Data() << std::endl;
1606 arr->Add(
new TObjString(
"_Mean"));
1607 arr->Add(
new TObjString(
"_Mean_OutlierCutted"));
1608 arr->Add(
new TObjString(
"_Median"));
1609 arr->Add(
new TObjString(
"_Median_OutlierCutted"));
1610 arr->Add(
new TObjString(
"_LTM"));
1611 arr->Add(
new TObjString(
"_LTM_OutlierCutted"));
1612 arr->Add(
new TObjString(Form(
"LFitIntern_4_8%s",
fAppendString.Data())));
1613 arr->Add(
new TObjString(Form(
"GFitIntern_Lin%s",
fAppendString.Data())));
1614 arr->Add(
new TObjString(Form(
"GFitIntern_Par%s",
fAppendString.Data())));
1615 arr->Add(
new TObjString(
"FitLinLocal"));
1616 arr->Add(
new TObjString(
"FitLinGlobal"));
1617 arr->Add(
new TObjString(
"FitParLocal"));
1618 arr->Add(
new TObjString(
"FitParGlobal"));
1621 TIterator* iter = arr->MakeIterator();
1623 TObjString* currentStr = 0;
1624 while ((currentStr = (TObjString*)(iter->Next()))) {
1625 std::cout << currentStr->GetString().Data() << std::endl;
1637 TFile *file =
new TFile(filename);
1639 TTree *
tree = (TTree*)file->Get(treename);
1650 Int_t numberOfCalPads = listOfCalPads->GetEntries();
1651 for (Int_t i = 0; i < numberOfCalPads; i++) {
1652 std::cout <<
"Creating calPad " << (i+1) <<
" of " << numberOfCalPads <<
"\r" << std::flush;
1653 char* calPadName = (
char*)((TObjString*)(listOfCalPads->At(i)))->GetString().Data();
1654 TString drawCommand = ((TObjString*)(listOfCalPads->At(i)))->GetString();
1657 calPadsArray->
Add(calPad);
1659 std::cout << std::endl;
1660 listOfCalPads->Delete();
1661 delete listOfCalPads;
1662 return calPadsArray;
1666 TString*
AliTPCCalibViewer::Fit(
const char* drawCommand,
const char* formula,
const char* cuts, Double_t &
chi2, TVectorD &fitParam, TMatrixD &covMatrix){
1671 TString formulaStr(formula);
1672 TString drawStr(drawCommand);
1673 TString cutStr(cuts);
1682 Int_t dim = formulaTokens->GetEntriesFast();
1684 fitParam.ResizeTo(dim);
1685 covMatrix.ResizeTo(dim,dim);
1687 TLinearFitter* fitter =
new TLinearFitter(dim+1, Form(
"hyp%d",dim));
1688 fitter->StoreData(kTRUE);
1689 fitter->ClearPoints();
1691 Int_t entries =
Draw(drawStr.Data(), cutStr.Data(),
"goff");
1692 if (entries == -1) {
1693 delete formulaTokens;
1694 return new TString(
"An ERROR has occured during fitting!");
1696 Double_t **values =
new Double_t*[dim+1] ;
1698 for (Int_t i = 0; i < dim + 1; i++){
1700 if (i < dim) centries =
fTree->Draw(((TObjString*)formulaTokens->At(i))->GetName(), cutStr.Data(),
"goff");
1701 else centries =
fTree->Draw(drawStr.Data(), cutStr.Data(),
"goff");
1703 if (entries != centries) {
1705 delete formulaTokens;
1706 return new TString(
"An ERROR has occured during fitting!");
1708 values[i] =
new Double_t[entries];
1709 memcpy(values[i],
fTree->GetV1(), entries*
sizeof(Double_t));
1713 for (Int_t i = 0; i < entries; i++){
1715 for (Int_t j=0; j<dim;j++) x[j]=values[j][i];
1716 fitter->AddPoint(x, values[dim][i], 1);
1720 fitter->GetParameters(fitParam);
1721 fitter->GetCovarianceMatrix(covMatrix);
1722 chi2 = fitter->GetChisquare();
1725 TString *preturnFormula =
new TString(Form(
"( %e+",fitParam[0])), &returnFormula = *preturnFormula;
1727 for (Int_t iparam = 0; iparam < dim; iparam++) {
1728 returnFormula.Append(Form(
"%s*(%e)",((TObjString*)formulaTokens->At(iparam))->GetName(),fitParam[iparam+1]));
1729 if (iparam < dim-1) returnFormula.Append(
"+");
1731 returnFormula.Append(
" )");
1732 delete formulaTokens;
1734 for (Int_t i = 0; i < dim + 1; i++){
1735 delete [] values[i];
1738 return preturnFormula;
1752 TVectorF *mapIROCArray = 0;
1753 TVectorF *mapOROCArray = 0;
1754 Int_t mapEntries = 0;
1755 TString* mapNames = 0;
1758 TFile mapFile(mapFileName,
"read");
1760 TList* listOfROCs = mapFile.GetListOfKeys();
1761 mapEntries = listOfROCs->GetEntries()/2;
1764 mapIROCArray =
new TVectorF[mapEntries];
1765 mapOROCArray =
new TVectorF[mapEntries];
1767 mapNames =
new TString[mapEntries];
1768 for (Int_t ivalue = 0; ivalue < mapEntries; ivalue++) {
1769 TString rocName(((TKey*)(listOfROCs->At(ivalue*2)))->GetName());
1770 rocName.Remove(rocName.Length()-4, 4);
1771 mapIROCs->AddAt((
AliTPCCalROC*)mapFile.Get((rocName +
"IROC").Data()), ivalue);
1772 mapOROCs->AddAt((
AliTPCCalROC*)mapFile.Get((rocName +
"OROC").Data()), ivalue);
1773 mapNames[ivalue].Append(rocName);
1776 for (Int_t ivalue = 0; ivalue < mapEntries; ivalue++) {
1777 mapIROCArray[ivalue].ResizeTo(tpcROCinstance->
GetNChannels(0));
1778 mapOROCArray[ivalue].ResizeTo(tpcROCinstance->
GetNChannels(36));
1780 for (UInt_t ichannel = 0; ichannel < tpcROCinstance->
GetNChannels(0); ichannel++)
1781 (mapIROCArray[ivalue])[ichannel] = ((
AliTPCCalROC*)(mapIROCs->At(ivalue)))->GetValue(ichannel);
1782 for (UInt_t ichannel = 0; ichannel < tpcROCinstance->
GetNChannels(36); ichannel++)
1783 (mapOROCArray[ivalue])[ichannel] = ((
AliTPCCalROC*)(mapOROCs->At(ivalue)))->GetValue(ichannel);
1788 TTreeSRedirector cstream(fileName);
1789 Int_t arrayEntries = array->GetEntries();
1792 TString* names =
new TString[arrayEntries];
1793 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++)
1794 names[ivalue].Append(((
AliTPCCalPad*)array->At(ivalue))->GetName());
1796 for (UInt_t isector = 0; isector < tpcROCinstance->
GetNSectors(); isector++) {
1798 TVectorF *vectorArray =
new TVectorF[arrayEntries];
1799 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++)
1800 vectorArray[ivalue].ResizeTo(tpcROCinstance->
GetNChannels(isector));
1806 TVectorF *posArray =
new TVectorF[8];
1807 for (Int_t ivalue = 0; ivalue < 8; ivalue++)
1808 posArray[ivalue].ResizeTo(tpcROCinstance->
GetNChannels(isector));
1810 Float_t posG[3] = {0};
1811 Float_t posL[3] = {0};
1813 for (UInt_t irow = 0; irow < tpcROCinstance->
GetNRows(isector); irow++) {
1814 for (UInt_t ipad = 0; ipad < tpcROCinstance->
GetNPads(isector, irow); ipad++) {
1817 posArray[0][ichannel] = irow;
1818 posArray[1][ichannel] = ipad;
1819 posArray[2][ichannel] = posL[0];
1820 posArray[3][ichannel] = posL[1];
1821 posArray[4][ichannel] = posG[0];
1822 posArray[5][ichannel] = posG[1];
1823 posArray[6][ichannel] = (Int_t)(ipad - (Double_t)(tpcROCinstance->
GetNPads(isector, irow))/2);
1824 posArray[7][ichannel] = ichannel;
1827 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++) {
1831 (vectorArray[ivalue])[ichannel] = calROC->
GetValue(irow, ipad);
1833 (vectorArray[ivalue])[ichannel] = 0;
1839 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++) {
1841 if (!roc) roc = &dummyROC;
1842 cstream <<
"calPads" <<
1843 (Char_t*)((names[ivalue] +
".=").Data()) << &vectorArray[ivalue];
1844 cstream <<
"calPads" <<
1845 (Char_t*)((names[ivalue] +
"Pad.=").Data()) << roc;
1849 for (Int_t ivalue = 0; ivalue < mapEntries; ivalue++) {
1851 cstream <<
"calPads" <<
1852 (Char_t*)((mapNames[ivalue] +
".=").Data()) << &mapIROCArray[ivalue];
1854 cstream <<
"calPads" <<
1855 (Char_t*)((mapNames[ivalue] +
".=").Data()) << &mapOROCArray[ivalue];
1859 cstream <<
"calPads" <<
1860 "sector=" << isector;
1862 cstream <<
"calPads" <<
1863 "row.=" << &posArray[0] <<
1864 "pad.=" << &posArray[1] <<
1865 "lx.=" << &posArray[2] <<
1866 "ly.=" << &posArray[3] <<
1867 "gx.=" << &posArray[4] <<
1868 "gy.=" << &posArray[5] <<
1869 "rpad.=" << &posArray[6] <<
1870 "channel.=" << &posArray[7];
1872 cstream <<
"calPads" <<
1876 delete[] vectorArray;
1883 delete[] mapIROCArray;
1884 delete[] mapOROCArray;
1906 TVectorF *mapIROCArray = 0;
1907 TVectorF *mapOROCArray = 0;
1908 Int_t mapEntries = 0;
1909 TString* mapNames = 0;
1912 TFile mapFile(mapFileName,
"read");
1914 TList* listOfROCs = mapFile.GetListOfKeys();
1915 mapEntries = listOfROCs->GetEntries()/2;
1918 mapIROCArray =
new TVectorF[mapEntries];
1919 mapOROCArray =
new TVectorF[mapEntries];
1921 mapNames =
new TString[mapEntries];
1922 for (Int_t ivalue = 0; ivalue < mapEntries; ivalue++) {
1923 TString rocName(((TKey*)(listOfROCs->At(ivalue*2)))->GetName());
1924 rocName.Remove(rocName.Length()-4, 4);
1925 mapIROCs->AddAt((
AliTPCCalROC*)mapFile.Get((rocName +
"IROC").Data()), ivalue);
1926 mapOROCs->AddAt((
AliTPCCalROC*)mapFile.Get((rocName +
"OROC").Data()), ivalue);
1927 mapNames[ivalue].Append(rocName);
1930 for (Int_t ivalue = 0; ivalue < mapEntries; ivalue++) {
1931 mapIROCArray[ivalue].ResizeTo(tpcROCinstance->
GetNChannels(0));
1932 mapOROCArray[ivalue].ResizeTo(tpcROCinstance->
GetNChannels(36));
1934 for (UInt_t ichannel = 0; ichannel < tpcROCinstance->
GetNChannels(0); ichannel++)
1935 (mapIROCArray[ivalue])[ichannel] = ((
AliTPCCalROC*)(mapIROCs->At(ivalue)))->GetValue(ichannel);
1936 for (UInt_t ichannel = 0; ichannel < tpcROCinstance->
GetNChannels(36); ichannel++)
1937 (mapOROCArray[ivalue])[ichannel] = ((
AliTPCCalROC*)(mapOROCs->At(ivalue)))->GetValue(ichannel);
1942 TTreeSRedirector cstream(fileName,
"recreate");
1943 Int_t arrayEntries = 0;
1944 if (array) arrayEntries = array->GetEntries();
1946 TString* names =
new TString[arrayEntries];
1947 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++)
1948 names[ivalue].Append(((
AliTPCCalPad*)array->At(ivalue))->GetName());
1950 for (UInt_t isector = 0; isector < tpcROCinstance->
GetNSectors(); isector++) {
1954 TVectorF median(arrayEntries);
1955 TVectorF mean(arrayEntries);
1956 TVectorF rms(arrayEntries);
1957 TVectorF ltm(arrayEntries);
1958 TVectorF ltmrms(arrayEntries);
1959 TVectorF medianWithOut(arrayEntries);
1960 TVectorF meanWithOut(arrayEntries);
1961 TVectorF rmsWithOut(arrayEntries);
1962 TVectorF ltmWithOut(arrayEntries);
1963 TVectorF ltmrmsWithOut(arrayEntries);
1965 TVectorF *vectorArray =
new TVectorF[arrayEntries];
1966 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++){
1967 vectorArray[ivalue].ResizeTo(tpcROCinstance->
GetNChannels(isector));
1968 vectorArray[ivalue].SetUniqueID(array->UncheckedAt(ivalue)->GetUniqueID());
1972 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++) {
1976 if (outlierPad) outlierROC = outlierPad->
GetCalROC(isector);
1979 mean[ivalue] = calROC->
GetMean();
1980 rms[ivalue] = calROC->
GetRMS();
1981 Double_t ltmrmsValue = 0;
1982 ltm[ivalue] = calROC->
GetLTM(<mrmsValue, ltmFraction);
1983 ltmrms[ivalue] = ltmrmsValue;
1985 medianWithOut[ivalue] = calROC->
GetMedian(outlierROC);
1986 meanWithOut[ivalue] = calROC->
GetMean(outlierROC);
1987 rmsWithOut[ivalue] = calROC->
GetRMS(outlierROC);
1989 ltmWithOut[ivalue] = calROC->
GetLTM(<mrmsValue, ltmFraction, outlierROC);
1990 ltmrmsWithOut[ivalue] = ltmrmsValue;
1994 median[ivalue] = 0.;
1998 ltmrms[ivalue] = 0.;
1999 medianWithOut[ivalue] = 0.;
2000 meanWithOut[ivalue] = 0.;
2001 rmsWithOut[ivalue] = 0.;
2002 ltmWithOut[ivalue] = 0.;
2003 ltmrmsWithOut[ivalue] = 0.;
2010 TVectorF *posArray =
new TVectorF[8];
2011 for (Int_t ivalue = 0; ivalue < 8; ivalue++)
2012 posArray[ivalue].ResizeTo(tpcROCinstance->
GetNChannels(isector));
2014 Float_t posG[3] = {0};
2015 Float_t posL[3] = {0};
2017 for (UInt_t irow = 0; irow < tpcROCinstance->
GetNRows(isector); irow++) {
2018 for (UInt_t ipad = 0; ipad < tpcROCinstance->
GetNPads(isector, irow); ipad++) {
2021 posArray[0][ichannel] = irow;
2022 posArray[1][ichannel] = ipad;
2023 posArray[2][ichannel] = posL[0];
2024 posArray[3][ichannel] = posL[1];
2025 posArray[4][ichannel] = posG[0];
2026 posArray[5][ichannel] = posG[1];
2027 posArray[6][ichannel] = (Int_t)(ipad - (Double_t)(tpcROCinstance->
GetNPads(isector, irow))/2);
2028 posArray[7][ichannel] = ichannel;
2031 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++) {
2035 (vectorArray[ivalue])[ichannel] = calROC->
GetValue(irow, ipad);
2037 (vectorArray[ivalue])[ichannel] = 0;
2043 cstream <<
"calPads" <<
2044 "sector=" << isector;
2046 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++) {
2047 if (outlierPad==0) {
2048 cstream <<
"calPads" <<
2049 (Char_t*)((names[ivalue] +
"_Median=").Data()) << median[ivalue] <<
2050 (Char_t*)((names[ivalue] +
"_Mean=").Data()) << mean[ivalue] <<
2051 (Char_t*)((names[ivalue] +
"_RMS=").Data()) << rms[ivalue] <<
2052 (Char_t*)((names[ivalue] +
"_LTM=").Data()) << ltm[ivalue] <<
2053 (Char_t*)((names[ivalue] +
"_RMS_LTM=").Data()) << ltmrms[ivalue];
2056 cstream <<
"calPads" <<
2057 (Char_t*)((names[ivalue] +
"_Median=").Data()) << medianWithOut[ivalue] <<
2058 (Char_t*)((names[ivalue] +
"_Mean").Data()) << meanWithOut[ivalue] <<
2059 (Char_t*)((names[ivalue] +
"_RMS=").Data()) << rmsWithOut[ivalue] <<
2060 (Char_t*)((names[ivalue] +
"_LTM=").Data()) << ltmWithOut[ivalue] <<
2061 (Char_t*)((names[ivalue] +
"_RMS_LTM=").Data()) << ltmrmsWithOut[ivalue];
2084 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++) {
2085 cstream <<
"calPads" <<
2086 (Char_t*)((names[ivalue] +
".=").Data()) << &vectorArray[ivalue];
2090 for (Int_t ivalue = 0; ivalue < mapEntries; ivalue++) {
2092 cstream <<
"calPads" <<
2093 (Char_t*)((mapNames[ivalue] +
".=").Data()) << &mapIROCArray[ivalue];
2095 cstream <<
"calPads" <<
2096 (Char_t*)((mapNames[ivalue] +
".=").Data()) << &mapOROCArray[ivalue];
2100 cstream <<
"calPads" <<
2101 "row.=" << &posArray[0] <<
2102 "pad.=" << &posArray[1] <<
2103 "lx.=" << &posArray[2] <<
2104 "ly.=" << &posArray[3] <<
2105 "gx.=" << &posArray[4] <<
2106 "gy.=" << &posArray[5] <<
2107 "rpad.=" << &posArray[6] <<
2108 "channel.=" << &posArray[7];
2110 cstream <<
"calPads" <<
2114 delete[] vectorArray;
2118 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++) {
2120 tree->SetAlias(TString::Format(
"%s_LTMRatio",names[ivalue].Data()).Data(), TString::Format(
"%s.fElements/%s_LTM",names[ivalue].Data(),names[ivalue].Data()).Data());
2121 tree->SetAlias(TString::Format(
"%s_MeanRatio",names[ivalue].Data()).Data(), TString::Format(
"%s.fElements/%s_Mean",names[ivalue].Data(),names[ivalue].Data()).Data());
2122 tree->SetAlias(TString::Format(
"%s_MedianRatio",names[ivalue].Data()).Data(), TString::Format(
"%s.fElements/%s_Median",names[ivalue].Data(),names[ivalue].Data()).Data());
2123 tree->SetAlias(names[ivalue].Data(), TString::Format(
"%s.fElements",names[ivalue].Data()).Data());
2129 delete[] mapIROCArray;
2130 delete[] mapOROCArray;
2137 tree->SetAlias(
"Pad0",
"MapPadLength.fElements==7.5");
2138 tree->SetAlias(
"Pad1",
"MapPadLength.fElements==10.0");
2139 tree->SetAlias(
"Pad2",
"MapPadLength.fElements==15.0");
2140 tree->SetAlias(
"ly",
"(ly.fElements+((sector<36)*(2*((sector%36)<18)-1)*0.2)+((sector>=36)*(2*((sector%36)<18)-1)*0.3))");
2141 tree->SetAlias(
"dRowNorm0",
"(row.fElements/32-1)");
2142 tree->SetAlias(
"dRowNorm1",
"(row.fElements/32-1)");
2143 tree->SetAlias(
"dRowNorm2",
"((row.fElements-63)/16-1)");
2144 tree->SetAlias(
"dRowNorm",
"(row.fElements<63)*(row.fElements/32-1)+(row.fElements>63)*((row.fElements-63)/16-1)");
2145 tree->SetAlias(
"dPhiNorm",
"(ly/lx.fElements)/(pi/18)");
2147 tree->SetAlias(
"fsector",
"(sector%36)+(0.5+9*atan2(ly,lx.fElements)/pi)");
2148 tree->SetAlias(
"posEdge",
"((pi/18.)-abs(atan(ly/lx.fElements)))*lx.fElements");
2149 tree->SetAlias(
"lphi",
"atan(ly/lx.fElements)");
2174 MakeTree(outPutFileName, &objArray, mapFileName, outlierPad, ltmFraction);
2197 if ( calibObjects == 0x0 )
return;
2200 if ( !in.is_open() ){
2201 fprintf(stderr,
"Error: cannot open list file '%s'", filename);
2211 TObjArray *arrFileLine = sFile.Tokenize(
"\n");
2212 TIter nextLine(arrFileLine);
2214 TObjString *sObjLine = 0x0;
2215 while ( (sObjLine = (TObjString*)nextLine()) ){
2216 TString sLine(sObjLine->GetString());
2218 TObjArray *arrCol = sLine.Tokenize(
"\t");
2219 Int_t nCols = arrCol->GetEntriesFast();
2221 TObjString *sObjType = (TObjString*)(arrCol->At(0));
2222 TObjString *sObjFileName = (TObjString*)(arrCol->At(1));
2223 TObjString *sObjName = 0x0;
2225 if ( !sObjType || !sObjFileName )
continue;
2226 TString sType(sObjType->GetString());
2227 TString sFileName(sObjFileName->GetString());
2228 printf(
"Type %s, opening %s \n", sType.Data(), sFileName.Data());
2231 fprintf(stderr,
"File not found: '%s'", sFileName.Data());
2235 if ( sType ==
"CE" ){
2239 sObjName = (TObjString*)(arrCol->At(2));
2240 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2242 else calPad->SetNameTitle(
"CETmean",
"CETmean");
2243 calibObjects->
Add(calPad);
2247 sObjName = (TObjString*)(arrCol->At(3));
2248 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2250 else calPad->SetNameTitle(
"CEQmean",
"CEQmean");
2251 calibObjects->
Add(calPad);
2255 sObjName = (TObjString*)(arrCol->At(4));
2256 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2258 else calPad->SetNameTitle(
"CETrms",
"CETrms");
2259 calibObjects->
Add(calPad);
2261 }
else if ( sType ==
"Pulser") {
2266 sObjName = (TObjString*)(arrCol->At(2));
2267 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2269 else calPad->SetNameTitle(
"PulserTmean",
"PulserTmean");
2270 calibObjects->
Add(calPad);
2274 sObjName = (TObjString*)(arrCol->At(3));
2275 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2277 else calPad->SetNameTitle(
"PulserQmean",
"PulserQmean");
2278 calibObjects->
Add(calPad);
2282 sObjName = (TObjString*)(arrCol->At(4));
2283 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2285 else calPad->SetNameTitle(
"PulserTrms",
"PulserTrms");
2286 calibObjects->
Add(calPad);
2288 }
else if ( sType ==
"Pedestals") {
2293 sObjName = (TObjString*)(arrCol->At(2));
2294 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2296 else calPad->SetNameTitle(
"Pedestals",
"Pedestals");
2297 calibObjects->
Add(calPad);
2301 sObjName = (TObjString*)(arrCol->At(3));
2302 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2304 else calPad->SetNameTitle(
"Noise",
"Noise");
2305 calibObjects->
Add(calPad);
2307 }
else if ( sType ==
"CalPad") {
2308 if (nCols > 2) sObjName = (TObjString*)(arrCol->At(2));
2312 sObjName = (TObjString*)(arrCol->At(3));
2313 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2315 calibObjects->
Add(calPad);
2317 fprintf(stderr,
"Undefined Type: '%s'",sType.Data());
TString fAppendString
'.fElements', stored in a TStrig
static Int_t GetBin(Float_t value, Int_t nbins, Double_t binLow, Double_t binUp)
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
UInt_t GetNPads(UInt_t sector, UInt_t row) const
TFile * Open(const char *filename, Long64_t &nevents)
const TObjArray * GetCalPadRMS() const
AliTPCCalROC * GetCalROC(Int_t sector) const
const TObjArray * GetCalPadRMS() const
static void MakeCalPadAliases(TTree *tree)
Double_t GetMedian(AliTPCCalROC *const outlierROC=0, EPadType padType=kAll) const
Double_t GetRMS(AliTPCCalROC *const outlierROC=0, EPadType padType=kAll) const
static Double_t GetLTM(Int_t n, const Double_t *const array, Double_t *const sigma=0, Double_t fraction=0.9)
void DrawLines(TH1F *cutHistoMean, TVectorF nsigma, TLegend *legend, Int_t color, Bool_t pm) const
UInt_t GetNRows(UInt_t sector) const
Float_t GetValue(UInt_t row, UInt_t pad) const
Implementation of the TPC pedestal calibration.
const TObjArray * GetCalPadT0() const
void FormatHistoLabels(TH1 *histo) const
TFriendElement * AddFriend(const char *treename, const char *filename)
UInt_t GetNChannels(UInt_t sector) const
TTree * fTree
tree containing visualization data (e.g. written by AliTPCCalPad::MakeTree(...)
Class for viewing/visualizing TPC calibration data.
Int_t Integrate(const char *drawCommand, const char *sector, const char *cuts=0, Float_t sigmaMax=5, Bool_t plotMean=kTRUE, Bool_t plotMedian=kTRUE, Bool_t plotLTM=kTRUE, const char *sigmas="", Float_t sigmaStep=-1) const
void GetPositionLocal(UInt_t sector, UInt_t row, UInt_t pad, Float_t *pos)
TObjArray * GetListOfNormalizationVariables(Bool_t printList=kFALSE) const
const char * AddAbbreviations(const Char_t *c, Bool_t printDrawCommand=kFALSE)
virtual void Draw(Option_t *opt="")
Int_t SigmaCutNew(const char *drawCommand, const char *sector, const char *cuts=0, Float_t sigmaMax=5, Bool_t plotMean=kTRUE, Bool_t plotMedian=kTRUE, Bool_t plotLTM=kTRUE, Bool_t pm=kFALSE, const char *sigmas="", Float_t sigmaStep=-1) const
Int_t SigmaCut(const char *drawCommand, Int_t sector, const char *cuts=0, Float_t sigmaMax=5, Bool_t plotMean=kTRUE, Bool_t plotMedian=kTRUE, Bool_t plotLTM=kTRUE, Bool_t pm=kFALSE, const char *sigmas="", Float_t sigmaStep=-1) const
const TObjArray * GetCalPadRMS() const
TObjArray * GetListOfVariables(Bool_t printList=kFALSE)
TFile * fFile
file that contains a calPads tree (e.g. written by AliTPCCalPad::MakeTree(...)
Int_t EasyDraw(const char *drawCommand, const char *sector, const char *cuts=0, const char *drawOptions=0, Bool_t writeDrawCommand=kFALSE) const
Implementation of the TPC pulser calibration.
TString * Fit(const char *drawCommand, const char *formula, const char *cuts, Double_t &chi2, TVectorD &fitParam, TMatrixD &covMatrix)
static void CreateObjectList(const Char_t *filename, TObjArray *calibObjects)
Double_t GetMean(AliTPCCalROC *const outlierROC=0, EPadType padType=kAll) const
void GetPositionGlobal(UInt_t sector, UInt_t row, UInt_t pad, Float_t *pos)
const TObjArray * GetCalPadT0() const
Geometry class for a single ROC.
void SetValue(UInt_t row, UInt_t pad, Float_t vd)
TFriendElement * AddReferenceTree(const char *filename, const char *treename="calPads", const char *refname="R")
Bool_t fTreeMustBeDeleted
decides weather the tree must be deleted in destructor or not
TPC calibration base class for one ROC.
AliTPCCalROC * GetCalROC(const char *desiredData, UInt_t sector, const char *cuts="") const
const TObjArray * GetCalPadPedestal() const
AliTPCCalPad * GetCalPadOld(const char *desiredData, const char *cuts="", const char *calPadName="NoName") const
static void MakeTree(const char *fileName, TObjArray *array, const char *mapFileName=0, AliTPCCalPad *const outlierPad=0, Float_t ltmFraction=0.9)
AliTPCCalibViewer & operator=(const AliTPCCalibViewer ¶m)
virtual void Delete(Option_t *option="")
virtual ~AliTPCCalibViewer()
TObjArray * GetArrayOfCalPads()
AliTPCCalPad * GetCalPad(const char *desiredData, const char *cuts="", const char *calPadName="NoName") const
const TObjArray * GetCalPadQ() const
Int_t EasyDraw1D(const char *drawCommand, const char *sector, const char *cuts=0, const char *drawOptions=0, Bool_t writeDrawCommand=kFALSE) const
static AliTPCROC * Instance()
Implementation of the TPC Central Electrode calibration.
UInt_t GetNSectors() const
Double_t GetLTM(Double_t *const sigma=0, Double_t fraction=0.9, AliTPCCalROC *const outlierROC=0, EPadType padType=kAll)
static void MakeTreeWithObjects(const char *fileName, const TObjArray *const array, const char *mapFileName=0)
const TObjArray * GetCalPadQ() const
Int_t IntegrateOld(const char *drawCommand, const char *sector, const char *cuts=0, Float_t sigmaMax=5, Bool_t plotMean=kTRUE, Bool_t plotMedian=kTRUE, Bool_t plotLTM=kTRUE, const char *sigmas="", Float_t sigmaStep=-1) const
Int_t DrawHisto1D(const char *drawCommand, Int_t sector, const char *cuts=0, const char *sigmas="2;4;6", Bool_t plotMean=kTRUE, Bool_t plotMedian=kTRUE, Bool_t plotLTM=kTRUE) const
TObjArray * fListOfObjectsToBeDeleted
Objects, that will be deleted when the destructor ist called.
TString fAbbreviation
the abreviation for '.fElements'