From: hansena Date: Wed, 4 Jul 2012 06:56:13 +0000 (+0000) Subject: final version of flow tasks for qm. (hopefully) X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=03f52e9d470391cd415cb473835ca24eef9a85ad;p=u%2Fmrichter%2FAliRoot.git final version of flow tasks for qm. (hopefully) --- diff --git a/PWGLF/FORWARD/analysis2/AliForwardFlowTaskQC.cxx b/PWGLF/FORWARD/analysis2/AliForwardFlowTaskQC.cxx index 267dbf28422..e3af31e6b13 100644 --- a/PWGLF/FORWARD/analysis2/AliForwardFlowTaskQC.cxx +++ b/PWGLF/FORWARD/analysis2/AliForwardFlowTaskQC.cxx @@ -153,7 +153,8 @@ void AliForwardFlowTaskQC::InitVertexBins() Int_t vL = Int_t(fVtxAxis->GetBinLowEdge(v)); Int_t vH = Int_t(fVtxAxis->GetBinUpEdge(v)); fBinsFMD.Add(new VertexBin(vL, vH, n, "FMD", (fgDispVtx ? kFALSE : kTRUE), fFMDCut)); - fBinsSPD.Add(new VertexBin(vL, vH, n, "SPD", kFALSE, fSPDCut)); +// fBinsSPD.Add(new VertexBin(vL, vH, n, "SPD", kFALSE, fSPDCut)); + fBinsSPD.Add(new VertexBin(vL, vH, n, "SPD", kTRUE, fSPDCut)); } } @@ -261,7 +262,7 @@ Bool_t AliForwardFlowTaskQC::FillVtxBinList(const TList& list, const TH2D& h, In Int_t nVtxBins = fVtxAxis->GetNbins(); while ((bin = static_cast(list.At(vtx+(nVtxBins*i))))) { - if (!bin->FillHists(h, fCent)) return kFALSE; + if (!bin->FillHists(h, fCent)) return kFALSE; bin->CumulantsAccumulate(fCent); i++; } @@ -587,8 +588,9 @@ void AliForwardFlowTaskQC::VertexBin::AddOutput(TList* outputlist) fCumuRef = new TH2D(Form("%s_v%d_%d_%d_ref", fType.Data(), fMoment, fVzMin, fVzMax), Form("%s_v%d_%d_%d_ref", fType.Data(), fMoment, fVzMin, fVzMax), 48, -6., 6., 5, 0.5, 5.5); - TFile acc("$ALICE_ROOT/PWGLF/FORWARD/corrections/FlowCorrections/FlowAccMap.root", "READ"); - TH1D* accMap = (TH1D*)acc.Get(Form("%saccVertex_%d_%d", fType.Data(), fVzMin, fVzMax)); +/* TFile* acc = TFile::Open("$ALICE_ROOT/PWGLF/FORWARD/corrections/FlowCorrections/FlowAccMap.root", "READ"); + TH1D* accMap = 0; + if (acc) accMap = (TH1D*)acc->Get(Form("%saccVertex_%d_%d", fType.Data(), fVzMin, fVzMax)); if (accMap && !fType.EqualTo("FMD")) { Int_t nBins = accMap->GetNbinsX(); Double_t eta[48] = { 0. }; @@ -607,11 +609,12 @@ void AliForwardFlowTaskQC::VertexBin::AddOutput(TList* outputlist) } eta[n] = 6.; fCumuRef->GetXaxis()->Set(n, eta); - } else { + } else {*/ fCumuRef->RebinX(24); - } - acc.Close(); - + /* } + acc->Close(); + delete acc; + */ fCumuRef->Sumw2(); //list->Add(fCumuRef); @@ -697,8 +700,8 @@ Bool_t AliForwardFlowTaskQC::VertexBin::FillHists(const TH2D& dNdetadphi, Double nCurRefBin = fCumuRef->GetXaxis()->FindBin(eta); // If we have moved to a new bin in the flow hist, and less than half the eta // region has been covered by it we cut it away. - if (!nPrevBin) nPrevBin = nCurBin; - if (!nPrevRefBin) nPrevRefBin = nCurRefBin; + if (!nPrevBin == 0) nPrevBin = nCurBin; + if (!nPrevRefBin == 0) nPrevRefBin = nCurRefBin; if (nCurBin != nPrevBin) { if (nCurRefBin != nPrevRefBin) { if (nInBin <= nBins/2) { @@ -723,7 +726,6 @@ Bool_t AliForwardFlowTaskQC::VertexBin::FillHists(const TH2D& dNdetadphi, Double else data = kTRUE; continue; } - if (!data) continue; if (!AliForwardFlowTaskQC::fgDispVtx && (nCurBin == 34 || nCurBin == 35) && (phiBin == 17 || phiBin == 18)) continue; if ( AliForwardFlowTaskQC::fgDispVtx && eta < 0 && (phiBin == 17 || phiBin == 18)) continue; phi = dNdetadphi.GetYaxis()->GetBinCenter(phiBin); diff --git a/PWGLF/FORWARD/analysis2/AliForwardMCFlowTaskQC.cxx b/PWGLF/FORWARD/analysis2/AliForwardMCFlowTaskQC.cxx index efde857d3bd..17c903dfd15 100644 --- a/PWGLF/FORWARD/analysis2/AliForwardMCFlowTaskQC.cxx +++ b/PWGLF/FORWARD/analysis2/AliForwardMCFlowTaskQC.cxx @@ -125,7 +125,7 @@ void AliForwardMCFlowTaskQC::InitVertexBins() Int_t vH = Int_t(fVtxAxis->GetBinUpEdge(v)); fBinsFMDTR.Add(new VertexBin(vL, vH, n, "FMDTR", (fgDispVtx ? kFALSE : kTRUE), fFMDCut)); fBinsSPDTR.Add(new VertexBin(vL, vH, n, "SPDTR", kTRUE, fSPDCut)); - fBinsMC.Add(new VertexBin(vL, vH, n, "MC")); + fBinsMC.Add(new VertexBin(vL, vH, n, "MC", kTRUE)); } } } @@ -270,6 +270,8 @@ Bool_t AliForwardMCFlowTaskQC::LoopAODMC() if (fAddFlow.Contains("eta")) flowFlags |= AliForwardFlowWeights::kEta; if (fAddFlow.Contains("cent")) flowFlags |= AliForwardFlowWeights::kCent; } + Double_t b = -1.; + b = header->GetImpactParameter(); // Track loop: chek how many particles will be accepted Double_t weight = 0; @@ -288,10 +290,14 @@ Bool_t AliForwardMCFlowTaskQC::LoopAODMC() if (eta > -4. && eta < 5.) { // Add flow if it is in the argument if (flowFlags != 0) - weight = fWeights.CalcWeight(eta, pT, phi, particle->PdgCode(), +/* weight = fWeights.CalcWeight(eta, pT, phi, particle->PdgCode(), rp, fCent, fAddType, fAddOrder, - flowFlags) + 1; - fdNdedpMC.Fill(eta, phi, weight); + flowFlags) + 1;*/ + weight = fWeights.CalcWeight(eta, pT, phi, particle->PdgCode(), + rp, b); + +// Printf("%f", weight); + fdNdedpMC.Fill(eta, phi, weight); } } Int_t sBin = fdNdedpMC.GetXaxis()->FindBin(-4.);