/************************************************************************** * Copyright(c) 1998-2010, 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. * **************************************************************************/ ///////////////////////////////////////////////////////////// // // Class for cuts on AOD reconstructed Lc->pKpi // // Author: A.Dainese, andrea.dainese@pd.infn.it ///////////////////////////////////////////////////////////// #include #include #include "AliRDHFCutsLctopKpi.h" #include "AliAODRecoDecayHF3Prong.h" #include "AliAODTrack.h" #include "AliESDtrack.h" ClassImp(AliRDHFCutsLctopKpi) //-------------------------------------------------------------------------- AliRDHFCutsLctopKpi::AliRDHFCutsLctopKpi(const char* name) : AliRDHFCuts(name) { // // Default Constructor // Int_t nvars=12; SetNVars(nvars); TString varNames[12]={"inv. mass [GeV]", "pTP [GeV/c]", "pTPi [GeV/c]", "d0P [cm] lower limit!", "d0Pi [cm] lower limit!", "dist12 (cm)", "sigmavert (cm)", "dist prim-sec (cm)", "pM=Max{pT1,pT2,pT3} (GeV/c)", "cosThetaPoint", "Sum d0^2 (cm^2)", "dca cut (cm)"}; Bool_t isUpperCut[12]={kTRUE, kFALSE, kFALSE, kFALSE, kFALSE, kFALSE, kTRUE, kFALSE, kFALSE, kFALSE, kFALSE, kTRUE}; SetVarNames(nvars,varNames,isUpperCut); Bool_t forOpt[12]={kFALSE, kFALSE, kFALSE, kFALSE, kFALSE, kFALSE, kTRUE, kTRUE, kTRUE, kTRUE, kTRUE, kFALSE}; SetVarsForOpt(5,forOpt); Float_t limits[2]={0,999999999.}; SetPtBins(2,limits); } //-------------------------------------------------------------------------- AliRDHFCutsLctopKpi::AliRDHFCutsLctopKpi(const AliRDHFCutsLctopKpi &source) : AliRDHFCuts(source) { // // Copy constructor // } //-------------------------------------------------------------------------- AliRDHFCutsLctopKpi &AliRDHFCutsLctopKpi::operator=(const AliRDHFCutsLctopKpi &source) { // // assignment operator // if(&source == this) return *this; AliRDHFCuts::operator=(source); return *this; } //--------------------------------------------------------------------------- void AliRDHFCutsLctopKpi::GetCutVarsForOpt(AliAODRecoDecayHF *d,Float_t *vars,Int_t nvars,Int_t *pdgdaughters) { // // Fills in vars the values of the variables // if(nvars!=fnVarsForOpt) { printf("AliRDHFCutsLctopKpi::GetCutsVarsForOpt: wrong number of variables\n"); return; } AliAODRecoDecayHF3Prong *dd = (AliAODRecoDecayHF3Prong*)d; Int_t iter=-1; if(fVarsForOpt[0]){ iter++; vars[iter]=dd->InvMassLcpKpi(); } if(fVarsForOpt[1]){ iter++; for(Int_t iprong=0;iprong<3;iprong++){ if(TMath::Abs(pdgdaughters[iprong])==2212) { vars[iter]=dd->PtProng(iprong); } } } if(fVarsForOpt[2]){ iter++; for(Int_t iprong=0;iprong<3;iprong++){ if(TMath::Abs(pdgdaughters[iprong])==211) { vars[iter]=dd->PtProng(iprong); } } } if(fVarsForOpt[3]){ iter++; for(Int_t iprong=0;iprong<3;iprong++){ if(TMath::Abs(pdgdaughters[iprong])==2212) { vars[iter]=dd->Getd0Prong(iprong); } } } if(fVarsForOpt[4]){ iter++; for(Int_t iprong=0;iprong<3;iprong++){ if(TMath::Abs(pdgdaughters[iprong])==211) { vars[iter]=dd->Getd0Prong(iprong); } } } if(fVarsForOpt[5]){ iter++; vars[iter]=dd->GetDist12toPrim(); } if(fVarsForOpt[6]){ iter++; vars[iter]=dd->GetSigmaVert(); } if(fVarsForOpt[7]){ iter++; vars[iter] = dd->DecayLength(); } if(fVarsForOpt[8]){ iter++; Float_t ptmax=0; for(Int_t i=0;i<3;i++){ if(dd->PtProng(i)>ptmax)ptmax=dd->PtProng(i); } vars[iter]=ptmax; } if(fVarsForOpt[9]){ iter++; vars[iter]=dd->CosPointingAngle(); } if(fVarsForOpt[10]){ iter++; vars[iter]=dd->Getd0Prong(0)*dd->Getd0Prong(0)+dd->Getd0Prong(1)*dd->Getd0Prong(1)+dd->Getd0Prong(2)*dd->Getd0Prong(2); } if(fVarsForOpt[11]){ iter++; vars[iter]=dd->GetDCA(); } return; } //--------------------------------------------------------------------------- Int_t AliRDHFCutsLctopKpi::IsSelected(TObject* obj,Int_t selectionLevel) { // // Apply selection // if(!fCutsRD){ cout<<"Cut matrice not inizialized. Exit..."<Pt(); Int_t ptbin=PtBin(pt); Double_t mLcpKpi,mLcpiKp; Int_t okLcpKpi=1,okLcpiKp=1; Double_t mLcPDG = TDatabasePDG::Instance()->GetParticle(4122)->Mass(); mLcpKpi=d->InvMassLcpKpi(); mLcpiKp=d->InvMassLcpiKp(); if(TMath::Abs(mLcpKpi-mLcPDG)>fCutsRD[GetGlobalIndex(0,ptbin)]) okLcpKpi = 0; if(TMath::Abs(mLcpiKp-mLcPDG)>fCutsRD[GetGlobalIndex(0,ptbin)]) okLcpiKp = 0; if(!okLcpKpi && !okLcpiKp) return 0; if(TMath::Abs(d->PtProng(1)) < fCutsRD[GetGlobalIndex(1,ptbin)] || TMath::Abs(d->Getd0Prong(1))PtProng(0)) < fCutsRD[GetGlobalIndex(2,ptbin)] || TMath::Abs(d->Getd0Prong(0))PtProng(2)) < fCutsRD[GetGlobalIndex(2,ptbin)] || TMath::Abs(d->Getd0Prong(2))GetDist12toPrim()GetDist23toPrim()Getd0Prong(0)*d->Getd0Prong(1)<0. && d->Getd0Prong(2)*d->Getd0Prong(1)<0.) return 0; //sec vert if(d->GetSigmaVert()>fCutsRD[GetGlobalIndex(6,ptbin)]) return 0; if(d->DecayLength()PtProng(0))PtProng(1))PtProng(2))CosPointingAngle()< fCutsRD[GetGlobalIndex(9,ptbin)]) return 0; Double_t sum2=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2); if(sum2GetDCA(i)>fCutsRD[GetGlobalIndex(11,ptbin)]) return 0; if(okLcpKpi) returnvalue=1; //cuts passed as Lc->pKpi if(okLcpiKp) returnvalue=2; //cuts passed as Lc->piKp if(okLcpKpi && okLcpiKp) returnvalue=3; //cuts passed as both pKpi and piKp } return returnvalue; } //---------------------------------------------------------------------------