]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Making 3 strip sharing optional
authorhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 2 Sep 2011 23:23:00 +0000 (23:23 +0000)
committerhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 2 Sep 2011 23:23:00 +0000 (23:23 +0000)
PWG2/FORWARD/analysis2/AliFMDSharingFilter.cxx
PWG2/FORWARD/analysis2/AliFMDSharingFilter.h

index d576ab4270c1f0d4980ece7cc40ffc6e1ed6376b..0819f94aaee4221ea064f04cecdeb52e85881b5e 100644 (file)
@@ -64,7 +64,8 @@ AliFMDSharingFilter::AliFMDSharingFilter()
     fZeroSharedHitsBelowThreshold(false),
     fLCuts(),
     fHCuts(),
-    fUseSimpleMerging(false)
+    fUseSimpleMerging(false),
+    fThreeStripSharing(true)
 {
   // 
   // Default Constructor - do not use 
@@ -86,7 +87,8 @@ AliFMDSharingFilter::AliFMDSharingFilter(const char* title)
     fZeroSharedHitsBelowThreshold(false),
     fLCuts(),
     fHCuts(),
-    fUseSimpleMerging(false)
+    fUseSimpleMerging(false),
+    fThreeStripSharing(true)
 {
   // 
   // Constructor 
@@ -123,7 +125,8 @@ AliFMDSharingFilter::AliFMDSharingFilter(const AliFMDSharingFilter& o)
     fZeroSharedHitsBelowThreshold(o.fZeroSharedHitsBelowThreshold),
     fLCuts(o.fLCuts),
     fHCuts(o.fHCuts),
-    fUseSimpleMerging(o.fUseSimpleMerging)
+    fUseSimpleMerging(o.fUseSimpleMerging),
+    fThreeStripSharing(o.fThreeStripSharing)
 {
   // 
   // Copy constructor 
@@ -172,6 +175,7 @@ AliFMDSharingFilter::operator=(const AliFMDSharingFilter& o)
   fLCuts                        = o.fLCuts;
   fHCuts                        = o.fHCuts;
   fUseSimpleMerging             = o.fUseSimpleMerging;
+  fThreeStripSharing            = o.fThreeStripSharing;
   
   fRingHistos.Delete();
   TIter    next(&o.fRingHistos);
@@ -348,7 +352,7 @@ AliFMDSharingFilter::Filter(const AliESDFMD& input,
              nDistanceBefore = -1;
            }
            
-           if(eTotal > 0) {
+           if(fThreeStripSharing && eTotal > 0) {
              if(multNext > GetLowCut(d, r, eta) && 
                 (multNext < GetHighCut(d, r, eta ,false) || twoLow)) {
                eTotal = eTotal + multNext;
@@ -376,11 +380,13 @@ AliFMDSharingFilter::Filter(const AliESDFMD& input,
                   multNext < GetHighCut(d, r, eta ,false) )
                  twoLow = kTRUE;
                  
-               if(mult>multNext && multNextNext < GetLowCut(d, r, eta)) {
-                 etot = mult + multNext;
-                 used=kTRUE;
-                 histos->fDouble->Fill(etot);
-               }
+               if(!fThreeStripSharing || 
+                  (mult>multNext && multNextNext < GetLowCut(d, r, eta)))
+                 {
+                   etot = mult + multNext;
+                   used=kTRUE;
+                   histos->fDouble->Fill(etot);
+                 }
                else {
                  etot   = 0;
                  eTotal = mult + multNext;
index 16bd981d16d90169a6bb97bd4675a1a8b3fff479..7dbcf5edf2217966de80f19997caba8f0487b74f 100644 (file)
@@ -135,6 +135,14 @@ public:
    * 
    */
   void SetUseSimpleSharing(Bool_t use) { fUseSimpleMerging = use; }
+  /** 
+   * In case of a simpler merging algorithm allow 3 strips to be 
+   * merged
+   * 
+   * @param use allow three strips
+   * 
+   */
+  void SetAllow3Strips(Bool_t use) { fThreeStripSharing = use; }
   /** 
    * Set the number of landau width to subtract from the most probably
    * value to get the high cut for the merging algorithm.
@@ -397,9 +405,10 @@ protected:
   AliFMDFloatMap* fOper;   // Operation done per strip 
   Int_t    fDebug;         // Debug level 
   Bool_t   fZeroSharedHitsBelowThreshold; //Whether to zero shared strip below cut
-  AliFMDMultCuts fLCuts;
-  AliFMDMultCuts fHCuts;
-  Bool_t   fUseSimpleMerging;
+  AliFMDMultCuts fLCuts;    //Cuts object for low cuts
+  AliFMDMultCuts fHCuts;    //Cuts object for high cuts
+  Bool_t   fUseSimpleMerging; //enable simple sharing by HHD
+  Bool_t   fThreeStripSharing; //In case of simple sharing allow 3 strips
   ClassDef(AliFMDSharingFilter,3); //
 };