+
+ //------------------------------------------------
+ // Jai Salzwedel's femto-cut: better V0 exists
+ //------------------------------------------------
+
+ fTreeCascVarDeltaDCA = -100;
+ Float_t DCAV0DaughtersDiff = -100;
+ for (Int_t iv0=0; iv0<lESDevent->GetNumberOfV0s(); iv0++) {
+ AliESDv0 *v0 = lESDevent->GetV0(iv0);
+ UInt_t posV0TrackIdx = (UInt_t) v0->GetPindex();
+ UInt_t negV0TrackIdx = (UInt_t) v0->GetNindex();
+ if ((posV0TrackIdx == lIdxPosXi) && (negV0TrackIdx == lIdxNegXi)) continue;
+ // if both tracks are the same ones as the cascades V0 daughter tracks, then the V0 belongs to the cascade being analysed; so avoid it
+ if ((posV0TrackIdx == lIdxPosXi) || (negV0TrackIdx == lIdxNegXi)) {
+ DCAV0DaughtersDiff = lDcaV0DaughtersXi - v0->GetDcaV0Daughters();
+ if( fTreeCascVarDeltaDCA < DCAV0DaughtersDiff ) fTreeCascVarDeltaDCA = DCAV0DaughtersDiff;
+ if ( lDcaV0DaughtersXi > v0->GetDcaV0Daughters() ) { // DCA comparison criterion
+ fTreeCascVarBadCascadeJai = kTRUE;
+ } //end DCA comparison
+ } // end shares a daughter check
+ } //end V0 loop