X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PWGLF%2FRESONANCES%2FAliRsnMiniPair.cxx;h=c20bca57f4a913a700ab1ee3778b914e48f3e44e;hb=0af5b34f084ccf9d67fa3a8c52dc8a7b45c0c1c8;hp=31a2dfe3a757e011a9ba3717cae88eb01ec6e1a6;hpb=74d60285e5d989e68de15c8163f938d7a9dc7520;p=u%2Fmrichter%2FAliRoot.git diff --git a/PWGLF/RESONANCES/AliRsnMiniPair.cxx b/PWGLF/RESONANCES/AliRsnMiniPair.cxx index 31a2dfe3a75..c20bca57f4a 100644 --- a/PWGLF/RESONANCES/AliRsnMiniPair.cxx +++ b/PWGLF/RESONANCES/AliRsnMiniPair.cxx @@ -11,16 +11,28 @@ void AliRsnMiniPair::Fill // Fill this object with data coming // from arguments // - p1->Set4Vector(fP1[0], m1, kFALSE); p2->Set4Vector(fP2[0], m2, kFALSE); p1->Set4Vector(fP1[1], m1, kTRUE ); p2->Set4Vector(fP2[1], m2, kTRUE ); + + fDCA1 = p1->DCA(); + fDCA2 = p2->DCA(); fMother = -1; + fIsFromB = kFALSE; + fIsQuarkFound = kFALSE; + fPmother[0] = -1.0; + fPmother[1] = -1.0; + fPmother[2] = -1.0; if (p1->Mother() == p2->Mother()) { fMother = p1->Mother(); fMotherPDG = p1->MotherPDG(); + fPmother[0] = p1->PmotherX(); + fPmother[1] = p1->PmotherY(); + fPmother[2] = p1->PmotherZ(); + fIsFromB = p1->IsFromB(); + fIsQuarkFound = p1->IsQuarkFound(); } Int_t i; @@ -28,6 +40,9 @@ void AliRsnMiniPair::Fill fSum[i] = fP1[i] + fP2[i]; fRef[i].SetXYZM(fSum[i].X(), fSum[i].Y(), fSum[i].Z(), refMass); } + + fNSisters=-1; + if (p1->NTotSisters()==p2->NTotSisters()) fNSisters = p1->NTotSisters(); } //__________________________________________________________________________________________________ @@ -77,9 +92,127 @@ void AliRsnMiniPair::InvertP(Bool_t first) Int_t i; for (i = 0; i < 2; i++) { - if (first) fP1[i].Vect() *= -1.0; - else fP2[i].Vect() *= -1.0; + if (first) fP1[i].SetVect(fP1[i].Vect() *= -1.0); + else fP2[i].SetVect(fP2[i].Vect() *= -1.0); fSum[i] = fP1[i] + fP2[i]; fRef[i].SetXYZM(fSum[i].X(), fSum[i].Y(), fSum[i].Z(), fRef[i].M()); } } + +//__________________________________________________________________________________________________ +void AliRsnMiniPair::FillRef(Double_t mass) +{ +// +// Fill ref 4-vectors using the passed mass and the values in 'sum' +// + + Int_t i; + for (i = 0; i < 2; i++) { + fRef[i].SetXYZM(fSum[i].X(), fSum[i].Y(), fSum[i].Z(), mass); + } +} + +//__________________________________________________________________________________________________ +Double_t AliRsnMiniPair::InvMassRes() const +{ +// +// Return invariant mass resolution +// + + if (fSum[1].M() <= 0.0) return 1E20; + + return (fSum[0].M() - fSum[1].M()) / fSum[1].M(); +} + +//__________________________________________________________________________________________________ +Double_t AliRsnMiniPair::InvMassDiff() const +{ +// +// Return invariant mass resolution +// + + if (fSum[1].M() <= 0.0) return 1E20; + + return (fSum[0].M() - fSum[1].M()); +} + +//__________________________________________________________________________________________________ +Double_t AliRsnMiniPair::PtRatio(Bool_t mc) const +{ +// +// Return ratio of transverse momenta of daughters +// + + Double_t num = TMath::Abs(fP1[ID(mc)].Perp() - fP2[ID(mc)].Perp()); + Double_t den = TMath::Abs(fP1[ID(mc)].Perp() + fP2[ID(mc)].Perp()); + + if (den <= 0.0) return 1E20; + + return num / den; +} + +//__________________________________________________________________________________________________ +Double_t AliRsnMiniPair::DipAngle(Bool_t mc) const +{ +// +// Opening angle in a Z-T space +// + + const TLorentzVector &p1 = fP1[ID(mc)]; + const TLorentzVector &p2 = fP2[ID(mc)]; + + return ((p1.Perp() * p2.Perp() + p1.Z() * p2.Z()) / p1.Mag() / p2.Mag()); +} + +//__________________________________________________________________________________________________ +Double_t AliRsnMiniPair::DaughterPt(Int_t daughterId, Bool_t mc) +{ + //returns pt of the daughter + // if MC returns generated momenta + if (daughterId==0) + return fP1[ID(mc)].Pt(); + else + return fP2[ID(mc)].Pt(); +} + +//__________________________________________________________________________________________________ +Double_t AliRsnMiniPair::DaughterDCA(Int_t daughterId) +{ + // + //returns dca to Primary Vertex of the daughter + // + + if (daughterId==0) + return fDCA1; + else + return fDCA2; +} + +//__________________________________________________________________________________________________ +Double_t AliRsnMiniPair::DCAProduct() +{ + // + //returns products of the DCA of the 2 daughters + // + + return fDCA1*fDCA2; +} + +//__________________________________________________________________________________________________ +void AliRsnMiniPair::DaughterPxPyPz(Int_t daughterId, Bool_t mc, Double_t *pxpypz) +{ + //returns px,py,pz of the daughter by saving them into pxpypz + // if MC returns generated momenta + if (!pxpypz) return; + + if (daughterId==0){ + pxpypz[0]=fP1[ID(mc)].Px(); + pxpypz[1]=fP1[ID(mc)].Py(); + pxpypz[2]=fP1[ID(mc)].Pz(); + } else { + pxpypz[0]=fP2[ID(mc)].Px(); + pxpypz[1]=fP2[ID(mc)].Py(); + pxpypz[2]=fP2[ID(mc)].Pz(); + } + return; +}