From: cholm Date: Thu, 15 May 2014 12:50:49 +0000 (+0200) Subject: Add drawing of ESD fixer. X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=24338c03dfaeb7ae110015a71f73cfb6a7223dde;p=u%2Fmrichter%2FAliRoot.git Add drawing of ESD fixer. Other corrections for new code. --- diff --git a/PWGLF/FORWARD/analysis2/scripts/SummaryAODDrawer.C b/PWGLF/FORWARD/analysis2/scripts/SummaryAODDrawer.C index ae8ca287a90..68337d9e115 100644 --- a/PWGLF/FORWARD/analysis2/scripts/SummaryAODDrawer.C +++ b/PWGLF/FORWARD/analysis2/scripts/SummaryAODDrawer.C @@ -32,7 +32,8 @@ public: kSteps = 0x020, kResults = 0x040, kCentral = 0x080, - kNormal = 0x0FF + kESDFixer = 0x100, + kNormal = 0x1FF }; SummaryAODDrawer() : SummaryDrawer(), @@ -90,6 +91,7 @@ public: // --- Do each sub-algorithm ------------------------------------- if (what & kEventInspector) DrawEventInspector(fSums); + if (what & kESDFixer) DrawESDFixer(fSums); if (what & kSharingFilter) DrawSharingFilter(); if (what & kDensityCalculator) DrawDensityCalculator(); if (what & kCorrector) DrawCorrector(); @@ -254,6 +256,7 @@ protected: UShort_t det = UShort_t(name[3]-48); Char_t rng = name[4]; Color_t col = RingColor(det, rng); + hist->SetDirectory(0); hist->SetTitle(name); hist->SetMarkerStyle(20); hist->SetMarkerColor(col); @@ -281,15 +284,17 @@ protected: Double_t y = .95; Bool_t angle=false, lowSignal=false, disabled=false; - + Int_t nFiles = 0; if (GetParameter(c, "angle", angle)) DrawParameter(y, "Angle correct", (angle ? "yes" : "no")); if (GetParameter(c, "lowSignal", lowSignal)) DrawParameter(y, "Lower signal", (lowSignal ? "yes" : "no")); - TParameter* nFiles = + TParameter* pnFiles = static_cast*>(GetObject(c, "nFiles")); - if (nFiles) - DrawParameter(y, "# files merged", Form("%d", nFiles->GetVal())); + if (pnFiles) { + nFiles = pnFiles->GetVal(); + DrawParameter(y, "# files merged", Form("%d", nFiles)); + } if (GetParameter(c, "disabled", disabled)) DrawParameter(y, "Merging disabled", (disabled ? "yes" : "no")); @@ -303,15 +308,15 @@ protected: DrawParameter(y, "Simple method", (simple ? "yes" : "no")); if (GetParameter(c, "sumThree", three)) DrawParameter(y, "3-strip merging", (three ? "yes" : "no")); - + TCollection* lc = GetCollection(c, "lCuts"); TCollection* hc = GetCollection(c, "hCuts"); lm = PrintCut(lc, y, "Low cut"); hm = PrintCut(hc, y, "High cut"); hLow = GetH2(c, "lowCuts"); hHigh = GetH2(c, "highCuts"); - // if (hLow && nFiles) hLow->Scale(1. / nFiles->GetVal()); - // if (hHigh && nFiles) hHigh->Scale(1. / nFiles->GetVal()); + if (hLow && nFiles > 0) hLow->Scale(1. / nFiles); + if (hHigh && nFiles > 0) hHigh->Scale(1. / nFiles); DrawCut(fBody, 2, hLow); DrawCut(fBody, 3, hHigh); } @@ -395,9 +400,10 @@ protected: nB->GetXaxis()->SetRangeUser(0,2); nB->GetYaxis()->SetRangeUser(0,2); } - DrawInPad(fBody, 5, nB, "colz", kLogz); + DrawInPad(fBody, 5, nB, "colz cont3", kLogz); DrawInPad(fBody, 5, GetH2(sc, "neighborsAfter"), "col same", kLogz, "Correlation of neighbors before and after merging"); + DrawInPad(fBody, 6, GetH2(sc, "beforeAfter"), "colz", kLogz); PrintCanvas(Form("Sharing filter - %s", *ptr)); @@ -544,7 +550,7 @@ protected: Double_t y = .9; Int_t maxParticles=0, phiAcceptance=0, etaLumping=0, phiLumping=0; - Bool_t method=false, recalcEta=false, recalcPhi=false; + Bool_t method=false, recalcPhi=false; Double_t maxOutliers=0, outlierCut=0; Double_t size = fLandscape ? 0.05 : 0.03; @@ -560,8 +566,6 @@ protected: Form("%2d #times %2d", phiLumping, etaLumping), size); if (GetParameter(c, "method", method)) DrawParameter(y, "Method", (method ? "Poisson" : "#DeltaE"), size); - if (GetParameter(c, "recalcEta", recalcEta)) - DrawParameter(y, "Recalculate #eta",(recalcEta ? "yes" : "no"),size); if (GetParameter(c, "recalcPhi", recalcPhi)) DrawParameter(y, "Recalculate #phi",(recalcPhi ? "yes" : "no"),size); if (GetParameter(c, "maxOutliers", maxOutliers)) @@ -599,9 +603,7 @@ protected: DrawInPad(p, 2, accI); DrawInPad(p, 2, accO, "same", kLegend|kNorth|kCenter); DrawCut(p, 3, lCuts); - // DrawInPad(p, 3, lCuts, "colz"); DrawCut(p, 4, maxW); - // DrawInPad(p, 4, maxW, "colz"); PrintCanvas("Density calculator"); @@ -627,6 +629,8 @@ protected: DrawInPad(fBody, 1, corr, "colz", kLogz); DrawInPad(fBody, 1, corrOut, "same", kLogz); + ShowSliceFit(true, corr, 10, fBody, 1, kLogz, outlierCut); + DrawInPad(fBody, 2, diff, "HIST E", kLogy); DrawInPad(fBody, 2, diffOut, "HIST E SAME", kLogy|kLegend|kNorth|kWest); DrawInPad(fBody, 3, occ, "", kLogy); @@ -674,7 +678,6 @@ protected: } DrawInPad(fBody, 6, GetH2(sc, "phiAcc"), "colz", kLogz); - ShowSliceFit(true, corr, 10, fBody, 1, kLogz, outlierCut); if (diff && diffOut) { fBody->cd(2); @@ -1360,6 +1363,7 @@ protected: TH1* c1 = GetH1(central, "dNdeta_"); TH1* f2 = GetH1(forward, "dNdeta"); TH1* c2 = GetH1(central, "dNdeta"); + if (!f1 || !c1 || !f2 || !c2) return; f1->SetLineColor(kBlack); f2->SetLineColor(kBlack); c1->SetLineColor(kBlack); diff --git a/PWGLF/FORWARD/analysis2/scripts/SummaryDrawer.C b/PWGLF/FORWARD/analysis2/scripts/SummaryDrawer.C index b1d38b2397c..e7c5fc33799 100644 --- a/PWGLF/FORWARD/analysis2/scripts/SummaryDrawer.C +++ b/PWGLF/FORWARD/analysis2/scripts/SummaryDrawer.C @@ -1471,9 +1471,9 @@ protected: UShort_t sys=0, sNN=0; Int_t field=0; ULong_t runNo=0; - Int_t lowFlux=0, nPileUp=0; - ULong_t aliRev=0, aliBra=0; - Bool_t fpVtx=false, v0and=false; + Int_t lowFlux=0, nPileUp=0, ipMethod=0; + ULong_t aliRev=0, aliBra=0; + Bool_t v0and=false; Double_t dPileUp=0.; Double_t y = .8; @@ -1488,7 +1488,7 @@ protected: GetParameter(c, "field", field); GetParameter(c, "runNo", runNo); GetParameter(c, "lowFlux", lowFlux); - GetParameter(c, "fpVtx", fpVtx); + GetParameter(c, "ipMethod", ipMethod); GetParameter(c, "v0and", v0and); GetParameter(c, "nPileUp", nPileUp); GetParameter(c, "dPileup", dPileUp); @@ -1500,7 +1500,15 @@ protected: DrawParameter(y, "L3 B field", Form("%+2dkG", field)); DrawParameter(y, "Run #", Form("%lu", runNo)); DrawParameter(y, "Low flux cut", Form("%d", lowFlux)); - DrawParameter(y, "Use PWG-UD vertex", (fpVtx ? "yes" : "no")); + TString sIpMeth("unknown"); + switch(ipMethod) { + case 0: sIpMeth = "Normal"; break; + case 1: sIpMeth = "pA in 2012"; break; + case 2: sIpMeth = "pA in 2013"; break; + case 3: sIpMeth = "PWG-UD"; break; + case 4: sIpMeth = "Satellite"; break; + } + DrawParameter(y, "Use PWG-UD vertex", sIpMeth); DrawParameter(y, "Use V0AND for NSD", (v0and ? "yes" : "no")); DrawParameter(y, "Least # of pile-up vertex", Form("%d", nPileUp)); DrawParameter(y, "Least distance of pile-up vertex", @@ -1626,6 +1634,50 @@ protected: PrintCanvas("EventInspector - Monte-Carlo"); } //____________________________________________________________________ + virtual void DrawESDFixer(TCollection* parent) + { + Info("DrawESDFixer", "Drawing ESD fixer"); + TCollection* c = GetCollection(parent, "fmdESDFixer"); + if (!c) return; + + Int_t recoFactor = 0; + Bool_t recalcEta = false; + Bool_t invalidIsEmpty = false; + + fBody->cd(); + + Double_t save = fParName->GetTextSize(); + fParName->SetTextSize(0.05); + fParVal->SetTextSize(0.05); + + fBody->Divide(2,2); + fBody->cd(1); + + Double_t y = .8; + if (GetParameter(c, "recoFactor", recoFactor)) + DrawParameter(y, "Noise factor used in reco", + Form("%d (assumed)", recoFactor)); + if (GetParameter(c, "recalcEta", recalcEta)) + DrawParameter(y, "Recalculate #eta", + Form("%s", (recalcEta ? "yes" : "no"))); + if (GetParameter(c, "invalidIsEmpty", invalidIsEmpty)) + DrawParameter(y, "Assume invalid strips are empty", + Form("%s", (invalidIsEmpty ? "yes" : "no"))); + + TCollection* xd = GetCollection(c, "extraDead"); + if (xd) + DrawParameter(y, "# extra dead strips", + Form("%d", xd->GetEntries())); + + DrawInPad(fBody, 2, GetH1(c, "noiseChange"), "", kLogy); + DrawInPad(fBody, 3, GetH1(c, "etaChange"), "", kLogy); + DrawInPad(fBody, 4, GetH1(c, "deadChange"), "", kLogy); + + PrintCanvas("ESD Fixer"); + fParName->SetTextSize(save); + fParVal->SetTextSize(save); + } + //____________________________________________________________________ void DrawTrackDensity(TCollection* parent) { Info("DrawTrackDensity", "Drawing track density");