]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGLF/RESONANCES/AliRsnCutDaughterD0.cxx
Merge remote-tracking branch 'origin/master' into mergingFlat
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnCutDaughterD0.cxx
index a76ceac0c9b1cd93356ea3102238154a3ab14a33..9a1211d1b0855d7a6a5e4d9b9d2fa75710da7da9 100644 (file)
@@ -18,30 +18,33 @@ ClassImp(AliRsnCutDaughterD0)
 AliRsnCutDaughterD0::AliRsnCutDaughterD0(const char *name, AliPID::EParticleType pid) :
 AliRsnCut(name, AliRsnTarget::kDaughter),
   fNoPID(kFALSE),
-  fPtDepPIDCut(kFALSE),
+  //fIsCheckOnMother(kFALSE),
   fPID(pid),
   fCutQuality(Form("%sQuality", name)),
   fPionTPCPIDCut(3.0),
   fKaonTPCPIDCut(3.0),
   fPionTOFPIDCut(3.0),
-  fKaonTOFPIDCut(3.0)
+  fKaonTOFPIDCut(3.0),
+  fPtDepPIDCut(kFALSE) 
 {
   //
   // Constructor
-  // Initialize track quality cuts to 2010 defaults
+  // 
   //
   fCutQuality.SetPtRange(0.15, 1E+20);
   fCutQuality.SetEtaRange(-0.8, 0.8);
-  fCutQuality.SetDCARPtFormula("0.0105+0.0350/pt^1.1");
+  fCutQuality.SetDCARPtFormula("");
   fCutQuality.SetDCARmin(0.0);
   fCutQuality.SetDCAZmax(2.0);
-  fCutQuality.SetSPDminNClusters(1);
+  fCutQuality.SetSPDminNClusters(0);
   fCutQuality.SetITSminNClusters(0);
   fCutQuality.SetITSmaxChi2(1E+20);
-  fCutQuality.SetTPCminNClusters(70);
-  fCutQuality.SetTPCmaxChi2(4.0);
+  fCutQuality.SetTPCminNClusters(0);
+  fCutQuality.SetMinNCrossedRowsTPC(0,kTRUE);
+  fCutQuality.SetMinNCrossedRowsOverFindableClsTPC(0.00,kTRUE);
+  fCutQuality.SetTPCmaxChi2(1E20);
   fCutQuality.SetRejectKinkDaughters();
-  fCutQuality.SetAODTestFilterBit(5);
+  fCutQuality.SetAODTestFilterBit(-1);
 }
 
 //__________________________________________________________________________________________________
@@ -53,6 +56,9 @@ Bool_t AliRsnCutDaughterD0::IsSelected(TObject *obj)
 
   // coherence check
   if (!TargetOK(obj)) return kFALSE;
+  
+  // if this class is used to check the mothers in the acceptance, accept (will be applied only selection on min pt and eta)
+  //if (fIsCheckOnMother) return kTRUE;
 
   // check track
   AliVTrack *track = dynamic_cast<AliVTrack *>(fDaughter->GetRef());
@@ -73,6 +79,7 @@ Bool_t AliRsnCutDaughterD0::IsSelected(TObject *obj)
   // if no PID is required, accept
   if (fNoPID) return kTRUE;
   
+  
   // check initialization of PID object
   AliPIDResponse *pid = fEvent->GetPIDResponse();
   if (!pid) {
@@ -80,9 +87,10 @@ Bool_t AliRsnCutDaughterD0::IsSelected(TObject *obj)
     return kFALSE;
   }
   
-  AliDebugClass(2, "Checking TOF Matching..."); 
-  // check if TOF is matched
+  AliDebugClass(2, "Checking TPC and TOF Matching..."); 
+  // check if TPC and TOF are matched
   // and computes all values used in the PID cut
+  Bool_t   isTPC  = MatchTPC(track);
   Bool_t   isTOF  = MatchTOF(track);   
   AliDebugClass(2, "...passed");
    
@@ -96,24 +104,25 @@ Bool_t AliRsnCutDaughterD0::IsSelected(TObject *obj)
 
   if(!fPtDepPIDCut){
     // applies the cut differently depending on the PID and the momentum
-    if (isTOF) {
+    if (isTPC && isTOF) {
       if (fPID == AliPID::kPion) {maxTPC = fPionTPCPIDCut; maxTOF = fPionTOFPIDCut;}
       if (fPID == AliPID::kKaon) {maxTPC = fKaonTPCPIDCut; maxTOF = fKaonTOFPIDCut;}
       return (nsTPC <= maxTPC && nsTOF <= maxTOF);
-    } else {
+    } else if (isTPC){
       if (fPID == AliPID::kPion) maxTPC = fPionTPCPIDCut;
       if (fPID == AliPID::kKaon) maxTPC = fKaonTPCPIDCut;
       return (nsTPC <= maxTPC); 
     }
+    else return kTRUE;
   } else {
     // applies the cut differently depending on the PID and the momentum
-    if (isTOF) {
+    if (isTPC && isTOF) {
       // TPC: 5sigma cut for all
       if (nsTPC > 5.0) return kFALSE;
       // TOF: 3sigma below 1.5 GeV, 2sigma above
       if (p < 1.5) maxTOF = 3.0; else maxTOF = 2.0;
       return (nsTOF <= maxTOF);
-    } else {
+    } else if(isTPC){
       // TPC:
       // all   below   350         MeV: 5sigma
       // all   between 350 and 500 MeV: 3sigma
@@ -136,6 +145,7 @@ Bool_t AliRsnCutDaughterD0::IsSelected(TObject *obj)
       }
       return (nsTPC <= maxTPC);
     } 
+    else return kTRUE;
   }    
   
   AliDebugClass(2, "...passed");