]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Big fix + updates in D0-h THnSparse (Fabio)
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 19 Jul 2012 08:45:16 +0000 (08:45 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 19 Jul 2012 08:45:16 +0000 (08:45 +0000)
PWGHF/correlationHF/AliAnalysisTaskSED0Correlations.cxx
PWGHF/correlationHF/AliHFCorrelator.cxx
PWGHF/correlationHF/macros/makeTFile4CutsD0Correlations.C

index 1e0e29ef950e68816385747b8beec03676c9d240..8f9095576b8ea0fa01ef80a32e2ee44b8ab5e8ee 100644 (file)
@@ -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) {
index fccc41f9c4805d5704e7c32eeb14b21456830a63..84a1f2112ac5221634482f96806f412cd12facc5 100644 (file)
@@ -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
                        
                }
index c353931f9cf2690e8ada6dbba1d309697f4ee588..d2dac0c9251911bdd59ffe20663c32dc5d928a40 100644 (file)
@@ -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);