/************************************************************************** * Copyright(c) 1998-2006, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ /* $Id$ */ ///////////////////////////////////////////////////////////// // // Base class for AOD reconstructed heavy-flavour 3-prong decay // // Author: E.Bruna bruna@to.infn.it, F.Prino prino@to.infn.it ///////////////////////////////////////////////////////////// #include #include "AliAODRecoDecayHF.h" #include "AliAODRecoDecayHF3Prong.h" #include "AliAODTrack.h" #include "TVector3.h" #include "TLorentzVector.h" ClassImp(AliAODRecoDecayHF3Prong) //-------------------------------------------------------------------------- AliAODRecoDecayHF3Prong::AliAODRecoDecayHF3Prong() : AliAODRecoDecayHF(), fSigmaVert(0), fDist12toPrim(0), fDist23toPrim(0) { // // Default Constructor // } //-------------------------------------------------------------------------- AliAODRecoDecayHF3Prong::AliAODRecoDecayHF3Prong(AliAODVertex *vtx2, Double_t *px,Double_t *py,Double_t *pz, Double_t *d0,Double_t *d0err, Double_t *dca, Double_t sigvert, Double_t dist12,Double_t dist23,Short_t charge) : AliAODRecoDecayHF(vtx2,3,charge,px,py,pz,d0,d0err), fSigmaVert(sigvert), fDist12toPrim(dist12), fDist23toPrim(dist23) { // // Constructor with AliAODVertex for decay vertex // SetDCAs(3,dca); } //-------------------------------------------------------------------------- AliAODRecoDecayHF3Prong::AliAODRecoDecayHF3Prong(AliAODVertex *vtx2, Double_t *d0,Double_t *d0err, Double_t *dca, Double_t sigvert, Double_t dist12,Double_t dist23, Short_t charge) : AliAODRecoDecayHF(vtx2,3,charge,d0,d0err), fSigmaVert(sigvert), fDist12toPrim(dist12), fDist23toPrim(dist23) { // // Constructor with AliAODVertex for decay vertex and without prongs momenta // SetDCAs(3,dca); } //-------------------------------------------------------------------------- AliAODRecoDecayHF3Prong::AliAODRecoDecayHF3Prong(const AliAODRecoDecayHF3Prong &source) : AliAODRecoDecayHF(source), fSigmaVert(source.fSigmaVert), fDist12toPrim(source.fDist12toPrim), fDist23toPrim(source.fDist23toPrim) { // // Copy constructor // } //-------------------------------------------------------------------------- AliAODRecoDecayHF3Prong &AliAODRecoDecayHF3Prong::operator=(const AliAODRecoDecayHF3Prong &source) { // // assignment operator // if(&source == this) return *this; AliAODRecoDecayHF::operator=(source); fDist12toPrim= source.fDist12toPrim; fDist23toPrim= source.fDist23toPrim; fSigmaVert= source.fSigmaVert; return *this; } //-------------------------------------------------------------------------- Bool_t AliAODRecoDecayHF3Prong::SelectDplus(const Double_t *cuts) const { // // This function compares the Dplus with a set of cuts: // // cuts[0] = inv. mass half width [GeV] // cuts[1] = pTK [GeV/c] // cuts[2] = pTPi [GeV/c] // cuts[3] = d0K [cm] lower limit! // cuts[4] = d0Pi [cm] lower limit! // cuts[5] = dist12 (cm) // cuts[6] = sigmavert (cm) // cuts[7] = dist prim-sec (cm) // cuts[8] = pM=Max{pT1,pT2,pT3} (GeV/c) // cuts[9] = cosThetaPoint // cuts[10] = Sum d0^2 (cm^2) // cuts[11] = dca cut (cm) // // If candidate Dplus does not pass the cuts return kFALSE // Double_t mDplusPDG = TDatabasePDG::Instance()->GetParticle(411)->Mass(); Double_t mDplus=InvMassDplus(); if(TMath::Abs(mDplus-mDplusPDG)>cuts[0])return kFALSE; //single track if(TMath::Abs(PtProng(1)) < cuts[1] || TMath::Abs(Getd0Prong(1))cuts[11])return kFALSE; //2track cuts if(fDist12toPrimcuts[6])return kFALSE; if(DecayLength()GetParticle(431)->Mass(); mDsKKpi=InvMassDsKKpi(); mDspiKK=InvMassDspiKK(); if(TMath::Abs(mDsKKpi-mDsPDG)>cuts[0]) okDsKKpi = 0; if(TMath::Abs(mDspiKK-mDsPDG)>cuts[0]) okDspiKK = 0; if(!okDsKKpi && !okDspiKK) return kFALSE; //single track if(TMath::Abs(PtProng(0)) < cuts[1] || TMath::Abs(Getd0Prong(0))GetParticle(333)->Mass(); Double_t mK0starPDG = TDatabasePDG::Instance()->GetParticle(313)->Mass(); if(okDsKKpi){ Double_t mass01phi=InvMass2Prongs(0,1,321,321); Double_t mass12K0s=InvMass2Prongs(1,2,321,211); if(TMath::Abs(mass01phi-mPhiPDG)cuts[11])return kFALSE; //2track cuts if(fDist12toPrimcuts[6])return kFALSE; if(DecayLength()GetParticle(4122)->Mass(); mLcpKpi=InvMassLcpKpi(); mLcpiKp=InvMassLcpiKp(); if(TMath::Abs(mLcpKpi-mLcPDG)>cuts[0]) okLcpKpi = 0; if(TMath::Abs(mLcpiKp-mLcPDG)>cuts[0]) okLcpiKp = 0; if(!okLcpKpi && !okLcpiKp) return kFALSE; //single track if(TMath::Abs(PtProng(0)) < cuts[1] || TMath::Abs(Getd0Prong(0))cuts[11])return kFALSE; //2track cuts if(fDist12toPrimcuts[6])return kFALSE; if(DecayLength()Boost(-bxPhi,-byPhi,-bzPhi); vecK1->Boost(vecK1Phiframe); vecK1Phiframe=vecK1->BoostVector(); TVector3 vecPiPhiframe; TLorentzVector* vecPi=new TLorentzVector(PxProng(indexPi),PyProng(indexPi),PzProng(indexPi),EProng(indexPi,211)); vecPi->Boost(-bxPhi,-byPhi,-bzPhi); vecPi->Boost(vecPiPhiframe); vecPiPhiframe=vecPi->BoostVector(); Double_t innera=vecPiPhiframe.Dot(vecK1Phiframe); Double_t norm1a=TMath::Sqrt(vecPiPhiframe.Dot(vecPiPhiframe)); Double_t norm2a=TMath::Sqrt(vecK1Phiframe.Dot(vecK1Phiframe)); Double_t cosK1PhiFrame=innera/(norm1a*norm2a); return cosK1PhiFrame; } //---------------------------------------------------------------------- Double_t AliAODRecoDecayHF3Prong::CosPiDsLabFrame(Int_t option) const { // computes cosine of angle between pi and Ds in the Ds rest frame Int_t indexPi; if (option==0){ //KKpi indexPi=2; }else{ //piKK indexPi=0; } Double_t bxD=Px()/E(431); Double_t byD=Py()/E(431); Double_t bzD=Pz()/E(431); TVector3 piDsframe; TLorentzVector* vecPi=new TLorentzVector(PxProng(indexPi),PyProng(indexPi),PzProng(indexPi),EProng(indexPi,211)); vecPi->Boost(-bxD,-byD,-bzD); vecPi->Boost(piDsframe); piDsframe=vecPi->BoostVector(); TVector3 vecDs(Px(),Py(),Pz()); Double_t inner=vecDs.Dot(piDsframe); Double_t norm1=TMath::Sqrt(vecDs.Dot(vecDs)); Double_t norm2=TMath::Sqrt(piDsframe.Dot(piDsframe)); Double_t cosPiDsFrame=inner/(norm1*norm2); return cosPiDsFrame; }