GammaCombo  Rev:Unversioneddirectory
Public Member Functions | Public Attributes | List of all members
Fitter Class Reference

#include <Fitter.h>

Collaboration diagram for Fitter:
Collaboration graph
[legend]

Public Member Functions

void fit ()
 Run the fit. More...
 
void fitForce ()
 Force minimum finding. More...
 
void fitImprove ()
 
void fitOnce ()
 
 Fitter (OptParser *arg, RooWorkspace *w, TString name)
 
void fitTwice ()
 Perform two fits, each time using different start parameters, retain the smallest chi2. More...
 
float getChi2 ()
 Returns minimum chi2 value obtained by fit(). More...
 
int getStatus ()
 Check the fit result. More...
 
void print ()
 
void setStartpars (const RooArgSet *pars)
 
void setStartparsFirstFit (const RooArgSet *pars)
 
void setStartparsSecondFit (const RooArgSet *pars)
 
 ~Fitter ()
 

Public Attributes

OptParserarg
 command line arguments More...
 
TString name
 Name of the pdf. Call combine() first. More...
 
int nFit1Best
 counter, how many times did fit 1 of fitTwice() give smaller chi2 More...
 
int nFit2Best
 counter, how many times did fit 2 of fitTwice() give smaller chi2 More...
 
TString obsName
 dataset name of observables More...
 
TString parsName
 set name of physics parameters More...
 
TString pdfName
 PDF name in workspace, derived from name. More...
 
RooArgSet const * startparsFirstFit
 start parameters to be used by all fit routines that run one fit, and by the first fit of fitTwice() More...
 
RooArgSet const * startparsSecondFit
 start parameters to be used by the second fit of fitTwice() More...
 
RooFitResult * theResult
 the final result More...
 
RooWorkspace * w
 holds all input pdfs, parameters, and observables, as well as the combination More...
 

Detailed Description

Definition at line 18 of file Fitter.h.

Constructor & Destructor Documentation

§ Fitter()

Fitter::Fitter ( OptParser arg,
RooWorkspace *  w,
TString  name 
)

Definition at line 3 of file Fitter.cpp.

§ ~Fitter()

Fitter::~Fitter ( )

Definition at line 19 of file Fitter.cpp.

Member Function Documentation

§ fit()

void Fitter::fit ( )

Run the fit.

Select a fit method here.

Definition at line 112 of file Fitter.cpp.

§ fitForce()

void Fitter::fitForce ( )

Force minimum finding.

Will use the start parameters set by setStartparsFirstFit().

Definition at line 77 of file Fitter.cpp.

§ fitImprove()

void Fitter::fitImprove ( )

§ fitOnce()

void Fitter::fitOnce ( )

§ fitTwice()

void Fitter::fitTwice ( )

Perform two fits, each time using different start parameters, retain the smallest chi2.

Note: To debug the start paramter issues, remember that fitToMinBringBackAngles() may perform a second fit, which then uses the start parameters of the first. This will show up in the RooFitResult.

Definition at line 29 of file Fitter.cpp.

§ getChi2()

float Fitter::getChi2 ( )

Returns minimum chi2 value obtained by fit().

Returns
min chi2; 1e6 if fit wasn't performed yet

< else we have many entries at -1e27 in the ToyTree

Definition at line 88 of file Fitter.cpp.

§ getStatus()

int Fitter::getStatus ( )

Check the fit result.

We require a good covariance matrix and a reasonable EDM for a status "ok".

Returns
Status code: 0=ok, 1=error, -1=fit() didn't run

Definition at line 100 of file Fitter.cpp.

§ print()

void Fitter::print ( )

Definition at line 119 of file Fitter.cpp.

§ setStartpars()

void Fitter::setStartpars ( const RooArgSet *  pars)
inline

Definition at line 33 of file Fitter.h.

§ setStartparsFirstFit()

void Fitter::setStartparsFirstFit ( const RooArgSet *  pars)
inline

Definition at line 34 of file Fitter.h.

§ setStartparsSecondFit()

void Fitter::setStartparsSecondFit ( const RooArgSet *  pars)
inline

Definition at line 35 of file Fitter.h.

Member Data Documentation

§ arg

OptParser* Fitter::arg

command line arguments

Definition at line 35 of file Fitter.h.

§ name

TString Fitter::name

Name of the pdf. Call combine() first.

Definition at line 39 of file Fitter.h.

§ nFit1Best

int Fitter::nFit1Best

counter, how many times did fit 1 of fitTwice() give smaller chi2

Definition at line 42 of file Fitter.h.

§ nFit2Best

int Fitter::nFit2Best

counter, how many times did fit 2 of fitTwice() give smaller chi2

Definition at line 43 of file Fitter.h.

§ obsName

TString Fitter::obsName

dataset name of observables

Definition at line 45 of file Fitter.h.

§ parsName

TString Fitter::parsName

set name of physics parameters

Definition at line 46 of file Fitter.h.

§ pdfName

TString Fitter::pdfName

PDF name in workspace, derived from name.

Definition at line 44 of file Fitter.h.

§ startparsFirstFit

RooArgSet const* Fitter::startparsFirstFit

start parameters to be used by all fit routines that run one fit, and by the first fit of fitTwice()

Definition at line 40 of file Fitter.h.

§ startparsSecondFit

RooArgSet const* Fitter::startparsSecondFit

start parameters to be used by the second fit of fitTwice()

Definition at line 41 of file Fitter.h.

§ theResult

RooFitResult* Fitter::theResult

the final result

Definition at line 47 of file Fitter.h.

§ w

RooWorkspace* Fitter::w

holds all input pdfs, parameters, and observables, as well as the combination

Definition at line 38 of file Fitter.h.


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