25 #include <TClonesArray.h>
31 #include <THnSparse.h>
32 #include <TDatabasePDG.h>
33 #include <Riostream.h>
35 #include "AliAnalysisManager.h"
36 #include "AliAODHandler.h"
37 #include "AliAODEvent.h"
38 #include "AliAODVertex.h"
39 #include "AliAODTrack.h"
40 #include "AliAODMCHeader.h"
41 #include "AliAODMCParticle.h"
42 #include "AliAODRecoDecay.h"
46 #include "AliAnalysisTaskSE.h"
68 fWriteOnlySignal(kFALSE),
69 fDoCutVarHistos(kTRUE),
70 fUseSelectionBit(kFALSE),
72 fFillSparseDplus(kFALSE),
86 for(
Int_t i=0;i<3;i++){
90 for(
Int_t i=0;i<4;i++) {
115 for(
Int_t i=0;i<kMaxPtBins+1;i++){
118 for (
Int_t i=0; i<4; i++) {
135 fFillNtuple(fillNtuple),
137 fWriteOnlySignal(kFALSE),
138 fDoCutVarHistos(kTRUE),
139 fUseSelectionBit(kFALSE),
141 fFillSparseDplus(kFALSE),
148 fAnalysisCuts(analysiscuts),
156 for(
Int_t i=0;i<3;i++){
160 for(
Int_t i=0;i<4;i++) {
185 for(
Int_t i=0;i<kMaxPtBins+1;i++){
189 for (
Int_t i=0; i<4; i++) {
198 DefineOutput(1,TList::Class());
200 DefineOutput(2,TList::Class());
202 DefineOutput(3,AliNormalizationCounter::Class());
206 DefineOutput(4,TNtuple::Class());
215 printf(
"Max. number of Pt bins = %d\n",
kMaxPtBins);
229 printf(
"Number of Pt bins = %d\n",
fNPtBins);
239 for(
Int_t i=0;i<4;i++){
269 for(
Int_t i=0;i<3;i++){
276 for (
Int_t i=0; i<4; i++) {
294 if(fDebug > 1) printf(
"AnalysisTaskSEDs::Init() \n");
301 analysis->SetName(
"AnalysisCuts");
313 if(fDebug > 1) printf(
"AnalysisTaskSEDs::UserCreateOutputObjects() \n");
318 fOutput->SetName(
"OutputHistos");
320 fHistNEvents =
new TH1F(
"hNEvents",
"number of events ",15,-0.5,14.5);
322 fHistNEvents->GetXaxis()->SetBinLabel(2,
"nEvents Matched dAOD");
323 fHistNEvents->GetXaxis()->SetBinLabel(3,
"nEvents Mismatched dAOD");
325 fHistNEvents->GetXaxis()->SetBinLabel(5,
"n. passing IsEvSelected");
326 fHistNEvents->GetXaxis()->SetBinLabel(6,
"n. rejected due to trigger");
327 fHistNEvents->GetXaxis()->SetBinLabel(7,
"n. rejected due to not reco vertex");
328 fHistNEvents->GetXaxis()->SetBinLabel(8,
"n. rejected for contr vertex");
329 fHistNEvents->GetXaxis()->SetBinLabel(9,
"n. rejected for vertex out of accept");
330 fHistNEvents->GetXaxis()->SetBinLabel(10,
"n. rejected for pileup events");
331 fHistNEvents->GetXaxis()->SetBinLabel(11,
"no. of out centrality events");
332 fHistNEvents->GetXaxis()->SetBinLabel(12,
"no. of 3 prong candidates");
333 fHistNEvents->GetXaxis()->SetBinLabel(13,
"no. of Ds after filtering cuts");
334 fHistNEvents->GetXaxis()->SetBinLabel(14,
"no. of Ds after selection cuts");
335 fHistNEvents->GetXaxis()->SetBinLabel(15,
"no. of not on-the-fly rec Ds");
344 fHistCentrality[1]=
new TH1F(
"hCentr(selectedCent)",
"centrality(selectedCent)",10000,0.,100.);
345 fHistCentrality[2]=
new TH1F(
"hCentr(OutofCent)",
"centrality(OutofCent)",10000,0.,100.);
347 fHistCentralityMult[1]=
new TH2F(
"hCentrMult(selectedCent)",
"centrality vs mult(selectedCent)",100,0.5,30000.5,40,0.,100.);
348 fHistCentralityMult[2]=
new TH2F(
"hCentrMult(OutofCent)",
"centrality vs mult(OutofCent)",100,0.5,30000.5,40,0.,100.);
349 for(
Int_t i=0;i<3;i++){
356 Double_t massDs=TDatabasePDG::Instance()->GetParticle(431)->Mass();
359 if(nInvMassBins%2==1) nInvMassBins++;
368 for(
Int_t iType=0; iType<4; iType++){
383 hisname.Form(
"hMass%sPt%d",htype.Data(),i);
386 hisname.Form(
"hMass%sPt%dphi",htype.Data(),i);
389 hisname.Form(
"hMass%sPt%dk0st",htype.Data(),i);
392 hisname.Form(
"hCosP%sPt%d",htype.Data(),i);
393 fCosPHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.5,1.);
395 hisname.Form(
"hDLen%sPt%d",htype.Data(),i);
396 fDLenHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,0.5);
398 hisname.Form(
"hSumd02%sPt%d",htype.Data(),i);
399 fSumd02Hist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,1.);
401 hisname.Form(
"hSigVert%sPt%d",htype.Data(),i);
402 fSigVertHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,0.1);
404 hisname.Form(
"hPtMax%sPt%d",htype.Data(),i);
405 fPtMaxHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.5,20.);
407 hisname.Form(
"hPtCand%sPt%d",htype.Data(),i);
408 fPtCandHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.5,20.);
410 hisname.Form(
"hDCA%sPt%d",htype.Data(),i);
411 fDCAHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,0.1);
413 hisname.Form(
"hPtProng0%sPt%d",htype.Data(),i);
414 fPtProng0Hist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.0,20.);
416 hisname.Form(
"hPtProng1%sPt%d",htype.Data(),i);
417 fPtProng1Hist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.0,20.);
419 hisname.Form(
"hPtProng2%sPt%d",htype.Data(),i);
420 fPtProng2Hist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.0,20.);
422 hisname.Form(
"hDalitz%sPt%d",htype.Data(),i);
423 fDalitz[index]=
new TH2F(hisname.Data(),hisname.Data(),100,0.,2.,100,0.,2.);
425 hisname.Form(
"hDalitz%sPt%dphi",htype.Data(),i);
426 fDalitzPhi[index]=
new TH2F(hisname.Data(),hisname.Data(),100,0.,2.,100,0.,2.);
428 hisname.Form(
"hDalitz%sPt%dk0st",htype.Data(),i);
429 fDalitzK0st[index]=
new TH2F(hisname.Data(),hisname.Data(),100,0.,2.,100,0.,2.);
455 fChanHist[0] =
new TH1F(
"hChanAll",
"KKpi and piKK candidates",64,-0.5,63.5);
456 fChanHist[1] =
new TH1F(
"hChanSig",
"KKpi and piKK candidates",64,-0.5,63.5);
457 fChanHist[2] =
new TH1F(
"hChanBkg",
"KKpi and piKK candidates",64,-0.5,63.5);
458 fChanHist[3] =
new TH1F(
"hChanReflSig",
"KKpi and piKK candidates",64,-0.5,63.5);
459 for(
Int_t i=0;i<4;i++){
466 fPtVsMass=
new TH2F(
"hPtVsMass",
"PtVsMass (prod. cuts)",nInvMassBins,minMass,maxMass,40,0.,20.);
467 fPtVsMassPhi=
new TH2F(
"hPtVsMassPhi",
"PtVsMass (phi selection)",nInvMassBins,minMass,maxMass,200,0.,20.);
468 fPtVsMassK0st=
new TH2F(
"hPtVsMassK0st",
"PtVsMass (K0* selection)",nInvMassBins,minMass,maxMass,200,0.,20.);
469 fYVsPt=
new TH2F(
"hYVsPt",
"YvsPt (prod. cuts)",40,0.,20.,80,-2.,2.);
470 fYVsPtSig=
new TH2F(
"hYVsPtSig",
"YvsPt (MC, only sig., prod. cuts)",40,0.,20.,80,-2.,2.);
473 hisname.Form(
"hMassKKPt%d",i);
474 fMassHistKK[i]=
new TH1F(hisname.Data(),hisname.Data(),200,0.95,1.35);
477 hisname.Form(
"hMassKpiPt%d",i);
478 fMassHistKpi[i]=
new TH1F(hisname.Data(),hisname.Data(),200,0.7,1.1);
489 Int_t nBinsReco[
knVarForSparse] = {350, 20, 30, 14, 14, 20, 10, 10, 14, 6, 6, 12};
490 Double_t xminReco[
knVarForSparse] = {1.6, 0., 0.00, 0.0, 0.0, 0., 0.9, 0.9, 0.00, 0.7, 0.0, 0.};
491 Double_t xmaxReco[
knVarForSparse] = {2.3, 20., 0.015, 0.07, 0.07, 10., 1.0, 1.0, 0.07, 1.0, 0.3, 6.};
492 TString axis[
knVarForSparse] = {
"invMassDsAllPhi",
"p_{T}",
"#Delta Mass(KK)",
"dlen",
"dlen_{xy}",
"normdl_{xy}",
"cosP",
"cosP_{xy}",
"sigVert",
"cosPiDs",
"|cosPiKPhi^{3}|",
"normIP"};
531 for (
Int_t i=0; i<2; i++) {
532 fnSparseMC[i] =
new THnSparseF(Form(
"fnSparseAcc_%s",label[i].
Data()),Form(
"MC nSparse (Acc.Step)- %s",label[i].
Data()),
534 fnSparseMC[i]->GetAxis(0)->SetTitle(
"p_{T} (GeV/c)");
540 fnSparseMCDplus[i] =
new THnSparseF(Form(
"fnSparseAccDplus_%s",label[i].
Data()),Form(
"MC nSparse D^{+} (Acc.Step)- %s",label[i].
Data()),
547 for (
Int_t i=2; i<4; i++) {
548 fnSparseMC[i] =
new THnSparseF(Form(
"fnSparseReco_%s",label[i-2].
Data()),Form(
"MC nSparse (Reco Step)- %s",label[i-2].
Data()),
557 fnSparseMCDplus[i] =
new THnSparseF(Form(
"fnSparseRecoDplus_%s",label[i-2].
Data()),Form(
"MC nSparse D^{+} (Reco Step)- %s",label[i-2].
Data()),
558 knVarForSparse, nBinsReco, xminReco, xmaxReco);
570 fnSparseIP->GetAxis(5)->SetTitle(
"candType (0.5=bkg; 1.5=prompt; 2.5=FD)");
576 fnSparse->GetAxis(j)->SetTitle(Form(
"%s",axis[j].
Data()));
592 fNtupleDs =
new TNtuple(
"fNtupleDs",
"Ds",
"labDs:retcode:pdgcode0:Pt0:Pt1:Pt2:PtRec:P0:P1:P2:PidTrackBit0:PidTrackBit1:PidTrackBit2:PointingAngle:PointingAngleXY:DecLeng:DecLengXY:NorDecLeng:NorDecLengXY:InvMassKKpi:InvMasspiKK:sigvert:d00:d01:d02:dca:d0square:InvMassPhiKKpi:InvMassPhipiKK:InvMassK0starKKpi:InvMassK0starpiKK:cosinePiDsFrameKKpi:cosinePiDsFramepiKK:cosineKPhiFrameKKpi:cosineKPhiFramepiKK:centrality:runNumber");
613 if (matchingAODdeltaAODlevel<0 || (matchingAODdeltaAODlevel==0 &&
fAODProtection==1)) {
621 TClonesArray *array3Prong = 0;
622 if(!aod && AODEvent() && IsStandardAOD()) {
628 AliAODHandler* aodHandler = (AliAODHandler*)
629 ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
630 if(aodHandler->GetExtensions()) {
631 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(
"AliAOD.VertexingHF.root");
633 array3Prong=(TClonesArray*)aodFromExt->GetList()->FindObject(
"Charm3Prong");
636 array3Prong=(TClonesArray*)aod->GetList()->FindObject(
"Charm3Prong");
639 if(!aod || !array3Prong) {
640 printf(
"AliAnalysisTaskSEDs::UserExec: Charm3Prong branch not found!\n");
647 if(!aod->GetPrimaryVertex() || TMath::Abs(aod->GetMagneticField())<0.001)
return;
658 Float_t ntracks=aod->GetNumberOfTracks();
675 Int_t runNumber=aod->GetRunNumber();
679 TClonesArray *arrayMC=0;
680 AliAODMCHeader *mcHeader=0;
683 AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
689 arrayMC = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
691 printf(
"AliAnalysisTaskSEDs::UserExec: MC particles branch not found!\n");
696 mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
698 printf(
"AliAnalysisTaskSEDs::UserExec: MC header branch not found!\n");
705 if(aod->GetTriggerMask()==0 && (runNumber>=195344 && runNumber<=195677))
711 Double_t zMCVertex = mcHeader->GetVtxZ();
722 Int_t n3Prong = array3Prong->GetEntriesFast();
723 if(fDebug>1) printf(
"Number of Ds->KKpi: %d\n",n3Prong);
726 Int_t pdgDstoKKpi[3]={321,321,211};
729 Double_t massPhi=TDatabasePDG::Instance()->GetParticle(333)->Mass();
736 for (
Int_t i3Prong = 0; i3Prong < n3Prong; i3Prong++) {
762 AliAODVertex *origownvtx=0x0;
767 fYVsPt->Fill(ptCand,rapid);
773 Int_t retCodeNoRes=retCodeAnalysisCuts;
783 massKK=d->InvMass2Prongs(0,1,321,321);
784 Double_t massKp=d->InvMass2Prongs(1,2,321,211);
789 massKK=d->InvMass2Prongs(1,2,321,321);
790 Double_t massKp=d->InvMass2Prongs(0,1,211,321);
795 Int_t isKKpi=retCodeAnalysisCuts&1;
796 Int_t ispiKK=retCodeAnalysisCuts&2;
797 Int_t isPhiKKpi=retCodeAnalysisCuts&4;
798 Int_t isPhipiKK=retCodeAnalysisCuts&8;
799 Int_t isK0starKKpi=retCodeAnalysisCuts&16;
800 Int_t isK0starpiKK=retCodeAnalysisCuts&32;
802 if(retCodeAnalysisCuts>0){
822 if(weightKKpi>1. || weightKKpi<0.) weightKKpi=0.;
823 if(weightpiKK>1. || weightpiKK<0.) weightpiKK=0.;
830 Int_t indexMCKKpi=-1;
831 Int_t indexMCpiKK=-1;
840 labDs = d->MatchToMC(431,arrayMC,3,pdgDstoKKpi);
841 labDplus = d->MatchToMC(411,arrayMC,3,pdgDstoKKpi);
843 Int_t labDau0=((AliAODTrack*)d->GetDaughter(0))->GetLabel();
844 AliAODMCParticle* p=(AliAODMCParticle*)arrayMC->UncheckedAt(TMath::Abs(labDau0));
845 pdgCode0=TMath::Abs(p->GetPdgCode());
882 fMassHist[index]->Fill(invMass,weightKKpi);
883 fPtVsMass->Fill(invMass,ptCand,weightKKpi);
892 if(
fReadMC && indexMCKKpi!=-1){
893 fMassHist[indexMCKKpi]->Fill(invMass,weightKKpi);
898 AliAODMCParticle *partDs = (AliAODMCParticle*)arrayMC->At(labDs);
909 if(isK0starKKpi)
fMassHistK0st[indexMCKKpi]->Fill(invMass,weightKKpi);
914 fMassHist[index]->Fill(invMass,weightpiKK);
915 fPtVsMass->Fill(invMass,ptCand,weightpiKK);
924 if(
fReadMC && indexMCpiKK!=-1){
925 fMassHist[indexMCpiKK]->Fill(invMass,weightpiKK);
930 AliAODMCParticle *partDs = (AliAODMCParticle*)arrayMC->At(labDs);
941 if(isK0starpiKK)
fMassHistK0st[indexMCpiKK]->Fill(invMass,weightpiKK);
950 const Int_t nProng = 3;
970 massKK = d->InvMass2Prongs(0,1,321,321);
971 deltaMassKK = TMath::Abs(massKK-massPhi);
974 cosPiKPhi = TMath::Abs(cosPiKPhi*cosPiKPhi*cosPiKPhi);
976 for(
Int_t ip=0; ip<nProng; ip++) {
979 tmpNormIP[ip] = diffIP/errdiffIP;
980 if(ip==0) normIP = tmpNormIP[ip];
981 else if(TMath::Abs(tmpNormIP[ip])>TMath::Abs(normIP)) normIP = tmpNormIP[ip];
983 normIPprong[0] = tmpNormIP[0];
984 normIPprong[1] = tmpNormIP[1];
985 normIPprong[2] = tmpNormIP[2];
988 sigvert,cosPiDs,cosPiKPhi,TMath::Abs(normIP)};
995 if(candType==1.5)
fnSparseMC[2]->Fill(var4nSparse);
996 if(candType==2.5)
fnSparseMC[3]->Fill(var4nSparse);
998 else if(labDplus>=0 && pdgCode0==321) {
1008 massKK = d->InvMass2Prongs(1,2,321,321);
1009 deltaMassKK = TMath::Abs(massKK-massPhi);
1012 cosPiKPhi = TMath::Abs(cosPiKPhi*cosPiKPhi*cosPiKPhi);
1014 for(
Int_t ip=0; ip<nProng; ip++) {
1017 tmpNormIP[ip] = diffIP/errdiffIP;
1018 if(ip==0) normIP = tmpNormIP[ip];
1019 else if(TMath::Abs(tmpNormIP[ip])>TMath::Abs(normIP)) normIP = tmpNormIP[ip];
1022 normIPprong[0] = tmpNormIP[2];
1023 normIPprong[1] = tmpNormIP[1];
1024 normIPprong[2] = tmpNormIP[0];
1027 sigvert,cosPiDs,cosPiKPhi,TMath::Abs(normIP)};
1034 if(candType==1.5)
fnSparseMC[2]->Fill(var4nSparse);
1035 if(candType==2.5)
fnSparseMC[3]->Fill(var4nSparse);
1037 else if(labDplus>=0 && pdgCode0==211) {
1044 if(
fReadMC && (isPhiKKpi || isPhiKKpi)) {
1045 Double_t var[6] = {ptCand,normIP,normIPprong[0],normIPprong[1],normIPprong[2],candType};
1058 Double_t sumD02=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2);
1061 for(
Int_t i=0;i<3;i++){
1062 if(d->PtProng(i)>
ptmax)ptmax=d->PtProng(i);
1074 Double_t massKK=d->InvMass2Prongs(0,1,321,321);
1075 Double_t massKp=d->InvMass2Prongs(1,2,321,211);
1076 fDalitz[index]->Fill(massKK,massKp);
1077 if(isPhiKKpi)
fDalitzPhi[index]->Fill(massKK,massKp);
1078 if(isK0starKKpi)
fDalitzK0st[index]->Fill(massKK,massKp);
1079 if(
fReadMC && indexMCKKpi!=-1){
1080 fDalitz[indexMCKKpi]->Fill(massKK,massKp);
1081 if(isPhiKKpi)
fDalitzPhi[indexMCKKpi]->Fill(massKK,massKp);
1082 if(isK0starKKpi)
fDalitzK0st[indexMCKKpi]->Fill(massKK,massKp);
1096 Double_t massKK=d->InvMass2Prongs(1,2,321,321);
1097 Double_t massKp=d->InvMass2Prongs(0,1,211,321);
1098 fDalitz[index]->Fill(massKK,massKp);
1099 if(isPhipiKK)
fDalitzPhi[index]->Fill(massKK,massKp);
1100 if(isK0starpiKK)
fDalitzK0st[index]->Fill(massKK,massKp);
1103 if(
fReadMC && indexMCpiKK!=-1){
1104 fDalitz[indexMCpiKK]->Fill(massKK,massKp);
1105 if(isPhipiKK)
fDalitzPhi[indexMCpiKK]->Fill(massKK,massKp);
1106 if(isK0starpiKK)
fDalitzK0st[indexMCpiKK]->Fill(massKK,massKp);
1128 AliAODTrack *track0=(AliAODTrack*)d->GetDaughter(0);
1129 AliAODTrack *track1=(AliAODTrack*)d->GetDaughter(1);
1130 AliAODTrack *track2=(AliAODTrack*)d->GetDaughter(2);
1138 tmp[1]=
Float_t(retCodeAnalysisCuts);
1140 tmp[3]=d->PtProng(0);
1141 tmp[4]=d->PtProng(1);
1142 tmp[5]=d->PtProng(2);
1144 tmp[7]=d->PProng(0);
1145 tmp[8]=d->PProng(1);
1146 tmp[9]=d->PProng(2);
1147 tmp[10]=
Int_t(bitMapPIDTrack0);
1148 tmp[11]=
Int_t(bitMapPIDTrack1);
1149 tmp[12]=
Int_t(bitMapPIDTrack2);
1159 tmp[22]=d->Getd0Prong(0);
1160 tmp[23]=d->Getd0Prong(1);
1161 tmp[24]=d->Getd0Prong(2);
1162 tmp[25]=d->GetDCA();
1163 tmp[26]=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2);
1164 tmp[27]=d->InvMass2Prongs(0,1,321,321);
1165 tmp[28]=d->InvMass2Prongs(1,2,321,321);
1166 tmp[29]=d->InvMass2Prongs(1,2,321,211);
1167 tmp[30]=d->InvMass2Prongs(0,1,211,321);
1172 tmp[35]=(
Float_t)(centrality);
1207 if(fDebug > 1) printf(
"AnalysisTaskSEDs: Terminate() \n");
1210 printf(
"ERROR: fOutput not available\n");
1215 printf(
"Number of analyzed events = %d\n",(
Int_t)
fHistNEvents->GetBinContent(2));
1217 printf(
"ERROR: fHistNEvents not available\n");
1228 Double_t zMCVertex = mcHeader->GetVtxZ();
1230 for(
Int_t iPart=0; iPart<arrayMC->GetEntriesFast(); iPart++){
1232 AliAODMCParticle* mcPart =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(iPart));
1234 if(TMath::Abs(mcPart->GetPdgCode()) == 431) {
1238 Bool_t isGoodDecay = kFALSE;
1239 Int_t labDau[3] = {-1,-1,-1};
1240 Bool_t isFidAcc = kFALSE;
1241 Bool_t isDaugInAcc = kFALSE;
1244 if(deca == 1) isGoodDecay=kTRUE;
1246 if(labDau[0]==-1)
continue;
1255 Double_t var4nSparseAcc[2] = {pt,rapid};
1257 if(orig==4)
fnSparseMC[0]->Fill(var4nSparseAcc);
1258 if(orig==5)
fnSparseMC[1]->Fill(var4nSparseAcc);
1268 Bool_t isGoodDecay = kFALSE;
1269 Int_t labDau[3] = {-1,-1,-1};
1270 Bool_t isFidAcc = kFALSE;
1271 Bool_t isDaugInAcc = kFALSE;
1274 if(deca == 1) isGoodDecay=kTRUE;
1276 if(labDau[0]==-1)
continue;
1285 Double_t var4nSparseAcc[2] = {pt,rapid};
1300 for (
Int_t iProng = 0; iProng<nProng; iProng++){
1301 AliAODMCParticle* mcPartDaughter=
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(labDau[iProng]));
1302 if(!mcPartDaughter) {
1305 Double_t eta = mcPartDaughter->Eta();
1306 Double_t pt = mcPartDaughter->Pt();
1307 if (TMath::Abs(eta) > 0.9 || pt < 0.1) {
Double_t NormalizedDecayLengthXY() const
Bool_t IsEventRejectedDueToCentrality() const
THnSparseF * fnSparseMCDplus[4]
TH1F * fPtMaxHist[4 *kMaxPtBins]
! hist. for Pt Max (Prod Cuts)
Bool_t IsEventRejectedDueToZVertexOutsideFiducialRegion() const
Double_t NormalizedDecayLength() const
THnSparseF * fnSparseMC[4]
!<!THnSparse for topomatic variable
Bool_t IsEventRejectedDueToNotRecoVertex() const
Double_t InvMassDsKKpi() const
void StoreCandidates(AliVEvent *, Int_t nCand=0, Bool_t flagFilter=kTRUE)
void Getd0MeasMinusExpProng(Int_t ip, Double_t magf, Double_t &d0diff, Double_t &errd0diff) const
TH1F * fPtProng1Hist[4 *kMaxPtBins]
! hist. for DCA (Prod Cuts)
Double_t InvMassDspiKK() const
void SetPtBins(Int_t n, Float_t *lim)
Int_t IsEventSelectedInCentrality(AliVEvent *event)
Bool_t HasSelectionBit(Int_t i) const
TH2F * fDalitzK0st[4 *kMaxPtBins]
! dalitz plot via K0* (sig,bkg,tot)
void UnsetOwnPrimaryVtx()
Bool_t fFillSparseDplus
flag for usage of THnSparse
Double_t CosPiDsLabFrameKKpi() const
Int_t GetHistoIndex(Int_t iPtBin) const
static Int_t CheckMatchingAODdeltaAODevents()
Double_t fMassRange
limits for pt bins
Bool_t IsEventRejectedDueToVertexContributors() const
TH2F * fPtVsMass
! hist. of pt vs. mass (prod. cuts)
static Int_t CheckDsDecay(AliStack *stack, Int_t label, Int_t *arrayDauLab)
Double_t CosPointingAngleXY() const
TH1F * fPtProng0Hist[4 *kMaxPtBins]
! hist. for Pt Max (Prod Cuts)
Bool_t FillRecoCand(AliVEvent *event, AliAODRecoDecayHF3Prong *rd3)
TH2F * fYVsPtSig
! hist. of Y vs. Pt (MC, only sig, prod. cuts)
Int_t GetPidOption() const
virtual void UserCreateOutputObjects()
Implementation of interface methods.
virtual Bool_t IsInFiducialAcceptance(Double_t pt, Double_t y) const
static Int_t CheckOrigin(TClonesArray *arrayMC, AliAODMCParticle *mcPart, Bool_t searchUpToQuark=kTRUE)
Bool_t fFillSparse
flag for usage of HasSelectionBit
Double_t GetMaxVtxZ() const
TH1F * fSumd02Hist[4 *kMaxPtBins]
! hist. for sum d02 (Prod Cuts)
UInt_t GetPIDTrackTPCTOFBitMap(AliAODTrack *track) const
TH1F * fMassHistPhi[4 *kMaxPtBins]
! hist. of mass spectra via phi (sig,bkg,tot)
THnSparseF * fnSparse
Cuts for Analysis.
TNtuple * fNtupleDs
! output ntuple
virtual ~AliAnalysisTaskSEDs()
TH1F * fHistCentrality[3]
!hist. for cent distr (all,sel ev, )
AliNormalizationCounter * fCounter
bin size for inv. mass histo
TH2F * fHistCentralityMult[3]
!hist. for cent distr vs mult (all,sel ev, )
TH1F * fHistNEvents
! hist. for No. of events
AliRDHFCutsDstoKKpi * fAnalysisCuts
TList * fOutput
! list send on output slot 0
Double_t CosPiKPhiRFrameKKpi() const
AliAODVertex * GetOwnPrimaryVtx() const
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel)
Double_t GetSigmaVert(const AliAODEvent *aod=0x0)
THnSparseF * fnSparseIP
!<!THnSparse for candidates on data
Bool_t CheckDaugAcc(TClonesArray *arrayMC, Int_t nProng, Int_t *labDau)
TH2F * fDalitzPhi[4 *kMaxPtBins]
! dalitz plot via phi (sig,bkg,tot)
Float_t GetCentrality(AliAODEvent *aodEvent)
Bool_t IsEventRejectedDueToPileup() const
static Int_t CheckDplusKKpiDecay(AliStack *stack, Int_t label, Int_t *arrayDauLab)
TH1F * fMassHistKpi[kMaxPtBins]
! hist. of mass spectra of Kpi
Bool_t IsCutOnResonancesApplied() const
TH1F * fPtCandHist[4 *kMaxPtBins]
! hist. for Pt Max (Prod Cuts)
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)
void FillMCGenAccHistos(TClonesArray *arrayMC, AliAODMCHeader *mcHeader)
void SetOwnPrimaryVtx(const AliAODVertex *vtx)
Double_t CosPiDsLabFramepiKK() const
Bool_t fReadMC
0 = pp, 1 = pPb,PbPb
Double_t DecayLengthXY() const
Int_t fAODProtection
flag for usage of THnSparse
Bool_t GetIsPrimaryWithoutDaughters() const
Int_t GetSignalHistoIndex(Int_t iPtBin) const
Bool_t IsEventSelected(AliVEvent *event)
virtual void UserExec(Option_t *option)
void StoreEvent(AliVEvent *, AliRDHFCuts *, Bool_t mc=kFALSE, Int_t multiplicity=-9999, Double_t spherocity=-99.)
Int_t GetReflSignalHistoIndex(Int_t iPtBin) const
virtual void Terminate(Option_t *option)
TH1F * fCosPHist[4 *kMaxPtBins]
! hist. of cos pointing angle (sig,bkg,tot)
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
void CleanOwnPrimaryVtx(AliAODRecoDecayHF *d, AliAODEvent *aod, AliAODVertex *origownvtx) const
Float_t * GetPtBinLimits() const
TH1F * fDLenHist[4 *kMaxPtBins]
! hist. of decay length (sig,bkg,tot)
Bool_t fUseSelectionBit
flag to create and fill histos with distributions of cut variables
Double_t GetWeightForpiKK() const
Double_t GetWeightForKKpi() const
TH1F * fChanHist[4]
! hist. with KKpi and piKK candidates (sig,bkg,tot)
TH1F * fMassHist[4 *kMaxPtBins]
! hist. of mass spectra (sig,bkg,tot)
TH1F * fDCAHist[4 *kMaxPtBins]
! hist. for DCA (Prod Cuts)
Bool_t IsEventRejectedDueToTrigger() const
Bool_t fDoCutVarHistos
flag to control ntuple writing in MC
TH1F * fPtProng2Hist[4 *kMaxPtBins]
! hist. for DCA (Prod Cuts)
Double_t CosPointingAngle() const
TH2F * fDalitz[4 *kMaxPtBins]
! dalitz plot (sig,bkg,tot)
Int_t GetUseCentrality() const
TH1F * fSigVertHist[4 *kMaxPtBins]
! hist. for sigVert (Prod Cuts)
Bool_t RecalcOwnPrimaryVtx(AliAODRecoDecayHF *d, AliAODEvent *aod) const
Double_t DecayLength() const
TH2F * fPtVsMassPhi
! hist. of pt vs. mass (phi selection)
TH1F * fMassHistKK[kMaxPtBins]
! hist. of mass spectra of KK
Double_t CosPiKPhiRFramepiKK() const
TH1F * fMassHistK0st[4 *kMaxPtBins]
! hist. of mass spectra via K0* (sig,bkg,tot)
TH2F * fYVsPt
! hist. of Y vs. Pt (prod. cuts)
TH2F * fPtVsMassK0st
! hist. of pt vs. mass (K0* selection)
TList * fListCuts
number of Pt bins
void ApplyCutOnResonances(Bool_t opt=kTRUE)
TList * OpenFile(const char *fname)
UChar_t fNPtBins
-1: no protection, 0: check AOD/dAOD nEvents only, 1: check AOD/dAOD nEvents + TProcessID names ...
Bool_t fWriteOnlySignal
flag for access to MC
Double_t fMassBinSize
range for mass histogram
Int_t GetBackgroundHistoIndex(Int_t iPtBin) const
Float_t fPtLimits[kMaxPtBins+1]