m.Merge();
}
+void Merge3(const char* file1, const char* file2, const char* file3)
+{
+ loadlibs();
+ TFileMerger m(1);
+
+ m.AddFile(file1);
+ m.AddFile(file2);
+ m.AddFile(file3);
+
+ m.SetFastMethod();
+ m.OutputFile("merged.root");
+ m.Merge();
+}
+
void MergeList2(const char* listFile, const char* dir, Bool_t onlyPrintEvents = kFALSE, const char* targetDir = "PWG4_LeadingTrackUE")
{
loadlibs();
ptDist1->Draw();
}
-void GetSumOfRatios(void* hVoid, void* hMixedVoid, TH1** hist, Int_t step, Int_t centralityBegin, Int_t centralityEnd, Float_t ptBegin, Float_t ptEnd, Bool_t normalizePerTrigger = kTRUE)
+void GetSumOfRatios(void* hVoid, void* hMixedVoid, TH1** hist, Int_t step, Int_t centralityBegin, Int_t centralityEnd, Float_t ptBegin, Float_t ptEnd, Bool_t normalizePerTrigger = kTRUE, Bool_t useCentralityBinsDirectly = kFALSE)
{
Printf("GetSumOfRatios | step %d | %d-%d%% | %.1f - %.1f GeV/c | %.1f - %.1f GeV/c", step, centralityBegin, centralityEnd, gpTMin, gpTMax, ptBegin, ptEnd);
Int_t centralityBeginBin = 0;
Int_t centralityEndBin = -1;
- if (centralityEnd >= centralityBegin)
+ if (!useCentralityBinsDirectly && centralityEnd >= centralityBegin)
{
centralityBeginBin = h->GetUEHist(2)->GetEventHist()->GetGrid(step)->GetGrid()->GetAxis(1)->FindBin(0.01 + centralityBegin);
centralityEndBin = h->GetUEHist(2)->GetEventHist()->GetGrid(step)->GetGrid()->GetAxis(1)->FindBin(-0.01 + centralityEnd);
}
+ else if (useCentralityBinsDirectly)
+ {
+ centralityBeginBin = centralityBegin;
+ centralityEndBin = centralityEnd;
+ }
*hist = h->GetUEHist(2)->GetSumOfRatios2(hMixed->GetUEHist(2), step, 0, ptBegin, ptEnd, centralityBeginBin, centralityEndBin, normalizePerTrigger);
str2.Form("%.2f < p_{T,assoc} < %.2f", gpTMin - 0.01, gpTMax + 0.01);
TString newTitle;
- newTitle.Form("%s - %s - %d-%d%%", str.Data(), str2.Data(), centralityBegin, centralityEnd);
+ newTitle.Form("%s - %s - %d-%d", str.Data(), str2.Data(), centralityBegin, centralityEnd);
+ if (!useCentralityBinsDirectly)
+ newTitle += "%";
if ((*hist))
(*hist)->SetTitle(newTitle);
}
else if (1)
{
//pA, fine
- maxLeadingPt = 7+2;
- maxAssocPt = 8+2;
+ maxLeadingPt = 6;
+ maxAssocPt = 7;
Float_t leadingPtArr[] = { 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 0.5, 4.0, 20.0 };
Float_t assocPtArr[] = { 0.15, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 0.5, 4.0, 12.0 };
}
for (Int_t i=0; i<maxLeadingPt; i++)
for (Int_t j=1; j<maxAssocPt; j++)
{
- if(0){
+ if(1){
if(j!=(i+1))continue;
Printf("\nOnly symmetric pt bins selected, leading pt: %f - %f associated pt: %f - %f",leadingPtArr[i],leadingPtArr[i+leadingPtOffset],assocPtArr[j],assocPtArr[j+1]);
}
GetSumOfRatios(h2, hMixed2, &hist3, step, 0, -1, leadingPtArr[i] + 0.01, leadingPtArr[i+leadingPtOffset] - 0.01, kTRUE);
// new TCanvas; hist3->Draw("SURF1"); return;
}
- else if (1)
+ else if (0)
{
// pA, fine binning
Int_t step = 8;
GetSumOfRatios(h, hMixed, &hist2, step, 20, 40, leadingPtArr[i] + 0.01, leadingPtArr[i+leadingPtOffset] - 0.01, kTRUE);
GetSumOfRatios(h, hMixed, &hist4, step, 40, 60, leadingPtArr[i] + 0.01, leadingPtArr[i+leadingPtOffset] - 0.01, kTRUE);
GetSumOfRatios(h, hMixed, &hist5, step, 60, 100, leadingPtArr[i] + 0.01, leadingPtArr[i+leadingPtOffset] - 0.01, kTRUE);
- GetSumOfRatios(h, hMixed, &hist7, step, 70, 100, leadingPtArr[i] + 0.01, leadingPtArr[i+leadingPtOffset] - 0.01, kTRUE);
- GetSumOfRatios(h, hMixed, &hist8, step, 80, 100, leadingPtArr[i] + 0.01, leadingPtArr[i+leadingPtOffset] - 0.01, kTRUE);
+// GetSumOfRatios(h, hMixed, &hist7, step, 70, 100, leadingPtArr[i] + 0.01, leadingPtArr[i+leadingPtOffset] - 0.01, kTRUE);
+// GetSumOfRatios(h, hMixed, &hist8, step, 80, 100, leadingPtArr[i] + 0.01, leadingPtArr[i+leadingPtOffset] - 0.01, kTRUE);
if (h2)
GetSumOfRatios(h2, hMixed2, &hist3, step, 0, -1, leadingPtArr[i] + 0.01, leadingPtArr[i+leadingPtOffset] - 0.01, kTRUE);
if (h3)
GetSumOfRatios(h3, hMixed3, &hist6, step, 0, -1, leadingPtArr[i] + 0.01, leadingPtArr[i+leadingPtOffset] - 0.01, kTRUE);
}
+ else if (1)
+ {
+ // pp
+ Int_t step = 8;
+
+ GetSumOfRatios(h, hMixed, &hist1, step, 4, 4, leadingPtArr[i] + 0.01, leadingPtArr[i+leadingPtOffset] - 0.01, kTRUE, kTRUE);
+ GetSumOfRatios(h, hMixed, &hist2, step, 3, 3, leadingPtArr[i] + 0.01, leadingPtArr[i+leadingPtOffset] - 0.01, kTRUE, kTRUE);
+ GetSumOfRatios(h, hMixed, &hist4, step, 2, 2, leadingPtArr[i] + 0.01, leadingPtArr[i+leadingPtOffset] - 0.01, kTRUE, kTRUE);
+ GetSumOfRatios(h, hMixed, &hist5, step, 1, 1, leadingPtArr[i] + 0.01, leadingPtArr[i+leadingPtOffset] - 0.01, kTRUE, kTRUE);
+ }
else if (0)
{
// pA, course binning
file->Close();
}
- TH1* events = h->GetCentralityDistribution();
+ TH1* events = h->GetEventCount()->ProjectionY("events", h->GetEventCount()->GetXaxis()->FindBin(step), h->GetEventCount()->GetXaxis()->FindBin(step));
file = TFile::Open(outputFile, "UPDATE");
events->Write("events");
file->Close();
file2 = TFile::Open(outputFile, "RECREATE");
file2->Close();
- Int_t maxLeadingPt = 6;
- Int_t maxAssocPt = 7;
+ Int_t maxLeadingPt = 10;
+ Int_t maxAssocPt = 11;
Int_t nHists = 6;
for (Int_t histId = 0; histId < nHists; histId++)
void RemoveWingAllSpecies()
{
const char* suffix[] = { "Hadrons", "Pions", "Kaons", "Protons" };
- TString baseName = "dphi_corr_130513b_";
+ TString baseName = "dphi_corr_LHC13bc_20130604_";
for (Int_t i=0; i<4; i++)
RemoveWing(baseName + suffix[i] + ".root", baseName + suffix[i] + "_wingremoved.root");
Int_t mergeCount = h->GetMergeCount();
h->SetPtRange(1.01, 3.99);
- dphi_corr = h->GetUEHist(2)->GetUEHist(AliUEHist::kCFStepReconstructed, 0, 2.01, 14.99, 1, 8);
+ dphi_corr = h->GetUEHist(2)->GetUEHist(AliUEHist::kCFStepReconstructed, 0, 1.01, 14.99, 1, 8);
if (dphi_corr->GetEntries() == 0)
- dphi_corr = h->GetUEHist(2)->GetUEHist(AliUEHist::kCFStepReconstructed+2, 0, 2.01, 14.99, 1, 8);
+ dphi_corr = h->GetUEHist(2)->GetUEHist(AliUEHist::kCFStepReconstructed+2, 0, 1.01, 14.99, 1, 8);
if (dphi_corr->GetEntries() == 0)
- dphi_corr = h->GetUEHist(2)->GetUEHist(AliUEHist::kCFStepAll, 0, 2.01, 14.99, 1, 8);
+ dphi_corr = h->GetUEHist(2)->GetUEHist(AliUEHist::kCFStepAll, 0, 1.01, 14.99, 1, 8);
AliUEHistograms* hMixed = (AliUEHistograms*) GetUEHistogram(fileName, 0, kTRUE, tag);
if (hMixed->GetUEHist(2)->GetTrackHist(0)->GetGrid(6)->GetGrid()->GetNbins() == 0)
title.Form("QA_%d_%s", runNumber, tmp.Data());
c->SetTitle(title);
+
+ gpTMin = 1.0;
+ gpTMax = 1.99;
+ h->SetPtRange(gpTMin, gpTMax);
+ hMixed->SetPtRange(gpTMin, gpTMax);
+
+ TH2* hist1 = 0;
+
+ c->cd(3);
+ GetDistAndFlow(h, 0, &hist1, 0, 6, 0, 20, 1.01, 4.99, 1);
+ hist1->DrawCopy("SURF1");
+
+ c->cd(6);
+ GetDistAndFlow(hMixed, 0, &hist1, 0, 6, 0, 20, 1.01, 4.99, 1);
+ hist1->DrawCopy("SURF1");
+
+ c->cd(9);
+ GetSumOfRatios(h, hMixed, &hist1, 6, 0, 20, 1.01, 4.99, kTRUE);
+ if (hist1)
+ hist1->DrawCopy("SURF1");
c->SaveAs(Form("qa/%s", c->GetTitle()));
}