28 #include <TClonesArray.h>
33 #include <TDatabasePDG.h>
35 #include "AliAnalysisManager.h"
37 #include "AliAODHandler.h"
38 #include "AliAODEvent.h"
39 #include "AliAODVertex.h"
40 #include "AliAODTrack.h"
43 #include "AliAnalysisTaskSE.h"
76 fUseStrangeness(kFALSE),
89 for(Int_t i=0;i<3;i++){
127 for(Int_t i=0;i<kMaxPtBins+1;i++){
135 AliAnalysisTaskSE(name),
145 fPhiEtaCandSigReg(0),
149 fLowmasslimit(1.765),
153 fRDCutsAnalysis(dpluscutsana),
155 fFillNtuple(fillNtuple),
157 fUseStrangeness(kFALSE),
162 fLowerImpPar(-1000.),
163 fHigherImpPar(1000.),
173 for(Int_t i=0;i<3;i++){
210 for(Int_t i=0;i<kMaxPtBins+1;i++){
217 DefineOutput(1,TList::Class());
220 DefineOutput(2,TList::Class());
222 DefineOutput(3,AliNormalizationCounter::Class());
226 DefineOutput(4,TNtuple::Class());
267 for(Int_t i=0;i<3;i++){
271 for(Int_t i=0;i<5;i++){
315 Int_t missingbins=4-nbins%4;
316 nbins=nbins+missingbins;
319 printf(
"AliAnalysisTaskSEDplus::SetBinWidth: W-bin width of %f will produce histograms not rebinnable by 4. New width set to %f\n",w,width);
322 if(fDebug>1) printf(
"AliAnalysisTaskSEDplus::SetBinWidth: width set to %f\n",width);
336 if(fDebug>1)printf(
"started LS\n");
343 Int_t nPosTrks=0,nNegTrks=0;
344 Int_t nOStriplets = arrayOppositeSign->GetEntriesFast();
347 Int_t nLikeSign = arrayLikeSign->GetEntriesFast();
351 for(Int_t iLikeSign = 0; iLikeSign < nLikeSign; iLikeSign++) {
354 Bool_t unsetvtx=kFALSE;
359 Double_t ptCand = d->Pt();
361 if(iPtBin<0)
continue;
362 Int_t sign= d->GetCharge();
375 histLSPlus->Fill(invMass);
378 histLSMinus->Fill(invMass);
384 Double_t sumD02=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2);
385 Double_t dca=d->GetDCA();
388 for(Int_t i=0;i<3;i++){
389 if(d->PtProng(i)>
ptmax)ptmax=d->PtProng(i);
406 if(nLikeSign!=0)wei2 = (Float_t)nOStriplets/(Float_t)nLikeSign;
408 if(nDplusLS!=0)wei3 = (Float_t)nDplusOS/(Float_t)(nDplusLS+nDminusLS);
409 Float_t weiplus=1.,weiminus=1.;
410 Float_t wei4plus=1.,wei4minus=1.;
412 if(nPosTrks>2)weiplus=3.*(Float_t)nNegTrks/((Float_t)nPosTrks-2.);
413 if(nDplusLS>2)wei4plus=3.*(Float_t)nDminusLS/((Float_t)nDplusLS-2.);
414 if(nNegTrks>2)weiminus=3.*(Float_t)nPosTrks/((Float_t)nNegTrks-2.);
415 if(nDminusLS>2)wei4minus=3.*(Float_t)nDplusLS/((Float_t)nDminusLS-2.);
426 delete histLSPlus;histLSPlus=0;
427 delete histLSMinus;histLSMinus=0;
429 if(fDebug>1) printf(
"LS analysis terminated\n");
437 if(fDebug > 1) printf(
"AnalysisTaskSEDplus::Init() \n");
443 analysis->SetName(
"AnalysisCuts");
456 if(fDebug > 1) printf(
"AnalysisTaskSEDplus::UserCreateOutputObjects() \n");
461 fOutput->SetName(
"OutputHistos");
463 fHistNEvents =
new TH1F(
"fHistNEvents",
"number of events ",11,-0.5,10.5);
465 fHistNEvents->GetXaxis()->SetBinLabel(2,
"nEvents accepted");
466 fHistNEvents->GetXaxis()->SetBinLabel(3,
"Rejected due to trigger");
467 fHistNEvents->GetXaxis()->SetBinLabel(4,
"Rejected pileup events");
468 fHistNEvents->GetXaxis()->SetBinLabel(5,
"Rejected due to centrality");
469 fHistNEvents->GetXaxis()->SetBinLabel(6,
"Rejected due to vtxz");
470 fHistNEvents->GetXaxis()->SetBinLabel(7,
"Rejected due to Physics Sel");
471 fHistNEvents->GetXaxis()->SetBinLabel(8,
"Total no. of candidate");
472 fHistNEvents->GetXaxis()->SetBinLabel(9,
"no. of cand wo bitmask");
473 fHistNEvents->GetXaxis()->SetBinLabel(10,
"D+ after loose cuts");
474 fHistNEvents->GetXaxis()->SetBinLabel(11,
"D+ after tight cuts");
484 fHistCentrality[0]=
new TH2F(
"hCentrMult",
"centrality",100,0.5,30000.5,40,0.,100.);
485 fHistCentrality[1]=
new TH2F(
"hCentrMult(selectedCent)",
"centrality(selectedCent)",100,0.5,30000.5,40,0.,100.);
486 fHistCentrality[2]=
new TH2F(
"hCentrMult(OutofCent)",
"centrality(OutofCent)",100,0.5,30000.5,40,0.,100.);
487 for(Int_t i=0;i<3;i++){
495 hisname.Form(
"hMassPt%d",i);
498 hisname.Form(
"hCosPAllPt%d",i);
499 fCosPHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.5,1.);
501 hisname.Form(
"hDLenAllPt%d",i);
502 fDLenHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,0.5);
504 hisname.Form(
"hSumd02AllPt%d",i);
505 fSumd02Hist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,1.);
507 hisname.Form(
"hSigVertAllPt%d",i);
508 fSigVertHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,0.1);
510 hisname.Form(
"hPtMaxAllPt%d",i);
511 fPtMaxHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.5,5.);
513 hisname.Form(
"hPtKPt%d",i);
514 fPtKHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,5.);
516 hisname.Form(
"hPtpi1Pt%d",i);
517 fPtpi1Hist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,5.);
519 hisname.Form(
"hPtpi2Pt%d",i);
520 fPtpi2Hist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,5.);
522 hisname.Form(
"hDCAAllPt%d",i);
523 fDCAHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,0.1);
526 hisname.Form(
"hDLxyPt%d",i);
527 fDLxy[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,10.);
528 fDLxy[index]->Sumw2();
529 hisname.Form(
"hCosxyPt%d",i);
530 fCosxy[index]=
new TH1F(hisname.Data(),hisname.Data(),100,-1,1.);
532 hisname.Form(
"hDLxyPt%dTC",i);
533 fDLxyTC[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,10.);
535 hisname.Form(
"hCosxyPt%dTC",i);
536 fCosxyTC[index]=
new TH1F(hisname.Data(),hisname.Data(),100,-1,1.);
539 hisname.Form(
"hMassPt%dTC",i);
542 hisname.Form(
"hMassPt%dTCPlus",i);
545 hisname.Form(
"hMassPt%dTCMinus",i);
552 hisname.Form(
"hSigPt%d",i);
555 hisname.Form(
"hCosPSigPt%d",i);
556 fCosPHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.5,1.);
558 hisname.Form(
"hDLenSigPt%d",i);
559 fDLenHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,0.5);
561 hisname.Form(
"hSumd02SigPt%d",i);
562 fSumd02Hist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,1.);
564 hisname.Form(
"hSigVertSigPt%d",i);
565 fSigVertHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,0.1);
567 hisname.Form(
"hPtMaxSigPt%d",i);
568 fPtMaxHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.5,5.);
570 hisname.Form(
"hPtKSigPt%d",i);
571 fPtKHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,5.);
573 hisname.Form(
"hPtpi1SigPt%d",i);
574 fPtpi1Hist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,5.);
576 hisname.Form(
"hPtpi2SigPt%d",i);
577 fPtpi2Hist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,5.);
580 hisname.Form(
"hDCASigPt%d",i);
581 fDCAHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,0.1);
584 hisname.Form(
"hDLxySigPt%d",i);
585 fDLxy[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,10.);
586 fDLxy[index]->Sumw2();
587 hisname.Form(
"hCosxySigPt%d",i);
588 fCosxy[index]=
new TH1F(hisname.Data(),hisname.Data(),100,-1,1.);
590 hisname.Form(
"hDLxySigPt%dTC",i);
591 fDLxyTC[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,10.);
593 hisname.Form(
"hCosxySigPt%dTC",i);
594 fCosxyTC[index]=
new TH1F(hisname.Data(),hisname.Data(),100,-1,1.);
596 hisname.Form(
"hSigPt%dTC",i);
599 hisname.Form(
"hSigPt%dTCPlus",i);
602 hisname.Form(
"hSigPt%dTCMinus",i);
608 hisname.Form(
"hBkgPt%d",i);
611 hisname.Form(
"hCosPBkgPt%d",i);
612 fCosPHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.5,1.);
614 hisname.Form(
"hDLenBkgPt%d",i);
615 fDLenHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,0.5);
617 hisname.Form(
"hSumd02BkgPt%d",i);
618 fSumd02Hist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,1.);
620 hisname.Form(
"hSigVertBkgPt%d",i);
621 fSigVertHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,0.1);
623 hisname.Form(
"hPtMaxBkgPt%d",i);
624 fPtMaxHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.5,5.);
626 hisname.Form(
"hPtKBkgPt%d",i);
627 fPtKHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,5.);
629 hisname.Form(
"hPtpi1BkgPt%d",i);
630 fPtpi1Hist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,5.);
632 hisname.Form(
"hPtpi2BkgPt%d",i);
633 fPtpi2Hist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,5.);
635 hisname.Form(
"hDCABkgPt%d",i);
636 fDCAHist[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,0.1);
639 hisname.Form(
"hDLxyBkgPt%d",i);
640 fDLxy[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,10.);
641 fDLxy[index]->Sumw2();
642 hisname.Form(
"hCosxyBkgPt%d",i);
643 fCosxy[index]=
new TH1F(hisname.Data(),hisname.Data(),100,-1,1.);
645 hisname.Form(
"hDLxyBkgPt%dTC",i);
646 fDLxyTC[index]=
new TH1F(hisname.Data(),hisname.Data(),100,0.,10.);
648 hisname.Form(
"hCosxyBkgPt%dTC",i);
649 fCosxyTC[index]=
new TH1F(hisname.Data(),hisname.Data(),100,-1,1.);
653 hisname.Form(
"hBkgPt%dTC",i);
656 hisname.Form(
"hBkgPt%dTCPlus",i);
659 hisname.Form(
"hBkgPt%dTCMinus",i);
688 fCorreld0Kd0pi[0]=
new TH2F(
"hCorreld0Kd0piAll",
"",100,-0.02,0.02,100,-0.02,0.02);
689 fCorreld0Kd0pi[1]=
new TH2F(
"hCorreld0Kd0piSig",
"",100,-0.02,0.02,100,-0.02,0.02);
690 fCorreld0Kd0pi[2]=
new TH2F(
"hCorreld0Kd0piBkg",
"",100,-0.02,0.02,100,-0.02,0.02);
692 for(Int_t i=0; i<3; i++){
701 fYVsPt=
new TH3F(
"hYVsPt",
"YvsPt (prod. cuts)",40,0.,20.,80,-2.,2.,nbins,
fLowmasslimit,
fUpmasslimit);
702 fYVsPtTC=
new TH3F(
"hYVsPtTC",
"YvsPt (analysis cuts)",40,0.,20.,80,-2.,2.,nbins,
fLowmasslimit,
fUpmasslimit);
703 fYVsPtSig=
new TH2F(
"hYVsPtSig",
"YvsPt (MC, only sig., prod. cuts)",40,0.,20.,80,-2.,2.);
704 fYVsPtSigTC=
new TH2F(
"hYVsPtSigTC",
"YvsPt (MC, only Sig, analysis cuts)",40,0.,20.,80,-2.,2.);
705 fPhiEtaCand=
new TH2F(
"hPhiEtaCand",
"phi vs. eta candidates",20,-1.,1.,50,0.,2*TMath::Pi());
706 fPhiEtaCandSigReg=
new TH2F(
"hPhiEtaCandSigReg",
"phi vs. eta candidates",20,-1.,1.,50,0.,2*TMath::Pi());
707 fSPDMult =
new TH1F(
"hSPDMult",
"Tracklets multiplicity; Tracklets ; Entries",200,0.,200.);
720 TString normName=
"NormalizationCounter";
721 AliAnalysisDataContainer *cont = GetOutputSlot(3)->GetContainer();
722 if(cont)normName=(TString)cont->GetName();
733 fNtupleDplus =
new TNtuple(
"fNtupleDplus",
"D +",
"pdg:Px:Py:Pz:Pt:charge:piddau0:piddau1:piddau2:Ptpi:PtK:Ptpi2:mompi:momK:mompi2:cosp:cospxy:DecLen:NormDecLen:DecLenXY:NormDecLenXY:InvMass:sigvert:d0Pi:d0K:d0Pi2:maxdca:ntracks:centr:RunNumber:BadDau");
746 AliAODEvent *aod =
dynamic_cast<AliAODEvent*
> (InputEvent());
748 TClonesArray *array3Prong = 0;
749 TClonesArray *arrayLikeSign =0;
750 if(!aod && AODEvent() && IsStandardAOD()) {
753 aod =
dynamic_cast<AliAODEvent*
> (AODEvent());
756 AliAODHandler* aodHandler = (AliAODHandler*)
757 ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
758 if(aodHandler->GetExtensions()) {
759 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(
"AliAOD.VertexingHF.root");
760 AliAODEvent *aodFromExt = ext->GetAOD();
761 array3Prong=(TClonesArray*)aodFromExt->GetList()->FindObject(
"Charm3Prong");
762 arrayLikeSign=(TClonesArray*)aodFromExt->GetList()->FindObject(
"LikeSign3Prong");
765 array3Prong=(TClonesArray*)aod->GetList()->FindObject(
"Charm3Prong");
766 arrayLikeSign=(TClonesArray*)aod->GetList()->FindObject(
"LikeSign3Prong");
769 if(!aod || !array3Prong) {
770 printf(
"AliAnalysisTaskSEDplus::UserExec: Charm3Prong branch not found!\n");
773 if(!arrayLikeSign &&
fDoLS) {
774 printf(
"AliAnalysisTaskSEDplus::UserExec: LikeSign3Prong branch not found!\n");
780 if(!aod->GetPrimaryVertex()||TMath::Abs(aod->GetMagneticField())<0.001)
return;
786 Int_t runNumber=aod->GetRunNumber();
790 Float_t ntracks=aod->GetNumberOfTracks();
812 TClonesArray *arrayMC=0;
813 AliAODMCHeader *mcHeader=0;
816 AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
823 arrayMC = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
825 printf(
"AliAnalysisTaskSEDplus::UserExec: MC particles branch not found!\n");
830 mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
832 printf(
"AliAnalysisTaskSEDplus::UserExec: MC header branch not found!\n");
837 Int_t n3Prong = array3Prong->GetEntriesFast();
842 Int_t pdgDgDplustoKpipi[3]={321,211,211};
845 for (Int_t i3Prong = 0; i3Prong < n3Prong; i3Prong++) {
854 Int_t nSelectedloose=0,nSelectedtight=0;
855 for (Int_t i3Prong = 0; i3Prong < n3Prong; i3Prong++) {
867 Double_t etaD=d->Eta();
868 Double_t phiD=d->Phi();
874 Bool_t unsetvtx=kFALSE;
880 Double_t ptCand = d->Pt();
883 Bool_t recVtx=kFALSE;
884 AliAODVertex *origownvtx=0x0;
892 Bool_t isPrimary=kTRUE;
894 Float_t trueImpParXY=0.;
896 labDp = d->MatchToMC(411,arrayMC,3,pdgDgDplustoKpipi);
898 AliAODMCParticle *partDp = (AliAODMCParticle*)arrayMC->At(labDp);
900 pdgCode=TMath::Abs(partDp->GetPdgCode());
910 Double_t rapid=d->
YDplus();
911 fYVsPt->Fill(ptCand,rapid,invMass);
912 if(passTightCuts) {
fYVsPtTC->Fill(ptCand,rapid,invMass);nOS++;}
924 Double_t dlen=0,cosp=0,maxdca=0,sigvert=0,sumD02=0,
ptmax=0,dlxy=0,cxy=0;
928 sumD02=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2);
930 for(Int_t idau=0;idau<3;idau++)
if(d->GetDCA(idau)>maxdca) maxdca=d->GetDCA(idau);
933 for(Int_t i=0;i<3;i++){
939 Double_t impparXY=d->
ImpParXY()*10000.;
940 Double_t arrayForSparse[6]={invMass,ptCand,impparXY,cosp,dlen,
static_cast<Double_t
>(tracklets)};
941 Double_t arrayForSparseTrue[6]={invMass,ptCand,trueImpParXY,cosp,dlen,
static_cast<Double_t
>(tracklets)};
947 if(!isPrimary) tmp[0]+=5000.;
952 tmp[5]=d->GetCharge();
957 tmp[9]=d->PtProng(0);
958 tmp[10]=d->PtProng(1);
959 tmp[11]=d->PtProng(2);
960 tmp[12]=d->PProng(0);
961 tmp[13]=d->PProng(1);
962 tmp[14]=d->PProng(2);
971 tmp[23]=d->Getd0Prong(0);
972 tmp[24]=d->Getd0Prong(1);
973 tmp[25]=d->Getd0Prong(2);
995 fPtKHist[index]->Fill(d->PtProng(1));
999 fDLxy[index]->Fill(dlxy);
1000 fCosxy[index]->Fill(cxy);
1002 d->Getd0Prong(2)*d->Getd0Prong(1));
1039 Float_t factor[3]={1.,1.,1.};
1043 fDLxy[index]->Fill(dlxy);
1044 fCosxy[index]->Fill(cxy);
1046 Float_t sumd02s=d->Getd0Prong(0)*d->Getd0Prong(0)*factor[0]*factor[0]+d->Getd0Prong(1)*d->Getd0Prong(1)*factor[1]*factor[1]+d->Getd0Prong(2)*d->Getd0Prong(2)*factor[2]*factor[2];
1050 fPtKHist[index]->Fill(d->PtProng(1),fact);
1053 fDCAHist[index]->Fill(maxdca,fact);
1055 d->Getd0Prong(2)*d->Getd0Prong(1));
1069 if(passTightCuts)
fYVsPtSigTC->Fill(ptCand,rapid, invMass);
1082 if(
fDoLS && arrayLikeSign)
LSAnalysis(array3Prong,arrayLikeSign,aod,vtx1,nOS);
1103 hisname.Form(
"hLSPt%dLC",i);
1106 hisname.Form(
"hLSPt%dTC",i);
1110 hisname.Form(
"hCosPAllPt%dLS",i);
1113 hisname.Form(
"hDLenAllPt%dLS",i);
1116 hisname.Form(
"hSumd02AllPt%dLS",i);
1119 hisname.Form(
"hSigVertAllPt%dLS",i);
1122 hisname.Form(
"hPtMaxAllPt%dLS",i);
1125 hisname.Form(
"hDCAAllPt%dLS",i);
1126 fDCAHistLS[index]=
new TH1F(hisname.Data(),hisname.Data(),
nbins,0.,0.1);
1132 hisname.Form(
"hLSPt%dLCnw",i);
1135 hisname.Form(
"hLSPt%dTCnw",i);
1139 hisname.Form(
"hCosPSigPt%dLS",i);
1142 hisname.Form(
"hDLenSigPt%dLS",i);
1145 hisname.Form(
"hSumd02SigPt%dLS",i);
1148 hisname.Form(
"hSigVertSigPt%dLS",i);
1151 hisname.Form(
"hPtMaxSigPt%dLS",i);
1154 hisname.Form(
"hDCASigPt%dLS",i);
1155 fDCAHistLS[index]=
new TH1F(hisname.Data(),hisname.Data(),
nbins,0.,0.1);
1161 hisname.Form(
"hLSPt%dLCntrip",i);
1164 hisname.Form(
"hLSPt%dTCntrip",i);
1168 hisname.Form(
"hCosPBkgPt%dLS",i);
1171 hisname.Form(
"hDLenBkgPt%dLS",i);
1174 hisname.Form(
"hSumd02BkgPt%dLS",i);
1177 hisname.Form(
"hSigVertBkgPt%dLS",i);
1180 hisname.Form(
"hPtMaxBkgPt%dLS",i);
1183 hisname.Form(
"hDCABkgPt%dLS",i);
1184 fDCAHistLS[index]=
new TH1F(hisname.Data(),hisname.Data(),
nbins,0.,0.1);
1188 hisname.Form(
"hLSPt%dLCntripsinglecut",i);
1191 hisname.Form(
"hLSPt%dTCntripsinglecut",i);
1196 hisname.Form(
"hLSPt%dLCspc",i);
1199 hisname.Form(
"hLSPt%dTCspc",i);
1231 "Mass vs. pt vs.imppar - All",
1234 "Mass vs. pt vs.imppar - promptD",
1237 "Mass vs. pt vs.imppar - DfromB",
1240 "Mass vs. pt vs.true imppar -DfromB",
1243 "Mass vs. pt vs.imppar - backgr.",
1245 for(Int_t i=0; i<5;i++){
1255 if(fDebug > 1) printf(
"AnalysisTaskSEDplus: Terminate() \n");
1257 fOutput =
dynamic_cast<TList*
> (GetOutputData(1));
1259 printf(
"ERROR: fOutput not available\n");
1265 printf(
"Number of analyzed events = %d\n",(Int_t)
fHistNEvents->GetBinContent(2));
1267 printf(
"ERROR: fHistNEvents not available\n");
1277 Double_t vtxTrue[3];
1278 mcHeader->GetVertex(vtxTrue);
1280 partDp->XvYvZv(origD);
1281 Short_t
charge=partDp->Charge();
1282 Double_t pXdauTrue[3],pYdauTrue[3],pZdauTrue[3];
1283 for(Int_t iDau=0; iDau<3; iDau++){
1289 Int_t nDau=partDp->GetNDaughters();
1290 Int_t labelFirstDau = partDp->GetDaughter(0);
1292 for(Int_t iDau=0; iDau<3; iDau++){
1293 Int_t ind = labelFirstDau+iDau;
1294 AliAODMCParticle* part =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(ind));
1296 AliError(
"Daughter particle not found in MC array");
1299 pXdauTrue[iDau]=part->Px();
1300 pYdauTrue[iDau]=part->Py();
1301 pZdauTrue[iDau]=part->Pz();
1305 for(Int_t iDau=0; iDau<2; iDau++){
1306 Int_t ind = labelFirstDau+iDau;
1307 AliAODMCParticle* part =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(ind));
1309 AliError(
"Daughter particle not found in MC array");
1312 Int_t pdgCode=TMath::Abs(part->GetPdgCode());
1313 if(pdgCode==211 || pdgCode==321){
1314 pXdauTrue[theDau]=part->Px();
1315 pYdauTrue[theDau]=part->Py();
1316 pZdauTrue[theDau]=part->Pz();
1319 Int_t nDauRes=part->GetNDaughters();
1321 Int_t labelFirstDauRes = part->GetDaughter(0);
1322 for(Int_t iDauRes=0; iDauRes<2; iDauRes++){
1323 Int_t indDR = labelFirstDauRes+iDauRes;
1324 AliAODMCParticle* partDR =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(indDR));
1326 AliError(
"Daughter particle not found in MC array");
1330 Int_t pdgCodeDR=TMath::Abs(partDR->GetPdgCode());
1331 if(pdgCodeDR==211 || pdgCodeDR==321){
1332 pXdauTrue[theDau]=partDR->Px();
1333 pYdauTrue[theDau]=partDR->Py();
1334 pZdauTrue[theDau]=partDR->Pz();
1342 AliError(
"Wrong number of decay prongs");
1347 Double_t d0dummy[3]={0.,0.,0.};
1348 AliAODRecoDecayHF aodDplusMC(vtxTrue,origD,3,charge,pXdauTrue,pYdauTrue,pZdauTrue,d0dummy);
1356 for(Int_t iprong=0;iprong<3;iprong++){
1358 AliAODTrack *trad = (AliAODTrack*)d->GetDaughter(iprong);
1359 Int_t labd= trad->GetLabel();
1361 AliAODMCParticle *dau = (AliAODMCParticle*)arrayMC->At(labd);
1363 Int_t labm = dau->GetMother();
1365 AliAODMCParticle *mot = (AliAODMCParticle*)arrayMC->At(labm);
1367 if(TMath::Abs(mot->GetPdgCode())==310 || TMath::Abs(mot->GetPdgCode())==130 || TMath::Abs(mot->GetPdgCode())==321){
1368 if(d->PtProng(iprong)<=1)factor[iprong]=1./.7;
1369 else factor[iprong]=1./.6;
1372 if(TMath::Abs(mot->GetPdgCode())==3122) {
1373 factor[iprong]=1./0.25;
1383 for(Int_t k=0;k<3;k++)fact=fact*factor[k];
TH1F * fCosxy[3 *kMaxPtBins]
!hist. for Cosxy (LC)
TH2F * fPhiEtaCand
! hist. with eta/phi distribution of candidates
Double_t NormalizedDecayLengthXY() const
Double_t NormalizedDecayLength() const
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
Bool_t fUseStrangeness
flag for access to MC
TH1F * fSigVertHist[3 *kMaxPtBins]
!hist. for sigVert (LC)
AliRDHFCutsDplustoKpipi * fRDCutsAnalysis
list of cuts
virtual void UserCreateOutputObjects()
Implementation of interface methods.
void StoreCandidates(AliVEvent *, Int_t nCand=0, Bool_t flagFilter=kTRUE)
TH1F * fPtpi1Hist[3 *kMaxPtBins]
!hist. for PtPi1 (LC)
Int_t GetIsSelectedCuts() const
Bool_t HasSelectionBit(Int_t i) const
TH3F * fYVsPt
! hist. of Y vs. Pt vs. Mass(prod. cuts)
virtual void Terminate(Option_t *option)
TH1F * fMassHistTC[3 *kMaxPtBins]
!hist. for inv mass (TC)
TH1F * fDLxy[3 *kMaxPtBins]
!hist. for DLxy (LC)
void UnsetOwnPrimaryVtx()
Int_t fEtaSelection
flag to do LS analysis
Float_t fLowerImpPar
nunber of bins in impact parameter histos
TH2F * fHistCentrality[3]
!hist. for cent distr (all,sel ev, )
TH1F * fPtMaxHistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 5 (LC)
Double_t ImpParXY() const
TH1F * fSPDMult
! hist. of spd mult
virtual ~AliAnalysisTaskSEDplus()
Bool_t fReadMC
flag for filling ntuple
Int_t GetLSHistoIndex(Int_t iPtBin) const
TH1F * fMassHistLSTC[5 *kMaxPtBins]
!hist. for LS inv mass (TC)
Int_t GetSignalHistoIndex(Int_t iPtBin) const
UInt_t GetPIDTrackTPCTOFBitMap(AliAODTrack *track) const
Int_t GetWhyRejection() const
Double_t CosPointingAngleXY() const
TList * fListCuts
width of one bin in output histos
TList * fOutput
! list send on output slot 0
virtual Bool_t IsInFiducialAcceptance(Double_t pt, Double_t y) const
Bool_t fCutsDistr
flag to use bitmask
static Int_t CheckOrigin(TClonesArray *arrayMC, AliAODMCParticle *mcPart, Bool_t searchUpToQuark=kTRUE)
void LSAnalysis(TClonesArray *arrayOppositeSign, TClonesArray *arrayLikeSign, AliAODEvent *aod, AliAODVertex *vtx1, Int_t nDplusOS)
void SetBinWidth(Float_t w)
Int_t GetBackgroundHistoIndex(Int_t iPtBin) const
TH1F * fCosPHist[3 *kMaxPtBins]
!hist. for PointingAngle (LC)
Bool_t HasBadDaughters() const
TH2F * fPtVsMassTC
! hist. of pt vs. mass (analysis cuts)
TH2F * fYVsPtSig
! hist. of Y vs. Pt (MC, only sig, prod. cuts)
THnSparseF * fHistMassPtImpParTC[5]
! histograms for impact paramter studies
Float_t fHigherImpPar
lower limit in impact parameter (um)
Class for cuts on AOD reconstructed D+->Kpipi.
TH1F * fMassHistLS[5 *kMaxPtBins]
!hist. for LS inv mass (LC)
void CreateImpactParameterHistos()
static Int_t GetNumberOfTrackletsInEtaRange(AliAODEvent *ev, Double_t mineta, Double_t maxeta)
TH1F * fSumd02Hist[3 *kMaxPtBins]
!hist. for sum d02 (LC)
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel)
TH3F * fYVsPtTC
! hist. of Y vs. Pt vs. Mass (analysis cuts)
TH1F * fMassHistTCPlus[3 *kMaxPtBins]
!hist. for D+ inv mass (TC)
TH2F * fPtVsMass
! hist. of pt vs. mass (prod. cuts)
AliAODVertex * GetOwnPrimaryVtx() const
Double_t GetSigmaVert(const AliAODEvent *aod=0x0)
Int_t fDoLS
higher limit in impact parameter (um)
TH1F * fPtpi2Hist[3 *kMaxPtBins]
!hist. for PtPi2 (LC)
TH2F * fPhiEtaCandSigReg
! hist. eta/phi of candidates in D+ mass region
Float_t GetCentrality(AliAODEvent *aodEvent)
Double_t InvMassDplus() const
Float_t GetTrueImpactParameter(const AliAODMCHeader *mcHeader, TClonesArray *arrayMC, const AliAODMCParticle *partDp) const
Int_t fNImpParBins
flag to activate impact paramter histos
TH1F * fDLenHistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 2 (LC)
Int_t GetHistoIndex(Int_t iPtBin) const
TH1F * fMassHist[3 *kMaxPtBins]
!hist. for inv mass (LC)
void SetOwnPrimaryVtx(const AliAODVertex *vtx)
Bool_t fFillNtuple
limits for the Pt bins
Double_t DecayLengthXY() const
Bool_t GetIsPrimaryWithoutDaughters() const
TH1F * fSumd02HistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 3 (LC)
Bool_t IsEventSelected(AliVEvent *event)
TH1F * fHistNEvents
!hist. for No. of events
TH1F * fCosPHistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 1 (LC)
TH1F * fPtKHist[3 *kMaxPtBins]
!hist. for PtK (LC)
Float_t fBinWidth
Number of Pt Bins.
void SetMassLimits(Float_t range)
TH2F * fYVsPtSigTC
! hist. of Y vs. Pt (MC, only sig, analysis cuts)
void CleanOwnPrimaryVtx(AliAODRecoDecayHF *d, AliAODEvent *aod, AliAODVertex *origownvtx) const
TH1F * fDLxyTC[3 *kMaxPtBins]
!hist. for DLxy (TC)
Int_t fSystem
eta region to accept D+ 0=all, -1 = negative, 1 = positive
TH2F * fCorreld0Kd0pi[3]
!hist. for d0k*d0pi vs. d0k*d0pi (LC)
virtual void UserExec(Option_t *option)
TH1F * fDLenHist[3 *kMaxPtBins]
!hist. for Dec Length (LC)
Bool_t fDoImpPar
flag to activate cuts distr histos
AliNormalizationCounter * fCounter
Cuts for Analysis.
TH1F * fSigVertHistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 4 (LC)
Bool_t fUseBit
flag to enhance strangeness in MC to fit to data
Double_t fArrayBinLimits[kMaxPtBins+1]
void CreateLikeSignHistos()
void StoreEvent(AliVEvent *, AliRDHFCuts *, Bool_t mc=kFALSE, Int_t multiplicity=-9999)
Double_t CosPointingAngle() const
Float_t GetStrangenessWeights(const AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC, Float_t factor[3]) const
TH1F * fDCAHist[3 *kMaxPtBins]
!hist. for DCA (LC)
Float_t fLowmasslimit
upper inv mass limit for histos
Int_t GetUseCentrality() const
Bool_t RecalcOwnPrimaryVtx(AliAODRecoDecayHF *d, AliAODEvent *aod) const
Int_t PtBin(Double_t pt) const
Double_t DecayLength() const
TH1F * fCosxyTC[3 *kMaxPtBins]
!hist. for Cosxy (TC)
TNtuple * fNtupleDplus
! output ntuple
Int_t fNPtBins
lower inv mass limit for histos
TH1F * fMassHistTCMinus[3 *kMaxPtBins]
!hist. for D- inv mass (TC)
TH1F * fDCAHistLS[3 *kMaxPtBins]
!hist. for LS cuts variable 6 (LC)
TH1F * fPtMaxHist[3 *kMaxPtBins]
!hist. for Pt Max (LC)