]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
updates for charge independent analysis per-trigger yields (for comparison to DHC)
authormiweber <m.weber@cern.ch>
Wed, 14 May 2014 07:37:09 +0000 (09:37 +0200)
committermiweber <m.weber@cern.ch>
Wed, 14 May 2014 07:38:14 +0000 (09:38 +0200)
PWGCF/EBYE/BalanceFunctions/AliBalancePsi.cxx
PWGCF/EBYE/macros/drawCorrelationFunctionPsiChargeIndependent.C

index 7c03c3d7e32e3f282e18012f42b21ff0d8d01999..b9f342699e406cd57531c9d3c0a2045fc5591c0c 100644 (file)
@@ -2000,6 +2000,8 @@ TH2D *AliBalancePsi::GetCorrelationFunction(TString type,
          NTrigSubBin = (Double_t)(fHistP->Project(0,1)->Integral());
        else if(type=="NP" || type=="NN")
          NTrigSubBin = (Double_t)(fHistN->Project(0,1)->Integral());
+       else if(type=="ALL")
+         NTrigSubBin = (Double_t)(fHistN->Project(0,1)->Integral() + fHistP->Project(0,1)->Integral());
        fSame->Scale(NTrigSubBin);
        
        // for the first: clone
@@ -2030,6 +2032,15 @@ TH2D *AliBalancePsi::GetCorrelationFunction(TString type,
       fHistN->GetGrid(0)->GetGrid()->GetAxis(1)->SetRangeUser(ptTriggerMin,ptTriggerMax-0.00001);
       NTrigAll = (Double_t)(fHistN->Project(0,1)->Integral());
     }
+    else if(type=="ALL"){
+      fHistN->GetGrid(0)->GetGrid()->GetAxis(0)->SetRangeUser(psiMin,psiMax-0.00001); 
+      fHistN->GetGrid(0)->GetGrid()->GetAxis(2)->SetRangeUser(vertexZMin,vertexZMax-0.00001); 
+      fHistN->GetGrid(0)->GetGrid()->GetAxis(1)->SetRangeUser(ptTriggerMin,ptTriggerMax-0.00001);
+      fHistP->GetGrid(0)->GetGrid()->GetAxis(0)->SetRangeUser(psiMin,psiMax-0.00001); 
+      fHistP->GetGrid(0)->GetGrid()->GetAxis(2)->SetRangeUser(vertexZMin,vertexZMax-0.00001); 
+      fHistP->GetGrid(0)->GetGrid()->GetAxis(1)->SetRangeUser(ptTriggerMin,ptTriggerMax-0.00001);
+      NTrigAll = (Double_t)(fHistN->Project(0,1)->Integral() + fHistP->Project(0,1)->Integral());
+    }
     gHist->Scale(1./NTrigAll);
    
   }
@@ -2422,7 +2433,7 @@ TH2D *AliBalancePsi::GetCorrelationFunctionChargeIndependent(Double_t psiMin,
 
   // divide by sum of + and - triggers
   if((Double_t)(fHistN->Project(0,1)->Integral())>0 && (Double_t)(fHistP->Project(0,1)->Integral())>0)
-    gHistNN->Scale(1./(Double_t)(fHistN->Project(0,1)->Integral() + fHistN->Project(0,1)->Integral()));
+    gHistNN->Scale(1./(Double_t)(fHistN->Project(0,1)->Integral() + fHistP->Project(0,1)->Integral()));
 
   //normalize to bin width
   gHistNN->Scale(1./((Double_t)gHistNN->GetXaxis()->GetBinWidth(1)*(Double_t)gHistNN->GetYaxis()->GetBinWidth(1)));
index de587263271a721b83e5649c7ac9bc641f2ba90d..52a1d99fcc3b455b9433a9504fde28591cb2098a 100644 (file)
@@ -1,5 +1,5 @@
-const Int_t numberOfCentralityBins = 12;
-TString centralityArray[numberOfCentralityBins] = {"0-10","10-20","20-30","30-40","40-50","50-60","60-70","70-80","0-100","0-1","1-2","2-3"};
+const Int_t numberOfCentralityBins = 13;
+TString centralityArray[numberOfCentralityBins] = {"0-80","10-20","20-30","30-40","40-50","50-60","60-70","70-80","0-100","0-1","1-2","2-3","92-8500"};
 
 const Int_t gRebin = 1;
 
@@ -105,6 +105,7 @@ TList *GetListOfObjects(const char* filename,
 
     listBF = dynamic_cast<TList *>(dir->Get(listBFName.Data()));
     cout<<"======================================================="<<endl;
+    cout<<"List name (control): "<<listBFName.Data()<<endl;
     cout<<"List name: "<<listBF->GetName()<<endl;
     //listBF->ls();
     
@@ -441,10 +442,20 @@ void draw(TList *list, TList *listBFShuffled, TList *listBFMixed,
       gHist[2]->Rebin2D(rebinEta,rebinPhi);
       gHist[2]->Scale(1./(Double_t)(rebinEta*rebinPhi));  
     }
     // normalization to 1 at (0,0) --> Jan Fietes method
     if(normToTrig){
-      Double_t mixedNorm = gHist[2]->Integral(gHist[2]->GetXaxis()->FindBin(0-10e-5),gHist[2]->GetXaxis()->FindBin(0+10e-5),1,gHist[2]->GetNbinsX());
-      mixedNorm /= gHist[2]->GetNbinsY()*(gHist[2]->GetXaxis()->FindBin(0.01) - gHist[2]->GetXaxis()->FindBin(-0.01) + 1);
+      Double_t mixedNorm = gHist[2]->Integral(gHist[2]->GetXaxis()->FindBin(0-10e-5),gHist[2]->GetXaxis()->FindBin(0+10e-5),gHist[2]->GetNbinsY()/2 + 1,gHist[2]->GetNbinsY());
+      mixedNorm /= 0.5 * gHist[2]->GetNbinsY()*(gHist[2]->GetXaxis()->FindBin(0.01) - gHist[2]->GetXaxis()->FindBin(-0.01) + 1);
+
+      // finite bin correction
+      Double_t binWidthEta = gHist[2]->GetXaxis()->GetBinWidth(gHist[2]->GetNbinsX());
+      Double_t maxEta      = gHist[2]->GetXaxis()->GetBinUpEdge(gHist[2]->GetNbinsX());
+       
+      Double_t finiteBinCorrection = -1.0 / (2*maxEta) * binWidthEta / 2 + 1;
+      //Printf("Finite bin correction: %f", finiteBinCorrection);
+      mixedNorm /= finiteBinCorrection;
+      
       gHist[2]->Scale(1./mixedNorm);
     } 
 
@@ -466,7 +477,7 @@ void draw(TList *list, TList *listBFShuffled, TList *listBFMixed,
     //c[2]->SaveAs(pngName.Data());
 
     //Correlation function (+-)
-    gHist[3] = b->GetCorrelationFunction("ALL",psiMin,psiMax,vertexZMin,vertexZMax,ptTriggerMin,ptTriggerMax,ptAssociatedMin,ptAssociatedMax,bMixed);
+    gHist[3] = b->GetCorrelationFunction("ALL",psiMin,psiMax,vertexZMin,vertexZMax,ptTriggerMin,ptTriggerMax,ptAssociatedMin,ptAssociatedMax,bMixed,normToTrig);
     gHist[3]->GetXaxis()->SetRangeUser(-1.5,1.5);
     gHist[3]->GetZaxis()->SetTitle("C_{+-}(#Delta#eta,#Delta#varphi)");
     c[3] = new TCanvas("c3","",0,300,600,500);