ROOTPWA
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
rpwa::fitResult Class Reference

data storage class for PWA fit result of one kinematic bin More...

#include <fitResult.h>

Public Member Functions

 fitResult ()
 fitResult (const fitResult &result)
 fitResult (const TFitBin &fitBin)
virtual ~fitResult ()
fitResultcloneVar ()
void reset ()
void fill (const unsigned int nmbEvents, const unsigned int normNmbEvents, const double massBinCenter, const double logLikelihood, const int rank, const std::vector< std::complex< double > > &prodAmps, const std::vector< std::string > &prodAmpNames, const TMatrixT< double > &fitParCovMatrix, const std::vector< std::pair< int, int > > &fitParCovMatrixIndices, const TCMatrix &normIntegral, const std::vector< double > &phaseSpaceIntegral, const bool converged, const bool hasHessian)
double massBinCenter () const
 returns center value of mass bin
double logLikelihood () const
 returns log(likelihood) at maximum
double evidence () const
 returns the model evidence (OccamFactorMethod)
bool converged () const
 returns whether fit has converged (according to minimizer)
bool hasHessian () const
 returns whether Hessian matrix has been calculated successfully
unsigned int rank () const
 returns rank of fit
unsigned int nmbEvents () const
 returns number of events in bin
unsigned int normNmbEvents () const
 returns number of events to normalize to
unsigned int nmbWaves () const
 returns number of waves in fit
unsigned int nmbProdAmps () const
 returns number of production amplitudes
TString waveName (const unsigned int waveIdx) const
 returns name of wave at index
TString waveNameEsc (const unsigned int waveIdx) const
 returns name of wave at index with special regexp characters escaped
TString prodAmpName (const unsigned int prodAmpIdx) const
 returns name of production amplitude at index
TString prodAmpNameEsc (const unsigned int prodAmpIdx) const
 returns name of production amplitude at index with special regexp characters escaped
int waveIndex (const std::string &waveName) const
 returns wave index corresponding to wave name
int prodAmpIndex (const std::string &prodAmpName) const
 returns production amplitude index corresponding to production amplitude name
double fitParameter (const std::string &parName) const
 returns fit parameter value by parameter name
double fitParameterCov (const unsigned int parIndexA, const unsigned int parIndexB) const
 returns covariance of fit parameters at index A and B
void fitParameters (double *parArray) const
 copies fit parameters into array
std::complex< double > prodAmp (const unsigned int prodAmpIdx) const
 returns production amplitude value at index
TMatrixT< double > prodAmpCov (const unsigned int prodAmpIdx) const
 returns covariance matrix for a set of production amplitudes given by index list
TMatrixT< double > prodAmpCov (const std::vector< unsigned int > &prodAmpIndices) const
 returns covariance matrix for a set of production amplitudes given by a list of index pairs
TMatrixT< double > prodAmpCov (const std::vector< std::pair< unsigned int, unsigned int > > &prodAmpIndexPairs) const
 returns covariance matrix for a set of production amplitudes given by index lists A and B
TMatrixT< double > prodAmpCov (const std::vector< unsigned int > &prodAmpIndicesA, const std::vector< unsigned int > &prodAmpIndicesB) const
 constructs covariance matrix of production amplitudes specified by two index lists
bool covMatrixValid () const
std::complex< double > normIntegral (const unsigned int waveIndexA, const unsigned int waveIndexB) const
 returns normalization integral for pair of waves at index A and B
double phaseSpaceIntegral (const unsigned int waveIdx) const
 returns the sqrt(!) of the phase space integral for given wave
double phaseSpaceIntegral (const std::string &waveName) const
std::complex< double > spinDensityMatrixElem (const unsigned int waveIndexA, const unsigned int waveIndexB) const
 returns spin density matrix element for pair of waves at index A and B
TMatrixT< double > spinDensityMatrixElemCov (const unsigned int waveIndexA, const unsigned int waveIndexB) const
 returns covariance matrix of spin density matrix element for pair of waves at index A and B
double intensity (const unsigned int waveIdx) const
 returns intensity of single wave at index
double intensityErr (const unsigned int waveIdx) const
 returns error of intensity of single wave at index
double intensity (const char *waveNamePattern) const
 returns intensity of sum of waves matching name pattern
double intensityErr (const char *waveNamePattern) const
 returns error of intensity of sum of waves matching name pattern
double intensity () const
 returns total intensity
double intensityErr () const
 returns error of total intensity
double phase (const unsigned int waveIndexA, const unsigned int waveIndexB) const
 returns phase difference between two waves at index A and B
double phaseErr (const unsigned int waveIndexA, const unsigned int waveIndexB) const
 returns error of phase difference between two waves at index A and B
double phase (const std::string waveNameA, const std::string waveNameB) const
double phaseErr (const std::string waveNameA, const std::string waveNameB) const
double coherence (const unsigned int waveIndexA, const unsigned int waveIndexB) const
 returns coherence of two waves at index A and B
double coherenceErr (const unsigned int waveIndexA, const unsigned int waveIndexB) const
 returns error of coherence of two waves at index A and B
double overlap (const unsigned int waveIndexA, const unsigned int waveIndexB) const
 returns overlap of two waves at index A and B
double overlapErr (const unsigned int waveIndexA, const unsigned int waveIndexB) const
 returns error of overlap of two waves at index A and B
const std::vector< TComplex > & prodAmps () const
const std::vector< std::string > & prodAmpNames () const
const std::vector< std::string > & waveNames () const
const TMatrixT< Double_t > & fitParCovMatrix () const
const std::vector< std::pair
< Int_t, Int_t > > & 
fitParCovIndices () const
const TCMatrixnormIntegralMatrix () const
const std::map< Int_t, Int_t > & normIntIndexMap () const
std::ostream & printProdAmpNames (std::ostream &out=std::cout) const
 prints all production amplitude names
std::ostream & printWaveNames (std::ostream &out=std::cout) const
 prints all wave names
std::ostream & printProdAmps (std::ostream &out=std::cout) const
 prints all production amplitudes and their covariance matrix
std::ostream & printWaves (std::ostream &out=std::cout) const
 prints all wave intensities and their errors
std::ostream & printAmpsGenPW (std::ostream &out=std::cout) const
 prints all amplitudes in format used for genpw (rank 1 only at the moment)
virtual std::ostream & print (std::ostream &out=std::cout) const
 dumps all raw data stored in object

Private Member Functions

int rankOfProdAmp (const unsigned int prodAmpIndex) const
 extracts rank of production amplitude from its name
std::complex< double > normIntegralForProdAmp (const unsigned int prodAmpIndexA, const unsigned int prodAmpIndexB) const
 finds wave indices for production amplitues A and B and returns the normalization integral of the two waves
std::vector< unsigned intwaveIndicesMatchingPattern (const std::string &waveNamePattern) const
 generates list of wave indices that match name pattern
std::vector< unsigned intprodAmpIndicesMatchingPattern (const std::string &prodAmpNamePattern) const
 generates list of production amplitude indices that match name pattern
std::vector< unsigned intprodAmpIndicesForWave (const unsigned int waveIdx) const
 returns indices of production amplitudes that belong to wave at index
std::vector< std::pair
< unsigned int, unsigned int > > 
prodAmpIndexPairsForWaves (const unsigned int waveIndexA, const unsigned int waveIndexB) const
 generates list of pairs of production amplitude indices of same rank for a pair of waves
double realValVariance (const unsigned int waveIndexA, const unsigned int waveIndexB, const TMatrixT< double > &jacobian) const
 calculates variance of a real-valued function of a spin density matrix element for wave A and wave B
TString wavetitle (int i) const
void buildWaveMap ()

Static Private Member Functions

static TMatrixT< double > matrixRepr (const std::complex< double > &c)
 returns matrix representation of complex number

Private Attributes

UInt_t _nmbEvents
 number of events in bin
UInt_t _normNmbEvents
 number of events to normalize to
Double_t _massBinCenter
 center value of mass bin
Double_t _logLikelihood
 log(likelihood) at maximum
Int_t _rank
 rank of fit
std::vector< TComplex > _prodAmps
 production amplitudes
std::vector< std::string > _prodAmpNames
 names of production amplitudes used in fit
std::vector< std::string > _waveNames
 names of waves used in fit
Bool_t _covMatrixValid
 indicates whether bin has a valid covariance matrix
TMatrixT< Double_t_fitParCovMatrix
 covariance matrix of fit parameters
std::vector< std::pair< Int_t,
Int_t > > 
_fitParCovMatrixIndices
 indices of fit parameters for real and imaginary part in covariance matrix matrix
TCMatrix _normIntegral
 normalization integral over full phase space without acceptance
std::map< Int_t, Int_t_normIntIndexMap
 maps production amplitude indices to indices in normalization integral
std::vector< double > _phaseSpaceIntegral
 diagonals of phase space integrals (without acceptance)
bool _converged
 indicates whether fit has converged (according to minimizer)
bool _hasHessian
 indicates whether Hessian matrix has been calculated successfully

Friends

std::ostream & operator<< (std::ostream &out, const fitResult &result)

Detailed Description

data storage class for PWA fit result of one kinematic bin

Definition at line 95 of file fitResult.h.

Constructor & Destructor Documentation

fitResult::fitResult ( )

Definition at line 60 of file fitResult.cc.

Referenced by cloneVar().

fitResult::fitResult ( const fitResult result)

Definition at line 102 of file fitResult.cc.

fitResult::fitResult ( const TFitBin fitBin)
fitResult::~fitResult ( )
virtual

Definition at line 142 of file fitResult.cc.

Member Function Documentation

void fitResult::buildWaveMap ( )
private

Definition at line 777 of file fitResult.cc.

References _normIntIndexMap, _prodAmpNames, _waveNames, i, n, prodAmpName(), and wavetitle().

fitResult * fitResult::cloneVar ( )

Definition at line 147 of file fitResult.cc.

References _fitParCovMatrix, _fitParCovMatrixIndices, _prodAmps, fitResult(), and Int_t.

Referenced by main().

double fitResult::coherence ( const unsigned int  waveIndexA,
const unsigned int  waveIndexB 
) const

returns coherence of two waves at index A and B

calculates coherence of wave A and wave B

Definition at line 510 of file fitResult.cc.

References spinDensityMatrixElem().

double fitResult::coherenceErr ( const unsigned int  waveIndexA,
const unsigned int  waveIndexB 
) const

returns error of coherence of two waves at index A and B

calculates error of coherence of wave A and wave B

Definition at line 522 of file fitResult.cc.

References _covMatrixValid, i, prodAmp(), prodAmpCov(), prodAmpIndicesForWave(), rankOfProdAmp(), and spinDensityMatrixElem().

bool rpwa::fitResult::converged ( ) const
inline

returns whether fit has converged (according to minimizer)

Definition at line 131 of file fitResult.h.

References _converged.

Referenced by MyMainFrame::PrintSelected().

bool rpwa::fitResult::covMatrixValid ( ) const
inline

Definition at line 164 of file fitResult.h.

References _covMatrixValid.

double fitResult::evidence ( ) const

returns the model evidence (OccamFactorMethod)

calculates the model evidence using Rafters occam factor method

\[ \ln P(\mathrm{Data}|M_k)\approx \ln P(\mathrm{Data}|A_{\mathrm{ML}}^k,M_k) + \ln{\frac{\sqrt{(2\pi)^d|\mathbf{C}_{A|D}|}}{\sum_i\frac{\pi}{\Psi_{ii}}}} \]

This uses a flat prior in each parameter (see note on Model Selection) such that no single wave can have more than the total intensity measured

Definition at line 193 of file fitResult.cc.

References _fitParCovMatrix, _nmbEvents, _normIntegral, d, i, intensity(), intensityErr(), logLikelihood(), TCMatrix::ncols(), and nmbWaves().

Referenced by rpwa::pwaPlotter::addFit().

void fitResult::fill ( const unsigned int  nmbEvents,
const unsigned int  normNmbEvents,
const double  massBinCenter,
const double  logLikelihood,
const int  rank,
const std::vector< std::complex< double > > &  prodAmps,
const std::vector< std::string > &  prodAmpNames,
const TMatrixT< double > &  fitParCovMatrix,
const std::vector< std::pair< int, int > > &  fitParCovMatrixIndices,
const TCMatrix normIntegral,
const std::vector< double > &  phaseSpaceIntegral,
const bool  converged,
const bool  hasHessian 
)

Definition at line 641 of file fitResult.cc.

References for(), i, TCMatrix::ncols(), and TCMatrix::nrows().

Referenced by main().

double fitResult::fitParameter ( const std::string &  parName) const

returns fit parameter value by parameter name

returns value of fit parameter with name

Definition at line 280 of file fitResult.cc.

References prodAmp(), and prodAmpIndex().

Referenced by main().

double rpwa::fitResult::fitParameterCov ( const unsigned int  parIndexA,
const unsigned int  parIndexB 
) const
inline

returns covariance of fit parameters at index A and B

Definition at line 149 of file fitResult.h.

References _fitParCovMatrix.

Referenced by prodAmpCov().

void rpwa::fitResult::fitParameters ( double *  parArray) const
inline

copies fit parameters into array

copies fit parameters into array; assumes that array has sufficient size

Definition at line 288 of file fitResult.h.

References _fitParCovMatrixIndices, i, nmbProdAmps(), and prodAmp().

const std::vector<std::pair<Int_t, Int_t> >& rpwa::fitResult::fitParCovIndices ( ) const
inline

Definition at line 214 of file fitResult.h.

References _fitParCovMatrixIndices.

const TMatrixT<Double_t>& rpwa::fitResult::fitParCovMatrix ( ) const
inline

Definition at line 213 of file fitResult.h.

References _fitParCovMatrix.

bool rpwa::fitResult::hasHessian ( ) const
inline

returns whether Hessian matrix has been calculated successfully

Definition at line 132 of file fitResult.h.

References _hasHessian.

Referenced by MyMainFrame::PrintSelected().

double rpwa::fitResult::intensity ( const unsigned int  waveIdx) const
inline

returns intensity of single wave at index

Definition at line 181 of file fitResult.h.

References spinDensityMatrixElem().

Referenced by rpwa::pwaPlotter::addFit(), main(), plotAllIntensities(), and MyMainFrame::PrintSelected().

double fitResult::intensity ( const char *  waveNamePattern) const

returns intensity of sum of waves matching name pattern

calculates intensity for set of waves matching name pattern

int = sum_i int(i) + sum_i sum_{j < i} overlap(i, j)

Definition at line 394 of file fitResult.cc.

References i, intensity(), overlap(), and waveIndicesMatchingPattern().

double rpwa::fitResult::intensity ( ) const
inline

returns total intensity

Definition at line 186 of file fitResult.h.

References intensity().

Referenced by evidence(), intensity(), and printWaves().

double rpwa::fitResult::intensityErr ( const unsigned int  waveIdx) const
inline

returns error of intensity of single wave at index

Definition at line 183 of file fitResult.h.

References spinDensityMatrixElemCov().

Referenced by rpwa::pwaPlotter::addFit(), main(), plotIsoFit(), and MyMainFrame::PrintSelected().

double fitResult::intensityErr ( const char *  waveNamePattern) const

returns error of intensity of sum of waves matching name pattern

calculates error of intensity of a set of waves matching name pattern

error calculation is performed on amplitude level using: int = sum_ij Norm_ij sum_r A_ir A_jr*

Definition at line 441 of file fitResult.cc.

References _covMatrixValid, i, normIntegralForProdAmp(), prodAmp(), prodAmpCov(), prodAmpIndicesMatchingPattern(), and rankOfProdAmp().

double rpwa::fitResult::intensityErr ( ) const
inline

returns error of total intensity

Definition at line 187 of file fitResult.h.

References intensityErr().

Referenced by evidence(), intensityErr(), and printWaves().

double rpwa::fitResult::logLikelihood ( ) const
inline

returns log(likelihood) at maximum

Definition at line 129 of file fitResult.h.

References _logLikelihood.

Referenced by rpwa::pwaPlotter::addFit(), and evidence().

double rpwa::fitResult::massBinCenter ( ) const
inline

returns center value of mass bin

Definition at line 128 of file fitResult.h.

References _massBinCenter.

Referenced by rpwa::pwaPlotter::addFit(), getPhaseSpace(), main(), plotIsoFit(), and MyMainFrame::PrintSelected().

TMatrixT< double > rpwa::fitResult::matrixRepr ( const std::complex< double > &  c)
inlinestaticprivate

returns matrix representation of complex number

c.re -c.im c.im c.re

Definition at line 469 of file fitResult.h.

Referenced by spinDensityMatrixElemCov().

unsigned int rpwa::fitResult::nmbEvents ( ) const
inline

returns number of events in bin

Definition at line 134 of file fitResult.h.

References _nmbEvents.

Referenced by rpwa::pwaPlotter::addFit().

unsigned int rpwa::fitResult::nmbProdAmps ( ) const
inline

returns number of production amplitudes

Definition at line 137 of file fitResult.h.

References _prodAmps.

Referenced by fitParameters(), printProdAmpNames(), printProdAmps(), prodAmpIndex(), and prodAmpIndicesMatchingPattern().

unsigned int rpwa::fitResult::nmbWaves ( ) const
inline

returns number of waves in fit

Definition at line 136 of file fitResult.h.

References _waveNames.

Referenced by evidence(), printWaveNames(), printWaves(), waveIndex(), and waveIndicesMatchingPattern().

std::complex< double > rpwa::fitResult::normIntegral ( const unsigned int  waveIndexA,
const unsigned int  waveIndexB 
) const
inline

returns normalization integral for pair of waves at index A and B

Definition at line 360 of file fitResult.h.

References _normIntegral.

Referenced by rpwa::pwaPlotter::addFit(), normIntegralForProdAmp(), overlap(), and overlapErr().

complex< double > fitResult::normIntegralForProdAmp ( const unsigned int  prodAmpIndexA,
const unsigned int  prodAmpIndexB 
) const
private

finds wave indices for production amplitues A and B and returns the normalization integral of the two waves

Definition at line 414 of file fitResult.cc.

References _normIntIndexMap, normIntegral(), and prodAmpName().

Referenced by intensityErr().

const TCMatrix& rpwa::fitResult::normIntegralMatrix ( ) const
inline

Definition at line 215 of file fitResult.h.

References _normIntegral.

const std::map<Int_t, Int_t>& rpwa::fitResult::normIntIndexMap ( ) const
inline

Definition at line 216 of file fitResult.h.

References _normIntIndexMap.

unsigned int rpwa::fitResult::normNmbEvents ( ) const
inline

returns number of events to normalize to

Definition at line 135 of file fitResult.h.

References _normNmbEvents.

double fitResult::overlap ( const unsigned int  waveIndexA,
const unsigned int  waveIndexB 
) const

returns overlap of two waves at index A and B

calculates overlap of wave A and wave B

Definition at line 592 of file fitResult.cc.

References normIntegral(), and spinDensityMatrixElem().

Referenced by intensity().

double fitResult::overlapErr ( const unsigned int  waveIndexA,
const unsigned int  waveIndexB 
) const

returns error of overlap of two waves at index A and B

calculates error of overlap of wave A and wave B

Definition at line 603 of file fitResult.cc.

References _covMatrixValid, normIntegral(), and realValVariance().

double fitResult::phase ( const unsigned int  waveIndexA,
const unsigned int  waveIndexB 
) const

returns phase difference between two waves at index A and B

calculates phase difference between wave A and wave B

Definition at line 475 of file fitResult.cc.

References spinDensityMatrixElem().

Referenced by rpwa::pwaPlotter::addFit(), main(), and MyMainFrame::PrintSelected().

double rpwa::fitResult::phase ( const std::string  waveNameA,
const std::string  waveNameB 
) const
inline

Definition at line 193 of file fitResult.h.

References phase(), and waveIndex().

Referenced by phase().

double fitResult::phaseErr ( const unsigned int  waveIndexA,
const unsigned int  waveIndexB 
) const

returns error of phase difference between two waves at index A and B

calculates error of phase difference between wave A and wave B

Definition at line 486 of file fitResult.cc.

References _covMatrixValid, realValVariance(), and spinDensityMatrixElem().

Referenced by rpwa::pwaPlotter::addFit(), main(), plotIsoFit(), and MyMainFrame::PrintSelected().

double rpwa::fitResult::phaseErr ( const std::string  waveNameA,
const std::string  waveNameB 
) const
inline

Definition at line 196 of file fitResult.h.

References phaseErr(), and waveIndex().

Referenced by phaseErr().

double rpwa::fitResult::phaseSpaceIntegral ( const unsigned int  waveIdx) const
inline

returns the sqrt(!) of the phase space integral for given wave

Definition at line 170 of file fitResult.h.

References _phaseSpaceIntegral.

Referenced by getPhaseSpace(), main(), and plotIsoFit().

double rpwa::fitResult::phaseSpaceIntegral ( const std::string &  waveName) const
inline

Definition at line 171 of file fitResult.h.

References _phaseSpaceIntegral, and waveIndex().

std::ostream & rpwa::fitResult::print ( std::ostream &  out = std::cout) const
inlinevirtual
std::ostream & rpwa::fitResult::printAmpsGenPW ( std::ostream &  out = std::cout) const
inline

prints all amplitudes in format used for genpw (rank 1 only at the moment)

Definition at line 424 of file fitResult.h.

References _waveNames, i, and prodAmp().

Referenced by main().

std::ostream & rpwa::fitResult::printProdAmpNames ( std::ostream &  out = std::cout) const
inline

prints all production amplitude names

Definition at line 371 of file fitResult.h.

References _prodAmpNames, i, and nmbProdAmps().

std::ostream & rpwa::fitResult::printProdAmps ( std::ostream &  out = std::cout) const
inline

prints all production amplitudes and their covariance matrix

Definition at line 395 of file fitResult.h.

References _prodAmpNames, i, nmbProdAmps(), prodAmp(), and prodAmpCov().

Referenced by print().

std::ostream & rpwa::fitResult::printWaveNames ( std::ostream &  out = std::cout) const
inline

prints all wave names

Definition at line 383 of file fitResult.h.

References _waveNames, i, and nmbWaves().

Referenced by print().

std::ostream & rpwa::fitResult::printWaves ( std::ostream &  out = std::cout) const
inline

prints all wave intensities and their errors

Definition at line 409 of file fitResult.h.

References _waveNames, i, intensity(), intensityErr(), and nmbWaves().

std::complex<double> rpwa::fitResult::prodAmp ( const unsigned int  prodAmpIdx) const
inline

returns production amplitude value at index

Definition at line 154 of file fitResult.h.

References _prodAmps.

Referenced by coherenceErr(), fitParameter(), fitParameters(), intensityErr(), plotIsoFit(), printAmpsGenPW(), printProdAmps(), spinDensityMatrixElem(), and spinDensityMatrixElemCov().

TMatrixT< double > rpwa::fitResult::prodAmpCov ( const unsigned int  prodAmpIdx) const
inline

returns covariance matrix for a set of production amplitudes given by index list

returns covariance matrix for a single production amplitude

returns covariance matrix of production amplitude value at index

Definition at line 303 of file fitResult.h.

References _fitParCovMatrix, _fitParCovMatrixIndices, and i.

Referenced by coherenceErr(), intensityErr(), plotIsoFit(), printProdAmps(), prodAmpCov(), and spinDensityMatrixElemCov().

TMatrixT< double > fitResult::prodAmpCov ( const std::vector< unsigned int > &  prodAmpIndices) const

returns covariance matrix for a set of production amplitudes given by a list of index pairs

constructs 2n x 2n covariance matrix of production amplitudes specified by index list

Definition at line 313 of file fitResult.cc.

References _covMatrixValid, _fitParCovMatrixIndices, fitParameterCov(), i, and prodAmpCov().

TMatrixT< double > rpwa::fitResult::prodAmpCov ( const std::vector< std::pair< unsigned int, unsigned int > > &  prodAmpIndexPairs) const
inline

returns covariance matrix for a set of production amplitudes given by index lists A and B

constructs covariance matrix for production amplitudes specified by index pair list

layout: cov(first, first) cov(first, second) cov(second, first) cov(second, second)

Definition at line 325 of file fitResult.h.

References i, and prodAmpCov().

TMatrixT< double > rpwa::fitResult::prodAmpCov ( const std::vector< unsigned int > &  prodAmpIndicesA,
const std::vector< unsigned int > &  prodAmpIndicesB 
) const
inline

constructs covariance matrix of production amplitudes specified by two index lists

layout: cov(A, A) cov(A, B) cov(B, A) cov(B, B)

Definition at line 345 of file fitResult.h.

References prodAmpCov().

int fitResult::prodAmpIndex ( const std::string &  prodAmpName) const

returns production amplitude index corresponding to production amplitude name

Definition at line 762 of file fitResult.cc.

References _prodAmpNames, i, and nmbProdAmps().

Referenced by fitParameter(), and plotIsoFit().

std::vector< std::pair< unsigned int, unsigned int > > rpwa::fitResult::prodAmpIndexPairsForWaves ( const unsigned int  waveIndexA,
const unsigned int  waveIndexB 
) const
inlineprivate

generates list of pairs of production amplitude indices of same rank for a pair of waves

Definition at line 532 of file fitResult.h.

References prodAmpIndicesForWave(), and rankOfProdAmp().

Referenced by spinDensityMatrixElem(), and spinDensityMatrixElemCov().

std::vector<unsigned int> rpwa::fitResult::prodAmpIndicesForWave ( const unsigned int  waveIdx) const
inlineprivate

returns indices of production amplitudes that belong to wave at index

Definition at line 258 of file fitResult.h.

References prodAmpIndicesMatchingPattern(), and waveNameEsc().

Referenced by coherenceErr(), and prodAmpIndexPairsForWaves().

std::vector< unsigned int > rpwa::fitResult::prodAmpIndicesMatchingPattern ( const std::string &  prodAmpNamePattern) const
inlineprivate

generates list of production amplitude indices that match name pattern

Definition at line 515 of file fitResult.h.

References nmbProdAmps(), and prodAmpName().

Referenced by intensityErr(), and prodAmpIndicesForWave().

TString rpwa::fitResult::prodAmpName ( const unsigned int  prodAmpIdx) const
inline

returns name of production amplitude at index

Definition at line 141 of file fitResult.h.

References _prodAmpNames.

Referenced by buildWaveMap(), normIntegralForProdAmp(), and prodAmpIndicesMatchingPattern().

TString rpwa::fitResult::prodAmpNameEsc ( const unsigned int  prodAmpIdx) const
inline

returns name of production amplitude at index with special regexp characters escaped

Definition at line 142 of file fitResult.h.

References _prodAmpNames, and rpwa::escapeRegExpSpecialChar().

const std::vector<std::string>& rpwa::fitResult::prodAmpNames ( ) const
inline

Definition at line 211 of file fitResult.h.

References _prodAmpNames.

Referenced by plotIsoFit().

const std::vector<TComplex>& rpwa::fitResult::prodAmps ( ) const
inline

Definition at line 210 of file fitResult.h.

References _prodAmps.

unsigned int rpwa::fitResult::rank ( ) const
inline

returns rank of fit

Definition at line 133 of file fitResult.h.

References _rank.

int rpwa::fitResult::rankOfProdAmp ( const unsigned int  prodAmpIndex) const
inlineprivate

extracts rank of production amplitude from its name

Definition at line 482 of file fitResult.h.

References _prodAmpNames.

Referenced by coherenceErr(), intensityErr(), and prodAmpIndexPairsForWaves().

double rpwa::fitResult::realValVariance ( const unsigned int  waveIndexA,
const unsigned int  waveIndexB,
const TMatrixT< double > &  jacobian 
) const
inlineprivate

calculates variance of a real-valued function of a spin density matrix element for wave A and wave B

Definition at line 558 of file fitResult.h.

Referenced by overlapErr(), and phaseErr().

void fitResult::reset ( )
complex< double > fitResult::spinDensityMatrixElem ( const unsigned int  waveIndexA,
const unsigned int  waveIndexB 
) const

returns spin density matrix element for pair of waves at index A and B

calculates spin density matrix element for waves A and B

\[ \rho_{AB} = \sum_r V_{Ar} V_{Br}^* \]

Definition at line 262 of file fitResult.cc.

References conj(), i, prodAmp(), and prodAmpIndexPairsForWaves().

Referenced by coherence(), coherenceErr(), intensity(), main(), overlap(), phase(), phaseErr(), and MyMainFrame::PrintSelected().

TMatrixT< double > fitResult::spinDensityMatrixElemCov ( const unsigned int  waveIndexA,
const unsigned int  waveIndexB 
) const

returns covariance matrix of spin density matrix element for pair of waves at index A and B

calculates covariance matrix of spin density matrix element for waves A and B

rho_AB = sum_r V_Ar V_Br^*

Definition at line 344 of file fitResult.cc.

References _covMatrixValid, conj(), i, M, matrixRepr(), prodAmp(), prodAmpCov(), and prodAmpIndexPairsForWaves().

Referenced by intensityErr(), main(), and MyMainFrame::PrintSelected().

int fitResult::waveIndex ( const std::string &  waveName) const

returns wave index corresponding to wave name

Definition at line 747 of file fitResult.cc.

References _waveNames, i, and nmbWaves().

Referenced by rpwa::pwaPlotter::addFit(), main(), phase(), phaseErr(), phaseSpaceIntegral(), plot4(), plotCoherence(), plotIntensity(), plotIsoFit(), plotPhase(), and MyMainFrame::PrintSelected().

std::vector< unsigned int > rpwa::fitResult::waveIndicesMatchingPattern ( const std::string &  waveNamePattern) const
inlineprivate

generates list of wave indices that match name pattern

Definition at line 496 of file fitResult.h.

References nmbWaves(), and waveName().

Referenced by intensity().

TString rpwa::fitResult::waveName ( const unsigned int  waveIdx) const
inline

returns name of wave at index

Definition at line 139 of file fitResult.h.

References _waveNames.

Referenced by plotCoherence(), plotIntensity(), plotPhase(), and waveIndicesMatchingPattern().

TString rpwa::fitResult::waveNameEsc ( const unsigned int  waveIdx) const
inline

returns name of wave at index with special regexp characters escaped

Definition at line 140 of file fitResult.h.

References _waveNames, and rpwa::escapeRegExpSpecialChar().

Referenced by prodAmpIndicesForWave().

const std::vector<std::string>& rpwa::fitResult::waveNames ( ) const
inline

Definition at line 212 of file fitResult.h.

References _waveNames.

Referenced by rpwa::pwaPlotter::addFit(), MyMainFrame::MyMainFrame(), and plotAllIntensities().

TString rpwa::fitResult::wavetitle ( int  i) const
inlineprivate

Definition at line 268 of file fitResult.h.

References _prodAmpNames, and i.

Referenced by buildWaveMap().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const fitResult result 
)
friend

Definition at line 225 of file fitResult.h.

Member Data Documentation

bool rpwa::fitResult::_converged
private

indicates whether fit has converged (according to minimizer)

Definition at line 244 of file fitResult.h.

Referenced by converged(), and reset().

Bool_t rpwa::fitResult::_covMatrixValid
private

indicates whether bin has a valid covariance matrix

Definition at line 238 of file fitResult.h.

Referenced by coherenceErr(), covMatrixValid(), intensityErr(), overlapErr(), phaseErr(), print(), prodAmpCov(), reset(), and spinDensityMatrixElemCov().

TMatrixT<Double_t> rpwa::fitResult::_fitParCovMatrix
private

covariance matrix of fit parameters

Definition at line 239 of file fitResult.h.

Referenced by cloneVar(), evidence(), fitParameterCov(), fitParCovMatrix(), print(), prodAmpCov(), and reset().

std::vector<std::pair<Int_t, Int_t> > rpwa::fitResult::_fitParCovMatrixIndices
private

indices of fit parameters for real and imaginary part in covariance matrix matrix

Definition at line 240 of file fitResult.h.

Referenced by cloneVar(), fitParameters(), fitParCovIndices(), print(), prodAmpCov(), and reset().

bool rpwa::fitResult::_hasHessian
private

indicates whether Hessian matrix has been calculated successfully

Definition at line 245 of file fitResult.h.

Referenced by hasHessian(), and reset().

Double_t rpwa::fitResult::_logLikelihood
private

log(likelihood) at maximum

Definition at line 233 of file fitResult.h.

Referenced by logLikelihood(), print(), and reset().

Double_t rpwa::fitResult::_massBinCenter
private

center value of mass bin

Definition at line 232 of file fitResult.h.

Referenced by massBinCenter(), print(), and reset().

UInt_t rpwa::fitResult::_nmbEvents
private

number of events in bin

Definition at line 230 of file fitResult.h.

Referenced by evidence(), nmbEvents(), print(), and reset().

TCMatrix rpwa::fitResult::_normIntegral
private

normalization integral over full phase space without acceptance

Definition at line 241 of file fitResult.h.

Referenced by evidence(), normIntegral(), normIntegralMatrix(), print(), and reset().

std::map<Int_t, Int_t> rpwa::fitResult::_normIntIndexMap
private

maps production amplitude indices to indices in normalization integral

Definition at line 242 of file fitResult.h.

Referenced by buildWaveMap(), normIntegralForProdAmp(), normIntIndexMap(), print(), and reset().

UInt_t rpwa::fitResult::_normNmbEvents
private

number of events to normalize to

Definition at line 231 of file fitResult.h.

Referenced by normNmbEvents(), print(), and reset().

std::vector<double> rpwa::fitResult::_phaseSpaceIntegral
private

diagonals of phase space integrals (without acceptance)

Definition at line 243 of file fitResult.h.

Referenced by phaseSpaceIntegral(), and reset().

std::vector<std::string> rpwa::fitResult::_prodAmpNames
private

names of production amplitudes used in fit

Definition at line 236 of file fitResult.h.

Referenced by buildWaveMap(), fitResult(), printProdAmpNames(), printProdAmps(), prodAmpIndex(), prodAmpName(), prodAmpNameEsc(), prodAmpNames(), rankOfProdAmp(), reset(), and wavetitle().

std::vector<TComplex> rpwa::fitResult::_prodAmps
private

production amplitudes

Definition at line 235 of file fitResult.h.

Referenced by cloneVar(), fitResult(), nmbProdAmps(), prodAmp(), prodAmps(), and reset().

Int_t rpwa::fitResult::_rank
private

rank of fit

Definition at line 234 of file fitResult.h.

Referenced by print(), rank(), and reset().

std::vector<std::string> rpwa::fitResult::_waveNames
private

names of waves used in fit

Definition at line 237 of file fitResult.h.

Referenced by buildWaveMap(), fitResult(), nmbWaves(), printAmpsGenPW(), printWaveNames(), printWaves(), reset(), waveIndex(), waveName(), waveNameEsc(), and waveNames().


The documentation for this class was generated from the following files: