]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSV0Finder.cxx
cleanup
[u/mrichter/AliRoot.git] / ITS / AliITSV0Finder.cxx
index 113200de1b2cb7621ac5e6cde637f213105757bc..8e7807f2f3ccb93798adb6fdd35e97faa49645d7 100644 (file)
@@ -32,6 +32,7 @@
 #include "AliESDVertex.h"\r
 #include "AliESDEvent.h"\r
 #include "AliESDtrack.h"\r
+#include "AliESDV0Params.h"\r
 #include "AliV0.h"\r
 #include "AliHelix.h"\r
 #include "AliITSRecPoint.h"\r
@@ -49,7 +50,8 @@ fDebugStreamer(0)
  {\r
   //Default constructor\r
 \r
-   fDebugStreamer = new TTreeSRedirector("ITSdebug.root");\r
+   if (AliITSReconstructor::GetRecoParam()->GetESDV0Params()->StreamLevel()>0)\r
+     fDebugStreamer = new TTreeSRedirector("ITSdebug.root");\r
 } \r
 \r
 //------------------------------------------------------------------------\r
@@ -180,6 +182,7 @@ void AliITSV0Finder::FindV02(AliESDEvent *event,
   //          max distance DCA between 2 tracks cut \r
   //          maxDist = TMath::Min(kMaxDist,kMaxDist0+pvertex->GetRr()*kMaxDist);\r
   //\r
+  const Bool_t kCheckPropagate = kFALSE;\r
   const Float_t kMaxDist0 = AliITSReconstructor::GetRecoParam()->GetESDV0Params()->GetMaxDist0();\r
   const Float_t kMaxDist1 = AliITSReconstructor::GetRecoParam()->GetESDV0Params()->GetMaxDist1();\r
   const Float_t kMaxDist = AliITSReconstructor::GetRecoParam()->GetESDV0Params()->GetMaxDist();\r
@@ -204,6 +207,8 @@ void AliITSV0Finder::FindV02(AliESDEvent *event,
   const Float_t kMinNormDistForb3= AliITSReconstructor::GetRecoParam()->GetESDV0Params()->GetMinNormDistForb3();\r
   const Float_t kMinNormDistForb4= AliITSReconstructor::GetRecoParam()->GetESDV0Params()->GetMinNormDistForb4();\r
   const Float_t kMinNormDistForb5= AliITSReconstructor::GetRecoParam()->GetESDV0Params()->GetMinNormDistForb5();\r
+  const Float_t kMinNormDistForbProt= AliITSReconstructor::GetRecoParam()->GetESDV0Params()->GetMinNormDistForbProt();\r
+  const Float_t kMaxPidProbPionForb= AliITSReconstructor::GetRecoParam()->GetESDV0Params()->GetMaxPidProbPionForb();\r
 \r
   const Float_t kMinRTPCdensity= AliITSReconstructor::GetRecoParam()->GetESDV0Params()->GetMinRTPCdensity();\r
   const Float_t kMaxRTPCdensity0= AliITSReconstructor::GetRecoParam()->GetESDV0Params()->GetMaxRTPCdensity0();\r
@@ -356,7 +361,8 @@ void AliITSV0Finder::FindV02(AliESDEvent *event,
 \r
     alpha = TMath::ATan2(yy,xx);    \r
     //    if (!trackat0.Propagate(alpha,0)) continue;    \r
-    trackat0.Propagate(alpha,0); //PH The check on the return value is temporarily disabled (bug 45751) \r
+    //    trackat0.Propagate(alpha,0); //PH The check on the return value is temporarily disabled (bug 45751) \r
+    if(!trackat0.Propagate(alpha,0) && kCheckPropagate)continue;\r
     // calculate normalized distances to the vertex \r
     //\r
     Float_t ptfac  = (1.+100.*TMath::Abs(trackat0.GetC()));\r
@@ -466,10 +472,15 @@ void AliITSV0Finder::FindV02(AliESDEvent *event,
       normdist[itsindex]*=-1;\r
     }\r
     if (isProton){\r
-      if (normdist[itsindex]>2) forbidden[itsindex]=kFALSE;    \r
+      if (normdist[itsindex]>kMinNormDistForbProt) forbidden[itsindex]=kFALSE; \r
       normdist[itsindex]*=-1;\r
     }\r
 \r
+    // We allow all tracks that are not pions\r
+    if( (pid[1]+pid[2])< kMaxPidProbPionForb ){\r
+      forbidden[itsindex]=kFALSE;\r
+    }\r
+\r
     //\r
     // Causality cuts in TPC volume\r
     //\r
@@ -544,7 +555,8 @@ void AliITSV0Finder::FindV02(AliESDEvent *event,
       //\r
       //\r
       //\r
-      Double_t phase[2][2],radius[2];\r
+      Double_t phase[2][2]={{0.,0.},{0.,0.}};\r
+      Double_t radius[2]={0.,0.};\r
       Int_t  points = h1.GetRPHIintersections(h2, phase, radius);\r
       if    (points==0) {\r
        //      cutN=1;\r
@@ -1028,6 +1040,7 @@ void AliITSV0Finder::FindV02(AliESDEvent *event,
   delete[] itsmap;\r
   delete[] helixes;\r
   delete   pvertex;\r
+  delete   dummy;\r
 }\r
 //------------------------------------------------------------------------\r
 void AliITSV0Finder::RefitV02(const AliESDEvent *event,\r