Adding the option to zero shared entries below threshold
authorhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Apr 2011 12:37:20 +0000 (12:37 +0000)
committerhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Apr 2011 12:37:20 +0000 (12:37 +0000)
PWG2/FORWARD/analysis2/AliFMDSharingFilter.cxx
PWG2/FORWARD/analysis2/AliFMDSharingFilter.h

index bfa24fa..c6feb6d 100644 (file)
@@ -58,7 +58,8 @@ AliFMDSharingFilter::AliFMDSharingFilter()
     fSummed(0),
     fHighCuts(0),
     fOper(0),
-    fDebug(0)
+    fDebug(0),
+    fZeroSharedHitsBelowThreshold(0)
 {
   // 
   // Default Constructor - do not use 
@@ -76,7 +77,8 @@ AliFMDSharingFilter::AliFMDSharingFilter(const char* title)
     fSummed(0),
     fHighCuts(0),
     fOper(0),
-    fDebug(0)
+    fDebug(0),
+    fZeroSharedHitsBelowThreshold(0)
 {
   // 
   // Constructor 
@@ -102,7 +104,8 @@ AliFMDSharingFilter::AliFMDSharingFilter(const AliFMDSharingFilter& o)
     fSummed(o.fSummed),
     fHighCuts(o.fHighCuts),
     fOper(o.fOper),
-    fDebug(o.fDebug)
+    fDebug(o.fDebug),
+    fZeroSharedHitsBelowThreshold(o.fZeroSharedHitsBelowThreshold)
 {
   // 
   // Copy constructor 
@@ -139,14 +142,15 @@ AliFMDSharingFilter::operator=(const AliFMDSharingFilter& o)
   //
   TNamed::operator=(o);
 
-  fLowCut        = o.fLowCut;
-  fCorrectAngles = o.fCorrectAngles;
-  fNXi           = o.fNXi;
-  fDebug         = o.fDebug;
-  fOper          = o.fOper;
-  fSummed        = o.fSummed;
-  fHighCuts      = o.fHighCuts;
-  fIncludeSigma  = o.fIncludeSigma;
+  fLowCut                       = o.fLowCut;
+  fCorrectAngles                = o.fCorrectAngles;
+  fNXi                          = o.fNXi;
+  fDebug                        = o.fDebug;
+  fOper                         = o.fOper;
+  fSummed                       = o.fSummed;
+  fHighCuts                     = o.fHighCuts;
+  fIncludeSigma                 = o.fIncludeSigma;
+  fZeroSharedHitsBelowThreshold = o.fZeroSharedHitsBelowThreshold;
 
   fRingHistos.Delete();
   TIter    next(&o.fRingHistos);
@@ -554,7 +558,9 @@ AliFMDSharingFilter::MultiplicityOfStrip(Double_t thisE,
   DBGL(3, Form(" %9f<%9f<%9f (was %9f), zeroed, candidate", 
                   lowCut, totalE, highCut, thisE));
   thisStatus = kCandidate;
-  return 0;
+  if(fZeroSharedHitsBelowThreshold)
+    return 0;
+  else return totalE; 
 }
           
 //_____________________________________________________________________
index 14bfe90..e263a35 100644 (file)
@@ -120,6 +120,13 @@ public:
    * signals are always angle corrected. 
    */
   void SetUseAngleCorrectedSignals(Bool_t use) { fCorrectAngles = use; }
+   /** 
+   * Enable zeroing of signals if below high cut
+   * 
+   * @param use zero the signals if below sharing cut
+   * 
+   */
+  void SetZeroSharedHitsBelowThreshold(Bool_t use) { fZeroSharedHitsBelowThreshold = use; }
   /** 
    * Set the number of landau width to subtract from the most probably
    * value to get the high cut for the merging algorithm.
@@ -360,7 +367,8 @@ protected:
   TH2*     fHighCuts;      // High cuts used
   AliFMDFloatMap* fOper;   // Operation done per strip 
   Int_t    fDebug;         // Debug level 
-
+  Bool_t   fZeroSharedHitsBelowThreshold; //Whether to zero shared strip below cut
+  
   ClassDef(AliFMDSharingFilter,2); //
 };