#include "AliAnalysisHelperJetTasks.h"
#include "AliAnalysisManager.h"
#include "AliAnalysisTaskSE.h"
+#include "AliAnalysisUtils.h"
#include "AliVParticle.h"
#include "AliVEvent.h"
,fQATrackPhiMax(0)
,fCommonHistList(0)
,fh1EvtSelection(0)
+ ,fh1VtxSelection(0)
,fh1VertexNContributors(0)
,fh1VertexZ(0)
,fh1EvtMult(0)
,fh1Trials(0)
,fh1PtHard(0)
,fh1PtHardTrials(0)
+ ,fh1EvtsPtHardCut(0)
,fh1nRecJetsCuts(0)
,fh1nGenJets(0)
,fh1nRecEffJets(0)
,fh1nGenBckgJets(0)
,fh2PtRecVsGenPrim(0)
,fh2PtRecVsGenSec(0)
+ ,fhDCA_XY(0)
+ ,fhDCA_Z(0)
+ ,fhJetPtRefMultEta5(0)
+ ,fhJetPtRefMultEta8(0)
+ ,fhJetPtMultPercent(0)
,fQATrackHistosRecEffGen(0)
,fQATrackHistosRecEffRec(0)
,fQATrackHistosSecRecNS(0)
,fRandom(0)
,fOnlyLeadingJets(kFALSE)
+ ,fMCPtHardCut(-1.)
+
+ ,fAnaUtils(0)
// PID framework
,fNumInclusivePIDtasks(0)
for (Int_t i = 0; i < AliPID::kSPECIES; i++) {
fIDFFHistosRecCuts[i] = 0x0;
fIDFFHistosGen[i] = 0x0;
+
+ fhDCA_XY_prim_MCID[i] = 0x0;
+ fhDCA_Z_prim_MCID[i] = 0x0;
+
+ fhDCA_XY_sec_MCID[i] = 0x0;
+ fhDCA_Z_sec_MCID[i] = 0x0;
}
}
,fQATrackPhiMax(0)
,fCommonHistList(0)
,fh1EvtSelection(0)
+ ,fh1VtxSelection(0)
,fh1VertexNContributors(0)
,fh1VertexZ(0)
,fh1EvtMult(0)
,fh1Trials(0)
,fh1PtHard(0)
,fh1PtHardTrials(0)
+ ,fh1EvtsPtHardCut(0)
,fh1nRecJetsCuts(0)
,fh1nGenJets(0)
,fh1nRecEffJets(0)
,fh1nGenBckgJets(0)
,fh2PtRecVsGenPrim(0)
,fh2PtRecVsGenSec(0)
+ ,fhDCA_XY(0)
+ ,fhDCA_Z(0)
+ ,fhJetPtRefMultEta5(0)
+ ,fhJetPtRefMultEta8(0)
+ ,fhJetPtMultPercent(0)
,fQATrackHistosRecEffGen(0)
,fQATrackHistosRecEffRec(0)
,fQATrackHistosSecRecNS(0)
,fProNtracksLeadingJetRecSecSsc(0)
,fRandom(0)
,fOnlyLeadingJets(kFALSE)
+ ,fMCPtHardCut(-1.)
+ ,fAnaUtils(0)
// PID framework
,fNumInclusivePIDtasks(0)
,fNumJetPIDtasks(0)
for (Int_t i = 0; i < AliPID::kSPECIES; i++) {
fIDFFHistosRecCuts[i] = 0x0;
fIDFFHistosGen[i] = 0x0;
+
+ fhDCA_XY_prim_MCID[i] = 0x0;
+ fhDCA_Z_prim_MCID[i] = 0x0;
+
+ fhDCA_XY_sec_MCID[i] = 0x0;
+ fhDCA_Z_sec_MCID[i] = 0x0;
}
DefineOutput(1,TList::Class());
,fQATrackPhiMax(copy.fQATrackPhiMax)
,fCommonHistList(copy.fCommonHistList)
,fh1EvtSelection(copy.fh1EvtSelection)
+ ,fh1VtxSelection(copy.fh1VtxSelection)
,fh1VertexNContributors(copy.fh1VertexNContributors)
,fh1VertexZ(copy.fh1VertexZ)
,fh1EvtMult(copy.fh1EvtMult)
,fh1Xsec(copy.fh1Xsec)
,fh1Trials(copy.fh1Trials)
,fh1PtHard(copy.fh1PtHard)
- ,fh1PtHardTrials(copy.fh1PtHardTrials)
+ ,fh1PtHardTrials(copy.fh1PtHardTrials)
+ ,fh1EvtsPtHardCut(copy.fh1EvtsPtHardCut)
,fh1nRecJetsCuts(copy.fh1nRecJetsCuts)
,fh1nGenJets(copy.fh1nGenJets)
,fh1nRecEffJets(copy.fh1nRecEffJets)
,fh1nGenBckgJets(copy.fh1nGenBckgJets)
,fh2PtRecVsGenPrim(copy.fh2PtRecVsGenPrim)
,fh2PtRecVsGenSec(copy.fh2PtRecVsGenSec)
+ ,fhDCA_XY(copy.fhDCA_XY)
+ ,fhDCA_Z(copy.fhDCA_Z)
+ ,fhJetPtRefMultEta5(copy.fhJetPtRefMultEta5)
+ ,fhJetPtRefMultEta8(copy.fhJetPtRefMultEta8)
+ ,fhJetPtMultPercent(copy.fhJetPtMultPercent)
,fQATrackHistosRecEffGen(copy.fQATrackHistosRecEffGen)
,fQATrackHistosRecEffRec(copy.fQATrackHistosRecEffRec)
,fQATrackHistosSecRecNS(copy.fQATrackHistosSecRecNS)
,fProNtracksLeadingJetRecSecSsc(copy.fProNtracksLeadingJetRecSecSsc)
,fRandom(copy.fRandom)
,fOnlyLeadingJets(copy.fOnlyLeadingJets)
+ ,fMCPtHardCut(copy.fMCPtHardCut)
+ ,fAnaUtils(copy.fAnaUtils)
// PID framework
,fNumInclusivePIDtasks(copy.fNumInclusivePIDtasks)
,fNumJetPIDtasks(copy.fNumJetPIDtasks)
fIDFFHistosGen[i] = 0x0;
if (copy.fIDFFHistosGen[i])
fIDFFHistosGen[i] = copy.fIDFFHistosGen[i];
+
+
+ fhDCA_XY_prim_MCID[i] = 0x0;
+ if (copy.fhDCA_XY_prim_MCID[i])
+ fhDCA_XY_prim_MCID[i] = copy.fhDCA_XY_prim_MCID[i];
+
+ fhDCA_Z_prim_MCID[i] = 0x0;
+ if (copy.fhDCA_Z_prim_MCID[i])
+ fhDCA_Z_prim_MCID[i] = copy.fhDCA_Z_prim_MCID[i];
+
+ fhDCA_XY_sec_MCID[i] = 0x0;
+ if (copy.fhDCA_XY_sec_MCID[i])
+ fhDCA_XY_sec_MCID[i] = copy.fhDCA_XY_sec_MCID[i];
+
+ fhDCA_Z_sec_MCID[i] = 0x0;
+ if (copy.fhDCA_Z_sec_MCID[i])
+ fhDCA_Z_sec_MCID[i] = copy.fhDCA_Z_sec_MCID[i];
}
if (fNumInclusivePIDtasks > 0) {
fQATrackPhiMax = o.fQATrackPhiMax;
fCommonHistList = o.fCommonHistList;
fh1EvtSelection = o.fh1EvtSelection;
+ fh1VtxSelection = o.fh1VtxSelection;
fh1VertexNContributors = o.fh1VertexNContributors;
fh1VertexZ = o.fh1VertexZ;
fh1EvtMult = o.fh1EvtMult;
fh1Trials = o.fh1Trials;
fh1PtHard = o.fh1PtHard;
fh1PtHardTrials = o.fh1PtHardTrials;
+ fh1EvtsPtHardCut = o.fh1EvtsPtHardCut;
fh1nRecJetsCuts = o.fh1nRecJetsCuts;
fh1nGenJets = o.fh1nGenJets;
fh1nRecEffJets = o.fh1nRecEffJets;
fh2DeltaPtVsJetPtEmbedded = o.fh2DeltaPtVsJetPtEmbedded;
fh2DeltaPtVsRecJetPtEmbedded = o.fh2DeltaPtVsRecJetPtEmbedded;
fh1DeltaREmbedded = o.fh1DeltaREmbedded;
+ fhDCA_XY = o.fhDCA_XY;
+ fhDCA_Z = o.fhDCA_Z;
+ fhJetPtRefMultEta5 = o.fhJetPtRefMultEta5;
+ fhJetPtRefMultEta8 = o.fhJetPtRefMultEta8;
+ fhJetPtMultPercent = o.fhJetPtMultPercent;
fQABckgHisto0RecCuts = o.fQABckgHisto0RecCuts;
fQABckgHisto0Gen = o.fQABckgHisto0Gen;
fQABckgHisto1RecCuts = o.fQABckgHisto1RecCuts;
fProNtracksLeadingJetRecSecSsc = o.fProNtracksLeadingJetRecSecSsc;
fRandom = o.fRandom;
fOnlyLeadingJets = o.fOnlyLeadingJets;
+ fMCPtHardCut = o.fMCPtHardCut;
+ fAnaUtils = o.fAnaUtils;
// PID framework
fUseInclusivePIDtask = o.fUseInclusivePIDtask;
fIDFFHistosGen[i] = 0x0;
if (o.fIDFFHistosGen[i])
fIDFFHistosGen[i] = o.fIDFFHistosGen[i];
+
+ fhDCA_XY_prim_MCID[i] = 0x0;
+ if (o.fhDCA_XY_prim_MCID[i])
+ fhDCA_XY_prim_MCID[i] = o.fhDCA_XY_prim_MCID[i];
+
+ fhDCA_Z_prim_MCID[i] = 0x0;
+ if (o.fhDCA_Z_prim_MCID[i])
+ fhDCA_Z_prim_MCID[i] = o.fhDCA_Z_prim_MCID[i];
+
+ fhDCA_XY_sec_MCID[i] = 0x0;
+ if (o.fhDCA_XY_sec_MCID[i])
+ fhDCA_XY_sec_MCID[i] = o.fhDCA_XY_sec_MCID[i];
+
+ fhDCA_Z_sec_MCID[i] = 0x0;
+ if (o.fhDCA_Z_sec_MCID[i])
+ fhDCA_Z_sec_MCID[i] = o.fhDCA_Z_sec_MCID[i];
}
}
delete [] fJetPIDtask;
fJetPIDtask = 0x0;
+
+ delete fAnaUtils;
+ fAnaUtils = 0x0;
}
//______________________________________________________________________________________________________
fh1EvtSelection->GetXaxis()->SetBinLabel(5,"vertex z: rejected");
fh1EvtSelection->GetXaxis()->SetBinLabel(6,"vertex type: rejected");
+ fh1VtxSelection = new TH1F("fh1VtxSelection", "Vertex Selection", 10, -1, 9);
+ fh1VtxSelection->GetXaxis()->SetBinLabel(1,"Undef");
+ fh1VtxSelection->GetXaxis()->SetBinLabel(2,"Primary");
+ fh1VtxSelection->GetXaxis()->SetBinLabel(3,"Kink");
+ fh1VtxSelection->GetXaxis()->SetBinLabel(4,"V0");
+ fh1VtxSelection->GetXaxis()->SetBinLabel(5,"Cascade");
+ fh1VtxSelection->GetXaxis()->SetBinLabel(6,"Multi");
+ fh1VtxSelection->GetXaxis()->SetBinLabel(7,"SPD");
+ fh1VtxSelection->GetXaxis()->SetBinLabel(8,"PileUpSPD");
+ fh1VtxSelection->GetXaxis()->SetBinLabel(9,"PileUpTracks");
+ fh1VtxSelection->GetXaxis()->SetBinLabel(10,"TPC");
+
fh1VertexNContributors = new TH1F("fh1VertexNContributors", "Vertex N contributors", 2500,-.5, 2499.5);
fh1VertexZ = new TH1F("fh1VertexZ", "Vertex z distribution", 30, -15., 15.);
fh1EvtMult = new TH1F("fh1EvtMult","Event multiplicity, track pT cut > 150 MeV/c, |#eta| < 0.9",120,0.,12000.);
fh1Trials->GetXaxis()->SetBinLabel(1,"#sum{ntrials}");
fh1PtHard = new TH1F("fh1PtHard","PYTHIA Pt hard;p_{T,hard}",350,-.5,349.5);
fh1PtHardTrials = new TH1F("fh1PtHardTrials","PYTHIA Pt hard weight with trials;p_{T,hard}",350,-.5,349.5);
+
+ fh1EvtsPtHardCut = new TH1F("fh1EvtsPtHardCut", "#events before and after MC #it{p}_{T,hard} cut;;Events",2,0,2);
+ fh1EvtsPtHardCut->GetXaxis()->SetBinLabel(1, "All");
+ fh1EvtsPtHardCut->GetXaxis()->SetBinLabel(2, "#it{p}_{T,hard}");
+
fh1nRecJetsCuts = new TH1F("fh1nRecJetsCuts","reconstructed jets per event",10,-0.5,9.5);
fh1nGenJets = new TH1F("fh1nGenJets","generated jets per event",10,-0.5,9.5);
Bool_t recJetsEff = (fJetTypeRecEff != kJetsUndef) ? kTRUE : kFALSE;
fCommonHistList->Add(fh1EvtSelection);
+ fCommonHistList->Add(fh1VtxSelection);
fCommonHistList->Add(fh1EvtMult);
fCommonHistList->Add(fh1EvtCent);
fCommonHistList->Add(fh1VertexNContributors);
fCommonHistList->Add(fh1Trials);
fCommonHistList->Add(fh1PtHard);
fCommonHistList->Add(fh1PtHardTrials);
+ fCommonHistList->Add(fh1EvtsPtHardCut);
if(genJets) fCommonHistList->Add(fh1nGenJets);
for(Int_t ii=0; ii<5; ii++) fCommonHistList->Add(fProDelRPtSumRecSecSsc[ii]);
}
}
-
- // =========== Switch on Sumw2 for all histos ===========
- for (Int_t i=0; i<fCommonHistList->GetEntries(); ++i){
- TH1 *h1 = dynamic_cast<TH1*>(fCommonHistList->At(i));
- if (h1) h1->Sumw2();
- else{
- THnSparse *hnSparse = dynamic_cast<THnSparse*>(fCommonHistList->At(i));
- if(hnSparse) hnSparse->Sumw2();
- }
- }
-
- TH1::AddDirectory(oldStatus);
-
+ // Default analysis utils
+ fAnaUtils = new AliAnalysisUtils();
+ // Not used yet, but to be save, forward vertex z cut to analysis utils object
+ fAnaUtils->SetMaxVtxZ(fMaxVertexZ);
+
// Load PID framework if desired
if(fDebug > 1) Printf("AliAnalysisTaskIDFragmentationFunction::UserCreateOutputObjects() -> Loading PID framework");
}
}
}
+
+ const Int_t nRefMultBins = 100;
+ const Double_t refMultUp = 100.;
+ const Double_t refMultDown = 0.;
+
+ const Int_t nJetPtBins = 20;
+ const Double_t jetPtUp = 100.;
+ const Double_t jetPtDown = 0.;
+
+ const Int_t nCentBins = 12;
+ const Double_t binsCentpp[nCentBins+1] = { 0, 0.01, 0.1, 1, 5, 10, 15, 20, 30, 40, 50, 70, 100};
+
+ fhJetPtRefMultEta5 = new TH2F("fhJetPtRefMultEta5",
+ "Correlation between jet energy and event multiplicity (|#eta| < 0.5);Ref. mult. (|#eta| < 0.5);#it{p}_{T, jet}^{ch} (GeV/#it{c})",
+ nRefMultBins, refMultDown, refMultUp, nJetPtBins, jetPtDown, jetPtUp);
+ fhJetPtRefMultEta8 = new TH2F("fhJetPtRefMultEta8",
+ "Correlation between jet energy and event multiplicity (|#eta| < 0.8);Ref. mult. (|#eta| < 0.8);#it{p}_{T, jet}^{ch} (GeV/#it{c})",
+ nRefMultBins, refMultDown, refMultUp, nJetPtBins, jetPtDown, jetPtUp);
+ fhJetPtMultPercent = new TH2F("fhJetPtMultPercent",
+ "Correlation between jet energy and event multiplicity percentile (V0M);Multiplicity Percentile (V0M);#it{p}_{T, jet}^{ch} (GeV/#it{c})",
+ nCentBins, binsCentpp, nJetPtBins, jetPtDown, jetPtUp);
+ fCommonHistList->Add(fhJetPtRefMultEta5);
+ fCommonHistList->Add(fhJetPtRefMultEta8);
+ fCommonHistList->Add(fhJetPtMultPercent);
+
+ if (fUseJetPIDtask) {
+ const Int_t nPtBins = 68;
+ Double_t binsPt[nPtBins+1] = {0. , 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45,
+ 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95,
+ 1.0, 1.1 , 1.2, 1.3 , 1.4, 1.5 , 1.6, 1.7 , 1.8, 1.9 ,
+ 2.0, 2.2 , 2.4, 2.6 , 2.8, 3.0 , 3.2, 3.4 , 3.6, 3.8 ,
+ 4.0, 4.5 , 5.0, 5.5 , 6.0, 6.5 , 7.0, 8.0 , 9.0, 10.0,
+ 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 18.0, 20.0, 22.0, 24.0,
+ 26.0, 28.0, 30.0, 32.0, 34.0, 36.0, 40.0, 45.0, 50.0 };
+
+ const Int_t DCAbins = 320;
+ const Double_t DCA_Z_max = 3.5;
+ const Double_t DCA_XY_max = 2.5;
+
+ fhDCA_XY = new TH2F("fhDCA_XY", "All rec. tracks;#it{p}_{T} (GeV/#it{c});DCA_{XY}", nPtBins, binsPt, DCAbins, -DCA_XY_max, DCA_XY_max);
+ fhDCA_Z = new TH2F("fhDCA_Z", "All rec. tracks;#it{p}_{T} (GeV/#it{c});DCA_{Z}", nPtBins, binsPt, DCAbins, -DCA_Z_max, DCA_Z_max);
+ fCommonHistList->Add(fhDCA_XY);
+ fCommonHistList->Add(fhDCA_Z);
+
+ for (Int_t i = 0; i < AliPID::kSPECIES; i++) {
+ fhDCA_XY_prim_MCID[i] = new TH2F(Form("fhDCA_XY_prim_MCID_%s", AliPID::ParticleShortName(i)),
+ Form("Rec. %s (prim.);#it{p}_{T} (GeV/#it{c});DCA_{XY}", AliPID::ParticleLatexName(i)),
+ nPtBins, binsPt, DCAbins, -DCA_XY_max, DCA_XY_max);
+ fhDCA_Z_prim_MCID[i] = new TH2F(Form("fhDCA_Z_prim_MCID_%s", AliPID::ParticleShortName(i)),
+ Form("Rec. %s (prim.);#it{p}_{T} (GeV/#it{c});DCA_{Z}", AliPID::ParticleLatexName(i)),
+ nPtBins, binsPt, DCAbins, -DCA_Z_max, DCA_Z_max);
+ fCommonHistList->Add(fhDCA_XY_prim_MCID[i]);
+ fCommonHistList->Add(fhDCA_Z_prim_MCID[i]);
+
+ fhDCA_XY_sec_MCID[i] = new TH2F(Form("fhDCA_XY_sec_MCID_%s", AliPID::ParticleShortName(i)),
+ Form("Rec. %s (sec.);#it{p}_{T} (GeV/#it{c});DCA_{XY}", AliPID::ParticleLatexName(i)),
+ nPtBins, binsPt, DCAbins, -DCA_XY_max, DCA_XY_max);
+ fhDCA_Z_sec_MCID[i] = new TH2F(Form("fhDCA_Z_sec_MCID_%s", AliPID::ParticleShortName(i)),
+ Form("Rec. %s (sec.);#it{p}_{T} (GeV/#it{c});DCA_{Z}", AliPID::ParticleLatexName(i)),
+ nPtBins, binsPt, DCAbins, -DCA_Z_max, DCA_Z_max);
+ fCommonHistList->Add(fhDCA_XY_sec_MCID[i]);
+ fCommonHistList->Add(fhDCA_Z_sec_MCID[i]);
+ }
+ }
+
+
+ // =========== Switch on Sumw2 for all histos ===========
+ for (Int_t i=0; i<fCommonHistList->GetEntries(); ++i){
+ TH1 *h1 = dynamic_cast<TH1*>(fCommonHistList->At(i));
+ if (h1) h1->Sumw2();
+ else{
+ THnSparse *hnSparse = dynamic_cast<THnSparse*>(fCommonHistList->At(i));
+ if(hnSparse) hnSparse->Sumw2();
+ }
+ }
+
+ TH1::AddDirectory(oldStatus);
if(fDebug > 2) Printf("AliAnalysisTaskIDFragmentationFunction::UserCreateOutputObjects() -> Posting Output");
if(fDebug > 1) Printf("Analysis event #%5d", (Int_t) fEntry);
+ fMCEvent = MCEvent();
+ if(!fMCEvent){
+ if(fDebug>3) Printf("%s:%d MCEvent not found in the input", (char*)__FILE__,__LINE__);
+ }
+
+ // Extract pThard and nTrials in case of MC.
+
+ Double_t ptHard = 0.;
+ Double_t nTrials = 1; // trials for MC trigger weight for real data
+ Bool_t pythiaGenHeaderFound = kFALSE;
+
+ if(fMCEvent){
+ AliGenEventHeader* genHeader = fMCEvent->GenEventHeader();
+
+ if(genHeader){
+ AliGenPythiaEventHeader* pythiaGenHeader = dynamic_cast<AliGenPythiaEventHeader*>(genHeader);
+ AliGenHijingEventHeader* hijingGenHeader = 0x0;
+
+ if(pythiaGenHeader){
+ if(fDebug>3) Printf("%s:%d pythiaGenHeader found", (char*)__FILE__,__LINE__);
+ pythiaGenHeaderFound = kTRUE;
+ nTrials = pythiaGenHeader->Trials();
+ ptHard = pythiaGenHeader->GetPtHard();
+ } else { // no pythia, hijing?
+
+ if(fDebug>3) Printf("%s:%d no pythiaGenHeader found", (char*)__FILE__,__LINE__);
+
+ hijingGenHeader = dynamic_cast<AliGenHijingEventHeader*>(genHeader);
+ if(!hijingGenHeader){
+ Printf("%s:%d no pythiaGenHeader or hjingGenHeader found", (char*)__FILE__,__LINE__);
+ } else {
+ if(fDebug>3) Printf("%s:%d hijingGenHeader found", (char*)__FILE__,__LINE__);
+ }
+ }
+
+ //fh1Trials->Fill("#sum{ntrials}",fAvgTrials);
+ }
+ }
+
+
+ // Cut on pThard if fMCEvent and pThard >= 0 and fill histo with #evt before and after the cut
+ if (pythiaGenHeaderFound) {
+ // Before cut
+ fh1EvtsPtHardCut->Fill(0.);
+
+ if (fUseJetPIDtask) {
+ for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
+ fJetPIDtask[i]->FillCutHisto(0., AliAnalysisTaskPID::kMCPtHardCut);
+ }
+ }
+
+ if (fUseInclusivePIDtask) {
+ for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
+ fInclusivePIDtask[i]->FillCutHisto(0., AliAnalysisTaskPID::kMCPtHardCut);
+ }
+ }
+
+
+ // Cut
+ if (fMCPtHardCut >= 0. && ptHard >= fMCPtHardCut) {
+ if (fDebug>3) Printf("%s:%d skipping event with pThard %f (>= %f)", (char*)__FILE__,__LINE__, ptHard, fMCPtHardCut);
+ PostData(1, fCommonHistList);
+ return;
+ }
+
+ // After cut
+ fh1EvtsPtHardCut->Fill(1.);
+
+ if (fUseJetPIDtask) {
+ for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
+ fJetPIDtask[i]->FillCutHisto(1., AliAnalysisTaskPID::kMCPtHardCut);
+ }
+ }
+
+ if (fUseInclusivePIDtask) {
+ for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
+ fInclusivePIDtask[i]->FillCutHisto(1., AliAnalysisTaskPID::kMCPtHardCut);
+ }
+ }
+ }
+
// Trigger selection
AliInputEventHandler* inputHandler = (AliInputEventHandler*)
((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
if(fDebug>3) Printf("%s:%d ESDEvent not found in the input", (char*)__FILE__,__LINE__);
}
- fMCEvent = MCEvent();
- if(!fMCEvent){
- if(fDebug>3) Printf("%s:%d MCEvent not found in the input", (char*)__FILE__,__LINE__);
- }
-
// get AOD event from input/ouput
TObject* handler = AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler();
if( handler && handler->InheritsFrom("AliAODInputHandler") ) {
Int_t cl = 0;
if(handler->InheritsFrom("AliAODInputHandler")){
// since it is not supported by the helper task define own classes
- centPercent = fAOD->GetHeader()->GetCentrality();
+ centPercent = ((AliAODHeader*)fAOD->GetHeader())->GetCentrality();
cl = 1;
if(centPercent>10) cl = 2;
if(centPercent>30) cl = 3;
}
}
+ // Retrieve reference multiplicities in |eta|<0.8 and <0.5
+ const Int_t refMult5 = ((AliAODHeader*)fAOD->GetHeader())->GetRefMultiplicityComb05();
+ const Int_t refMult8 = ((AliAODHeader*)fAOD->GetHeader())->GetRefMultiplicityComb08();
+ const Double_t centPercentPP = fAnaUtils->GetMultiplicityPercentile(fAOD, "V0M");
+
// Count events with trigger selection, note: Set centrality percentile fix to -1 for pp for PID framework
if (fUseJetPIDtask) {
return;
}
- // Count events with trigger selection and vtx cut, note: Set centrality percentile fix to -1 for pp for PID framework
+ // Count events with trigger selection, vtx cut and z vtx cut, note: Set centrality percentile fix to -1 for pp for PID framework
if (fUseJetPIDtask) {
for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
- fJetPIDtask[i]->IncrementEventCounter(fIsPP ? -1. : centPercent, AliAnalysisTaskPID::kTriggerSelAndVtxCutAndZvtxCut);
+ fJetPIDtask[i]->IncrementEventCounter(fIsPP ? -1. : centPercent, AliAnalysisTaskPID::kTriggerSelAndVtxCutAndZvtxCutNoPileUpRejection);
}
}
if (fUseInclusivePIDtask) {
for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
- fInclusivePIDtask[i]->IncrementEventCounter(fIsPP ? -1. : centPercent, AliAnalysisTaskPID::kTriggerSelAndVtxCutAndZvtxCut);
+ fInclusivePIDtask[i]->IncrementEventCounter(fIsPP ? -1. : centPercent, AliAnalysisTaskPID::kTriggerSelAndVtxCutAndZvtxCutNoPileUpRejection);
}
}
+
+ // Store for each task, whether this task would tag this event as pile-up or not
+ const Int_t arrSizeJet = TMath::Max(1, fNumJetPIDtasks);
+ const Int_t arrSizeInclusive = TMath::Max(1, fNumInclusivePIDtasks);
+ Bool_t isPileUpJetPIDtask[arrSizeJet];
+ Bool_t isPileUpInclusivePIDtask[arrSizeInclusive];
+
+ for (Int_t i = 0; i < arrSizeJet; i++)
+ isPileUpJetPIDtask[i] = kFALSE;
+
+ for (Int_t i = 0; i < arrSizeInclusive; i++)
+ isPileUpInclusivePIDtask[i] = kFALSE;
+
+ // Check whether there is at least one task that does not reject the event (saves processing time in the following code)
+ Bool_t isPileUpForAllJetPIDTasks = kTRUE;
+ Bool_t isPileUpForAllInclusivePIDTasks = kTRUE;
+
+ // Count events with trigger selection, vtx cut, z vtx cut and after pile-up rejection (if enabled in that task)
+ // Note: Set centrality percentile fix to -1 for pp for PID framework
+ if (fUseJetPIDtask) {
+ for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
+ isPileUpJetPIDtask[i] = fJetPIDtask[i]->GetIsPileUp(fAOD, fJetPIDtask[i]->GetPileUpRejectionType());
+ if (!isPileUpJetPIDtask[i])
+ fJetPIDtask[i]->IncrementEventCounter(fIsPP ? -1. : centPercent, AliAnalysisTaskPID::kTriggerSelAndVtxCutAndZvtxCut);
+
+ isPileUpForAllJetPIDTasks = isPileUpForAllJetPIDTasks && isPileUpJetPIDtask[i];
+ }
+ }
+
+ if (fUseInclusivePIDtask) {
+ for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
+ isPileUpInclusivePIDtask[i] = fInclusivePIDtask[i]->GetIsPileUp(fAOD, fInclusivePIDtask[i]->GetPileUpRejectionType());
+ if (!isPileUpInclusivePIDtask[i])
+ fInclusivePIDtask[i]->IncrementEventCounter(fIsPP ? -1. : centPercent, AliAnalysisTaskPID::kTriggerSelAndVtxCutAndZvtxCut);
+
+ isPileUpForAllInclusivePIDTasks = isPileUpForAllInclusivePIDTasks && isPileUpInclusivePIDtask[i];
+ }
+ }
+
+
if (fDebug > 1) Printf("%s:%d event ACCEPTED ...",(char*)__FILE__,__LINE__);
fh1EvtSelection->Fill(0.);
+ fh1VtxSelection->Fill(primVtx->GetType());
fh1EvtCent->Fill(centPercent);
// Set centrality percentile fix to -1 for pp to be used for the PID framework
if (fIsPP)
centPercent = -1;
-
- //___ get MC information __________________________________________________________________
-
- fh1Trials->Fill("#sum{ntrials}",fAvgTrials);
+
+ // Call ConfigureTaskForCurrentEvent of PID tasks to ensure that everything is set up properly for the current event
+ // (e.g. run/period dependence of max eta variation map)
if (fUseInclusivePIDtask) {
for (Int_t i = 0; i < fNumInclusivePIDtasks; i++)
- fInclusivePIDtask[i]->FillPythiaTrials(fAvgTrials);
+ if (!isPileUpInclusivePIDtask[i])
+ fInclusivePIDtask[i]->ConfigureTaskForCurrentEvent(fAOD);
}
if (fUseJetPIDtask) {
for (Int_t i = 0; i < fNumJetPIDtasks; i++)
- fJetPIDtask[i]->FillPythiaTrials(fAvgTrials);
+ if (!isPileUpJetPIDtask[i])
+ fJetPIDtask[i]->ConfigureTaskForCurrentEvent(fAOD);
}
+
+
+
+ //___ fill MC information __________________________________________________________________
- Double_t ptHard = 0.;
- Double_t nTrials = 1; // trials for MC trigger weight for real data
-
- if(fMCEvent){
- AliGenEventHeader* genHeader = fMCEvent->GenEventHeader();
-
- if(genHeader){
-
- AliGenPythiaEventHeader* pythiaGenHeader = dynamic_cast<AliGenPythiaEventHeader*>(genHeader);
- AliGenHijingEventHeader* hijingGenHeader = 0x0;
-
- if(pythiaGenHeader){
- if(fDebug>3) Printf("%s:%d pythiaGenHeader found", (char*)__FILE__,__LINE__);
- nTrials = pythiaGenHeader->Trials();
- ptHard = pythiaGenHeader->GetPtHard();
-
- fh1PtHard->Fill(ptHard);
- fh1PtHardTrials->Fill(ptHard,nTrials);
-
- } else { // no pythia, hijing?
-
- if(fDebug>3) Printf("%s:%d no pythiaGenHeader found", (char*)__FILE__,__LINE__);
-
- hijingGenHeader = dynamic_cast<AliGenHijingEventHeader*>(genHeader);
- if(!hijingGenHeader){
- Printf("%s:%d no pythiaGenHeader or hjingGenHeader found", (char*)__FILE__,__LINE__);
- } else {
- if(fDebug>3) Printf("%s:%d hijingGenHeader found", (char*)__FILE__,__LINE__);
- }
- }
-
- //fh1Trials->Fill("#sum{ntrials}",fAvgTrials);
+ fh1Trials->Fill("#sum{ntrials}",fAvgTrials);
+
+ if (fUseInclusivePIDtask) {
+ for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
+ if (!isPileUpInclusivePIDtask[i])
+ fInclusivePIDtask[i]->FillPythiaTrials(fAvgTrials);
+ }
+ }
+
+ if (fUseJetPIDtask) {
+ for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
+ if (!isPileUpJetPIDtask[i])
+ fJetPIDtask[i]->FillPythiaTrials(fAvgTrials);
}
}
+
+ if (pythiaGenHeaderFound) {
+ fh1PtHard->Fill(ptHard);
+ fh1PtHardTrials->Fill(ptHard,nTrials);
+ }
//___ fetch jets __________________________________________________________________________
// Fill efficiency for generated primaries and also fill histos for generated yields (primaries + all)
// Efficiency, inclusive - particle level
- if (fUseInclusivePIDtask && tca) {
+ if (fUseInclusivePIDtask && tca && !isPileUpForAllInclusivePIDTasks) {
for (Int_t it = 0; it < tca->GetEntriesFast(); it++) {
AliAODMCParticle* part = dynamic_cast<AliAODMCParticle*>(tca->At(it));
if (!part)
if (TMath::Abs(chargeMC) < 0.01)
continue; // Reject neutral particles (only relevant, if mcID is not used)
- Double_t valuesGenYield[AliAnalysisTaskPID::kGenYieldNumAxes] = { mcID, pT, centPercent, -1, -1, -1, -1 };
+ Double_t valuesGenYield[AliAnalysisTaskPID::kGenYieldNumAxes] = { static_cast<Double_t>(mcID), pT, centPercent, -1, -1, -1, -1 };
for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
- if (fInclusivePIDtask[i]->IsInAcceptedEtaRange(TMath::Abs(part->Eta()))) {
+ if (!isPileUpInclusivePIDtask[i] && fInclusivePIDtask[i]->IsInAcceptedEtaRange(TMath::Abs(part->Eta()))) {
valuesGenYield[fInclusivePIDtask[i]->GetIndexOfChargeAxisGenYield()] = chargeMC;
fInclusivePIDtask[i]->FillGeneratedYield(valuesGenYield);
}
}
- Double_t valuesEff[AliAnalysisTaskPID::kEffNumAxes] = { mcID, pT, part->Eta(), chargeMC,
+ Double_t valuesEff[AliAnalysisTaskPID::kEffNumAxes] = { static_cast<Double_t>(mcID), pT, part->Eta(), chargeMC,
centPercent, -1, -1, -1 };// no jet pT etc since inclusive spectrum
- for (Int_t i = 0; i < fNumInclusivePIDtasks; i++)
- fInclusivePIDtask[i]->FillEfficiencyContainer(valuesEff, AliAnalysisTaskPID::kStepGenWithGenCuts);
+ for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
+ if (!isPileUpInclusivePIDtask[i])
+ fInclusivePIDtask[i]->FillEfficiencyContainer(valuesEff, AliAnalysisTaskPID::kStepGenWithGenCuts);
+ }
}
}
- if(fUseInclusivePIDtask){
+ if (fUseInclusivePIDtask && !isPileUpForAllInclusivePIDTasks) {
//Efficiency, inclusive - detector level
for(Int_t it=0; it<nRecPartCutsEfficiency; ++it){
// fill inclusive tracks XXX, they have the same track cuts!
continue;
// AliAODMCParticle->Charge() calls TParticlePDG->Charge(), which returns the charge in units of e0 / 3
- Double_t value[AliAnalysisTaskPID::kEffNumAxes] = { mcID, gentrack->Pt(), gentrack->Eta(), gentrack->Charge() / 3.,
+ Double_t value[AliAnalysisTaskPID::kEffNumAxes] = { static_cast<Double_t>(mcID), gentrack->Pt(), gentrack->Eta(), gentrack->Charge() / 3.,
centPercent,
-1, -1, -1 };// no jet pT etc since inclusive spectrum
for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
- if ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
+ if (!isPileUpInclusivePIDtask[i] &&
+ ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
(survivedTPCCutMIGeo && fInclusivePIDtask[i]->GetUseTPCCutMIGeo()) ||
- (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut()))
+ (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut())))
fInclusivePIDtask[i]->FillEfficiencyContainer(value, AliAnalysisTaskPID::kStepRecWithGenCuts);
}
- Double_t valueMeas[AliAnalysisTaskPID::kEffNumAxes] = { mcID, inclusiveaod->Pt(), inclusiveaod->Eta(),
- inclusiveaod->Charge(), centPercent,
+ Double_t valueMeas[AliAnalysisTaskPID::kEffNumAxes] = { static_cast<Double_t>(mcID), inclusiveaod->Pt(), inclusiveaod->Eta(),
+ static_cast<Double_t>(inclusiveaod->Charge()), centPercent,
-1, -1, -1 };// no jet pT etc since inclusive spectrum
for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
- if ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
+ if (!isPileUpInclusivePIDtask[i] &&
+ ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
(survivedTPCCutMIGeo && fInclusivePIDtask[i]->GetUseTPCCutMIGeo()) ||
- (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut()))
+ (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut())))
fInclusivePIDtask[i]->FillEfficiencyContainer(valueMeas, AliAnalysisTaskPID::kStepRecWithGenCutsMeasuredObs);
}
}
// fill inclusive tracks XXX, they have the same track cuts!
AliAODTrack * inclusiveaod = dynamic_cast<AliAODTrack*>(fTracksRecCuts->At(it));
if(inclusiveaod){
- if(fUseInclusivePIDtask){
+ if (fUseInclusivePIDtask && !isPileUpForAllInclusivePIDTasks) {
Double_t dEdxTPC = tuneOnDataTPC ? pidResponse->GetTPCsignalTunedOnData(inclusiveaod)
: inclusiveaod->GetTPCsignal();
pdg = gentrack->GetPdgCode();
for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
- if ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
+ if (!isPileUpInclusivePIDtask[i] &&
+ ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
(survivedTPCCutMIGeo && fInclusivePIDtask[i]->GetUseTPCCutMIGeo()) ||
- (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut())) {
+ (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut()))) {
if (fInclusivePIDtask[i]->IsInAcceptedEtaRange(TMath::Abs(inclusiveaod->Eta())))
fInclusivePIDtask[i]->ProcessTrack(inclusiveaod, pdg, centPercent, -1); // no jet pT since inclusive spectrum
}
if (gentrack) {
Int_t mcID = AliAnalysisTaskPID::PDGtoMCID(pdg);
- Double_t valueRecAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { mcID, inclusiveaod->Pt(), inclusiveaod->Eta(),
- inclusiveaod->Charge(), centPercent,
+ Double_t valueRecAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { static_cast<Double_t>(mcID), inclusiveaod->Pt(), inclusiveaod->Eta(),
+ static_cast<Double_t>(inclusiveaod->Charge()), centPercent,
-1, -1, -1 };
for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
- if ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
+ if (!isPileUpInclusivePIDtask[i] &&
+ ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
(survivedTPCCutMIGeo && fInclusivePIDtask[i]->GetUseTPCCutMIGeo()) ||
- (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut()))
+ (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut())))
fInclusivePIDtask[i]->FillEfficiencyContainer(valueRecAllCuts, AliAnalysisTaskPID::kStepRecWithRecCutsMeasuredObs);
}
Double_t weight = IsSecondaryWithStrangeMotherMC(gentrack) ? GetMCStrangenessFactorCMS(gentrack) : 1.0;
for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
- if ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
+ if (!isPileUpInclusivePIDtask[i] &&
+ ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
(survivedTPCCutMIGeo && fInclusivePIDtask[i]->GetUseTPCCutMIGeo()) ||
- (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut()))
+ (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut())))
fInclusivePIDtask[i]->FillEfficiencyContainer(valueRecAllCuts,
AliAnalysisTaskPID::kStepRecWithRecCutsMeasuredObsStrangenessScaled,
weight);
if (gentrack->IsPhysicalPrimary()) {
// AliAODMCParticle->Charge() calls TParticlePDG->Charge(), which returns the charge in units of e0 / 3
- Double_t valueGenAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { mcID, gentrack->Pt(), gentrack->Eta(),
+ Double_t valueGenAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { static_cast<Double_t>(mcID), gentrack->Pt(), gentrack->Eta(),
gentrack->Charge() / 3., centPercent, -1, -1,
-1 };
gentrack->Charge() / 3., centPercent };
for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
- if ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
+ if (!isPileUpInclusivePIDtask[i] &&
+ ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
(survivedTPCCutMIGeo && fInclusivePIDtask[i]->GetUseTPCCutMIGeo()) ||
- (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut())) {
+ (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut()))) {
fInclusivePIDtask[i]->FillEfficiencyContainer(valueRecAllCuts,
AliAnalysisTaskPID::kStepRecWithRecCutsMeasuredObsPrimaries);
fInclusivePIDtask[i]->FillEfficiencyContainer(valueGenAllCuts,
}
if (fUseJetPIDtask && incrementJetPt) {
- for (Int_t i = 0; i < fNumJetPIDtasks; i++)
- fJetPIDtask[i]->FillGenJets(fJetPIDtask[i]->GetCentralityPercentile(evtForCentDetermination), jetPt);
+ for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
+ if (!isPileUpJetPIDtask[i])
+ fJetPIDtask[i]->FillGenJets(fJetPIDtask[i]->GetCentralityPercentile(evtForCentDetermination), jetPt);
+ }
}
if (fIDFFMode) {
delete trackV;
// Efficiency, jets - particle level
- if (fUseJetPIDtask) {
+ if (fUseJetPIDtask && !isPileUpForAllJetPIDTasks) {
AliAODMCParticle* part = dynamic_cast<AliAODMCParticle*>(jettracklist->At(it));
if (!part) {
AliError("expected ref track not found ");
if (TMath::Abs(chargeMC) < 0.01)
continue; // Reject neutral particles (only relevant, if mcID is not used)
- Double_t valuesGenYield[AliAnalysisTaskPID::kGenYieldNumAxes] = { mcID, trackPt, centPercent, jetPt, z, xi, chargeMC };
+ Double_t valuesGenYield[AliAnalysisTaskPID::kGenYieldNumAxes] = { static_cast<Double_t>(mcID), trackPt, centPercent, jetPt, z, xi, chargeMC };
for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
- if (fJetPIDtask[i]->IsInAcceptedEtaRange(TMath::Abs(part->Eta()))) {
+ if (!isPileUpJetPIDtask[i] && fJetPIDtask[i]->IsInAcceptedEtaRange(TMath::Abs(part->Eta()))) {
valuesGenYield[fJetPIDtask[i]->GetIndexOfChargeAxisGenYield()] = chargeMC;
fJetPIDtask[i]->FillGeneratedYield(valuesGenYield);
}
}
- Double_t valuesEff[AliAnalysisTaskPID::kEffNumAxes] = { mcID, trackPt, part->Eta(), chargeMC,
+ Double_t valuesEff[AliAnalysisTaskPID::kEffNumAxes] = { static_cast<Double_t>(mcID), trackPt, part->Eta(), chargeMC,
centPercent, jetPt, z, xi };
- for (Int_t i = 0; i < fNumJetPIDtasks; i++)
- fJetPIDtask[i]->FillEfficiencyContainer(valuesEff, AliAnalysisTaskPID::kStepGenWithGenCuts);
+ for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
+ if (!isPileUpJetPIDtask[i])
+ fJetPIDtask[i]->FillEfficiencyContainer(valuesEff, AliAnalysisTaskPID::kStepGenWithGenCuts);
+ }
}
}
}
}
-
for(Int_t ij=0; ij<nRecJetsCuts; ++ij){
AliAODJet* jet = (AliAODJet*)(fJetsRecCuts->At(ij));
if(fQAMode&2 && (ij==0)) fQAJetHistosRecCutsLeading->FillJetQA( jet->Eta(), TVector2::Phi_0_2pi(jet->Phi()), jet->Pt() );
if((ij==0) || !fOnlyLeadingJets){ // leading jets or all jets
-
+
+ fhJetPtRefMultEta5->Fill(refMult5, jet->Pt());
+ fhJetPtRefMultEta8->Fill(refMult8, jet->Pt());
+ fhJetPtMultPercent->Fill(centPercentPP, jet->Pt());
+
Double_t ptFractionEmbedded = 0;
AliAODJet* embeddedJet = 0;
}
if (fUseJetPIDtask && incrementJetPt) {
- for (Int_t i = 0; i < fNumJetPIDtasks; i++)
- fJetPIDtask[i]->FillRecJets(fJetPIDtask[i]->GetCentralityPercentile(evtForCentDetermination), jetPt);
+ for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
+ if (!isPileUpJetPIDtask[i])
+ fJetPIDtask[i]->FillRecJets(fJetPIDtask[i]->GetCentralityPercentile(evtForCentDetermination), jetPt);
+ }
}
- if (fUseJetPIDtask) {
+ if (fUseJetPIDtask && (!isPileUpForAllJetPIDTasks || fIDFFMode)) {
Double_t dEdxTPC = tuneOnDataTPC ? pidResponse->GetTPCsignalTunedOnData(aodtrack)
: aodtrack->GetTPCsignal();
Double_t z = -1., xi = -1.;
AliAnalysisTaskPID::GetJetTrackObservables(pT, jetPt, z, xi);
- Double_t valueRecAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { mcID, pT, aodtrack->Eta(), aodtrack->Charge(),
+ Double_t valueRecAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { static_cast<Double_t>(mcID), pT, aodtrack->Eta(), static_cast<Double_t>(aodtrack->Charge()),
centPercent, jetPt, z, xi };
for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
- if ((!fJetPIDtask[i]->GetUseTPCCutMIGeo() && !fJetPIDtask[i]->GetUseTPCnclCut()) ||
+ if (!isPileUpJetPIDtask[i] &&
+ ((!fJetPIDtask[i]->GetUseTPCCutMIGeo() && !fJetPIDtask[i]->GetUseTPCnclCut()) ||
(survivedTPCCutMIGeo && fJetPIDtask[i]->GetUseTPCCutMIGeo()) ||
- (survivedTPCnclCut && fJetPIDtask[i]->GetUseTPCnclCut()))
+ (survivedTPCnclCut && fJetPIDtask[i]->GetUseTPCnclCut())))
fJetPIDtask[i]->FillEfficiencyContainer(valueRecAllCuts, AliAnalysisTaskPID::kStepRecWithRecCutsMeasuredObs);
}
Double_t weight = IsSecondaryWithStrangeMotherMC(gentrack) ? GetMCStrangenessFactorCMS(gentrack) : 1.0;
for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
- if ((!fJetPIDtask[i]->GetUseTPCCutMIGeo() && !fJetPIDtask[i]->GetUseTPCnclCut()) ||
+ if (!isPileUpJetPIDtask[i] &&
+ ((!fJetPIDtask[i]->GetUseTPCCutMIGeo() && !fJetPIDtask[i]->GetUseTPCnclCut()) ||
(survivedTPCCutMIGeo && fJetPIDtask[i]->GetUseTPCCutMIGeo()) ||
- (survivedTPCnclCut && fJetPIDtask[i]->GetUseTPCnclCut()))
+ (survivedTPCnclCut && fJetPIDtask[i]->GetUseTPCnclCut())))
fJetPIDtask[i]->FillEfficiencyContainer(valueRecAllCuts,
AliAnalysisTaskPID::kStepRecWithRecCutsMeasuredObsStrangenessScaled,
weight);
Double_t genPt = gentrack->Pt();
Double_t genZ = -1., genXi = -1.;
AliAnalysisTaskPID::GetJetTrackObservables(genPt, jetPt, genZ, genXi);
- Double_t valueGenAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { mcID, genPt, gentrack->Eta(),
+ Double_t valueGenAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { static_cast<Double_t>(mcID), genPt, gentrack->Eta(),
gentrack->Charge() / 3., centPercent, jetPt, genZ,
genXi };
Double_t valuePtResolution[AliAnalysisTaskPID::kPtResNumAxes] = { jetPt, genPt, pT, gentrack->Charge() / 3., centPercent };
for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
- if ((!fJetPIDtask[i]->GetUseTPCCutMIGeo() && !fJetPIDtask[i]->GetUseTPCnclCut()) ||
+ if (!isPileUpJetPIDtask[i] &&
+ ((!fJetPIDtask[i]->GetUseTPCCutMIGeo() && !fJetPIDtask[i]->GetUseTPCnclCut()) ||
(survivedTPCCutMIGeo && fJetPIDtask[i]->GetUseTPCCutMIGeo()) ||
- (survivedTPCnclCut && fJetPIDtask[i]->GetUseTPCnclCut())) {
+ (survivedTPCnclCut && fJetPIDtask[i]->GetUseTPCnclCut()))) {
fJetPIDtask[i]->FillEfficiencyContainer(valueRecAllCuts,
AliAnalysisTaskPID::kStepRecWithRecCutsMeasuredObsPrimaries);
fJetPIDtask[i]->FillEfficiencyContainer(valueGenAllCuts,
}
}
+ Bool_t filledDCA = kFALSE;
+
for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
- if ((!fJetPIDtask[i]->GetUseTPCCutMIGeo() && !fJetPIDtask[i]->GetUseTPCnclCut()) ||
+ if (!isPileUpJetPIDtask[i] &&
+ ((!fJetPIDtask[i]->GetUseTPCCutMIGeo() && !fJetPIDtask[i]->GetUseTPCnclCut()) ||
(survivedTPCCutMIGeo && fJetPIDtask[i]->GetUseTPCCutMIGeo()) ||
- (survivedTPCnclCut && fJetPIDtask[i]->GetUseTPCnclCut())) {
- if (fJetPIDtask[i]->IsInAcceptedEtaRange(TMath::Abs(aodtrack->Eta())))
- fJetPIDtask[i]->ProcessTrack(aodtrack, pdg, centPercent, jetPt);
+ (survivedTPCnclCut && fJetPIDtask[i]->GetUseTPCnclCut()))) {
+ if (fJetPIDtask[i]->IsInAcceptedEtaRange(TMath::Abs(aodtrack->Eta()))) {
+ fJetPIDtask[i]->ProcessTrack(aodtrack, pdg, centPercent, jetPt);
+
+ // Fill DCA histo (once) if at least one of the PID tasks accecpts the track
+ if (!filledDCA) {
+ filledDCA = kTRUE;
+
+ Double_t dca[2] = {0., 0.}; // 0: xy; 1: z
+ if (aodtrack->IsGlobalConstrained()) {
+ dca[0] = aodtrack->DCA();
+ dca[1] = aodtrack->ZAtDCA();
+ }
+ else {
+ Double_t v[3] = {0, };
+ Double_t pos[3] = {0, };
+ primVtx->GetXYZ(v);
+ aodtrack->GetXYZ(pos);
+ dca[0] = pos[0] - v[0];
+ dca[1] = pos[1] - v[1];
+ }
+
+ // "Unidentified" for data and MC
+ fhDCA_XY->Fill(pT, dca[0]);
+ fhDCA_Z->Fill(pT, dca[1]);
+
+ // "Identified" for MC
+ if (gentrack && mcID != AliPID::kUnknown) {
+ // MC
+ if (gentrack->IsPhysicalPrimary()) {
+ fhDCA_XY_prim_MCID[mcID]->Fill(pT, dca[0]);
+ fhDCA_Z_prim_MCID[mcID]->Fill(pT, dca[1]);
+ }
+ else {
+ fhDCA_XY_sec_MCID[mcID]->Fill(pT, dca[0]);
+ fhDCA_Z_sec_MCID[mcID]->Fill(pT, dca[1]);
+ }
+ }
+ }
+ }
}
}
// AliAODMCParticle->Charge() calls TParticlePDG->Charge(), which returns the charge in units of e0 / 3
- Double_t value[AliAnalysisTaskPID::kEffNumAxes] = { mcID, genPt, gentrack->Eta(), gentrack->Charge() / 3.,
+ Double_t value[AliAnalysisTaskPID::kEffNumAxes] = { static_cast<Double_t>(mcID), genPt, gentrack->Eta(), gentrack->Charge() / 3.,
centPercent, jetPt, genZ, genXi };
for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
- if ((!fJetPIDtask[i]->GetUseTPCCutMIGeo() && !fJetPIDtask[i]->GetUseTPCnclCut()) ||
+ if (!isPileUpJetPIDtask[i] &&
+ ((!fJetPIDtask[i]->GetUseTPCCutMIGeo() && !fJetPIDtask[i]->GetUseTPCnclCut()) ||
(survivedTPCCutMIGeo && fJetPIDtask[i]->GetUseTPCCutMIGeo()) ||
- (survivedTPCnclCut && fJetPIDtask[i]->GetUseTPCnclCut()))
+ (survivedTPCnclCut && fJetPIDtask[i]->GetUseTPCnclCut())))
fJetPIDtask[i]->FillEfficiencyContainer(value, AliAnalysisTaskPID::kStepRecWithGenCuts);
}
- Double_t valueMeas[AliAnalysisTaskPID::kEffNumAxes] = { mcID, measPt, aodtrack->Eta(), aodtrack->Charge(),
+ Double_t valueMeas[AliAnalysisTaskPID::kEffNumAxes] = { static_cast<Double_t>(mcID), measPt, aodtrack->Eta(), static_cast<Double_t>(aodtrack->Charge()),
centPercent, jetPt, measZ, measXi };
for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
- if ((!fJetPIDtask[i]->GetUseTPCCutMIGeo() && !fJetPIDtask[i]->GetUseTPCnclCut()) ||
+ if (!isPileUpJetPIDtask[i] &&
+ ((!fJetPIDtask[i]->GetUseTPCCutMIGeo() && !fJetPIDtask[i]->GetUseTPCnclCut()) ||
(survivedTPCCutMIGeo && fJetPIDtask[i]->GetUseTPCCutMIGeo()) ||
- (survivedTPCnclCut && fJetPIDtask[i]->GetUseTPCnclCut()))
+ (survivedTPCnclCut && fJetPIDtask[i]->GetUseTPCnclCut())))
fJetPIDtask[i]->FillEfficiencyContainer(valueMeas, AliAnalysisTaskPID::kStepRecWithGenCutsMeasuredObs);
}
}
// all rec. tracks, esd filter mask, eta range
for(Int_t it=0; it<fAOD->GetNumberOfTracks(); ++it){
- AliAODTrack *tr = fAOD->GetTrack(it);
+ AliAODTrack *tr = (AliAODTrack*)fAOD->GetTrack(it);
if(type == kTrackAODCuts || type==kTrackAODQualityCuts || type==kTrackAODExtraCuts){