]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added ROOT THtml docs to .cxx and top .h
authorcholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 6 Jan 2011 11:44:40 +0000 (11:44 +0000)
committercholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 6 Jan 2011 11:44:40 +0000 (11:44 +0000)
42 files changed:
PWG2/FORWARD/analysis2/AliFMDCorrDoubleHit.cxx
PWG2/FORWARD/analysis2/AliFMDCorrDoubleHit.h
PWG2/FORWARD/analysis2/AliFMDCorrELossFit.cxx
PWG2/FORWARD/analysis2/AliFMDCorrELossFit.h
PWG2/FORWARD/analysis2/AliFMDCorrMergingEfficiency.cxx
PWG2/FORWARD/analysis2/AliFMDCorrMergingEfficiency.h
PWG2/FORWARD/analysis2/AliFMDCorrSecondaryMap.cxx
PWG2/FORWARD/analysis2/AliFMDCorrSecondaryMap.h
PWG2/FORWARD/analysis2/AliFMDCorrVertexBias.cxx
PWG2/FORWARD/analysis2/AliFMDCorrVertexBias.h
PWG2/FORWARD/analysis2/AliFMDCorrections.cxx
PWG2/FORWARD/analysis2/AliFMDCorrections.h
PWG2/FORWARD/analysis2/AliFMDDensityCalculator.cxx
PWG2/FORWARD/analysis2/AliFMDDensityCalculator.h
PWG2/FORWARD/analysis2/AliFMDEnergyFitter.cxx
PWG2/FORWARD/analysis2/AliFMDEnergyFitter.h
PWG2/FORWARD/analysis2/AliFMDEnergyFitterTask.cxx
PWG2/FORWARD/analysis2/AliFMDEnergyFitterTask.h
PWG2/FORWARD/analysis2/AliFMDEventInspector.cxx
PWG2/FORWARD/analysis2/AliFMDEventInspector.h
PWG2/FORWARD/analysis2/AliFMDHistCollector.cxx
PWG2/FORWARD/analysis2/AliFMDHistCollector.h
PWG2/FORWARD/analysis2/AliFMDMCCorrections.cxx
PWG2/FORWARD/analysis2/AliFMDMCCorrections.h
PWG2/FORWARD/analysis2/AliFMDMCDensityCalculator.cxx
PWG2/FORWARD/analysis2/AliFMDMCDensityCalculator.h
PWG2/FORWARD/analysis2/AliFMDMCSharingFilter.cxx
PWG2/FORWARD/analysis2/AliFMDMCSharingFilter.h
PWG2/FORWARD/analysis2/AliFMDSharingFilter.cxx
PWG2/FORWARD/analysis2/AliFMDSharingFilter.h
PWG2/FORWARD/analysis2/AliForwardCorrectionManager.cxx
PWG2/FORWARD/analysis2/AliForwardCorrectionManager.h
PWG2/FORWARD/analysis2/AliForwardMCCorrectionsTask.cxx
PWG2/FORWARD/analysis2/AliForwardMCCorrectionsTask.h
PWG2/FORWARD/analysis2/AliForwardMCMultiplicityTask.cxx
PWG2/FORWARD/analysis2/AliForwardMCMultiplicityTask.h
PWG2/FORWARD/analysis2/AliForwardMultiplicityBase.cxx
PWG2/FORWARD/analysis2/AliForwardMultiplicityBase.h
PWG2/FORWARD/analysis2/AliForwardMultiplicityTask.cxx
PWG2/FORWARD/analysis2/AliForwardMultiplicityTask.h
PWG2/FORWARD/analysis2/AliForwardUtil.cxx
PWG2/FORWARD/analysis2/AliForwardUtil.h

index 14640c6311f2c4f1881d1c27e41b8548b542233b..fb84e7fe8420ee018d9170846c6297c3ae81309f 100644 (file)
@@ -1,3 +1,8 @@
+//
+// This class contains the secondary correction and the double hit
+// correction used in low-flux events.
+//
+//
 #include "AliFMDCorrDoubleHit.h"
 #include <TBrowser.h>
 #include <TH1D.h>
@@ -8,6 +13,9 @@
 AliFMDCorrDoubleHit::AliFMDCorrDoubleHit()
   : fCorrections()
 {
+  // Constructor 
+  // 
+  // 
   fCorrections.SetOwner(kTRUE);
   fCorrections.SetName("doubleHit");
 }
@@ -16,16 +24,27 @@ AliFMDCorrDoubleHit::AliFMDCorrDoubleHit(const AliFMDCorrDoubleHit& o)
   : TObject(o), 
     fCorrections(o.fCorrections)
 {
+  // Copy constructor 
+  // 
+  // Parameters: 
+  //   o  Object to copy from 
 }
 //____________________________________________________________________
 AliFMDCorrDoubleHit::~AliFMDCorrDoubleHit()
 {
+  // 
+  // Destructor 
+  // 
   fCorrections.Clear();
 }
 //____________________________________________________________________
 AliFMDCorrDoubleHit&
 AliFMDCorrDoubleHit::operator=(const AliFMDCorrDoubleHit& o)
 {
+  // Assignment operator 
+  // 
+  // Parameters: 
+  //   o   Object to assign from 
   fCorrections   = o.fCorrections;
 
   return *this;
@@ -34,6 +53,16 @@ AliFMDCorrDoubleHit::operator=(const AliFMDCorrDoubleHit& o)
 TH1D*
 AliFMDCorrDoubleHit::GetCorrection(UShort_t d, Char_t r) const
 {
+  // 
+  // Get the double hit correction @f$ h_{r}(\eta)@f$ 
+  //
+  // Parameters:
+  //    d Detector number 
+  //    r Ring identifier 
+  // 
+  // Return:
+  //    @f$ h_{r}(\eta)@f$ 
+  //
   Int_t idx = GetRingIndex(d, r);
   if (idx < 0) return 0;
 
@@ -48,6 +77,17 @@ AliFMDCorrDoubleHit::GetCorrection(UShort_t d, Char_t r) const
 Int_t
 AliFMDCorrDoubleHit::GetRingIndex(UShort_t d, Char_t r) const
 {
+  // 
+  // Get the index corresponding to the given ring 
+  //
+  // Parameters:
+  //    d Detector
+  //    r Ring 
+  // 
+  // Return:
+  //    Index (0 based) or negative in case of errors
+  //
+
   switch (d) {
   case 1:  return 0;
   case 2:  return (r == 'I' || r == 'i' ? 1 : 2); break;  
@@ -60,6 +100,18 @@ AliFMDCorrDoubleHit::GetRingIndex(UShort_t d, Char_t r) const
 Bool_t
 AliFMDCorrDoubleHit::SetCorrection(UShort_t d, Char_t r, TH1D* h) 
 {
+  // 
+  // Set the double hit correction @f$ h_{r}(\eta)@f$. Note, that the
+  // object takes ownership of the passed pointer.
+  //
+  // Parameters:
+  //    d  Detector number (1-3)
+  //    r  Ring identifier (I or O)
+  //    h  @f$ h_{r}(\eta)@f$ 
+  // 
+  // Return:
+  //    true if operation succeeded 
+  //
   Int_t idx = GetRingIndex(d, r);
   if (idx < 0) return kFALSE;
 
@@ -80,12 +132,20 @@ AliFMDCorrDoubleHit::SetCorrection(UShort_t d, Char_t r, TH1D* h)
 void
 AliFMDCorrDoubleHit::Browse(TBrowser* b)
 {
+  // BRowse this object 
+  // 
+  // Parameters:
+  //  b   Browser to use
   b->Add(&fCorrections);
 }
 //____________________________________________________________________
 void
 AliFMDCorrDoubleHit::Print(Option_t* option) const
 {
+  // Print this object 
+  // 
+  // Parameters:
+  //  option   Passed to TH2D::Print 
   std::cout << "Double hit correction" << std::endl;
   fCorrections.Print(option);
 }
index 0056c581e756562e9edfc41bc87bf3fde53b112b..e64591d454e6ac42a2054d180adc2a2e3837acd8 100644 (file)
@@ -2,8 +2,8 @@
 // This class contains the secondary correction and the double hit
 // correction used in low-flux events.
 //
-#ifndef ALIROOT_PWG2_FORWARD_ANALYSIS_ALIFMDCORRDOUBLEHIT_H
-#define ALIROOT_PWG2_FORWARD_ANALYSIS_ALIFMDCORRDOUBLEHIT_H
+#ifndef ALIFMDCORRDOUBLEHIT_H
+#define ALIFMDCORRDOUBLEHIT_H
 #include <TObject.h>
 #include <TObjArray.h>
 class TH1D;
index 862af3896c6fa54ea19515ba5c1a77fe2e1efea5..15885536fb98d5f7ca7cdd8d479cd408fb666ae6 100644 (file)
@@ -1,3 +1,6 @@
+// Object holding the Energy loss fit 'correction'
+// 
+// These are generated from Monte-Carlo or real ESDs. 
 #include "AliFMDCorrELossFit.h"
 #include "AliForwardUtil.h"
 #include <TF1.h>
@@ -35,7 +38,12 @@ AliFMDCorrELossFit::ELossFit::ELossFit()
     fDet(0), 
     fRing('\0'),
     fBin(0)
-{}
+{
+  //
+  // Default constructor 
+  // 
+  //
+}
 //____________________________________________________________________
 AliFMDCorrELossFit::ELossFit::ELossFit(Int_t quality, const TF1& f)
   : fN(f.GetNpar() > AliForwardUtil::ELossFitter::kN ? 
@@ -60,6 +68,13 @@ AliFMDCorrELossFit::ELossFit::ELossFit(Int_t quality, const TF1& f)
     fRing('\0'),
     fBin(0)
 {
+  // 
+  // Construct from a function
+  // 
+  // Parameters:
+  //    quality Quality flag
+  //    f       Function
+  //
   if (fN <= 0) return;
   fA  = new Double_t[fN];
   fEA = new Double_t[fN];
@@ -100,6 +115,29 @@ AliFMDCorrELossFit::ELossFit::ELossFit(Int_t     quality,UShort_t  n,
     fRing('\0'),
     fBin(0)
 {
+  // 
+  // Constructor with full parameter set
+  // 
+  // Parameters:
+  //    quality   Quality flag
+  //    n         @f$ N@f$ - Number of fitted peaks
+  //    chi2      @f$ \chi^2 @f$
+  //    nu        @f$ \nu @f$ - number degrees of freedom
+  //    c         @f$ C@f$ - scale constant
+  //    ec        @f$ \delta C@f$ - error on @f$ C@f$ 
+  //    delta     @f$ \Delta@f$ - Most probable value            
+  //    edelta    @f$ \delta\Delta@f$ - error on @f$\Delta@f$ 
+  //    xi        @f$ \xi@f$ - width  
+  //    exi       @f$ \delta\xi@f$ - error on @f$\xi@f$ 
+  //    sigma     @f$ \sigma@f$ - Width of Gaussian               
+  //    esigma    @f$ \delta\sigma@f$ - error on @f$\sigma@f$ 
+  //    sigman    @f$ \sigma_n@f$ - Noise width                  
+  //    esigman   @f$ \delta\sigma_n@f$ - error on @f$\sigma_n@f$ 
+  //    a         Array of @f$ N-1@f$ weights @f$ a_i@f$ for 
+  //                  @f$ i=2,\ldots@f$ 
+  //    ea        Array of @f$ N-1@f$ error on the weights @f$ a_i@f$ for 
+  //                  @f$ i=2,\ldots@f$ 
+  //
   if (fN <= 0) return;
   fA  = new Double_t[fN];
   fEA = new Double_t[fN];
@@ -133,6 +171,12 @@ AliFMDCorrELossFit::ELossFit::ELossFit(const ELossFit& o)
     fRing(o.fRing),
     fBin(o.fBin)
 {
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //    o Object to copy from 
+  //
   if (fN <= 0) return;
   fA  = new Double_t[fN];
   fEA = new Double_t[fN];
@@ -148,6 +192,15 @@ AliFMDCorrELossFit::ELossFit::ELossFit(const ELossFit& o)
 AliFMDCorrELossFit::ELossFit&
 AliFMDCorrELossFit::ELossFit::operator=(const ELossFit& o)
 {
+  // 
+  // Assignment operator 
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this object 
+  //
   fN      = o.fN;
   fNu     = o.fNu;
   fChi2           = o.fChi2;
@@ -195,6 +248,23 @@ AliFMDCorrELossFit::ELossFit::FindMaxWeight(Double_t maxRelError,
                                            Double_t leastWeight, 
                                            UShort_t  maxN) const
 {
+  // 
+  // Find the maximum weight to use.  The maximum weight is the
+  // largest i for which 
+  // 
+  // - @f$ i \leq \max{N}@f$ 
+  // - @f$ a_i > \min{a}@f$ 
+  // - @f$ \delta a_i/a_i > \delta_{max}@f$ 
+  // 
+  // Parameters:
+  //    maxRelError @f$ \min{a}@f$ 
+  //    leastWeight @f$ \delta_{max}@f$ 
+  //    maxN        @f$ \max{N}@f$      
+  // 
+  // Return:
+  //    The largest index @f$ i@f$ for which the above
+  // conditions hold.  Will never return less than 1. 
+  //
   Int_t n = TMath::Min(maxN, UShort_t(fN-1));
   Int_t m = 1;
   // fN is one larger than we have data 
@@ -210,6 +280,23 @@ Double_t
 AliFMDCorrELossFit::ELossFit::Evaluate(Double_t x, 
                                       UShort_t maxN) const
 {
+  // 
+  // Evaluate 
+  // @f[ 
+  //  f_N(x;\Delta,\xi,\sigma') = 
+  //     \sum_{i=1}^{n} a_i f(x;\Delta_i,\xi_i,\sigma_i')
+  // @f] 
+  //
+  // (see AliForwardUtil::NLandauGaus) for the maximum @f$ N @f$
+  // that fulfills the requirements 
+  // 
+  // Parameters:
+  //    x           Where to evaluate 
+  //    maxN     @f$ \max{N}@f$    
+  // 
+  // Return:
+  //    @f$ f_N(x;\Delta,\xi,\sigma')@f$ 
+  //
   return AliForwardUtil::NLandauGaus(x, fDelta, fXi, fSigma, fSigmaN, 
                                     TMath::Min(maxN, UShort_t(fN)), fA);
 }
@@ -219,6 +306,29 @@ Double_t
 AliFMDCorrELossFit::ELossFit::EvaluateWeighted(Double_t x, 
                                               UShort_t maxN) const
 {                                                                      
+  // 
+  // Evaluate 
+  // @f[ 
+  //   f_W(x;\Delta,\xi,\sigma') = 
+  //   \frac{\sum_{i=1}^{n} i a_i f_i(x;\Delta,\xi,\sigma')}{
+  //     f_N(x;\Delta,\xi,\sigma')} = 
+  //   \frac{\sum_{i=1}^{n} i a_i f(x;\Delta_i,\xi_i,\sigma_i')}{
+  //     \sum_{i=1}^{n} a_i f(x;\Delta_i,\xi_i,\sigma_i')}
+  // @f] 
+  // where @f$ n@f$ fulfills the requirements (see FindMaxWeight). 
+  //
+  // If the denominator is zero, then 1 is returned. 
+  //
+  // See also AliForwardUtil::ILandauGaus and AliForwardUtil::NLandauGaus
+  // for more information on the evaluated functions. 
+  // 
+  // Parameters:
+  //    x           Where to evaluate 
+  //    maxN     @f$ \max{N}@f$      
+  // 
+  // Return:
+  //    @f$ f_W(x;\Delta,\xi,\sigma')@f$.  
+  //
   UShort_t n   = TMath::Min(maxN, UShort_t(fN-1));
   Double_t num = 0;
   Double_t den = 0;
@@ -247,6 +357,18 @@ AliFMDCorrELossFit::ELossFit::EvaluateWeighted(Double_t x,
 Int_t
 AliFMDCorrELossFit::ELossFit::Compare(const TObject* o) const
 {
+  // 
+  // Compare to another ELossFit object. 
+  // 
+  // - +1, if this quality is better (larger) than other objects quality
+  // - -1, if this quality is worse (smaller) than other objects quality
+  // - +1, if this @f$|\chi^2/\nu-1|@f$ is smaller than the same for other
+  // - -1, if this @f$|\chi^2/\nu-1|@f$ is larger than the same for other
+  // - 0 otherwise 
+  // 
+  // Parameters:
+  //    o Other object to compare to 
+  //
   const ELossFit* other = static_cast<const ELossFit*>(o);
   if (this->fQuality < other->fQuality) return -1;
   if (this->fQuality > other->fQuality) return +1;
@@ -261,6 +383,12 @@ AliFMDCorrELossFit::ELossFit::Compare(const TObject* o) const
 void
 AliFMDCorrELossFit::ELossFit::Print(Option_t*) const
 {
+  // 
+  // Information to standard output 
+  // 
+  // Parameters:
+  //    option Not used 
+  //
   std::cout << GetName() << ":\n"
            << " chi^2/nu = " << fChi2 << "/" << fNu << " = " 
            << (fNu == 0 ? 999 : fChi2 / fNu) << "\n"
@@ -279,6 +407,13 @@ AliFMDCorrELossFit::ELossFit::Print(Option_t*) const
 const Char_t*
 AliFMDCorrELossFit::ELossFit::GetName() const 
 {
+  // 
+  // Get the name of this object 
+  // 
+  // 
+  // Return:
+  //    
+  //
   return Form("FMD%d%c_etabin%03d", fDet, fRing, fBin);
 }
 
@@ -286,7 +421,12 @@ AliFMDCorrELossFit::ELossFit::GetName() const
 void
 AliFMDCorrELossFit::ELossFit::Browse(TBrowser* b)
 {
-  // Draw this one 
+  // 
+  // Browse this object 
+  // 
+  // Parameters:
+  //    b Browser
+  //
   Draw(b ? b->GetDrawOption() : "comp");
   gPad->SetLogy();
   gPad->Update();
@@ -296,6 +436,13 @@ AliFMDCorrELossFit::ELossFit::Browse(TBrowser* b)
 void
 AliFMDCorrELossFit::ELossFit::Draw(Option_t* option)
 {
+  // 
+  // Draw this fit 
+  // 
+  // Parameters:
+  //    option Options 
+  //  - COMP  Draw components too 
+  //
   TString opt(option);
   opt.ToUpper();
   bool comp = false;
@@ -369,6 +516,9 @@ AliFMDCorrELossFit::ELossFit::CalculateQuality(Double_t maxChi2nu,
                                               Double_t maxRelError, 
                                               Double_t leastWeight)
 {
+  // 
+  // Calculate the quality 
+  //
   Int_t qual = 0;
   if (fNu > 0 && fChi2 / fNu < maxChi2nu) qual += 4;;
   if (CHECKPAR(fDelta,  fEDelta,  maxRelError)) qual++;
@@ -386,6 +536,9 @@ AliFMDCorrELossFit::AliFMDCorrELossFit()
     fEtaAxis(0,0,0), 
     fLowCut(0)
 {
+  // 
+  // Default constructor 
+  //
   fRings.SetOwner(kTRUE);
   fEtaAxis.SetTitle("#eta");
   fEtaAxis.SetName("etaAxis");
@@ -399,6 +552,12 @@ AliFMDCorrELossFit::AliFMDCorrELossFit(const AliFMDCorrELossFit& o)
     fEtaAxis(o.fEtaAxis.GetNbins(),o.fEtaAxis.GetXmin(),o.fEtaAxis.GetXmax()), 
     fLowCut(0)
 {
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //    o Object to copy from 
+  //
   fEtaAxis.SetTitle("#eta");
   fEtaAxis.SetName("etaAxis");
 }
@@ -406,6 +565,9 @@ AliFMDCorrELossFit::AliFMDCorrELossFit(const AliFMDCorrELossFit& o)
 //____________________________________________________________________
 AliFMDCorrELossFit::~AliFMDCorrELossFit()
 {
+  // 
+  // Destructor 
+  //
   fRings.Clear();
 }
 
@@ -413,6 +575,15 @@ AliFMDCorrELossFit::~AliFMDCorrELossFit()
 AliFMDCorrELossFit&
 AliFMDCorrELossFit::operator=(const AliFMDCorrELossFit& o)
 {
+  // 
+  // Assignment operator 
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this object 
+  //
   fRings = o.fRings;
   fLowCut = o.fLowCut;
   SetEtaAxis(o.fEtaAxis.GetNbins(), o.fEtaAxis.GetXmin(), o.fEtaAxis.GetXmax());
@@ -423,6 +594,16 @@ AliFMDCorrELossFit::operator=(const AliFMDCorrELossFit& o)
 Int_t
 AliFMDCorrELossFit::FindEtaBin(Double_t eta) const
 {
+  // 
+  // Find the eta bin corresponding to the given eta 
+  // 
+  // Parameters:
+  //    eta  Eta value 
+  // 
+  // Return:
+  //    Bin (in @f$[1,N_{bins}]@f$) corresponding to the given
+  // eta, or 0 if out of range.
+  //
   if (fEtaAxis.GetXmin() == fEtaAxis.GetXmax() || fEtaAxis.GetNbins() == 0) {
     AliWarning("No eta axis defined");
     return -1;
@@ -436,6 +617,15 @@ AliFMDCorrELossFit::FindEtaBin(Double_t eta) const
 Bool_t
 AliFMDCorrELossFit::SetFit(UShort_t d, Char_t r, Int_t etaBin, ELossFit* fit)
 {
+  // 
+  // Set the fit parameters from a function 
+  // 
+  // Parameters:
+  //    d       Detector
+  //    r       Ring 
+  //    etaBin  Eta (bin number, 1->nBins)
+  //    f       ELoss fit result - note, the object will take ownership
+  //  
   TObjArray* ringArray = GetOrMakeRingArray(d, r);
   if (!ringArray) { 
     AliError(Form("Failed to make ring array for FMD%d%c", d, r));
@@ -455,6 +645,15 @@ AliFMDCorrELossFit::SetFit(UShort_t d, Char_t r, Int_t etaBin, ELossFit* fit)
 Bool_t
 AliFMDCorrELossFit::SetFit(UShort_t d, Char_t r, Double_t eta, ELossFit* fit)
 {
+  // 
+  // Set the fit parameters from a function 
+  // 
+  // Parameters:
+  //    d    Detector
+  //    r    Ring 
+  //    eta  Eta 
+  //    f    ELoss fit result - note, the object will take ownership
+  //  
   Int_t bin = FindEtaBin(eta);
   if (bin <= 0) { 
     AliError(Form("eta=%f is out of range [%f,%f]", 
@@ -477,6 +676,32 @@ AliFMDCorrELossFit::SetFit(UShort_t  d,      Char_t    r,
                           Double_t  sigman, Double_t  esigman, 
                           Double_t* a,      Double_t* ea)
 {
+  // 
+  // Set the fit parameters from a function 
+  // 
+  // Parameters:
+  //    d         Detector number
+  //    r         Ring identifier 
+  //    eta       Eta value
+  //    quality   Quality flag
+  //    n         @f$ N@f$ - Number of fitted peaks
+  //    chi2      @f$ \chi^2 @f$
+  //    nu        @f$ \nu @f$ - number degrees of freedom
+  //    c         @f$ C@f$ - scale constant
+  //    ec        @f$ \delta C@f$ - error on @f$ C@f$ 
+  //    delta     @f$ \Delta@f$ - most probable value
+  //    edelta    @f$ \delta\Delta@f$ - error on @f$\Delta@f$ 
+  //    xi        @f$ \xi@f$ - Landau width              
+  //    exi       @f$ \delta\xi@f$ - error on @f$\xi@f$ 
+  //    sigma     @f$ \sigma@f$ - Gaussian width
+  //    esigma    @f$ \delta\sigma@f$ - error on @f$\sigma@f$ 
+  //    sigman    @f$ \sigma_n@f$ - Noise width                  
+  //    esigman   @f$ \delta\sigma_n@f$ - error on @f$\sigma_n@f$ 
+  //    a         Array of @f$ N-1@f$ weights @f$ a_i@f$ for 
+  //                  @f$ i=2,\ldots@f$ 
+  //    ea        Array of @f$ N-1@f$ errors on weights @f$ a_i@f$ for 
+  //                  @f$ i=2,\ldots@f$ 
+  //
   ELossFit* e = new ELossFit(quality, n, 
                             chi2,    nu,
                             c,       ec,
@@ -496,6 +721,16 @@ Bool_t
 AliFMDCorrELossFit::SetFit(UShort_t  d, Char_t r, Double_t eta, 
                           Int_t quality, const TF1& f)
 {
+  // 
+  // Set the fit parameters from a function 
+  // 
+  // Parameters:
+  //    d        Detector
+  //    r        Ring 
+  //    eta      Eta 
+  //    quality  Quality flag
+  //    f        Function from fit 
+  //  
   ELossFit* e = new ELossFit(quality, f);
   if (!SetFit(d, r, eta, e)) { 
     delete e;
@@ -507,6 +742,17 @@ AliFMDCorrELossFit::SetFit(UShort_t  d, Char_t r, Double_t eta,
 AliFMDCorrELossFit::ELossFit*
 AliFMDCorrELossFit::FindFit(UShort_t  d, Char_t r, Int_t etabin) const
 {
+  // 
+  // Find the fit corresponding to the specified parameters 
+  // 
+  // Parameters:
+  //    d      Detector 
+  //    r      Ring 
+  //    etabin Eta bin (1 based)
+  // 
+  // Return:
+  //    Fit parameters or null in case of problems 
+  //
   TObjArray* ringArray = GetRingArray(d, r);
   if (!ringArray) { 
     AliError(Form("Failed to make ring array for FMD%d%c", d, r));
@@ -539,6 +785,17 @@ AliFMDCorrELossFit::FindFit(UShort_t  d, Char_t r, Int_t etabin) const
 AliFMDCorrELossFit::ELossFit*
 AliFMDCorrELossFit::FindFit(UShort_t  d, Char_t r, Double_t eta) const
 {
+  // 
+  // Find the fit corresponding to the specified parameters 
+  // 
+  // Parameters:
+  //    d   Detector 
+  //    r   Ring 
+  //    eta Eta value 
+  // 
+  // Return:
+  //    Fit parameters or null in case of problems 
+  //
   Int_t etabin = FindEtaBin(eta);
   return FindFit(d, r, etabin);
 }
@@ -546,6 +803,16 @@ AliFMDCorrELossFit::FindFit(UShort_t  d, Char_t r, Double_t eta) const
 TObjArray*
 AliFMDCorrELossFit::GetRingArray(UShort_t d, Char_t r) const
 {
+  // 
+  // Get the ring array corresponding to the specified ring
+  // 
+  // Parameters:
+  //    d Detector 
+  //    r Ring 
+  // 
+  // Return:
+  //    Pointer to ring array, or null in case of problems
+  //
   Int_t idx = -1;
   switch (d) { 
   case 1:   idx = 0; break;
@@ -559,6 +826,16 @@ AliFMDCorrELossFit::GetRingArray(UShort_t d, Char_t r) const
 TObjArray*
 AliFMDCorrELossFit::GetOrMakeRingArray(UShort_t d, Char_t r)
 {
+  // 
+  // Get the ring array corresponding to the specified ring
+  // 
+  // Parameters:
+  //    d Detector 
+  //    r Ring 
+  // 
+  // Return:
+  //    Pointer to ring array, or newly created container 
+  //
   Int_t idx = -1;
   switch (d) { 
   case 1:   idx = 0; break;
@@ -598,6 +875,13 @@ namespace {
 void
 AliFMDCorrELossFit::Draw(Option_t* option)
 {
+  // 
+  // Draw this object 
+  // 
+  // Parameters:
+  //    option Options.  Possible values are 
+  //  - err Plot error bars 
+  //
   TString opt(Form("nostack %s", option));
   opt.ToLower();
   Bool_t  rel = (opt.Contains("rel"));
@@ -818,6 +1102,12 @@ AliFMDCorrELossFit::Print(Option_t* option) const
 void
 AliFMDCorrELossFit::Browse(TBrowser* b)
 {
+  // 
+  // Browse this object 
+  // 
+  // Parameters:
+  //    b 
+  //
   b->Add(&fRings);
   b->Add(&fEtaAxis);
 }
index 4da19de6ea86380b1f6e194a28aef035c7297f2c..3e6fac86b4f24837e002cb7d3a4a3fad7ac329aa 100644 (file)
@@ -1,5 +1,8 @@
-#ifndef ALIROOT_PWG2_FORWARD_ALIFMDCORRELOSSFIT_H
-#define ALIROOT_PWG2_FORWARD_ALIFMDCORRELOSSFIT_H
+// Object holding the Energy loss fit 'correction'
+// 
+// These are generated from Monte-Carlo or real ESDs. 
+#ifndef ALIFMDCORRELOSSFIT_H
+#define ALIFMDCORRELOSSFIT_H
 #include <TObject.h>
 #include <TAxis.h>
 #include <TObjArray.h>
index 8ac414f4a2e1892670df8e07c63a4cc5fb8cdab1..c568ff4ad112d3a9602b37ebb3b91475a1e52c1f 100644 (file)
@@ -1,3 +1,7 @@
+//
+// This class contains the secondary correction and the double hit
+// correction used in low-flux events.
+//
 #include "AliFMDCorrMergingEfficiency.h"
 #include <TBrowser.h>
 #include <TH1D.h>
@@ -9,6 +13,9 @@ AliFMDCorrMergingEfficiency::AliFMDCorrMergingEfficiency()
   : fRingArray(), 
     fVertexAxis(0,0,0)
 {
+  // 
+  // Default constructor 
+  //
   fRingArray.SetOwner(kTRUE);
   fRingArray.SetName("rings");
   fVertexAxis.SetName("vtxAxis");
@@ -23,18 +30,37 @@ AliFMDCorrMergingEfficiency::AliFMDCorrMergingEfficiency(const
     fVertexAxis(o.fVertexAxis.GetNbins(), o.fVertexAxis.GetXmin(), 
                o.fVertexAxis.GetXmax())
 {
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //    o Object to copy from 
+  //
   fVertexAxis.SetName("vtxAxis");
   fVertexAxis.SetTitle("v_{z} [cm]");
 }
 //____________________________________________________________________
 AliFMDCorrMergingEfficiency::~AliFMDCorrMergingEfficiency()
 {
+  //
+  // Destructor 
+  // 
+  //
   fRingArray.Clear();
 }
 //____________________________________________________________________
 AliFMDCorrMergingEfficiency&
 AliFMDCorrMergingEfficiency::operator=(const AliFMDCorrMergingEfficiency& o)
 {
+  // 
+  // Assignment operator 
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this object 
+  //
   fRingArray        = o.fRingArray;
   SetVertexAxis(o.fVertexAxis);
 
@@ -44,6 +70,17 @@ AliFMDCorrMergingEfficiency::operator=(const AliFMDCorrMergingEfficiency& o)
 TH1D*
 AliFMDCorrMergingEfficiency::GetCorrection(UShort_t d, Char_t r, Double_t v) const
 {
+  // 
+  // Get the secondary correction @f$ c_{r,v}@f$ 
+  // 
+  // Parameters:
+  //    d  Detector number (1-3)
+  //    r  Ring identifier (I or O)
+  //    v  Primary interaction point @f$z@f$ coordinate
+  // 
+  // Return:
+  //    The correction @f$ c_{r,v}@f$ 
+  //
   Int_t b = FindVertexBin(v);
   if (b <= 0) return 0;
   return GetCorrection(d, r, UShort_t(b));
@@ -52,6 +89,18 @@ AliFMDCorrMergingEfficiency::GetCorrection(UShort_t d, Char_t r, Double_t v) con
 TH1D*
 AliFMDCorrMergingEfficiency::GetCorrection(UShort_t d, Char_t r, UShort_t b) const
 {
+  // 
+  // Get the secondary correction @f$ c_{r,v}@f$ 
+  // 
+  // Parameters:
+  //    d  Detector number (1-3)
+  //    r  Ring identifier (I or O)
+  //    b  Bin corresponding to the primary interaction point 
+  //           @f$z@f$ coordinate (1 based)
+  // 
+  // Return:
+  //    The correction @f$ c_{r,v}@f$ 
+  //
   TObjArray* ringArray = GetRingArray(d, r);
   if (!ringArray) return 0;
 
@@ -74,6 +123,16 @@ AliFMDCorrMergingEfficiency::GetCorrection(UShort_t d, Char_t r, UShort_t b) con
 Int_t
 AliFMDCorrMergingEfficiency::FindVertexBin(Double_t v) const
 {
+  // 
+  // Find the vertex bin that corresponds to the passed vertex 
+  // 
+  // Parameters:
+  //    vertex The interaction points @f$z@f$-coordinate 
+  // 
+  // Return:
+  //    Vertex bin in @f$[1,N_{\mbox{vertex}}]@f$ or negative if 
+  // out of range 
+  //
   if (fVertexAxis.GetNbins() <= 0) { 
     AliWarning("No vertex array defined");
     return 0;
@@ -90,6 +149,16 @@ AliFMDCorrMergingEfficiency::FindVertexBin(Double_t v) const
 Int_t
 AliFMDCorrMergingEfficiency::GetRingIndex(UShort_t d, Char_t r) const
 {
+  // 
+  // Get the index corresponding to the given ring 
+  // 
+  // Parameters:
+  //    d Detector
+  //    r Ring 
+  // 
+  // Return:
+  //    Index (0 based) or negative in case of errors
+  //
   switch (d) {
   case 1:  return 0;
   case 2:  return (r == 'I' || r == 'i' ? 1 : 2); break;  
@@ -102,6 +171,16 @@ AliFMDCorrMergingEfficiency::GetRingIndex(UShort_t d, Char_t r) const
 TObjArray*
 AliFMDCorrMergingEfficiency::GetRingArray(UShort_t d, Char_t r) const
 {
+  // 
+  // Get the ring array corresponding to the specified ring
+  // 
+  // Parameters:
+  //    d Detector 
+  //    r Ring 
+  // 
+  // Return:
+  //    Pointer to ring array, or null in case of problems
+  //
   Int_t idx = GetRingIndex(d,r);
   if (idx < 0) return 0;
   
@@ -117,6 +196,16 @@ AliFMDCorrMergingEfficiency::GetRingArray(UShort_t d, Char_t r) const
 TObjArray*
 AliFMDCorrMergingEfficiency::GetOrMakeRingArray(UShort_t d, Char_t r)
 {
+  // 
+  // Get the ring array corresponding to the specified ring
+  // 
+  // Parameters:
+  //    d Detector 
+  //    r Ring 
+  // 
+  // Return:
+  //    Pointer to ring array, or newly created container 
+  //
   Int_t idx = GetRingIndex(d,r);
   if (idx < 0) return 0;
   
@@ -137,6 +226,20 @@ Bool_t
 AliFMDCorrMergingEfficiency::SetCorrection(UShort_t d, Char_t r, 
                                           UShort_t b, TH1D*  h) 
 {
+  // 
+  // Set the secondary map correction @f$ m_{r,v}(\eta)@f$ 
+  // Note, that the object takes ownership of the passed pointer.
+  // 
+  // Parameters:
+  //    d    Detector number (1-3)
+  //    r    Ring identifier (I or O)
+  //    b    Bin corresponding to the primary interaction point 
+  //             @f$z@f$ coordinate  (1 based)
+  //    h    @f$ m_{r,v}(\eta)@f$ 
+  // 
+  // Return:
+  //    true if operation succeeded 
+  //
   TObjArray* ringArray = GetOrMakeRingArray(d, r);
   if (!ringArray) return false;
   
@@ -163,6 +266,19 @@ Bool_t
 AliFMDCorrMergingEfficiency::SetCorrection(UShort_t d, Char_t r, 
                                           Double_t v, TH1D*  h) 
 {
+  // 
+  // Set the secondary map correction @f$ m_{r,v}(\eta)@f$.
+  // Note, that the object takes ownership of the passed pointer.
+  // 
+  // Parameters:
+  //    d    Detector number (1-3)
+  //    r    Ring identifier (I or O)
+  //    v    Primary interaction point @f$z@f$ coordinate  
+  //    h    @f$ m_{r,v}(\eta)@f$ 
+  // 
+  // Return:
+  //    true if operation succeeded 
+  //
   Int_t b = FindVertexBin(v);
   if (b <= 0 || b > fVertexAxis.GetNbins()) { 
     AliWarning(Form("Vertex %+8.4f out of range [%+8.4f,%+8.4f]", 
@@ -175,6 +291,12 @@ AliFMDCorrMergingEfficiency::SetCorrection(UShort_t d, Char_t r,
 void
 AliFMDCorrMergingEfficiency::Browse(TBrowser* b)
 {
+  // 
+  // Browse this object in the browser
+  // 
+  // Parameters:
+  //    b 
+  //
   b->Add(&fRingArray);
   b->Add(&fVertexAxis);
 }
@@ -182,6 +304,12 @@ AliFMDCorrMergingEfficiency::Browse(TBrowser* b)
 void
 AliFMDCorrMergingEfficiency::Print(Option_t* option) const
 {
+  // 
+  // Print this object 
+  // 
+  // Parameters:
+  //    option 
+  //  
   std::cout << "Merging efficiency correction" << std::endl;
   fRingArray.Print(option);
   fVertexAxis.Print(option);
index 797b1e02104617a5ccc3599d49f9decc2f094842..b03f5b931d9cfb2d9779ba4263d21ed3f9a5ac82 100644 (file)
@@ -2,8 +2,8 @@
 // This class contains the secondary correction and the double hit
 // correction used in low-flux events.
 //
-#ifndef ALIROOT_PWG2_FORWARD_ANALYSIS_ALIFMDCORRMERGINGEFFICIENCY_H
-#define ALIROOT_PWG2_FORWARD_ANALYSIS_ALIFMDCORRMERGINGEFFICIENCY_H
+#ifndef ALIFMDCORRMERGINGEFFICIENCY_H
+#define ALIFMDCORRMERGINGEFFICIENCY_H
 #include <TObject.h>
 #include <TObjArray.h>
 #include <TAxis.h>
index f92973ad748645a8ff6ea0bd203c672111cc49ef..cc43e06eab8b23eb4e3612467f7a3973dae5fe43 100644 (file)
@@ -1,3 +1,7 @@
+//
+// This class contains the secondary correction and the double hit
+// correction used in low-flux events.
+//
 #include "AliFMDCorrSecondaryMap.h"
 #include <TBrowser.h>
 #include <TH2D.h>
@@ -10,6 +14,9 @@ AliFMDCorrSecondaryMap::AliFMDCorrSecondaryMap()
     fVertexAxis(0,0,0),
     fEtaAxis(0,0,0)
 {
+  // 
+  // Default constructor 
+  //
   fRingArray.SetOwner(kTRUE);
   fRingArray.SetName("rings");
   fVertexAxis.SetName("vertexAxis");
@@ -28,6 +35,12 @@ AliFMDCorrSecondaryMap::AliFMDCorrSecondaryMap(const
     fEtaAxis(o.fEtaAxis.GetNbins(), o.fEtaAxis.GetXmin(), 
             o.fEtaAxis.GetXmax())
 {
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //    o Object to copy from 
+  //
   fVertexAxis.SetName("vertexAxis");
   fVertexAxis.SetTitle("v_{z} [cm]");
   fEtaAxis.SetName("etaAxis");
@@ -36,12 +49,25 @@ AliFMDCorrSecondaryMap::AliFMDCorrSecondaryMap(const
 //____________________________________________________________________
 AliFMDCorrSecondaryMap::~AliFMDCorrSecondaryMap()
 {
+  //
+  // Destructor 
+  // 
+  //
   fRingArray.Clear();
 }
 //____________________________________________________________________
 AliFMDCorrSecondaryMap&
 AliFMDCorrSecondaryMap::operator=(const AliFMDCorrSecondaryMap& o)
 {
+  // 
+  // Assignment operator 
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this object 
+  //
   fRingArray        = o.fRingArray;
   SetVertexAxis(o.fVertexAxis);
   SetEtaAxis(o.fEtaAxis);
@@ -52,6 +78,17 @@ AliFMDCorrSecondaryMap::operator=(const AliFMDCorrSecondaryMap& o)
 TH2D*
 AliFMDCorrSecondaryMap::GetCorrection(UShort_t d, Char_t r, Double_t v) const
 {
+  // 
+  // Get the secondary correction @f$ c_{r,v}@f$ 
+  // 
+  // Parameters:
+  //    d  Detector number (1-3)
+  //    r  Ring identifier (I or O)
+  //    v  Primary interaction point @f$z@f$ coordinate
+  // 
+  // Return:
+  //    The correction @f$ c_{r,v}@f$ 
+  //
   Int_t b = FindVertexBin(v);
   if (b <= 0) return 0;
   return GetCorrection(d, r, UShort_t(b));
@@ -60,6 +97,18 @@ AliFMDCorrSecondaryMap::GetCorrection(UShort_t d, Char_t r, Double_t v) const
 TH2D*
 AliFMDCorrSecondaryMap::GetCorrection(UShort_t d, Char_t r, UShort_t b) const
 {
+  // 
+  // Get the secondary correction @f$ c_{r,v}@f$ 
+  // 
+  // Parameters:
+  //    d  Detector number (1-3)
+  //    r  Ring identifier (I or O)
+  //    b  Bin corresponding to the primary interaction point 
+  //           @f$z@f$ coordinate (1 based)
+  // 
+  // Return:
+  //    The correction @f$ c_{r,v}@f$ 
+  //
   TObjArray* ringArray = GetRingArray(d, r);
   if (!ringArray) return 0;
 
@@ -82,6 +131,16 @@ AliFMDCorrSecondaryMap::GetCorrection(UShort_t d, Char_t r, UShort_t b) const
 Int_t
 AliFMDCorrSecondaryMap::FindVertexBin(Double_t v) const
 {
+  // 
+  // Find the vertex bin that corresponds to the passed vertex 
+  // 
+  // Parameters:
+  //    vertex The interaction points @f$z@f$-coordinate 
+  // 
+  // Return:
+  //    Vertex bin in @f$[1,N_{\mbox{vertex}}]@f$ or negative if 
+  // out of range 
+  //
   if (fVertexAxis.GetNbins() <= 0) { 
     AliWarning("No vertex array defined");
     return 0;
@@ -98,6 +157,16 @@ AliFMDCorrSecondaryMap::FindVertexBin(Double_t v) const
 Int_t
 AliFMDCorrSecondaryMap::GetRingIndex(UShort_t d, Char_t r) const
 {
+  // 
+  // Get the index corresponding to the given ring 
+  // 
+  // Parameters:
+  //    d Detector
+  //    r Ring 
+  // 
+  // Return:
+  //    Index (0 based) or negative in case of errors
+  //
   switch (d) {
   case 1:  return 0;
   case 2:  return (r == 'I' || r == 'i' ? 1 : 2); break;  
@@ -110,6 +179,16 @@ AliFMDCorrSecondaryMap::GetRingIndex(UShort_t d, Char_t r) const
 TObjArray*
 AliFMDCorrSecondaryMap::GetRingArray(UShort_t d, Char_t r) const
 {
+  // 
+  // Get the ring array corresponding to the specified ring
+  // 
+  // Parameters:
+  //    d Detector 
+  //    r Ring 
+  // 
+  // Return:
+  //    Pointer to ring array, or null in case of problems
+  //
   Int_t idx = GetRingIndex(d,r);
   if (idx < 0) return 0;
   
@@ -125,6 +204,16 @@ AliFMDCorrSecondaryMap::GetRingArray(UShort_t d, Char_t r) const
 TObjArray*
 AliFMDCorrSecondaryMap::GetOrMakeRingArray(UShort_t d, Char_t r)
 {
+  // 
+  // Get the ring array corresponding to the specified ring
+  // 
+  // Parameters:
+  //    d Detector 
+  //    r Ring 
+  // 
+  // Return:
+  //    Pointer to ring array, or newly created container 
+  //
   Int_t idx = GetRingIndex(d,r);
   if (idx < 0) return 0;
   
@@ -145,6 +234,20 @@ Bool_t
 AliFMDCorrSecondaryMap::SetCorrection(UShort_t d, Char_t r, 
                                      UShort_t b, TH2D*  h) 
 {
+  // 
+  // Set the secondary map correction @f$ c_{r,v}(\eta,\varphi)@f$ 
+  // Note, that the object takes ownership of the passed pointer.
+  // 
+  // Parameters:
+  //    d    Detector number (1-3)
+  //    r    Ring identifier (I or O)
+  //    b    Bin corresponding to the primary interaction point 
+  //             @f$z@f$ coordinate  (1 based)
+  //    h    @f$ c_{r,v}(\eta,\varphi)@f$ 
+  // 
+  // Return:
+  //    true if operation succeeded 
+  //
   TObjArray* ringArray = GetOrMakeRingArray(d, r);
   if (!ringArray) return false;
   
@@ -171,6 +274,19 @@ Bool_t
 AliFMDCorrSecondaryMap::SetCorrection(UShort_t d, Char_t r, 
                                      Double_t v, TH2D*  h) 
 {
+  // 
+  // Set the secondary map correction @f$ c_{r,v}(\eta,\varphi)@f$.
+  // Note, that the object takes ownership of the passed pointer.
+  // 
+  // Parameters:
+  //    d    Detector number (1-3)
+  //    r    Ring identifier (I or O)
+  //    v    Primary interaction point @f$z@f$ coordinate  
+  //    h    @f$ c_{r,v}(\eta,\varphi)@f$ 
+  // 
+  // Return:
+  //    true if operation succeeded 
+  //
   Int_t b = FindVertexBin(v);
   if (b <= 0 || b > fVertexAxis.GetNbins()) { 
     AliWarning(Form("Vertex %+8.4f out of range [%+8.4f,%+8.4f]", 
@@ -183,6 +299,12 @@ AliFMDCorrSecondaryMap::SetCorrection(UShort_t d, Char_t r,
 void
 AliFMDCorrSecondaryMap::Browse(TBrowser* b)
 {
+  // 
+  // Browse this object in the browser
+  // 
+  // Parameters:
+  //    b 
+  //
   b->Add(&fRingArray);
   b->Add(&fVertexAxis);
   b->Add(&fEtaAxis);
@@ -191,6 +313,12 @@ AliFMDCorrSecondaryMap::Browse(TBrowser* b)
 void
 AliFMDCorrSecondaryMap::Print(Option_t* option) const
 {
+  // 
+  // Print this object 
+  // 
+  // Parameters:
+  //    option 
+  //  
   std::cout << "Secondary correction map" << std::endl;
   fRingArray.Print(option);
   fVertexAxis.Print(option);
index 1d01470c8a87fe8cfd7c83e7568fc8b0ca80d968..a414c163efbc1940cc5b9e4b1aaf0effc714e12f 100644 (file)
@@ -2,8 +2,8 @@
 // This class contains the secondary correction and the double hit
 // correction used in low-flux events.
 //
-#ifndef ALIROOT_PWG2_FORWARD_ANALYSIS_ALIFMDCORRSECONDARYMAP_H
-#define ALIROOT_PWG2_FORWARD_ANALYSIS_ALIFMDCORRSECONDARYMAP_H
+#ifndef ALIFMDCORRSECONDARYMAP_H
+#define ALIFMDCORRSECONDARYMAP_H
 #include <TObject.h>
 #include <TObjArray.h>
 #include <TAxis.h>
index b1ed45ff9b5299c889092b66de647d6b02a771da..fe57386d7793173f5e4645afaf4591febc932c7d 100644 (file)
@@ -1,3 +1,7 @@
+//
+// This class contains the secondary correction and the double hit
+// correction used in low-flux events.
+//
 #include "AliFMDCorrVertexBias.h"
 #include <TBrowser.h>
 #include <TH2D.h>
@@ -9,6 +13,9 @@ AliFMDCorrVertexBias::AliFMDCorrVertexBias()
   : fVertexArray(), 
     fVertexAxis(0,0,0)
 {
+  // 
+  // Default constructor 
+  //
   fVertexArray.SetOwner(kTRUE);
   fVertexArray.SetName("rings");
   fVertexAxis.SetName("vtxAxis");
@@ -22,18 +29,37 @@ AliFMDCorrVertexBias::AliFMDCorrVertexBias(const AliFMDCorrVertexBias& o)
     fVertexAxis(o.fVertexAxis.GetNbins(), o.fVertexAxis.GetXmin(), 
                o.fVertexAxis.GetXmax())
 {
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //    o Object to copy from 
+  //
   fVertexAxis.SetName("vtxAxis");
   fVertexAxis.SetTitle("v_{z} [cm]");
 }
 //____________________________________________________________________
 AliFMDCorrVertexBias::~AliFMDCorrVertexBias()
 {
+  //
+  // Destructor 
+  // 
+  //
   fVertexArray.Clear();
 }
 //____________________________________________________________________
 AliFMDCorrVertexBias&
 AliFMDCorrVertexBias::operator=(const AliFMDCorrVertexBias& o)
 {
+  // 
+  // Assignment operator 
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this object 
+  //
   fVertexArray        = o.fVertexArray;
   SetVertexAxis(o.fVertexAxis);
 
@@ -43,6 +69,16 @@ AliFMDCorrVertexBias::operator=(const AliFMDCorrVertexBias& o)
 TH2D*
 AliFMDCorrVertexBias::GetCorrection(Char_t r, Double_t v) const
 {
+  // 
+  // Get the vertex bias correction @f$ b_{v}@f$ 
+  // 
+  // Parameters:
+  //    r  Ring type (I or O)
+  //    v  Primary interaction point @f$z@f$ coordinate
+  // 
+  // Return:
+  //    The correction @f$ b_{v}@f$ 
+  //
   Int_t b = FindVertexBin(v);
   if (b <= 0) return 0;
   return GetCorrection(r, UShort_t(b));
@@ -51,6 +87,17 @@ AliFMDCorrVertexBias::GetCorrection(Char_t r, Double_t v) const
 TH2D*
 AliFMDCorrVertexBias::GetCorrection(Char_t r, UShort_t b) const
 {
+  // 
+  // Get the vertex bias correction @f$ b_{v}@f$ 
+  // 
+  // Parameters:
+  //    r  Ring type (I or O)
+  //    b  Bin corresponding to the primary interaction point 
+  //           @f$z@f$ coordinate (1 based)
+  // 
+  // Return:
+  //    The correction @f$ b_{v}@f$ 
+  //
   TObjArray* vertexarray = GetVertexArray(b);
   if (!vertexarray) return 0;
 
@@ -77,6 +124,16 @@ AliFMDCorrVertexBias::GetCorrection(Char_t r, UShort_t b) const
 Int_t
 AliFMDCorrVertexBias::FindVertexBin(Double_t v) const
 {
+  // 
+  // Find the vertex bin that corresponds to the passed vertex 
+  // 
+  // Parameters:
+  //    vertex The interaction points @f$z@f$-coordinate 
+  // 
+  // Return:
+  //    Vertex bin in @f$[1,N_{\mbox{vertex}}]@f$ or negative if 
+  // out of range 
+  //
   if (fVertexAxis.GetNbins() <= 0) { 
     AliWarning("No vertex array defined");
     return 0;
@@ -93,6 +150,15 @@ AliFMDCorrVertexBias::FindVertexBin(Double_t v) const
 TObjArray*
 AliFMDCorrVertexBias::GetVertexArray(UShort_t v) const
 {
+  // 
+  // Get the vertex array corresponding to the specified ring
+  // 
+  // Parameters:
+  //    v vertex bin (1 based)
+  // 
+  // Return:
+  //    Pointer to vertex array, or null in case of problems
+  //
   if (v <= 0 || v > fVertexAxis.GetNbins()) {
     AliWarning(Form("vertex bin %d out of range [1,%d]",
                    v, fVertexAxis.GetNbins()));
@@ -111,6 +177,15 @@ AliFMDCorrVertexBias::GetVertexArray(UShort_t v) const
 TObjArray*
 AliFMDCorrVertexBias::GetOrMakeVertexArray(UShort_t v)
 {
+  // 
+  // Get the vertex array corresponding to the specified ring
+  // 
+  // Parameters:
+  //    v vertex bin (1 based)
+  // 
+  // Return:
+  //    Pointer to vertex array, or newly created container 
+  //
   if (v <= 0 || v > fVertexAxis.GetNbins()) {
     AliWarning(Form("vertex bin %d out of range [1,%d]",
                    v, fVertexAxis.GetNbins()));
@@ -133,6 +208,19 @@ AliFMDCorrVertexBias::GetOrMakeVertexArray(UShort_t v)
 Bool_t
 AliFMDCorrVertexBias::SetCorrection(Char_t r, UShort_t b, TH2D*  h) 
 {
+  // 
+  // Set the vertex bias correction @f$ b_{v}(\eta,\varphi)@f$ 
+  // Note, that the object takes ownership of the passed pointer.
+  // 
+  // Parameters:
+  //    r    Ring type (I or O)
+  //    b    Bin corresponding to the primary interaction point 
+  //             @f$z@f$ coordinate  (1 based)
+  //    h    @f$ b_{v}(\eta,\varphi)@f$ 
+  // 
+  // Return:
+  //    true if operation succeeded 
+  //
   TObjArray* vertexarray = GetOrMakeVertexArray(b);
   if (!vertexarray) return false;
   
@@ -165,6 +253,18 @@ AliFMDCorrVertexBias::SetCorrection(Char_t r, UShort_t b, TH2D*  h)
 Bool_t
 AliFMDCorrVertexBias::SetCorrection(Char_t r, Double_t v, TH2D*  h) 
 {
+  // 
+  // Set the vertex bias correction @f$ b_{v}(\eta,\varphi)@f$.
+  // Note, that the object takes ownership of the passed pointer.
+  // 
+  // Parameters:
+  //    r    Ring type (I or O)
+  //    v    Primary interaction point @f$z@f$ coordinate  
+  //    h    @f$ b_{v}(\eta,\varphi)@f$ 
+  // 
+  // Return:
+  //    true if operation succeeded 
+  //
   Int_t b = FindVertexBin(v);
   if (b <= 0 || b > fVertexAxis.GetNbins()) { 
     AliWarning(Form("Vertex %+8.4f out of range [%+8.4f,%+8.4f]", 
@@ -177,6 +277,12 @@ AliFMDCorrVertexBias::SetCorrection(Char_t r, Double_t v, TH2D*  h)
 void
 AliFMDCorrVertexBias::Browse(TBrowser* b)
 {
+  // 
+  // Browse this object in the browser
+  // 
+  // Parameters:
+  //    b 
+  //
   b->Add(&fVertexArray);
   b->Add(&fVertexAxis);
 }
@@ -184,6 +290,12 @@ AliFMDCorrVertexBias::Browse(TBrowser* b)
 void
 AliFMDCorrVertexBias::Print(Option_t* option) const
 {
+  // 
+  // Print this object 
+  // 
+  // Parameters:
+  //    option 
+  //  
   std::cout << "Vertex bias correction" << std::endl;
   fVertexArray.Print(option);
   fVertexAxis.Print(option);
index 244478e9987e38d3e46005aaf5ade5eb06e930ae..8573da9c5e895df46cc00da22d54f2082922ec60 100644 (file)
@@ -2,8 +2,8 @@
 // This class contains the secondary correction and the double hit
 // correction used in low-flux events.
 //
-#ifndef ALIROOT_PWG2_FORWARD_ANALYSIS_ALIFMDCORRVERTEXBIAS_H
-#define ALIROOT_PWG2_FORWARD_ANALYSIS_ALIFMDCORRVERTEXBIAS_H
+#ifndef ALIFMDCORRVERTEXBIAS_H
+#define ALIFMDCORRVERTEXBIAS_H
 #include <TObject.h>
 #include <TObjArray.h>
 #include <TAxis.h>
index 84c1adcc737fbf5df711584a510b721c86efad90..6fbea4b52c16b4a2094403cf981b4948957fb07a 100644 (file)
@@ -1,3 +1,7 @@
+//
+// This class calculates the exclusive charged particle density
+// in each for the 5 FMD rings. 
+//
 #include "AliFMDCorrections.h"
 #include <AliESDFMD.h>
 #include <TAxis.h>
@@ -21,7 +25,9 @@ AliFMDCorrections::AliFMDCorrections()
   : TNamed(), 
     fRingHistos(),
     fDebug(0)
-{}
+{
+  // Constructor
+}
 
 //____________________________________________________________________
 AliFMDCorrections::AliFMDCorrections(const char* title)
@@ -29,6 +35,10 @@ AliFMDCorrections::AliFMDCorrections(const char* title)
     fRingHistos(), 
     fDebug(0)
 {
+  // Constructor 
+  // 
+  // Parameters: 
+  //   title   Title
   fRingHistos.SetName(GetName());
   fRingHistos.Add(new RingHistos(1, 'I'));
   fRingHistos.Add(new RingHistos(2, 'I'));
@@ -43,6 +53,10 @@ AliFMDCorrections::AliFMDCorrections(const AliFMDCorrections& o)
     fRingHistos(), 
     fDebug(o.fDebug)
 {
+  // Copy constructor 
+  // 
+  // Parameters: 
+  //  o  Object to copy from 
   TIter    next(&o.fRingHistos);
   TObject* obj = 0;
   while ((obj = next())) fRingHistos.Add(obj);
@@ -51,6 +65,9 @@ AliFMDCorrections::AliFMDCorrections(const AliFMDCorrections& o)
 //____________________________________________________________________
 AliFMDCorrections::~AliFMDCorrections()
 {
+  // Destructor 
+  // 
+  // 
   fRingHistos.Delete();
 }
 
@@ -58,6 +75,10 @@ AliFMDCorrections::~AliFMDCorrections()
 AliFMDCorrections&
 AliFMDCorrections::operator=(const AliFMDCorrections& o)
 {
+  // Assignment operator 
+  // 
+  // Parameters:
+  //   o   Object to assign from 
   TNamed::operator=(o);
 
   fDebug   = o.fDebug;
@@ -73,6 +94,15 @@ AliFMDCorrections::operator=(const AliFMDCorrections& o)
 AliFMDCorrections::RingHistos*
 AliFMDCorrections::GetRingHistos(UShort_t d, Char_t r) const
 {
+  // 
+  // Get the ring histogram container 
+  // Parameters:
+  //    d Detector
+  //    r Ring 
+  // 
+  // Return:
+  //    Ring histogram container 
+  //
   Int_t idx = -1;
   switch (d) { 
   case 1: idx = 0; break;
@@ -89,6 +119,15 @@ Bool_t
 AliFMDCorrections::Correct(AliForwardUtil::Histos& hists,
                           UShort_t                vtxbin)
 {
+  // 
+  // Do the calculations 
+  // Parameters:
+  //    hists    Cache of histograms 
+  //    vtxBin   Vertex bin 
+  // 
+  // Return:
+  //    true on successs 
+  //
   AliForwardCorrectionManager& fcm = AliForwardCorrectionManager::Instance();
 
   UShort_t uvb = vtxbin;
@@ -163,6 +202,12 @@ AliFMDCorrections::Correct(AliForwardUtil::Histos& hists,
 void
 AliFMDCorrections::ScaleHistograms(TList* dir, Int_t nEvents)
 {
+  // 
+  // Scale the histograms to the total number of events 
+  // Parameters:
+  //    dir     Where the output is stored
+  //    nEvents Number of events 
+  //
   if (nEvents <= 0) return;
   TList* d = static_cast<TList*>(dir->FindObject(GetName()));
   if (!d) return;
@@ -190,6 +235,11 @@ AliFMDCorrections::DefineOutput(TList* dir)
 void
 AliFMDCorrections::Print(Option_t* /* option */) const
 {
+  // 
+  // Print information
+  // Parameters:
+  //    option Not used 
+  //
   char ind[gROOT->GetDirLevel()+1];
   for (Int_t i = 0; i < gROOT->GetDirLevel(); i++) ind[i] = ' ';
   ind[gROOT->GetDirLevel()] = '\0';
@@ -200,13 +250,23 @@ AliFMDCorrections::Print(Option_t* /* option */) const
 AliFMDCorrections::RingHistos::RingHistos()
   : AliForwardUtil::RingHistos(), 
     fDensity(0)
-{}
+{
+  // Constructor 
+  //
+  // 
+}
 
 //____________________________________________________________________
 AliFMDCorrections::RingHistos::RingHistos(UShort_t d, Char_t r)
   : AliForwardUtil::RingHistos(d,r), 
     fDensity(0)
 {
+  // 
+  // Constructor
+  // Parameters:
+  //    d detector
+  //    r ring 
+  //
   fDensity = new TH2D(Form("FMD%d%c_Primary_Density", d, r), 
                      Form("in FMD%d%c", d, r), 
                      200, -4, 6, (r == 'I' || r == 'i' ? 20 : 40), 
@@ -220,12 +280,26 @@ AliFMDCorrections::RingHistos::RingHistos(UShort_t d, Char_t r)
 AliFMDCorrections::RingHistos::RingHistos(const RingHistos& o)
   : AliForwardUtil::RingHistos(o), 
     fDensity(o.fDensity)
-{}
+{
+  // 
+  // Copy constructor 
+  // Parameters:
+  //    o Object to copy from 
+  //
+}
 
 //____________________________________________________________________
 AliFMDCorrections::RingHistos&
 AliFMDCorrections::RingHistos::operator=(const RingHistos& o)
 {
+  // 
+  // Assignment operator 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this 
+  //
   AliForwardUtil::RingHistos::operator=(o);
   
   if (fDensity) delete fDensity;
@@ -237,6 +311,9 @@ AliFMDCorrections::RingHistos::operator=(const RingHistos& o)
 //____________________________________________________________________
 AliFMDCorrections::RingHistos::~RingHistos()
 {
+  // 
+  // Destructor 
+  //
   if (fDensity) delete fDensity;
 }
 
@@ -244,6 +321,11 @@ AliFMDCorrections::RingHistos::~RingHistos()
 void
 AliFMDCorrections::RingHistos::Output(TList* dir)
 {
+  // 
+  // Make output 
+  // Parameters:
+  //    dir Where to put it 
+  //
   TList* d = DefineOutputList(dir);
   d->Add(fDensity);
 }
@@ -252,6 +334,12 @@ AliFMDCorrections::RingHistos::Output(TList* dir)
 void
 AliFMDCorrections::RingHistos::ScaleHistograms(TList* dir, Int_t nEvents)
 { 
+  // 
+  // Scale the histograms to the total number of events 
+  // Parameters:
+  //    dir     where the output is stored
+  //    nEvents Number of events 
+  //
   TList* l = GetOutputList(dir);
   if (!l) return; 
 
index af240116bbfc3b6d2244f0591713a934751811c1..f18aa51cc69cc63459311a6454e1d0d8bd86ac6b 100644 (file)
@@ -1,5 +1,8 @@
-#ifndef ALIROOT_PWG2_FORWARD_ANALYSIS2_ALIFMDCORRECTIONS_H
-#define ALIROOT_PWG2_FORWARD_ANALYSIS2_ALIFMDCORRECTIONS_H
+// This class calculates the exclusive charged particle density
+// in each for the 5 FMD rings. 
+//
+#ifndef ALIFMDCORRECTIONS_H
+#define ALIFMDCORRECTIONS_H
 #include <TNamed.h>
 #include <TList.h>
 #include "AliForwardUtil.h"
index 6f056c7f22139d50e00d8c0ebe69bc46b4aecf39..944ccb02209d5ca9e4dc3e0eec89be72e5c94f1e 100644 (file)
@@ -1,10 +1,12 @@
+// This class calculates the inclusive charged particle density
+// in each for the 5 FMD rings. 
+//
 #include "AliFMDDensityCalculator.h"
 #include <AliESDFMD.h>
 #include <TAxis.h>
 #include <TList.h>
 #include <TMath.h>
 #include "AliForwardCorrectionManager.h"
-// #include "AliFMDAnaParameters.h"
 #include "AliLog.h"
 #include <TH2D.h>
 #include <TProfile.h>
@@ -29,7 +31,11 @@ AliFMDDensityCalculator::AliFMDDensityCalculator()
     fAccI(0),
     fAccO(0),
     fDebug(0)
-{}
+{
+  // 
+  // Constructor 
+  //
+}
 
 //____________________________________________________________________
 AliFMDDensityCalculator::AliFMDDensityCalculator(const char* title)
@@ -44,6 +50,12 @@ AliFMDDensityCalculator::AliFMDDensityCalculator(const char* title)
     fAccO(0),
     fDebug(0)
 {
+  // 
+  // Constructor 
+  // 
+  // Parameters:
+  //    name Name of object
+  //
   fRingHistos.SetName(GetName());
   fRingHistos.Add(new RingHistos(1, 'I'));
   fRingHistos.Add(new RingHistos(2, 'I'));
@@ -81,6 +93,12 @@ AliFMDDensityCalculator::AliFMDDensityCalculator(const
     fAccO(o.fAccO),
     fDebug(o.fDebug)
 {
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //    o Object to copy from 
+  //
   TIter    next(&o.fRingHistos);
   TObject* obj = 0;
   while ((obj = next())) fRingHistos.Add(obj);
@@ -89,6 +107,9 @@ AliFMDDensityCalculator::AliFMDDensityCalculator(const
 //____________________________________________________________________
 AliFMDDensityCalculator::~AliFMDDensityCalculator()
 {
+  // 
+  // Destructor 
+  //
   fRingHistos.Delete();
 }
 
@@ -96,6 +117,15 @@ AliFMDDensityCalculator::~AliFMDDensityCalculator()
 AliFMDDensityCalculator&
 AliFMDDensityCalculator::operator=(const AliFMDDensityCalculator& o)
 {
+  // 
+  // Assignement operator
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this object
+  //
   TNamed::operator=(o);
 
   fMultCut      = o.fMultCut;
@@ -116,6 +146,16 @@ AliFMDDensityCalculator::operator=(const AliFMDDensityCalculator& o)
 AliFMDDensityCalculator::RingHistos*
 AliFMDDensityCalculator::GetRingHistos(UShort_t d, Char_t r) const
 {
+  // 
+  // Get the ring histogram container 
+  // 
+  // Parameters:
+  //    d Detector
+  //    r Ring 
+  // 
+  // Return:
+  //    Ring histogram container 
+  //
   Int_t idx = -1;
   switch (d) { 
   case 1: idx = 0; break;
@@ -131,6 +171,14 @@ AliFMDDensityCalculator::GetRingHistos(UShort_t d, Char_t r) const
 Double_t
 AliFMDDensityCalculator::GetMultCut() const
 {
+  // 
+  // Get the multiplicity cut.  If the user has set fMultCut (via
+  // SetMultCut) then that value is used.  If not, then the lower
+  // value of the fit range for the enery loss fits is returned.
+  // 
+  // Return:
+  //    Lower cut on multiplicity
+  //
   if (fMultCut > 0) return fMultCut;
 
   AliForwardCorrectionManager&  fcm = AliForwardCorrectionManager::Instance();
@@ -145,6 +193,18 @@ AliFMDDensityCalculator::Calculate(const AliESDFMD&        fmd,
                                   UShort_t                vtxbin, 
                                   Bool_t                  lowFlux)
 {
+  // 
+  // Do the calculations 
+  // 
+  // Parameters:
+  //    fmd      AliESDFMD object (possibly) corrected for sharing
+  //    hists    Histogram cache
+  //    vtxBin   Vertex bin 
+  //    lowFlux  Low flux flag. 
+  // 
+  // Return:
+  //    true on successs 
+  //
   for (UShort_t d=1; d<=3; d++) { 
     UShort_t nr = (d == 1 ? 1 : 2);
     for (UShort_t q=0; q<nr; q++) { 
@@ -195,10 +255,25 @@ AliFMDDensityCalculator::NParticles(Float_t  mult,
                                    Float_t  eta,
                                    Bool_t   lowFlux) const
 {
+  // 
+  // Get the number of particles corresponding to the signal mult
+  // 
+  // Parameters:
+  //    mult     Signal
+  //    d        Detector
+  //    r        Ring 
+  //    s        Sector 
+  //    t        Strip (not used)
+  //    v        Vertex bin 
+  //    eta      Pseudo-rapidity 
+  //    lowFlux  Low-flux flag 
+  // 
+  // Return:
+  //    The number of particles 
+  //
   if (mult <= GetMultCut()) return 0;
   if (lowFlux) return 1;
   
-  // AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
   AliForwardCorrectionManager&  fcm = AliForwardCorrectionManager::Instance();
   AliFMDCorrELossFit::ELossFit* fit = fcm.GetELossFit()->FindFit(d,r,eta);
   if (!fit) { 
@@ -253,12 +328,29 @@ AliFMDDensityCalculator::Correction(UShort_t d,
                                    Float_t  eta,
                                    Bool_t   lowFlux) const
 {
-  // AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
+  // 
+  // Get the inverse correction factor.  This consist of
+  // 
+  // - acceptance correction (corners of sensors) 
+  // - double hit correction (for low-flux events) 
+  // - dead strip correction 
+  // 
+  // Parameters:
+  //    d        Detector
+  //    r        Ring 
+  //    s        Sector 
+  //    t        Strip (not used)
+  //    v        Vertex bin 
+  //    eta      Pseudo-rapidity 
+  //    lowFlux  Low-flux flag 
+  // 
+  // Return:
+  //    
+  //
   AliForwardCorrectionManager&  fcm = AliForwardCorrectionManager::Instance();
 
   Float_t correction = AcceptanceCorrection(r,t);
   if (lowFlux) { 
-    // TH1F* dblHitCor = pars->GetDoubleHitCorrection(d,r);
     TH1D* dblHitCor = 0;
     if (fcm.GetDoubleHit()) 
       dblHitCor = fcm.GetDoubleHit()->GetCorrection(d,r);
@@ -288,6 +380,15 @@ AliFMDDensityCalculator::Correction(UShort_t d,
 TH1D*
 AliFMDDensityCalculator::GenerateAcceptanceCorrection(Char_t r) const
 {
+  // 
+  // Generate the acceptance corrections 
+  // 
+  // Parameters:
+  //    r Ring to generate for 
+  // 
+  // Return:
+  //    Newly allocated histogram of acceptance corrections
+  //
   const Double_t ic1[] = { 4.9895, 15.3560 };
   const Double_t ic2[] = { 1.8007, 17.2000 };
   const Double_t oc1[] = { 4.2231, 26.6638 };
@@ -357,6 +458,16 @@ AliFMDDensityCalculator::GenerateAcceptanceCorrection(Char_t r) const
 Float_t 
 AliFMDDensityCalculator::AcceptanceCorrection(Char_t r, UShort_t t) const
 {
+  // 
+  // Get the acceptance correction for strip @a t in an ring of type @a r
+  // 
+  // Parameters:
+  //    r  Ring type ('I' or 'O')
+  //    t  Strip number 
+  // 
+  // Return:
+  //    Inverse acceptance correction 
+  //
   TH1D* acc = (r == 'I' || r == 'i' ? fAccI : fAccO);
   return acc->GetBinContent(t+1);
 
@@ -418,6 +529,13 @@ AliFMDDensityCalculator::AcceptanceCorrection(Char_t r, UShort_t t) const
 void
 AliFMDDensityCalculator::ScaleHistograms(TList* dir, Int_t nEvents)
 {
+  // 
+  // Scale the histograms to the total number of events 
+  // 
+  // Parameters:
+  //    dir     where to put the output
+  //    nEvents Number of events 
+  //
   if (nEvents <= 0) return;
   TList* d = static_cast<TList*>(dir->FindObject(GetName()));
   if (!d) return;
@@ -432,6 +550,12 @@ AliFMDDensityCalculator::ScaleHistograms(TList* dir, Int_t nEvents)
 void
 AliFMDDensityCalculator::DefineOutput(TList* dir)
 {
+  // 
+  // Output diagnostic histograms to directory 
+  // 
+  // Parameters:
+  //    dir List to write in
+  //  
   TList* d = new TList;
   d->SetName(GetName());
   dir->Add(d);
@@ -451,6 +575,12 @@ AliFMDDensityCalculator::DefineOutput(TList* dir)
 void
 AliFMDDensityCalculator::Print(Option_t*) const
 {
+  // 
+  // Print information 
+  // 
+  // Parameters:
+  //    option Not used
+  //
   char ind[gROOT->GetDirLevel()+1];
   for (Int_t i = 0; i < gROOT->GetDirLevel(); i++) ind[i] = ' ';
   ind[gROOT->GetDirLevel()] = '\0';
@@ -469,7 +599,11 @@ AliFMDDensityCalculator::RingHistos::RingHistos()
     fEtaVsM(0),
     fCorr(0),
     fDensity(0)
-{}
+{
+  // 
+  // Default CTOR
+  //
+}
 
 //____________________________________________________________________
 AliFMDDensityCalculator::RingHistos::RingHistos(UShort_t d, Char_t r)
@@ -481,6 +615,13 @@ AliFMDDensityCalculator::RingHistos::RingHistos(UShort_t d, Char_t r)
     fCorr(0),
     fDensity(0)
 {
+  // 
+  // Constructor
+  // 
+  // Parameters:
+  //    d detector
+  //    r ring 
+  //
   fEvsN = new TH2D(Form("%s_Eloss_N_nocorr", fName.Data()), 
                   Form("#Delta E/#Delta E_{mip} vs uncorrected inclusive "
                        "N_{ch} in %s", fName.Data()), 
@@ -543,12 +684,28 @@ AliFMDDensityCalculator::RingHistos::RingHistos(const RingHistos& o)
     fEtaVsM(o.fEtaVsM),
     fCorr(o.fCorr),
     fDensity(o.fDensity)
-{}
+{
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //    o Object to copy from 
+  //
+}
 
 //____________________________________________________________________
 AliFMDDensityCalculator::RingHistos&
 AliFMDDensityCalculator::RingHistos::operator=(const RingHistos& o)
 {
+  // 
+  // Assignment operator 
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this 
+  //
   AliForwardUtil::RingHistos::operator=(o);
   
   if (fEvsN)    delete  fEvsN;
@@ -570,6 +727,9 @@ AliFMDDensityCalculator::RingHistos::operator=(const RingHistos& o)
 //____________________________________________________________________
 AliFMDDensityCalculator::RingHistos::~RingHistos()
 {
+  // 
+  // Destructor 
+  //
   if (fEvsN)    delete fEvsN;
   if (fEvsM)    delete fEvsM;
   if (fEtaVsN)  delete fEtaVsN;
@@ -582,6 +742,12 @@ AliFMDDensityCalculator::RingHistos::~RingHistos()
 void
 AliFMDDensityCalculator::RingHistos::Output(TList* dir)
 {
+  // 
+  // Make output 
+  // 
+  // Parameters:
+  //    dir Where to put it 
+  //
   TList* d = DefineOutputList(dir);
   d->Add(fEvsN);
   d->Add(fEvsM);
@@ -595,6 +761,13 @@ AliFMDDensityCalculator::RingHistos::Output(TList* dir)
 void
 AliFMDDensityCalculator::RingHistos::ScaleHistograms(TList* dir, Int_t nEvents)
 {
+  // 
+  // Scale the histograms to the total number of events 
+  // 
+  // Parameters:
+  //    dir     Where the output is 
+  //    nEvents Number of events 
+  //
   TList* l = GetOutputList(dir);
   if (!l) return; 
 
index fb2171c5a9fe35a867d233ab855a67fb9a879466..c74001b15b3af8d4d1700666196e41c65928b719 100644 (file)
@@ -1,5 +1,8 @@
-#ifndef ALIROOT_PWG2_FORWARD_ANALYSIS2_ALIFMDDENSITYCALCULATOR_H
-#define ALIROOT_PWG2_FORWARD_ANALYSIS2_ALIFMDDENSITYCALCULATOR_H
+// This class calculates the inclusive charged particle density
+// in each for the 5 FMD rings. 
+//
+#ifndef ALIFMDDENSITYCALCULATOR_H
+#define ALIFMDDENSITYCALCULATOR_H
 #include <TNamed.h>
 #include <TList.h>
 #include "AliForwardUtil.h"
index c85ea56c2ca9181068406bfd5085d06797f45c2f..b463add758481e691bee12da69007ad2805e5fdf 100644 (file)
@@ -44,7 +44,11 @@ AliFMDEnergyFitter::AliFMDEnergyFitter()
     fMaxChi2PerNDF(20), 
     fMinWeight(1e-7),
     fDebug(0)
-{}
+{
+  // 
+  // Default Constructor - do not use 
+  //
+}
 
 //____________________________________________________________________
 AliFMDEnergyFitter::AliFMDEnergyFitter(const char* title)
@@ -65,6 +69,12 @@ AliFMDEnergyFitter::AliFMDEnergyFitter(const char* title)
     fMinWeight(1e-7),
     fDebug(3)
 {
+  // 
+  // Constructor 
+  // 
+  // Parameters:
+  //    title Title of object  - not significant 
+  //
   fEtaAxis.SetName("etaAxis");
   fEtaAxis.SetTitle("#eta");
   fRingHistos.Add(new RingHistos(1, 'I'));
@@ -93,6 +103,12 @@ AliFMDEnergyFitter::AliFMDEnergyFitter(const AliFMDEnergyFitter& o)
     fMinWeight(o.fMinWeight),
     fDebug(o.fDebug)
 {
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //    o Object to copy from 
+  //
   TIter    next(&o.fRingHistos);
   TObject* obj = 0;
   while ((obj = next())) fRingHistos.Add(obj);
@@ -101,6 +117,9 @@ AliFMDEnergyFitter::AliFMDEnergyFitter(const AliFMDEnergyFitter& o)
 //____________________________________________________________________
 AliFMDEnergyFitter::~AliFMDEnergyFitter()
 {
+  // 
+  // Destructor
+  //
   fRingHistos.Delete();
 }
 
@@ -108,6 +127,15 @@ AliFMDEnergyFitter::~AliFMDEnergyFitter()
 AliFMDEnergyFitter&
 AliFMDEnergyFitter::operator=(const AliFMDEnergyFitter& o)
 {
+  // 
+  // Assignment operator 
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this 
+  //
   TNamed::operator=(o);
 
   fLowCut        = o.fLowCut;
@@ -134,6 +162,16 @@ AliFMDEnergyFitter::operator=(const AliFMDEnergyFitter& o)
 AliFMDEnergyFitter::RingHistos*
 AliFMDEnergyFitter::GetRingHistos(UShort_t d, Char_t r) const
 {
+  // 
+  // Get the ring histogram container 
+  // 
+  // Parameters:
+  //    d Detector
+  //    r Ring 
+  // 
+  // Return:
+  //    Ring histogram container 
+  //
   Int_t idx = -1;
   switch (d) { 
   case 1: idx = 0; break;
@@ -149,6 +187,14 @@ AliFMDEnergyFitter::GetRingHistos(UShort_t d, Char_t r) const
 void
 AliFMDEnergyFitter::Init(const TAxis& eAxis)
 {
+  // 
+  // Initialise the task
+  // 
+  // Parameters:
+  //    etaAxis The eta axis to use.  Note, that if the eta axis
+  // has already been set (using SetEtaAxis), then this parameter will be 
+  // ignored
+  //
   if (fEtaAxis.GetNbins() == 0 || 
       TMath::Abs(fEtaAxis.GetXmax() - fEtaAxis.GetXmin()) < 1e-7) 
     SetEtaAxis(eAxis);
@@ -161,12 +207,34 @@ AliFMDEnergyFitter::Init(const TAxis& eAxis)
 void
 AliFMDEnergyFitter::SetEtaAxis(const TAxis& eAxis)
 {
+  // 
+  // Set the eta axis to use.  This will force the code to use this
+  // eta axis definition - irrespective of whatever axis is passed to
+  // the Init member function.  Therefore, this member function can be
+  // used to force another eta axis than one found in the correction
+  // objects. 
+  // 
+  // Parameters:
+  //    etaAxis Eta axis to use 
+  //
   SetEtaAxis(eAxis.GetNbins(),eAxis.GetXmin(),eAxis.GetXmax());
 }
 //____________________________________________________________________
 void
 AliFMDEnergyFitter::SetEtaAxis(Int_t nBins, Double_t etaMin, Double_t etaMax)
 {
+  // 
+  // Set the eta axis to use.  This will force the code to use this
+  // eta axis definition - irrespective of whatever axis is passed to
+  // the Init member function.  Therefore, this member function can be
+  // used to force another eta axis than one found in the correction
+  // objects. 
+  // 
+  // Parameters:
+  //    nBins  Number of bins 
+  //    etaMin Minimum of the eta axis 
+  //    etaMax Maximum of the eta axis 
+  //
   fEtaAxis.Set(nBins,etaMin,etaMax);
 }
 
@@ -175,6 +243,16 @@ Bool_t
 AliFMDEnergyFitter::Accumulate(const AliESDFMD& input, 
                               Bool_t           empty)
 {
+  // 
+  // Fitter the input AliESDFMD object
+  // 
+  // Parameters:
+  //    input     Input 
+  //    empty     Whether the event is 'empty'
+  // 
+  // Return:
+  //    True on success, false otherwise 
+  //
   for(UShort_t d = 1; d <= 3; d++) {
     Int_t nRings = (d == 1 ? 1 : 2);
     for (UShort_t q = 0; q < nRings; q++) {
@@ -211,6 +289,12 @@ AliFMDEnergyFitter::Accumulate(const AliESDFMD& input,
 void
 AliFMDEnergyFitter::Fit(const TList* dir)
 {
+  // 
+  // Scale the histograms to the total number of events 
+  // 
+  // Parameters:
+  //    dir Where the histograms are  
+  //
   if (!fDoFits) return;
 
   TList* d = static_cast<TList*>(dir->FindObject(GetName()));
@@ -255,6 +339,12 @@ AliFMDEnergyFitter::Fit(const TList* dir)
 void
 AliFMDEnergyFitter::MakeCorrectionsObject(TList* d)
 {
+  // 
+  // Generate the corrections object 
+  // 
+  // Parameters:
+  //    dir List to analyse 
+  //
   AliForwardCorrectionManager& mgr = AliForwardCorrectionManager::Instance();
     
   AliFMDCorrELossFit* obj = new AliFMDCorrELossFit;
@@ -279,6 +369,14 @@ AliFMDEnergyFitter::MakeCorrectionsObject(TList* d)
 void
 AliFMDEnergyFitter::DefineOutput(TList* dir)
 {
+  // 
+  // Define the output histograms.  These are put in a sub list of the
+  // passed list.   The histograms are merged before the parent task calls 
+  // AliAnalysisTaskSE::Terminate 
+  // 
+  // Parameters:
+  //    dir Directory to add to 
+  //
   TList* d = new TList;
   d->SetName(GetName());
   dir->Add(d);
@@ -293,6 +391,12 @@ AliFMDEnergyFitter::DefineOutput(TList* dir)
 void
 AliFMDEnergyFitter::SetDebug(Int_t dbg)
 {
+  // 
+  // Set the debug level.  The higher the value the more output 
+  // 
+  // Parameters:
+  //    dbg Debug level 
+  //
   fDebug = dbg;
   TIter    next(&fRingHistos);
   RingHistos* o = 0;
@@ -304,6 +408,12 @@ AliFMDEnergyFitter::SetDebug(Int_t dbg)
 void
 AliFMDEnergyFitter::Print(Option_t*) const
 {
+  // 
+  // Print information
+  // 
+  // Parameters:
+  //    option Not used 
+  //
   char ind[gROOT->GetDirLevel()+1];
   for (Int_t i = 0; i < gROOT->GetDirLevel(); i++) ind[i] = ' ';
   ind[gROOT->GetDirLevel()] = '\0';
@@ -335,7 +445,11 @@ AliFMDEnergyFitter::RingHistos::RingHistos()
     fList(0),
     fFits("AliFMDCorrELossFit::ELossFit"),
     fDebug(0)
-{}
+{
+  // 
+  // Default CTOR
+  //
+}
 
 //____________________________________________________________________
 AliFMDEnergyFitter::RingHistos::RingHistos(UShort_t d, Char_t r)
@@ -347,6 +461,13 @@ AliFMDEnergyFitter::RingHistos::RingHistos(UShort_t d, Char_t r)
     fFits("AliFMDCorrELossFit::ELossFit"),
     fDebug(0)
 {
+  // 
+  // Constructor
+  // 
+  // Parameters:
+  //    d detector
+  //    r ring 
+  //
   fEtaEDists.SetName("EDists");
 }
 //____________________________________________________________________
@@ -359,6 +480,12 @@ AliFMDEnergyFitter::RingHistos::RingHistos(const RingHistos& o)
     fFits("AliFMDCorrELossFit::ELossFit"),
     fDebug(0)
 {
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //    o Object to copy from 
+  //
   fFits.Clear();
   TIter next(&o.fEtaEDists);
   TObject* obj = 0;
@@ -375,6 +502,15 @@ AliFMDEnergyFitter::RingHistos::RingHistos(const RingHistos& o)
 AliFMDEnergyFitter::RingHistos&
 AliFMDEnergyFitter::RingHistos::operator=(const RingHistos& o)
 {
+  // 
+  // Assignment operator 
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this 
+  //
   AliForwardUtil::RingHistos::operator=(o);
   
   if (fEDist) delete fEDist;
@@ -402,6 +538,9 @@ AliFMDEnergyFitter::RingHistos::operator=(const RingHistos& o)
 //____________________________________________________________________
 AliFMDEnergyFitter::RingHistos::~RingHistos()
 {
+  // 
+  // Destructor 
+  //
   if (fEDist) delete fEDist;
   fEtaEDists.Delete();
 }
@@ -410,6 +549,14 @@ AliFMDEnergyFitter::RingHistos::~RingHistos()
 void
 AliFMDEnergyFitter::RingHistos::Fill(Bool_t empty, Int_t ieta, Double_t mult)
 {
+  // 
+  // Fill histogram 
+  // 
+  // Parameters:
+  //    empty  True if event is empty
+  //    ieta   Eta bin
+  //    mult   Signal 
+  //
   if (empty) { 
     fEmpty->Fill(mult);
     return;
@@ -429,11 +576,18 @@ TArrayD
 AliFMDEnergyFitter::RingHistos::MakeIncreasingAxis(Int_t n, Double_t min, 
                                                   Double_t max) const
 {
-  // Service function to define a logarithmic axis. 
-  // Parameters: 
-  //   n    Number of bins 
-  //   min  Minimum of axis 
-  //   max  Maximum of axis 
+  // 
+  // Make an axis with increasing bins 
+  // 
+  // Parameters:
+  //    n    Number of bins 
+  //    min  Minimum 
+  //    max  Maximum
+  // 
+  // Return:
+  //    An axis with quadratically increasing bin size 
+  //
+
   TArrayD bins(n+1);
   Double_t dx = (max-min) / n;
   bins[0]     = min;
@@ -457,6 +611,17 @@ AliFMDEnergyFitter::RingHistos::Make(Int_t    ieta,
                                     Int_t    nDeBins, 
                                     Bool_t   incr)
 {
+  // 
+  // Make E/E_mip histogram 
+  // 
+  // Parameters:
+  //    ieta    Eta bin
+  //    eMin    Least signal
+  //    eMax    Largest signal 
+  //    deMax   Maximum energy loss 
+  //    nDeBins Number energy loss bins 
+  //    incr    Whether to make bins of increasing size
+  //
   TH1D* h = 0;
   TString name  = Form(fgkEDistFormat, fName.Data(), ieta);
   TString title = Form("#DeltaE/#DeltaE_{mip} for %s %+5.3f#leq#eta<%+5.3f "
@@ -483,6 +648,17 @@ TH1D* AliFMDEnergyFitter::RingHistos::MakePar(const char* name,
                                              const char* title, 
                                              const TAxis& eta) const
 {
+  // 
+  // Make a parameter histogram
+  // 
+  // Parameters:
+  //    name   Name of histogram.
+  //    title  Title of histogram. 
+  //    eta    Eta axis 
+  // 
+  // Return:
+  //    
+  //
   TH1D* h = new TH1D(Form("%s_%s", fName.Data(), name), 
                     Form("%s for %s", title, fName.Data()), 
                     eta.GetNbins(), eta.GetXmin(), eta.GetXmax());
@@ -507,6 +683,21 @@ AliFMDEnergyFitter::RingHistos::MakeTotal(const char* name,
                                          Double_t val, 
                                          Double_t err) const
 {
+  // 
+  // Make a histogram that contains the results of the fit over the full ring 
+  // 
+  // Parameters:
+  //    name  Name 
+  //    title Title
+  //    eta   Eta axis 
+  //    low   Least bin
+  //    high  Largest bin
+  //    val   Value of parameter 
+  //    err   Error on parameter 
+  // 
+  // Return:
+  //    The newly allocated histogram 
+  //
   Double_t xlow  = eta.GetBinLowEdge(low);
   Double_t xhigh = eta.GetBinUpEdge(high);
   TH1D* h = new TH1D(Form("%s_%s", fName.Data(), name), 
@@ -533,6 +724,15 @@ AliFMDEnergyFitter::RingHistos::Init(const TAxis& eAxis,
                                     Double_t maxDE, Int_t nDEbins, 
                                     Bool_t useIncrBin)
 {
+  // 
+  // Initialise object 
+  // 
+  // Parameters:
+  //    eAxis      Eta axis
+  //    maxDE      Max energy loss to consider 
+  //    nDEbins    Number of bins 
+  //    useIncrBin Whether to use an increasing bin size 
+  //
   fEDist = new TH1D(Form("%s_edist", fName.Data()), 
                    Form("#DeltaE/#DeltaE_{mip} for %s", fName.Data()), 
                    200, 0, 6);
@@ -560,6 +760,24 @@ AliFMDEnergyFitter::RingHistos::Fit(TList*           dir,
                                    Double_t         relErrorCut, 
                                    Double_t         chi2nuCut) const
 {
+  // 
+  // Fit each histogram to up to @a nParticles particle responses.
+  // 
+  // Parameters:
+  //    dir         Output list 
+  //    eta         Eta axis 
+  //    lowCut      Lower cut 
+  //    nParticles  Max number of convolved landaus to fit
+  //    minEntries  Minimum number of entries 
+  //    minusBins   Number of bins from peak to subtract to 
+  //                    get the fit range 
+  //    relErrorCut Cut applied to relative error of parameter. 
+  //                    Note, for multi-particle weights, the cut 
+  //                    is loosend by a factor of 2 
+  //    chi2nuCut   Cut on @f$ \chi^2/\nu@f$ - 
+  //                    the reduced @f$\chi^2@f$ 
+  //
+
   // Get our ring list from the output container 
   TList* l = GetOutputList(dir);
   if (!l) return 0; 
@@ -742,6 +960,31 @@ AliFMDEnergyFitter::RingHistos::FitHist(TH1*     dist,
                                        Double_t relErrorCut, 
                                        Double_t chi2nuCut) const
 {
+  // 
+  // Fit a signal histogram.  First, the bin @f$ b_{min}@f$ with
+  // maximum bin content in the range @f$ [E_{min},\infty]@f$ is
+  // found.  Then the fit range is set to the bin range 
+  // @f$ [b_{min}-\Delta b,b_{min}+2\Delta b]@f$, and a 1 
+  // particle signal is fitted to that.  The parameters of that fit 
+  // is then used as seeds for a fit of the @f$ N@f$ particle response 
+  // to the data in the range 
+  // @f$ [b_{min}-\Delta b,N(\Delta_1+\xi_1\log(N))+2N\xi@f$
+  // 
+  // Parameters:
+  //    dist        Histogram to fit 
+  //    lowCut      Lower cut @f$ E_{min}@f$ on signal 
+  //    nParticles  Max number @f$ N@f$ of convolved landaus to fit
+  //    minusBins   Number of bins @f$ \Delta b@f$ from peak to 
+  //                    subtract to get the fit range 
+  //    relErrorCut Cut applied to relative error of parameter. 
+  //                    Note, for multi-particle weights, the cut 
+  //                    is loosend by a factor of 2 
+  //    chi2nuCut   Cut on @f$ \chi^2/\nu@f$ - 
+  //                    the reduced @f$\chi^2@f$ 
+  // 
+  // Return:
+  //    The best fit function 
+  //
   Double_t maxRange = 10;
 
   // Create a fitter object 
@@ -805,6 +1048,24 @@ AliFMDEnergyFitter::RingHistos::CheckResult(TFitResult* r,
                                            Double_t relErrorCut, 
                                            Double_t chi2nuCut) const
 {
+  // 
+  // Check the result of the fit. Returns true if 
+  // - @f$ \chi^2/\nu < \max{\chi^2/\nu}@f$
+  // - @f$ \Delta p_i/p_i < \delta_e@f$ for all parameters.  Note, 
+  //   for multi-particle fits, this requirement is relaxed by a 
+  //   factor of 2
+  // - @f$ a_{n} > 10^{-7}@f$ when fitting to an @f$ n@f$ 
+  //   particle response 
+  // 
+  // Parameters:
+  //    r           Result to check
+  //    relErrorCut Cut @f$ \delta_e@f$ applied to relative error 
+  //                    of parameter.  
+  //    chi2nuCut   Cut @f$ \max{\chi^2/\nu}@f$ 
+  // 
+  // Return:
+  //    true if fit is good. 
+  //
   if (fDebug > 10) r->Print();
   TString  n    = r->GetName();
   n.ReplaceAll("TFitResult-", "");
@@ -871,6 +1132,21 @@ AliFMDEnergyFitter::RingHistos::FindBestFits(TList*              d,
                                             Double_t            chi2nuCut,
                                             Double_t            minWeightCut)
 {
+  // 
+  // Find the best fits 
+  // 
+  // Parameters:
+  //    d              Parent list
+  //    obj            Object to add fits to
+  //    eta            Eta axis 
+  //    relErrorCut    Cut applied to relative error of parameter. 
+  //                       Note, for multi-particle weights, the cut 
+  //                       is loosend by a factor of 2 
+  //    chi2nuCut      Cut on @f$ \chi^2/\nu@f$ - 
+  //                       the reduced @f$\chi^2@f$ 
+  //    minWeightCut   Least valid @f$ a_i@f$ 
+  //
+
   // Get our ring list from the output container 
   TList* l = GetOutputList(d);
   if (!l) return; 
@@ -910,6 +1186,21 @@ AliFMDEnergyFitter::RingHistos::FindBestFit(TH1* dist,
                                            Double_t chi2nuCut,
                                            Double_t minWeightCut) 
 {
+  // 
+  // Find the best fit 
+  // 
+  // Parameters:
+  //    dist           Histogram 
+  //    relErrorCut    Cut applied to relative error of parameter. 
+  //                       Note, for multi-particle weights, the cut 
+  //                       is loosend by a factor of 2 
+  //    chi2nuCut      Cut on @f$ \chi^2/\nu@f$ - 
+  //                       the reduced @f$\chi^2@f$ 
+  //    minWeightCut   Least valid @f$ a_i@f$ 
+  // 
+  // Return:
+  //    Best fit 
+  //
   TList* funcs = dist->GetListOfFunctions();
   TIter  next(funcs);
   TF1*   func = 0;
@@ -931,6 +1222,12 @@ AliFMDEnergyFitter::RingHistos::FindBestFit(TH1* dist,
 void
 AliFMDEnergyFitter::RingHistos::Output(TList* dir)
 {
+  // 
+  // Define outputs
+  // 
+  // Parameters:
+  //    dir 
+  //
   fList = DefineOutputList(dir);
 }
 
index a106db1b8faddcc3ffffd9890b908946ca88d06e..5a8a9ed6a634215c52f02e37cef736ab64c45cdd 100644 (file)
@@ -1,3 +1,6 @@
+//
+// Class to fit the energy distribution.  
+//
 #ifndef ALIFMDENERGYFITTER_H
 #define ALIFMDENERGYFITTER_H
 #include <TNamed.h>
index c8905a882447904f9b3c5e901eb1b2ea38c6e030..8bc5a999e452f3e4b3ea3c66a2c1b2a6617463cc 100644 (file)
@@ -1,6 +1,21 @@
+// 
+// Histogram and fit the energy loss distributions for the FMD
+// 
+// Inputs: 
+//   - AliESDEvent 
+//
+// Outputs: 
+//   - None
+// 
+// Histograms:
+//   
+// Corrections used:
+//   - None
+// 
+// 
+//
 #include "AliFMDEnergyFitterTask.h"
 #include "AliLog.h"
-// #include "AliFMDAnaParameters.h"
 #include "AliESDEvent.h"
 #include "AliAODForwardMult.h"
 #include "AliForwardCorrectionManager.h"
@@ -17,6 +32,9 @@ AliFMDEnergyFitterTask::AliFMDEnergyFitterTask()
     fEnergyFitter(),
     fList(0)
 {
+  // 
+  // Constructor
+  //
 }
 
 //____________________________________________________________________
@@ -27,6 +45,12 @@ AliFMDEnergyFitterTask::AliFMDEnergyFitterTask(const char* name)
     fEnergyFitter("energy"),
     fList(0)
 {
+  // 
+  // Constructor 
+  // 
+  // Parameters:
+  //    name Name of task 
+  //
   DefineOutput(1, TList::Class());
 }
 
@@ -38,6 +62,12 @@ AliFMDEnergyFitterTask::AliFMDEnergyFitterTask(const AliFMDEnergyFitterTask& o)
     fEnergyFitter(o.fEnergyFitter),
     fList(o.fList) 
 {
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //    o Object to copy from 
+  //
   DefineOutput(1, TList::Class());
 }
 
@@ -45,6 +75,15 @@ AliFMDEnergyFitterTask::AliFMDEnergyFitterTask(const AliFMDEnergyFitterTask& o)
 AliFMDEnergyFitterTask&
 AliFMDEnergyFitterTask::operator=(const AliFMDEnergyFitterTask& o)
 {
+  // 
+  // Assignment operator 
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this object 
+  //
   AliAnalysisTaskSE::operator=(o);
 
   fFirstEvent        = o.fFirstEvent;
@@ -59,6 +98,12 @@ AliFMDEnergyFitterTask::operator=(const AliFMDEnergyFitterTask& o)
 void
 AliFMDEnergyFitterTask::SetDebug(Int_t dbg)
 {
+  // 
+  // Set the debug level 
+  // 
+  // Parameters:
+  //    dbg Debug level
+  //
   fEventInspector.SetDebug(dbg);
   fEnergyFitter.SetDebug(dbg);
 }
@@ -67,6 +112,10 @@ AliFMDEnergyFitterTask::SetDebug(Int_t dbg)
 void
 AliFMDEnergyFitterTask::Init()
 {
+  // 
+  // Initialize the task 
+  // 
+  //
   fFirstEvent = true;
 }
 
@@ -74,10 +123,10 @@ AliFMDEnergyFitterTask::Init()
 void
 AliFMDEnergyFitterTask::InitializeSubs()
 {
-
-  // AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
-  // pars->Init(kTRUE);
-
+  // 
+  // Initialise the sub objects and stuff.  Called on first event 
+  // 
+  //
   AliForwardCorrectionManager& fcm = AliForwardCorrectionManager::Instance();
   fcm.Init(fEventInspector.GetCollisionSystem(), 
           fEventInspector.GetEnergy(),
@@ -92,6 +141,10 @@ AliFMDEnergyFitterTask::InitializeSubs()
 void
 AliFMDEnergyFitterTask::UserCreateOutputObjects()
 {
+  // 
+  // Create output objects 
+  // 
+  //
   fList = new TList;
 
   fEventInspector.DefineOutput(fList);
@@ -103,6 +156,13 @@ AliFMDEnergyFitterTask::UserCreateOutputObjects()
 void
 AliFMDEnergyFitterTask::UserExec(Option_t*)
 {
+  // 
+  // Process each event 
+  // 
+  // Parameters:
+  //    option Not used
+  //  
+
   // static Int_t cnt = 0;
   // cnt++;
   // Get the input data 
@@ -164,6 +224,12 @@ AliFMDEnergyFitterTask::UserExec(Option_t*)
 void
 AliFMDEnergyFitterTask::Terminate(Option_t*)
 {
+  // 
+  // End of job
+  // 
+  // Parameters:
+  //    option Not used 
+  //
   TList* list = dynamic_cast<TList*>(GetOutputData(1));
   if (!list) {
     AliError(Form("No output list defined (%p)", GetOutputData(1)));
@@ -190,6 +256,12 @@ AliFMDEnergyFitterTask::Terminate(Option_t*)
 void
 AliFMDEnergyFitterTask::Print(Option_t*) const
 {
+  // 
+  // Print information 
+  // 
+  // Parameters:
+  //    option Not used
+  //
 }
 
 //
index edc8cb6cf8cb9070aaffa920880bca7e9c71e50b..a5a193a0bf18b4a3407415cbebda1734db4c5127 100644 (file)
@@ -1,5 +1,8 @@
-#ifndef ALIROOT_PWG2_FORWARD_ALIFMDENERGYFITTERTASK_H
-#define ALIROOT_PWG2_FORWARD_ALIFMDENERGYFITTERTASK_H
+// Histogram and fit the energy loss distributions for the FMD
+// 
+// Wraps AliFMDEnergyFitter 
+#ifndef ALIFMDENERGYFITTERTASK_H
+#define ALIFMDENERGYFITTERTASK_H
 #include <AliAnalysisTaskSE.h>
 #include "AliForwardUtil.h"
 #include "AliFMDEventInspector.h"
@@ -110,6 +113,11 @@ public:
   /** 
    * @} 
    */
+  /** 
+   * Set the debug level 
+   * 
+   * @param dbg Debug level
+   */
   void SetDebug(Int_t dbg);
 protected: 
   /** 
index d457bbc68f5691c33d6fcb71ae4f9d1a34a9383c..d58618676289cd08253b739f31d8d7845ede5858 100644 (file)
@@ -1,3 +1,19 @@
+// 
+// This class inspects the event 
+//
+// Input:
+//   - AliESDFMD object possibly corrected for sharing
+//
+// Output:
+//   - A histogram of v_z of events with triggers. 
+//   - A histogram of v_z of events with vertex and triggers 
+//   - A histogram of trigger counters 
+// 
+// Note, that these are added to the master output list 
+//
+// Corrections used: 
+//   - None
+//
 #include "AliFMDEventInspector.h"
 #include "AliLog.h"
 #include "AliESDEvent.h"
@@ -30,6 +46,9 @@ AliFMDEventInspector::AliFMDEventInspector()
     fCollisionSystem(kUnknown),
     fDebug(0)
 {
+  // 
+  // Constructor 
+  //
 }
 
 //____________________________________________________________________
@@ -47,6 +66,12 @@ AliFMDEventInspector::AliFMDEventInspector(const char* name)
     fCollisionSystem(kUnknown),
     fDebug(0)
 {
+  // 
+  // Constructor 
+  // 
+  // Parameters:
+  //   name Name of object
+  //
 }
 
 //____________________________________________________________________
@@ -64,11 +89,20 @@ AliFMDEventInspector::AliFMDEventInspector(const AliFMDEventInspector& o)
     fCollisionSystem(o.fCollisionSystem),
     fDebug(0)
 {
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //   o Object to copy from 
+  //
 }
 
 //____________________________________________________________________
 AliFMDEventInspector::~AliFMDEventInspector()
 {
+  // 
+  // Destructor 
+  //
   if (fHEventsTr)    delete fHEventsTr;
   if (fHEventsTrVtx) delete fHEventsTrVtx;
   if (fHTriggers)    delete fHTriggers;  
@@ -79,6 +113,15 @@ AliFMDEventInspector::~AliFMDEventInspector()
 AliFMDEventInspector&
 AliFMDEventInspector::operator=(const AliFMDEventInspector& o)
 {
+  // 
+  // Assignement operator
+  // 
+  // Parameters:
+  //   o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this object
+  //
   TNamed::operator=(o);
   fHEventsTr         = o.fHEventsTr;
   fHEventsTrVtx      = o.fHEventsTrVtx;
@@ -108,6 +151,18 @@ AliFMDEventInspector::FetchHistograms(TList* d,
                                      TH1I*& hEventsTrVtx, 
                                      TH1I*& hTriggers) const
 {
+  // 
+  // Fetch our histograms from the passed list 
+  // 
+  // Parameters:
+  //   d             Input
+  //   hEventsTr     On return, pointer to histogram, or null
+  //   hEventsTrVtx  On return, pointer to histogram, or null
+  //   hTriggers     On return, pointer to histogram, or null
+  // 
+  // Return:
+  //    true on success, false otherwise 
+  //
   hEventsTr    = 0;
   hEventsTrVtx = 0;
   hTriggers    = 0;
@@ -125,6 +180,12 @@ AliFMDEventInspector::FetchHistograms(TList* d,
 void
 AliFMDEventInspector::Init(const TAxis& vtxAxis)
 {
+  // 
+  // Initialize the object 
+  // 
+  // Parameters:
+  //   vtxAxis Vertex axis in use 
+  //
   fHEventsTr = new TH1I("nEventsTr", "Number of events w/trigger", 
                        vtxAxis.GetNbins(), 
                        vtxAxis.GetXmin(), 
@@ -184,6 +245,13 @@ AliFMDEventInspector::Init(const TAxis& vtxAxis)
 void
 AliFMDEventInspector::DefineOutput(TList* dir)
 {
+  // 
+  // Define the output histograms.  These are put in a sub list of the
+  // passed list.   The histograms are merged before the parent task calls 
+  // AliAnalysisTaskSE::Terminate 
+  // 
+  //   dir Directory to add to 
+  //
   fList = new TList;
   fList->SetName(GetName());
   dir->Add(fList);
@@ -197,6 +265,22 @@ AliFMDEventInspector::Process(const AliESDEvent* event,
                              UShort_t&          ivz, 
                              Double_t&          vz)
 {
+  // 
+  // Process the event 
+  // 
+  // Parameters:
+  //   event     Input event 
+  //   triggers  On return, the triggers fired 
+  //   lowFlux   On return, true if the event is considered a low-flux 
+  //                  event (according to the setting of fLowFluxCut) 
+  //   ivz       On return, the found vertex bin (1-based).  A zero
+  //                  means outside of the defined vertex range
+  //   vz        On return, the z position of the interaction
+  // 
+  // Return:
+  //    0 (or kOk) on success, otherwise a bit mask of error codes 
+  //
+
   // Check that we have an event 
   if (!event) { 
     AliWarning("No ESD event found for input event");
@@ -257,6 +341,16 @@ AliFMDEventInspector::Process(const AliESDEvent* event,
 Bool_t
 AliFMDEventInspector::ReadTriggers(const AliESDEvent* esd, UInt_t& triggers)
 {
+  // 
+  // Read the trigger information from the ESD event 
+  // 
+  // Parameters:
+  //   esd        ESD event 
+  //   triggers   On return, contains the trigger bits 
+  // 
+  // Return:
+  //    @c true on success, @c false otherwise 
+  //
   triggers = 0;
 
   // Get the analysis manager - should always be there 
@@ -349,6 +443,16 @@ AliFMDEventInspector::ReadTriggers(const AliESDEvent* esd, UInt_t& triggers)
 Bool_t
 AliFMDEventInspector::ReadVertex(const AliESDEvent* esd, Double_t& vz)
 {
+  // 
+  // Read the vertex information from the ESD event 
+  // 
+  // Parameters:
+  //   esd  ESD event 
+  //   vz   On return, the vertex Z position 
+  // 
+  // Return:
+  //    @c true on success, @c false otherwise 
+  //
   vz = 0;
   // Get the vertex 
   const AliESDVertex* vertex = esd->GetPrimaryVertexSPD();
@@ -384,6 +488,16 @@ AliFMDEventInspector::ReadVertex(const AliESDEvent* esd, Double_t& vz)
 Bool_t
 AliFMDEventInspector::ReadRunDetails(const AliESDEvent* esd)
 {
+  // 
+  // Read the collision system, collision energy, and L3 field setting
+  // from the ESD
+  // 
+  // Parameters:
+  //   esd ESD to get information from 
+  // 
+  // Return:
+  //    true on success, false 
+  //
   fCollisionSystem = 
     AliForwardUtil::ParseCollisionSystem(esd->GetBeamType());
   fEnergy          = 
@@ -404,6 +518,11 @@ AliFMDEventInspector::ReadRunDetails(const AliESDEvent* esd)
 void
 AliFMDEventInspector::Print(Option_t*) const
 {
+  // 
+  // Print information
+  // 
+  //   option Not used 
+  //
   char ind[gROOT->GetDirLevel()+1];
   for (Int_t i = 0; i < gROOT->GetDirLevel(); i++) ind[i] = ' ';
   ind[gROOT->GetDirLevel()] = '\0';
index ab6ef6eb678f5b464de42b415ca7f80e21a28e00..a2bf52c33291bd18c9386055d952e8d10cbdaf4a 100644 (file)
@@ -1,5 +1,8 @@
-#ifndef ALIROOT_PWG2_FORWARD_ANALYSIS2_ALIFMDEVENTINSPECTOR_H
-#define ALIROOT_PWG2_FORWARD_ANALYSIS2_ALIFMDEVENTINSPECTOR_H
+// 
+// This class inspects the event 
+//
+#ifndef ALIFMDEVENTINSPECTOR_H
+#define ALIFMDEVENTINSPECTOR_H
 #include <TNamed.h>
 class AliESDEvent;
 class TH2D;
index 43d7e79a5d19ee62df389103404ad57307fc09d0..4ec4ad0fbed88ffd6bbc6620829b9beceeab0a83 100644 (file)
@@ -1,10 +1,22 @@
-// Calculate the total energy loss 
+// 
+// This class collects the event histograms into single histograms, 
+// one for each ring in each vertex bin.  
+//
+// Input:
+//   - AliESDFMD object possibly corrected for sharing
+//
+// Output:
+//   - 5 RingHistos objects - each with a number of vertex dependent 
+//     2D histograms of the inclusive charge particle density 
+// 
+// HistCollector used: 
+//   - AliFMDCorrSecondaryMap
+//
 #include "AliFMDHistCollector.h"
 #include <AliESDFMD.h>
 #include <TAxis.h>
 #include <TList.h>
 #include <TMath.h>
-// #include "AliFMDAnaParameters.h"
 #include "AliForwardCorrectionManager.h"
 #include "AliLog.h"
 #include <TH2D.h>
@@ -26,6 +38,15 @@ ClassImp(AliFMDHistCollector)
 AliFMDHistCollector&
 AliFMDHistCollector::operator=(const AliFMDHistCollector& o)
 {
+  // 
+  // Assignement operator
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  //
+  // Return:
+  //    Reference to this object
+  //
   TNamed::operator=(o);
 
   fNCutBins       = o.fNCutBins;
@@ -41,7 +62,13 @@ AliFMDHistCollector::operator=(const AliFMDHistCollector& o)
 void
 AliFMDHistCollector::Init(const TAxis& vtxAxis)
 {
-  // AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
+  // 
+  // Intialise 
+  // 
+  // Parameters:
+  //    vtxAxis  Vertex axis 
+  //  
+
   AliForwardCorrectionManager& fcm = AliForwardCorrectionManager::Instance();
 
   UShort_t nVz = vtxAxis.GetNbins();
@@ -95,6 +122,16 @@ AliFMDHistCollector::Init(const TAxis& vtxAxis)
 Int_t
 AliFMDHistCollector::GetIdx(UShort_t d, Char_t r) const
 {
+  // 
+  // Get the ring index from detector number and ring identifier 
+  // 
+  // Parameters:
+  //    d Detector
+  //    r Ring identifier 
+  // 
+  // Return:
+  //    ring index or -1 in case of problems 
+  //
   Int_t idx = -1;
   switch (d) { 
   case 1: idx = 0; break;
@@ -107,6 +144,14 @@ AliFMDHistCollector::GetIdx(UShort_t d, Char_t r) const
 void
 AliFMDHistCollector::GetDetRing(Int_t idx, UShort_t& d, Char_t& r) const
 {
+  // 
+  // Get the detector and ring from the ring index 
+  // 
+  // Parameters:
+  //    idx Ring index 
+  //    d   On return, the detector or 0 in case of errors 
+  //    r   On return, the ring id or '0' in case of errors 
+  //
   d = 0; 
   r = '\0';
   switch (idx) { 
@@ -123,6 +168,15 @@ void
 AliFMDHistCollector::GetFirstAndLast(Int_t idx, UShort_t vtxbin, 
                                     Int_t& first, Int_t& last) const
 {
+  // 
+  // Get the first and last eta bin to use for a given ring and vertex 
+  // 
+  // Parameters:
+  //    idx      Ring index as given by GetIdx
+  //    vtxBin   Vertex bin (1 based) 
+  //    first    On return, the first eta bin to use 
+  //    last     On return, the last eta bin to use 
+  //
   first = 0; 
   last  = 0;
   
@@ -140,6 +194,16 @@ AliFMDHistCollector::GetFirstAndLast(Int_t idx, UShort_t vtxbin,
 Int_t
 AliFMDHistCollector::GetFirst(Int_t idx, UShort_t v) const 
 {
+  // 
+  // Get the first eta bin to use for a given ring and vertex 
+  // 
+  // Parameters:
+  //    idx Ring index as given by GetIdx
+  //    v vertex bin (1 based)
+  // 
+  // Return:
+  //    First eta bin to use, or -1 in case of problems 
+  //  
   Int_t f, l;
   GetFirstAndLast(idx,v,f,l);
   return f;
@@ -150,6 +214,16 @@ AliFMDHistCollector::GetFirst(Int_t idx, UShort_t v) const
 Int_t
 AliFMDHistCollector::GetLast(Int_t idx, UShort_t v) const 
 {
+  // 
+  // Get the last eta bin to use for a given ring and vertex 
+  // 
+  // Parameters:
+  //    idx Ring index as given by GetIdx
+  //    v vertex bin (1 based)
+  // 
+  // Return:
+  //    Last eta bin to use, or -1 in case of problems 
+  //  
   Int_t f, l;
   GetFirstAndLast(idx,v,f,l);
   return l;
@@ -160,7 +234,20 @@ Int_t
 AliFMDHistCollector::GetOverlap(UShort_t d, Char_t r, 
                                Int_t bin,  UShort_t vtxbin) const
 {
-  // Get the possibly overlapping histogram 
+  // 
+  // Get the possibly overlapping histogram of eta bin @a e in 
+  // detector and ring 
+  // 
+  // Parameters:
+  //    d Detector
+  //    r Ring 
+  //    e Eta bin
+  //    v Vertex bin (1 based)
+  //
+  // Return:
+  //    Overlapping histogram index or -1
+  //
+
   Int_t other = -1;
   if (d == 1) {
     if (bin <= GetLast(2,'I',vtxbin)) other = GetIdx(2,'I');
@@ -185,6 +272,18 @@ AliFMDHistCollector::GetOverlap(UShort_t d, Char_t r,
 Int_t
 AliFMDHistCollector::GetOverlap(Int_t idx, Int_t bin, UShort_t vtxbin) const
 {
+  // 
+  // Get the possibly overlapping histogram of eta bin @a e in 
+  // detector and ring 
+  // 
+  // Parameters:
+  //    i Ring index
+  //    e Eta bin
+  //    v Vertex bin (1 based)
+  //
+  // Return:
+  //    Overlapping histogram index or -1
+  //
   UShort_t d = 0; 
   Char_t   r = '\0';
   GetDetRing(idx, d, r);
@@ -200,6 +299,17 @@ AliFMDHistCollector::Collect(AliForwardUtil::Histos& hists,
                             UShort_t                vtxbin, 
                             TH2D&                   out)
 {
+  // 
+  // Do the calculations 
+  // 
+  // Parameters:
+  //    hists    Cache of histograms 
+  //    vtxBin   Vertex bin (1 based)
+  //    out      Output histogram
+  // 
+  // Return:
+  //    true on successs 
+  //
   for (UShort_t d=1; d<=3; d++) { 
     UShort_t nr = (d == 1 ? 1 : 2);
     for (UShort_t q=0; q<nr; q++) { 
@@ -334,6 +444,12 @@ AliFMDHistCollector::Collect(AliForwardUtil::Histos& hists,
 void
 AliFMDHistCollector::Print(Option_t* /* option */) const
 {
+  // 
+  // Print information 
+  // 
+  // Parameters:
+  //    option Not used
+  //
   char ind[gROOT->GetDirLevel()+1];
   for (Int_t i = 0; i < gROOT->GetDirLevel(); i++) ind[i] = ' ';
   ind[gROOT->GetDirLevel()] = '\0';
index a90f345cb19934c6bb163bc7906faaad0d0af92a..58690194b177c1a2304ec4df4bb328d68419a057 100644 (file)
@@ -1,5 +1,9 @@
-#ifndef ALIROOT_PWG2_FORWARD_ANALYSIS2_ALIFMDHISTCOLLECTOR_H
-#define ALIROOT_PWG2_FORWARD_ANALYSIS2_ALIFMDHISTCOLLECTOR_H
+// 
+// This class collects the event histograms into single histograms, 
+// one for each ring in each vertex bin.  
+//
+#ifndef ALIFMDHISTCOLLECTOR_H
+#define ALIFMDHISTCOLLECTOR_H
 #include <TNamed.h>
 #include <TList.h>
 #include <TArrayI.h>
@@ -60,6 +64,8 @@ public:
   /** 
    * Assignement operator
    * 
+   * @param o Object to assign from 
+   *
    * @return Reference to this object
    */
   AliFMDHistCollector& operator=(const AliFMDHistCollector&);
index d72c3c56b171f9786636d24da983b92d20cb0a49..569e0932f06bec911e1730bf279d91f24f954618 100644 (file)
@@ -1,10 +1,26 @@
+// 
+// This class calculates the exclusive charged particle density
+// in each for the 5 FMD rings. 
+//
+// Input:
+//   - 5 RingHistos objects - each with a number of vertex dependent 
+//     2D histograms of the inclusive charge particle density 
+//
+// Output:
+//   - 5 RingHistos objects - each with a number of vertex dependent 
+//     2D histograms of the exclusive charge particle density 
+// 
+// Corrections used: 
+//   - AliFMDCorrSecondaryMap;
+//   - AliFMDCorrVertexBias
+//   - AliFMDCorrMergingEfficiency
+//
 #include "AliFMDMCCorrections.h"
 #include <AliESDFMD.h>
 #include <TAxis.h>
 #include <TList.h>
 #include <TMath.h>
 #include "AliForwardCorrectionManager.h"
-// #include "AliFMDAnaParameters.h"
 #include "AliLog.h"
 #include <TH2D.h>
 #include <TROOT.h>
@@ -21,6 +37,9 @@ ClassImp(AliFMDMCCorrections)
 //____________________________________________________________________
 AliFMDMCCorrections::~AliFMDMCCorrections()
 {
+  // 
+  // Destructor 
+  //
   if (fComps) fComps->Clear();
   if (fFMD1i) delete fFMD1i;
   if (fFMD2i) delete fFMD2i;
@@ -33,6 +52,15 @@ AliFMDMCCorrections::~AliFMDMCCorrections()
 AliFMDMCCorrections&
 AliFMDMCCorrections::operator=(const AliFMDMCCorrections& o)
 {
+  // 
+  // Assignement operator
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this object
+  //
   AliFMDCorrections::operator=(o);
 
   return *this;
@@ -43,6 +71,16 @@ Bool_t
 AliFMDMCCorrections::CorrectMC(AliForwardUtil::Histos& hists,
                               UShort_t                vtxbin)
 {
+  // 
+  // Do the calculations 
+  // 
+  // Parameters:
+  //    hists    Cache of histograms 
+  //    vtxBin   Vertex bin 
+  // 
+  // Return:
+  //    true on successs 
+  //
   AliForwardCorrectionManager& fcm = AliForwardCorrectionManager::Instance();
 
   UShort_t uvb = vtxbin;
@@ -79,6 +117,12 @@ AliFMDMCCorrections::CorrectMC(AliForwardUtil::Histos& hists,
 void
 AliFMDMCCorrections::Init(const TAxis& eAxis)
 {
+  // 
+  // Initialize this object 
+  // 
+  // Parameters:
+  //    etaAxis Eta axis to use 
+  //
   fFMD1i = Make(1,'I',eAxis);
   fFMD2i = Make(2,'I',eAxis);
   fFMD2o = Make(2,'O',eAxis);
@@ -97,6 +141,17 @@ TProfile2D*
 AliFMDMCCorrections::Make(UShort_t d, Char_t r, 
                                const TAxis& axis) const
 {
+  // 
+  // MAke comparison profiles
+  // 
+  // Parameters:
+  //    d     Detector 
+  //    r     Ring 
+  //    axis  Eta axis 
+  // 
+  // Return:
+  //    Newly allocated profile object
+  //
   TProfile2D* ret = new TProfile2D(Form("FMD%d%c_esd_vs_mc", d, r),
                                   Form("ESD/MC signal for FMD%d%c", d, r),
                                   axis.GetNbins(), 
@@ -114,6 +169,15 @@ AliFMDMCCorrections::Make(UShort_t d, Char_t r,
 void
 AliFMDMCCorrections::Fill(UShort_t d, Char_t r, TH2* esd, TH2* mc)
 {
+  // 
+  // Fill comparison profiles
+  // 
+  // Parameters:
+  //    d    Detector 
+  //    r    Ring 
+  //    esd  ESD histogram
+  //    mc   MC histogram
+  //
   if (!esd || !mc) return;
   TProfile2D* p = 0;
   switch (d) { 
@@ -140,6 +204,18 @@ Bool_t
 AliFMDMCCorrections::CompareResults(AliForwardUtil::Histos& esd,
                                          AliForwardUtil::Histos& mc)
 {
+  // 
+  // Compare the result of analysing the ESD for 
+  // the inclusive charged particle density to analysing 
+  // MC truth 
+  // 
+  // Parameters:
+  //    esd 
+  //    mc 
+  // 
+  // Return:
+  //   true 
+  //
   Fill(1, 'I', esd.Get(1,'I'), mc.Get(1,'I'));
   Fill(2, 'I', esd.Get(2,'I'), mc.Get(2,'I'));
   Fill(2, 'O', esd.Get(2,'O'), mc.Get(2,'O'));
@@ -153,6 +229,12 @@ AliFMDMCCorrections::CompareResults(AliForwardUtil::Histos& esd,
 void
 AliFMDMCCorrections::DefineOutput(TList* dir)
 {
+  // 
+  // Output diagnostic histograms to directory 
+  // 
+  // Parameters:
+  //    dir List to write in
+  //  
   AliFMDCorrections::DefineOutput(dir);
   TList* d = static_cast<TList*>(dir->FindObject(GetName()));
 
index cd6defbf16395eccd9a4712fae6381c250f9145a..cbb2083f5b3451189ae630625045ba18b9d91708 100644 (file)
@@ -1,3 +1,7 @@
+// 
+// This class calculates the exclusive charged particle density
+// in each for the 5 FMD rings. 
+//
 #ifndef ALIFMDMCCORRECTIONS_H
 #define ALIFMDMCCORRECTIONS_H
 #include "AliFMDCorrections.h"
index 26e41a9e2e428f4c693ad01d38ddaadb53365db1..775d4d43ddd84985105ed5ee337f57cf2cc8b89b 100644 (file)
@@ -1,9 +1,22 @@
+// 
+// This class calculates the inclusive charged particle density
+// in each for the 5 FMD rings based on the MC truth.
+//
+// Input:
+//   - AliMCEvent  MC truth event infromation
+//
+// Output:
+//   - None
+//
+// Corrections used: 
+//   - None
+//
+//
 #include "AliFMDMCDensityCalculator.h"
 #include <TMath.h>
 #include "AliForwardCorrectionManager.h"
 #include "AliFMDStripIndex.h"
 #include "AliMCEvent.h"
-// #include "AliFMDAnaParameters.h"
 #include "AliESDFMD.h"
 #include "AliLog.h"
 #include <TH2D.h>
@@ -17,6 +30,9 @@ ClassImp(AliFMDMCDensityCalculator)
 //____________________________________________________________________
 AliFMDMCDensityCalculator::~AliFMDMCDensityCalculator()
 {
+  // 
+  // Destructor 
+  //
   if (fComps)  fComps->Clear();
   if (fFMD1i)  delete fFMD1i;
   if (fFMD2i)  delete fFMD2i;
@@ -34,10 +50,52 @@ AliFMDMCDensityCalculator::~AliFMDMCDensityCalculator()
 AliFMDMCDensityCalculator&
 AliFMDMCDensityCalculator::operator=(const AliFMDMCDensityCalculator& o)
 {
+  // 
+  // Assignement operator
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this object
+  //
   AliFMDDensityCalculator::operator=(o);
   return *this;
 }
 
+
+//____________________________________________________________________
+void
+AliFMDMCDensityCalculator::Init(const TAxis& eAxis)
+{
+  // 
+  // Initialize this object 
+  // 
+  // Parameters:
+  //    etaAxis Eta axis to use 
+  //
+  fFMD1i  = Make(1,'I',eAxis);
+  fFMD2i  = Make(2,'I',eAxis);
+  fFMD2o  = Make(2,'O',eAxis);
+  fFMD3i  = Make(3,'I',eAxis);
+  fFMD3o  = Make(3,'O',eAxis); 
+  fFMD1iC = Make(1,'I');
+  fFMD2iC = Make(2,'I');
+  fFMD2oC = Make(2,'O');
+  fFMD3iC = Make(3,'I');
+  fFMD3oC = Make(3,'O');
+  fComps->Add(fFMD1i);
+  fComps->Add(fFMD2i);
+  fComps->Add(fFMD2o);
+  fComps->Add(fFMD3i);
+  fComps->Add(fFMD3o);
+  fComps->Add(fFMD1iC);
+  fComps->Add(fFMD2iC);
+  fComps->Add(fFMD2oC);
+  fComps->Add(fFMD3iC);
+  fComps->Add(fFMD3oC);
+}
     
 
 //____________________________________________________________________
@@ -45,6 +103,18 @@ Bool_t
 AliFMDMCDensityCalculator::CalculateMC(const AliESDFMD&        fmd,
                                       AliForwardUtil::Histos& hists)
 {
+  // 
+  // Calculate the charged particle density from the MC track references. 
+  // 
+  // Parameters:
+  //    event  MC event
+  //    hists  Histograms to fill
+  //    vz     Interaction z coordinate @f$ v_z@f$
+  //    vtxBin bin corresponding to @f$ v_z@f$
+  // 
+  // Return:
+  //    true on success
+  //
   for (UShort_t d=1; d<=3; d++) { 
     UShort_t nr = (d == 1 ? 1 : 2);
     for (UShort_t q=0; q<nr; q++) { 
@@ -72,38 +142,22 @@ AliFMDMCDensityCalculator::CalculateMC(const AliESDFMD&        fmd,
   return kTRUE;
 }
 
-//____________________________________________________________________
-void
-AliFMDMCDensityCalculator::Init(const TAxis& eAxis)
-{
-  fFMD1i  = Make(1,'I',eAxis);
-  fFMD2i  = Make(2,'I',eAxis);
-  fFMD2o  = Make(2,'O',eAxis);
-  fFMD3i  = Make(3,'I',eAxis);
-  fFMD3o  = Make(3,'O',eAxis); 
-  fFMD1iC = Make(1,'I');
-  fFMD2iC = Make(2,'I');
-  fFMD2oC = Make(2,'O');
-  fFMD3iC = Make(3,'I');
-  fFMD3oC = Make(3,'O');
-  fComps->Add(fFMD1i);
-  fComps->Add(fFMD2i);
-  fComps->Add(fFMD2o);
-  fComps->Add(fFMD3i);
-  fComps->Add(fFMD3o);
-  fComps->Add(fFMD1iC);
-  fComps->Add(fFMD2iC);
-  fComps->Add(fFMD2oC);
-  fComps->Add(fFMD3iC);
-  fComps->Add(fFMD3oC);
-}
-
 //____________________________________________________________________
 TProfile2D*
 AliFMDMCDensityCalculator::Make(UShort_t d, Char_t r, 
                                const TAxis& axis) const
 {
+  // 
+  // MAke comparison profiles
+  // 
+  // Parameters:
+  //    d     Detector 
+  //    r     Ring 
+  //    axis  Eta axis 
+  // 
+  // Return:
+  //    Newly allocated profile object
+  //
   TProfile2D* ret = new TProfile2D(Form("FMD%d%c_esd_vs_mc", d, r),
                                   Form("ESD/MC signal for FMD%d%c", d, r),
                                   axis.GetNbins(), 
@@ -121,6 +175,16 @@ AliFMDMCDensityCalculator::Make(UShort_t d, Char_t r,
 TH2D*
 AliFMDMCDensityCalculator::Make(UShort_t d, Char_t r) const
 {
+  // 
+  // MAke comparison profiles
+  // 
+  // Parameters:
+  //    d     Detector 
+  //    r     Ring 
+  // 
+  // Return:
+  //    Newly allocated profile object
+  //
   TH2D* ret = new TH2D(Form("FMD%d%c_corr_mc_esd", d, r),
                       Form("ESD-MC correlation for FMD%d%c", d, r),
                       200, 0, 20, 200, 0, 20);
@@ -134,6 +198,15 @@ AliFMDMCDensityCalculator::Make(UShort_t d, Char_t r) const
 void
 AliFMDMCDensityCalculator::Fill(UShort_t d, Char_t r, TH2* esd, TH2* mc)
 {
+  // 
+  // Fill comparison profiles
+  // 
+  // Parameters:
+  //    d    Detector 
+  //    r    Ring 
+  //    esd  ESD histogram
+  //    mc   MC histogram
+  //
   if (!esd || !mc) return;
   TProfile2D* p = 0;
   TH2D*       h = 0;
@@ -171,6 +244,18 @@ Bool_t
 AliFMDMCDensityCalculator::CompareResults(AliForwardUtil::Histos& esd,
                                          AliForwardUtil::Histos& mc)
 {
+  // 
+  // Compare the result of analysing the ESD for 
+  // the inclusive charged particle density to analysing 
+  // MC truth 
+  // 
+  // Parameters:
+  //    esd 
+  //    mc 
+  // 
+  // Return:
+  //   true 
+  //
   Fill(1, 'I', esd.Get(1,'I'), mc.Get(1,'I'));
   Fill(2, 'I', esd.Get(2,'I'), mc.Get(2,'I'));
   Fill(2, 'O', esd.Get(2,'O'), mc.Get(2,'O'));
@@ -184,6 +269,12 @@ AliFMDMCDensityCalculator::CompareResults(AliForwardUtil::Histos& esd,
 void
 AliFMDMCDensityCalculator::DefineOutput(TList* dir)
 {
+  // 
+  // Output diagnostic histograms to directory 
+  // 
+  // Parameters:
+  //    dir List to write in
+  //  
   AliFMDDensityCalculator::DefineOutput(dir);
   TList* d = static_cast<TList*>(dir->FindObject(GetName()));
 
index 55d97942c7f08000cb7cf34581b8bd24dd9a6dc5..98bbe6122d6bcce11b1563939013d2c9a1843427 100644 (file)
@@ -1,3 +1,7 @@
+// 
+// This class calculates the inclusive charged particle density
+// in each for the 5 FMD rings based on the MC truth.
+//
 #ifndef ALIFMDMCDENSITYCALCULATOR_H
 #define ALIFMDMCDENSITYCALCULATOR_H
 #include "AliFMDDensityCalculator.h"
index 3aa7bd54d8e52173e64dcf168a3162b71447bfc9..1b247c161326cdcbaeec7f7288f3f1f848a4431f 100644 (file)
@@ -1,6 +1,23 @@
 //
-// Class to do the sharing correction of FMD ESD data
+// Class to do the sharing correction for MC data.
 //
+// Input: 
+//    - AliESDFMD object  - from reconstruction
+//    - Kinematics
+//    - Track-References
+//
+// Output: 
+//    - AliESDFMD object  - copy of input, but with signals merged 
+//
+// Corrections used: 
+//    - None
+//
+// Histograms: 
+//    - For each ring (FMD1i, FMD2i, FMD2o, FMD3i, FMD3o) the distribution of 
+//      signals before and after the filter.  
+//    - For each ring (see above), an array of distributions of number of 
+//      hit strips for each vertex bin (if enabled - see Init method)
+// 
 #include "AliFMDMCSharingFilter.h"
 #include <AliESDFMD.h>
 #include <AliMCEvent.h>
@@ -10,8 +27,6 @@
 #include <TList.h>
 #include <TH1.h>
 #include <TMath.h>
-#include "AliForwardCorrectionManager.h"
-// #include "AliFMDAnaParameters.h"
 #include "AliFMDStripIndex.h"
 #include <AliLog.h>
 #include <TROOT.h>
@@ -24,17 +39,6 @@ ClassImp(AliFMDMCSharingFilter)
 #endif 
 
 
-//____________________________________________________________________
-AliFMDMCSharingFilter::AliFMDMCSharingFilter()
-  : AliFMDSharingFilter(), 
-    fFMD1i(0),
-    fFMD2i(0),
-    fFMD2o(0),
-    fFMD3i(0),
-    fFMD3o(0), 
-    fSumEta(0)
-{}
-
 //____________________________________________________________________
 AliFMDMCSharingFilter::AliFMDMCSharingFilter(const char* title)
   : AliFMDSharingFilter(title), 
@@ -45,6 +49,12 @@ AliFMDMCSharingFilter::AliFMDMCSharingFilter(const char* title)
     fFMD3o(0),
     fSumEta(0)
 {
+  // 
+  // Constructor 
+  // 
+  // Parameters:
+  //    title Title of object  - not significant 
+  //
   fFMD1i = new TH2D("FMD1i_corr", "Merged vs MC", 21, -.5, 20.5, 100, 0, 20);
   fFMD2i = new TH2D("FMD2i_corr", "Merged vs MC", 21, -.5, 20.5, 100, 0, 20);
   fFMD2o = new TH2D("FMD2o_corr", "Merged vs MC", 21, -.5, 20.5, 100, 0, 20);
@@ -87,11 +97,20 @@ AliFMDMCSharingFilter::AliFMDMCSharingFilter(const AliFMDMCSharingFilter& o)
     fFMD3o(o.fFMD3o),
     fSumEta(o.fSumEta)
 {
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //    o Object to copy from 
+  //
 }
 
 //____________________________________________________________________
 AliFMDMCSharingFilter::~AliFMDMCSharingFilter()
 {
+  // 
+  // Destructor
+  //
   if (fFMD1i)  delete fFMD1i;
   if (fFMD2i)  delete fFMD2i;
   if (fFMD2o)  delete fFMD2o;
@@ -104,6 +123,15 @@ AliFMDMCSharingFilter::~AliFMDMCSharingFilter()
 AliFMDMCSharingFilter&
 AliFMDMCSharingFilter::operator=(const AliFMDMCSharingFilter& o)
 {
+  // 
+  // Assignment operator 
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this 
+  //
   AliFMDSharingFilter::operator=(o);
   return *this;
 }
@@ -116,6 +144,16 @@ AliFMDMCSharingFilter::StoreParticle(UShort_t   d,
                                     UShort_t   t, 
                                     AliESDFMD& output) const
 {
+  // 
+  // Store a particle hit in FMD<i>dr</i>[<i>s,t</i>] in @a output
+  // 
+  // Parameters:
+  //    d       Detector
+  //    r       Ring
+  //    s       Sector
+  //    t       Strip
+  //    output  Output ESD object
+  //
   Double_t old = output.Multiplicity(d,r,s,t);
   if (old == AliESDFMD::kInvalidMult) old = 0;
   output.SetMultiplicity(d,r,s,t,old+1);
@@ -128,6 +166,17 @@ AliFMDMCSharingFilter::FilterMC(const AliESDFMD&  input,
                                Double_t          vz,
                                AliESDFMD&        output)
 {
+  // 
+  // Filter the input AliESDFMD object
+  // 
+  // Parameters:
+  //    input     Input (from ESD) - used for eta
+  //    lowFlux   If this is a low-flux event 
+  //    output    Output AliESDFMD object 
+  // 
+  // Return:
+  //    True on success, false otherwise 
+  //
   output.Clear();
 
   // Copy eta values to output 
@@ -220,6 +269,15 @@ void
 AliFMDMCSharingFilter::CompareResults(const AliESDFMD&  esd, 
                                      const AliESDFMD&  mc)
 {
+  // 
+  // Compare the result of merging to the monte-carlo truth.  This
+  // fills the correlation histograms
+  // 
+  // Parameters:
+  //    esd  ESD after sharing correction
+  //    mc   MC ESD 
+  //
+
   // Copy eta values to output 
   for (UShort_t d = 1; d <= 3; d++) { 
     UShort_t nq = (d == 1 ? 1 : 2);
@@ -250,6 +308,14 @@ AliFMDMCSharingFilter::CompareResults(const AliESDFMD&  esd,
 void
 AliFMDMCSharingFilter::DefineOutput(TList* dir)
 {
+  // 
+  // Define the output histograms.  These are put in a sub list of the
+  // passed list.   The histograms are merged before the parent task calls 
+  // AliAnalysisTaskSE::Terminate 
+  // 
+  // Parameters:
+  //    dir Directory to add to 
+  //
   AliFMDSharingFilter::DefineOutput(dir);
   TList* d = static_cast<TList*>(dir->FindObject(GetName()));
   TList* cd = new TList;
@@ -267,6 +333,13 @@ AliFMDMCSharingFilter::DefineOutput(TList* dir)
 void
 AliFMDMCSharingFilter::ScaleHistograms(TList* dir, Int_t nEvents)
 {
+  // 
+  // Scale the histograms to the total number of events 
+  // 
+  // Parameters:
+  //    dir     Where the output is 
+  //    nEvents Number of events 
+  //
   AliFMDSharingFilter::ScaleHistograms(dir, nEvents);
   TH1D* sumEta = static_cast<TH1D*>(dir->FindObject("mcSumEta"));
   if (!sumEta) { 
@@ -280,6 +353,12 @@ AliFMDMCSharingFilter::ScaleHistograms(TList* dir, Int_t nEvents)
 void
 AliFMDMCSharingFilter::Print(Option_t* option) const
 {
+  // 
+  // Print information
+  // 
+  // Parameters:
+  //    option Not used 
+  //
   char ind[gROOT->GetDirLevel()+1];
   for (Int_t i = 0; i < gROOT->GetDirLevel(); i++) ind[i] = ' ';
   ind[gROOT->GetDirLevel()] = '\0';
index c4538a1b8479ef8721247a614ec735a1ab18bb03..0c73b561a544a6eacbf26c521e89fc3455e3fb32 100644 (file)
@@ -1,3 +1,6 @@
+//
+// Class to do the sharing correction for MC data.
+//
 #ifndef ALIFMDMCSHARINGFILTER_H
 #define ALIFMDMCSHARINGFILTER_H
 #include "AliFMDSharingFilter.h"
@@ -8,12 +11,14 @@ class AliMCEvent;
  *
  * @par Input: 
  *    - AliESDFMD object  - from reconstruction
+ *    - Kinematics
+ *    - Track-References
  *
  * @par Output: 
  *    - AliESDFMD object  - copy of input, but with signals merged 
  *
  * @par Corrections used: 
- *    - AliCorrELossFit 
+ *    - None
  *
  * @par Histograms: 
  *    - For each ring (FMD1i, FMD2i, FMD2o, FMD3i, FMD3o) the distribution of 
@@ -35,7 +40,15 @@ public:
   /** 
    * Default Constructor - do not use 
    */
-  AliFMDMCSharingFilter();
+  AliFMDMCSharingFilter()
+  : AliFMDSharingFilter(), 
+    fFMD1i(0),
+    fFMD2i(0),
+    fFMD2o(0),
+    fFMD3i(0),
+    fFMD3o(0), 
+    fSumEta(0)
+  {}
   /** 
    * Constructor 
    * 
@@ -100,6 +113,15 @@ public:
    */
   void Print(Option_t* option="") const;
 protected:
+  /** 
+   * Store a particle hit in FMD<i>dr</i>[<i>s,t</i>] in @a output
+   * 
+   * @param d       Detector
+   * @param r       Ring
+   * @param s       Sector
+   * @param t       Strip
+   * @param output  Output ESD object
+   */
   void StoreParticle(UShort_t d, Char_t r, UShort_t s, UShort_t t, 
                     AliESDFMD& output) const;
   TH2D* fFMD1i;  // ESD-MC correlation 
index ac6fc5630b9c1310d60398fe893f05a08ccc8697..7266d6e31f187e9ec57d96a37f43ed1a279bed5c 100644 (file)
@@ -1,5 +1,25 @@
 //
-// Class to do the sharing correction of FMD ESD data
+// Class to do the sharing correction.  That is, a filter that merges 
+// adjacent strip signals presumably originating from a single particle 
+// that impinges on the detector in such a way that it deposite energy 
+// into two or more strips. 
+//
+// Input: 
+//    - AliESDFMD object  - from reconstruction
+//
+// Output: 
+//    - AliESDFMD object  - copy of input, but with signals merged 
+//
+// Corrections used: 
+//    - AliFMDCorrELossFit
+//
+// Histograms: 
+//    - For each ring (FMD1i, FMD2i, FMD2o, FMD3i, FMD3o) the distribution of 
+//      signals before and after the filter.  
+//    - For each ring (see above), an array of distributions of number of 
+//      hit strips for each vertex bin (if enabled - see Init method)
+// 
+//
 //
 #include "AliFMDSharingFilter.h"
 #include <AliESDFMD.h>
@@ -8,7 +28,6 @@
 #include <TH1.h>
 #include <TMath.h>
 #include "AliForwardCorrectionManager.h"
-// #include "AliFMDAnaParameters.h"
 #include <AliLog.h>
 #include <TROOT.h>
 #include <iostream>
@@ -28,7 +47,11 @@ AliFMDSharingFilter::AliFMDSharingFilter()
     fCorrectAngles(kFALSE), 
     fNXi(1),
     fDebug(0)
-{}
+{
+  // 
+  // Default Constructor - do not use 
+  //
+}
 
 //____________________________________________________________________
 AliFMDSharingFilter::AliFMDSharingFilter(const char* title)
@@ -39,6 +62,12 @@ AliFMDSharingFilter::AliFMDSharingFilter(const char* title)
     fNXi(1),
     fDebug(0)
 {
+  // 
+  // Constructor 
+  // 
+  // Parameters:
+  //    title Title of object  - not significant 
+  //
   fRingHistos.Add(new RingHistos(1, 'I'));
   fRingHistos.Add(new RingHistos(2, 'I'));
   fRingHistos.Add(new RingHistos(2, 'O'));
@@ -55,6 +84,12 @@ AliFMDSharingFilter::AliFMDSharingFilter(const AliFMDSharingFilter& o)
     fNXi(o.fNXi),
     fDebug(o.fDebug)
 {
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //    o Object to copy from 
+  //
   TIter    next(&o.fRingHistos);
   TObject* obj = 0;
   while ((obj = next())) fRingHistos.Add(obj);
@@ -63,6 +98,9 @@ AliFMDSharingFilter::AliFMDSharingFilter(const AliFMDSharingFilter& o)
 //____________________________________________________________________
 AliFMDSharingFilter::~AliFMDSharingFilter()
 {
+  // 
+  // Destructor
+  //
   fRingHistos.Delete();
 }
 
@@ -70,6 +108,15 @@ AliFMDSharingFilter::~AliFMDSharingFilter()
 AliFMDSharingFilter&
 AliFMDSharingFilter::operator=(const AliFMDSharingFilter& o)
 {
+  // 
+  // Assignment operator 
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this 
+  //
   TNamed::operator=(o);
 
   fLowCut        = o.fLowCut;
@@ -89,6 +136,16 @@ AliFMDSharingFilter::operator=(const AliFMDSharingFilter& o)
 AliFMDSharingFilter::RingHistos*
 AliFMDSharingFilter::GetRingHistos(UShort_t d, Char_t r) const
 {
+  // 
+  // Get the ring histogram container 
+  // 
+  // Parameters:
+  //    d Detector
+  //    r Ring 
+  // 
+  // Return:
+  //    Ring histogram container 
+  //
   Int_t idx = -1;
   switch (d) { 
   case 1: idx = 0; break;
@@ -106,6 +163,17 @@ AliFMDSharingFilter::Filter(const AliESDFMD& input,
                            Bool_t           lowFlux,
                            AliESDFMD&       output)
 {
+  // 
+  // Filter the input AliESDFMD object
+  // 
+  // Parameters:
+  //    input     Input 
+  //    lowFlux   If this is a low-flux event 
+  //    output    Output AliESDFMD object 
+  // 
+  // Return:
+  //    True on success, false otherwise 
+  //
   output.Clear();
   TIter    next(&fRingHistos);
   RingHistos* o      = 0;
@@ -185,6 +253,19 @@ AliFMDSharingFilter::SignalInStrip(const AliESDFMD& input,
                                   UShort_t         s,
                                   UShort_t         t) const
 {
+  // 
+  // Get the signal in a strip 
+  // 
+  // Parameters:
+  //    fmd   ESD object
+  //    d     Detector
+  //    r     Ring 
+  //    s     Sector 
+  //    t     Strip
+  // 
+  // Return:
+  //    The energy signal 
+  //
   Double_t mult = input.Multiplicity(d,r,s,t);
   if (mult == AliESDFMD::kInvalidMult || mult == 0) return mult;
 
@@ -198,6 +279,12 @@ AliFMDSharingFilter::SignalInStrip(const AliESDFMD& input,
 Double_t 
 AliFMDSharingFilter::GetLowCut() const
 {
+  //
+  // Get the low cut.  Normally, the low cut is taken to be the lower
+  // value of the fit range used when generating the energy loss fits.
+  // However, if fLowCut is set (using SetLowCit) to a value greater
+  // than 0, then that value is used.
+  //
   if (fLowCut > 0) return fLowCut;
   AliForwardCorrectionManager&  fcm = AliForwardCorrectionManager::Instance();
   AliFMDCorrELossFit* fits = fcm.GetELossFit();
@@ -208,6 +295,11 @@ AliFMDSharingFilter::GetLowCut() const
 Double_t 
 AliFMDSharingFilter::GetHighCut(UShort_t d, Char_t r, Double_t eta) const
 {
+  //
+  // Get the high cut.  The high cut is defined as the 
+  // most-probably-value peak found from the energy distributions, minus 
+  // 2 times the width of the corresponding Landau.
+  //
   AliForwardCorrectionManager&  fcm = AliForwardCorrectionManager::Instance();
 
  
@@ -246,6 +338,26 @@ AliFMDSharingFilter::MultiplicityOfStrip(Double_t mult,
                                         Bool_t&  usedPrev, 
                                         Bool_t&  usedThis) 
 {
+  // 
+  // The actual algorithm 
+  // 
+  // Parameters:
+  //    mult      The unfiltered signal in the strip
+  //    eta       Psuedo rapidity 
+  //    prevE     Previous strip signal (or 0)
+  //    nextE     Next strip signal (or 0) 
+  //    lowFlux   Whether this is a low flux event 
+  //    d         Detector
+  //    r         Ring 
+  //    s         Sector 
+  //    t         Strip
+  //    usedPrev  Whether the previous strip was used in sharing or not
+  //    usedThis  Wether this strip was used in sharing or not. 
+  // 
+  // Return:
+  //    The filtered signal in the strip
+  //
+
   // IF the multiplicity is very large, or below the cut, reject it, and 
   // flag it as candidate for sharing 
   Double_t    lowCut = GetLowCut();
@@ -331,6 +443,16 @@ AliFMDSharingFilter::MultiplicityOfStrip(Double_t mult,
 Double_t
 AliFMDSharingFilter::AngleCorrect(Double_t mult, Double_t eta) const
 {
+  // 
+  // Angle correct the signal 
+  // 
+  // Parameters:
+  //    mult Angle Un-corrected Signal 
+  //    eta  Pseudo-rapidity 
+  // 
+  // Return:
+  //    Angle corrected signal 
+  //
   Double_t theta =  2 * TMath::ATan(TMath::Exp(-eta));
   if (eta < 0) theta -= TMath::Pi();
   return mult * TMath::Cos(theta);
@@ -339,6 +461,16 @@ AliFMDSharingFilter::AngleCorrect(Double_t mult, Double_t eta) const
 Double_t
 AliFMDSharingFilter::DeAngleCorrect(Double_t mult, Double_t eta) const
 {
+  // 
+  // Angle de-correct the signal 
+  // 
+  // Parameters:
+  //    mult Angle corrected Signal 
+  //    eta  Pseudo-rapidity 
+  // 
+  // Return:
+  //    Angle un-corrected signal 
+  //
   Double_t theta =  2 * TMath::ATan(TMath::Exp(-eta));
   if (eta < 0) theta -= TMath::Pi();
   return mult / TMath::Cos(theta);
@@ -348,6 +480,13 @@ AliFMDSharingFilter::DeAngleCorrect(Double_t mult, Double_t eta) const
 void
 AliFMDSharingFilter::ScaleHistograms(TList* dir, Int_t nEvents)
 {
+  // 
+  // Scale the histograms to the total number of events 
+  // 
+  // Parameters:
+  //    dir     Where the output is 
+  //    nEvents Number of events 
+  //
   if (nEvents <= 0) return;
   TList* d = static_cast<TList*>(dir->FindObject(GetName()));
   if (!d) return;
@@ -362,6 +501,14 @@ AliFMDSharingFilter::ScaleHistograms(TList* dir, Int_t nEvents)
 void
 AliFMDSharingFilter::DefineOutput(TList* dir)
 {
+  // 
+  // Define the output histograms.  These are put in a sub list of the
+  // passed list.   The histograms are merged before the parent task calls 
+  // AliAnalysisTaskSE::Terminate 
+  // 
+  // Parameters:
+  //    dir Directory to add to 
+  //
   TList* d = new TList;
   d->SetName(GetName());
   dir->Add(d);
@@ -375,6 +522,12 @@ AliFMDSharingFilter::DefineOutput(TList* dir)
 void
 AliFMDSharingFilter::Print(Option_t* /*option*/) const
 {
+  // 
+  // Print information
+  // 
+  // Parameters:
+  //    option Not used 
+  //
   char ind[gROOT->GetDirLevel()+1];
   for (Int_t i = 0; i < gROOT->GetDirLevel(); i++) ind[i] = ' ';
   ind[gROOT->GetDirLevel()] = '\0';
@@ -392,7 +545,12 @@ AliFMDSharingFilter::RingHistos::RingHistos()
     fAfter(0), 
     fHits(0),
     fNHits(0)
-{}
+{
+  // 
+  // Default CTOR
+  //
+
+}
 
 //____________________________________________________________________
 AliFMDSharingFilter::RingHistos::RingHistos(UShort_t d, Char_t r)
@@ -402,6 +560,13 @@ AliFMDSharingFilter::RingHistos::RingHistos(UShort_t d, Char_t r)
     fHits(0),
     fNHits(0)
 {
+  // 
+  // Constructor
+  // 
+  // Parameters:
+  //    d detector
+  //    r ring 
+  //
   fBefore = new TH1D(Form("%s_ESD_Eloss", fName.Data()), 
                     Form("Energy loss in %s (reconstruction)", fName.Data()), 
                     1000, 0, 25);
@@ -435,12 +600,28 @@ AliFMDSharingFilter::RingHistos::RingHistos(const RingHistos& o)
     fAfter(o.fAfter),
     fHits(o.fHits),
     fNHits(o.fNHits)
-{}
+{
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //    o Object to copy from 
+  //
+}
 
 //____________________________________________________________________
 AliFMDSharingFilter::RingHistos&
 AliFMDSharingFilter::RingHistos::operator=(const RingHistos& o)
 {
+  // 
+  // Assignment operator 
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this 
+  //
   AliForwardUtil::RingHistos::operator=(o);
   fDet = o.fDet;
   fRing = o.fRing;
@@ -458,6 +639,9 @@ AliFMDSharingFilter::RingHistos::operator=(const RingHistos& o)
 //____________________________________________________________________
 AliFMDSharingFilter::RingHistos::~RingHistos()
 {
+  // 
+  // Destructor 
+  //
   if (fBefore) delete fBefore;
   if (fAfter)  delete fAfter;
   if (fHits)   delete fHits;
@@ -466,6 +650,10 @@ AliFMDSharingFilter::RingHistos::~RingHistos()
 void
 AliFMDSharingFilter::RingHistos::Finish()
 {
+  // 
+  // Finish off 
+  // 
+  //
   fHits->Fill(fNHits);
 }
 
@@ -473,6 +661,13 @@ AliFMDSharingFilter::RingHistos::Finish()
 void
 AliFMDSharingFilter::RingHistos::ScaleHistograms(TList* dir, Int_t nEvents)
 {
+  // 
+  // Scale the histograms to the total number of events 
+  // 
+  // Parameters:
+  //    nEvents Number of events 
+  //    dir     Where the output is 
+  //
   TList* l = GetOutputList(dir);
   if (!l) return; 
 
@@ -488,6 +683,12 @@ AliFMDSharingFilter::RingHistos::ScaleHistograms(TList* dir, Int_t nEvents)
 void
 AliFMDSharingFilter::RingHistos::Output(TList* dir)
 {
+  // 
+  // Make output 
+  // 
+  // Parameters:
+  //    dir where to store 
+  //
   TList* d = DefineOutputList(dir);
   d->Add(fBefore);
   d->Add(fAfter);
index 9a00e827633e87507d61ec538383ccabe6950712..e7fa543d46a9fbd61f2095942e5d675862277b78 100644 (file)
@@ -1,5 +1,11 @@
-#ifndef ALIROOT_PWG2_FORWARD_ALIFMDSHARINGFILTER_H
-#define ALIROOT_PWG2_FORWARD_ALIFMDSHARINGFILTER_H
+//
+// Class to do the sharing correction.  That is, a filter that merges 
+// adjacent strip signals presumably originating from a single particle 
+// that impinges on the detector in such a way that it deposite energy 
+// into two or more strips. 
+//
+#ifndef ALIFMDSHARINGFILTER_H
+#define ALIFMDSHARINGFILTER_H
 #include <TNamed.h>
 #include <TH2.h>
 #include <TList.h>
index 41b5330d5ca09c59e8955a33970d49413e4e0b5a..b9db1e2b67d1b3cb452e0932c5741e229c21a0d3 100644 (file)
@@ -1,3 +1,6 @@
+//
+// Manager (singleton) of corrections 
+// 
 #include "AliForwardCorrectionManager.h"
 #include "AliForwardUtil.h"
 #include <TString.h>
@@ -19,6 +22,12 @@ const char* AliForwardCorrectionManager::fgkMergingEffSkel   = "merging";
 //____________________________________________________________________
 AliForwardCorrectionManager& AliForwardCorrectionManager::Instance()
 {
+  // 
+  // Access to the singleton object 
+  // 
+  // Return:
+  //    Reference to the singleton object 
+  //
   if (!fgInstance) fgInstance= new AliForwardCorrectionManager;
   return *fgInstance;
 }
@@ -41,6 +50,9 @@ AliForwardCorrectionManager::AliForwardCorrectionManager()
     fVertexBias(0),
     fMergingEfficiency(0)
 {
+  // 
+  // Default constructor 
+  //
 }
 //____________________________________________________________________
 AliForwardCorrectionManager::AliForwardCorrectionManager(const AliForwardCorrectionManager& o)
@@ -61,11 +73,26 @@ AliForwardCorrectionManager::AliForwardCorrectionManager(const AliForwardCorrect
     fMergingEfficiency(o.fMergingEfficiency)
 
 {
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //    o Object to copy from 
+  //
 }
 //____________________________________________________________________
 AliForwardCorrectionManager&
 AliForwardCorrectionManager::operator=(const AliForwardCorrectionManager& o)
 {
+  // 
+  // Assignment operator 
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this object 
+  //
   fInit             = o.fInit;
   fSys              = o.fSys;
   fSNN              = o.fSNN;
@@ -92,6 +119,20 @@ AliForwardCorrectionManager::Init(const char* cms,
                                  UInt_t      what,
                                  Bool_t      force)
 {
+  // 
+  // Read in correction based on passed parameters
+  // 
+  // Parameters:
+  //    collisionSystem Collision system string 
+  //    cmsNN           Center of mass energy per nucleon pair [GeV]
+  //    field           Magnetic field [kG]
+  //    mc              Monte-carlo switch
+  //    what            What to read in 
+  //    force           Force (re-)reading of specified things
+  // 
+  // Return:
+  //    true on success
+  //
   UShort_t col = AliForwardUtil::ParseCollisionSystem(cms);
   return Init(col, 
              AliForwardUtil::ParseCenterOfMassEnergy(col, sNN),
@@ -108,6 +149,20 @@ AliForwardCorrectionManager::Init(UShort_t cms,
                                  UInt_t   what,
                                  Bool_t   force)
 {
+  // 
+  // Read in corrections based on the parameters given 
+  // 
+  // Parameters:
+  //    collisionSystem Collision system
+  //    cmsNN           Center of mass energy per nuclean pair [GeV]
+  //    field           Magnetic field setting [kG]
+  //    mc              Monte-carlo switch
+  //    what            What to read in. 
+  //    force           Force (re-)reading of specified things
+  // 
+  // Return:
+  //    
+  //
   if (force) fInit = kFALSE;
   if (fInit) return kTRUE;
 
@@ -176,6 +231,19 @@ AliForwardCorrectionManager::GetFileName(ECorrection what,
                                         Short_t     field,
                                         Bool_t      mc) const
 {
+  // 
+  // Get the path to the specified object 
+  // 
+  // Parameters:
+  //    what  Which stuff to get the path for 
+  //    sys   Collision system
+  //    sNN   Center of mass energy [GeV]
+  //    field Magnetic field in the L3 magnet [kG]
+  //    mc    Whether the correction objects should be valid for MC
+  // 
+  // Return:
+  //    The full path or null 
+  //
   TString fname = "";
   fname = GetObjectName(what);
   fname.Append(Form("_%s_%04dGeV_%c%1dkG_%s.root", 
@@ -188,6 +256,15 @@ AliForwardCorrectionManager::GetFileName(ECorrection what,
 TString
 AliForwardCorrectionManager::GetFileName(ECorrection what) const
 {
+  // 
+  // Get the file name of the specified object
+  // 
+  // Parameters:
+  //    what Which stuff to get the path for 
+  // 
+  // Return:
+  //    The full path or null
+  //
   if (!fInit) { 
     AliWarning("Corrections manager initialised, do a forced Init(...)");
     return "";
@@ -199,6 +276,15 @@ AliForwardCorrectionManager::GetFileName(ECorrection what) const
 const Char_t*
 AliForwardCorrectionManager::GetFileDir(ECorrection what) const
 {
+  // 
+  // Get the path to the specified object 
+  // 
+  // Parameters:
+  //    what  Which stuff to get the path for 
+  // 
+  // Return:
+  //    The full path or null 
+  //
   if      (what & kSecondaryMap)        return fSecondaryMapPath;
   else if (what & kDoubleHit)           return fDoubleHitPath;
   else if (what & kELossFits)           return fELossFitsPath;
@@ -217,6 +303,19 @@ AliForwardCorrectionManager::GetFilePath(ECorrection what,
                                         Short_t     field,
                                         Bool_t      mc) const
 {
+  // 
+  // Get the path to the specified object 
+  // 
+  // Parameters:
+  //    what  Which stuff to get the path for 
+  //    sys   Collision system
+  //    sNN   Center of mass energy [GeV]
+  //    field Magnetic field in the L3 magnet [kG]
+  //    mc    Whether the correction objects should be valid for MC
+  // 
+  // Return:
+  //    The full path or null 
+  //
   TString path = "";
   const Char_t* dir = GetFileDir(what);
   if (!dir) return path;
@@ -232,6 +331,16 @@ AliForwardCorrectionManager::GetFilePath(ECorrection what,
 TString
 AliForwardCorrectionManager::GetFilePath(ECorrection what) const
 {
+  // 
+  // Get the full path to the object.  Note, the manager must be
+  // initialised for this to work
+  // 
+  // Parameters:
+  //    what Which stuff to get the path for 
+  // 
+  // Return:
+  //    The full path or null
+  //
   if (!fInit) { 
     AliWarning("Corrections manager initialised, do a forced Init(...)");
     return "";
@@ -249,6 +358,21 @@ AliForwardCorrectionManager::GetFile(ECorrection what,
                                     Bool_t      rw, 
                                     Bool_t      newfile) const
 {
+  // 
+  // Open the file that contains the correction object specified 
+  // 
+  // Parameters:
+  //    what  Which stuff to get the path for 
+  //    sys   Collision system
+  //    sNN   Center of mass energy [GeV]
+  //    field Magnetic field in the L3 magnet [kG]
+  //    mc    Whether the correction objects should be valid for MC
+  //    rw    Whether to open the file in read/write
+  //    newfile Wheter to make the file if it doesn't exist
+  // 
+  // Return:
+  //    The file that contains the correction object or null 
+  //
   TString path = GetFilePath(what, sys, sNN, field, mc);
   if (path.IsNull()) return 0;
   
@@ -275,6 +399,16 @@ AliForwardCorrectionManager::GetFile(ECorrection what,
 TFile*
 AliForwardCorrectionManager::GetFile(ECorrection what) const
 {
+  // 
+  // Get the file that contains the object specifed.  Note, the manager
+  // must be initialised for this to work. 
+  // 
+  // Parameters:
+  //    what Which stuff to get the path for 
+  // 
+  // Return:
+  //    The file that contains the correction object or null
+  //
   if (!fInit) { 
     AliWarning("Corrections manager initialised, do a forced Init(...)");
     return 0;
@@ -286,6 +420,15 @@ AliForwardCorrectionManager::GetFile(ECorrection what) const
 const Char_t*
 AliForwardCorrectionManager::GetObjectName(ECorrection what) const
 {
+  // 
+  // Get the object name corresponding to correction type 
+  // 
+  // Parameters:
+  //    what Correction 
+  // 
+  // Return:
+  //    Object name or null
+  //
   if      (what & kSecondaryMap)       return fgkSecondaryMapSkel;
   else if (what & kDoubleHit)          return fgkDoubleHitSkel;
   else if (what & kELossFits)          return fgkELossFitsSkel;
@@ -298,6 +441,16 @@ AliForwardCorrectionManager::GetObjectName(ECorrection what) const
 TObject*
 AliForwardCorrectionManager::CheckObject(TFile* file, ECorrection what) const
 {
+  // 
+  // Check if the specified objet exists in the file, and return it
+  // 
+  // Parameters:
+  //    file File to query 
+  //    what Correction type 
+  // 
+  // Return:
+  //    Object found, or null
+  //
   TObject* o = file->Get(GetObjectName(what));
   if (!o) { 
     AliWarning(Form("Object %s not found in %s", 
@@ -316,6 +469,19 @@ AliForwardCorrectionManager::GetObject(ECorrection what,
                                       Short_t     field,
                                       Bool_t      mc) const
 {
+  // 
+  // Get the path to the specified object 
+  // 
+  // Parameters:
+  //    what  Which stuff to get the path for 
+  //    sys   Collision system
+  //    sNN   Center of mass energy [GeV]
+  //    field Magnetic field in the L3 magnet [kG]
+  //    mc    Whether the correction objects should be valid for MC
+  // 
+  // Return:
+  //    The full path or null 
+  //
   TFile* file = GetFile(what, sys, sNN, field, mc, false, false);
   if (!file) return 0;
   
@@ -325,6 +491,15 @@ AliForwardCorrectionManager::GetObject(ECorrection what,
 TObject*
 AliForwardCorrectionManager::GetObject(ECorrection what) const
 {
+  // 
+  // Get the object that contaisn the specified correction
+  // 
+  // Parameters:
+  //    what Which object to get
+  // 
+  // Return:
+  //    The object or null
+  //
   if (!fInit) { 
     AliWarning("Corrections manager initialised, do a forced Init(...)");
     return 0;
@@ -338,6 +513,17 @@ Bool_t
 AliForwardCorrectionManager::ReadSecondaryMap(UShort_t sys, UShort_t sNN, 
                                              Short_t field)
 {
+  // 
+  // Read in the secondary map 
+  // 
+  // Parameters:
+  //    sys   Collision system
+  //    sNN   Center of mass energy [GeV]
+  //    field Magnetic field in the L3 magnet [kG]
+  // 
+  // Return:
+  //    True on success, false otherwise 
+  //
   if (fInit) { 
     AliWarning("Corrections manager initialised, do a forced Init(...)");
     return kFALSE;
@@ -361,6 +547,17 @@ Bool_t
 AliForwardCorrectionManager::ReadDoubleHit(UShort_t sys, UShort_t sNN, 
                                           Short_t field)
 {
+  // 
+  // Read in the double hit correction
+  // 
+  // Parameters:
+  //    sys   Collision system
+  //    sNN   Center of mass energy [GeV]
+  //    field Magnetic field in the L3 magnet [kG]
+  // 
+  // Return:
+  //    True on success, false otherwise 
+  //
   if (fInit) { 
     AliWarning("Corrections manager initialised, do a forced Init(...)");
     return kFALSE;
@@ -385,6 +582,18 @@ Bool_t
 AliForwardCorrectionManager::ReadELossFits(UShort_t sys, UShort_t sNN, 
                                           Short_t field, Bool_t mc)
 {
+  // 
+  // Read in the energy loss fits 
+  // 
+  // Parameters:
+  //    sys   Collision system
+  //    sNN   Center of mass energy [GeV]
+  //    field Magnetic field in the L3 magnet [kG]
+  //    mc    Whether the correction objects should be valid for MC
+  // 
+  // Return:
+  //    True on success, false otherwise 
+  //
   if (fInit) { 
     AliWarning("Corrections manager initialised, do a forced Init(...)");
     return kFALSE;
@@ -410,6 +619,17 @@ AliForwardCorrectionManager::ReadVertexBias(UShort_t sys,
                                            UShort_t sNN, 
                                            Short_t field)
 {
+  // 
+  // Read in the event selection efficiency 
+  // 
+  // Parameters:
+  //    sys   Collision system
+  //    sNN   Center of mass energy [GeV]
+  //    field Magnetic field in the L3 magnet [kG]
+  // 
+  // Return:
+  //    True on success, false otherwise 
+  //
   if (fInit) { 
     AliWarning("Corrections manager initialised, do a forced Init(...)");
     return kFALSE;
@@ -435,6 +655,17 @@ AliForwardCorrectionManager::ReadMergingEfficiency(UShort_t sys,
                                                   UShort_t sNN, 
                                                   Short_t field)
 {
+  // 
+  // Read in the merging efficiency 
+  // 
+  // Parameters:
+  //    sys   Collision system
+  //    sNN   Center of mass energy [GeV]
+  //    field Magnetic field in the L3 magnet [kG]
+  // 
+  // Return:
+  //    True on success, false otherwise 
+  //
   if (fInit) { 
     AliWarning("Corrections manager initialised, do a forced Init(...)");
     return kFALSE;
index 6d99e34e25f5957395498b47ab7f0ee9623f0208..e45dd065fde6b94863cc90e00fdf44d91a14d5a7 100644 (file)
@@ -1,5 +1,8 @@
-#ifndef ALIROOT_PWG2_FORWARD_ALIFORWARDCORRECTIONMANAGER_H
-#define ALIROOT_PWG2_FORWARD_ALIFORWARDCORRECTIONMANAGER_H
+//
+// Manager (singleton) of corrections 
+// 
+#ifndef ALIFORWARDCORRECTIONMANAGER_H
+#define ALIFORWARDCORRECTIONMANAGER_H
 #include <TObject.h>
 #include "AliFMDCorrELossFit.h"
 #include "AliFMDCorrSecondaryMap.h"
@@ -56,6 +59,18 @@ public:
              Bool_t   mc=false,
              UInt_t   what=kAll,
              Bool_t   force=false);
+  /** 
+   * Read in correction based on passed parameters
+   * 
+   * @param collisionSystem Collision system string 
+   * @param cmsNN           Center of mass energy per nucleon pair [GeV]
+   * @param field           Magnetic field [kG]
+   * @param mc              Monte-carlo switch
+   * @param what            What to read in 
+   * @param force           Force (re-)reading of specified things
+   * 
+   * @return true on success
+   */
   Bool_t Init(const char* collisionSystem, 
              Float_t     cmsNN, 
              Float_t     field, 
@@ -122,6 +137,13 @@ public:
                      UShort_t    sNN, 
                      Short_t     field,
                      Bool_t      mc) const;
+  /** 
+   * Get the file name of the specified object
+   * 
+   * @param what Which stuff to get the path for 
+   * 
+   * @return The full path or null
+   */
   TString GetFileName(ECorrection what) const;
   /** 
    * Get the path to the specified object 
@@ -147,6 +169,14 @@ public:
                      UShort_t    sNN, 
                      Short_t     field,
                      Bool_t      mc) const;
+  /** 
+   * Get the full path to the object.  Note, the manager must be
+   * initialised for this to work
+   * 
+   * @param what Which stuff to get the path for 
+   * 
+   * @return The full path or null
+   */
   TString GetFilePath(ECorrection what) const;
   /** 
    * Open the file that contains the correction object specified 
@@ -168,6 +198,14 @@ public:
                 Bool_t      mc=false, 
                 Bool_t      rw=false, 
                 Bool_t      newfile=false) const;
+  /** 
+   * Get the file that contains the object specifed.  Note, the manager
+   * must be initialised for this to work. 
+   * 
+   * @param what Which stuff to get the path for 
+   * 
+   * @return The file that contains the correction object or null
+   */
   TFile* GetFile(ECorrection what) const;
   /** 
    * Get the object name corresponding to correction type 
@@ -202,6 +240,13 @@ public:
                     UShort_t    sNN, 
                     Short_t     field,
                     Bool_t      mc) const;
+  /** 
+   * Get the object that contaisn the specified correction
+   * 
+   * @param what Which object to get
+   * 
+   * @return The object or null
+   */
   TObject* GetObject(ECorrection what) const;
   /* 
    * @} 
index 6fbbd950eb983102178f6c01736240efbc198bd4..72557e84c16c27e76d8fb5fd97f4c32da0d36e80 100644 (file)
@@ -1,8 +1,20 @@
+// 
+// Calculate the corrections in the forward regions
+// 
+// Inputs: 
+//   - AliESDEvent 
+//
+// Outputs: 
+//   - AliAODForwardMult 
+// 
+// Histograms 
+//   
+// Corrections used 
+// 
 #include "AliForwardMCCorrectionsTask.h"
 #include "AliTriggerAnalysis.h"
 #include "AliPhysicsSelection.h"
 #include "AliLog.h"
-// #include "AliFMDAnaParameters.h"
 #include "AliHeader.h"
 #include "AliGenEventHeader.h"
 #include "AliESDEvent.h"
@@ -65,6 +77,12 @@ AliForwardMCCorrectionsTask::AliForwardMCCorrectionsTask()
     fEtaAxis(),
     fList()
 {
+  // 
+  // Constructor 
+  // 
+  // Parameters:
+  //    name Name of task 
+  //
 }
 
 //____________________________________________________________________
@@ -93,6 +111,12 @@ AliForwardMCCorrectionsTask::AliForwardMCCorrectionsTask(const char* name)
     fEtaAxis(200,-4,6),
     fList()
 {
+  // 
+  // Constructor 
+  // 
+  // Parameters:
+  //    name Name of task 
+  //
   DefineOutput(1, TList::Class());
 }
 
@@ -122,12 +146,27 @@ AliForwardMCCorrectionsTask::AliForwardMCCorrectionsTask(const AliForwardMCCorre
     fEtaAxis(o.fEtaAxis.GetNbins(), o.fEtaAxis.GetXmin(), o.fEtaAxis.GetXmax()),
     fList(o.fList)
 {
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //    o Object to copy from 
+  //
 }
 
 //____________________________________________________________________
 AliForwardMCCorrectionsTask&
 AliForwardMCCorrectionsTask::operator=(const AliForwardMCCorrectionsTask& o)
 {
+  // 
+  // Assignment operator 
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this object 
+  //
   fHEventsTr         = o.fHEventsTr;
   fHEventsTrVtx      = o.fHEventsTrVtx;
   fHTriggers         = o.fHTriggers;
@@ -141,6 +180,10 @@ AliForwardMCCorrectionsTask::operator=(const AliForwardMCCorrectionsTask& o)
 void
 AliForwardMCCorrectionsTask::Init()
 {
+  // 
+  // Initialize the task 
+  // 
+  //
 }
 
 //____________________________________________________________________
@@ -148,6 +191,14 @@ void
 AliForwardMCCorrectionsTask::SetVertexAxis(Int_t nBin, Double_t min, 
                                           Double_t max)
 {
+  // 
+  // Set the vertex axis to use
+  // 
+  // Parameters:
+  //    nBins Number of bins
+  //    vzMin Least @f$z@f$ coordinate of interation point
+  //    vzMax Largest @f$z@f$ coordinate of interation point
+  //
   if (max < min) max = -min;
   if (min < max) { 
     Double_t tmp = min;
@@ -164,6 +215,12 @@ AliForwardMCCorrectionsTask::SetVertexAxis(Int_t nBin, Double_t min,
 void
 AliForwardMCCorrectionsTask::SetVertexAxis(const TAxis& axis)
 {
+  // 
+  // Set the vertex axis to use
+  // 
+  // Parameters:
+  //    axis Axis
+  //
   SetVertexAxis(axis.GetNbins(),axis.GetXmin(),axis.GetXmax());
 }
 
@@ -171,6 +228,14 @@ AliForwardMCCorrectionsTask::SetVertexAxis(const TAxis& axis)
 void
 AliForwardMCCorrectionsTask::SetEtaAxis(Int_t nBin, Double_t min, Double_t max)
 {
+  // 
+  // Set the eta axis to use
+  // 
+  // Parameters:
+  //    nBins Number of bins
+  //    vzMin Least @f$\eta@f$ 
+  //    vzMax Largest @f$\eta@f$ 
+  //
   if (max < min) max = -min;
   if (min < max) { 
     Double_t tmp = min;
@@ -187,6 +252,12 @@ AliForwardMCCorrectionsTask::SetEtaAxis(Int_t nBin, Double_t min, Double_t max)
 void
 AliForwardMCCorrectionsTask::SetEtaAxis(const TAxis& axis)
 {
+  // 
+  // Set the eta axis to use
+  // 
+  // Parameters:
+  //    axis Axis
+  //
   SetEtaAxis(axis.GetNbins(),axis.GetXmin(),axis.GetXmax());
 }
   
@@ -195,6 +266,17 @@ TH3D*
 AliForwardMCCorrectionsTask::Make3D(const char* name, const char* title,
                               Int_t nPhi) const
 {
+  // 
+  // Make a 3D histogram
+  // 
+  // Parameters:
+  //    name   Name 
+  //    title  Title 
+  //    nPhi   Number of phi bins
+  // 
+  // Return:
+  //    Histogram
+  //
   TH3D* ret = new TH3D(name, title,
                       fVtxAxis.GetNbins(), 
                       fVtxAxis.GetXmin(), 
@@ -216,6 +298,16 @@ AliForwardMCCorrectionsTask::Make3D(const char* name, const char* title,
 TH1D*
 AliForwardMCCorrectionsTask::Make1D(const char* name, const char* title) const
 {
+  // 
+  // Make 1D histogram
+  // 
+  // Parameters:
+  //    name   Name 
+  //    title  Title
+  // 
+  // Return:
+  //    Histogram
+  //
   TH1D* ret = new TH1D(name, title,
                       fEtaAxis.GetNbins(), 
                       fEtaAxis.GetXmin(), 
@@ -234,6 +326,10 @@ AliForwardMCCorrectionsTask::Make1D(const char* name, const char* title) const
 void
 AliForwardMCCorrectionsTask::UserCreateOutputObjects()
 {
+  // 
+  // Create output objects 
+  // 
+  //
   fList = new TList;
   fList->SetName(GetName());
 
@@ -352,6 +448,13 @@ AliForwardMCCorrectionsTask::UserCreateOutputObjects()
 void
 AliForwardMCCorrectionsTask::UserExec(Option_t*)
 {
+  // 
+  // Process each event 
+  // 
+  // Parameters:
+  //    option Not used
+  //  
+
   // Get the input data - MC event
   AliMCEvent*  mcEvent = MCEvent();
   if (mcEvent) { 
@@ -486,6 +589,16 @@ void
 AliForwardMCCorrectionsTask::FillPrimary(Bool_t gotInel, Bool_t gotVtx, 
                                    Double_t vz, Double_t eta, Double_t phi) 
 {
+  // 
+  // Fill in primary information
+  // 
+  // Parameters:
+  //    gotInel   Got INEL trigger from ESD
+  //    gotVtx    Got vertex Z from ESD 
+  //    vz        @f$z@f$ coordinate of interation point
+  //    eta       Pseudo rapidity 
+  //    phi       Azimuthal angle
+  //
   if (gotInel && gotVtx) {
     // This takes the place of hPrimary_FMD_<r>_vtx<v> and 
     // Analysed_FMD<r>_vtx<v>
@@ -504,6 +617,18 @@ AliForwardMCCorrectionsTask::FillStrip(UShort_t d, Char_t r,
                                  Double_t vz, Double_t eta, Double_t phi,
                                  Bool_t first) 
 {
+  // 
+  // Fill in per-strip information
+  // 
+  // Parameters:
+  //    d         Detector
+  //    r         Ring
+  //    vz        @f$z@f$ coordinate of interation point
+  //    eta       Pseudo rapidity 
+  //    phi       Azimuthal angle
+  //    first     First fill in this event
+  //
+
   // Number of hit strips per eta bin 
   TH1D* strips = 0; 
   // All hits per ring, vertex in eta,phi bins.  This takes the place
@@ -535,6 +660,16 @@ AliForwardMCCorrectionsTask::FillStrip(UShort_t d, Char_t r,
 TH2D*
 AliForwardMCCorrectionsTask::GetVertexProj(Int_t v, TH3D* src) const
 {
+  // 
+  // Get vertex project
+  // 
+  // Parameters:
+  //    v   Vertex bin 
+  //    src Source 3D histogram 
+  // 
+  // Return:
+  //    2D projection of the V'th bin
+  //
   Int_t nX = src->GetNbinsX();
   if (v > nX || v < 1) return 0;
 
@@ -554,6 +689,13 @@ AliForwardMCCorrectionsTask::GetVertexProj(Int_t v, TH3D* src) const
 void
 AliForwardMCCorrectionsTask::Terminate(Option_t*)
 {
+  // 
+  // End of job
+  // 
+  // Parameters:
+  //    option Not used 
+  //
+
   TList* list = dynamic_cast<TList*>(GetOutputData(1));
   if (!list) {
     AliError("No output list defined");
index ebdaf8e9faa405c9de54723f69052d30e8aa65a7..196d44b57ba72c6c1e2de54262a68104f4b32f4e 100644 (file)
@@ -1,5 +1,8 @@
-#ifndef ALIROOT_PWG2_FORWARD_ALIFORWARDCORRECTIONS_H
-#define ALIROOT_PWG2_FORWARD_ALIFORWARDCORRECTIONS_H
+// 
+// Calculate the corrections in the forward regions
+// 
+#ifndef ALIFORWARDCORRECTIONS_H
+#define ALIFORWARDCORRECTIONS_H
 #include <AliAnalysisTaskSE.h>
 #include "AliForwardUtil.h"
 #include "AliFMDSharingFilter.h"
@@ -90,18 +93,91 @@ public:
   /** 
    * @} 
    */
+  /** 
+   * Print this object 
+   * 
+   * @param option   Not used
+   */
   void         Print(Option_t* option="") const;
 
+  /** 
+   * Set the vertex axis to use
+   * 
+   * @param nBins Number of bins
+   * @param vzMin Least @f$z@f$ coordinate of interation point
+   * @param vzMax Largest @f$z@f$ coordinate of interation point
+   */
   void SetVertexAxis(Int_t nBins, Double_t vzMin, Double_t vzMax=-1000000);
+  /** 
+   * Set the vertex axis to use
+   * 
+   * @param axis Axis
+   */
   void SetVertexAxis(const TAxis& axis);
+  /** 
+   * Set the eta axis to use
+   * 
+   * @param nBins Number of bins
+   * @param vzMin Least @f$\eta@f$ 
+   * @param vzMax Largest @f$\eta@f$ 
+   */
   void SetEtaAxis(Int_t nBins, Double_t etaMin, Double_t etaMax=-1000000);
+  /** 
+   * Set the eta axis to use
+   * 
+   * @param axis Axis
+   */
   void SetEtaAxis(const TAxis& axis);
 protected: 
+  /** 
+   * Get vertex project
+   * 
+   * @param v   Vertex bin 
+   * @param src Source 3D histogram 
+   * 
+   * @return 2D projection of the V'th bin
+   */
   TH2D*  GetVertexProj(Int_t v, TH3D* src) const;
+  /** 
+   * Make a 3D histogram
+   * 
+   * @param name   Name 
+   * @param title  Title 
+   * @param nPhi   Number of phi bins
+   * 
+   * @return Histogram
+   */
   TH3D* Make3D(const char* name, const char* title, Int_t nPhi) const;
+  /** 
+   * Make 1D histogram
+   * 
+   * @param name   Name 
+   * @param title  Title
+   * 
+   * @return Histogram
+   */
   TH1D* Make1D(const char* name, const char* title) const;
+  /** 
+   * Fill in primary information
+   * 
+   * @param gotInel   Got INEL trigger from ESD
+   * @param gotVtx    Got vertex Z from ESD 
+   * @param vz        @f$z@f$ coordinate of interation point
+   * @param eta       Pseudo rapidity 
+   * @param phi       Azimuthal angle
+   */
   void  FillPrimary(Bool_t gotInel, Bool_t gotVtx, 
                    Double_t vz, Double_t eta, Double_t phi);
+  /** 
+   * Fill in per-strip information
+   * 
+   * @param d         Detector
+   * @param r         Ring
+   * @param vz        @f$z@f$ coordinate of interation point
+   * @param eta       Pseudo rapidity 
+   * @param phi       Azimuthal angle
+   * @param first     First fill in this event
+   */
   void FillStrip(UShort_t d, Char_t r, 
                 Double_t vz, Double_t eta, Double_t phi,
                 Bool_t first);
index ec499185327f53f912057e8a790b5ca778af4f3f..5903a243f37b2ae409e3c8719e51325c86e2d7f2 100644 (file)
@@ -1,8 +1,22 @@
+// 
+// Calculate the multiplicity in the forward regions event-by-event 
+// 
+// Inputs: 
+//   - AliESDEvent 
+//   - Kinematics
+//   - Track references
+//
+// Outputs: 
+//   - AliAODForwardMult 
+// 
+// Histograms 
+//   
+// Corrections used 
+// 
 #include "AliForwardMCMultiplicityTask.h"
 #include "AliTriggerAnalysis.h"
 #include "AliPhysicsSelection.h"
 #include "AliLog.h"
-// #include "AliFMDAnaParameters.h"
 #include "AliESDEvent.h"
 #include "AliAODHandler.h"
 #include "AliMultiplicity.h"
@@ -34,6 +48,9 @@ AliForwardMCMultiplicityTask::AliForwardMCMultiplicityTask()
     fHistCollector(),
     fList(0)
 {
+  // 
+  // Constructor
+  //
 }
 
 //____________________________________________________________________
@@ -54,6 +71,12 @@ AliForwardMCMultiplicityTask::AliForwardMCMultiplicityTask(const char* name)
     fHistCollector("collector"),
     fList(0)
 {
+  // 
+  // Constructor 
+  // 
+  // Parameters:
+  //    name Name of task 
+  //
   DefineOutput(1, TList::Class());
 }
 
@@ -75,6 +98,12 @@ AliForwardMCMultiplicityTask::AliForwardMCMultiplicityTask(const AliForwardMCMul
     fHistCollector(o.fHistCollector),
     fList(o.fList) 
 {
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //    o Object to copy from 
+  //
   DefineOutput(1, TList::Class());
 }
 
@@ -82,6 +111,15 @@ AliForwardMCMultiplicityTask::AliForwardMCMultiplicityTask(const AliForwardMCMul
 AliForwardMCMultiplicityTask&
 AliForwardMCMultiplicityTask::operator=(const AliForwardMCMultiplicityTask& o)
 {
+  // 
+  // Assignment operator 
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this object 
+  //
   AliForwardMultiplicityBase::operator=(o);
 
   fHData             = o.fHData;
@@ -104,6 +142,12 @@ AliForwardMCMultiplicityTask::operator=(const AliForwardMCMultiplicityTask& o)
 void
 AliForwardMCMultiplicityTask::SetDebug(Int_t dbg)
 {
+  // 
+  // Set debug level 
+  // 
+  // Parameters:
+  //    dbg debug level
+  //
   fEventInspector.SetDebug(dbg);
   fEnergyFitter.SetDebug(dbg);
   fSharingFilter.SetDebug(dbg);
@@ -115,6 +159,10 @@ AliForwardMCMultiplicityTask::SetDebug(Int_t dbg)
 void
 AliForwardMCMultiplicityTask::InitializeSubs()
 {
+  // 
+  // Initialise the sub objects and stuff.  Called on first event 
+  // 
+  //
   AliForwardCorrectionManager& fcm = AliForwardCorrectionManager::Instance();
   fcm.Init(fEventInspector.GetCollisionSystem(), 
           fEventInspector.GetEnergy(),
@@ -180,6 +228,10 @@ AliForwardMCMultiplicityTask::InitializeSubs()
 void
 AliForwardMCMultiplicityTask::UserCreateOutputObjects()
 {
+  // 
+  // Create output objects 
+  // 
+  //
   fList = new TList;
 
   AliAnalysisManager* am = AliAnalysisManager::GetAnalysisManager();
@@ -206,6 +258,13 @@ AliForwardMCMultiplicityTask::UserCreateOutputObjects()
 void
 AliForwardMCMultiplicityTask::UserExec(Option_t*)
 {
+  // 
+  // Process each event 
+  // 
+  // Parameters:
+  //    option Not used
+  //  
+
   // Get the input data 
   AliESDEvent* esd = dynamic_cast<AliESDEvent*>(InputEvent());
   if (!esd) { 
@@ -326,6 +385,12 @@ AliForwardMCMultiplicityTask::UserExec(Option_t*)
 void
 AliForwardMCMultiplicityTask::Terminate(Option_t*)
 {
+  // 
+  // End of job
+  // 
+  // Parameters:
+  //    option Not used 
+  //
   TList* list = dynamic_cast<TList*>(GetOutputData(1));
   if (!list) {
     AliError(Form("No output list defined (%p)", GetOutputData(1)));
@@ -376,6 +441,12 @@ AliForwardMCMultiplicityTask::Terminate(Option_t*)
 void
 AliForwardMCMultiplicityTask::Print(Option_t* option) const
 {
+  // 
+  // Print information 
+  // 
+  // Parameters:
+  //    option Not used
+  //
   AliForwardMultiplicityBase::Print(option);
   gROOT->IncreaseDirLevel();
   fEventInspector   .Print(option);
index 8d2143e8d0b3f74f6114f1f73c0d32a03e8c9169..23a4d8a99335bee1e43cf206afcbb31796981b57 100644 (file)
@@ -1,3 +1,6 @@
+// 
+// Calculate the multiplicity in the forward regions event-by-event 
+// 
 #ifndef ALIFORWARDMCMULTIPLICITYTASK_H
 #define ALIFORWARDMCMULTIPLICITYTASK_H
 #include "AliForwardMultiplicityBase.h"
@@ -20,6 +23,8 @@ class TList;
  * 
  * @par Inputs: 
  *   - AliESDEvent 
+ *   - Kinematics
+ *   - Track references
  *
  * @par Outputs: 
  *   - AliAODForwardMult 
@@ -133,6 +138,11 @@ public:
   /** 
    * @} 
    */
+  /** 
+   * Set debug level 
+   * 
+   * @param dbg debug level
+   */
   void SetDebug(Int_t dbg);
 protected: 
   /** 
index 765b8eb910f1b1731d84d760b0f1135999d3d271..7007a18360e0485cd2d45c239d125dc031f076f2 100644 (file)
@@ -1,9 +1,17 @@
 //====================================================================
-/**
- * @file 
- *
- * @ingroup pwg2_forward_tasks 
- */
+// 
+// Base class for classes that calculate the multiplicity in the
+// forward regions event-by-event
+// 
+// Inputs: 
+//   - AliESDEvent 
+//
+// Outputs: 
+//   - AliAODForwardMult 
+// 
+// Histograms 
+//   
+// Corrections used 
 #include "AliForwardMultiplicityBase.h"
 #include "AliLog.h"
 #include "AliAODHandler.h"
@@ -31,6 +39,12 @@ AliForwardMultiplicityBase::MarkEventForStore() const
 void
 AliForwardMultiplicityBase::Print(Option_t* option) const
 {
+  // 
+  // Print information 
+  // 
+  // Parameters:
+  //    option Not used
+  //
   std::cout << "AliForwardMultiplicityBase: " << GetName() << "\n" 
            << "  Enable low flux code:   " << (fEnableLowFlux ? "yes" : "no")
            << std::endl;
index 9e1cd1494f82bd856ebbe4f4ec56696fc2b49e4c..ad25b68e8c09f2d62190a4190194fcd44b31e2c0 100644 (file)
@@ -1,17 +1,11 @@
+// 
+// Base class for classes that calculate the multiplicity in the
+// forward regions event-by-event
+// 
 #ifndef ALIFORWARDMULTIPLICITYBASE_H
 #define ALIFORWARDMULTIPLICITYBASE_H
 #include <AliAnalysisTaskSE.h>
 #include "AliForwardUtil.h"
-// #include "AliFMDEventInspector.h"
-// #include "AliFMDEnergyFitter.h"
-// #include "AliFMDSharingFilter.h"
-// #include "AliFMDDensityCalculator.h"
-// #include "AliFMDCorrections.h"
-// #include "AliFMDHistCollector.h"
-// #include "AliAODForwardMult.h"
-// #include "AliFMDEnergyFitter.h"
-// #include <AliESDFMD.h>
-// #include <TH1I.h>
 class AliFMDEventInspector;
 class AliFMDEnergyFitter;
 class AliFMDSharingFilter;
@@ -43,7 +37,8 @@ class TTree;
  * @ingroup pwg2_forward 
  */
 /** 
- * Calculate the multiplicity in the forward regions event-by-event 
+ * Base class for classes that calculate the multiplicity in the
+ * forward regions event-by-event
  * 
  * @par Inputs: 
  *   - AliESDEvent 
index 12d595d70c87258e9e393e084215867dfcc3c214..b57a2ea4064653595694589d520707208c6f9279 100644 (file)
@@ -1,8 +1,20 @@
+// 
+// Calculate the multiplicity in the forward regions event-by-event 
+// 
+// Inputs: 
+//   - AliESDEvent 
+//
+// Outputs: 
+//   - AliAODForwardMult 
+// 
+// Histograms 
+//   
+// Corrections used 
+//
 #include "AliForwardMultiplicityTask.h"
 #include "AliTriggerAnalysis.h"
 #include "AliPhysicsSelection.h"
 #include "AliLog.h"
-// #include "AliFMDAnaParameters.h"
 #include "AliESDEvent.h"
 #include "AliAODHandler.h"
 #include "AliMultiplicity.h"
@@ -31,6 +43,9 @@ AliForwardMultiplicityTask::AliForwardMultiplicityTask()
     fHistCollector(),
     fList(0)
 {
+  // 
+  // Constructor
+  //
 }
 
 //____________________________________________________________________
@@ -48,6 +63,12 @@ AliForwardMultiplicityTask::AliForwardMultiplicityTask(const char* name)
     fHistCollector("collector"),
     fList(0)
 {
+  // 
+  // Constructor 
+  // 
+  // Parameters:
+  //    name Name of task 
+  //
   DefineOutput(1, TList::Class());
 }
 
@@ -66,6 +87,12 @@ AliForwardMultiplicityTask::AliForwardMultiplicityTask(const AliForwardMultiplic
     fHistCollector(o.fHistCollector),
     fList(o.fList) 
 {
+  // 
+  // Copy constructor 
+  // 
+  // Parameters:
+  //    o Object to copy from 
+  //
   DefineOutput(1, TList::Class());
 }
 
@@ -73,6 +100,15 @@ AliForwardMultiplicityTask::AliForwardMultiplicityTask(const AliForwardMultiplic
 AliForwardMultiplicityTask&
 AliForwardMultiplicityTask::operator=(const AliForwardMultiplicityTask& o)
 {
+  // 
+  // Assignment operator 
+  // 
+  // Parameters:
+  //    o Object to assign from 
+  // 
+  // Return:
+  //    Reference to this object 
+  //
   AliForwardMultiplicityBase::operator=(o);
 
   fHData             = o.fHData;
@@ -93,6 +129,12 @@ AliForwardMultiplicityTask::operator=(const AliForwardMultiplicityTask& o)
 void
 AliForwardMultiplicityTask::SetDebug(Int_t dbg)
 {
+  // 
+  // Set debug level 
+  // 
+  // Parameters:
+  //    dbg Debug level
+  //
   fEventInspector.SetDebug(dbg);
   fEnergyFitter.SetDebug(dbg);
   fSharingFilter.SetDebug(dbg);
@@ -105,6 +147,10 @@ AliForwardMultiplicityTask::SetDebug(Int_t dbg)
 void
 AliForwardMultiplicityTask::InitializeSubs()
 {
+  // 
+  // Initialise the sub objects and stuff.  Called on first event 
+  // 
+  //
   AliForwardCorrectionManager& fcm = AliForwardCorrectionManager::Instance();
   fcm.Init(fEventInspector.GetCollisionSystem(), 
           fEventInspector.GetEnergy(),
@@ -165,6 +211,10 @@ AliForwardMultiplicityTask::InitializeSubs()
 void
 AliForwardMultiplicityTask::UserCreateOutputObjects()
 {
+  // 
+  // Create output objects 
+  // 
+  //
   fList = new TList;
 
   AliAnalysisManager* am = AliAnalysisManager::GetAnalysisManager();
@@ -188,6 +238,13 @@ AliForwardMultiplicityTask::UserCreateOutputObjects()
 void
 AliForwardMultiplicityTask::UserExec(Option_t*)
 {
+  // 
+  // Process each event 
+  // 
+  // Parameters:
+  //    option Not used
+  //  
+
   // static Int_t cnt = 0;
   // cnt++;
   // Get the input data 
@@ -286,6 +343,13 @@ AliForwardMultiplicityTask::UserExec(Option_t*)
 void
 AliForwardMultiplicityTask::Terminate(Option_t*)
 {
+  // 
+  // End of job
+  // 
+  // Parameters:
+  //    option Not used 
+  //
+
   TList* list = dynamic_cast<TList*>(GetOutputData(1));
   if (!list) {
     AliError(Form("No output list defined (%p)", GetOutputData(1)));
@@ -335,6 +399,12 @@ AliForwardMultiplicityTask::Terminate(Option_t*)
 void
 AliForwardMultiplicityTask::Print(Option_t* option) const
 {
+  // 
+  // Print information 
+  // 
+  // Parameters:
+  //    option Not used
+  //
   AliForwardMultiplicityBase::Print(option);
   gROOT->IncreaseDirLevel();
   fEventInspector   .Print(option);
index 94dc89c23816ee42bfebfdbd609c0d09031fb123..25aff1c1e93525a58375e4830e119238580e0679 100644 (file)
@@ -1,3 +1,6 @@
+// 
+// Calculate the multiplicity in the forward regions event-by-event 
+// 
 #ifndef ALIFORWARDMULTIPLICITYTASK_H
 #define ALIFORWARDMULTIPLICITYTASK_H
 #include "AliForwardMultiplicityBase.h"
@@ -131,6 +134,11 @@ public:
   /** 
    * @} 
    */
+  /** 
+   * Set debug level 
+   * 
+   * @param dbg Debug level
+   */
   void SetDebug(Int_t dbg);
 protected: 
   /** 
index a4867c086244a40603715e31384a243a65f67e75..819e3b040c93932b8e4253e4e1083dc7614fd280 100644 (file)
@@ -1,3 +1,7 @@
+// 
+// Utilities used in the forward multiplcity analysis 
+// 
+//
 #include "AliForwardUtil.h"
 #include <AliAnalysisManager.h>
 #include "AliAODForwardMult.h"
 UShort_t
 AliForwardUtil::ParseCollisionSystem(const char* sys)
 {
+  // 
+  // Parse a collision system spec given in a string.   Known values are 
+  // 
+  //  - "pp", "p-p" which returns kPP 
+  //  - "PbPb", "Pb-Pb", "A-A", which returns kPbPb 
+  //  - Everything else gives kUnknown 
+  // 
+  // Parameters:
+  //    sys Collision system spec 
+  // 
+  // Return:
+  //    Collision system id 
+  //
   TString s(sys);
   s.ToLower();
   if (s.Contains("p-p")   || s.Contains("pp"))   return AliForwardUtil::kPP; 
@@ -29,6 +46,18 @@ AliForwardUtil::ParseCollisionSystem(const char* sys)
 const char*
 AliForwardUtil::CollisionSystemString(UShort_t sys)
 {
+  // 
+  // Get a string representation of the collision system 
+  // 
+  // Parameters:
+  //    sys  Collision system 
+  // - kPP -> "pp"
+  // - kPbPb -> "PbPb" 
+  // - anything else gives "unknown"
+  // 
+  // Return:
+  //    String representation of the collision system 
+  //
   switch (sys) { 
   case AliForwardUtil::kPP:   return "pp";
   case AliForwardUtil::kPbPb: return "PbPb";
@@ -39,6 +68,17 @@ AliForwardUtil::CollisionSystemString(UShort_t sys)
 UShort_t
 AliForwardUtil::ParseCenterOfMassEnergy(UShort_t sys, Float_t v)
 {
+  // 
+  // Parse the center of mass energy given as a float and return known 
+  // values as a unsigned integer
+  // 
+  // Parameters:
+  //    sys  Collision system (needed for AA)
+  //    cms  Center of mass energy * total charge 
+  // 
+  // Return:
+  //    Center of mass energy per nucleon
+  //
   Float_t energy = v; 
   if (sys != AliForwardUtil::kPP) energy = energy / 208 * 82;
   if (TMath::Abs(energy - 900.)   < 10)  return 900;
@@ -54,12 +94,30 @@ AliForwardUtil::ParseCenterOfMassEnergy(UShort_t sys, Float_t v)
 const char* 
 AliForwardUtil::CenterOfMassEnergyString(UShort_t cms)
 {
+  // 
+  // Get a string representation of the center of mass energy per nuclean
+  // 
+  // Parameters:
+  //    cms  Center of mass energy per nucleon
+  // 
+  // Return:
+  //    String representation of the center of mass energy per nuclean
+  //
   return Form("%04dGeV", cms);
 }
 //____________________________________________________________________
 Short_t
 AliForwardUtil::ParseMagneticField(Float_t v)
 {
+  // 
+  // Parse the magnetic field (in kG) as given by a floating point number
+  // 
+  // Parameters:
+  //    field  Magnetic field in kG 
+  // 
+  // Return:
+  //    Short integer value of magnetic field in kG 
+  //
   if (TMath::Abs(v - 5.) < 1 ) return +5;
   if (TMath::Abs(v + 5.) < 1 ) return -5;
   if (TMath::Abs(v) < 1)       return 0;
@@ -69,6 +127,15 @@ AliForwardUtil::ParseMagneticField(Float_t v)
 const char* 
 AliForwardUtil::MagneticFieldString(Short_t f)
 {
+  // 
+  // Get a string representation of the magnetic field
+  // 
+  // Parameters:
+  //    field Magnetic field in kG
+  // 
+  // Return:
+  //    String representation of the magnetic field
+  //
   return Form("%01dkG", f);
 }
 
@@ -77,18 +144,18 @@ AliForwardUtil::MagneticFieldString(Short_t f)
 Int_t    AliForwardUtil::fgConvolutionSteps  = 100;
 Double_t AliForwardUtil::fgConvolutionNSigma = 5;
 namespace {
-  /** 
-   * The shift of the most probable value for the ROOT function TMath::Landau 
-   */
+  // 
+  // The shift of the most probable value for the ROOT function TMath::Landau 
+  //
   const Double_t  mpshift  = -0.22278298;
-  /** 
-   * Integration normalisation 
-   */
+  // 
+  // Integration normalisation 
+  //
   const Double_t  invSq2pi = 1. / TMath::Sqrt(2*TMath::Pi());
 
-  /** 
-   * Utility function to use in TF1 defintition 
-   */
+  // 
+  // Utility function to use in TF1 defintition 
+  //
   Double_t landauGaus1(Double_t* xp, Double_t* pp) 
   {
     Double_t x        = xp[0];
@@ -101,9 +168,9 @@ namespace {
     return constant * AliForwardUtil::LandauGaus(x, delta, xi, sigma, sigma_n);
   }
 
-  /** 
-   * Utility function to use in TF1 defintition 
-   */
+  // 
+  // Utility function to use in TF1 defintition 
+  //
   Double_t landauGausN(Double_t* xp, Double_t* pp) 
   {
     Double_t  x        = xp[0];
@@ -118,9 +185,9 @@ namespace {
     return constant * AliForwardUtil::NLandauGaus(x, delta, xi, sigma, sigma_n,
                                                  n, a);
   }
-  /** 
-   * Utility function to use in TF1 defintition 
-   */
+  // 
+  // Utility function to use in TF1 defintition 
+  //
   Double_t landauGausI(Double_t* xp, Double_t* pp) 
   {
     Double_t x         = xp[0];
@@ -140,6 +207,24 @@ namespace {
 Double_t 
 AliForwardUtil::Landau(Double_t x, Double_t delta, Double_t xi)
 {
+  // 
+  // Calculate the shifted Landau
+  // @f[
+  //    f'_{L}(x;\Delta,\xi) = f_L(x;\Delta+0.22278298\xi)
+  // @f]
+  //
+  // where @f$ f_{L}@f$ is the ROOT implementation of the Landau
+  // distribution (known to have @f$ \Delta_{p}=-0.22278298@f$ for
+  // @f$\Delta=0,\xi=1@f$. 
+  // 
+  // Parameters:
+  //    x      Where to evaluate @f$ f'_{L}@f$ 
+  //    delta  Most probable value 
+  //    xi     The 'width' of the distribution 
+  //
+  // Return:
+  //    @f$ f'_{L}(x;\Delta,\xi) @f$
+  //
   return TMath::Landau(x, delta - xi * mpshift, xi);
 }
 //____________________________________________________________________
@@ -147,6 +232,39 @@ Double_t
 AliForwardUtil::LandauGaus(Double_t x, Double_t delta, Double_t xi,
                           Double_t sigma, Double_t sigma_n)
 {
+  // 
+  // Calculate the value of a Landau convolved with a Gaussian 
+  // 
+  // @f[ 
+  // f(x;\Delta,\xi,\sigma') = \frac{1}{\sigma' \sqrt{2 \pi}}
+  //    \int_{-\infty}^{+\infty} d\Delta' f'_{L}(x;\Delta',\xi)
+  //    \exp{-\frac{(\Delta-\Delta')^2}{2\sigma'^2}}
+  // @f]
+  // 
+  // where @f$ f'_{L}@f$ is the Landau distribution, @f$ \Delta@f$ the
+  // energy loss, @f$ \xi@f$ the width of the Landau, and 
+  // @f$ \sigma'^2=\sigma^2-\sigma_n^2 @f$.  Here, @f$\sigma@f$ is the
+  // variance of the Gaussian, and @f$\sigma_n@f$ is a parameter modelling 
+  // noise in the detector.  
+  //
+  // Note that this function uses the constants fgConvolutionSteps and
+  // fgConvolutionNSigma
+  // 
+  // References: 
+  //  - <a href="http://dx.doi.org/10.1016/0168-583X(84)90472-5">Nucl.Instrum.Meth.B1:16</a>
+  //  - <a href="http://dx.doi.org/10.1103/PhysRevA.28.615">Phys.Rev.A28:615</a>
+  //  - <a href="http://root.cern.ch/root/htmldoc/tutorials/fit/langaus.C.html">ROOT implementation</a>
+  // 
+  // Parameters:
+  //    x         where to evaluate @f$ f@f$
+  //    delta     @f$ \Delta@f$ of @f$ f(x;\Delta,\xi,\sigma')@f$
+  //    xi        @f$ \xi@f$ of @f$ f(x;\Delta,\xi,\sigma')@f$
+  //    sigma     @f$ \sigma@f$ of @f$\sigma'^2=\sigma^2-\sigma_n^2 @f$
+  //    sigma_n   @f$ \sigma_n@f$ of @f$\sigma'^2=\sigma^2-\sigma_n^2 @f$
+  // 
+  // Return:
+  //    @f$ f@f$ evaluated at @f$ x@f$.  
+  //
   Double_t deltap = delta - xi * mpshift;
   Double_t sigma2 = sigma_n*sigma_n + sigma*sigma;
   Double_t sigma1 = sigma_n == 0 ? sigma : TMath::Sqrt(sigma2);
@@ -170,6 +288,30 @@ Double_t
 AliForwardUtil::ILandauGaus(Double_t x, Double_t delta, Double_t xi, 
                            Double_t sigma, Double_t sigma_n, Int_t i)
 {
+  // 
+  // Evaluate 
+  // @f[ 
+  //    f_i(x;\Delta,\xi,\sigma') = f(x;\Delta_i,\xi_i,\sigma_i')
+  // @f] 
+  // corresponding to @f$ i@f$ particles i.e., with the substitutions 
+  // @f{eqnarray*}{ 
+  //    \Delta    \rightarrow \Delta_i    &=& i(\Delta + \xi\log(i))
+  //    \xi       \rightarrow \xi_i       &=& i \xi
+  //    \sigma    \rightarrow \sigma_i    &=& \sqrt{i}\sigma
+  //    \sigma'^2 \rightarrow \sigma_i'^2 &=& \sigma_n^2 + \sigma_i^2
+  // @f} 
+  // 
+  // Parameters:
+  //    x        Where to evaluate 
+  //    delta    @f$ \Delta@f$ 
+  //    xi       @f$ \xi@f$ 
+  //    sigma    @f$ \sigma@f$ 
+  //    sigma_n  @f$ \sigma_n@f$
+  //    i        @f$ i @f$
+  // 
+  // Return:
+  //    @f$ f_i @f$ evaluated
+  //  
   Double_t delta_i =  (i == 1 ? delta : i * (delta + xi * TMath::Log(i)));
   Double_t xi_i    =  i * xi;
   Double_t sigma_i =  (i == 1 ? sigma : TMath::Sqrt(Double_t(i))*sigma);
@@ -188,6 +330,42 @@ AliForwardUtil::IdLandauGausdPar(Double_t x,
                                 Double_t sigma, Double_t sigma_n, 
                                 Int_t    i)
 {
+  // 
+  // Numerically evaluate 
+  // @f[ 
+  //    \left.\frac{\partial f_i}{\partial p_i}\right|_{x}
+  // @f] 
+  // where @f$ p_i@f$ is the @f$ i^{\mbox{th}}@f$ parameter.  The mapping 
+  // of the parameters is given by 
+  //
+  // - 0: @f$\Delta@f$ 
+  // - 1: @f$\xi@f$ 
+  // - 2: @f$\sigma@f$ 
+  // - 3: @f$\sigma_n@f$ 
+  //
+  // This is the partial derivative with respect to the parameter of
+  // the response function corresponding to @f$ i@f$ particles i.e.,
+  // with the substitutions
+  // @f[ 
+  //    \Delta    \rightarrow \Delta_i    = i(\Delta + \xi\log(i))
+  //    \xi       \rightarrow \xi_i       = i \xi
+  //    \sigma    \rightarrow \sigma_i    = \sqrt{i}\sigma
+  //    \sigma'^2 \rightarrow \sigma_i'^2 = \sigma_n^2 + \sigma_i^2
+  // @f] 
+  // 
+  // Parameters:
+  //    x        Where to evaluate 
+  //    ipar     Parameter number 
+  //    dp       @f$ \epsilon\delta p_i@f$ for some value of @f$\epsilon@f$
+  //    delta    @f$ \Delta@f$ 
+  //    xi       @f$ \xi@f$ 
+  //    sigma    @f$ \sigma@f$ 
+  //    sigma_n  @f$ \sigma_n@f$
+  //    i        @f$ i@f$
+  // 
+  // Return:
+  //    @f$ f_i@f$ evaluated
+  //  
   if (dPar == 0) return 0;
   Double_t dp      = dPar;
   Double_t d2      = dPar / 2;
@@ -242,6 +420,35 @@ AliForwardUtil::NLandauGaus(Double_t x, Double_t delta, Double_t xi,
                            Double_t sigma, Double_t sigma_n, Int_t n, 
                            Double_t* a)
 {
+  // 
+  // Evaluate 
+  // @f[ 
+  //   f_N(x;\Delta,\xi,\sigma') = \sum_{i=1}^N a_i f_i(x;\Delta,\xi,\sigma'a)
+  // @f] 
+  // 
+  // where @f$ f(x;\Delta,\xi,\sigma')@f$ is the convolution of a
+  // Landau with a Gaussian (see LandauGaus).  Note that 
+  // @f$ a_1 = 1@f$, @f$\Delta_i = i(\Delta_1 + \xi\log(i))@f$, 
+  // @f$\xi_i=i\xi_1@f$, and @f$\sigma_i'^2 = \sigma_n^2 + i\sigma_1^2@f$. 
+  //  
+  // References: 
+  //  - <a href="http://dx.doi.org/10.1016/0168-583X(84)90472-5">Nucl.Instrum.Meth.B1:16</a>
+  //  - <a href="http://dx.doi.org/10.1103/PhysRevA.28.615">Phys.Rev.A28:615</a>
+  //  - <a href="http://root.cern.ch/root/htmldoc/tutorials/fit/langaus.C.html">ROOT implementation</a>
+  // 
+  // Parameters:
+  //    x        Where to evaluate @f$ f_N@f$
+  //    delta    @f$ \Delta_1@f$ 
+  //    xi       @f$ \xi_1@f$
+  //    sigma    @f$ \sigma_1@f$ 
+  //    sigma_n  @f$ \sigma_n@f$ 
+  //    n        @f$ N@f$ in the sum above.
+  //    a        Array of size @f$ N-1@f$ of the weights @f$ a_i@f$ for 
+  //                 @f$ i > 1@f$ 
+  // 
+  // Return:
+  //    @f$ f_N(x;\Delta,\xi,\sigma')@f$ 
+  //
   Double_t result = ILandauGaus(x, delta, xi, sigma, sigma_n, 1);
   for (Int_t i = 2; i <= n; i++) 
     result += a[i-2] * AliForwardUtil::ILandauGaus(x,delta,xi,sigma,sigma_n,i);
@@ -270,6 +477,24 @@ AliForwardUtil::MakeNLandauGaus(Double_t  c,
                                Double_t* a, 
                                Double_t  xmin, Double_t xmax)
 {
+  // 
+  // Generate a TF1 object of @f$ f_N@f$ 
+  // 
+  // Parameters:
+  //    c         Constant                            
+  //    delta     @f$ \Delta@f$                       
+  //    xi           @f$ \xi_1@f$                     
+  //    sigma     @f$ \sigma_1@f$                     
+  //    sigma_n   @f$ \sigma_n@f$                     
+  //    n            @f$ N@f$ - how many particles to sum to
+  //    a         Array of size @f$ N-1@f$ of the weights @f$ a_i@f$ for 
+  //                  @f$ i > 1@f$ 
+  //    xmin      Least value of range  
+  //    xmax      Largest value of range
+  // 
+  // Return:
+  //    Newly allocated TF1 object
+  //
   Int_t npar       = AliForwardUtil::ELossFitter::kN+n;
   TF1* landaun     = new TF1(Form("nlandau%d", n), &landauGausN,xmin,xmax,npar);
   // landaun->SetLineStyle(((n-2) % 10)+2); // start at dashed
@@ -300,6 +525,22 @@ AliForwardUtil::MakeILandauGaus(Double_t  c,
                                Double_t  sigma, Double_t sigma_n, Int_t i, 
                                Double_t  xmin, Double_t xmax)
 {
+  // 
+  // Generate a TF1 object of @f$ f_I@f$ 
+  // 
+  // Parameters:
+  //    c        Constant
+  //    delta    @f$ \Delta@f$ 
+  //    xi       @f$ \xi_1@f$         
+  //    sigma    @f$ \sigma_1@f$              
+  //    sigma_n  @f$ \sigma_n@f$              
+  //    i           @f$ i@f$ - the number of particles
+  //    xmin     Least value of range
+  //    xmax     Largest value of range
+  // 
+  // Return:
+  //    Newly allocated TF1 object
+  //
   Int_t npar       = AliForwardUtil::ELossFitter::kN+1;
   TF1* landaui     = new TF1(Form("ilandau%d", i), &landauGausI,xmin,xmax,npar);
   // landaui->SetLineStyle(((i-2) % 10)+2); // start at dashed
@@ -326,12 +567,24 @@ AliForwardUtil::ELossFitter::ELossFitter(Double_t lowCut,
   : fLowCut(lowCut), fMaxRange(maxRange), fMinusBins(minusBins), 
     fFitResults(0), fFunctions(0)
 {
+  // 
+  // Constructor 
+  // 
+  // Parameters:
+  //    lowCut     Lower cut of spectrum - data below this cuts is ignored
+  //    maxRange   Maximum range to fit to 
+  //    minusBins  The number of bins below maximum to use 
+  //
   fFitResults.SetOwner();
   fFunctions.SetOwner();
 }
 //____________________________________________________________________
 AliForwardUtil::ELossFitter::~ELossFitter()
 {
+  // 
+  // Destructor
+  // 
+  //
   fFitResults.Delete();
   fFunctions.Delete();
 }
@@ -339,6 +592,10 @@ AliForwardUtil::ELossFitter::~ELossFitter()
 void
 AliForwardUtil::ELossFitter::Clear()
 {
+  // 
+  // Clear internal arrays 
+  // 
+  //
   fFitResults.Clear();
   fFunctions.Clear();
 }
@@ -346,6 +603,21 @@ AliForwardUtil::ELossFitter::Clear()
 TF1*
 AliForwardUtil::ELossFitter::Fit1Particle(TH1* dist, Double_t sigman)
 {
+  // 
+  // Fit a 1-particle signal to the passed energy loss distribution 
+  // 
+  // Note that this function clears the internal arrays first 
+  // 
+  // Parameters:
+  //    dist    Data to fit the function to 
+  //    sigman If larger than zero, the initial guess of the
+  //               detector induced noise. If zero or less, then this 
+  //               parameter is ignored in the fit (fixed at 0)
+  // 
+  // Return:
+  //    The function fitted to the data 
+  //
+
   // Clear the cache 
   Clear();
   
@@ -391,6 +663,22 @@ TF1*
 AliForwardUtil::ELossFitter::FitNParticle(TH1* dist, UShort_t n, 
                                          Double_t sigman)
 {
+  // 
+  // Fit a N-particle signal to the passed energy loss distribution 
+  //
+  // If there's no 1-particle fit present, it does that first 
+  // 
+  // Parameters:
+  //    dist   Data to fit the function to 
+  //    n      Number of particle signals to fit 
+  //    sigman If larger than zero, the initial guess of the
+  //               detector induced noise. If zero or less, then this 
+  //               parameter is ignored in the fit (fixed at 0)
+  // 
+  // Return:
+  //    The function fitted to the data 
+  //
+
   // Get the seed fit result 
   TFitResult* r = static_cast<TFitResult*>(fFitResults.At(0));
   TF1*        f = static_cast<TF1*>(fFunctions.At(0));
@@ -445,6 +733,9 @@ AliForwardUtil::ELossFitter::FitNParticle(TH1* dist, UShort_t n,
 //====================================================================
 AliForwardUtil::Histos::~Histos()
 {
+  // 
+  // Destructor
+  //
   if (fFMD1i) delete fFMD1i;
   if (fFMD2i) delete fFMD2i;
   if (fFMD2o) delete fFMD2o;
@@ -457,6 +748,17 @@ TH2D*
 AliForwardUtil::Histos::Make(UShort_t d, Char_t r, 
                             const TAxis& etaAxis) const
 {
+  // 
+  // Make a histogram 
+  // 
+  // Parameters:
+  //    d        Detector
+  //    r        Ring 
+  //    etaAxis  Eta axis to use
+  // 
+  // Return:
+  //    Newly allocated histogram 
+  //
   Int_t ns = (r == 'I' || r == 'i') ? 20 : 40;
   TH2D* hist = new TH2D(Form("FMD%d%c_cache", d, r), 
                        Form("FMD%d%c cache", d, r),
@@ -474,6 +776,12 @@ AliForwardUtil::Histos::Make(UShort_t d, Char_t r,
 void
 AliForwardUtil::Histos::Init(const TAxis& etaAxis)
 {
+  // 
+  // Initialize the object 
+  // 
+  // Parameters:
+  //    etaAxis Eta axis to use 
+  //
   fFMD1i = Make(1, 'I', etaAxis);
   fFMD2i = Make(2, 'I', etaAxis);
   fFMD2o = Make(2, 'O', etaAxis);
@@ -484,6 +792,12 @@ AliForwardUtil::Histos::Init(const TAxis& etaAxis)
 void
 AliForwardUtil::Histos::Clear(Option_t* option)
 {
+  // 
+  // Clear data 
+  // 
+  // Parameters:
+  //    option Not used 
+  //
   fFMD1i->Reset(option);
   fFMD2i->Reset(option);
   fFMD2o->Reset(option);
@@ -495,6 +809,16 @@ AliForwardUtil::Histos::Clear(Option_t* option)
 TH2D*
 AliForwardUtil::Histos::Get(UShort_t d, Char_t r) const
 {
+  // 
+  // Get the histogram for a particular detector,ring
+  // 
+  // Parameters:
+  //    d Detector 
+  //    r Ring 
+  // 
+  // Return:
+  //    Histogram for detector,ring or nul 
+  //
   switch (d) { 
   case 1: return fFMD1i;
   case 2: return (r == 'I' || r == 'i' ? fFMD2i : fFMD2o);
@@ -506,6 +830,15 @@ AliForwardUtil::Histos::Get(UShort_t d, Char_t r) const
 TList*
 AliForwardUtil::RingHistos::DefineOutputList(TList* d) const
 {
+  // 
+  // Define the outout list in @a d
+  // 
+  // Parameters:
+  //    d Where to put the output list
+  // 
+  // Return:
+  //    Newly allocated TList object or null
+  //
   if (!d) return 0;
   TList* list = new TList;
   list->SetName(fName.Data());
@@ -516,6 +849,15 @@ AliForwardUtil::RingHistos::DefineOutputList(TList* d) const
 TList*
 AliForwardUtil::RingHistos::GetOutputList(TList* d) const
 {
+  // 
+  // Get our output list from the container @a d
+  // 
+  // Parameters:
+  //    d where to get the output list from 
+  // 
+  // Return:
+  //    The found TList or null
+  //
   if (!d) return 0;
   TList* list = static_cast<TList*>(d->FindObject(fName.Data()));
   return list;
@@ -525,6 +867,16 @@ AliForwardUtil::RingHistos::GetOutputList(TList* d) const
 TH1*
 AliForwardUtil::RingHistos::GetOutputHist(TList* d, const char* name) const
 {
+  // 
+  // Find a specific histogram in the source list @a d
+  // 
+  // Parameters:
+  //    d     (top)-container 
+  //    name  Name of histogram
+  // 
+  // Return:
+  //    Found histogram or null
+  //
   return static_cast<TH1*>(d->FindObject(name));
 }
 
index 4002dd6627ace717f07466b40a74cb6c064ae912..b225a88cf8614f6d251388200305d852f04f8957 100644 (file)
@@ -1,5 +1,9 @@
-#ifndef ALIROOT_PWG2_FORWARD_ALIFORWARDUTIL_H
-#define ALIROOT_PWG2_FORWARD_ALIFORWARDUTIL_H
+// 
+// Utilities used in the forward multiplcity analysis 
+// 
+//
+#ifndef ALIFORWARDUTIL_H
+#define ALIFORWARDUTIL_H
 #include <TObject.h>
 #include <TString.h>
 #include <TObjArray.h>
@@ -324,6 +328,10 @@ public:
      * @param minusBins  The number of bins below maximum to use 
      */
     ELossFitter(Double_t lowCut, Double_t maxRange, UShort_t minusBins); 
+    /** 
+     * Destructor
+     * 
+     */
     virtual ~ELossFitter();
     /** 
      * Clear internal arrays 
@@ -500,28 +508,28 @@ public:
       return *this;
     }
     /** 
+     * Define the outout list in @a d
      * 
+     * @param d Where to put the output list
      * 
-     * @param d 
-     * 
-     * @return 
+     * @return Newly allocated TList object or null
      */
     TList* DefineOutputList(TList* d) const;
     /** 
+     * Get our output list from the container @a d
      * 
+     * @param d where to get the output list from 
      * 
-     * @param d 
-     * 
-     * @return 
+     * @return The found TList or null
      */
     TList* GetOutputList(TList* d) const;
     /** 
+     * Find a specific histogram in the source list @a d
      * 
+     * @param d     (top)-container 
+     * @param name  Name of histogram
      * 
-     * @param d 
-     * @param name 
-     * 
-     * @return 
+     * @return Found histogram or null
      */
     TH1* GetOutputHist(TList* d, const char* name) const;
     /**