]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HBTAN/AliHBTAnalysis.cxx
CRAB added
[u/mrichter/AliRoot.git] / HBTAN / AliHBTAnalysis.cxx
index d120bd03aadd57fca979411915a81b03a4d1566d..78d70619c5701b993bfe1f22261ddd7167228436 100644 (file)
@@ -337,7 +337,7 @@ void AliHBTAnalysis::ProcessTracksAndParticles()
 //          }
          
          Bool_t firstcut = fPairCut->GetFirstPartCut()->Pass(part1);
-         if (fBufferSize == 0) 
+         if (fBufferSize != 0) 
            if ( (firstcut == kFALSE) || (fPairCut->GetSecondPartCut()->Pass(part1) == kFALSE) )
             {
               //accepted by any cut
@@ -367,9 +367,9 @@ void AliHBTAnalysis::ProcessTracksAndParticles()
             track2= trackEvent->GetParticle(k);
             trackpair->SetParticles(track1,track2);
 
-            if(fPairCut->Pass(partpair) ) //check pair cut 
+            if(fPairCut->Pass(trackpair) ) //check pair cut 
               { //do not meets crietria of the pair cut, try with swapped pairs
-                if( fPairCut->Pass(partpair->GetSwapedPair()) )
+                if( fPairCut->Pass(trackpair->GetSwapedPair()) )
                   continue; //swaped pairs do not meet criteria of pair cut as well, take next particle
                 else 
                  { //swaped pair meets all the criteria
@@ -500,7 +500,7 @@ void AliHBTAnalysis::ProcessTracks()
          track1= trackEvent->GetParticle(j);
          Bool_t firstcut = fPairCut->GetFirstPartCut()->Pass(track1);
          
-         if (fBufferSize == 0) //useless in case 
+         if (fBufferSize != 0)
            if ( (firstcut == kFALSE) || (fPairCut->GetSecondPartCut()->Pass(track1) == kFALSE) )
             {
               //accepted by any cut
@@ -628,7 +628,7 @@ void AliHBTAnalysis::ProcessParticles()
          part1 = partEvent->GetParticle(j);
          Bool_t firstcut = fPairCut->GetFirstPartCut()->Pass(part1);
          
-         if (fBufferSize == 0) //useless in case 
+         if (fBufferSize != 0) //useless in case 
            if ( (firstcut == kFALSE) || (fPairCut->GetSecondPartCut()->Pass(part1) == kFALSE) )
             {
               //accepted by any cut
@@ -998,7 +998,7 @@ void AliHBTAnalysis::ProcessTracksAndParticlesNonIdentAnal()
             track2= trackEvent2->GetParticle(k);
             trackpair->SetParticles(track1,track2);
 
-            if( (fPairCut->PassPairProp(partpair)) ) //check pair cut
+            if( (fPairCut->PassPairProp(trackpair)) ) //check pair cut
              { //do not meets crietria of the pair cut
               continue; 
              }
@@ -1040,7 +1040,7 @@ void AliHBTAnalysis::ProcessTracksAndParticlesNonIdentAnal()
             track2= trackEvent3->GetParticle(k);
             trackpair->SetParticles(track1,track2);
 
-            if( (fPairCut->PassPairProp(partpair)) ) //check pair cut
+            if( (fPairCut->PassPairProp(trackpair)) ) //check pair cut
              { //do not meets crietria of the pair cut
               continue; 
              }
@@ -1344,8 +1344,8 @@ void AliHBTAnalysis::FilterOut(AliHBTEvent* outpart1, AliHBTEvent* outpart2, Ali
      part = inpart->GetParticle(i);
      track = intrack->GetParticle(i);
      
-     if ( (cut1->Pass(part))  ) in1 = kFALSE; //if part  is rejected by cut1, in1 is false
-     if ( (cut2->Pass(part))  ) in2 = kFALSE; //if part  is rejected by cut2, in2 is false
+     if ( (cut1->Pass(track))  ) in1 = kFALSE; //if part  is rejected by cut1, in1 is false
+     if ( (cut2->Pass(track))  ) in2 = kFALSE; //if part  is rejected by cut2, in2 is false
      
      if (gDebug)//to be removed in real analysis     
      if ( in1 && in2 ) //both cuts accepted, should never happen, just in case