Add support for the ITS Fake bit
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Mar 2011 15:09:28 +0000 (15:09 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Mar 2011 15:09:28 +0000 (15:09 +0000)
PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChain.cxx
PWG2/FEMTOSCOPY/AliFemtoUser/AliFemtoESDTrackCut.cxx
PWG2/FEMTOSCOPY/AliFemtoUser/AliFemtoESDTrackCut.h

index c55ea1c..bd8bb12 100644 (file)
@@ -577,7 +577,10 @@ AliFemtoEvent* AliFemtoEventReaderESDChain::ReturnHbtEvent()
       trackCopy->SetLabel(esdtrack->GetLabel());
                
       trackCopy->SetITSchi2(esdtrack->GetITSchi2());    
-      trackCopy->SetITSncls(esdtrack->GetNcls(0));     
+      if (esdtrack->GetITSFakeFlag())
+       trackCopy->SetITSncls(-esdtrack->GetNcls(0));     
+      else
+       trackCopy->SetITSncls(esdtrack->GetNcls(0));     
       trackCopy->SetTPCchi2(esdtrack->GetTPCchi2());       
       trackCopy->SetTPCncls(esdtrack->GetTPCNcls());       
       trackCopy->SetTPCnclsF(esdtrack->GetTPCNclsF());      
index fe66cc4..63fe786 100644 (file)
@@ -95,6 +95,7 @@ AliFemtoESDTrackCut::AliFemtoESDTrackCut() :
     fNTracksPassed(0),
     fNTracksFailed(0),
     fRemoveKinks(kFALSE),
+    fRemoveITSFake(kFALSE),
     fMostProbable(0), 
     fMaxImpactXY(1000.0),
     fMaxImpactZ(1000.0),
@@ -152,6 +153,10 @@ bool AliFemtoESDTrackCut::Pass(const AliFemtoTrack* track)
     if ((track->KinkIndex(0)) || (track->KinkIndex(1)) || (track->KinkIndex(2)))
       return false;
   }
+  if (fRemoveITSFake) {
+    if (track->ITSncls() < 0)
+      return false;
+  }
   if (fminTPCclsF>track->TPCnclsF())
     {
       //cout<<" No go because TPC Number of ClsF"<<fminTPCclsF<< " "<<track->TPCnclsF()<<endl;
@@ -444,6 +449,11 @@ void AliFemtoESDTrackCut::SetRemoveKinks(const bool& flag)
   fRemoveKinks = flag;
 }
                            
+void AliFemtoESDTrackCut::SetRemoveITSFake(const bool& flag)
+{
+  fRemoveITSFake = flag;
+}
+                           
                            // electron
 // 0.13 - 1.8
 // 0       7.594129e-02    8.256141e-03
index 29eb1fa..b2df9ce 100644 (file)
@@ -45,6 +45,7 @@ class AliFemtoESDTrackCut : public AliFemtoTrackCut
   void SetminTPCncls(const short& s);
   void SetminITScls(const int& s);
   void SetRemoveKinks(const bool& flag);
+  void SetRemoveITSFake(const bool& flag);
   void SetMaxITSChiNdof(const float& maxchi);
   void SetMaxTPCChiNdof(const float& maxchi);
   void SetMaxSigmaToVertex(const float& maxsig);
@@ -83,6 +84,7 @@ class AliFemtoESDTrackCut : public AliFemtoTrackCut
   long              fNTracksPassed;      // passed tracks count
   long              fNTracksFailed;      // failed tracks count
   bool              fRemoveKinks;        // if true particles with any kink label will not pass
+  bool              fRemoveITSFake;      // if true particles with ITS fake flag will not pass
   int               fMostProbable;       // this particle type is required to be most probable
 
   float             fMaxImpactXY;        // Max XY impact parameter