MPTools
class description - source file - inheritance tree (.pdf)
public:
MPTools()
MPTools(const MPTools&)
~MPTools()
static Double_t binomialDistribution(double* x, double* par)
static Double_t binomialDistribution(Double_t x, Double_t singleProbability, Double_t N, Double_t logAmplitude = 0.)
static Double_t calcCMEnergyOfPairDecay(Double_t minv, Double_t m1, Double_t m2)
static Double_t calcCMMomentumOfPairDecay(Double_t minv, Double_t m1, Double_t m2, Double_t minvErr, Double_t m1Err, Double_t m2Err, Double_t& err)
static Double_t calcCMMomentumOfPairDecay(Double_t minv, Double_t m1, Double_t m2)
static TH1* calculateLikeSignCombinatorialBackground(TH1* pp, TH1* mm, TString name = background)
static TH1* calculateLikeSignCombinatorialBackground(TH1* pp, TH1* mm, TH1* correction, TString name = background)
static Double_t chiSquareDistribution(double* x, double* par)
static Double_t chiSquareDistribution(Double_t x, Double_t ndf, Double_t logAmplitude = 0.)
static TClass* Class()
static Double_t getDistancePointToStraight(HGeomVector& point, HGeomVector& base, HGeomVector& direction)
static Double_t integralGauss(Double_t* x, Double_t* par)
virtual TClass* IsA() const
MPTools& operator=(const MPTools&)
static Double_t poissonDistribution(double* x, double* par)
static Double_t poissonDistribution(Double_t x, Double_t mean, Double_t logAmplitude = 0.)
static Double_t poissonDistributionShifted(double* x, double* par)
static Double_t poissonDistributionShifted(Double_t x, Double_t mean, Double_t logAmplitude = 0., Double_t shift = 0)
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 TH1D* projectPtYDownToPt(TH2* hist, Int_t ymin, Int_t ymax)
static TObjArray* projectPtYDownToPt(TH2* hist, Int_t stepSize = 1)
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 TH1D* projectPtYDownToY(TH2* hist, Int_t ptmin, Int_t ptmax)
static TObjArray* projectPtYDownToY(TH2* hist, Int_t stepSize = 1)
static TObjArray* projectPtYDownToYScaled(TH2* hist, Double_t scaleFactor = 1., Int_t stepSize = 1)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
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.18 $
Modified by $Author: halo $ on $Date: 2006/08/12 13:05:25 $
Double_t getDistancePointToStraight(HGeomVector &point, HGeomVector &base, HGeomVector &direction)
TH1* calculateLikeSignCombinatorialBackground(TH1* pp, TH1* mm, TString name)
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)
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 *x, double *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 amplitude)
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 *x, double *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 amplitude, Double_t shift)
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 *x, double *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 amplitude)
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 *x, double *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 amplitude)
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, Int_t stepSize)
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)
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, Int_t stepSize)
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)
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
Inline Functions
void ~MPTools()
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
MPTools MPTools()
MPTools MPTools(const MPTools&)
MPTools& operator=(const MPTools&)
Last update: Fri Jan 26 12:38:50 2007
ROOT page - Class index - Class Hierarchy - Top of the page
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.