From bec72d8c8be4a48a077a608203870b57174f2c83 Mon Sep 17 00:00:00 2001 From: prino Date: Thu, 19 Jul 2012 08:45:16 +0000 Subject: [PATCH] Big fix + updates in D0-h THnSparse (Fabio) --- .../AliAnalysisTaskSED0Correlations.cxx | 13 ++++++++----- PWGHF/correlationHF/AliHFCorrelator.cxx | 2 +- .../macros/makeTFile4CutsD0Correlations.C | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/PWGHF/correlationHF/AliAnalysisTaskSED0Correlations.cxx b/PWGHF/correlationHF/AliAnalysisTaskSED0Correlations.cxx index 1e0e29ef950..8f9095576b8 100644 --- a/PWGHF/correlationHF/AliAnalysisTaskSED0Correlations.cxx +++ b/PWGHF/correlationHF/AliAnalysisTaskSED0Correlations.cxx @@ -800,7 +800,7 @@ void AliAnalysisTaskSED0Correlations::CreateCorrelationsObjs() { //These for limits in THnSparse (one per bin, same limits). //Vars: DeltaPhi, InvMass, PtTrack, Displacement, DeltaEta - Int_t nBinsPhi[5] = {32,150,30,3,16}; + Int_t nBinsPhi[5] = {32,150,6,3,16}; Double_t binMinPhi[5] = {-1.6,1.6,0.,0.,-1.6}; //is the minimum for all the bins Double_t binMaxPhi[5] = {4.8,2.2,3.0,3.,1.6}; //is the maximum for all the bins @@ -1077,19 +1077,19 @@ void AliAnalysisTaskSED0Correlations::CreateCorrelationsObjs() { if(!fMixing) { //phi distributions - TH1F *hPhiDistCAll = new TH1F("hist_PhiDistr_Charg", "Charged track phi distr. (All); p_{T} (GeV/c)",32,-1.6,4.8); + TH1F *hPhiDistCAll = new TH1F("hist_PhiDistr_Charg", "Charged track phi distr. (All); p_{T} (GeV/c)",64,0,6.283); hPhiDistCAll->SetMinimum(0); fOutputStudy->Add(hPhiDistCAll); - TH1F *hPhiDistHAll = new TH1F("hist_PhiDistr_Kcharg", "Hadrons phi distr. (All); p_{T} (GeV/c)",32,-1.6,4.8); + TH1F *hPhiDistHAll = new TH1F("hist_PhiDistr_Kcharg", "Hadrons phi distr. (All); p_{T} (GeV/c)",64,0,6.283); hPhiDistHAll->SetMinimum(0); fOutputStudy->Add(hPhiDistHAll); - TH1F *hPhiDistKAll = new TH1F("hist_PhiDistr_K0", "Kaons phi distr. (All); p_{T} (GeV/c)",32,-1.6,4.8); + TH1F *hPhiDistKAll = new TH1F("hist_PhiDistr_K0", "Kaons phi distr. (All); p_{T} (GeV/c)",64,0,6.283); hPhiDistKAll->SetMinimum(0); fOutputStudy->Add(hPhiDistKAll); - TH1F *hPhiDistDAll = new TH1F("hist_PhiDistr_D0", "D^{0} phi distr. (All); p_{T} (GeV/c)",32,-1.6,4.8); + TH1F *hPhiDistDAll = new TH1F("hist_PhiDistr_D0", "D^{0} phi distr. (All); p_{T} (GeV/c)",64,0,6.283); hPhiDistDAll->SetMinimum(0); fOutputStudy->Add(hPhiDistDAll); } @@ -1265,6 +1265,9 @@ void AliAnalysisTaskSED0Correlations::CalculateCorrelations(AliAODRecoDecayHF2Pr Int_t ptbin = PtBinCorr(d->Pt()); if(ptbin < 0) return; + //Fill of D0 phi distribution + if (!fMixing) ((TH1F*)fOutputStudy->FindObject("hist_PhiDistr_D0"))->Fill(d->Phi()); + //Origin of D0 TString orig=""; if(fReadMC) { diff --git a/PWGHF/correlationHF/AliHFCorrelator.cxx b/PWGHF/correlationHF/AliHFCorrelator.cxx index fccc41f9c48..84a1f2112ac 100644 --- a/PWGHF/correlationHF/AliHFCorrelator.cxx +++ b/PWGHF/correlationHF/AliHFCorrelator.cxx @@ -333,7 +333,7 @@ TObjArray* AliHFCorrelator::AcceptAndReduceTracks(AliAODEvent* inputEvent){ if(fUseImpactParameter==1) d0 = TMath::Abs(d0z0[0]); // use impact parameter if(fUseImpactParameter==2) { // use impact parameter over resolution - if(TMath::Abs(covd0z0[0])>0.00000001) d0 = TMath::Abs(d0z0[0])/TMath::Abs(covd0z0[0]); + if(TMath::Abs(covd0z0[0])>0.00000001) d0 = TMath::Abs(d0z0[0])/TMath::Sqrt(covd0z0[0]); else d0 = -1.; // if the resoultion is Zero, rejects the track - to be on the safe side } diff --git a/PWGHF/correlationHF/macros/makeTFile4CutsD0Correlations.C b/PWGHF/correlationHF/macros/makeTFile4CutsD0Correlations.C index c353931f9cf..d2dac0c9251 100644 --- a/PWGHF/correlationHF/macros/makeTFile4CutsD0Correlations.C +++ b/PWGHF/correlationHF/macros/makeTFile4CutsD0Correlations.C @@ -175,9 +175,9 @@ void makeInputAliAnalysisTaskSED0Correlations(){ const int nofcuts = 4; Float_t* trackcutsarray; trackcutsarray=new Float_t[nofcuts]; - trackcutsarray[0] = 0.;//track min pt + trackcutsarray[0] = 0.3;//track min pt trackcutsarray[1] = 10000.;//track max pt - trackcutsarray[2] = 0.;//track min impact parameter + trackcutsarray[2] = -99999999.;//track min impact parameter. DON'T put 0 since default value is -999999. and it would skip all tracks if d0 is not calculated! trackcutsarray[3] = 10000.;//track max impact parameter HFCorrelationCuts->SetNVarsTrack(nofcuts); HFCorrelationCuts->SetAODTrackCuts(trackcutsarray); -- 2.43.0