25 #include <TDatabasePDG.h>
77 if(&source ==
this)
return *
this;
105 Double_t mD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass();
107 if(PtProng(1) < cuts[3] || PtProng(0) < cuts[4]) okD0 = 0;
108 if(PtProng(0) < cuts[3] || PtProng(1) < cuts[4]) okD0bar = 0;
109 if(!okD0 && !okD0bar)
return kFALSE;
111 if(TMath::Abs(Getd0Prong(1)) > cuts[5] ||
112 TMath::Abs(Getd0Prong(0)) > cuts[6]) okD0 = 0;
113 if(TMath::Abs(Getd0Prong(0)) > cuts[6] ||
114 TMath::Abs(Getd0Prong(1)) > cuts[5]) okD0bar = 0;
115 if(!okD0 && !okD0bar)
return kFALSE;
117 if(GetDCA() > cuts[1]) { okD0 = okD0bar = 0;
return kFALSE; }
120 if(TMath::Abs(mD0-mD0PDG) > cuts[0]) okD0 = 0;
121 if(TMath::Abs(mD0bar-mD0PDG) > cuts[0]) okD0bar = 0;
122 if(!okD0 && !okD0bar)
return kFALSE;
125 if(TMath::Abs(ctsD0) > cuts[2]) okD0 = 0;
126 if(TMath::Abs(ctsD0bar) > cuts[2]) okD0bar = 0;
127 if(!okD0 && !okD0bar)
return kFALSE;
129 if(
Prodd0d0() > cuts[7]) { okD0 = okD0bar = 0;
return kFALSE; }
157 Double_t mJPSIPDG = TDatabasePDG::Instance()->GetParticle(443)->Mass();
159 if(PtProng(1) < cuts[3] || PtProng(0) < cuts[4]) okB = 0;
160 if(!okB)
return kFALSE;
162 if(TMath::Abs(Getd0Prong(1)) > cuts[5] ||
163 TMath::Abs(Getd0Prong(0)) > cuts[6]) okB = 0;
164 if(!okB)
return kFALSE;
166 if(GetDCA() > cuts[1]) { okB = 0;
return kFALSE; }
169 if(TMath::Abs(mJPsi-mJPSIPDG) > cuts[0]) okB = 0;
170 if(!okB)
return kFALSE;
173 if(TMath::Abs(ctsJPsi) > cuts[2]) okB = 0;
174 if(!okB)
return kFALSE;
176 if(
Prodd0d0() > cuts[7]) { okB = 0;
return kFALSE; }
191 Int_t ndg=GetNDaughters();
193 AliError(
"No daughters available");
197 AliError(
"Only decays with <10 daughters supported");
205 if(!DDaughter)
return -1;
206 Int_t DLabel = DDaughter->MatchToMC(pdgabs3prong,mcArray,3,pdgDg3prong);
207 if(DLabel<0)
return -1;
209 Int_t dgLabels[10]={0};
213 for(
Int_t i=0; i<ndg; i++) {
214 AliVTrack *trk = (AliVTrack*)GetDaughter(i);
215 Int_t lab = trk->GetLabel();
219 printf(
"daughter with negative label\n");
227 Int_t label = MatchToMC(pdgabs,mcArray,dgLabels,ndg,2,pdgBDg);
AliAODRecoDecayHF2Prong()
AliAODRecoDecayHF & operator=(const AliAODRecoDecayHF &source)
Double_t InvMassD0() const
Double_t Prodd0d0() const
Double_t CosThetaStarJPSI() const
Bool_t SelectD0(const Double_t *cuts, Int_t &okD0, Int_t &okD0bar) const
AliAODRecoDecayHF2Prong & operator=(const AliAODRecoDecayHF2Prong &source)
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
Double_t InvMassJPSIee() const
angle of e-
Double_t CosPointingAngle() const
Double_t CosThetaStarD0() const
Bool_t SelectBtoJPSI(const Double_t *cuts, Int_t &okB) const
Int_t MatchToMCB3Prong(Int_t pdgabs, Int_t pdgabs3prong, Int_t *pdgBDg, Int_t *pdgDg3prong, TClonesArray *mcArray) const