From: hdalsgaa Date: Wed, 27 Apr 2011 12:37:20 +0000 (+0000) Subject: Adding the option to zero shared entries below threshold X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=40196108124d83e49ffc422fc398a60da4346947;p=u%2Fmrichter%2FAliRoot.git Adding the option to zero shared entries below threshold --- diff --git a/PWG2/FORWARD/analysis2/AliFMDSharingFilter.cxx b/PWG2/FORWARD/analysis2/AliFMDSharingFilter.cxx index bfa24faeef5..c6feb6d095d 100644 --- a/PWG2/FORWARD/analysis2/AliFMDSharingFilter.cxx +++ b/PWG2/FORWARD/analysis2/AliFMDSharingFilter.cxx @@ -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; } //_____________________________________________________________________ diff --git a/PWG2/FORWARD/analysis2/AliFMDSharingFilter.h b/PWG2/FORWARD/analysis2/AliFMDSharingFilter.h index 14bfe90ad91..e263a35b2e8 100644 --- a/PWG2/FORWARD/analysis2/AliFMDSharingFilter.h +++ b/PWG2/FORWARD/analysis2/AliFMDSharingFilter.h @@ -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); // };