for (Int_t i = 0; i<7; ++i)
nESDTracksSpecies[i] = 0;
- Bool_t* foundPrimaries = new Bool_t[nPrim]; // to prevent double counting
+ Bool_t* foundPrimaries = new Bool_t[nMCPart]; // to prevent double counting
for (Int_t i=0; i<nPrim; i++)
foundPrimaries[i] = kFALSE;
- Bool_t* foundPrimaries2 = new Bool_t[nPrim]; // to prevent double counting
+ Bool_t* foundPrimaries2 = new Bool_t[nMCPart]; // to prevent double counting
for (Int_t i=0; i<nPrim; i++)
foundPrimaries2[i] = kFALSE;
void loadlibs()
{
gSystem->Load("libANALYSIS");
+ gSystem->Load("libANALYSISalice");
gSystem->Load("libPWG0base");
}
//const char* fileName[] = { "multiplicityMC_400k_syst.root", "multiplicityMC_TPC_4kfiles_syst.root" };
//const char* fileName[] = { "LHC09b9_0.9TeV_0T/mb1/spd/multiplicity.root", "LHC09b8_0.9TeV_0.5T/mb1/tpc/multiplicity.root" };
//const char* fileName[] = { "spd/multiplicity.root", "tpc/multiplicity.root" };
- const char* fileName[] = { "multiplicityparticle-efficiency.root", "multiplicity.root" };
+ const char* fileName[] = { "multiplicity.root", "multiplicity.root" };
Float_t etaRangeArr[] = {0.49, 0.9};
const char* titles[] = { "SPD Tracklets", "TPC Tracks" };
TLegend* legends[2];
+ TH1* effGlobal = 0;
+
for (Int_t loop=0; loop<1; ++loop)
{
Printf("%s", fileName[loop]);
TH1* effPt = (TH1*) genePt->Clone(Form("effPt_%d", i));
effPt->Reset();
effPt->Divide(measPt, genePt, 1, 1, "B");
+ if (i == 0)
+ effGlobal = effPt;
Int_t bin = 0;
for (bin=20; bin>=1; bin--)
canvas2->SaveAs(Form("%s.eps", canvas2->GetName()));
}
+ TH1* pt = 0;
+ for (Int_t i=0; i<3; ++i)
+ {
+ TH3* gene = correction[i]->GetTrackCorrection()->GetGeneratedHistogram();
+
+ // limit axes
+ gene->GetXaxis()->SetRangeUser(-vtxRange, vtxRange);
+ gene->GetYaxis()->SetRangeUser(-0.49, 0.49);
+
+ if (!pt)
+ pt = gene->Project3D(Form("z_pt_%d", i));
+ else
+ pt->Add(gene->Project3D(Form("z_pt_%d", i)));
+ }
+
+ new TCanvas;
+
+ Float_t sum = 0;
+ for (Int_t i=1; i<30; i++)
+ {
+ Float_t tmpCorr = 100.0 * pt->GetBinContent(i) / pt->Integral() * (0.532348 - effGlobal->GetBinContent(i)) / 0.532348;
+ Printf("Yield in %d bin: %.1f%%, efficiency %.1f%%, correction: %.2f%%", i, 100.0 * pt->GetBinContent(i) / pt->Integral(), 100.0 * effGlobal->GetBinContent(i), tmpCorr);
+ sum += tmpCorr;
+ }
+
+ Printf("%f", sum);
+
+
+ AliPWG0Helper::NormalizeToBinWidth(pt);
+ pt->Draw();
+
+
return;
canvas->cd();
// Add ESD handler
AliESDInputHandler* esdH = new AliESDInputHandler;
- esdH->SetInactiveBranches("AliESDACORDE FMD ALIESDTZERO ALIESDZDC AliRawDataErrorLogs CaloClusters Cascades EMCALCells EMCALTrigger ESDfriend Kinks AliESDTZERO ALIESDACORDE MuonTracks TrdTracks");
+ esdH->SetReadFriends(kFALSE);
+ //esdH->SetInactiveBranches("AliESDACORDE FMD ALIESDTZERO ALIESDZDC AliRawDataErrorLogs CaloClusters Cascades EMCALCells EMCALTrigger ESDfriend Kinks AliESDTZERO ALIESDACORDE MuonTracks TrdTracks");
mgr->SetInputEventHandler(esdH);
// physics selection
//task->SetUseMCVertex();
- if (requiredData != 2)
- task->SetSkipParticles();
+ //if (requiredData != 2)
+ // task->SetSkipParticles();
mgr->AddTask(task);