Fixes for Lc->v0+X and DStar (Francesco, Rossella)
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Nov 2011 21:24:00 +0000 (21:24 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Nov 2011 21:24:00 +0000 (21:24 +0000)
PWG3/vertexingHF/AliAnalysisVertexingHF.cxx
PWG3/vertexingHF/AliRDHFCutsDStartoKpipi.cxx
PWG3/vertexingHF/AliRDHFCutsLctoV0.cxx

index f7ddab1..eb1804c 100644 (file)
@@ -563,7 +563,6 @@ void AliAnalysisVertexingHF::FindCandidates(AliVEvent *event,
        // Fill in the object array to create the cascade
        twoTrackArrayCasc->AddAt(postrack1,0);
        twoTrackArrayCasc->AddAt(trackV0,1);
-
        // Compute the cascade vertex
        AliAODVertex *vertexCasc = 0;
        if(fFindVertexForCascades) {  
@@ -1357,8 +1356,15 @@ AliAODRecoCascadeHF* AliAnalysisVertexingHF::MakeCascade(
   //--- selection cuts
   //
   AliAODRecoCascadeHF *tmpCascade = new AliAODRecoCascadeHF(*theCascade);
-  tmpCascade->GetSecondaryVtx()->AddDaughter(trackPi);
+  if(fInputAOD){
+    Int_t idSoftPi=(Int_t)trackPi->GetID();
+    AliAODTrack* trackPiAOD=(AliAODTrack*)event->GetTrack(fAODMap[idSoftPi]);
+    tmpCascade->GetSecondaryVtx()->AddDaughter(trackPiAOD);
+  }else{
+    tmpCascade->GetSecondaryVtx()->AddDaughter(trackPi);
+  }
   tmpCascade->GetSecondaryVtx()->AddDaughter(rd2Prong);
+
   AliAODVertex *primVertexAOD=0;
   if(!fRecoPrimVtxSkippingTrks && !fRmTrksFromPrimVtx) {
     // take event primary vertex
@@ -1414,9 +1420,17 @@ AliAODRecoCascadeHF* AliAnalysisVertexingHF::MakeCascade(
 
   //--- selection cuts
   //
+
   AliAODRecoCascadeHF *tmpCascade = new AliAODRecoCascadeHF(*theCascade);  
-  tmpCascade->GetSecondaryVtx()->AddDaughter(trackBachelor);
+  if(fInputAOD){
+    Int_t idBachelor=(Int_t)trackBachelor->GetID();
+    AliAODTrack* trackBachelorAOD=(AliAODTrack*)event->GetTrack(fAODMap[idBachelor]);
+    tmpCascade->GetSecondaryVtx()->AddDaughter(trackBachelorAOD);
+  }else{
+    tmpCascade->GetSecondaryVtx()->AddDaughter(trackBachelor);
+  }
   tmpCascade->GetSecondaryVtx()->AddDaughter(v0);
+  
   AliAODVertex *primVertexAOD=0;
   if(!fRecoPrimVtxSkippingTrks && !fRmTrksFromPrimVtx) {
     // take event primary vertex
@@ -1424,7 +1438,7 @@ AliAODRecoCascadeHF* AliAnalysisVertexingHF::MakeCascade(
     if(!primVertexAOD) primVertexAOD = (AliAODVertex*)event->GetPrimaryVertex(); 
     tmpCascade->SetOwnPrimaryVtx(primVertexAOD);
   }
-
+  
   // select Cascades
   if(fCascades && fInputAOD){
     okCascades = (Bool_t)fCutsLctoV0->IsSelected(tmpCascade,AliRDHFCuts::kCandidate);
@@ -1475,6 +1489,7 @@ AliAODRecoDecayHF2Prong *AliAnalysisVertexingHF::Make2Prong(
   if(!okMassCut && fD0toKpi)   if(SelectInvMassAndPt(0,2,px,py,pz)) okMassCut=kTRUE;
   if(!okMassCut && fJPSItoEle) if(SelectInvMassAndPt(1,2,px,py,pz)) okMassCut=kTRUE;
   if(!okMassCut && fDstar)     if(SelectInvMassAndPt(3,2,px,py,pz)) okMassCut=kTRUE;
+  if(!okMassCut && fCascades)  if(SelectInvMassAndPt(5,2,px,py,pz)) okMassCut=kTRUE;
   if(!okMassCut) {
     //AliDebug(2," candidate didn't pass mass cut");
     return 0x0;    
@@ -2154,6 +2169,16 @@ Bool_t AliAnalysisVertexingHF::SelectInvMassAndPt(Int_t decay,
       minv = fMassCalc4->InvMass(nprongs,pdg4);
       if(TMath::Abs(minv-mPDG)<fCutsD0toKpipipi->GetMassCut()) retval=kTRUE;
       break;
+    case 5:
+      fMassCalc2->SetPxPyPzProngs(nprongs,px,py,pz);
+      mPDG=TDatabasePDG::Instance()->GetParticle(4122)->Mass();
+      pdg2[0]=2212;pdg2[1]=310;
+      minv=fMassCalc2->InvMass(2,pdg2);
+      if(TMath::Abs(minv-mPDG)<fCutsLctoV0->GetMassCut()) retval=kTRUE;
+      pdg2[0]=211;pdg2[1]=3122;
+      minv=fMassCalc2->InvMass(2,pdg2);
+      if(TMath::Abs(minv-mPDG)<fCutsLctoV0->GetMassCut()) retval=kTRUE;
+      break;
     default:
       printf("SelectInvMassAndPt(): wrong decay selection\n");
       break;
index 16ed086..acf7b62 100644 (file)
@@ -278,7 +278,9 @@ Int_t AliRDHFCutsDStartoKpipi::IsSelected(TObject* obj,Int_t selectionLevel) {
   if(dd->HasBadDaughters()) return 0;
 
   AliAODTrack *b = (AliAODTrack*)d->GetBachelor();
-
+  if(fTrackCutsSoftPi->GetRequireTPCRefit()){
+    if(!(b->TestFilterMask(BIT(4)))) return 0;
+  }
   
   Int_t returnvalue=1;
   Int_t returnvaluePID=3;
index b6eb1c5..03851a6 100644 (file)
@@ -194,7 +194,6 @@ Int_t AliRDHFCutsLctoV0::IsSelected(TObject* obj,Int_t selectionLevel) {
     return 0;
   }
 
-  if(d->HasBadDaughters()) return 0;
 
   // selection on daughter tracks 
   if(selectionLevel==AliRDHFCuts::kAll || 
@@ -205,6 +204,7 @@ Int_t AliRDHFCutsLctoV0::IsSelected(TObject* obj,Int_t selectionLevel) {
 
   // Get the v0 and all daughter tracks
   AliAODTrack *bachelor_track = d->GetBachelor();
+  if(!(bachelor_track->TestFilterMask(BIT(4)))) return 0;
   AliAODv0 *v0 = d->Getv0();
   AliAODTrack *v0positive_track = d->Getv0PositiveTrack();
   AliAODTrack *v0negative_track = d->Getv0NegativeTrack();