class MPTools: public TObject

_HADES_CLASS_DESCRIPTION


 Peter's Math Tools

            Author: Peter W. Zumbruch
           Contact: P.Zumbruch@gsi.de
           Created: March 18, 2004

 File: $RCSfile: mptools.cc,v $
 Version: $Revision: 1.19 $
 Modified by $Author: halo $ on $Date: 2008-05-09 16:18:32 $

Function Members (Methods)

public:
MPTools()
MPTools(const MPTools&)
~MPTools()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
static Double_tbinomialDistribution(Double_t* x, Double_t* par)
static Double_tbinomialDistribution(Double_t x, Double_t singleProbability, Double_t N, Double_t logAmplitude = 0.)
virtual voidTObject::Browse(TBrowser* b)
static Double_tcalcCMEnergyOfPairDecay(Double_t minv, Double_t m1, Double_t m2)
static Double_tcalcCMMomentumOfPairDecay(Double_t minv, Double_t m1, Double_t m2)
static Double_tcalcCMMomentumOfPairDecay(Double_t minv, Double_t m1, Double_t m2, Double_t minvErr, Double_t m1Err, Double_t m2Err, Double_t& err)
static TH1*calculateLikeSignCombinatorialBackground(TH1* pp, TH1* mm, TString name = "background")
static TH1*calculateLikeSignCombinatorialBackground(TH1* pp, TH1* mm, TH1* correction, TString name = "background")
static Double_tchiSquareDistribution(Double_t* x, Double_t* par)
static Double_tchiSquareDistribution(Double_t x, Double_t ndf, Double_t logAmplitude = 0.)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
static Double_tgetDistancePointToStraight(HGeomVector& point, HGeomVector& base, HGeomVector& direction)
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
static Double_tintegralGauss(Double_t* x, Double_t* par)
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
MPTools&operator=(const MPTools&)
virtual voidTObject::Paint(Option_t* option = "")
static Double_tpoissonDistribution(Double_t* x, Double_t* par)
static Double_tpoissonDistribution(Double_t x, Double_t mean, Double_t logAmplitude = 0.)
static Double_tpoissonDistributionShifted(Double_t* x, Double_t* par)
static Double_tpoissonDistributionShifted(Double_t x, Double_t mean, Double_t logAmplitude = 0., Double_t shift = 0)
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
static TH1D*projectPtYDownToMt(TH2* hist, Int_t ymin, Int_t ymax, Double_t mass)
static TH1D*projectPtYDownToMtInBoltzmannRepresentation(TH2* hist, Int_t ymin, Int_t ymax, Double_t mass)
static TH1D*projectPtYDownToMtInInvariantRepresentation(TH2* hist, Int_t ymin, Int_t ymax, Double_t mass)
static TH1D*projectPtYDownToMtM0(TH2* hist, Int_t ymin, Int_t ymax, Double_t mass)
static TH1D*projectPtYDownToMtM0InInvariantRepresentation(TH2* hist, Int_t ymin, Int_t ymax, Double_t mass)
static TObjArray*projectPtYDownToPt(TH2* hist, Int_t stepSize = 1)
static TH1D*projectPtYDownToPt(TH2* hist, Int_t ymin, Int_t ymax)
static TH1D*projectPtYDownToPtInBoltzmannRepresentation(TH2* hist, Int_t ymin, Int_t ymax, Double_t mass)
static TH1D*projectPtYDownToPtInInvariantRepresentation(TH2* hist, Int_t ymin, Int_t ymax)
static TObjArray*projectPtYDownToPtScaled(TH2* hist, Double_t scaleFactor = 1., Int_t stepSize = 1)
static TObjArray*projectPtYDownToY(TH2* hist, Int_t stepSize = 1)
static TH1D*projectPtYDownToY(TH2* hist, Int_t ptmin, Int_t ptmax)
static TObjArray*projectPtYDownToYScaled(TH2* hist, Double_t scaleFactor = 1., Int_t stepSize = 1)
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

Double_t getDistancePointToStraight(HGeomVector& point, HGeomVector& base, HGeomVector& direction)
TH1* calculateLikeSignCombinatorialBackground(TH1* pp, TH1* mm, TString name = "background")
 calculates binwise the likesign combinatorial background of two given histograms
 using the formula

              /---------
 back = 2 *  V pp * mm


 and returns the pointer to the background histogramm
 with the name assigned assigned by name [default: "background"]

 if pp or mm are null pointers NULL is returned
 if pp and mm are not compatible NULL is returned
TH1* calculateLikeSignCombinatorialBackground(TH1* pp, TH1* mm, TH1* correction, TString name = "background")
 calculates binwise the likesign combinatorial background of two given histograms
 using the formula

                          /---------
 back = 2 * correction * V pp * mm


 and returns the pointer to the background histogramm
 with the name assigned assigned by name [default: "background"]

 correction is also a histogram containing bin-wise correction factors (like acceptance correction)

 if correction, pp or mm are null pointers NULL is returned
 if correction, pp and mm are not compatible NULL is returned
Double_t poissonDistribution(Double_t* x, Double_t* par)
 discrete poisson distribution as continuous function
 poisson is the limiting form of the binomial distribution
 for p->0 and N->infinity

             r  -mean
         mean  e
 P(r) = -------------
             r!

 translates to

                          r  -mean
          amplitude   mean  e
 P(x) = 10           ---------------
                        Gamma(r+1)

 if x<0 P(0) is returned

 par[0] : amplitude
 par[1] : mean

Double_t poissonDistribution(Double_t x, Double_t mean, Double_t logAmplitude = 0.)
 discrete poisson distribution as continuous function
 poisson is the limiting form of the binomial distribution
 for p->0 and N->infinity

             r  -mean
         mean  e
 P(r) = -------------
             r!

 translates to

                          r  -mean
          amplitude   mean  e
 P(x) = 10           ---------------
                        Gamma(r+1)

 if x<0 P(0) is returned
Double_t poissonDistributionShifted(Double_t* x, Double_t* par)
 discrete poisson distribution as continuous function
 poisson is the limiting form of the binomial distribution
 for p->0 and N->infinity

             r  -mean
         mean  e
 P(r) = -------------
             r!

 translates to

                          x+shift  -mean
          amplitude   mean  e
 P(x) = 10           ---------------
                        Gamma(x+1+shift)

 if x<0 -1 is returned

 par[0] : amplitude
 par[1] : mean

Double_t poissonDistributionShifted(Double_t x, Double_t mean, Double_t logAmplitude = 0., Double_t shift = 0)
 discrete poisson distribution as continuous function
 poisson is the limiting form of the binomial distribution
 for p->0 and N->infinity

             r  -mean
         mean  e
 P(r) = -------------
             r!

 translates to

                          x+shift  -mean
          amplitude   mean  e
 P(x) = 10           ---------------
                        Gamma(x+1+shifta)

 if x<0 -1 is returned
Double_t binomialDistribution(Double_t* x, Double_t* par)
 discrete binomial distribution as continuous function

              N!       r       N-r
 P(r) = ------------- p (1 - p)
         r! (N - r) !

 translates to

          Amplitude           Gamma(N+1)           r       N-r
 P(x) = 10           ---------------------------- p (1 - p)
                     Gamma(r+1) Gamma (N - r + 1)

 P(x) the probability of r successes in N tries
 p is the single probability

 par[0]: Amplitude, chosen for Normalization purposes
 par[1]: number of tries (N)
 par[2]: single probability (p)

 if x<0 -1 is returned

 if x>N -1 is returned
Double_t binomialDistribution(Double_t x, Double_t singleProbability, Double_t N, Double_t logAmplitude = 0.)
 discrete binomial distribution as continuous function

              N!       r       N-r
 P(r) = ------------- p (1 - p)
         r! (N - r) !

 translates to

          Amplitude           Gamma(N+1)           r       N-r
 P(x) = 10           ---------------------------- p (1 - p)
                     Gamma(r+1) Gamma (N - r + 1)

 P(x) the probability of r successes in N tries
 p is the single probability

 par[0]: Amplitude, chosen for Normalization purposes
 par[1]: number of tries (N)
 par[2]: single probability (p)
 if x<0 -1 is returned

 if x>N -1 is returned
Double_t chiSquareDistribution(Double_t* x, Double_t* par)
 chi square distriubtion

                       (0.5 * NDF) -1     (- 0.5 * chi2)
           (0.5 * chi2)               * e
 P(chi2) = ----------------------------------------------
                         2 * Gamma (0.5 * NDF)

 adding a normalization amplitude

                                    (0.5 * NDF) -1     (- 0.5 * x[0])
             amplitude   (0.5 * x[0])               * e
 P(x[0]) = 10         *  ------------------------------------------------
                                       2 * Gamma (0.5 * NDF)


 par[1]: NDF are number of degrees of freedom
 par[0]: amplitude

 if ndf <=0 -1 is returned
Double_t chiSquareDistribution(Double_t x, Double_t ndf, Double_t logAmplitude = 0.)
 chi square distriubtion

                       (0.5 * NDF) -1     (- 0.5 * chi2)
           (0.5 * chi2)               * e
 P(chi2) = ----------------------------------------------
                         2 * Gamma (0.5 * NDF)

 adding a normalization amplitude

                                 (0.5 * NDF) -1     (- 0.5 * x)
          amplitude   (0.5 * x)               * e
 P(x) = 10         *  ------------------------------------------------
                                    2 * Gamma (0.5 * NDF)


 NDF are number of degrees of freedom
 amplitude

 if ndf <=0 -1 is returned
Double_t calcCMMomentumOfPairDecay(Double_t minv, Double_t m1, Double_t m2, Double_t minvErr, Double_t m1Err, Double_t m2Err, Double_t& err)
 calculates in a 2-body decay the center of momentum momentum of the decay particles
 where
    minv is the invariant mass of the parent
    m1 is the mass of the particle 1
    m2 is the mass of the particle 2
    minvErr is the absolute error parents invariant mass
    m1Err is absolute error of the mass of the particle 1
    m2Err is absolute error of the mass of the particle 2

    the error is returned via err
    in case of errors -1. is returned

 !!!! in case of m1!=m2 I am not quite sure if the result is ok. !!!
Double_t calcCMMomentumOfPairDecay(Double_t minv, Double_t m1, Double_t m2)
 calculates in a 2-body decay the center of momentum momentum of the decay particles
 where
    minv is the invariant mass of the parent
    m1 is the mass of the particle 1
    m2 is the mass of the particle 2

    the error is returned via err
    in case of errors -1. is returned
Double_t calcCMEnergyOfPairDecay(Double_t minv, Double_t m1, Double_t m2)
 calculates in a 2-body decay the center of momentum energy of the decay particles
 of particle with mass m1
 where
    minv is the invariant mass of the parent
    m1 is the mass of the particle 1
    m2 is the mass of the particle 2

    in case of errors -1. is returned
Double_t integralGauss(Double_t* x, Double_t* par)
 Parametric 1-dimensional function with 3 parameters
 par[0] = Integral of Gaus-Funktion in range +- infinity
 par[1] = mean of gauss
 par[2] = sigma

 returns 0 if par[2] = 0

 else returns

 par[0]/(sqrt(TMath::Pi()*2)*par[2])*TMath::Gaus(x[0],par[1],par[2])
TH1D* projectPtYDownToPt(TH2* hist, Int_t ymin, Int_t ymax)
 if hist is NULL ... NULL is returned
 otherwise
 a histogram is returned
 that is the projection of hist in a bin range ymin to ymax on the x-Axis
TH1D* projectPtYDownToPtInInvariantRepresentation(TH2* hist, Int_t ymin, Int_t ymax)
 if hist is NULL ... NULL is returned
 otherwise
 a histogram is returned
 that is the invariant cross section weighted (1/pt) projection of hist in a bin range ymin to ymax on the x-Axis
 if pt = 0 the weight is also set to 0
TH1D* projectPtYDownToPtInBoltzmannRepresentation(TH2* hist, Int_t ymin, Int_t ymax, Double_t mass)
 if hist is NULL ... NULL is returned
 otherwise
 a histogram is returned
 that is the boltzmann weighted (1/ptE = 1/(pt*sqrt(pt^2+mass^2)) projection of hist in a bin range ymin to ymax on the x-Axis
 if pt = 0 the weight is also set to 0
TH1D* projectPtYDownToMtInBoltzmannRepresentation(TH2* hist, Int_t ymin, Int_t ymax, Double_t mass)
 if hist is NULL ... NULL is returned
 otherwise
 a histogram is returned
 that is the boltzmann weighted (1/ptE = 1/(pt*sqrt(pt^2+mass^2)) projection of hist in a bin range ymin to ymax on the x-Axis
 if pt = 0 the weight is also set to 0
TH1D* projectPtYDownToMtInInvariantRepresentation(TH2* hist, Int_t ymin, Int_t ymax, Double_t mass)
 if hist is NULL ... NULL is returned
 otherwise
 a histogram is returned
 that is the boltzmann weighted (1/ptE = 1/(pt*sqrt(pt^2+mass^2)) projection of hist in a bin range ymin to ymax on the x-Axis
 if pt = 0 the weight is also set to 0
TH1D* projectPtYDownToMtM0InInvariantRepresentation(TH2* hist, Int_t ymin, Int_t ymax, Double_t mass)
 if hist is NULL ... NULL is returned
 otherwise
 a histogram is returned
 that is the boltzmann weighted (1/ptE = 1/(pt*sqrt(pt^2+mass^2)) projection of hist in a bin range ymin to ymax on the x-Axis
 if pt = 0 the weight is also set to 0
TH1D* projectPtYDownToMtM0(TH2* hist, Int_t ymin, Int_t ymax, Double_t mass)
 if hist is NULL ... NULL is returned
 otherwise
 a histogram is returned
 that is the boltzmann weighted (1/ptE = 1/(pt*sqrt(pt^2+mass^2)) projection of hist in a bin range ymin to ymax on the x-Axis
 if pt = 0 the weight is also set to 0
TH1D* projectPtYDownToMt(TH2* hist, Int_t ymin, Int_t ymax, Double_t mass)
 if hist is NULL ... NULL is returned
 otherwise
 a histogram is returned
 that is the boltzmann weighted (1/ptE = 1/(pt*sqrt(pt^2+mass^2)) projection of hist in a bin range ymin to ymax on the x-Axis
 if pt = 0 the weight is also set to 0
TH1D* projectPtYDownToY(TH2* hist, Int_t ptmin, Int_t ptmax)
 if hist is NULL ... NULL is returned
 otherwise
 a histogram is returned
 that is the projection of hist in a bin range ptmin to ptmax on the x-Axis
TObjArray* projectPtYDownToPtScaled(TH2* hist, Double_t scaleFactor = 1., Int_t stepSize = 1)
 if hist is NULL ... NULL is returned
 otherwise
 a TObjArray of histograms is returned
 where each histogram is the projection of hist from first bin for "stepSize" bins together,
 default: stepsize = 1, i.e for each bin allone
 beginning from the second histogram, all histograms are scaled by scaleFactor with respect to the previous histogram
   i.e. the (n+1th) histogramm is scaled by scaleFactor to the nth power
   if scale factor is negativ than the scaling order is reversed, i.e the first histogramm is scaled most
TObjArray* projectPtYDownToPt(TH2* hist, Int_t stepSize = 1)
 if hist is NULL ... NULL is returned
 otherwise
 a TObjArray of histograms is returned
 where each histogram is the projection of hist from first bin for "stepSize" bins together,
 default: stepSize = 1, i.e for each bin allone
 beginning from the second histogram, all histograms are scaled by scaleFactor with respect to the previous histogram
   i.e. the (n+1th) histogramm is scaled by scaleFactor to the nth power
   if scale factor is negativ than the scaling order is reversed, i.e the first histogramm is scaled most
TObjArray* projectPtYDownToYScaled(TH2* hist, Double_t scaleFactor = 1., Int_t stepSize = 1)
 if hist is NULL ... NULL is returned
 otherwise
 a TObjArray of histograms is returned
 where each histogram is the projection of hist from first bin for "stepSize" bins together,
 default: stepsize = 1, i.e for each bin allone
 beginning from the second histogram, all histograms are scaled by scaleFactor with respect to the previous histogram
   i.e. the (n+1th) histogramm is scaled by scaleFactor to the nth power
   if scale factor is negativ than the scaling order is reversed, i.e the first histogramm is scaled most
TObjArray* projectPtYDownToY(TH2* hist, Int_t stepSize = 1)
 if hist is NULL ... NULL is returned
 otherwise
 a TObjArray of histograms is returned
 where each histogram is the projection of hist from first bin for "stepSize" bins together,
 default: stepSize = 1, i.e for each bin allone
 beginning from the second histogram, all histograms are scaled by scaleFactor with respect to the previous histogram
   i.e. the (n+1th) histogramm is scaled by scaleFactor to the nth power
   if scale factor is negativ than the scaling order is reversed, i.e the first histogramm is scaled most

Last change: Sat May 22 13:18:02 2010
Last generated: 2010-05-22 13:18

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.