Changes to the DEtaDPhi corr fun (making 0 in the center of the bin in the histogram...
authorwfpw <wfpw@lambda.(none)>
Fri, 10 Jan 2014 10:29:26 +0000 (11:29 +0100)
committerwfpw <wfpw@lambda.(none)>
Fri, 10 Jan 2014 10:29:26 +0000 (11:29 +0100)
PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoModelCorrFctnDEtaDPhi.cxx
PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoShareQualityPairCut.cxx

index 5e97932..5122d63 100644 (file)
@@ -1,6 +1,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 //                                                                            //
-// AliFemtoModelCorrFctnDEtaDPhi - A correlation function that analyzes            //
+// AliFemtoModelCorrFctnDEtaDPhi - A correlation function that analyzes       //
 // two particle correlations with respect to the azimuthal angle (phi)        //
 // and pseudorapidity (eta) difference                                        //
 //                                                                            //
index 6c56c10..b374481 100644 (file)
@@ -6,7 +6,7 @@
 /////////////////////////////////////////////////////////////////////////////
 /***************************************************************************
  *
- * $Id$
+ * $Id: AliFemtoShareQualityPairCut.cxx 53713 2011-12-20 12:31:21Z akisiel $
  *
  * Author: Adam Kisiel, Ohio State, kisiel@mps.ohio-state.edu
  ***************************************************************************
@@ -64,45 +64,46 @@ bool AliFemtoShareQualityPairCut::Pass(const AliFemtoPair* pair){
   Int_t an = 0;
   Int_t ns = 0;
   
-  if ((fShareFractionMax < 1.0) && ( fShareQualityMax < 1.0)) {
-    for (unsigned int imap=0; imap<pair->Track1()->Track()->TPCclusters().GetNbits(); imap++) {
-      // If both have clusters in the same row
-      if (pair->Track1()->Track()->TPCclusters().TestBitNumber(imap) && 
-         pair->Track2()->Track()->TPCclusters().TestBitNumber(imap)) {
-       // Do they share it ?
-       if (pair->Track1()->Track()->TPCsharing().TestBitNumber(imap) &&
-           pair->Track2()->Track()->TPCsharing().TestBitNumber(imap))
-         {
-           //    cout << "A shared cluster !!!" << endl;
-           //  cout << "imap idx1 idx2 " 
-           //       << imap << " "
-           //       << tP1idx[imap] << " " << tP2idx[imap] << endl;
-           an++;
-           nh+=2;
-           ns+=2;
-         }
-       
-       // Different hits on the same padrow
-       else {
-         an--;
-         nh+=2;
-       }
-      }
-      else if (pair->Track1()->Track()->TPCclusters().TestBitNumber(imap) ||
-              pair->Track2()->Track()->TPCclusters().TestBitNumber(imap)) {
-       // One track has a hit, the other does not
-       an++;
-       nh++;
-      }
-    }
-    
-    Float_t hsmval = 0.0;
-    Float_t hsfval = 0.0;
-    
-    if (nh >0) {
-      hsmval = an*1.0/nh;
-      hsfval = ns*1.0/nh;
-    }
+  if ((fShareFractionMax >= 1.0) && ( fShareQualityMax >= 1.0)) {
+     temp = true;
+  }
+  else {
+     for (unsigned int imap=0; imap<pair->Track1()->Track()->TPCclusters().GetNbits(); imap++) {
+        // If both have clusters in the same row
+        if (pair->Track1()->Track()->TPCclusters().TestBitNumber(imap) && 
+            pair->Track2()->Track()->TPCclusters().TestBitNumber(imap)) {
+           // Do they share it ?
+           if (pair->Track1()->Track()->TPCsharing().TestBitNumber(imap) &&
+               pair->Track2()->Track()->TPCsharing().TestBitNumber(imap))
+           {
+              //         cout << "A shared cluster !!!" << endl;
+              //       cout << "imap idx1 idx2 " 
+              //            << imap << " "
+              //            << tP1idx[imap] << " " << tP2idx[imap] << endl;
+              an++;
+              nh+=2;
+              ns+=2;
+           }
+           // Different hits on the same padrow
+           else {
+              an--;
+              nh+=2;
+           }
+        }
+        else if (pair->Track1()->Track()->TPCclusters().TestBitNumber(imap) ||
+                 pair->Track2()->Track()->TPCclusters().TestBitNumber(imap)) {
+           // One track has a hit, the other does not
+           an++;
+           nh++;
+        }
+     }
+     Float_t hsmval = 0.0;
+     Float_t hsfval = 0.0;
+
+     if (nh >0) {
+        hsmval = an*1.0/nh;
+        hsfval = ns*1.0/nh;
+     }
     //  if (hsmval > -0.4) {
     //   cout << "Pair quality: " << hsmval << " " << an << " " << nh << " " 
     //        << (pair->Track1()->Track()) << " " 
@@ -112,11 +113,14 @@ bool AliFemtoShareQualityPairCut::Pass(const AliFemtoPair* pair){
     //   if (hsfval > 0.0) {
     //     cout << "Pair sharity: " << hsfval << " " << ns << " " << nh << "    " << hsmval << " " << an << " " << nh << endl;
     //   }
-    
-    temp = (hsmval < fShareQualityMax) && (hsfval < fShareFractionMax);
+     if( (fShareQualityMax < 1) && (fShareFractionMax < 1)  )
+        temp = (hsmval < fShareQualityMax) && (hsfval < fShareFractionMax);
+     else if (fShareQualityMax < 1)
+        temp = (hsmval < fShareQualityMax);
+     else if (fShareFractionMax < 1)
+        temp = (hsmval < fShareFractionMax);
+     else temp = false;
   }
-  else
-    temp = true;
 
   if (fRemoveSameLabel) {
     if (abs(pair->Track1()->Track()->Label()) == abs(pair->Track2()->Track()->Label())) {