24 #include <TClonesArray.h>
29 #include <TDatabasePDG.h>
33 #include <THnSparse.h>
35 #include "AliAnalysisManager.h"
40 #include "AliAODHandler.h"
41 #include "AliAODEvent.h"
42 #include "AliAODVertex.h"
43 #include "AliAODTrack.h"
47 #include "AliAnalysisTaskSE.h"
51 #include "AliAODVZERO.h"
52 #include "AliESDUtils.h"
65 fHistNtrCorrVsZvtx(0),
66 fHistNtrVsnTrackEvWithCand(0),
70 fHistNtrCorrVsSpheri(0),
72 fHistNtrCorrVsNchMC(0),
73 fHistNtrVsNchMCPrimary(0),
74 fHistNtrCorrVsNchMCPrimary(0),
75 fHistNtrVsNchMCPhysicalPrimary(0),
76 fHistNtrCorrVsNchMCPhysicalPrimary(0),
77 fHistGenPrimaryParticlesInelGt0(0),
78 fHistNchMCVsNchMCPrimaryVsNchMCPhysicalPrimary(0),
81 fHistNtrCorrEvWithCand(0),
82 fHistNtrCorrEvWithD(0),
83 fHistnTrackvsEtavsPhi(0),
84 fHistnTrackvsEtavsPhiEvWithCand(0),
86 fSparseEvtShapewithNoPid(0),
87 fSparseEvtShapePrompt(0),
88 fSparseEvtShapeFeeddown(0),
89 fSparseEvtShapeRecSphero(0),
94 fMCRecoBothPromptFD(0),
95 fMCAccGenPromptSpheri(0),
96 fMCAccGenFeeddownSpheri(0),
97 fMCRecoPromptSpheri(0),
98 fMCRecoFeeddownSpheri(0),
99 fMCRecoBothPromptFDSpheri(0),
100 fMCAccGenPromptEvSel(0),
101 fMCAccGenFeeddownEvSel(0),
103 fLowmasslimit(1.765),
108 fCounterCandidates(0),
111 fLowerImpPar(-2000.),
112 fHigherImpPar(2000.),
117 fSubtractTrackletsFromDau(kFALSE),
118 fCalculateSphericity(kFALSE),
119 fRecomputeSpherocity(kFALSE),
120 fRemoveD0fromDstar(kFALSE),
124 fUsePtWeight(kFALSE),
128 fMultiplicityEstimator(kNtrk10),
129 fMCPrimariesEstimator(kEta10),
130 fDoVZER0ParamVertexCorr(1),
131 fFillSoSparseChecks(0),
133 fFillTrackHisto(kFALSE),
146 for(
Int_t i=0; i<5; i++) fHistMassPtImpPar[i]=0;
147 for(
Int_t i=0; i<4; i++) fMultEstimatorAvg[i]=0;
160 fHistNtrCorrVsZvtx(0),
161 fHistNtrVsnTrackEvWithCand(0),
165 fHistNtrCorrVsSpheri(0),
167 fHistNtrCorrVsNchMC(0),
168 fHistNtrVsNchMCPrimary(0),
169 fHistNtrCorrVsNchMCPrimary(0),
170 fHistNtrVsNchMCPhysicalPrimary(0),
171 fHistNtrCorrVsNchMCPhysicalPrimary(0),
172 fHistGenPrimaryParticlesInelGt0(0),
173 fHistNchMCVsNchMCPrimaryVsNchMCPhysicalPrimary(0),
174 fHistNtrCorrPSSel(0),
175 fHistNtrCorrEvSel(0),
176 fHistNtrCorrEvWithCand(0),
177 fHistNtrCorrEvWithD(0),
178 fHistnTrackvsEtavsPhi(0),
179 fHistnTrackvsEtavsPhiEvWithCand(0),
181 fSparseEvtShapewithNoPid(0),
182 fSparseEvtShapePrompt(0),
183 fSparseEvtShapeFeeddown(0),
184 fSparseEvtShapeRecSphero(0),
186 fMCAccGenFeeddown(0),
189 fMCRecoBothPromptFD(0),
190 fMCAccGenPromptSpheri(0),
191 fMCAccGenFeeddownSpheri(0),
192 fMCRecoPromptSpheri(0),
193 fMCRecoFeeddownSpheri(0),
194 fMCRecoBothPromptFDSpheri(0),
195 fMCAccGenPromptEvSel(0),
196 fMCAccGenFeeddownEvSel(0),
198 fLowmasslimit(1.765),
200 fRDCutsAnalysis(cuts),
203 fCounterCandidates(0),
206 fLowerImpPar(-2000.),
207 fHigherImpPar(2000.),
210 fisPPbData(switchPPb),
212 fSubtractTrackletsFromDau(kFALSE),
213 fCalculateSphericity(kFALSE),
214 fRecomputeSpherocity(kFALSE),
215 fRemoveD0fromDstar(kFALSE),
219 fUsePtWeight(kFALSE),
223 fMultiplicityEstimator(kNtrk10),
224 fMCPrimariesEstimator(kEta10),
225 fDoVZER0ParamVertexCorr(1),
226 fFillSoSparseChecks(0),
228 fFillTrackHisto(kFALSE),
255 DefineOutput(1,TList::Class());
257 DefineOutput(2,TList::Class());
259 DefineOutput(3,TList::Class());
261 DefineOutput(4,TList::Class());
263 DefineOutput(5,TList::Class());
281 for(
Int_t i=0; i<4; i++) {
285 for(
Int_t i=0; i<5; i++){
295 if(uplimit>lowlimit){
299 AliError(
"Wrong mass limits: upper value should be larger than lower one");
305 Double_t mass=TDatabasePDG::Instance()->GetParticle(TMath::Abs(pdg))->Mass();
313 printf(
"AnalysisTaskSEDvsMultiplicity_0::Init() \n");
316 if(
fUsePtWeight && !
fReadMC){ AliFatal(
"pT weights can only be used in MC mode");
return; }
320 if(
fisPPbData){ AliFatal(
"Nch weights can only be used with MC and data histogram in pPb");
return; }
331 copycut->SetName(
"AnalysisCutsDplus");
335 copycut->SetName(
"AnalysisCutsDzero");
339 copycut->SetName(
"AnalysisCutsDStar");
351 if (
fisPPbData) {period[0]=
"LHC13b"; period[1]=
"LHC13c"; nProfiles = 2;}
352 else {period[0]=
"LHC10b"; period[1]=
"LHC10c"; period[2]=
"LHC10d"; period[3]=
"LHC10e"; nProfiles = 4;}
354 for(
Int_t i=0; i<nProfiles; i++){
357 hprof->SetName(Form(
"ProfileTrkVsZvtx%s\n",period[i].
Data()));
372 if(fDebug > 1) printf(
"AnalysisTaskSEDvsMultiplicity::UserCreateOutputObjects() \n");
377 fOutput->SetName(
"OutputHistos");
383 Int_t nMultBins = 200;
386 Int_t nMultBinsNtrk = nMultBins;
387 Float_t lastMultBinNtrk = lastMultBin;
388 Int_t nMultBinsV0 = 400;
390 const char *estimatorName=
"tracklets";
393 lastMultBinNtrk = 374.5;
394 nMultBins = nMultBinsNtrk;
395 lastMultBin = lastMultBinNtrk;
398 nMultBins = nMultBinsV0;
399 lastMultBin = lastMultBinV0;
400 estimatorName =
"vzero";
403 fHistNtrCorrPSSel =
new TH1F(
"hNtrCorrPSSel",Form(
"Corrected %s multiplicity for PS selected events; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin);
404 fHistNtrCorrEvSel =
new TH1F(
"hNtrCorrEvSel",Form(
"Corrected %s multiplicity for selected events; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin);
405 fHistNtrCorrEvWithCand =
new TH1F(
"hNtrCorrEvWithCand", Form(
"%s multiplicity for events with D candidates; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin);
406 fHistNtrCorrEvWithD =
new TH1F(
"hNtrCorrEvWithD", Form(
"%s multiplicity for events with D in mass region ; %s ; Entries",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin);
408 fHistNtrVsZvtx =
new TH2F(
"hNtrVsZvtx",Form(
"N%s vs VtxZ; VtxZ;N_{%s};",estimatorName,estimatorName),300,-15,15,nMultBins,firstMultBin,lastMultBin);
409 fHistNtrCorrVsZvtx =
new TH2F(
"hNtrCorrVsZvtx",Form(
"N%s vs VtxZ; VtxZ;N_{%s};",estimatorName,estimatorName),300,-15,15,nMultBins,firstMultBin,lastMultBin);
410 fHistNtrVsnTrackEvWithCand =
new TH2F(
"hNtrVsnTrackEvWithCand",Form(
"N%s vs nTracks; nTracks; N_{%s};",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin);
416 histoNtrName =
"hNtrVsSphero";
417 histoNtrCorrName =
"hNtrCorrVsSphero";
418 parNameNtr =
"Sphero";
420 fHistNtrVsSo =
new TH2F(histoNtrName.Data(),Form(
"N_{%s} vs %s; %s; N_{%s};",estimatorName,parNameNtr.Data(),parNameNtr.Data(),estimatorName), 20, 0., 1., nMultBins,firstMultBin,lastMultBin);
421 fHistNtrCorrVsSo =
new TH2F(histoNtrCorrName.Data(),Form(
"N_{%s} vs %s; %s; N_{%s};",estimatorName,parNameNtr.Data(),parNameNtr.Data(),estimatorName), 20, 0., 1., nMultBins, firstMultBin,lastMultBin);
423 fHistnTrackvsEtavsPhi =
new TH3F(
"hnTrackvsEtavsPhi",
"Eta vs Phi vs nTracks; #eta; #phi[rad]; nTracks;", 100, -1.5, 1.5, 100, 0., 6.28,nMultBins,firstMultBin,lastMultBin);
424 fHistnTrackvsEtavsPhiEvWithCand =
new TH3F(
"hnTrackvsEtavsPhiEvWithCand",
"Eta vs Phi vs nTracks; #eta; #phi[rad]; nTracks;", 100, -1.5, 1.5, 100, 0., 6.28,nMultBins,firstMultBin,lastMultBin);
430 histoNtrSphriName =
"hNtrVsSpheri";
431 histoNtrCorrSphriName =
"hNtrCorrVsSpheri";
432 parNameNtrSphri =
"Spheri";
435 fHistNtrVsSpheri =
new TH2F(histoNtrSphriName.Data(),Form(
"N_{%s} vs %s; %s; N_{%s};",estimatorName,parNameNtrSphri.Data(),parNameNtrSphri.Data(),estimatorName), 20, 0., 1., nMultBins,firstMultBin,lastMultBin);
436 fHistNtrCorrVsSpheri =
new TH2F(histoNtrCorrSphriName.Data(),Form(
"N_{%s} vs %s; %s; N_{%s};",estimatorName,parNameNtrSphri.Data(),parNameNtrSphri.Data(),estimatorName), 20, 0., 1., nMultBins, firstMultBin,lastMultBin);
439 fHistNtrVsNchMC =
new TH2F(
"hNtrVsNchMC",Form(
"N%s vs NchMC; Nch;N_{%s};",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin);
440 fHistNtrCorrVsNchMC =
new TH2F(
"hNtrCorrVsNchMC",Form(
"N%s vs Nch; Nch;N_{%s};",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin);
442 fHistNtrVsNchMCPrimary =
new TH2F(
"hNtrVsNchMCPrimary",Form(
"N%s vs Nch (Primary); Nch (Primary);N_{%s};",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin);
443 fHistNtrCorrVsNchMCPrimary =
new TH2F(
"hNtrCorrVsNchMCPrimary",Form(
"N%s vs Nch (Primary); Nch(Primary) ;N_{%s};",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin);
445 fHistNtrVsNchMCPhysicalPrimary =
new TH2F(
"hNtrVsNchMCPhysicalPrimary",Form(
"N%s vs Nch (Physical Primary); Nch (Physical Primary);N_{%s};",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin);
446 fHistNtrCorrVsNchMCPhysicalPrimary =
new TH2F(
"hNtrCorrVsMCPhysicalPrimary",Form(
"N%s vs Nch (Physical Primary); Nch (Physical Primary);N_{%s};",estimatorName,estimatorName),nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin);
448 fHistGenPrimaryParticlesInelGt0 =
new TH1F(
"hGenPrimaryParticlesInelGt0",
"Multiplcity of generated charged particles ; Nparticles ; Entries",nMultBins,firstMultBin,lastMultBin);
450 fHistNchMCVsNchMCPrimaryVsNchMCPhysicalPrimary =
new TH3F(
"fHistNchMCVsNchMCPrimaryVsNchMCPhysicalPrimary",
"MC: Nch (Physical Primary) vs Nch (Primary) vs Nch (Generated); Nch (Generated); Nch (Primary); Nch (Physical Primary)",nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin,nMultBins,firstMultBin,lastMultBin);
478 fHistNEvents =
new TH1F(
"fHistNEvents",
"number of events ",11,-0.5,10.5);
479 fHistNEvents->GetXaxis()->SetBinLabel(1,
"nEvents total");
480 fHistNEvents->GetXaxis()->SetBinLabel(2,
"nEvents with Z vertex");
481 fHistNEvents->GetXaxis()->SetBinLabel(3,
"nEvents selected");
482 fHistNEvents->GetXaxis()->SetBinLabel(4,
"Rejected due to trigger");
483 fHistNEvents->GetXaxis()->SetBinLabel(5,
"Rejected due to phys sel");
484 fHistNEvents->GetXaxis()->SetBinLabel(6,
"Rejected due to vertex cuts");
485 fHistNEvents->GetXaxis()->SetBinLabel(7,
"Rejected due to pileup");
486 fHistNEvents->GetXaxis()->SetBinLabel(8,
"Total no. of candidate");
487 fHistNEvents->GetXaxis()->SetBinLabel(9,
"no. of cand wo bitmask");
488 fHistNEvents->GetXaxis()->SetBinLabel(10,
"D after cuts (No PID)");
489 fHistNEvents->GetXaxis()->SetBinLabel(11,
"D after cuts + PID)");
503 Int_t nbinsSowithMultUncorr[5]={48,
fNMassBins, 20, nMultBins, nMultBins};
507 Int_t nbinsSoSpheriwithMultUncorr[6]={48,
fNMassBins, 20, nMultBins, nMultBins, 20};
511 TString histoName =
"hSparseEvtShape";
512 TString histoNameNoPid =
"hSparseEvtShapewithNoPid";
513 TString parNameSo =
"Spherocity";
514 TString parNameSpheri =
"Sphericity";
515 TString histoNamePrompt =
"hSparseEvtShapePrompt";
516 TString histoNameFeeddown =
"hSparseEvtShapeFeeddown";
517 TString histoNameRecSphero =
"hSparseEvtShapeRecSphero";
520 if(
fCalculateSphericity)
fSparseEvtShape =
new THnSparseD(histoName.Data(), Form(
"D candidates:; p_{T} [GeV/c]; InvMass [GeV/c^{2}]; %s; Multipicity; MultipicityUncorr; %s;", parNameSo.Data(), parNameSpheri.Data()), 6 , nbinsSoSpheriwithMultUncorr, xminSoSpheriwithMultUncorr, xmaxSoSpheriwithMultUncorr);
521 else fSparseEvtShape =
new THnSparseD(histoName.Data(), Form(
"D candidates:; p_{T} [GeV/c]; InvMass [GeV/c^{2}]; %s; Multipicity; MultipicityUncorr;", parNameSo.Data()), 5 , nbinsSowithMultUncorr, xminSowithMultUncorr, xmaxSowithMultUncorr);
524 if(
fCalculateSphericity)
fSparseEvtShape =
new THnSparseD(histoName.Data(), Form(
"D candidates:; p_{T} [GeV/c]; InvMass [GeV/c^{2}]; %s; Multipicity; %s;", parNameSo.Data(), parNameSpheri.Data()), 5 , nbinsSoSpheri, xminSoSpheri, xmaxSoSpheri);
525 else fSparseEvtShape =
new THnSparseD(histoName.Data(), Form(
"D candidates:; p_{T} [GeV/c]; InvMass [GeV/c^{2}]; %s; Multipicity;", parNameSo.Data()), 4 , nbinsSo, xminSo, xmaxSo);
529 if(
fCalculateSphericity)
fSparseEvtShapewithNoPid =
new THnSparseD(histoNameNoPid.Data(), Form(
"D candidates with NoPID:; p_{T} [GeV/c]; InvMass [GeV/c^{2}]; %s; Multipicity; %s;", parNameSo.Data(), parNameSpheri.Data()), 5 , nbinsSoSpheri, xminSoSpheri, xmaxSoSpheri);
530 else fSparseEvtShapewithNoPid =
new THnSparseD(histoNameNoPid.Data(), Form(
"D candidates with NoPID:; p_{T} [GeV/c]; InvMass [GeV/c^{2}]; %s; Multipicity;", parNameSo.Data()), 4 , nbinsSo, xminSo, xmaxSo);
533 if(
fRecomputeSpherocity)
fSparseEvtShapeRecSphero =
new THnSparseD(histoNameRecSphero.Data(), Form(
"D candidates:; p_{T} [GeV/c]; InvMass [GeV/c^{2}]; %s; Multipicity; RecSpherocity;", parNameSo.Data()), 5 , nbinsSoSpheri, xminSoSpheri, xmaxSoSpheri);
539 Int_t nbinsPrompt[4]={48, nMultBins, 20, 100};
540 Int_t nbinsFeeddown[4]={48, nMultBins, 20, 100};
541 Double_t xminPrompt[4] = {0.,firstMultBin, 0., -1.};
542 Double_t xmaxPrompt[4] = {24.,lastMultBin, 1., 1.};
543 Double_t xminFeeddown[4] = {0.,firstMultBin, 0., -1.};
544 Double_t xmaxFeeddown[4] = {24.,lastMultBin, 1., 1.};
546 Int_t nbinsRecSpheroPrompt[5]={48, nMultBins, 20, 100, 20};
547 Int_t nbinsRecSpheroFeeddown[5]={48, nMultBins, 20, 100, 20};
548 Double_t xminRecSpheroPrompt[5] = {0.,firstMultBin, 0., -1., 0.};
549 Double_t xmaxRecSpheroPrompt[5] = {24.,lastMultBin, 1., 1., 1.};
550 Double_t xminRecSpheroFeeddown[5] = {0.,firstMultBin, 0., -1., 0.};
551 Double_t xmaxRecSpheroFeeddown[5] = {24.,lastMultBin, 1., 1., 1.};
555 fSparseEvtShapePrompt =
new THnSparseD(histoNamePrompt.Data(), Form(
"D candidates:; p_{T} [GeV/c]; InvMass [GeV/c^{2}]; %s; Multipicity; RecSpherocity;", parNameSo.Data()), 5 , nbinsSoSpheri, xminSoSpheri, xmaxSoSpheri);
556 fSparseEvtShapeFeeddown =
new THnSparseD(histoNameFeeddown.Data(), Form(
"D candidates:; p_{T} [GeV/c]; InvMass [GeV/c^{2}]; %s; Multipicity; RecSpherocity;", parNameSo.Data()), 5 , nbinsSoSpheri, xminSoSpheri, xmaxSoSpheri);
559 fSparseEvtShapePrompt =
new THnSparseD(histoNamePrompt.Data(), Form(
"D candidates:; p_{T} [GeV/c]; InvMass [GeV/c^{2}]; %s; Multipicity;", parNameSo.Data()), 4 , nbinsSo, xminSo, xmaxSo);
560 fSparseEvtShapeFeeddown =
new THnSparseD(histoNameFeeddown.Data(), Form(
"D candidates:; p_{T} [GeV/c]; InvMass [GeV/c^{2}]; %s; Multipicity;", parNameSo.Data()), 4 , nbinsSo, xminSo, xmaxSo);
568 fMCAccGenPrompt =
new THnSparseD(
"hMCAccGenPrompt",
"kStepMCAcceptance:; p_{T} [GeV/c]; Multipicity; Spherocity; y; RecSpherocity; - promptD",5,nbinsRecSpheroPrompt,xminRecSpheroPrompt,xmaxRecSpheroPrompt);
569 fMCRecoPrompt =
new THnSparseD(
"hMCRecoPrompt",
"kStepRecoPID:; p_{T} [GeV/c]; Multipicity; Spherocity; y; RecSpherocity; - promptD",5,nbinsRecSpheroPrompt,xminRecSpheroPrompt,xmaxRecSpheroPrompt);
572 fMCAccGenPrompt =
new THnSparseD(
"hMCAccGenPrompt",
"kStepMCAcceptance:; p_{T} [GeV/c]; Multipicity; Spherocity; y; - promptD",4,nbinsPrompt,xminPrompt,xmaxPrompt);
573 fMCRecoPrompt =
new THnSparseD(
"hMCRecoPrompt",
"kStepRecoPID:; p_{T} [GeV/c]; Multipicity; Spherocity; y; - promptD",4,nbinsPrompt,xminPrompt,xmaxPrompt);
576 fMCAccGenPromptSpheri =
new THnSparseD(
"hMCAccGenPromptSpheri",
"kStepMCAcceptance:; p_{T} [GeV/c]; Multipicity; Sphericity; y; - promptD",4,nbinsPrompt,xminPrompt,xmaxPrompt);
577 fMCRecoPromptSpheri =
new THnSparseD(
"hMCRecoPromptSpheri",
"kStepRecoPID:; p_{T} [GeV/c]; Multipicity; Sphericity; y; - promptD",4,nbinsPrompt,xminPrompt,xmaxPrompt);
579 fMCAccGenPromptEvSel =
new THnSparseD(
"hMCAccGenPromptEvSel",
"kStepMCAcceptanceEvSel:; p_{T} [GeV/c]; Multipicity; Spherocity; y; - promptD",4,nbinsPrompt,xminPrompt,xmaxPrompt);
583 fMCAccGenFeeddown =
new THnSparseD(
"hMCAccGenBFeeddown",
"kStepMCAcceptance:; p_{T} [GeV/c]; Multipicity; Spherocity; y; RecSpherocity; - DfromB",5,nbinsRecSpheroFeeddown,xminRecSpheroFeeddown,xmaxRecSpheroFeeddown);
584 fMCRecoFeeddown =
new THnSparseD(
"hMCRecoFeeddown",
"kStepRecoPID:; p_{T} [GeV/c]; Multipicity; Spherocity; y; RecSpherocity; - DfromB",5,nbinsRecSpheroFeeddown,xminRecSpheroFeeddown,xmaxRecSpheroFeeddown);
587 fMCAccGenFeeddown =
new THnSparseD(
"hMCAccGenBFeeddown",
"kStepMCAcceptance:; p_{T} [GeV/c]; Multipicity; Spherocity; y; - DfromB",4,nbinsFeeddown,xminFeeddown,xmaxFeeddown);
588 fMCRecoFeeddown =
new THnSparseD(
"hMCRecoFeeddown",
"kStepRecoPID:; p_{T} [GeV/c]; Multipicity; Spherocity; y; - DfromB",4,nbinsFeeddown,xminFeeddown,xmaxFeeddown);
591 fMCAccGenFeeddownSpheri =
new THnSparseD(
"hMCAccGenBFeeddownSpheri",
"kStepMCAcceptance:; p_{T} [GeV/c]; Multipicity; Sphericity; y; - DfromB",4,nbinsFeeddown,xminFeeddown,xmaxFeeddown);
592 fMCRecoFeeddownSpheri =
new THnSparseD(
"hMCRecoFeeddownSpheri",
"kStepRecoPID:; p_{T} [GeV/c]; Multipicity; Sphericity; y; - DfromB",4,nbinsFeeddown,xminFeeddown,xmaxFeeddown);
594 fMCAccGenFeeddownEvSel =
new THnSparseD(
"hMCAccGenBFeeddownEvSel",
"kStepMCAcceptance:; p_{T} [GeV/c]; Multipicity; Spherocity; y; - DfromB",4,nbinsFeeddown,xminFeeddown,xmaxFeeddown);
597 fMCRecoBothPromptFD =
new THnSparseD(
"hMCRecoBothPromptFD",
"kStepRecoPID:; p_{T} [GeV/c]; Multipicity; Spherocity; y; - BothPromptFD",4,nbinsPrompt,xminPrompt,xmaxPrompt);
658 TClonesArray *arrayCand = 0;
664 arrayName=
"Charm3Prong";
665 pdgDau[0]=211; pdgDau[1]=321; pdgDau[2]=211;
670 pdgDau[0]=211; pdgDau[1]=321; pdgDau[2]=0;
675 pdgDau[0]=321; pdgDau[1]=211; pdgDau[2]=0;
680 if(!aod && AODEvent() && IsStandardAOD()) {
686 AliAODHandler* aodHandler = (AliAODHandler*)
687 ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
688 if(aodHandler->GetExtensions()) {
689 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(
"AliAOD.VertexingHF.root");
691 arrayCand=(TClonesArray*)aodFromExt->GetList()->FindObject(arrayName.Data());
694 arrayCand=(TClonesArray*)aod->GetList()->FindObject(arrayName.Data());
697 if(!aod || !arrayCand) {
698 printf(
"AliAnalysisTaskSEDvsEventShapes::UserExec: Charm3Prong branch not found!\n");
703 Int_t runnumber = aod->GetRunNumber();
704 if(aod->GetTriggerMask()==0 &&
705 (runnumber>=195344 && runnumber<=195677)){
706 AliDebug(3,
"Event rejected because of null trigger mask");
713 if(!aod->GetPrimaryVertex()||TMath::Abs(aod->GetMagneticField())<0.001)
return;
715 Int_t countTreta1=0, countTreta03=0, countTreta05=0, countTreta16=0;
716 AliAODTracklets* tracklets=aod->GetTracklets();
717 Int_t nTr=tracklets->GetNumberOfTracklets();
718 for(
Int_t iTr=0; iTr<nTr; iTr++){
719 Double_t theta=tracklets->GetTheta(iTr);
720 Double_t eta=-TMath::Log(TMath::Tan(theta/2.));
721 if(eta>-0.3 && eta<0.3) countTreta03++;
722 if(eta>-0.5 && eta<0.5) countTreta05++;
723 if(eta>-1.0 && eta<1.0) countTreta1++;
724 if(eta>-1.6 && eta<1.6) countTreta16++;
727 Int_t vzeroMult=0, vzeroMultA=0, vzeroMultC=0;
728 Int_t vzeroMultEq=0, vzeroMultAEq=0, vzeroMultCEq=0;
729 AliAODVZERO *vzeroAOD = (AliAODVZERO*)aod->GetVZEROData();
731 vzeroMultA =
static_cast<Int_t>(vzeroAOD->GetMTotV0A());
732 vzeroMultC =
static_cast<Int_t>(vzeroAOD->GetMTotV0C());
733 vzeroMult = vzeroMultA + vzeroMultC;
736 vzeroMultEq = vzeroMultAEq + vzeroMultCEq;
739 Int_t countMult = countTreta1;
759 Double_t countTreta1corr=countTreta1;
761 AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
764 Bool_t isDataDrivenZvtxCorr=kTRUE;
766 Int_t vzeroMultACorr=vzeroMultA, vzeroMultCCorr=vzeroMultC, vzeroMultCorr=vzeroMult;
767 Int_t vzeroMultAEqCorr=vzeroMultAEq, vzeroMultCEqCorr=vzeroMultCEq, vzeroMultEqCorr=vzeroMultEq;
769 if(vtx1->GetNContributors()>0){
779 isDataDrivenZvtxCorr=kFALSE;
783 isDataDrivenZvtxCorr=kFALSE;
784 vzeroMultACorr =
static_cast<Int_t>(AliESDUtils::GetCorrV0A(vzeroMultA,zvtx));
785 vzeroMultCCorr =
static_cast<Int_t>(AliESDUtils::GetCorrV0C(vzeroMultC,zvtx));
786 vzeroMultCorr = vzeroMultACorr + vzeroMultCCorr;
787 vzeroMultAEqCorr =
static_cast<Int_t>(AliESDUtils::GetCorrV0A(vzeroMultAEq,zvtx));
788 vzeroMultCEqCorr =
static_cast<Int_t>( AliESDUtils::GetCorrV0C(vzeroMultCEq,zvtx));
789 vzeroMultEqCorr = vzeroMultAEqCorr + vzeroMultCEqCorr;
798 if(isVtxOk && isDataDrivenZvtxCorr){
821 TClonesArray *arrayMC=0;
822 AliAODMCHeader *mcHeader=0;
827 Int_t nChargedMCEta10=0, nChargedMCEta03=0, nChargedMCEta05=0, nChargedMCEta16=0, nChargedMCEtam37tm17=0, nChargedMCEta28t51=0;
828 Int_t nChargedMCPrimaryEta10=0, nChargedMCPrimaryEta03=0, nChargedMCPrimaryEta05=0, nChargedMCPrimaryEta16=0, nChargedMCPrimaryEtam37tm17=0, nChargedMCPrimaryEta28t51=0;
829 Int_t nChargedMCPhysicalPrimaryEta10=0, nChargedMCPhysicalPrimaryEta03=0, nChargedMCPhysicalPrimaryEta05=0, nChargedMCPhysicalPrimaryEta16=0, nChargedMCPhysicalPrimaryEtam37tm17=0, nChargedMCPhysicalPrimaryEta28t51=0;
830 Int_t nChargedMC=0, nChargedMCPrimary=0, nChargedMCPhysicalPrimary=0;
835 arrayMC = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
837 printf(
"AliAnalysisTaskSEDvsEventShapes::UserExec: MC particles branch not found!\n");
841 mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
843 printf(
"AliAnalysisTaskSEDvsEventShapes::UserExec: MC header branch not found!\n");
847 for(
Int_t i=0; i<arrayMC->GetEntriesFast(); i++){
848 AliAODMCParticle *part=(AliAODMCParticle*)arrayMC->UncheckedAt(i);
851 Bool_t isPrim = part->IsPrimary();
852 Bool_t isPhysPrim = part->IsPhysicalPrimary();
854 if(eta>-0.3 && eta< 0.3) {
856 if(isPrim) nChargedMCPrimaryEta03++;
857 if(isPhysPrim) nChargedMCPhysicalPrimaryEta03++;
859 if(eta>-0.5 && eta< 0.5) {
861 if(isPrim) nChargedMCPrimaryEta05++;
862 if(isPhysPrim) nChargedMCPhysicalPrimaryEta05++;
864 if(eta>-1.0 && eta< 1.0) {
866 if(isPrim) nChargedMCPrimaryEta10++;
867 if(isPhysPrim) nChargedMCPhysicalPrimaryEta10++;
869 if(eta>-1.6 && eta< 1.6) {
871 if(isPrim) nChargedMCPrimaryEta16++;
872 if(isPhysPrim) nChargedMCPhysicalPrimaryEta16++;
874 if(eta>-3.7 && eta<-1.7) {
875 nChargedMCEtam37tm17++;
876 if(isPrim) nChargedMCPrimaryEtam37tm17++;
877 if(isPhysPrim) nChargedMCPhysicalPrimaryEtam37tm17++;
879 if(eta> 2.8 && eta< 5.1) {
880 nChargedMCEta28t51++;
881 if(isPrim) nChargedMCPrimaryEta28t51++;
882 if(isPhysPrim) nChargedMCPhysicalPrimaryEta28t51++;
887 nChargedMC=nChargedMCEta10;
888 nChargedMCPrimary=nChargedMCPrimaryEta10;
889 nChargedMCPhysicalPrimary=nChargedMCPhysicalPrimaryEta10;
895 Double_t tmpXweight=nChargedMCPhysicalPrimary;
898 if(tmpXweight<=0) tmpweight = 0.0;
903 tmpweight = pMC>0 ? pMeas/pMC : 0.;
905 nchWeight *= tmpweight;
906 AliDebug(2,Form(
"Using Nch weights, Mult=%f Weight=%f\n",tmpXweight,nchWeight));
909 FillMCGenAccHistos(aod, arrayMC, mcHeader, countCorr, spherocity, sphericity, isEvSel, nchWeight);
928 nChargedMC = nChargedMCEta16 - nChargedMCEta10;
929 nChargedMCPrimary = nChargedMCPrimaryEta16 - nChargedMCPrimaryEta10;
930 nChargedMCPhysicalPrimary = nChargedMCPhysicalPrimaryEta16 - nChargedMCPhysicalPrimaryEta10;
932 nChargedMC = nChargedMCEta05;
933 nChargedMCPrimary = nChargedMCPrimaryEta05;
934 nChargedMCPhysicalPrimary = nChargedMCPhysicalPrimaryEta05;
936 nChargedMC = nChargedMCEta03;
937 nChargedMCPrimary = nChargedMCPrimaryEta03;
938 nChargedMCPhysicalPrimary = nChargedMCPhysicalPrimaryEta03;
940 nChargedMC = nChargedMCEtam37tm17 + nChargedMCEta28t51;
941 nChargedMCPrimary = nChargedMCPrimaryEtam37tm17 + nChargedMCPrimaryEta28t51;
942 nChargedMCPhysicalPrimary = nChargedMCPhysicalPrimaryEtam37tm17 + nChargedMCPhysicalPrimaryEta28t51;
944 nChargedMC = nChargedMCEta28t51;
945 nChargedMCPrimary = nChargedMCPrimaryEta28t51;
946 nChargedMCPhysicalPrimary = nChargedMCPhysicalPrimaryEta28t51;
949 if(nChargedMCPhysicalPrimary>0){
965 Int_t nCand = arrayCand->GetEntriesFast();
966 Int_t nSelectedNoPID=0,nSelectedPID=0,nSelectedInMassPeak=0;
967 Double_t mD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass();
968 Double_t mDplusPDG = TDatabasePDG::Instance()->GetParticle(411)->Mass();
969 Double_t mDstarPDG = TDatabasePDG::Instance()->GetParticle(413)->Mass();
972 UInt_t pdgDgDStartoD0pi[2]={421,211};
976 for (
Int_t iCand = 0; iCand < nCand; iCand++) {
990 if(!isFidAcc)
continue;
994 if(passTopolCuts==0)
continue;
1013 for(
Int_t iDau=0; iDau<nDau; iDau++){
1014 AliAODTrack *t = NULL;
1015 if(
fPdgMeson==413){ t = (AliAODTrack*)d0fromDstar->GetDaughter(iDau); }
1016 else{ t = (AliAODTrack*)d->GetDaughter(iDau); }
1018 if(t->HasPointOnITSLayer(0) && t->HasPointOnITSLayer(1)){
1019 if(multForCand>0) multForCand-=1;
1030 mass[0]=d->InvMass(nDau,pdgDau);
1032 if(TMath::Abs(mass[0]-mDplusPDG)<0.02) nSelectedInMassPeak++;
1034 UInt_t pdgdaughtersD0[2]={211,321};
1035 UInt_t pdgdaughtersD0bar[2]={321,211};
1036 mass[0]=d->InvMass(2,pdgdaughtersD0);
1037 mass[1]=d->InvMass(2,pdgdaughtersD0bar);
1038 if(TMath::Abs(mass[0]-mD0PDG)<0.02 || TMath::Abs(mass[1]-mD0PDG)<0.02 ) nSelectedInMassPeak++;
1043 if(TMath::Abs(mass[0]-(mDstarPDG-mD0PDG))<0.0015) nSelectedInMassPeak++;
1051 Int_t totTrkToSkip = d->GetNDaughters();
1052 const Int_t nTrkToSkip = totTrkToSkip;
1053 Int_t idToSkip[nTrkToSkip];
1054 for(
Int_t i=0; i<nTrkToSkip; i++) idToSkip[i]=-1;
1056 for(
Int_t iDau=0; iDau<nTrkToSkip; iDau++){
1057 AliAODTrack *t = NULL;
1058 t =
dynamic_cast<AliAODTrack*
>(d->GetDaughter(iDau));
1060 idToSkip[iDau] = t->GetID();
1062 recSpherocity=
AliVertexingHFUtils::GetSpherocity(aod,
fetaMin,
fetaMax,
fptMin,
fptMax,
ffiltbit1,
ffiltbit2,
fminMult,
fphiStepSizeDeg, nTrkToSkip, idToSkip);
1071 AliAODMCParticle* mcMoth =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(labD0));
1072 Int_t motherD0 = mcMoth->GetMother();
1073 AliAODMCParticle* mcMothD0 =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(motherD0));
1074 if(!mcMothD0)
continue;
1075 if(TMath::Abs(mcMothD0->GetPdgCode())==413) keep=kFALSE;
1084 for(
Int_t iHyp=0; iHyp<2; iHyp++){
1085 if(mass[iHyp]<0.)
continue;
1087 Double_t arrayForSparse[5]={invMass,ptCand,impparXY,dlen,multForCand};
1098 AliAODMCParticle *partD = (AliAODMCParticle*)arrayMC->At(labD);
1099 Int_t code=partD->GetPdgCode();
1101 if(Origin==5) isPrimary=kFALSE;
1102 if(code<0 && iHyp==0) fillHisto=kFALSE;
1103 if(code>0 && iHyp==1) fillHisto=kFALSE;
1112 Double_t arrayForSparseTrue[5]={invMass,ptCand,trueImpParXY,dlen,multForCand};
1113 if(fillHisto && passAllCuts){
1127 if(iHyp==0 && !(passTopolCuts&1))
continue;
1128 if(iHyp==1 && !(passTopolCuts&2))
continue;
1132 Double_t arrayForSparseSoNoPid[5]={ptCand, invMass, spherocity, multForCand, sphericity};
1135 Double_t arrayForSparseSoNoPid[4]={ptCand, invMass, spherocity, multForCand};
1140 if(iHyp==0 && !(passAllCuts&1))
continue;
1141 if(iHyp==1 && !(passAllCuts&2))
continue;
1144 aveMult+=multForCand;
1149 Double_t arrayForSparseSowithMultUnncorr[6]={ptCand, invMass, spherocity, multForCand, (
Double_t)countTreta1, sphericity};
1152 Double_t arrayForSparseSowithMultUnncorr[5]={ptCand, invMass, spherocity, multForCand, (
Double_t)countTreta1};
1158 Double_t arrayForSparseSo[5]={ptCand, invMass, spherocity, multForCand, sphericity};
1161 Double_t arrayForSparseSo[4]={ptCand, invMass, spherocity, multForCand};
1167 Double_t arrayForSparseRecSphero[5]={ptCand, invMass, spherocity, multForCand, recSpherocity};
1173 Double_t arrayForSparseSoPromptFD[5]={ptCand, invMass, spherocity, multForCand, recSpherocity};
1178 Double_t arrayForSparseSoPromptFD[4]={ptCand, invMass, spherocity, multForCand};
1187 AliAODMCParticle *partD = (AliAODMCParticle*)arrayMC->At(labD);
1188 Int_t code=partD->GetPdgCode();
1189 if(code<0 && iHyp==0) keepCase=kFALSE;
1190 if(code>0 && iHyp==1) keepCase=kFALSE;
1192 if(keepCase)
FillMCMassHistos(arrayMC,labD, multForCand, spherocity, sphericity, recSpherocity, nchWeight);
1232 "Mass vs. pt vs.imppar - All",
1235 "Mass vs. pt vs.imppar - promptD",
1238 "Mass vs. pt vs.imppar - DfromB",
1241 "Mass vs. pt vs.true imppar -DfromB",
1244 "Mass vs. pt vs.imppar - backgr.",
1246 for(
Int_t i=0; i<5;i++){
1256 if(fDebug > 1) printf(
"AnalysisTaskSEDvsMultiplicity: Terminate() \n");
1260 printf(
"ERROR: fOutput not available\n");
1266 printf(
"ERROR: fHistNEvents not available\n");
1269 printf(
"Number of Analyzed Events = %d\n",(
Int_t)
fHistNEvents->GetBinContent(3));
1282 Int_t runNo =
event->GetRunNumber();
1286 if (runNo>195343 && runNo<195484) period = 0;
1287 if (runNo>195528 && runNo<195678) period = 1;
1288 if (period < 0 || period > 1)
return 0;
1291 if(runNo>114930 && runNo<117223) period = 0;
1292 if(runNo>119158 && runNo<120830) period = 1;
1293 if(runNo>122373 && runNo<126438) period = 2;
1294 if(runNo>127711 && runNo<130851) period = 3;
1295 if(period<0 || period>3)
return 0;
1320 Double_t func1[4] = {0.322643,2.96275,2.30301,2.5};
1321 Double_t func2[4] = {0.36609,1.94635,1.40463,2.5};
1326 AliDebug(2,Form(
"pt = %f, FONLL = %f, Pythia = %f, ratio = %f",pt,dndpt_func1,dndpt_func2,dndpt_func1/dndpt_func2));
1327 return dndpt_func1/dndpt_func2;
1337 Double_t denom = TMath::Power((pt/par[1]), par[3] );
1338 Double_t dNdpt = par[0]*pt/TMath::Power(1.+denom, par[2]);
1353 Double_t nchbins[82]={0.50,1.50,2.50,3.50,4.50,5.50,6.50,7.50,8.50,9.50,
1354 10.50,11.50,12.50,13.50,14.50,15.50,16.50,17.50,18.50,19.50,
1355 20.50,21.50,22.50,23.50,24.50,25.50,26.50,27.50,28.50,29.50,
1356 30.50,31.50,32.50,33.50,34.50,35.50,36.50,37.50,38.50,39.50,
1357 40.50,41.50,42.50,43.50,44.50,45.50,46.50,47.50,48.50,49.50,
1358 50.50,51.50,52.50,53.50,54.50,55.50,56.50,57.50,58.50,59.50,
1359 60.50,62.50,64.50,66.50,68.50,70.50,72.50,74.50,76.50,78.50,
1360 80.50,82.50,84.50,86.50,88.50,90.50,92.50,94.50,96.50,98.50,
1362 Double_t pch[81]={0.062011,0.072943,0.070771,0.067245,0.062834,0.057383,0.051499,0.04591,0.041109,0.036954,
1363 0.03359,0.030729,0.028539,0.026575,0.024653,0.0229,0.021325,0.019768,0.018561,0.017187,
1364 0.01604,0.014836,0.013726,0.012576,0.011481,0.010393,0.009502,0.008776,0.008024,0.007452,
1365 0.006851,0.006428,0.00594,0.005515,0.005102,0.00469,0.004162,0.003811,0.003389,0.003071,
1366 0.002708,0.002422,0.002184,0.001968,0.00186,0.00165,0.001577,0.001387,0.001254,0.001118,
1367 0.001037,0.000942,0.000823,0.000736,0.000654,0.000579,0.000512,0.00049,0.00045,0.000355,
1368 0.000296,0.000265,0.000193,0.00016,0.000126,0.0000851, 0.0000676,0.0000537,0.0000426, 0.0000338,
1369 0.0000268,0.0000213,0.0000166,0.0000133,0.0000106,0.00000837,0.00000662, 0.00000524,0.00000414, 0.00000327,
1374 for(
Int_t i=0; i<81; i++){
1385 Int_t nTracks=aod->GetNumberOfTracks();
1392 for(
Int_t it=0; it<nTracks; it++) {
1393 AliAODTrack *tr=
dynamic_cast<AliAODTrack*
>(aod->GetTrack(it));
1398 if(eta<fetaMin || eta>
fetaMax)
continue;
1399 if(pt<fptMin || pt>
fptMax)
continue;
1402 if( !(fb1 || fb2) )
continue;
1404 Int_t status=tr->GetStatus();
1405 if(!(status & AliAODTrack::kTPCrefit))
continue;
1407 etaArr[nSelTracks]=eta;
1408 phiArr[nSelTracks]=phi;
1413 if(nSelTracks<
fminMult)
return kFALSE;
1417 for(
Int_t iselt=0; iselt<nSelTracks; iselt++) {
1431 AliAODMCParticle *partD = (AliAODMCParticle*)arrayMC->At(labD);
1447 Double_t arrayMCRecoRecSpheroPrompt[5] = {pt, countMult, spherocity, rapid, recSpherocity};
1448 Double_t arrayMCRecoPrompt[4] = {pt, countMult, spherocity, rapid};
1452 Double_t arrayMCRecoPromptSpheri[4] = {pt, countMult, sphericity, rapid};
1459 Double_t arrayMCRecoRecSpheroFeeddown[5] = {pt, countMult, spherocity, rapid, recSpherocity};
1460 Double_t arrayMCRecoFeeddown[4] = {pt, countMult, spherocity, rapid};
1464 Double_t arrayMCRecoFeeddownSpheri[4] = {pt, countMult, sphericity, rapid};
1469 Double_t arrayMCReco[4] = {pt, countMult, spherocity, rapid};
1472 Double_t arrayMCRecoSpheri[4] = {pt, countMult, sphericity, rapid};
1485 Int_t totPart = arrayMC->GetEntriesFast();
1486 Int_t totTracks = aod->GetNumberOfTracks();
1489 const Int_t nPart = totPart;
1490 Int_t trkToSkip[nPart];
1491 for(
Int_t i=0; i<nPart; i++) trkToSkip[i]=-1;
1494 for(
Int_t it=0; it<totTracks; it++){
1495 AliAODTrack *t=
dynamic_cast<AliAODTrack*
>(aod->GetTrack(it));
1497 if(!(t->TestFilterMask(BIT(4))))
continue;
1500 Int_t lab=TMath::Abs(t->GetLabel());
1501 Int_t id=t->GetID();
1504 if(pt<0.3)
continue;
1505 AliAODMCParticle* genDup =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(lab));
1508 Double_t rver = TMath::Sqrt(xver*xver + yver*yver);
1509 if(rver>3)
continue;
1510 trkToSkip[lab] = id;
1520 Int_t nTrkToSkip = nProng;
1521 Int_t idToSkip[nTrkToSkip];
1522 for(
Int_t i=0; i<nTrkToSkip; i++) idToSkip[i]=-1;
1524 Double_t zMCVertex = mcHeader->GetVtxZ();
1526 for(
Int_t iPart=0; iPart<totPart; iPart++){
1527 AliAODMCParticle* mcGenPart =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(iPart));
1529 if (TMath::Abs(mcGenPart->GetPdgCode()) ==
fPdgMeson){
1533 Bool_t isGoodDecay=kFALSE;
1534 Int_t labDau[4]={-1,-1,-1,-1};
1536 Bool_t isFidAcc = kFALSE;
1540 if(mcGenPart->GetNDaughters()!=2)
continue;
1541 if(deca==1) isGoodDecay=kTRUE;
1544 if(deca>0) isGoodDecay=kTRUE;
1547 if(deca==1) isGoodDecay=kTRUE;
1550 if(deca==1) isGoodDecay=kTRUE;
1558 for(
Int_t iDau=0; iDau<nTrkToSkip; iDau++){
1559 Int_t indexDau = TMath::Abs(mcGenPart->GetDaughter(iDau));
1560 idToSkip[iDau] = trkToSkip[indexDau];
1562 recSpherocity=
AliVertexingHFUtils::GetSpherocity(aod,
fetaMin,
fetaMax,
fptMin,
fptMax,
ffiltbit1,
ffiltbit2,
fminMult,
fphiStepSizeDeg, nTrkToSkip, idToSkip);
1567 Int_t mother = mcGenPart->GetMother();
1568 AliAODMCParticle* mcMoth =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(mother));
1569 if(!mcMoth)
continue;
1570 if(TMath::Abs(mcMoth->GetPdgCode())==413)
continue;
1589 Double_t arrayMCGenRecSpheroPrompt[5] = {pt, countMult, spherocity, rapid, recSpherocity};
1590 Double_t arrayMCGenPrompt[4] = {pt, countMult, spherocity, rapid};
1595 Double_t arrayMCGenPromptSpheri[4] = {pt, countMult, sphericity, rapid};
1602 Double_t arrayMCGenRecSpheroFeeddown[5] = {pt, countMult, spherocity, rapid, recSpherocity};
1603 Double_t arrayMCGenFeeddown[4] = {pt, countMult, spherocity, rapid};
1608 Double_t arrayMCGenFeeddownSpheri[4] = {pt, countMult, sphericity, rapid};
1623 for (
Int_t iProng = 0; iProng<nProng; iProng++){
1624 AliAODMCParticle* mcPartDaughter=
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(labDau[iProng]));
1625 if(!mcPartDaughter)
return kFALSE;
1626 Double_t eta = mcPartDaughter->Eta();
1627 Double_t pt = mcPartDaughter->Pt();
Double_t fetaMin
pt limits for acceptance step
Bool_t CheckGenAcc(TClonesArray *arrayMC, Int_t nProng, Int_t *labDau)
TH2F * fHistNtrCorrVsSo
hist of ntracklets vs So
static Int_t CheckDplusDecay(AliStack *stack, Int_t label, Int_t *arrayDauLab)
THnSparseD * fMCRecoPromptSpheri
histo for StepMCGenAcc for D meson feeddown for Sphericity
Bool_t fCalculateSphericity
void StoreCandidates(AliVEvent *, Int_t nCand=0, Bool_t flagFilter=kTRUE)
Double_t DeltaInvMass() const
Int_t fMultiplicityEstimator
TH2F * fHistNtrCorrVsSpheri
hist of ntracklets vs Spheri
AliNormalizationCounter * fCounterCandidates
Counter for normalization, uncorrected multiplicity.
Int_t GetIsSelectedCuts() const
Bool_t fSubtractTrackletsFromDau
static Int_t CheckDstarDecay(AliStack *stack, Int_t label, Int_t *arrayDauLab)
Bool_t HasSelectionBit(Int_t i) const
Int_t MatchToMC(Int_t pdgabs, Int_t pdgabs2prong, Int_t *pdgDg, Int_t *pdgDg2prong, TClonesArray *mcArray, Bool_t isV0=kFALSE) const
THnSparseD * fMCAccGenFeeddown
histo for StepMCGenAcc for D meson prompt
Double_t ImpParXY() const
TH3F * fHistnTrackvsEtavsPhi
hist. of ntracklets for evnts with a candidate in D mass peak
THnSparseD * fMCRecoFeeddown
histo for StepMCReco for D meson feeddown
THnSparseD * fSparseEvtShapeFeeddown
THnSparse histograms for Prompt D0 vs. Spherocity.
Int_t fFillSoSparseChecks
TH2F * fHistNtrVsNchMCPhysicalPrimary
! hist of ntracklets vs Nch (Physical Primary)
TH2F * fHistNtrCorrVsNchMCPhysicalPrimary
! hist of ntracklets vs Nch (Physical Primary)
static Int_t CheckDsDecay(AliStack *stack, Int_t label, Int_t *arrayDauLab)
Int_t fMCPrimariesEstimator
Int_t GetWhyRejection() const
virtual void UserCreateOutputObjects()
THnSparseD * fMCAccGenFeeddownEvSel
histo for StepMCGenAcc for D meson prompt with Vertex selection (IsEvSel = kTRUE) ...
TH2F * fHistNtrVsNchMC
hist of ntracklets vs Spheri
virtual void UserExec(Option_t *option)
static Int_t CheckOrigin(TClonesArray *arrayMC, AliAODMCParticle *mcPart, Bool_t searchUpToQuark=kTRUE)
Double_t GetMaxVtxZ() const
Bool_t fRemoveD0fromDstar
Bool_t fRecomputeSpherocity
TH2F * fHistNtrCorrVsZvtx
hist of ntracklets vs Zvertex
THnSparseF * fHistMassPtImpPar[5]
histo for StepMCGenAcc for D meson feeddown with Vertex selection (IsEvSel = kTRUE) ...
TH2F * fHistNtrVsZvtx
hist. for No. of events
THnSparseD * fSparseEvtShape
Bool_t fDoImpPar
Counter for normalization, corrected multiplicity for candidates.
TList * fListProfiles
list send on output slot 3
THnSparseD * fMCRecoPrompt
histo for StepMCGenAcc for D meson feeddown
static Double_t GetVZEROCEqualizedMultiplicity(AliAODEvent *ev)
THnSparseD * fSparseEvtShapewithNoPid
THnSparse histograms for Spherocity.
virtual ~AliAnalysisTaskSEDvsEventShapes()
Class for cuts on AOD reconstructed D+->Kpipi.
TH2F * fHistNtrVsnTrackEvWithCand
hist of ntracklets vs Zvertex
void SetStudyMultiplicity(Bool_t flag, Float_t etaRange)
void FillMCGenAccHistos(AliAODEvent *aod, TClonesArray *arrayMC, AliAODMCHeader *mcHeader, Double_t countMult, Double_t spherocity, Double_t sphericity, Bool_t isEvSel, Double_t nchWeight)
TH2F * fHistNtrCorrVsNchMC
! hist of ntracklets vs Nch (Generated)
THnSparseD * fMCRecoFeeddownSpheri
histo for StepMCReco for D meson feeddown for Sphericity
AliAnalysisTaskSEDvsEventShapes()
Int_t fDoVZER0ParamVertexCorr
THnSparseD * fMCRecoBothPromptFDSpheri
histo for StepMCReco for D meson feeddown for Sphericity
TH2F * fHistNtrVsNchMCPrimary
! hist of ntracklets vs Nch (Primary)
TH3F * fHistNchMCVsNchMCPrimaryVsNchMCPhysicalPrimary
! hist of Nch (generated) vs Nch (Primary) vs Nch (Physical Primary)
Bool_t fFillTrackHisto
flag for quark/hadron level identification of prompt and feeddown
AliNormalizationCounter * fCounterU
Counter for normalization, corrected multiplicity.
static Int_t CheckD0Decay(AliStack *stack, Int_t label, Int_t *arrayDauLab)
AliRDHFCuts * fRDCutsAnalysis
void SetStudySpherocity(Bool_t flag, Double_t nsteps=100.)
THnSparseD * fSparseEvtShapePrompt
THnSparse histograms for D0 vs. Spherocity.
TH1F * fHistNtrCorrEvSel
hist. of ntracklets for physics selection only selected events
void SetMassLimits(Double_t lowlimit, Double_t uplimit)
void CreateImpactParameterHistos()
TProfile * fMultEstimatorAvg[4]
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
TH1F * fHistNtrCorrEvWithD
hist. of ntracklets for evnts with a candidate
Bool_t IsEventRejectedDuePhysicsSelection() const
TProfile * GetEstimatorHistogram(const AliVEvent *event)
TH1F * fHistNtrCorrEvWithCand
hist. of ntracklets for selected events
THnSparseD * fMCAccGenFeeddownSpheri
histo for StepMCGenAcc for D meson prompt for Sphericity
ClassImp(AliAnalysisTaskSEDvsEventShapes) AliAnalysisTaskSEDvsEventShapes
static Double_t GetCorrectedNtracklets(TProfile *estimatorAvg, Double_t uncorrectedNacc, Double_t vtxZ, Double_t refMult)
THnSparseD * fMCRecoBothPromptFD
histo for StepMCReco for D meson feeddown
Bool_t IsEventSelected(AliVEvent *event)
THnSparseD * fMCAccGenPromptSpheri
histo for StepMCReco for D meson Both Prompt Feeddown
void StoreEvent(AliVEvent *, AliRDHFCuts *, Bool_t mc=kFALSE, Int_t multiplicity=-9999, Double_t spherocity=-99.)
Double_t fUpmasslimit
histograms for impact paramter studies
Double_t dNdptFit(Float_t pt, Double_t *par)
Double_t GetPtWeight(Float_t pt)
THnSparseD * fMCAccGenPromptEvSel
histo for StepMCReco for D meson Both Prompt Feeddown for Sphericity
void FillMCMassHistos(TClonesArray *arrayMC, Int_t labD, Double_t countMult, Double_t spherocity, Double_t sphericity, Double_t recSpherocity, Double_t nchWeight)
TH3F * fHistnTrackvsEtavsPhiEvWithCand
! hist. of number of tracks passing track selection for spherocity calculation vs eta vs...
Double_t fPtAccCut
eta limits for acceptance step
Bool_t IsSelected(TObject *obj)
TList * fListCuts
list send on output slot 1
THnSparseD * fSparseEvtShapeRecSphero
THnSparse histograms for feeddown D0 vs. Spherocity.
TH1F * fHistGenPrimaryParticlesInelGt0
!hist. of geenrated multiplcity
static Double_t GetVZEROAEqualizedMultiplicity(AliAODEvent *ev)
Utilities for V0 multiplicity checks.
Bool_t FillTrackControlHisto(AliAODEvent *aod, Int_t nSelTrkCorr, Int_t nSelectedEvwithCand)
static Double_t GetTrueImpactParameterDzero(AliAODMCHeader *mcHeader, TClonesArray *arrayMC, AliAODMCParticle *partDp)
Functions for computing true impact parameter of D meson.
AliNormalizationCounter * fCounterC
void CreateMeasuredNchHisto()
TH2F * fHistNtrCorrVsNchMCPrimary
! hist of ntracklets vs Nch (Primary)
AliAODRecoDecayHF2Prong * Get2Prong() const
THnSparseD * fMCAccGenPrompt
THnSparse histograms for Both Prompt and feeddown D0 vs. Spherocity.
static Double_t GetTrueImpactParameterDplus(AliAODMCHeader *mcHeader, TClonesArray *arrayMC, AliAODMCParticle *partDp)
Double_t fEtaAccCut
flag for filling track control histograms
virtual Bool_t IsInFiducialAcceptance(Double_t, Double_t) const
virtual void Terminate(Option_t *option)
static Double_t GetSphericity(AliAODEvent *aod, Double_t etaMin=-0.8, Double_t etaMax=0.8, Double_t ptMin=0.15, Double_t ptMax=10., Int_t filtbit1=256, Int_t filtbit2=512, Int_t minMult=3)
TH2F * fHistNtrVsSpheri
hist of ntracklets vs So
TH1F * fHistNEvents
list send on output slot 5
static Double_t GetSpherocity(AliAODEvent *aod, Double_t etaMin=-0.8, Double_t etaMax=0.8, Double_t ptMin=0.15, Double_t ptMax=10., Int_t filtbit1=256, Int_t filtbit2=512, Int_t minMult=3, Double_t phiStepSizeDeg=0.1, Int_t nTrksToSkip=0, Int_t *idToSkip=0x0)
Functions for event shape variables.