Added cuts for Ds and Lc
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 30 Apr 2008 12:52:33 +0000 (12:52 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 30 Apr 2008 12:52:33 +0000 (12:52 +0000)
PWG3/vertexingHF/AliAODRecoDecayHF3Prong.cxx
PWG3/vertexingHF/AliAODRecoDecayHF3Prong.h
PWG3/vertexingHF/AliAnalysisVertexingHF.cxx
PWG3/vertexingHF/AliAnalysisVertexingHF.h

index ab6eeb0..10d08d8 100644 (file)
@@ -177,9 +177,21 @@ Bool_t AliAODRecoDecayHF3Prong::SelectDplus(const Double_t *cuts)
 Bool_t AliAODRecoDecayHF3Prong::SelectDs(const Double_t *cuts,Int_t &okDsKKpi,Int_t &okDspiKK)
   const {
 //
-// This function compares the Ds with a set of cuts (only mass at the moment)
+// This function compares the Ds with a set of cuts 
+// (same variables as D+, for now)
 //
 // 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 Ds does not pass the cuts return kFALSE
 //
@@ -195,15 +207,49 @@ Bool_t AliAODRecoDecayHF3Prong::SelectDs(const Double_t *cuts,Int_t &okDsKKpi,In
   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))<cuts[3])return kFALSE;//Kaon1
+  if(TMath::Abs(PtProng(1)) < cuts[1] || TMath::Abs(Getd0Prong(1))<cuts[3])return kFALSE;//Kaon2
+  if(TMath::Abs(PtProng(2)) < cuts[2] || TMath::Abs(Getd0Prong(2))<cuts[4])return kFALSE;//Pion2
+
+  //DCA
+  for(Int_t i=0;i<3;i++) if(cuts[11]>0 && GetDCA(i)>cuts[11])return kFALSE;
+
+  //2track cuts
+  if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE;
+  if(Getd0Prong(0)*Getd0Prong(1)<0. && Getd0Prong(2)*Getd0Prong(1)<0.)return kFALSE;
+
+  //sec vert
+  if(fSigmaVert>cuts[6])return kFALSE;
+
+  if(DecayLength()<cuts[7])return kFALSE;
+
+  if(TMath::Abs(PtProng(0))<cuts[8] && TMath::Abs(PtProng(1))<cuts[8] && TMath::Abs(PtProng(2))<cuts[8])return kFALSE;
+  if(CosPointingAngle()   < cuts[9])return kFALSE;
+  Double_t sum2=Getd0Prong(0)*Getd0Prong(0)+Getd0Prong(1)*Getd0Prong(1)+Getd0Prong(2)*Getd0Prong(2);
+  if(sum2<cuts[10])return kFALSE;
+
   return kTRUE;
 }
 //--------------------------------------------------------------------------
 Bool_t AliAODRecoDecayHF3Prong::SelectLc(const Double_t *cuts,Int_t &okLcpKpi,Int_t &okLcpiKp)
   const {
 //
-// This function compares the Lc with a set of cuts (only mass at the moment)
+// This function compares the Lc with a set of cuts 
+// (same variables as D+, for now)
 //
 // cuts[0] = inv. mass half width [GeV]   
+// cuts[1] = pTP [GeV/c]
+// cuts[2] = pTPi and pTK [GeV/c]
+// cuts[3] = d0P [cm]   lower limit!
+// cuts[4] = d0Pi and d0K [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 Lc does not pass the cuts return kFALSE
 //
@@ -219,5 +265,27 @@ Bool_t AliAODRecoDecayHF3Prong::SelectLc(const Double_t *cuts,Int_t &okLcpKpi,In
   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[3])return kFALSE;//Proton
+  if(TMath::Abs(PtProng(1)) < cuts[2] || TMath::Abs(Getd0Prong(1))<cuts[4])return kFALSE;//Kaon
+  if(TMath::Abs(PtProng(2)) < cuts[2] || TMath::Abs(Getd0Prong(2))<cuts[4])return kFALSE;//Pion
+
+  //DCA
+  for(Int_t i=0;i<3;i++) if(cuts[11]>0 && GetDCA(i)>cuts[11])return kFALSE;
+
+  //2track cuts
+  if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE;
+  if(Getd0Prong(0)*Getd0Prong(1)<0. && Getd0Prong(2)*Getd0Prong(1)<0.)return kFALSE;
+
+  //sec vert
+  if(fSigmaVert>cuts[6])return kFALSE;
+
+  if(DecayLength()<cuts[7])return kFALSE;
+
+  if(TMath::Abs(PtProng(0))<cuts[8] && TMath::Abs(PtProng(1))<cuts[8] && TMath::Abs(PtProng(2))<cuts[8])return kFALSE;
+  if(CosPointingAngle()   < cuts[9])return kFALSE;
+  Double_t sum2=Getd0Prong(0)*Getd0Prong(0)+Getd0Prong(1)*Getd0Prong(1)+Getd0Prong(2)*Getd0Prong(2);
+  if(sum2<cuts[10])return kFALSE;
+
   return kTRUE;
 }
index 61e0ce9..31b9a14 100644 (file)
@@ -58,7 +58,7 @@ class AliAODRecoDecayHF3Prong : public AliAODRecoDecayHF {
   Double_t InvMassDsKKpi() const {UInt_t pdg[3]={321,321,211};return InvMass(3,pdg);}
   Double_t InvMassDspiKK() const {UInt_t pdg[3]={211,321,321};return InvMass(3,pdg);}
   Bool_t   SelectDs(const Double_t* cuts,Int_t &okDsKKpi,Int_t &okDspiKK) 
-    const; // only mass cut
+    const; // same variables as D+, for now
 
   // Lambdac+->pKpi
   Double_t ELc() const {return E(4122);} 
@@ -69,7 +69,7 @@ class AliAODRecoDecayHF3Prong : public AliAODRecoDecayHF {
   Double_t InvMassLcpKpi() const {UInt_t pdg[3]={2212,321,211};return InvMass(3,pdg);}
   Double_t InvMassLcpiKp() const {UInt_t pdg[3]={211,321,2212};return InvMass(3,pdg);}
   Bool_t   SelectLc(const Double_t* cuts,Int_t &okLcpKpi,Int_t &okLcpiKp) 
-    const;// only mass cut
+    const; // same variables as D+, for now
 
  private:
 
index d71e3cf..1d923e6 100644 (file)
@@ -94,8 +94,8 @@ fMind0rphiCut(source.fMind0rphiCut)
   for(Int_t i=0; i<9; i++)  fD0toKpiCuts[i]=source.fD0toKpiCuts[i];
   for(Int_t i=0; i<9; i++)  fBtoJPSICuts[i]=source.fBtoJPSICuts[i];
   for(Int_t i=0; i<12; i++) fDplusCuts[i]=source.fDplusCuts[i];
-  for(Int_t i=0; i<1; i++)  fDsCuts[i]=source.fDsCuts[i];
-  for(Int_t i=0; i<1; i++)  fLcCuts[i]=source.fLcCuts[i];
+  for(Int_t i=0; i<12; i++)  fDsCuts[i]=source.fDsCuts[i];
+  for(Int_t i=0; i<12; i++)  fLcCuts[i]=source.fLcCuts[i];
 }
 //--------------------------------------------------------------------------
 AliAnalysisVertexingHF &AliAnalysisVertexingHF::operator=(const AliAnalysisVertexingHF &source)
@@ -124,8 +124,8 @@ AliAnalysisVertexingHF &AliAnalysisVertexingHF::operator=(const AliAnalysisVerte
   for(Int_t i=0; i<9; i++)  fD0toKpiCuts[i]=source.fD0toKpiCuts[i];
   for(Int_t i=0; i<9; i++)  fBtoJPSICuts[i]=source.fBtoJPSICuts[i];
   for(Int_t i=0; i<12; i++) fDplusCuts[i]=source.fDplusCuts[i];
-  for(Int_t i=0; i<1; i++)  fDsCuts[i]=source.fDsCuts[i];
-  for(Int_t i=0; i<1; i++)  fLcCuts[i]=source.fLcCuts[i];
+  for(Int_t i=0; i<12; i++)  fDsCuts[i]=source.fDsCuts[i];
+  for(Int_t i=0; i<12; i++)  fLcCuts[i]=source.fLcCuts[i];
 
   return *this;
 }
@@ -745,7 +745,7 @@ void AliAnalysisVertexingHF::FindCandidates(AliESDEvent *esd,TTree *treeout[])
   }
   if(f3Prong) {
     printf(" Charm->3Prong: event %d = %d; total = %d;\n",
-          (Int_t)esd->GetEventNumberInFile(),
+   (Int_t)esd->GetEventNumberInFile(),
           (Int_t)treeout[itree3Prong]->GetEntries()-initEntries3Prong,
           (Int_t)treeout[itree3Prong]->GetEntries());
   }
@@ -1165,7 +1165,6 @@ AliESDVertex* AliAnalysisVertexingHF::OwnPrimaryVertex(Int_t ntrks,
       esdTrack = new AliESDtrack(*t);
       rmArray.AddLast(esdTrack);
       rmId[i]=(UShort_t)esdTrack->GetID();
-      delete esdTrack;
     }
     Float_t diamondxy[2]={esd->GetDiamondX(),esd->GetDiamondY()};
     ownPrimVertex = vertexer1->RemoveTracksFromVertex(fV1,&rmArray,rmId,diamondxy);
@@ -1235,6 +1234,32 @@ void AliAnalysisVertexingHF::PrintStatus() const {
     printf("    dca cut [cm]  < %f\n",fDplusCuts[11]);
     printf("  Ds->KKpi cuts:\n");
     printf("    |M-MDs| [GeV]    < %f\n",fDsCuts[0]);
+    printf("    pTK     [GeV/c]    > %f\n",fDplusCuts[1]);
+    printf("    pTPi    [GeV/c]    > %f\n",fDplusCuts[2]);
+    printf("    |d0K|  [cm]  > %f\n",fDplusCuts[3]);
+    printf("    |d0Pi| [cm]  > %f\n",fDplusCuts[4]);
+    printf("    dist12    [cm]  < %f\n",fDplusCuts[5]);
+    printf("    sigmavert [cm]   < %f\n",fDplusCuts[6]);
+    printf("    dist prim-sec [cm] > %f\n",fDplusCuts[7]);
+    printf("    pM=Max{pT1,pT2,pT3} [GeV/c] > %f\n",fDplusCuts[8]);
+    printf("    cosThetaPoint    > %f\n",fDplusCuts[9]);
+    printf("    Sum d0^2 [cm^2]  > %f\n",fDplusCuts[10]);
+    printf("    dca cut [cm]  < %f\n",fDplusCuts[11]);
+    printf("  Lc->pKpi cuts:\n");
+    printf("    |M-MLc| [GeV]    < %f\n",fLcCuts[0]);
+    printf("    pTP     [GeV/c]    > %f\n",fDplusCuts[1]);
+    printf("    pTPi and pTK [GeV/c]    > %f\n",fDplusCuts[2]);
+    printf("    |d0P|  [cm]  > %f\n",fDplusCuts[3]);
+    printf("    |d0Pi| and |d0K| [cm]  > %f\n",fDplusCuts[4]);
+    printf("    dist12    [cm]  < %f\n",fDplusCuts[5]);
+    printf("    sigmavert [cm]   < %f\n",fDplusCuts[6]);
+    printf("    dist prim-sec [cm] > %f\n",fDplusCuts[7]);
+    printf("    pM=Max{pT1,pT2,pT3} [GeV/c] > %f\n",fDplusCuts[8]);
+    printf("    cosThetaPoint    > %f\n",fDplusCuts[9]);
+    printf("    Sum d0^2 [cm^2]  > %f\n",fDplusCuts[10]);
+    printf("    dca cut [cm]  < %f\n",fDplusCuts[11]);
+    printf("  Ds->KKpi cuts:\n");
+    printf("    |M-MDs| [GeV]    < %f\n",fDsCuts[0]);
     printf("  Lc->pKpi cuts:\n");
     printf("    |M-MD+| [GeV]    < %f\n",fLcCuts[0]);
   }
@@ -1444,36 +1469,66 @@ void AliAnalysisVertexingHF::SetDplusCuts(const Double_t cuts[12])
   return;
 }
 //-----------------------------------------------------------------------------
-void AliAnalysisVertexingHF::SetDsCuts(Double_t cut0)
+void AliAnalysisVertexingHF::SetDsCuts(Double_t cut0,Double_t cut1,
+                                  Double_t cut2,Double_t cut3,Double_t cut4,
+                                  Double_t cut5,Double_t cut6,
+                                  Double_t cut7,Double_t cut8,
+                                  Double_t cut9,Double_t cut10,Double_t cut11)
 {
   // Set the cuts for Ds->KKpi selection
   fDsCuts[0] = cut0;
+  fDsCuts[1] = cut1;
+  fDsCuts[2] = cut2;
+  fDsCuts[3] = cut3;
+  fDsCuts[4] = cut4;
+  fDsCuts[5] = cut5;
+  fDsCuts[6] = cut6;
+  fDsCuts[7] = cut7;
+  fDsCuts[8] = cut8;
+  fDsCuts[9] = cut9;
+  fDsCuts[10] = cut10;
+  fDsCuts[11] = cut11;
 
   return;
 }
 //-----------------------------------------------------------------------------
-void AliAnalysisVertexingHF::SetDsCuts(const Double_t cuts[1]) 
+void AliAnalysisVertexingHF::SetDsCuts(const Double_t cuts[12]) 
 {
   // Set the cuts for Ds->KKpi selection
 
-  for(Int_t i=0; i<1; i++) fDsCuts[i] = cuts[i];
+  for(Int_t i=0; i<12; i++) fDsCuts[i] = cuts[i];
 
   return;
 }
 //-----------------------------------------------------------------------------
-void AliAnalysisVertexingHF::SetLcCuts(Double_t cut0)
+void AliAnalysisVertexingHF::SetLcCuts(Double_t cut0,Double_t cut1,
+                                  Double_t cut2,Double_t cut3,Double_t cut4,
+                                  Double_t cut5,Double_t cut6,
+                                  Double_t cut7,Double_t cut8,
+                                  Double_t cut9,Double_t cut10,Double_t cut11)
 {
   // Set the cuts for Lc->pKpi selection
   fLcCuts[0] = cut0;
+  fLcCuts[1] = cut1;
+  fLcCuts[2] = cut2;
+  fLcCuts[3] = cut3;
+  fLcCuts[4] = cut4;
+  fLcCuts[5] = cut5;
+  fLcCuts[6] = cut6;
+  fLcCuts[7] = cut7;
+  fLcCuts[8] = cut8;
+  fLcCuts[9] = cut9;
+  fLcCuts[10] = cut10;
+  fLcCuts[11] = cut11;
 
   return;
 }
 //-----------------------------------------------------------------------------
-void AliAnalysisVertexingHF::SetLcCuts(const Double_t cuts[1]) 
+void AliAnalysisVertexingHF::SetLcCuts(const Double_t cuts[12]) 
 {
   // Set the cuts for Lc->pKpi selection
 
-  for(Int_t i=0; i<1; i++) fLcCuts[i] = cuts[i];
+  for(Int_t i=0; i<12; i++) fLcCuts[i] = cuts[i];
 
   return;
 }
index 6661b97..e0edcd6 100644 (file)
@@ -97,10 +97,21 @@ class AliAnalysisVertexingHF : public TNamed {
                    Double_t cut9=-1.1,Double_t cut10=0.,
                    Double_t cut11=0.); 
   void SetDplusCuts(const Double_t cuts[12]); 
-  void SetDsCuts(Double_t cut0=0.); 
-  void SetDsCuts(const Double_t cuts[1]); 
-  void SetLcCuts(Double_t cut0=0.); 
-  void SetLcCuts(const Double_t cuts[1]); 
+  void SetDsCuts(Double_t cut0=1000.,Double_t cut1=0.,
+               Double_t cut2=0.,Double_t cut3=0.,Double_t cut4=0.,
+               Double_t cut5=0.,Double_t cut6=10000000000.,
+               Double_t cut7=0.,Double_t cut8=0.,
+               Double_t cut9=-1.1,Double_t cut10=0.,
+               Double_t cut11=0.); 
+  void SetDsCuts(const Double_t cuts[12]); 
+  void SetLcCuts(Double_t cut0=1000.,Double_t cut1=0.,
+                Double_t cut2=0.,Double_t cut3=0.,Double_t cut4=0.,
+                Double_t cut5=0.,Double_t cut6=10000000000.,
+                Double_t cut7=0.,Double_t cut8=0.,
+                Double_t cut9=-1.1,Double_t cut10=0.,
+                Double_t cut11=0.); 
+  void SetLcCuts(const Double_t cuts[12]); 
+
   //
  private:
   //
@@ -155,7 +166,7 @@ class AliAnalysisVertexingHF : public TNamed {
                           // 7 = d0d0 [cm^2]
                           // 8 = cosThetaPoint
   Double_t fDplusCuts[12]; // cuts on Dplus candidates
-                  // (to be passed to AliAODRecoDecayHF2Prong::SelectDplus())
+                  // (to be passed to AliAODRecoDecayHF3Prong::SelectDplus())
                           // 0 = inv. mass half width [GeV]   
                           // 1 = pTK [GeV/c]
                           // 2 = pTPi [GeV/c]
@@ -168,13 +179,34 @@ class AliAnalysisVertexingHF : public TNamed {
                           // 9 = cosThetaPoint
                           // 10 = Sum d0^2 (cm^2)
                           // 11 = dca cut (cm)
-  Double_t fDsCuts[1]; // cuts on Ds candidates
-                       // (to be passed to AliAODRecoDecayHF2Prong::SelectDs())
-                       // 0 = inv. mass half width [GeV]   
-  Double_t fLcCuts[1]; // cuts on Lambdac candidates
-                       // (to be passed to AliAODRecoDecayHF2Prong::SelectLc())
-                       // 0 = inv. mass half width [GeV]   
-
+  Double_t fDsCuts[12]; // cuts on Ds candidates
+                        // (to be passed to AliAODRecoDecayHF3Prong::SelectDs())
+                        // 0 = inv. mass half width [GeV]   
+                        // 1 = pTK [GeV/c]
+                        // 2 = pTPi [GeV/c]
+                        // 3 = d0K [cm]   lower limit!
+                        // 4 = d0Pi [cm]  lower limit!
+                        // 5 = dist12 (cm)
+                        // 6 = sigmavert (cm)
+                        // 7 = dist prim-sec (cm)
+                        // 8 = pM=Max{pT1,pT2,pT3} (GeV/c)
+                        // 9 = cosThetaPoint
+                        // 10 = Sum d0^2 (cm^2)
+                        // 11 = dca cut (cm)
+  Double_t fLcCuts[12]; // cuts on Lambdac candidates
+                        // (to be passed to AliAODRecoDecayHF3Prong::SelectLc())
+                        // 0 = inv. mass half width [GeV]   
+                        // 1 = pTP [GeV/c]
+                        // 2 = pTPi abd pTK [GeV/c]
+                        // 3 = d0P [cm]   lower limit!
+                        // 4 = d0Pi and d0K [cm]  lower limit!
+                        // 5 = dist12 (cm)
+                        // 6 = sigmavert (cm)
+                        // 7 = dist prim-sec (cm)
+                        // 8 = pM=Max{pT1,pT2,pT3} (GeV/c)
+                        // 9 = cosThetaPoint
+                        // 10 = Sum d0^2 (cm^2)
+                        // 11 = dca cut (cm)
   //
   AliESDVertex* OwnPrimaryVertex(Int_t ntrks,TObjArray *trkArray,AliESDEvent *esd) const;
   Bool_t SelectInvMass(Int_t decay,Int_t nprongs,