]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Modify Proton selection settings
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Mar 2013 14:54:02 +0000 (14:54 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Mar 2013 14:54:02 +0000 (14:54 +0000)
PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoESDTrackCut.cxx
PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoESDTrackCut.h

index 76329f8ada345ce0ec9760752df64b6236e96b3d..2f3aa8075070de355ab889e2c4cd67a4a4cdb6b8 100644 (file)
@@ -88,6 +88,7 @@ ClassImp(AliFemtoESDTrackCut)
     fLabel(0),
     fStatus(0),
     fPIDMethod(knSigma),
+  fNsigmaTPCTOF(kFALSE),
     fminTPCclsF(0),
     fminTPCncls(0),
     fminITScls(0),
@@ -130,6 +131,7 @@ ClassImp(AliFemtoESDTrackCut)
   fminTPCclsF=0;
   fminITScls=0;
   fPIDMethod=knSigma;
+  fNsigmaTPCTOF=kFALSE;
 }
 //------------------------------
 AliFemtoESDTrackCut::~AliFemtoESDTrackCut(){
@@ -371,8 +373,9 @@ bool AliFemtoESDTrackCut::Pass(const AliFemtoTrack* track)
            }
   
          }
-         else if (fMostProbable == 4) { // proton nsigma-PID required contour adjusting
-           if (IsProtonNSigma(track->P().Mag(), track->NSigmaTPCP(), track->NSigmaTOFP()) // && IsProtonTPCdEdx(track->P().Mag(), track->TPCsignal())
+      else if (fMostProbable == 4) { // proton nsigma-PID required contour adjusting (in LHC10h)
+        if ( IsProtonNSigma(track->P().Mag(), track->NSigmaTPCP(), track->NSigmaTOFP()) && (TMath::Abs(track->NSigmaTPCP()) < TMath::Abs(track->NSigmaTPCPi())) && (TMath::Abs(track->NSigmaTPCP()) < TMath::Abs(track->NSigmaTPCK())) && (TMath::Abs(track->NSigmaTOFP()) < TMath::Abs(track->NSigmaTOFPi())) && (TMath::Abs(track->NSigmaTOFP()) < TMath::Abs(track->NSigmaTOFK()))
+             // && IsProtonTPCdEdx(track->P().Mag(), track->TPCsignal())
             )
              imost = 4;
          }
@@ -975,6 +978,8 @@ bool AliFemtoESDTrackCut::IsPionNSigma(float mom, float nsigmaTPCPi, float nsigm
 
 bool AliFemtoESDTrackCut::IsProtonNSigma(float mom, float nsigmaTPCP, float nsigmaTOFP)
 {
+
+  if (fNsigmaTPCTOF) {
     if (mom > 0.8) {
         if (TMath::Hypot( nsigmaTOFP, nsigmaTPCP )/TMath::Sqrt(2) < 3.0)
             return true;
@@ -983,6 +988,21 @@ bool AliFemtoESDTrackCut::IsProtonNSigma(float mom, float nsigmaTPCP, float nsig
         if (TMath::Abs(nsigmaTPCP) < 3.0)
             return true;
     }
+  }
+  else {
+    if (mom > 0.8 && mom < 2.5) {
+      if ( TMath::Abs(nsigmaTPCP) < 3.0 && TMath::Abs(nsigmaTOFP) < 3.0)
+        return true;
+    }
+    else if (mom > 2.5) {
+      if ( TMath::Abs(nsigmaTPCP) < 3.0 && TMath::Abs(nsigmaTOFP) < 2.0)
+        return true;
+    }
+    else {
+      if (TMath::Abs(nsigmaTPCP) < 3.0)
+        return true;
+    }
+  }
 
   return false;
 }
@@ -994,6 +1014,11 @@ void AliFemtoESDTrackCut::SetPIDMethod(ReadPIDMethodType newMethod)
 }
 
 
+void AliFemtoESDTrackCut::SetNsigmaTPCTOF(Bool_t nsigma)
+{
+  fNsigmaTPCTOF = nsigma;
+}
 void AliFemtoESDTrackCut::SetClusterRequirementITS(AliESDtrackCuts::Detector det, AliESDtrackCuts::ITSClusterRequirement req) 
 { 
   fCutClusterRequirementITS[det] = req; 
index 7189a857454729a45bb560968be1aee146b09614..5252547d2769ec307955f5515e9306212b5940d4 100644 (file)
@@ -64,6 +64,7 @@ class AliFemtoESDTrackCut : public AliFemtoTrackCut
   void SetMostProbableProton();
   void SetNoMostProbable(); 
   void SetPIDMethod(ReadPIDMethodType newMethod);
+  void SetNsigmaTPCTOF(Bool_t);
   void SetClusterRequirementITS(AliESDtrackCuts::Detector det, AliESDtrackCuts::ITSClusterRequirement req = AliESDtrackCuts::kOff);
 
   void SetMomRangeTOFpidIs(const float& minp, const float& maxp);
@@ -86,6 +87,7 @@ class AliFemtoESDTrackCut : public AliFemtoTrackCut
   bool              fLabel;              // if true label<0 will not pass throught 
   long              fStatus;             // staus flag
   ReadPIDMethodType fPIDMethod;          // which PID mehod to use. 0 - nsgima, 1 - contour 
+  Bool_t            fNsigmaTPCTOF;       // true if squared nsigma from TPC and TOF, false if separately from TPC and TOF
 
   short             fminTPCclsF;         // min number of findable clusters in the TPC
   short             fminTPCncls;         // min number of clusters in the TPC
@@ -170,4 +172,3 @@ inline void AliFemtoESDTrackCut::SetMaxImpactZ(const float& maximpz) { fMaxImpac
 
 
 #endif
-