40 #include <TFriendElement.h>
50 #include <TObjString.h>
55 #include <TTreeStream.h>
58 #include "AliMathBase.h"
79 fListOfObjectsToBeDeleted(0),
80 fTreeMustBeDeleted(0),
95 fListOfObjectsToBeDeleted(0),
96 fTreeMustBeDeleted(0),
116 fListOfObjectsToBeDeleted(0),
117 fTreeMustBeDeleted(0),
135 fListOfObjectsToBeDeleted(0),
136 fTreeMustBeDeleted(0),
144 fFile =
new TFile(fileName,
"read");
158 if (
this == ¶m)
return (*
this);
176 fTree->SetCacheSize(0);
199 fTree->SetCacheSize(0);
232 TString removeString =
"!#";
233 TString replaceString =
"";
234 TString searchString =
"";
235 TString normString =
"";
237 listOfVariables->Add(
new TObjString(
"channel"));
238 listOfVariables->Add(
new TObjString(
"gx"));
239 listOfVariables->Add(
new TObjString(
"gy"));
240 listOfVariables->Add(
new TObjString(
"lx"));
241 listOfVariables->Add(
new TObjString(
"ly"));
242 listOfVariables->Add(
new TObjString(
"pad"));
243 listOfVariables->Add(
new TObjString(
"row"));
244 listOfVariables->Add(
new TObjString(
"rpad"));
245 listOfVariables->Add(
new TObjString(
"sector"));
247 Int_t nVariables = listOfVariables->GetEntriesFast();
248 Int_t nNorm = listOfNormalizationVariables->GetEntriesFast();
250 Int_t *varLengths =
new Int_t[nVariables];
251 for (Int_t i = 0; i < nVariables; i++) {
252 varLengths[i] = ((TObjString*)listOfVariables->At(i))->String().Length();
254 Int_t *normLengths =
new Int_t[nNorm];
255 for (Int_t i = 0; i < nNorm; i++) {
256 normLengths[i] = ((TObjString*)listOfNormalizationVariables->At(i))->String().Length();
259 Int_t *varSort =
new Int_t[nVariables];
260 TMath::Sort(nVariables, varLengths, varSort, kTRUE);
261 Int_t *normSort =
new Int_t[nNorm];
262 TMath::Sort(nNorm, normLengths, normSort, kTRUE);
266 for (Int_t ivar = 0; ivar < nVariables; ivar++) {
269 searchString = ((TObjString*)listOfVariables->At(varSort[ivar]))->String();
273 for (Int_t i = 0; i < searchString.Length(); i++) {
274 replaceString.Append(searchString[i]);
275 if (i == 0) replaceString.Append(removeString);
279 for (Int_t inorm = 0; inorm < nNorm; inorm++) {
281 normString = ((TObjString*)listOfNormalizationVariables->At(normSort[inorm]))->String();
283 str.ReplaceAll(searchString + normString, replaceString + normString);
297 str.ReplaceAll(removeString,
"");
299 if (printDrawCommand) std::cout <<
"The string looks now like: " << str.Data() << std::endl;
300 delete [] varLengths;
301 delete [] normLengths;
311 Int_t
AliTPCCalibViewer::EasyDraw(
const char* drawCommand,
const char* sector,
const char* cuts,
const char* drawOptions, Bool_t writeDrawCommand)
const {
321 TString drawStr(drawCommand);
322 TString sectorStr(sector);
326 Bool_t dangerousToDraw = drawStr.Contains(
":") || drawStr.Contains(
">>");
327 if (dangerousToDraw) {
328 Warning(
"EasyDraw",
"The draw string must not contain ':' or '>>'. Using only first variable for drawing!");
331 drawStr.Resize(drawStr.First(
":"));
334 TString drawOptionsStr(
"");
336 Int_t rndNumber = rnd.Integer(10000);
338 if (drawOptions && strcmp(drawOptions,
"") != 0)
339 drawOptionsStr += drawOptions;
341 drawOptionsStr +=
"profcolz";
343 if (sectorStr ==
"A") {
345 drawStr += rndNumber;
346 drawStr +=
"(330,-250,250,330,-250,250)";
347 cutStr +=
"(sector/18)%2==0 ";
349 else if (sectorStr ==
"C") {
351 drawStr += rndNumber;
352 drawStr +=
"(330,-250,250,330,-250,250)";
353 cutStr +=
"(sector/18)%2==1 ";
355 else if (sectorStr ==
"ALL") {
357 drawStr += rndNumber;
358 drawStr +=
"(330,-250,250,330,-250,250)";
360 else if (sectorStr.Contains(
"S")) {
362 drawStr += rndNumber;
363 drawStr +=
"(159,0,159,140,-70,70)";
364 TString sec=sectorStr;
366 cutStr +=
"sector%36=="+sec+
" ";
368 else if (sectorStr.IsDigit()) {
369 Int_t isec = sectorStr.Atoi();
371 drawStr += rndNumber;
372 if (isec < 36 && isec >= 0)
373 drawStr +=
"(63,0,63,108,-54,54)";
374 else if (isec < 72 && isec >= 36)
375 drawStr +=
"(96,0,96,140,-70,70)";
377 Error(
"EasyDraw",
"The TPC contains only sectors between 0 and 71.");
380 cutStr +=
"(sector==";
385 if (cuts && cuts[0] != 0) {
386 if (cutStr.Length() != 0) cutStr +=
"&& ";
393 if (writeDrawCommand) std::cout <<
"fTree->Draw(\"" << drawStr <<
"\", \"" << cutStr <<
"\", \"" << drawOptionsStr <<
"\");" << std::endl;
394 Int_t returnValue =
fTree->Draw(drawStr.Data(), cutStr.Data(), drawOptionsStr.Data());
395 TString profName(
"prof");
396 profName += rndNumber;
397 TObject *obj = gDirectory->Get(profName.Data());
403 Int_t
AliTPCCalibViewer::EasyDraw(
const char* drawCommand, Int_t sector,
const char* cuts,
const char* drawOptions, Bool_t writeDrawCommand)
const {
411 if (sector >= 0 && sector < 72) {
412 return EasyDraw(drawCommand, Form(
"%i", sector), cuts, drawOptions, writeDrawCommand);
414 Error(
"EasyDraw",
"The TPC contains only sectors between 0 and 71.");
420 Int_t
AliTPCCalibViewer::EasyDraw1D(
const char* drawCommand,
const char* sector,
const char* cuts,
const char* drawOptions, Bool_t writeDrawCommand)
const {
430 TString drawStr(drawCommand);
431 TString sectorStr(sector);
432 TString drawOptionsStr(drawOptions);
436 if (sectorStr ==
"A")
437 cutStr +=
"(sector/18)%2==0 ";
438 else if (sectorStr ==
"C")
439 cutStr +=
"(sector/18)%2==1 ";
440 else if (sectorStr.IsDigit()) {
441 Int_t isec = sectorStr.Atoi();
442 if (isec < 0 || isec > 71) {
443 Error(
"EasyDraw",
"The TPC contains only sectors between 0 and 71.");
446 cutStr +=
"(sector==";
450 else if (sectorStr.Contains(
"S")) {
451 TString sec=sectorStr;
453 cutStr +=
"sector%36=="+sec+
" ";
456 if (cuts && cuts[0] != 0) {
457 if (cutStr.Length() != 0) cutStr +=
"&& ";
465 if (writeDrawCommand) std::cout <<
"fTree->Draw(\"" << drawStr <<
"\", \"" << cutStr <<
"\", \"" << drawOptionsStr <<
"\");" << std::endl;
466 Int_t returnValue =
fTree->Draw(drawStr.Data(), cutStr.Data(), drawOptionsStr.Data());
467 if (returnValue == -1)
return -1;
469 TObject *obj = (gPad) ? gPad->GetPrimitive(
"htemp") : 0;
470 if (!obj) obj = (TH1F*)gDirectory->Get(
"htemp");
471 if (!obj) obj = gPad->GetPrimitive(
"tempHist");
472 if (!obj) obj = (TH1F*)gDirectory->Get(
"tempHist");
473 if (!obj) obj = gPad->GetPrimitive(
"Graph");
474 if (!obj) obj = (TH1F*)gDirectory->Get(
"Graph");
488 if (sector >= 0 && sector < 72) {
489 return EasyDraw1D(drawCommand, Form(
"%i",sector), cuts, drawOptions, writeDrawCommand);
491 Error(
"EasyDraw",
"The TPC contains only sectors between 0 and 71.");
502 TString *str =
new TString(histo->GetTitle());
503 str->ReplaceAll(replaceString,
"");
504 histo->SetTitle(str->Data());
506 if (histo->GetXaxis()) {
507 str =
new TString(histo->GetXaxis()->GetTitle());
508 str->ReplaceAll(replaceString,
"");
509 histo->GetXaxis()->SetTitle(str->Data());
512 if (histo->GetYaxis()) {
513 str =
new TString(histo->GetYaxis()->GetTitle());
514 str->ReplaceAll(replaceString,
"");
515 histo->GetYaxis()->SetTitle(str->Data());
518 if (histo->GetZaxis()) {
519 str =
new TString(histo->GetZaxis()->GetTitle());
520 str->ReplaceAll(replaceString,
"");
521 histo->GetZaxis()->SetTitle(str->Data());
527 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 {
534 if (sector >= 0 && sector < 72) {
535 return DrawHisto1D(drawCommand, Form(
"%i", sector), cuts, sigmas, plotMean, plotMedian, plotLTM);
537 Error(
"DrawHisto1D",
"The TPC contains only sectors between 0 and 71.");
542 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 {
549 Int_t oldOptStat =
gStyle->GetOptStat();
550 gStyle->SetOptStat(0000000);
551 Double_t ltmFraction = 0.8;
553 TObjArray *sigmasTokens = TString(sigmas).Tokenize(
";");
554 TVectorF nsigma(sigmasTokens->GetEntriesFast());
555 for (Int_t i = 0; i < sigmasTokens->GetEntriesFast(); i++) {
556 TString str(((TObjString*)sigmasTokens->At(i))->GetString());
557 Double_t sig = (str.IsFloat()) ? str.Atof() : 0;
562 TString drawStr(drawCommand);
563 Bool_t dangerousToDraw = drawStr.Contains(
":") || drawStr.Contains(
">>");
564 if (dangerousToDraw) {
565 Warning(
"DrawHisto1D",
"The draw string must not contain ':' or '>>'.");
568 drawStr +=
" >> tempHist";
569 Int_t entries =
EasyDraw1D(drawStr.Data(), sector, cuts);
570 TH1F *
htemp = (TH1F*)gDirectory->Get(
"tempHist");
572 Double_t *values =
fTree->GetV1();
574 Double_t mean = TMath::Mean(entries, values);
575 Double_t median = TMath::Median(entries, values);
576 Double_t sigma = TMath::RMS(entries, values);
577 Double_t maxY = htemp->GetMaximum();
579 TLegend * legend =
new TLegend(.7,.7, .99, .99,
"Statistical information");
584 TLine* line =
new TLine(mean, 0, mean, maxY);
586 line->SetLineColor(kRed);
587 line->SetLineWidth(2);
588 line->SetLineStyle(1);
590 legend->AddEntry(line, Form(
"Mean: %f", mean),
"l");
592 for (Int_t i = 0; i < nsigma.GetNoElements(); i++) {
593 TLine* linePlusSigma =
new TLine(mean + nsigma[i] * sigma, 0, mean + nsigma[i] * sigma, maxY);
595 linePlusSigma->SetLineColor(kRed);
596 linePlusSigma->SetLineStyle(2 + i);
597 linePlusSigma->Draw();
598 TLine* lineMinusSigma =
new TLine(mean - nsigma[i] * sigma, 0, mean - nsigma[i] * sigma, maxY);
600 lineMinusSigma->SetLineColor(kRed);
601 lineMinusSigma->SetLineStyle(2 + i);
602 lineMinusSigma->Draw();
603 legend->AddEntry(lineMinusSigma, Form(
"%i #sigma = %f",(Int_t)(nsigma[i]), (Float_t)(nsigma[i] * sigma)),
"l");
608 TLine* line =
new TLine(median, 0, median, maxY);
610 line->SetLineColor(kBlue);
611 line->SetLineWidth(2);
612 line->SetLineStyle(1);
614 legend->AddEntry(line, Form(
"Median: %f", median),
"l");
616 for (Int_t i = 0; i < nsigma.GetNoElements(); i++) {
617 TLine* linePlusSigma =
new TLine(median + nsigma[i] * sigma, 0, median + nsigma[i]*sigma, maxY);
619 linePlusSigma->SetLineColor(kBlue);
620 linePlusSigma->SetLineStyle(2 + i);
621 linePlusSigma->Draw();
622 TLine* lineMinusSigma =
new TLine(median - nsigma[i] * sigma, 0, median - nsigma[i]*sigma, maxY);
624 lineMinusSigma->SetLineColor(kBlue);
625 lineMinusSigma->SetLineStyle(2 + i);
626 lineMinusSigma->Draw();
627 legend->AddEntry(lineMinusSigma, Form(
"%i #sigma = %f",(Int_t)(nsigma[i]), (Float_t)(nsigma[i] * sigma)),
"l");
633 Double_t ltm =
GetLTM(entries, values, <mRms, ltmFraction);
634 TLine* line =
new TLine(ltm, 0, ltm, maxY);
636 line->SetLineColor(kGreen+2);
637 line->SetLineWidth(2);
638 line->SetLineStyle(1);
640 legend->AddEntry(line, Form(
"LTM: %f", ltm),
"l");
642 for (Int_t i = 0; i < nsigma.GetNoElements(); i++) {
643 TLine* linePlusSigma =
new TLine(ltm + nsigma[i] * ltmRms, 0, ltm + nsigma[i] * ltmRms, maxY);
645 linePlusSigma->SetLineColor(kGreen+2);
646 linePlusSigma->SetLineStyle(2+i);
647 linePlusSigma->Draw();
649 TLine* lineMinusSigma =
new TLine(ltm - nsigma[i] * ltmRms, 0, ltm - nsigma[i] * ltmRms, maxY);
651 lineMinusSigma->SetLineColor(kGreen+2);
652 lineMinusSigma->SetLineStyle(2+i);
653 lineMinusSigma->Draw();
654 legend->AddEntry(lineMinusSigma, Form(
"%i #sigma = %f", (Int_t)(nsigma[i]), (Float_t)(nsigma[i] * ltmRms)),
"l");
657 if (!plotMean && !plotMedian && !plotLTM)
return -1;
659 gStyle->SetOptStat(oldOptStat);
664 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 {
682 if (sector >= 0 && sector < 72) {
683 return SigmaCut(drawCommand, Form(
"%i", sector), cuts, sigmaMax, plotMean, plotMedian, plotLTM, pm, sigmas, sigmaStep);
685 Error(
"SigmaCut",
"The TPC contains only sectors between 0 and 71.");
690 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 {
698 Double_t ltmFraction = 0.8;
700 TString drawStr(drawCommand);
701 Bool_t dangerousToDraw = drawStr.Contains(
":") || drawStr.Contains(
">>");
702 if (dangerousToDraw) {
703 Warning(
"SigmaCut",
"The draw string must not contain ':' or '>>'.");
706 drawStr +=
" >> tempHist";
708 Int_t entries =
EasyDraw1D(drawStr.Data(), sector, cuts,
"goff");
709 TH1F *
htemp = (TH1F*)gDirectory->Get(
"tempHist");
711 Double_t *values =
fTree->GetV1();
713 Double_t mean = TMath::Mean(entries, values);
714 Double_t median = TMath::Median(entries, values);
715 Double_t sigma = TMath::RMS(entries, values);
717 TLegend * legend =
new TLegend(.7,.7, .99, .99,
"Cumulative");
719 TH1F *cutHistoMean = 0;
720 TH1F *cutHistoMedian = 0;
721 TH1F *cutHistoLTM = 0;
723 TObjArray *sigmasTokens = TString(sigmas).Tokenize(
";");
724 TVectorF nsigma(sigmasTokens->GetEntriesFast());
725 for (Int_t i = 0; i < sigmasTokens->GetEntriesFast(); i++) {
726 TString str(((TObjString*)sigmasTokens->At(i))->GetString());
727 Double_t sig = (str.IsFloat()) ? str.Atof() : 0;
736 cutHistoMean->SetLineColor(kRed);
737 legend->AddEntry(cutHistoMean,
"Mean",
"l");
738 cutHistoMean->SetTitle(Form(
"%s, cumulative; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
739 cutHistoMean->Draw();
740 DrawLines(cutHistoMean, nsigma, legend, kRed, pm);
746 if (cutHistoMedian) {
748 cutHistoMedian->SetLineColor(kBlue);
749 legend->AddEntry(cutHistoMedian,
"Median",
"l");
750 cutHistoMedian->SetTitle(Form(
"%s, cumulative; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
751 if (plotMean && cutHistoMean) cutHistoMedian->Draw(
"same");
752 else cutHistoMedian->Draw();
753 DrawLines(cutHistoMedian, nsigma, legend, kBlue, pm);
758 Double_t ltm =
GetLTM(entries, values, <mRms, ltmFraction);
762 cutHistoLTM->SetLineColor(kGreen+2);
763 legend->AddEntry(cutHistoLTM,
"LTM",
"l");
764 cutHistoLTM->SetTitle(Form(
"%s, cumulative; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
765 if ((plotMean && cutHistoMean) || (plotMedian && cutHistoMedian)) cutHistoLTM->Draw(
"same");
766 else cutHistoLTM->Draw();
767 DrawLines(cutHistoLTM, nsigma, legend, kGreen+2, pm);
770 if (!plotMean && !plotMedian && !plotLTM)
return -1;
776 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 {
786 TString drawStr(drawCommand);
787 drawStr +=
" >> tempHist";
789 Int_t entries =
EasyDraw1D(drawStr.Data(), sector, cuts,
"goff");
790 TH1F *
htemp = (TH1F*)gDirectory->Get(
"tempHist");
791 TGraph *cutGraphMean = 0;
794 Double_t *values =
fTree->GetV1();
795 Int_t *index =
new Int_t[entries];
796 Float_t *xarray =
new Float_t[entries];
797 Float_t *yarray =
new Float_t[entries];
798 TMath::Sort(entries, values, index, kFALSE);
800 Double_t mean = TMath::Mean(entries, values);
802 Double_t sigma = TMath::RMS(entries, values);
804 TLegend * legend =
new TLegend(.7,.7, .99, .99,
"Cumulative");
808 TObjArray *sigmasTokens = TString(sigmas).Tokenize(
";");
809 TVectorF nsigma(sigmasTokens->GetEntriesFast());
810 for (Int_t i = 0; i < sigmasTokens->GetEntriesFast(); i++) {
811 TString str(((TObjString*)sigmasTokens->At(i))->GetString());
812 Double_t sig = (str.IsFloat()) ? str.Atof() : 0;
818 for (Int_t i = 0; i < entries; i++) {
819 xarray[i] = TMath::Abs(values[index[i]] - mean) / sigma;
820 yarray[i] = float(i) / float(entries);
822 cutGraphMean =
new TGraph(entries, xarray, yarray);
825 cutGraphMean->SetLineColor(kRed);
826 legend->AddEntry(cutGraphMean,
"Mean",
"l");
827 cutGraphMean->SetTitle(Form(
"%s, Cumulative; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
828 cutGraphMean->Draw(
"alu");
829 DrawLines(cutGraphMean, nsigma, legend, kRed, kTRUE);
862 if (!plotMean && !plotMedian && !plotLTM)
return -1;
868 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 {
880 if (sector >= 0 && sector < 72) {
881 return Integrate(drawCommand, Form(
"%i", sector), cuts, sigmaMax, plotMean, plotMedian, plotLTM, sigmas, sigmaStep);
883 Error(
"Integrate",
"The TPC contains only sectors between 0 and 71.");
889 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 {
902 Double_t ltmFraction = 0.8;
904 TString drawStr(drawCommand);
905 drawStr +=
" >> tempHist";
907 Int_t entries =
EasyDraw1D(drawStr.Data(), sector, cuts,
"goff");
908 TH1F *
htemp = (TH1F*)gDirectory->Get(
"tempHist");
910 Double_t *values =
fTree->GetV1();
912 Double_t mean = TMath::Mean(entries, values);
913 Double_t median = TMath::Median(entries, values);
914 Double_t sigma = TMath::RMS(entries, values);
916 TObjArray *sigmasTokens = TString(sigmas).Tokenize(
";");
917 TVectorF nsigma(sigmasTokens->GetEntriesFast());
918 for (Int_t i = 0; i < sigmasTokens->GetEntriesFast(); i++) {
919 TString str(((TObjString*)sigmasTokens->At(i))->GetString());
920 Double_t sig = (str.IsFloat()) ? str.Atof() : 0;
925 TLegend * legend =
new TLegend(.7,.7, .99, .99,
"Integrated histogram");
927 TH1F *integralHistoMean = 0;
928 TH1F *integralHistoMedian = 0;
929 TH1F *integralHistoLTM = 0;
933 if (integralHistoMean) {
935 integralHistoMean->SetLineColor(kRed);
936 legend->AddEntry(integralHistoMean,
"Mean",
"l");
937 integralHistoMean->SetTitle(Form(
"%s, integrated; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
938 integralHistoMean->Draw();
939 DrawLines(integralHistoMean, nsigma, legend, kRed, kTRUE);
944 if (integralHistoMedian) {
946 integralHistoMedian->SetLineColor(kBlue);
947 legend->AddEntry(integralHistoMedian,
"Median",
"l");
948 integralHistoMedian->SetTitle(Form(
"%s, integrated; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
949 if (plotMean && integralHistoMean) integralHistoMedian->Draw(
"same");
950 else integralHistoMedian->Draw();
951 DrawLines(integralHistoMedian, nsigma, legend, kBlue, kTRUE);
956 Double_t ltm =
GetLTM(entries, values, <mRms, ltmFraction);
958 if (integralHistoLTM) {
960 integralHistoLTM->SetLineColor(kGreen+2);
961 legend->AddEntry(integralHistoLTM,
"LTM",
"l");
962 integralHistoLTM->SetTitle(Form(
"%s, integrated; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
963 if ((plotMean && integralHistoMean) || (plotMedian && integralHistoMedian)) integralHistoLTM->Draw(
"same");
964 else integralHistoLTM->Draw();
965 DrawLines(integralHistoLTM, nsigma, legend, kGreen+2, kTRUE);
968 if (!plotMean && !plotMedian && !plotLTM)
return -1;
974 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 {
986 Double_t ltmFraction = 0.8;
988 TString drawStr(drawCommand);
989 Bool_t dangerousToDraw = drawStr.Contains(
":") || drawStr.Contains(
">>");
990 if (dangerousToDraw) {
991 Warning(
"Integrate",
"The draw string must not contain ':' or '>>'.");
994 drawStr +=
" >> tempHist";
996 Int_t entries =
EasyDraw1D(drawStr.Data(), sector, cuts,
"goff");
997 TH1F *
htemp = (TH1F*)gDirectory->Get(
"tempHist");
998 TGraph *integralGraphMean = 0;
999 TGraph *integralGraphMedian = 0;
1000 TGraph *integralGraphLTM = 0;
1001 Double_t *values =
fTree->GetV1();
1002 Int_t *index =
new Int_t[entries];
1003 Float_t *xarray =
new Float_t[entries];
1004 Float_t *yarray =
new Float_t[entries];
1005 TMath::Sort(entries, values, index, kFALSE);
1007 Double_t mean = TMath::Mean(entries, values);
1008 Double_t median = TMath::Median(entries, values);
1009 Double_t sigma = TMath::RMS(entries, values);
1012 TObjArray *sigmasTokens = TString(sigmas).Tokenize(
";");
1013 TVectorF nsigma(sigmasTokens->GetEntriesFast());
1014 for (Int_t i = 0; i < sigmasTokens->GetEntriesFast(); i++) {
1015 TString str(((TObjString*)sigmasTokens->At(i))->GetString());
1016 Double_t sig = (str.IsFloat()) ? str.Atof() : 0;
1019 delete sigmasTokens;
1021 TLegend * legend =
new TLegend(.7,.7, .99, .99,
"Integrated histogram");
1025 for (Int_t i = 0; i < entries; i++) {
1026 xarray[i] = (values[index[i]] - mean) / sigma;
1027 yarray[i] = float(i) / float(entries);
1029 integralGraphMean =
new TGraph(entries, xarray, yarray);
1030 if (integralGraphMean) {
1032 integralGraphMean->SetLineColor(kRed);
1033 legend->AddEntry(integralGraphMean,
"Mean",
"l");
1034 integralGraphMean->SetTitle(Form(
"%s, integrated; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
1035 integralGraphMean->Draw(
"alu");
1036 DrawLines(integralGraphMean, nsigma, legend, kRed, kTRUE);
1040 for (Int_t i = 0; i < entries; i++) {
1041 xarray[i] = (values[index[i]] - median) / sigma;
1042 yarray[i] = float(i) / float(entries);
1044 integralGraphMedian =
new TGraph(entries, xarray, yarray);
1045 if (integralGraphMedian) {
1047 integralGraphMedian->SetLineColor(kBlue);
1048 legend->AddEntry(integralGraphMedian,
"Median",
"l");
1049 integralGraphMedian->SetTitle(Form(
"%s, integrated; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
1050 if (plotMean && integralGraphMean) integralGraphMedian->Draw(
"samelu");
1051 else integralGraphMedian->Draw(
"alu");
1052 DrawLines(integralGraphMedian, nsigma, legend, kBlue, kTRUE);
1056 Double_t ltmRms = 0;
1057 Double_t ltm =
GetLTM(entries, values, <mRms, ltmFraction);
1058 for (Int_t i = 0; i < entries; i++) {
1059 xarray[i] = (values[index[i]] - ltm) / ltmRms;
1060 yarray[i] = float(i) / float(entries);
1062 integralGraphLTM =
new TGraph(entries, xarray, yarray);
1063 if (integralGraphLTM) {
1065 integralGraphLTM->SetLineColor(kGreen+2);
1066 legend->AddEntry(integralGraphLTM,
"LTM",
"l");
1067 integralGraphLTM->SetTitle(Form(
"%s, integrated; Multiples of #sigma; Fraction of included data", htemp->GetTitle()));
1068 if ((plotMean && integralGraphMean) || (plotMedian && integralGraphMedian)) integralGraphLTM->Draw(
"samelu");
1069 else integralGraphLTM->Draw(
"alu");
1070 DrawLines(integralGraphLTM, nsigma, legend, kGreen+2, kTRUE);
1077 if (!plotMean && !plotMedian && !plotLTM)
return -1;
1088 for (Int_t i = 0; i < nsigma.GetNoElements(); i++) {
1090 Int_t bin = histogram->GetXaxis()->FindBin(nsigma[i]);
1091 TLine* lineUp =
new TLine(nsigma[i], 0, nsigma[i], histogram->GetBinContent(bin));
1093 lineUp->SetLineColor(color);
1094 lineUp->SetLineStyle(2 + i);
1096 TLine* lineLeft =
new TLine(nsigma[i], histogram->GetBinContent(bin), 0, histogram->GetBinContent(bin));
1098 lineLeft->SetLineColor(color);
1099 lineLeft->SetLineStyle(2 + i);
1101 legend->AddEntry(lineLeft, Form(
"Fraction(%f #sigma) = %f",nsigma[i], histogram->GetBinContent(bin)),
"l");
1104 Int_t bin = histogram->GetXaxis()->FindBin(nsigma[i]);
1105 TLine* lineUp1 =
new TLine(nsigma[i], 0, nsigma[i], histogram->GetBinContent(bin));
1107 lineUp1->SetLineColor(color);
1108 lineUp1->SetLineStyle(2 + i);
1110 TLine* lineLeft1 =
new TLine(nsigma[i], histogram->GetBinContent(bin), histogram->GetBinLowEdge(0)+histogram->GetBinWidth(0), histogram->GetBinContent(bin));
1112 lineLeft1->SetLineColor(color);
1113 lineLeft1->SetLineStyle(2 + i);
1115 legend->AddEntry(lineLeft1, Form(
"Fraction(+%f #sigma) = %f",nsigma[i], histogram->GetBinContent(bin)),
"l");
1116 bin = histogram->GetXaxis()->FindBin(-nsigma[i]);
1117 TLine* lineUp2 =
new TLine(-nsigma[i], 0, -nsigma[i], histogram->GetBinContent(bin));
1119 lineUp2->SetLineColor(color);
1120 lineUp2->SetLineStyle(2 + i);
1122 TLine* lineLeft2 =
new TLine(-nsigma[i], histogram->GetBinContent(bin), histogram->GetBinLowEdge(0)+histogram->GetBinWidth(0), histogram->GetBinContent(bin));
1124 lineLeft2->SetLineColor(color);
1125 lineLeft2->SetLineStyle(2 + i);
1127 legend->AddEntry(lineLeft2, Form(
"Fraction(-%f #sigma) = %f",nsigma[i], histogram->GetBinContent(bin)),
"l");
1138 for (Int_t i = 0; i < nsigma.GetNoElements(); i++) {
1140 TLine* lineUp =
new TLine(nsigma[i], 0, nsigma[i], graph->Eval(nsigma[i]));
1142 lineUp->SetLineColor(color);
1143 lineUp->SetLineStyle(2 + i);
1145 TLine* lineLeft =
new TLine(nsigma[i], graph->Eval(nsigma[i]), 0, graph->Eval(nsigma[i]));
1147 lineLeft->SetLineColor(color);
1148 lineLeft->SetLineStyle(2 + i);
1150 legend->AddEntry(lineLeft, Form(
"Fraction(%f #sigma) = %f",nsigma[i], graph->Eval(nsigma[i])),
"l");
1153 TLine* lineUp1 =
new TLine(nsigma[i], 0, nsigma[i], graph->Eval(nsigma[i]));
1155 lineUp1->SetLineColor(color);
1156 lineUp1->SetLineStyle(2 + i);
1158 TLine* lineLeft1 =
new TLine(nsigma[i], graph->Eval(nsigma[i]), graph->GetHistogram()->GetXaxis()->GetBinLowEdge(0), graph->Eval(nsigma[i]));
1160 lineLeft1->SetLineColor(color);
1161 lineLeft1->SetLineStyle(2 + i);
1163 legend->AddEntry(lineLeft1, Form(
"Fraction(+%f #sigma) = %f",nsigma[i], graph->Eval(nsigma[i])),
"l");
1164 TLine* lineUp2 =
new TLine(-nsigma[i], 0, -nsigma[i], graph->Eval(-nsigma[i]));
1166 lineUp2->SetLineColor(color);
1167 lineUp2->SetLineStyle(2 + i);
1169 TLine* lineLeft2 =
new TLine(-nsigma[i], graph->Eval(-nsigma[i]), graph->GetHistogram()->GetXaxis()->GetBinLowEdge(0), graph->Eval(-nsigma[i]));
1171 lineLeft2->SetLineColor(color);
1172 lineLeft2->SetLineStyle(2 + i);
1174 legend->AddEntry(lineLeft2, Form(
"Fraction(-%f #sigma) = %f",nsigma[i], graph->Eval(-nsigma[i])),
"l");
1197 Int_t bin = TMath::Nint( (Float_t)(value - binLow) / (Float_t)(binUp - binLow) * (nbins-1) ) + 1;
1199 if (value < binLow) bin = 0;
1200 if (value > binUp) bin = nbins + 1;
1209 Double_t *ddata =
new Double_t[n];
1210 Double_t mean = 0, lsigma = 0;
1212 for (UInt_t i = 0; i < (UInt_t)n; i++) {
1213 ddata[nPoints]= array[nPoints];
1216 Int_t hh = TMath::Min(TMath::Nint(fraction * nPoints), Int_t(n));
1217 AliMathBase::EvaluateUni(nPoints, ddata, mean, lsigma, hh);
1218 if (sigma) *sigma = lsigma;
1240 Float_t *
array = histogram->GetArray();
1241 Int_t nbins = histogram->GetXaxis()->GetNbins();
1242 Float_t binLow = histogram->GetXaxis()->GetXmin();
1243 Float_t binUp = histogram->GetXaxis()->GetXmax();
1248 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){
1257 if (sigma == 0)
return 0;
1258 Float_t binWidth = (binUp-binLow)/(nbins - 1);
1259 if (sigmaStep <= 0) sigmaStep = binWidth;
1260 Int_t kbins = (Int_t)(sigmaMax * sigma / sigmaStep) + 1;
1261 if (pm) kbins = 2 * (Int_t)(sigmaMax * sigma / sigmaStep) + 1;
1262 Float_t kbinLow = !pm ? 0 : -sigmaMax;
1263 Float_t kbinUp = sigmaMax;
1264 TH1F *hist =
new TH1F(
"sigmaCutHisto",
"Cumulative; Multiples of #sigma; Fraction of included data", kbins, kbinLow, kbinUp);
1265 hist->SetDirectory(0);
1269 Double_t normalization = 0;
1270 for (Int_t i = 0; i <= n; i++) {
1271 normalization += array[i];
1282 for (Float_t iDelta = 0; iDelta <= sigmaMax * sigma; iDelta += sigmaStep) {
1284 Double_t valueP = array[
GetBin(mean, nbins, binLow, binUp)];
1285 Double_t valueM = array[
GetBin(mean-binWidth, nbins, binLow, binUp)];
1288 for (Float_t x = binWidth; x <= iDelta; x += binWidth) {
1289 valueP += (mean + x <= binUp) ? array[
GetBin(mean + x, nbins, binLow, binUp)] : 0;
1290 valueM += (mean-binWidth - x >= binLow) ? array[
GetBin(mean-binWidth - x, nbins, binLow, binUp)] : 0;
1294 if (valueP / normalization > 100)
printf(
"+++ Error, value to big: %f, normalization with %f will fail +++ \n", valueP, normalization);
1295 if (valueP / normalization > 100)
return hist;
1296 if (valueM / normalization > 100)
printf(
"+++ Error, value to big: %f, normalization with %f will fail +++ \n", valueM, normalization);
1297 if (valueM / normalization > 100)
return hist;
1298 valueP = (valueP / normalization);
1299 valueM = (valueM / normalization);
1301 Int_t bin =
GetBin(iDelta/sigma, kbins, kbinLow, kbinUp);
1302 hist->SetBinContent(bin, valueP);
1303 bin =
GetBin(-iDelta/sigma, kbins, kbinLow, kbinUp);
1304 hist->SetBinContent(bin, valueM);
1307 Int_t bin =
GetBin(iDelta/sigma, kbins, kbinLow, kbinUp);
1308 hist->SetBinContent(bin, valueP + valueM);
1315 if (!pm) hist->SetMaximum(1.2);
1324 printf(
"SigmaCut with variable binsize, Not yet implemented\n");
1343 Float_t *
array = histogram->GetArray();
1344 Int_t nbins = histogram->GetXaxis()->GetNbins();
1345 Float_t binLow = histogram->GetXaxis()->GetXmin();
1346 Float_t binUp = histogram->GetXaxis()->GetXmax();
1351 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){
1359 Bool_t givenUnits = kTRUE;
1360 if (sigma != 0 && sigmaMax != 0) givenUnits = kFALSE;
1363 sigmaMax = (binUp - binLow) / 2.;
1366 Float_t binWidth = (binUp-binLow)/(nbins - 1);
1367 if (sigmaStep <= 0) sigmaStep = binWidth;
1368 Int_t kbins = (Int_t)(sigmaMax * sigma / sigmaStep) + 1;
1369 Float_t kbinLow = givenUnits ? binLow : -sigmaMax;
1370 Float_t kbinUp = givenUnits ? binUp : sigmaMax;
1372 if (givenUnits) hist =
new TH1F(
"integratedHisto",
"Integrated Histogram; Given x; Fraction of included data", kbins, kbinLow, kbinUp);
1373 if (!givenUnits) hist =
new TH1F(
"integratedHisto",
"Integrated Histogram; Multiples of #sigma; Fraction of included data", kbins, kbinLow, kbinUp);
1374 hist->SetDirectory(0);
1379 Double_t normalization = 0;
1380 for (Int_t i = 1; i <= n; i++) {
1381 normalization += array[i];
1392 for (Float_t iDelta = mean - sigmaMax * sigma; iDelta <= mean + sigmaMax * sigma; iDelta += sigmaStep) {
1395 for (Float_t x = mean - sigmaMax * sigma; x <= iDelta; x += binWidth) {
1396 value += (x <= binUp && x >= binLow) ? array[
GetBin(x, nbins, binLow, binUp)] : 0;
1398 if (value / normalization > 100)
printf(
"+++ Error, value to big: %f, normalization with %f will fail +++ \n", value, normalization);
1399 if (value / normalization > 100)
return hist;
1400 Int_t bin =
GetBin(iDelta/sigma, kbins, kbinLow, kbinUp);
1403 value = (value / normalization);
1404 hist->SetBinContent(bin, value);
1426 TString drawStr(desiredData);
1427 drawStr.Append(
":channel");
1431 for (Int_t sec = 0; sec < 72; sec++) {
1433 entries =
EasyDraw1D(drawStr.Data(), (Int_t)sec, cuts,
"goff");
1434 if (entries == -1)
return 0;
1435 const Double_t *pchannel =
fTree->GetV2();
1436 const Double_t *pvalue =
fTree->GetV1();
1437 for (Int_t i = 0; i < entries; i++)
1438 roc->
SetValue((UInt_t)(pchannel[i]), (Float_t)(pvalue[i]));
1440 return createdCalPad;
1451 TString drawStr(desiredData);
1452 drawStr.Append(
":channel.fElements:sector");
1455 Int_t entries =
fTree->Draw(drawStr, cuts,
"goff");
1456 const Double_t *pvalue =
fTree->GetV1();
1457 const Double_t *pchannel =
fTree->GetV2();
1458 const Double_t *psector =
fTree->GetV3();
1460 for (Int_t ientry=0; ientry<entries; ientry++){
1461 Int_t sector= TMath::Nint(psector[ientry]);
1463 if (roc) roc->
SetValue((UInt_t)(pchannel[ientry]), (Float_t)(pvalue[ientry]));
1473 return createdCalPad;
1482 TString drawStr(desiredData);
1483 drawStr.Append(
":channel");
1485 Int_t entries =
EasyDraw1D(drawStr.Data(), (Int_t)sector, cuts,
"goff");
1486 if (entries == -1)
return 0;
1488 for (Int_t i = 0; i < entries; i++)
1499 TObjString* str = 0;
1500 if (!
fTree)
return 0;
1501 Int_t nentries =
fTree->GetListOfBranches()->GetEntries();
1502 for (Int_t i = 0; i < nentries; i++) {
1503 str =
new TObjString(
fTree->GetListOfBranches()->At(i)->GetName());
1504 str->String().ReplaceAll(
"_Median",
"");
1505 str->String().ReplaceAll(
"_Mean",
"");
1506 str->String().ReplaceAll(
"_RMS",
"");
1507 str->String().ReplaceAll(
"_LTM",
"");
1508 str->String().ReplaceAll(
"_OutlierCutted",
"");
1509 str->String().ReplaceAll(
".",
"");
1510 if (!arr->FindObject(str) &&
1511 !(str->String() ==
"channel" || str->String() ==
"gx" || str->String() ==
"gy" ||
1512 str->String() ==
"lx" || str->String() ==
"ly" || str->String() ==
"pad" ||
1513 str->String() ==
"row" || str->String() ==
"rpad" || str->String() ==
"sector" ))
1518 if (
fTree->GetListOfFriends()) {
1519 for (Int_t ifriend = 0; ifriend <
fTree->GetListOfFriends()->GetEntries(); ifriend++){
1522 if (TString(
fTree->GetListOfFriends()->At(ifriend)->ClassName()) !=
"TFriendElement")
continue;
1523 TFriendElement *friendElement = (TFriendElement*)
fTree->GetListOfFriends()->At(ifriend);
1524 if (friendElement->GetTree() == 0)
continue;
1526 for (Int_t i = 0; i < friendElement->GetTree()->GetListOfBranches()->GetEntries(); i++) {
1528 str =
new TObjString(friendElement->GetTree()->GetListOfBranches()->At(i)->GetName());
1529 str->String().ReplaceAll(
"_Median",
"");
1530 str->String().ReplaceAll(
"_Mean",
"");
1531 str->String().ReplaceAll(
"_RMS",
"");
1532 str->String().ReplaceAll(
"_LTM",
"");
1533 str->String().ReplaceAll(
"_OutlierCutted",
"");
1534 str->String().ReplaceAll(
".",
"");
1535 if (!(str->String() ==
"channel" || str->String() ==
"gx" || str->String() ==
"gy" ||
1536 str->String() ==
"lx" || str->String() ==
"ly" || str->String() ==
"pad" ||
1537 str->String() ==
"row" || str->String() ==
"rpad" || str->String() ==
"sector" )){
1539 str->String().Insert(0,
".");
1540 str->String().Insert(0, friendElement->GetName());
1541 if (!arr->FindObject(str)) arr->Add(str);
1554 TIterator* iter = arr->MakeIterator();
1556 TObjString* currentStr = 0;
1557 while ( (currentStr = (TObjString*)(iter->Next())) ) {
1558 std::cout << currentStr->GetString().Data() << std::endl;
1571 arr->Add(
new TObjString(
"_Mean"));
1572 arr->Add(
new TObjString(
"_Mean_OutlierCutted"));
1573 arr->Add(
new TObjString(
"_Median"));
1574 arr->Add(
new TObjString(
"_Median_OutlierCutted"));
1575 arr->Add(
new TObjString(
"_LTM"));
1576 arr->Add(
new TObjString(
"_LTM_OutlierCutted"));
1577 arr->Add(
new TObjString(Form(
"LFitIntern_4_8%s",
fAppendString.Data())));
1578 arr->Add(
new TObjString(Form(
"GFitIntern_Lin%s",
fAppendString.Data())));
1579 arr->Add(
new TObjString(Form(
"GFitIntern_Par%s",
fAppendString.Data())));
1580 arr->Add(
new TObjString(
"FitLinLocal"));
1581 arr->Add(
new TObjString(
"FitLinGlobal"));
1582 arr->Add(
new TObjString(
"FitParLocal"));
1583 arr->Add(
new TObjString(
"FitParGlobal"));
1586 TIterator* iter = arr->MakeIterator();
1588 TObjString* currentStr = 0;
1589 while ((currentStr = (TObjString*)(iter->Next()))) {
1590 std::cout << currentStr->GetString().Data() << std::endl;
1602 TFile *file =
new TFile(filename);
1604 TTree *
tree = (TTree*)file->Get(treename);
1615 Int_t numberOfCalPads = listOfCalPads->GetEntries();
1616 for (Int_t i = 0; i < numberOfCalPads; i++) {
1617 std::cout <<
"Creating calPad " << (i+1) <<
" of " << numberOfCalPads <<
"\r" << std::flush;
1618 char* calPadName = (
char*)((TObjString*)(listOfCalPads->At(i)))->GetString().Data();
1619 TString drawCommand = ((TObjString*)(listOfCalPads->At(i)))->GetString();
1622 calPadsArray->
Add(calPad);
1624 std::cout << std::endl;
1625 listOfCalPads->Delete();
1626 delete listOfCalPads;
1627 return calPadsArray;
1631 TString*
AliTPCCalibViewer::Fit(
const char* drawCommand,
const char* formula,
const char* cuts, Double_t &
chi2, TVectorD &fitParam, TMatrixD &covMatrix){
1636 TString formulaStr(formula);
1637 TString drawStr(drawCommand);
1638 TString cutStr(cuts);
1647 Int_t dim = formulaTokens->GetEntriesFast();
1649 fitParam.ResizeTo(dim);
1650 covMatrix.ResizeTo(dim,dim);
1652 TLinearFitter* fitter =
new TLinearFitter(dim+1, Form(
"hyp%d",dim));
1653 fitter->StoreData(kTRUE);
1654 fitter->ClearPoints();
1656 Int_t entries =
Draw(drawStr.Data(), cutStr.Data(),
"goff");
1657 if (entries == -1) {
1658 delete formulaTokens;
1659 return new TString(
"An ERROR has occured during fitting!");
1661 Double_t **values =
new Double_t*[dim+1] ;
1663 for (Int_t i = 0; i < dim + 1; i++){
1665 if (i < dim) centries =
fTree->Draw(((TObjString*)formulaTokens->At(i))->GetName(), cutStr.Data(),
"goff");
1666 else centries =
fTree->Draw(drawStr.Data(), cutStr.Data(),
"goff");
1668 if (entries != centries) {
1670 delete formulaTokens;
1671 return new TString(
"An ERROR has occured during fitting!");
1673 values[i] =
new Double_t[entries];
1674 memcpy(values[i],
fTree->GetV1(), entries*
sizeof(Double_t));
1678 for (Int_t i = 0; i < entries; i++){
1680 for (Int_t j=0; j<dim;j++) x[j]=values[j][i];
1681 fitter->AddPoint(x, values[dim][i], 1);
1685 fitter->GetParameters(fitParam);
1686 fitter->GetCovarianceMatrix(covMatrix);
1687 chi2 = fitter->GetChisquare();
1690 TString *preturnFormula =
new TString(Form(
"( %e+",fitParam[0])), &returnFormula = *preturnFormula;
1692 for (Int_t iparam = 0; iparam < dim; iparam++) {
1693 returnFormula.Append(Form(
"%s*(%e)",((TObjString*)formulaTokens->At(iparam))->GetName(),fitParam[iparam+1]));
1694 if (iparam < dim-1) returnFormula.Append(
"+");
1696 returnFormula.Append(
" )");
1697 delete formulaTokens;
1699 for (Int_t i = 0; i < dim + 1; i++){
1700 delete [] values[i];
1703 return preturnFormula;
1717 TVectorF *mapIROCArray = 0;
1718 TVectorF *mapOROCArray = 0;
1719 Int_t mapEntries = 0;
1720 TString* mapNames = 0;
1723 TFile mapFile(mapFileName,
"read");
1725 TList* listOfROCs = mapFile.GetListOfKeys();
1726 mapEntries = listOfROCs->GetEntries()/2;
1729 mapIROCArray =
new TVectorF[mapEntries];
1730 mapOROCArray =
new TVectorF[mapEntries];
1732 mapNames =
new TString[mapEntries];
1733 for (Int_t ivalue = 0; ivalue < mapEntries; ivalue++) {
1734 TString rocName(((TKey*)(listOfROCs->At(ivalue*2)))->GetName());
1735 rocName.Remove(rocName.Length()-4, 4);
1736 mapIROCs->AddAt((
AliTPCCalROC*)mapFile.Get((rocName +
"IROC").Data()), ivalue);
1737 mapOROCs->AddAt((
AliTPCCalROC*)mapFile.Get((rocName +
"OROC").Data()), ivalue);
1738 mapNames[ivalue].Append(rocName);
1741 for (Int_t ivalue = 0; ivalue < mapEntries; ivalue++) {
1742 mapIROCArray[ivalue].ResizeTo(tpcROCinstance->
GetNChannels(0));
1743 mapOROCArray[ivalue].ResizeTo(tpcROCinstance->
GetNChannels(36));
1745 for (UInt_t ichannel = 0; ichannel < tpcROCinstance->
GetNChannels(0); ichannel++)
1746 (mapIROCArray[ivalue])[ichannel] = ((
AliTPCCalROC*)(mapIROCs->At(ivalue)))->GetValue(ichannel);
1747 for (UInt_t ichannel = 0; ichannel < tpcROCinstance->
GetNChannels(36); ichannel++)
1748 (mapOROCArray[ivalue])[ichannel] = ((
AliTPCCalROC*)(mapOROCs->At(ivalue)))->GetValue(ichannel);
1753 TTreeSRedirector cstream(fileName);
1754 Int_t arrayEntries = array->GetEntries();
1757 TString* names =
new TString[arrayEntries];
1758 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++)
1759 names[ivalue].Append(((
AliTPCCalPad*)array->At(ivalue))->GetName());
1761 for (UInt_t isector = 0; isector < tpcROCinstance->
GetNSectors(); isector++) {
1763 TVectorF *vectorArray =
new TVectorF[arrayEntries];
1764 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++)
1765 vectorArray[ivalue].ResizeTo(tpcROCinstance->
GetNChannels(isector));
1771 TVectorF *posArray =
new TVectorF[8];
1772 for (Int_t ivalue = 0; ivalue < 8; ivalue++)
1773 posArray[ivalue].ResizeTo(tpcROCinstance->
GetNChannels(isector));
1775 Float_t posG[3] = {0};
1776 Float_t posL[3] = {0};
1778 for (UInt_t irow = 0; irow < tpcROCinstance->
GetNRows(isector); irow++) {
1779 for (UInt_t ipad = 0; ipad < tpcROCinstance->
GetNPads(isector, irow); ipad++) {
1782 posArray[0][ichannel] = irow;
1783 posArray[1][ichannel] = ipad;
1784 posArray[2][ichannel] = posL[0];
1785 posArray[3][ichannel] = posL[1];
1786 posArray[4][ichannel] = posG[0];
1787 posArray[5][ichannel] = posG[1];
1788 posArray[6][ichannel] = (Int_t)(ipad - (Double_t)(tpcROCinstance->
GetNPads(isector, irow))/2);
1789 posArray[7][ichannel] = ichannel;
1792 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++) {
1796 (vectorArray[ivalue])[ichannel] = calROC->
GetValue(irow, ipad);
1798 (vectorArray[ivalue])[ichannel] = 0;
1804 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++) {
1806 if (!roc) roc = &dummyROC;
1807 cstream <<
"calPads" <<
1808 (Char_t*)((names[ivalue] +
".=").Data()) << &vectorArray[ivalue];
1809 cstream <<
"calPads" <<
1810 (Char_t*)((names[ivalue] +
"Pad.=").Data()) << roc;
1814 for (Int_t ivalue = 0; ivalue < mapEntries; ivalue++) {
1816 cstream <<
"calPads" <<
1817 (Char_t*)((mapNames[ivalue] +
".=").Data()) << &mapIROCArray[ivalue];
1819 cstream <<
"calPads" <<
1820 (Char_t*)((mapNames[ivalue] +
".=").Data()) << &mapOROCArray[ivalue];
1824 cstream <<
"calPads" <<
1825 "sector=" << isector;
1827 cstream <<
"calPads" <<
1828 "row.=" << &posArray[0] <<
1829 "pad.=" << &posArray[1] <<
1830 "lx.=" << &posArray[2] <<
1831 "ly.=" << &posArray[3] <<
1832 "gx.=" << &posArray[4] <<
1833 "gy.=" << &posArray[5] <<
1834 "rpad.=" << &posArray[6] <<
1835 "channel.=" << &posArray[7];
1837 cstream <<
"calPads" <<
1841 delete[] vectorArray;
1848 delete[] mapIROCArray;
1849 delete[] mapOROCArray;
1871 TVectorF *mapIROCArray = 0;
1872 TVectorF *mapOROCArray = 0;
1873 Int_t mapEntries = 0;
1874 TString* mapNames = 0;
1877 TFile mapFile(mapFileName,
"read");
1879 TList* listOfROCs = mapFile.GetListOfKeys();
1880 mapEntries = listOfROCs->GetEntries()/2;
1883 mapIROCArray =
new TVectorF[mapEntries];
1884 mapOROCArray =
new TVectorF[mapEntries];
1886 mapNames =
new TString[mapEntries];
1887 for (Int_t ivalue = 0; ivalue < mapEntries; ivalue++) {
1888 TString rocName(((TKey*)(listOfROCs->At(ivalue*2)))->GetName());
1889 rocName.Remove(rocName.Length()-4, 4);
1890 mapIROCs->AddAt((
AliTPCCalROC*)mapFile.Get((rocName +
"IROC").Data()), ivalue);
1891 mapOROCs->AddAt((
AliTPCCalROC*)mapFile.Get((rocName +
"OROC").Data()), ivalue);
1892 mapNames[ivalue].Append(rocName);
1895 for (Int_t ivalue = 0; ivalue < mapEntries; ivalue++) {
1896 mapIROCArray[ivalue].ResizeTo(tpcROCinstance->
GetNChannels(0));
1897 mapOROCArray[ivalue].ResizeTo(tpcROCinstance->
GetNChannels(36));
1899 for (UInt_t ichannel = 0; ichannel < tpcROCinstance->
GetNChannels(0); ichannel++)
1900 (mapIROCArray[ivalue])[ichannel] = ((
AliTPCCalROC*)(mapIROCs->At(ivalue)))->GetValue(ichannel);
1901 for (UInt_t ichannel = 0; ichannel < tpcROCinstance->
GetNChannels(36); ichannel++)
1902 (mapOROCArray[ivalue])[ichannel] = ((
AliTPCCalROC*)(mapOROCs->At(ivalue)))->GetValue(ichannel);
1907 TTreeSRedirector cstream(fileName,
"recreate");
1908 Int_t arrayEntries = 0;
1909 if (array) arrayEntries = array->GetEntries();
1911 TString* names =
new TString[arrayEntries];
1912 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++)
1913 names[ivalue].Append(((
AliTPCCalPad*)array->At(ivalue))->GetName());
1915 for (UInt_t isector = 0; isector < tpcROCinstance->
GetNSectors(); isector++) {
1919 TVectorF median(arrayEntries);
1920 TVectorF mean(arrayEntries);
1921 TVectorF rms(arrayEntries);
1922 TVectorF ltm(arrayEntries);
1923 TVectorF ltmrms(arrayEntries);
1924 TVectorF medianWithOut(arrayEntries);
1925 TVectorF meanWithOut(arrayEntries);
1926 TVectorF rmsWithOut(arrayEntries);
1927 TVectorF ltmWithOut(arrayEntries);
1928 TVectorF ltmrmsWithOut(arrayEntries);
1930 TVectorF *vectorArray =
new TVectorF[arrayEntries];
1931 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++){
1932 vectorArray[ivalue].ResizeTo(tpcROCinstance->
GetNChannels(isector));
1933 vectorArray[ivalue].SetUniqueID(array->UncheckedAt(ivalue)->GetUniqueID());
1937 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++) {
1941 if (outlierPad) outlierROC = outlierPad->
GetCalROC(isector);
1944 mean[ivalue] = calROC->
GetMean();
1945 rms[ivalue] = calROC->
GetRMS();
1946 Double_t ltmrmsValue = 0;
1947 ltm[ivalue] = calROC->
GetLTM(<mrmsValue, ltmFraction);
1948 ltmrms[ivalue] = ltmrmsValue;
1950 medianWithOut[ivalue] = calROC->
GetMedian(outlierROC);
1951 meanWithOut[ivalue] = calROC->
GetMean(outlierROC);
1952 rmsWithOut[ivalue] = calROC->
GetRMS(outlierROC);
1954 ltmWithOut[ivalue] = calROC->
GetLTM(<mrmsValue, ltmFraction, outlierROC);
1955 ltmrmsWithOut[ivalue] = ltmrmsValue;
1959 median[ivalue] = 0.;
1963 ltmrms[ivalue] = 0.;
1964 medianWithOut[ivalue] = 0.;
1965 meanWithOut[ivalue] = 0.;
1966 rmsWithOut[ivalue] = 0.;
1967 ltmWithOut[ivalue] = 0.;
1968 ltmrmsWithOut[ivalue] = 0.;
1975 TVectorF *posArray =
new TVectorF[8];
1976 for (Int_t ivalue = 0; ivalue < 8; ivalue++)
1977 posArray[ivalue].ResizeTo(tpcROCinstance->
GetNChannels(isector));
1979 Float_t posG[3] = {0};
1980 Float_t posL[3] = {0};
1982 for (UInt_t irow = 0; irow < tpcROCinstance->
GetNRows(isector); irow++) {
1983 for (UInt_t ipad = 0; ipad < tpcROCinstance->
GetNPads(isector, irow); ipad++) {
1986 posArray[0][ichannel] = irow;
1987 posArray[1][ichannel] = ipad;
1988 posArray[2][ichannel] = posL[0];
1989 posArray[3][ichannel] = posL[1];
1990 posArray[4][ichannel] = posG[0];
1991 posArray[5][ichannel] = posG[1];
1992 posArray[6][ichannel] = (Int_t)(ipad - (Double_t)(tpcROCinstance->
GetNPads(isector, irow))/2);
1993 posArray[7][ichannel] = ichannel;
1996 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++) {
2000 (vectorArray[ivalue])[ichannel] = calROC->
GetValue(irow, ipad);
2002 (vectorArray[ivalue])[ichannel] = 0;
2008 cstream <<
"calPads" <<
2009 "sector=" << isector;
2011 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++) {
2012 if (outlierPad==0) {
2013 cstream <<
"calPads" <<
2014 (Char_t*)((names[ivalue] +
"_Median=").Data()) << median[ivalue] <<
2015 (Char_t*)((names[ivalue] +
"_Mean=").Data()) << mean[ivalue] <<
2016 (Char_t*)((names[ivalue] +
"_RMS=").Data()) << rms[ivalue] <<
2017 (Char_t*)((names[ivalue] +
"_LTM=").Data()) << ltm[ivalue] <<
2018 (Char_t*)((names[ivalue] +
"_RMS_LTM=").Data()) << ltmrms[ivalue];
2021 cstream <<
"calPads" <<
2022 (Char_t*)((names[ivalue] +
"_Median=").Data()) << medianWithOut[ivalue] <<
2023 (Char_t*)((names[ivalue] +
"_Mean").Data()) << meanWithOut[ivalue] <<
2024 (Char_t*)((names[ivalue] +
"_RMS=").Data()) << rmsWithOut[ivalue] <<
2025 (Char_t*)((names[ivalue] +
"_LTM=").Data()) << ltmWithOut[ivalue] <<
2026 (Char_t*)((names[ivalue] +
"_RMS_LTM=").Data()) << ltmrmsWithOut[ivalue];
2049 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++) {
2050 cstream <<
"calPads" <<
2051 (Char_t*)((names[ivalue] +
".=").Data()) << &vectorArray[ivalue];
2055 for (Int_t ivalue = 0; ivalue < mapEntries; ivalue++) {
2057 cstream <<
"calPads" <<
2058 (Char_t*)((mapNames[ivalue] +
".=").Data()) << &mapIROCArray[ivalue];
2060 cstream <<
"calPads" <<
2061 (Char_t*)((mapNames[ivalue] +
".=").Data()) << &mapOROCArray[ivalue];
2065 cstream <<
"calPads" <<
2066 "row.=" << &posArray[0] <<
2067 "pad.=" << &posArray[1] <<
2068 "lx.=" << &posArray[2] <<
2069 "ly.=" << &posArray[3] <<
2070 "gx.=" << &posArray[4] <<
2071 "gy.=" << &posArray[5] <<
2072 "rpad.=" << &posArray[6] <<
2073 "channel.=" << &posArray[7];
2075 cstream <<
"calPads" <<
2079 delete[] vectorArray;
2083 for (Int_t ivalue = 0; ivalue < arrayEntries; ivalue++) {
2085 tree->SetAlias(TString::Format(
"%s_LTMRatio",names[ivalue].Data()).Data(), TString::Format(
"%s.fElements/%s_LTM",names[ivalue].Data(),names[ivalue].Data()).Data());
2086 tree->SetAlias(TString::Format(
"%s_MeanRatio",names[ivalue].Data()).Data(), TString::Format(
"%s.fElements/%s_Mean",names[ivalue].Data(),names[ivalue].Data()).Data());
2087 tree->SetAlias(TString::Format(
"%s_MedianRatio",names[ivalue].Data()).Data(), TString::Format(
"%s.fElements/%s_Median",names[ivalue].Data(),names[ivalue].Data()).Data());
2088 tree->SetAlias(names[ivalue].Data(), TString::Format(
"%s.fElements",names[ivalue].Data()).Data());
2094 delete[] mapIROCArray;
2095 delete[] mapOROCArray;
2102 tree->SetAlias(
"Pad0",
"MapPadLength.fElements==7.5");
2103 tree->SetAlias(
"Pad1",
"MapPadLength.fElements==10.0");
2104 tree->SetAlias(
"Pad2",
"MapPadLength.fElements==15.0");
2105 tree->SetAlias(
"ly",
"(ly.fElements+((sector<36)*(2*((sector%36)<18)-1)*0.2)+((sector>=36)*(2*((sector%36)<18)-1)*0.3))");
2106 tree->SetAlias(
"dRowNorm0",
"(row.fElements/32-1)");
2107 tree->SetAlias(
"dRowNorm1",
"(row.fElements/32-1)");
2108 tree->SetAlias(
"dRowNorm2",
"((row.fElements-63)/16-1)");
2109 tree->SetAlias(
"dRowNorm",
"(row.fElements<63)*(row.fElements/32-1)+(row.fElements>63)*((row.fElements-63)/16-1)");
2110 tree->SetAlias(
"dPhiNorm",
"(ly/lx.fElements)/(pi/18)");
2112 tree->SetAlias(
"fsector",
"(sector%36)+(0.5+9*atan2(ly,lx.fElements)/pi)");
2113 tree->SetAlias(
"posEdge",
"((pi/18.)-abs(atan(ly/lx.fElements)))*lx.fElements");
2114 tree->SetAlias(
"lphi",
"atan(ly/lx.fElements)");
2139 MakeTree(outPutFileName, &objArray, mapFileName, outlierPad, ltmFraction);
2162 if ( calibObjects == 0x0 )
return;
2165 if ( !in.is_open() ){
2166 fprintf(stderr,
"Error: cannot open list file '%s'", filename);
2176 TObjArray *arrFileLine = sFile.Tokenize(
"\n");
2177 TIter nextLine(arrFileLine);
2179 TObjString *sObjLine = 0x0;
2180 while ( (sObjLine = (TObjString*)nextLine()) ){
2181 TString sLine(sObjLine->GetString());
2183 TObjArray *arrCol = sLine.Tokenize(
"\t");
2184 Int_t nCols = arrCol->GetEntriesFast();
2186 TObjString *sObjType = (TObjString*)(arrCol->At(0));
2187 TObjString *sObjFileName = (TObjString*)(arrCol->At(1));
2188 TObjString *sObjName = 0x0;
2190 if ( !sObjType || !sObjFileName )
continue;
2191 TString sType(sObjType->GetString());
2192 TString sFileName(sObjFileName->GetString());
2193 printf(
"Type %s, opening %s \n", sType.Data(), sFileName.Data());
2194 TFile *fIn = TFile::Open(sFileName);
2196 fprintf(stderr,
"File not found: '%s'", sFileName.Data());
2200 if ( sType ==
"CE" ){
2204 sObjName = (TObjString*)(arrCol->At(2));
2205 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2207 else calPad->SetNameTitle(
"CETmean",
"CETmean");
2208 calibObjects->
Add(calPad);
2212 sObjName = (TObjString*)(arrCol->At(3));
2213 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2215 else calPad->SetNameTitle(
"CEQmean",
"CEQmean");
2216 calibObjects->
Add(calPad);
2220 sObjName = (TObjString*)(arrCol->At(4));
2221 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2223 else calPad->SetNameTitle(
"CETrms",
"CETrms");
2224 calibObjects->
Add(calPad);
2226 }
else if ( sType ==
"Pulser") {
2231 sObjName = (TObjString*)(arrCol->At(2));
2232 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2234 else calPad->SetNameTitle(
"PulserTmean",
"PulserTmean");
2235 calibObjects->
Add(calPad);
2239 sObjName = (TObjString*)(arrCol->At(3));
2240 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2242 else calPad->SetNameTitle(
"PulserQmean",
"PulserQmean");
2243 calibObjects->
Add(calPad);
2247 sObjName = (TObjString*)(arrCol->At(4));
2248 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2250 else calPad->SetNameTitle(
"PulserTrms",
"PulserTrms");
2251 calibObjects->
Add(calPad);
2253 }
else if ( sType ==
"Pedestals") {
2258 sObjName = (TObjString*)(arrCol->At(2));
2259 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2261 else calPad->SetNameTitle(
"Pedestals",
"Pedestals");
2262 calibObjects->
Add(calPad);
2266 sObjName = (TObjString*)(arrCol->At(3));
2267 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2269 else calPad->SetNameTitle(
"Noise",
"Noise");
2270 calibObjects->
Add(calPad);
2272 }
else if ( sType ==
"CalPad") {
2273 if (nCols > 2) sObjName = (TObjString*)(arrCol->At(2));
2277 sObjName = (TObjString*)(arrCol->At(3));
2278 calPad->SetNameTitle(sObjName->GetString().Data(), sObjName->GetString().Data());
2280 calibObjects->
Add(calPad);
2282 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
const TObjArray * GetCalPadRMS() const
AliTPCCalROC * GetCalROC(Int_t sector) const
const TObjArray * GetCalPadRMS() const
static void MakeCalPadAliases(TTree *tree)
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
Double_t GetRMS(AliTPCCalROC *const outlierROC=0) 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)
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
Double_t GetMedian(AliTPCCalROC *const outlierROC=0) const
Double_t GetMean(AliTPCCalROC *const outlierROC=0) const
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)
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'