]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Use new AliFMDMultCuts code for mutliplicity cuts
authorhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Jun 2011 14:39:23 +0000 (14:39 +0000)
committerhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Jun 2011 14:39:23 +0000 (14:39 +0000)
PWG2/FORWARD/analysis2/AliFMDDensityCalculator.cxx
PWG2/FORWARD/analysis2/AliFMDDensityCalculator.h
PWG2/FORWARD/analysis2/AliFMDSharingFilter.cxx
PWG2/FORWARD/analysis2/AliFMDSharingFilter.h

index ddbabcd1c7fe6c201bc81682172e97758aaca1b2..c81d395da9af0a88c34f866becc16a3b591f42f3 100644 (file)
@@ -27,9 +27,6 @@ ClassImp(AliFMDDensityCalculator)
 AliFMDDensityCalculator::AliFMDDensityCalculator()
   : TNamed(), 
     fRingHistos(),
-    fMultCut(0),
-    fNXi(1),
-    fIncludeSigma(true),
     fSumOfWeights(0),
     fWeightedSum(0),
     fCorrections(0),
@@ -47,7 +44,8 @@ AliFMDDensityCalculator::AliFMDDensityCalculator()
     fLowCuts(0),
     fEtaLumping(5), 
     fPhiLumping(5),    
-    fDebug(0)
+    fDebug(0),
+    fCuts()
 {
   // 
   // Constructor 
@@ -59,9 +57,6 @@ AliFMDDensityCalculator::AliFMDDensityCalculator()
 AliFMDDensityCalculator::AliFMDDensityCalculator(const char* title)
   : TNamed("fmdDensityCalculator", title), 
     fRingHistos(), 
-    fMultCut(0),
-    fNXi(1),
-    fIncludeSigma(true),
     fSumOfWeights(0),
     fWeightedSum(0),
     fCorrections(0),
@@ -79,7 +74,8 @@ AliFMDDensityCalculator::AliFMDDensityCalculator(const char* title)
     fLowCuts(0),
     fEtaLumping(5), 
     fPhiLumping(5),
-    fDebug(0)
+    fDebug(0),
+    fCuts()
 {
   // 
   // Constructor 
@@ -126,9 +122,6 @@ AliFMDDensityCalculator::AliFMDDensityCalculator(const
                                                 AliFMDDensityCalculator& o)
   : TNamed(o), 
     fRingHistos(), 
-    fMultCut(o.fMultCut),
-    fNXi(o.fNXi),
-    fIncludeSigma(o.fIncludeSigma),
     fSumOfWeights(o.fSumOfWeights),
     fWeightedSum(o.fWeightedSum),
     fCorrections(o.fCorrections),
@@ -146,7 +139,8 @@ AliFMDDensityCalculator::AliFMDDensityCalculator(const
     fLowCuts(o.fLowCuts),
     fEtaLumping(o.fEtaLumping), 
     fPhiLumping(o.fPhiLumping),
-    fDebug(o.fDebug)
+    fDebug(o.fDebug),
+    fCuts(o.fCuts)
 {
   // 
   // Copy constructor 
@@ -183,24 +177,23 @@ AliFMDDensityCalculator::operator=(const AliFMDDensityCalculator& o)
   //
   TNamed::operator=(o);
 
-  fMultCut      = o.fMultCut;
-  fNXi          = o.fNXi;
-  fIncludeSigma = o.fIncludeSigma;
-  fDebug        = o.fDebug;
-  fMaxParticles = o.fMaxParticles;
-  fUsePoisson   = o.fUsePoisson;
-  fUsePhiAcceptance  = o.fUsePhiAcceptance;
-  fAccI         = o.fAccI;
-  fAccO         = o.fAccO;
-  fFMD1iMax     = o.fFMD1iMax;
-  fFMD2iMax     = o.fFMD2iMax;
-  fFMD2oMax     = o.fFMD2oMax;
-  fFMD3iMax     = o.fFMD3iMax;
-  fFMD3oMax     = o.fFMD3oMax;
-  fMaxWeights   = o.fMaxWeights;
-  fLowCuts      = o.fLowCuts;
-  fEtaLumping   = o.fEtaLumping;
-  fPhiLumping   = o.fPhiLumping;
+  fDebug              = o.fDebug;
+  fMaxParticles       = o.fMaxParticles;
+  fUsePoisson         = o.fUsePoisson;
+  fUsePhiAcceptance   = o.fUsePhiAcceptance;
+  fAccI               = o.fAccI;
+  fAccO               = o.fAccO;
+  fFMD1iMax           = o.fFMD1iMax;
+  fFMD2iMax           = o.fFMD2iMax;
+  fFMD2oMax           = o.fFMD2oMax;
+  fFMD3iMax           = o.fFMD3iMax;
+  fFMD3oMax           = o.fFMD3oMax;
+  fMaxWeights         = o.fMaxWeights;
+  fLowCuts            = o.fLowCuts;
+  fEtaLumping         = o.fEtaLumping;
+  fPhiLumping         = o.fPhiLumping;
+  fCuts               = o.fCuts;
+
   fRingHistos.Delete();
   TIter    next(&o.fRingHistos);
   TObject* obj = 0;
@@ -221,8 +214,10 @@ AliFMDDensityCalculator::Init(const TAxis& axis)
 
   TIter    next(&fRingHistos);
   RingHistos* o = 0;
-  while ((o = static_cast<RingHistos*>(next())))
+  while ((o = static_cast<RingHistos*>(next()))) {
     o->Init(axis);
+    o->fMultCut = fCuts.GetFixedCut(o->fDet, o->fRing);
+  }
 }
 
 //____________________________________________________________________
@@ -253,22 +248,6 @@ AliFMDDensityCalculator::GetRingHistos(UShort_t d, Char_t r) const
   return static_cast<RingHistos*>(fRingHistos.At(idx));
 }
 
-//____________________________________________________________________
-void 
-AliFMDDensityCalculator::SetMultCuts(Double_t fmd1i, 
-                                    Double_t fmd2i, 
-                                    Double_t fmd2o, 
-                                    Double_t fmd3i, 
-                                    Double_t fmd3o) 
-{
-  GetRingHistos(1,'I')->fMultCut = fmd1i;
-  GetRingHistos(2,'I')->fMultCut = fmd2i;
-  GetRingHistos(2,'O')->fMultCut = fmd2o;
-  GetRingHistos(3,'I')->fMultCut = fmd3i;
-  GetRingHistos(3,'O')->fMultCut = fmd3o;
-  fMultCut = (fmd1i+fmd2i+fmd2o+fmd3i+fmd3o) / 5;
-}
-
 //____________________________________________________________________
 Double_t
 AliFMDDensityCalculator::GetMultCut(UShort_t d, Char_t r, Int_t ieta,
@@ -282,16 +261,7 @@ AliFMDDensityCalculator::GetMultCut(UShort_t d, Char_t r, Int_t ieta,
   // Return:
   //    Lower cut on multiplicity
   //
-  Double_t rcut = GetRingHistos(d, r)->fMultCut;
-  // Int_t    idx = (d == 1 ? 0 : 2*(d - 2) + 1 + ((r=='I' || r=='i') ? 0 : 1));
-  // if (fMultCuts[idx] > 0) return fMultCuts[idx];
-  if (rcut > 0) return rcut;
-
-  AliForwardCorrectionManager&  fcm = AliForwardCorrectionManager::Instance();
-  AliFMDCorrELossFit* fits = fcm.GetELossFit();
-  if (fNXi < 0) return fits->GetLowCut();
-
-  return fits->GetLowerBound(d, r, ieta, fNXi, errors, fIncludeSigma);
+  return fCuts.GetMultCut(d,r,ieta,errors);
 }
     
 //____________________________________________________________________
@@ -307,15 +277,7 @@ AliFMDDensityCalculator::GetMultCut(UShort_t d, Char_t r, Double_t eta,
   // Return:
   //    Lower cut on multiplicity
   //
-  Double_t rcut = GetRingHistos(d, r)->fMultCut;
-  if (rcut > 0) return rcut;
-  if (fMultCut > 0) return fMultCut;
-
-  AliForwardCorrectionManager&  fcm = AliForwardCorrectionManager::Instance();
-  AliFMDCorrELossFit* fits = fcm.GetELossFit();
-  Int_t iEta = fits->FindEtaBin(eta);
-  
-  return GetMultCut(d, r, iEta, errors);
+  return fCuts.GetMultCut(d,r,eta,errors);
 }
   
 //____________________________________________________________________
@@ -833,8 +795,8 @@ AliFMDDensityCalculator::DefineOutput(TList* dir)
   d->Add(fMaxWeights);
   d->Add(fLowCuts);
 
-  TNamed* sigma  = new TNamed("sigma",
-                              (fIncludeSigma ? "included" : "excluded"));
+  // TNamed* sigma  = new TNamed("sigma",
+  // (fIncludeSigma ? "included" : "excluded"));
   TNamed* maxP   = new TNamed("maxParticle", Form("%d", fMaxParticles));
   TNamed* method = new TNamed("method", 
                              (fUsePoisson ? "Poisson" : "Energy loss"));
@@ -842,15 +804,16 @@ AliFMDDensityCalculator::DefineOutput(TList* dir)
                              (fUsePhiAcceptance ? "enabled" : "disabled"));
   TNamed* etaL   = new TNamed("etaLumping", Form("%d", fEtaLumping));
   TNamed* phiL   = new TNamed("phiLumping", Form("%d", fPhiLumping));
-  TParameter<double>* nxi = new TParameter<double>("nXi", fNXi);
+  // TParameter<double>* nxi = new TParameter<double>("nXi", fNXi);
 
-  d->Add(sigma);
+  // d->Add(sigma);
   d->Add(maxP);
   d->Add(method);
   d->Add(phiA);
   d->Add(etaL);
   d->Add(phiL);
-  d->Add(nxi);
+  // d->Add(nxi);
+  fCuts.Output(d,0);
 
   TIter    next(&fRingHistos);
   RingHistos* o = 0;
@@ -873,12 +836,6 @@ AliFMDDensityCalculator::Print(Option_t* option) const
   ind[gROOT->GetDirLevel()] = '\0';
   std::cout << ind << ClassName() << ": " << GetName() << '\n'
            << std::boolalpha 
-           << ind << " Multiplicity cut:       " << fMultCut << '\n'
-           << ind << " # of (xi+sigma) factor: " << fNXi << '\n'
-           << ind << " Include sigma in cut:   " << fIncludeSigma << '\n'
-           << ind << " Low cut method:         " 
-           << (fMultCut > 0 ? "fixed" : 
-               (fNXi >= 0 ? "xi+sigma" : "fit range")) << '\n'
            << ind << " Max(particles):         " << fMaxParticles << '\n'
            << ind << " Poisson method:         " << fUsePoisson << '\n'
            << ind << " Use phi acceptance:     " << fUsePhiAcceptance << '\n'
@@ -886,6 +843,8 @@ AliFMDDensityCalculator::Print(Option_t* option) const
            << ind << " Phi lumping:            " << fPhiLumping << '\n'
            << std::noboolalpha
            << std::flush;
+  std::cout << ind << " Lower cut:" << std::endl;
+  fCuts.Print();
   TString opt(option);
   opt.ToLower();
   if (opt.Contains("nomax")) return;
@@ -954,6 +913,7 @@ AliFMDDensityCalculator::RingHistos::RingHistos(UShort_t d, Char_t r)
     fEmptyStrips(0),
     fBasicHits(0),
     fEmptyVsTotal(0),
+    fELoss(0),
     fELossUsed(0),
     fMultCut(0)
 {
index 7624a148f54fdda9da0904923751359a854eeeb4..04ba4635fd7a932f2a6722e0ea1a4ba6a401e0c6 100644 (file)
@@ -17,6 +17,7 @@
 #include <TList.h>
 #include <TArrayI.h>
 #include "AliForwardUtil.h"
+#include "AliFMDMultCuts.h"
 class AliESDFMD;
 class TH2D;
 class TH1D;
@@ -144,7 +145,7 @@ public:
    * 
    * @param cut Cut to use 
    */
-  void SetMultCut(Double_t cut) { SetMultCuts(cut,cut,cut,cut,cut); }
+  void SetMultCut(Double_t cut) { fCuts.SetMultCuts(cut,cut,cut,cut,cut); }
   /** 
    * Set the lower multiplicity cuts 
    * 
@@ -175,14 +176,21 @@ public:
    * 
    * @param n Number of @f$ \xi@f$ 
    */
-  void SetNXi(Double_t nXi) { fNXi = nXi; } 
+  void SetNXi(Double_t nXi) { fCuts.SetNXi(nXi); /* fNXi = nXi;*/ } 
   /** 
    * Whether to include sigma in the number subtracted from the MPV to
    * get the low cut
    * 
    * @param u If true, then low cut is @f$ \Delta_{mp} - n(\xi+\sigma)@f$ 
    */
-  void SetIncludeSigma(Bool_t u) { fIncludeSigma = u; }
+  void SetIncludeSigma(Bool_t u) { fCuts.SetIncludeSigma(u); /*fIncludeSigma = u;*/ }
+  /** 
+   * 
+   * Set the fraction of MPV
+   * 
+   * @param cut if true cut at fraction of MPV 
+   */
+  void SetFractionOfMPV(Double_t cut) { fCuts.SetMPVFraction(cut); /*fFractionOfMPV = cut;*/ }
   /** 
    * Get the multiplicity cut.  If the user has set fMultCut (via
    * SetMultCut) then that value is used.  If not, then the lower
@@ -208,6 +216,8 @@ public:
    *   - max  Print max weights 
    */
   void Print(Option_t* option="") const;
+  AliFMDMultCuts& GetCuts() { return fCuts; }
+  void SetCuts(const AliFMDMultCuts& c) { fCuts = c; }
 protected:
   /** 
    * Find the max weight to use for FMD<i>dr</i> in eta bin @a iEta
@@ -384,11 +394,7 @@ protected:
    * @return Ring histogram container 
    */
   RingHistos* GetRingHistos(UShort_t d, Char_t r) const;
-
   TList    fRingHistos;    //  List of histogram containers
-  Double_t fMultCut;       //  Low cut on scaled energy loss
-  Double_t fNXi;           //  Delta-n(xi+sigma) factor 
-  Bool_t   fIncludeSigma;  //  Whether or not to include sigma in cut
   TH1D*    fSumOfWeights;  //  Histogram
   TH1D*    fWeightedSum;   //  Histogram
   TH1D*    fCorrections;   //  Histogram
@@ -407,9 +413,9 @@ protected:
   Int_t    fEtaLumping;    //  How to lump eta bins for Poisson 
   Int_t    fPhiLumping;    //  How to lump phi bins for Poisson 
   Int_t    fDebug;         //  Debug level 
-  // Double_t fMultCuts[5];   //  Per-ring multiplicity cuts
+  AliFMDMultCuts fCuts; // Cuts
 
-  ClassDef(AliFMDDensityCalculator,4); // Calculate Nch density 
+  ClassDef(AliFMDDensityCalculator,6); // Calculate Nch density 
 };
 
 #endif
index 66e53629b24d5e3d96d2efed71ddac77b1caf0f6..8dc6ba4b54892a55830af5139b77959cf82eb9f8 100644 (file)
@@ -52,15 +52,17 @@ ClassImp(AliFMDSharingFilter)
 AliFMDSharingFilter::AliFMDSharingFilter()
   : TNamed(), 
     fRingHistos(),
-    fLowCut(0.),
     fCorrectAngles(kFALSE), 
     fNXi(1),
     fIncludeSigma(true),
     fSummed(0),
     fHighCuts(0),
+    fLowCuts(0),
     fOper(0),
     fDebug(0),
-    fZeroSharedHitsBelowThreshold(false)
+    fZeroSharedHitsBelowThreshold(false),
+    fLCuts(),
+    fHCuts()
 {
   // 
   // Default Constructor - do not use 
@@ -71,15 +73,17 @@ AliFMDSharingFilter::AliFMDSharingFilter()
 AliFMDSharingFilter::AliFMDSharingFilter(const char* title)
   : TNamed("fmdSharingFilter", title), 
     fRingHistos(), 
-    fLowCut(0.),
     fCorrectAngles(kFALSE), 
     fNXi(1),
     fIncludeSigma(true),
     fSummed(0),
     fHighCuts(0),
+    fLowCuts(0),
     fOper(0),
     fDebug(0),
-    fZeroSharedHitsBelowThreshold(false)
+    fZeroSharedHitsBelowThreshold(false),
+    fLCuts(),
+    fHCuts()
 {
   // 
   // Constructor 
@@ -92,21 +96,27 @@ AliFMDSharingFilter::AliFMDSharingFilter(const char* title)
   fRingHistos.Add(new RingHistos(2, 'O'));
   fRingHistos.Add(new RingHistos(3, 'I'));
   fRingHistos.Add(new RingHistos(3, 'O'));
+
+  fHCuts.SetNXi(1);
+  fHCuts.SetIncludeSigma(1);
+  fLCuts.SetMultCuts(.15);
 }
 
 //____________________________________________________________________
 AliFMDSharingFilter::AliFMDSharingFilter(const AliFMDSharingFilter& o)
   : TNamed(o), 
     fRingHistos(), 
-    fLowCut(o.fLowCut),
     fCorrectAngles(o.fCorrectAngles), 
     fNXi(o.fNXi),
     fIncludeSigma(o.fIncludeSigma),
     fSummed(o.fSummed),
     fHighCuts(o.fHighCuts),
+    fLowCuts(o.fLowCuts),
     fOper(o.fOper),
     fDebug(o.fDebug),
-    fZeroSharedHitsBelowThreshold(o.fZeroSharedHitsBelowThreshold)
+    fZeroSharedHitsBelowThreshold(o.fZeroSharedHitsBelowThreshold),
+    fLCuts(o.fLCuts),
+    fHCuts(o.fHCuts)
 {
   // 
   // Copy constructor 
@@ -143,16 +153,18 @@ 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;
+  fLowCuts                      = o.fLowCuts;
   fIncludeSigma                 = o.fIncludeSigma;
   fZeroSharedHitsBelowThreshold = o.fZeroSharedHitsBelowThreshold;
-
+  fLCuts                        = o.fLCuts;
+  fHCuts                        = o.fHCuts;
+    
   fRingHistos.Delete();
   TIter    next(&o.fRingHistos);
   TObject* obj = 0;
@@ -207,6 +219,13 @@ AliFMDSharingFilter::Init()
   fHighCuts->GetYaxis()->SetBinLabel(4, "FMD3i");
   fHighCuts->GetYaxis()->SetBinLabel(5, "FMD3o");
 
+  fLowCuts->SetBins(nEta, eAxis.GetXmin(), eAxis.GetXmax(), 5, .5, 5.5);
+  fLowCuts->GetYaxis()->SetBinLabel(1, "FMD1i");
+  fLowCuts->GetYaxis()->SetBinLabel(2, "FMD2i");
+  fLowCuts->GetYaxis()->SetBinLabel(3, "FMD2o");
+  fLowCuts->GetYaxis()->SetBinLabel(4, "FMD3i");
+  fLowCuts->GetYaxis()->SetBinLabel(5, "FMD3o");
+
   UShort_t ybin = 0;
   for (UShort_t d = 1; d <= 3; d++) {
     UShort_t nr = (d == 1 ? 1 : 2);
@@ -215,9 +234,10 @@ AliFMDSharingFilter::Init()
       ybin++;
       for (UShort_t e = 1; e <= nEta; e++) { 
        Double_t eta = eAxis.GetBinCenter(e);
-       Double_t cut = GetHighCut(d, r, eta, false);
-       if (cut <= 0) continue;
-       fHighCuts->SetBinContent(e, ybin, cut);
+       Double_t hcut = GetHighCut(d, r, eta, false);
+       Double_t lcut = GetLowCut(d, r, eta);
+       if (hcut > 0) fHighCuts->SetBinContent(e, ybin, hcut);
+       if (lcut > 0) fLowCuts ->SetBinContent(e, ybin, lcut);
       }
     }
   }
@@ -406,7 +426,7 @@ AliFMDSharingFilter::SignalInStrip(const AliESDFMD& input,
 }
 //_____________________________________________________________________
 Double_t 
-AliFMDSharingFilter::GetLowCut(UShort_t, Char_t, Double_t) const
+AliFMDSharingFilter::GetLowCut(UShort_t d, Char_t r, Double_t eta) const
 {
   //
   // Get the low cut.  Normally, the low cut is taken to be the lower
@@ -414,10 +434,19 @@ AliFMDSharingFilter::GetLowCut(UShort_t, Char_t, Double_t) const
   // However, if fLowCut is set (using SetLowCit) to a value greater
   // than 0, then that value is used.
   //
-  if (fLowCut > 0) return fLowCut;
+  return fLCuts.GetMultCut(d,r,eta,false);
+#if 0
+  if (!fCutAtFractionOfMPV && fLowCut > 0) return fLowCut;
+  
   AliForwardCorrectionManager&  fcm = AliForwardCorrectionManager::Instance();
   AliFMDCorrELossFit* fits = fcm.GetELossFit();
+  
+  if (fCutAtFractionOfMPV) {
+    AliFMDCorrELossFit::ELossFit* func = fits->GetFit(d,r,eta);
+    return fFractionOfMPV*func->GetDelta() ;
+  }  
   return fits->GetLowCut();
+#endif
 }
                        
 //_____________________________________________________________________
@@ -430,6 +459,8 @@ AliFMDSharingFilter::GetHighCut(UShort_t d, Char_t r,
   // most-probably-value peak found from the energy distributions, minus 
   // 2 times the width of the corresponding Landau.
   //
+  return fHCuts.GetMultCut(d,r,eta,errors); 
+#if 0
   AliForwardCorrectionManager&  fcm = AliForwardCorrectionManager::Instance();
 
  
@@ -439,6 +470,7 @@ AliFMDSharingFilter::GetHighCut(UShort_t d, Char_t r,
   AliFMDCorrELossFit* fits = fcm.GetELossFit();
   
   return fits->GetLowerBound(d, r, eta, fNXi, errors, fIncludeSigma);
+#endif
 }
 
 //_____________________________________________________________________
@@ -783,11 +815,16 @@ AliFMDSharingFilter::DefineOutput(TList* dir)
   fHighCuts->SetDirectory(0);
   d->Add(fHighCuts);
 
-  TParameter<double>* lowCut = new TParameter<double>("lowCut", fLowCut);
-  TParameter<double>* nXi    = new TParameter<double>("nXi", fNXi);
-  TNamed*             sigma  = new TNamed("sigma", fIncludeSigma ? 
-                                         "included" : "excluded");
-  sigma->SetUniqueID(fIncludeSigma);
+  fLowCuts = new TH2D("lowCuts", "Low cuts used", 1,0,1, 1,0,1);
+  fLowCuts->SetXTitle("#eta");
+  fLowCuts->SetDirectory(0);
+  d->Add(fLowCuts);
+
+  // TParameter<double>* lowCut = new TParameter<double>("lowCut", fLowCut);
+  // TParameter<double>* nXi    = new TParameter<double>("nXi", fNXi);
+  // TNamed*             sigma  = new TNamed("sigma", fIncludeSigma ? 
+  //                                     "included" : "excluded");
+  // sigma->SetUniqueID(fIncludeSigma);
   TNamed*             angle  = new TNamed("angle", fCorrectAngles ? 
                                          "corrected" : "uncorrected");
   angle->SetUniqueID(fCorrectAngles);
@@ -795,13 +832,13 @@ AliFMDSharingFilter::DefineOutput(TList* dir)
                                          fZeroSharedHitsBelowThreshold ? 
                                          "zeroed" : "kept");
   low->SetUniqueID(fZeroSharedHitsBelowThreshold);
-  d->Add(lowCut);
-  d->Add(nXi);
-  d->Add(sigma);
+  // d->Add(lowCut);
+  // d->Add(nXi);
+  // d->Add(sigma);
   d->Add(angle);
   d->Add(low);
-  
-
+  fLCuts.Output(d,"lCuts");
+  fHCuts.Output(d,"hCuts");
 
   TIter    next(&fRingHistos);
   RingHistos* o = 0;
@@ -825,13 +862,14 @@ AliFMDSharingFilter::Print(Option_t* /*option*/) const
   std::cout << ind << ClassName() << ": " << GetName() << '\n'
            << std::boolalpha 
            << ind << " Debug:                  " << fDebug << "\n"
-           << ind << " Low cut:                " << fLowCut << '\n'
-           << ind << " N xi factor:            " << fNXi    << '\n'
-           << ind << " Include sigma in cut:   " << fIncludeSigma << '\n'
            << ind << " Use corrected angles:   " << fCorrectAngles << '\n'
            << ind << " Zero below threshold:   " 
            << fZeroSharedHitsBelowThreshold 
            << std::noboolalpha << std::endl;
+  std::cout << ind << " Low cuts: " << std::endl;
+  fLCuts.Print();
+  std::cout << ind << " High cuts: " << std::endl;
+  fHCuts.Print();
 }
   
 //====================================================================
index e263a35b2e8fa07c511495d28aa69d25e5483496..226432666b1a6305fb484bec7c8a53a4fe09b85b 100644 (file)
@@ -20,6 +20,7 @@
 #include <TH2.h>
 #include <TList.h>
 #include "AliForwardUtil.h"
+#include "AliFMDMultCuts.h"
 class AliESDFMD;
 class TAxis;
 class TList;
@@ -99,12 +100,12 @@ public:
    * 
    * @param lowCut Low cut
    */
-  void SetLowCut(Double_t lowCut=0) { fLowCut = lowCut; }
+  void SetLowCut(Double_t lowCut=0) { fLCuts.SetMultCuts(lowCut); }
   /** 
    * Reset the low cut for sharing to use the fit range lower cut 
    * 
    */
-  void UnsetLowCut() { fLowCut = 0; }
+  void UnsetLowCut() { fLCuts.SetMultCuts(0); }
   /** 
    * Set the debug level.  The higher the value the more output 
    * 
@@ -133,14 +134,14 @@ public:
    * 
    * @param n Number of @f$ \xi@f$ 
    */
-  void SetNXi(Double_t n) { fNXi = n; }
+  void SetNXi(Double_t n) { fHCuts.SetNXi(n); /* fNXi = n; */ }
   /** 
    * Whether to include sigma in the number subtracted from the MPV to
    * get the high cut
    * 
    * @param u If true, then high cut is @f$ \Delta_{mp} - n(\xi+\sigma)@f$ 
    */
-  void SetIncludeSigma(Bool_t u) { fIncludeSigma = u; }
+  void SetIncludeSigma(Bool_t u) { fHCuts.SetIncludeSigma(u); /*fIncludeSigma = u;*/ }
   /** 
    * Filter the input AliESDFMD object
    * 
@@ -153,6 +154,13 @@ public:
   Bool_t Filter(const AliESDFMD& input, 
                Bool_t           lowFlux, 
                AliESDFMD&       output);
+  /** 
+   * 
+   * Set the fraction of MPV
+   * 
+   * @param u if true cut at fraction of MPV 
+   */
+  void SetFractionOfMPV(Double_t cut) { fHCuts.SetMPVFraction(cut); /* fFractionOfMPV = cut;*/ }
   /** 
    * Scale the histograms to the total number of events 
    * 
@@ -175,6 +183,13 @@ public:
    * @param option Not used 
    */
   virtual void Print(Option_t* option="") const;
+
+  AliFMDMultCuts& GetLCuts() { return fLCuts; }
+  AliFMDMultCuts& GetHCuts() { return fHCuts; }
+  const AliFMDMultCuts& GetLCuts() const { return fLCuts; }
+  const AliFMDMultCuts& GetHCuts() const { return fHCuts; }
+  void SetLCuts(const AliFMDMultCuts& c) { fLCuts = c; }
+  void SetHCuts(const AliFMDMultCuts& c) { fHCuts = c; }
 protected:
   /** 
    * Internal data structure to keep track of the histograms
@@ -359,17 +374,20 @@ protected:
   virtual Double_t GetLowCut(UShort_t d, Char_t r, Double_t eta) const;
 
   TList    fRingHistos;    // List of histogram containers
-  Double_t fLowCut;        // Low cut on sharing
+  // Double_t fLowCut;        // Low cut on sharing
   Bool_t   fCorrectAngles; // Whether to work on angle corrected signals
   Double_t fNXi;           // Number of xi's from Delta to stop merging
   Bool_t   fIncludeSigma;  // Whether to include sigma in cut 
   TH2*     fSummed;        // Operations histogram 
   TH2*     fHighCuts;      // High cuts used
+  TH2*     fLowCuts;       // 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); //
+  AliFMDMultCuts fLCuts;
+  AliFMDMultCuts fHCuts;
+
+  ClassDef(AliFMDSharingFilter,3); //
 };
 
 #endif