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
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);
}
// 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)));
-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;
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();
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);
}
//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);