GammaCombo  Rev:Unversioneddirectory
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
MethodAbsScan Class Reference

#include <MethodAbsScan.h>

Inheritance diagram for MethodAbsScan:
Inheritance graph
[legend]
Collaboration diagram for MethodAbsScan:
Collaboration graph
[legend]

Public Member Functions

virtual void calcCLintervals (int CLsType=0)
 Calculate the CL intervals from the CL curve. More...
 
void calcCLintervalsSimple (int CLsType=0)
 
virtual void checkCLs ()
 
void confirmSolutions ()
 Refit all possible solutions with the scan parameter left free to confirm the solutions. More...
 
void doInitialFit (bool force=false)
 Try to find global mininum of the PDF. More...
 
const vector< RooSlimFitResult * > & getAllResults ()
 
OptParsergetArg ()
 
const std::pair< double, double > getBorders (const TGraph &graph, const double confidence_level, bool qubic=false)
 determines the borders of the confidence interval by linear or qubic interpolation. More...
 
const std::pair< double, double > getBorders_CLs (const TGraph &graph, const double confidence_level, bool qubic=false)
 
float getChi2minBkg ()
 
float getChi2minGlobal ()
 
float getCL (double val)
 
CLInterval getCLinterval (int iSol=0, int sigma=1)
 Get the CL interval that includes the best-fit value. More...
 
CLInterval getCLintervalCentral (int sigma=1)
 Get the CL interval that includes the best-fit value. More...
 
CombinergetCombiner () const
 
const vector< RooSlimFitResult * > & getCurveResults ()
 
int getDrawSolution ()
 
bool getFilled ()
 
int getFillStyle ()
 
TH1F * getHchisq ()
 
TH2F * getHchisq2d ()
 
TH1F * getHCL ()
 
TH2F * getHCL2d ()
 
TH1F * getHCLs ()
 
TH2F * getHCLs2d ()
 
TH1F * getHCLsErr1Dn ()
 
TH1F * getHCLsErr1Up ()
 
TH1F * getHCLsErr2Dn ()
 
TH1F * getHCLsErr2Up ()
 
TH1F * getHCLsExp ()
 
TH1F * getHCLsFreq ()
 
int getLineColor ()
 
int getLineStyle ()
 
TString getMethodName () const
 
TString getName () const
 
int getNObservables ()
 
int getNPoints1d ()
 
int getNPoints2dx ()
 
int getNPoints2dy ()
 
const RooArgSet * getObservables ()
 
TString getObsName ()
 
TString getParsName ()
 
RooRealVar * getScanVar1 ()
 
TString getScanVar1Name ()
 
float getScanVar1Solution (int i=0)
 Get value of scan parameter 1 a certain solution. More...
 
RooRealVar * getScanVar2 ()
 
TString getScanVar2Name ()
 
float getScanVar2Solution (int i=0)
 Get value of scan parameter 2 a certain solution (only meaningful for 2d scan). More...
 
float getScanVarSolution (int iVar, int iSol)
 Get value of scan parameter at a certain solution. More...
 
RooSlimFitResultgetSolution (int i=0)
 Return a solution corresponding to a minimum of the profile likelihoood. More...
 
vector< RooSlimFitResult * > getSolutions ()
 
int getTextColor ()
 
const RooArgSet * getTheory ()
 
TString getTitle ()
 
RooWorkspace * getWorkspace ()
 
virtual void initScan ()
 
void loadParameters (RooSlimFitResult *r)
 Load the values given by an (external) fit result. More...
 
virtual bool loadScanner (TString fName="")
 Save a scanner from plots/scanner. More...
 
bool loadSolution (int i=0)
 Load the values at a specific minimum into the workspace. More...
 
 MethodAbsScan ()
 
 MethodAbsScan (Combiner *c)
 
 MethodAbsScan (OptParser *opt)
 
void plot1d (TString var)
 Make a 1d plot of the NLL in var. More...
 
void plot2d (TString varx, TString vary)
 Make a 2d plot of the PDF in varx and vary. More...
 
void plotOn (OneMinusClPlotAbs *plot, int CLsType=0)
 
void plotPulls (int nSolution=0)
 Make a pull plot of observables corresponding to the given solution. More...
 
virtual void print ()
 
void printCLintervals (int CLsType)
 Print CL intervals. More...
 
void printLocalMinima ()
 Print local minima solutions. More...
 
void saveLocalMinima (TString fName="")
 Save local minima solutions. More...
 
void saveScanner (TString fName="")
 Save this scanner to a root file placed into plots/scanner. More...
 
virtual int scan1d ()
 
virtual int scan2d ()
 
void setChi2minGlobal (double x)
 Set the global minimum manually. More...
 
void setDrawSolution (int code=0)
 
void setFilled (bool filled)
 
void setFillStyle (int c)
 
void setHchisq (TH1F *h)
 
void setHCL (TH1F *h)
 
void setLineColor (int c)
 
void setLineStyle (int c)
 
void setNPoints1d (int n)
 
void setNPoints2dx (int n)
 
void setNPoints2dy (int n)
 
void setPValueCorrector (PValueCorrection *pvalCor)
 
void setScanVar1 (TString var)
 
void setScanVar2 (TString var)
 
void setSolutions (vector< RooSlimFitResult *> s)
 Helper function to copy over solutions from another scanner. More...
 
void setTextColor (int c)
 
void setTitle (TString s)
 
void setVerbose (bool yesNo=true)
 
void setXscanRange (float min, float max)
 
void setYscanRange (float min, float max)
 
 ~MethodAbsScan ()
 

Public Attributes

vector< RooSlimFitResult * > allResults
 All fit results we encounter along the scan. More...
 
vector< CLIntervalclintervals1sigma
 all 1 sigma intervals that were found by calcCLintervals() More...
 
vector< CLIntervalclintervals2sigma
 all 2 sigma intervals that were found by calcCLintervals() More...
 
vector< CLIntervalclintervals3sigma
 all 3 sigma intervals that were found by calcCLintervals() More...
 
vector< RooSlimFitResult * > curveResults
 All fit results of the the points that make it into the 1-CL curve. More...
 
vector< vector< RooSlimFitResult * > > curveResults2d
 All fit results of the the points that make it into the 1-CL curve. More...
 
vector< RooSlimFitResult * > solutions
 Local minima filled by saveSolutions() and saveSolutions2d(). More...
 

Protected Member Functions

void sortSolutions ()
 Sort solutions in order of increasing chi2. More...
 

Protected Attributes

OptParserarg
 command line options More...
 
double chi2minBkg
 chi2 value at global minimum More...
 
double chi2minGlobal
 chi2 value at global minimum More...
 
bool chi2minGlobalFound
 flag to avoid finding minimum twice More...
 
Combinercombiner
 the combination More...
 
bool drawFilled
 choose if Histogram is drawn filled or not More...
 
int drawSolution
 Configure how to draw solutions on the plots. More...
 
int fillStyle
 
RooFitResult * globalMin
 parameter values at a global minimum More...
 
TH1F * hChi2min
 histogram for the chi2min values before Prob() More...
 
TH2F * hChi2min2d
 histogram for the chi2min values before Prob() More...
 
TH1F * hCL
 1-CL curve More...
 
TH2F * hCL2d
 1-CL curve More...
 
TH1F * hCLs
 1-CL curve More...
 
TH2F * hCLs2d
 1-CL curve More...
 
TH1F * hCLsErr1Dn
 1-CL curve More...
 
TH1F * hCLsErr1Up
 1-CL curve More...
 
TH1F * hCLsErr2Dn
 1-CL curve More...
 
TH1F * hCLsErr2Up
 1-CL curve More...
 
TH1F * hCLsExp
 1-CL curve More...
 
TH1F * hCLsFreq
 1-CL curve More...
 
int lineColor
 
int lineStyle
 
bool m_initialized
 true if initScan() was called More...
 
bool m_xrangeset
 true if the x range was set manually (setXscanRange()) More...
 
bool m_yrangeset
 true if the y range was set manually (setYscanRange()) More...
 
TString methodName
 Prob, ... More...
 
TString name
 basename, e.g. ggsz More...
 
int nPoints1d
 number of scan points used by 1d scan More...
 
int nPoints2dx
 number of scan points used by 2d scan, x axis More...
 
int nPoints2dy
 number of scan points used by 2d scan, y axis More...
 
int nWarnings
 number of warnings printed in getScanVarSolution() More...
 
RooDataSet * obsDataset
 save the nominal observables so we can restore them after we have fitted toys More...
 
TString obsName
 dataset name of observables, derived from name More...
 
TString parsName
 set name of physics parameters, derived from name More...
 
TString pdfName
 PDF name in workspace, derived from name. More...
 
PValueCorrectionpvalueCorrector
 
bool pvalueCorrectorSet
 
TRandom3 rndm
 
TString scanVar1
 scan parameter More...
 
TString scanVar2
 second scan parameter if we're scanning 2d More...
 
RooDataSet * startPars
 save the start parameter values before any scan More...
 
int textColor
 color used for plotted central values More...
 
TString thName
 set name of theory parameters, derived from name More...
 
TString title
 nice string for the legends More...
 
TString toysName
 set name of parameters to vary in toys More...
 
bool verbose
 
RooWorkspace * w
 

Private Member Functions

bool compareSolutions (RooSlimFitResult *r1, RooSlimFitResult *r2)
 Compare two solutions. More...
 
bool interpolate (TH1F *h, int i, float y, float central, bool upper, float &val, float &err)
 Find an interpolated x value near a certain bin position of a histogram that is the best estimate for h(x)=y. More...
 
void interpolateSimple (TH1F *h, int i, float y, float &val)
 Find an interpolated x value near a certain bin position of a histogram that is the best estimate for h(x)=y. More...
 
float pq (float p0, float p1, float p2, float y, int whichSol=0)
 Solve a quadratic equation by means of a modified pq formula:

\[x^2 + \frac{p_1}{p_2} x + \frac{p_0-y}{p2} = 0\]

. More...

 
void removeDuplicateSolutions ()
 Remove duplicate solutions from the common solutions storage ('solutions' vector). More...
 

Detailed Description

Definition at line 44 of file MethodAbsScan.h.

Constructor & Destructor Documentation

§ MethodAbsScan() [1/3]

MethodAbsScan::MethodAbsScan ( )

Definition at line 10 of file MethodAbsScan.cpp.

§ MethodAbsScan() [2/3]

MethodAbsScan::MethodAbsScan ( Combiner c)

Definition at line 18 of file MethodAbsScan.cpp.

§ MethodAbsScan() [3/3]

MethodAbsScan::MethodAbsScan ( OptParser opt)

Definition at line 41 of file MethodAbsScan.cpp.

§ ~MethodAbsScan()

MethodAbsScan::~MethodAbsScan ( )

Definition at line 84 of file MethodAbsScan.cpp.

Member Function Documentation

§ calcCLintervals()

void MethodAbsScan::calcCLintervals ( int  CLsType = 0)
virtual

Calculate the CL intervals from the CL curve.

Start from known local minima and scan upwards and downwards to find the interval boundaries. Then scan again from the boundaries of the scan range to cover the case where an CL interval is not closed yet at the boundary. Use a fit-based interpolation (interpolate()) if we have more than 25 bins, else revert to a straight line interpolation (interpolateSimple()).

< skip if p-value is too low at boundary

< skip if p-value is too low at boundary

Definition at line 624 of file MethodAbsScan.cpp.

§ calcCLintervalsSimple()

void MethodAbsScan::calcCLintervalsSimple ( int  CLsType = 0)
Todo:
: Do it properly from the very start by introducing a bkg model and propagate it to the entire framework.

TODO: I think this can now disappear

Definition at line 1447 of file MethodAbsScan.cpp.

§ checkCLs()

void MethodAbsScan::checkCLs ( )
virtual

Definition at line 1586 of file MethodAbsScan.cpp.

§ compareSolutions()

bool MethodAbsScan::compareSolutions ( RooSlimFitResult r1,
RooSlimFitResult r2 
)
private

Compare two solutions.

Parameters
r1First solution
r2Second solution
Returns
true, if both are equal inside a certain margin

Definition at line 1353 of file MethodAbsScan.cpp.

§ confirmSolutions()

void MethodAbsScan::confirmSolutions ( )

Refit all possible solutions with the scan parameter left free to confirm the solutions.

We will reject solutions as fake if the free fit using them as the starting point will move too far away. Or, if their Delta chi2 value is above 25.

Definition at line 1195 of file MethodAbsScan.cpp.

§ doInitialFit()

void MethodAbsScan::doInitialFit ( bool  force = false)

Try to find global mininum of the PDF.

Despite its name this often finds a local minimum. It's merely used as a starting point. When the scans stumbles upon a better minimum, we'll keep that one.

Resets parameters to the values they had at function call. Save the RooFitResult of the global minimum (or whatever minimum it found...) into the globalMin member.

Parameters
forceIf set to true it fits again, even it the fit was already run before.

< fix observables

< physics parameters need to be floating to find global minimum

Definition at line 118 of file MethodAbsScan.cpp.

§ getAllResults()

const vector<RooSlimFitResult*>& MethodAbsScan::getAllResults ( )
inline

Definition at line 56 of file MethodAbsScan.h.

§ getArg()

OptParser* MethodAbsScan::getArg ( )
inline

Definition at line 55 of file MethodAbsScan.h.

§ getBorders()

const std::pair< double, double > MethodAbsScan::getBorders ( const TGraph &  graph,
const double  confidence_level,
bool  qubic = false 
)

determines the borders of the confidence interval by linear or qubic interpolation.

Parameters
graphThe graph holding the p-values.
confidence_levelThe confidence level at which the interval is to be determined.
qubicOptional parameter. False by default. If true, qubic interpolation is used.

Definition at line 1515 of file MethodAbsScan.cpp.

§ getBorders_CLs()

const std::pair< double, double > MethodAbsScan::getBorders_CLs ( const TGraph &  graph,
const double  confidence_level,
bool  qubic = false 
)

Definition at line 1552 of file MethodAbsScan.cpp.

§ getChi2minBkg()

float MethodAbsScan::getChi2minBkg ( )
inline

Definition at line 59 of file MethodAbsScan.h.

§ getChi2minGlobal()

float MethodAbsScan::getChi2minGlobal ( )
inline

Definition at line 58 of file MethodAbsScan.h.

§ getCL()

float MethodAbsScan::getCL ( double  val)

Definition at line 922 of file MethodAbsScan.cpp.

§ getCLinterval()

CLInterval MethodAbsScan::getCLinterval ( int  iSol = 0,
int  sigma = 1 
)

Get the CL interval that includes the best-fit value.

Parameters
sigma1,2

Definition at line 879 of file MethodAbsScan.cpp.

§ getCLintervalCentral()

CLInterval MethodAbsScan::getCLintervalCentral ( int  sigma = 1)

Get the CL interval that includes the best-fit value.

Parameters
sigma1,2

Definition at line 870 of file MethodAbsScan.cpp.

§ getCombiner()

Combiner* MethodAbsScan::getCombiner ( ) const
inline

Definition at line 63 of file MethodAbsScan.h.

§ getCurveResults()

const vector<RooSlimFitResult*>& MethodAbsScan::getCurveResults ( )
inline

Definition at line 57 of file MethodAbsScan.h.

§ getDrawSolution()

int MethodAbsScan::getDrawSolution ( )

Definition at line 1407 of file MethodAbsScan.cpp.

§ getFilled()

bool MethodAbsScan::getFilled ( )
inline

Definition at line 65 of file MethodAbsScan.h.

§ getFillStyle()

int MethodAbsScan::getFillStyle ( )
inline

Definition at line 80 of file MethodAbsScan.h.

§ getHchisq()

TH1F* MethodAbsScan::getHchisq ( )
inline

Definition at line 76 of file MethodAbsScan.h.

§ getHchisq2d()

TH2F* MethodAbsScan::getHchisq2d ( )
inline

Definition at line 77 of file MethodAbsScan.h.

§ getHCL()

TH1F* MethodAbsScan::getHCL ( )
inline

Definition at line 66 of file MethodAbsScan.h.

§ getHCL2d()

TH2F* MethodAbsScan::getHCL2d ( )
inline

Definition at line 74 of file MethodAbsScan.h.

§ getHCLs()

TH1F* MethodAbsScan::getHCLs ( )
inline

Definition at line 67 of file MethodAbsScan.h.

§ getHCLs2d()

TH2F* MethodAbsScan::getHCLs2d ( )
inline

Definition at line 75 of file MethodAbsScan.h.

§ getHCLsErr1Dn()

TH1F* MethodAbsScan::getHCLsErr1Dn ( )
inline

Definition at line 71 of file MethodAbsScan.h.

§ getHCLsErr1Up()

TH1F* MethodAbsScan::getHCLsErr1Up ( )
inline

Definition at line 70 of file MethodAbsScan.h.

§ getHCLsErr2Dn()

TH1F* MethodAbsScan::getHCLsErr2Dn ( )
inline

Definition at line 73 of file MethodAbsScan.h.

§ getHCLsErr2Up()

TH1F* MethodAbsScan::getHCLsErr2Up ( )
inline

Definition at line 72 of file MethodAbsScan.h.

§ getHCLsExp()

TH1F* MethodAbsScan::getHCLsExp ( )
inline

Definition at line 69 of file MethodAbsScan.h.

§ getHCLsFreq()

TH1F* MethodAbsScan::getHCLsFreq ( )
inline

Definition at line 68 of file MethodAbsScan.h.

§ getLineColor()

int MethodAbsScan::getLineColor ( )
inline

Definition at line 78 of file MethodAbsScan.h.

§ getLineStyle()

int MethodAbsScan::getLineStyle ( )
inline

Definition at line 79 of file MethodAbsScan.h.

§ getMethodName()

TString MethodAbsScan::getMethodName ( ) const
inline

Definition at line 81 of file MethodAbsScan.h.

§ getName()

TString MethodAbsScan::getName ( ) const
inline

Definition at line 82 of file MethodAbsScan.h.

§ getNObservables()

int MethodAbsScan::getNObservables ( )
inline

Definition at line 83 of file MethodAbsScan.h.

§ getNPoints1d()

int MethodAbsScan::getNPoints1d ( )
inline

Definition at line 84 of file MethodAbsScan.h.

§ getNPoints2dx()

int MethodAbsScan::getNPoints2dx ( )
inline

Definition at line 85 of file MethodAbsScan.h.

§ getNPoints2dy()

int MethodAbsScan::getNPoints2dy ( )
inline

Definition at line 86 of file MethodAbsScan.h.

§ getObservables()

const RooArgSet* MethodAbsScan::getObservables ( )
inline

Definition at line 87 of file MethodAbsScan.h.

§ getObsName()

TString MethodAbsScan::getObsName ( )
inline

Definition at line 88 of file MethodAbsScan.h.

§ getParsName()

TString MethodAbsScan::getParsName ( )
inline

Definition at line 89 of file MethodAbsScan.h.

§ getScanVar1()

RooRealVar * MethodAbsScan::getScanVar1 ( )

Definition at line 934 of file MethodAbsScan.cpp.

§ getScanVar1Name()

TString MethodAbsScan::getScanVar1Name ( )

Definition at line 939 of file MethodAbsScan.cpp.

§ getScanVar1Solution()

float MethodAbsScan::getScanVar1Solution ( int  iSol = 0)

Get value of scan parameter 1 a certain solution.

Parameters
iSolIndex of solution. 0 corresponds to the best one, indices increase in order of chi2.

Definition at line 1148 of file MethodAbsScan.cpp.

§ getScanVar2()

RooRealVar * MethodAbsScan::getScanVar2 ( )

Definition at line 944 of file MethodAbsScan.cpp.

§ getScanVar2Name()

TString MethodAbsScan::getScanVar2Name ( )

Definition at line 949 of file MethodAbsScan.cpp.

§ getScanVar2Solution()

float MethodAbsScan::getScanVar2Solution ( int  iSol = 0)

Get value of scan parameter 2 a certain solution (only meaningful for 2d scan).

Parameters
iSolIndex of solution. 0 corresponds to the best one, indices increase in order of chi2.

Definition at line 1159 of file MethodAbsScan.cpp.

§ getScanVarSolution()

float MethodAbsScan::getScanVarSolution ( int  iVar,
int  iSol 
)

Get value of scan parameter at a certain solution.

Parameters
iVar- Index of scan variable, 1 or 2.
iSol- Index of solution. 0 corresponds to the best one, indices increase in order of chi2.
Returns
central value of the solution
-999 no solutions available
-99 solution not found
-9999 no such variable

Definition at line 1115 of file MethodAbsScan.cpp.

§ getSolution()

RooSlimFitResult * MethodAbsScan::getSolution ( int  i = 0)

Return a solution corresponding to a minimum of the profile likelihoood.

Parameters
iIndex of the solution, they are orderd after increasing chi2, i=0 is that with the smallest chi2.

Definition at line 1384 of file MethodAbsScan.cpp.

§ getSolutions()

vector<RooSlimFitResult*> MethodAbsScan::getSolutions ( )
inline

Definition at line 97 of file MethodAbsScan.h.

§ getTextColor()

int MethodAbsScan::getTextColor ( )
inline

Definition at line 100 of file MethodAbsScan.h.

§ getTheory()

const RooArgSet* MethodAbsScan::getTheory ( )
inline

Definition at line 99 of file MethodAbsScan.h.

§ getTitle()

TString MethodAbsScan::getTitle ( )
inline

Definition at line 101 of file MethodAbsScan.h.

§ getWorkspace()

RooWorkspace* MethodAbsScan::getWorkspace ( )
inline

Definition at line 102 of file MethodAbsScan.h.

§ initScan()

void MethodAbsScan::initScan ( )
virtual

Reimplemented in MethodDatasetsPluginScan, and MethodDatasetsProbScan.

Definition at line 201 of file MethodAbsScan.cpp.

§ interpolate()

bool MethodAbsScan::interpolate ( TH1F *  h,
int  i,
float  y,
float  central,
bool  upper,
float &  val,
float &  err 
)
private

Find an interpolated x value near a certain bin position of a histogram that is the best estimate for h(x)=y.

Interpolates by means of fitting a second grade polynomial to up to five adjacent points. Because that's giving us two solutions, we use the central value and knowledge about if it is supposed to be an upper or lower boundary to pick one.

Parameters
h- the histogram to be interpolated
i- interpolate around this bin. Must be a bin such that i and i+1 are above and below val
y- the y position we want to find the interpolated x for
central- Central value of the solution we're trying to get the CL interval for.
upper- Set to true if we're computing an upper interval boundary.
val- Return value: interpolated x position
err- Return value: estimated interpolation error
Returns
true, if inpterpolation was performed, false, if conditions were not met

Definition at line 516 of file MethodAbsScan.cpp.

§ interpolateSimple()

void MethodAbsScan::interpolateSimple ( TH1F *  h,
int  i,
float  y,
float &  val 
)
private

Find an interpolated x value near a certain bin position of a histogram that is the best estimate for h(x)=y.

Interpolates by means of a straight line between two known points.

Parameters
hthe histogram to be interpolated
iinterpolate around this bin. Must be a bin such that i and i+1 are above and below val
ythe y position we want to find the interpolated x for
valReturn value: interpolated x position

Definition at line 480 of file MethodAbsScan.cpp.

§ loadParameters()

void MethodAbsScan::loadParameters ( RooSlimFitResult r)

Load the values given by an (external) fit result.

Definition at line 1052 of file MethodAbsScan.cpp.

§ loadScanner()

bool MethodAbsScan::loadScanner ( TString  fName = "")
virtual

Save a scanner from plots/scanner.

It contains the 1-CL histograms and the solutions.

Reimplemented in MethodCoverageScan, and MethodDatasetsProbScan.

Definition at line 332 of file MethodAbsScan.cpp.

§ loadSolution()

bool MethodAbsScan::loadSolution ( int  i = 0)

Load the values at a specific minimum into the workspace.

This way we can use it for goodness of fit, start points, etc.

Parameters
iIndex of the solution, i=0 corresponds to the best one.

Definition at line 1034 of file MethodAbsScan.cpp.

§ plot1d()

void MethodAbsScan::plot1d ( TString  var)

Make a 1d plot of the NLL in var.

Definition at line 965 of file MethodAbsScan.cpp.

§ plot2d()

void MethodAbsScan::plot2d ( TString  varx,
TString  vary 
)

Make a 2d plot of the PDF in varx and vary.

Definition at line 994 of file MethodAbsScan.cpp.

§ plotOn()

void MethodAbsScan::plotOn ( OneMinusClPlotAbs plot,
int  CLsType = 0 
)

Definition at line 928 of file MethodAbsScan.cpp.

§ plotPulls()

void MethodAbsScan::plotPulls ( int  nSolution = 0)

Make a pull plot of observables corresponding to the given solution.

Definition at line 1416 of file MethodAbsScan.cpp.

§ pq()

float MethodAbsScan::pq ( float  p0,
float  p1,
float  p2,
float  y,
int  whichSol = 0 
)
private

Solve a quadratic equation by means of a modified pq formula:

\[x^2 + \frac{p_1}{p_2} x + \frac{p_0-y}{p2} = 0\]

.

Definition at line 495 of file MethodAbsScan.cpp.

§ print()

void MethodAbsScan::print ( )
virtual

Reimplemented in MethodDatasetsPluginScan, and MethodDatasetsProbScan.

Definition at line 955 of file MethodAbsScan.cpp.

§ printCLintervals()

void MethodAbsScan::printCLintervals ( int  CLsType)

Print CL intervals.

Definition at line 837 of file MethodAbsScan.cpp.

§ printLocalMinima()

void MethodAbsScan::printLocalMinima ( )

Print local minima solutions.

Definition at line 1065 of file MethodAbsScan.cpp.

§ removeDuplicateSolutions()

void MethodAbsScan::removeDuplicateSolutions ( )
private

Remove duplicate solutions from the common solutions storage ('solutions' vector).

Duplicate solutions can occur when two unconfirmed solutions converge to the same true local minimum when refitted by confirmSolutions().

No solutions will be removed if –qh 9 is given.

Todo:
upgrade the quickhack to a proper option

Definition at line 1321 of file MethodAbsScan.cpp.

§ saveLocalMinima()

void MethodAbsScan::saveLocalMinima ( TString  fName = "")

Save local minima solutions.

Definition at line 1084 of file MethodAbsScan.cpp.

§ saveScanner()

void MethodAbsScan::saveScanner ( TString  fName = "")

Save this scanner to a root file placed into plots/scanner.

It contains the 1-CL histograms and the solutions.

Definition at line 296 of file MethodAbsScan.cpp.

§ scan1d()

int MethodAbsScan::scan1d ( )
virtual

Definition at line 458 of file MethodAbsScan.cpp.

§ scan2d()

int MethodAbsScan::scan2d ( )
virtual

Reimplemented in MethodProbScan, and MethodDatasetsProbScan.

Definition at line 465 of file MethodAbsScan.cpp.

§ setChi2minGlobal()

void MethodAbsScan::setChi2minGlobal ( double  x)

Set the global minimum manually.

Definition at line 194 of file MethodAbsScan.cpp.

§ setDrawSolution()

void MethodAbsScan::setDrawSolution ( int  code = 0)
inline

Definition at line 118 of file MethodAbsScan.h.

§ setFilled()

void MethodAbsScan::setFilled ( bool  filled)
inline

Definition at line 125 of file MethodAbsScan.h.

§ setFillStyle()

void MethodAbsScan::setFillStyle ( int  c)
inline

Definition at line 129 of file MethodAbsScan.h.

§ setHchisq()

void MethodAbsScan::setHchisq ( TH1F *  h)
inline

Definition at line 135 of file MethodAbsScan.h.

§ setHCL()

void MethodAbsScan::setHCL ( TH1F *  h)
inline

Definition at line 134 of file MethodAbsScan.h.

§ setLineColor()

void MethodAbsScan::setLineColor ( int  c)
inline

Definition at line 126 of file MethodAbsScan.h.

§ setLineStyle()

void MethodAbsScan::setLineStyle ( int  c)
inline

Definition at line 127 of file MethodAbsScan.h.

§ setNPoints1d()

void MethodAbsScan::setNPoints1d ( int  n)
inline

Definition at line 122 of file MethodAbsScan.h.

§ setNPoints2dx()

void MethodAbsScan::setNPoints2dx ( int  n)
inline

Definition at line 123 of file MethodAbsScan.h.

§ setNPoints2dy()

void MethodAbsScan::setNPoints2dy ( int  n)
inline

Definition at line 124 of file MethodAbsScan.h.

§ setPValueCorrector()

void MethodAbsScan::setPValueCorrector ( PValueCorrection pvalCor)
inline

Definition at line 119 of file MethodAbsScan.h.

§ setScanVar1()

void MethodAbsScan::setScanVar1 ( TString  var)
inline

Definition at line 120 of file MethodAbsScan.h.

§ setScanVar2()

void MethodAbsScan::setScanVar2 ( TString  var)
inline

Definition at line 121 of file MethodAbsScan.h.

§ setSolutions()

void MethodAbsScan::setSolutions ( vector< RooSlimFitResult *>  s)

Helper function to copy over solutions from another scanner.

Clears the solutions vector and sets the one given.

Definition at line 1398 of file MethodAbsScan.cpp.

§ setTextColor()

void MethodAbsScan::setTextColor ( int  c)
inline

Definition at line 128 of file MethodAbsScan.h.

§ setTitle()

void MethodAbsScan::setTitle ( TString  s)
inline

Definition at line 130 of file MethodAbsScan.h.

§ setVerbose()

void MethodAbsScan::setVerbose ( bool  yesNo = true)
inline

Definition at line 133 of file MethodAbsScan.h.

§ setXscanRange()

void MethodAbsScan::setXscanRange ( float  min,
float  max 
)

Definition at line 1423 of file MethodAbsScan.cpp.

§ setYscanRange()

void MethodAbsScan::setYscanRange ( float  min,
float  max 
)

Definition at line 1434 of file MethodAbsScan.cpp.

§ sortSolutions()

void MethodAbsScan::sortSolutions ( )
protected

Sort solutions in order of increasing chi2.

Definition at line 1167 of file MethodAbsScan.cpp.

Member Data Documentation

§ allResults

vector<RooSlimFitResult*> MethodAbsScan::allResults

All fit results we encounter along the scan.

Definition at line 143 of file MethodAbsScan.h.

§ arg

OptParser* MethodAbsScan::arg
protected

command line options

Definition at line 204 of file MethodAbsScan.h.

§ chi2minBkg

double MethodAbsScan::chi2minBkg
protected

chi2 value at global minimum

Definition at line 192 of file MethodAbsScan.h.

§ chi2minGlobal

double MethodAbsScan::chi2minGlobal
protected

chi2 value at global minimum

Definition at line 191 of file MethodAbsScan.h.

§ chi2minGlobalFound

bool MethodAbsScan::chi2minGlobalFound
protected

flag to avoid finding minimum twice

Definition at line 193 of file MethodAbsScan.h.

§ clintervals1sigma

vector<CLInterval> MethodAbsScan::clintervals1sigma

all 1 sigma intervals that were found by calcCLintervals()

Definition at line 149 of file MethodAbsScan.h.

§ clintervals2sigma

vector<CLInterval> MethodAbsScan::clintervals2sigma

all 2 sigma intervals that were found by calcCLintervals()

Definition at line 150 of file MethodAbsScan.h.

§ clintervals3sigma

vector<CLInterval> MethodAbsScan::clintervals3sigma

all 3 sigma intervals that were found by calcCLintervals()

Definition at line 151 of file MethodAbsScan.h.

§ combiner

Combiner* MethodAbsScan::combiner
protected

the combination

Definition at line 205 of file MethodAbsScan.h.

§ curveResults

vector<RooSlimFitResult*> MethodAbsScan::curveResults

All fit results of the the points that make it into the 1-CL curve.

Index is the bin number of hCL bins -1.

Definition at line 144 of file MethodAbsScan.h.

§ curveResults2d

vector<vector<RooSlimFitResult*> > MethodAbsScan::curveResults2d

All fit results of the the points that make it into the 1-CL curve.

Index is the gobal bin number of hCL2d -1.

Definition at line 146 of file MethodAbsScan.h.

§ drawFilled

bool MethodAbsScan::drawFilled
protected

choose if Histogram is drawn filled or not

Definition at line 198 of file MethodAbsScan.h.

§ drawSolution

int MethodAbsScan::drawSolution
protected

Configure how to draw solutions on the plots.

0=don't plot, 1=plot at central value (1d) or markers (2d) Default is taken from arg, unless disabled by setDrawSolution().

Definition at line 199 of file MethodAbsScan.h.

§ fillStyle

int MethodAbsScan::fillStyle
protected

Definition at line 197 of file MethodAbsScan.h.

§ globalMin

RooFitResult* MethodAbsScan::globalMin
protected

parameter values at a global minimum

Definition at line 178 of file MethodAbsScan.h.

§ hChi2min

TH1F* MethodAbsScan::hChi2min
protected

histogram for the chi2min values before Prob()

Definition at line 189 of file MethodAbsScan.h.

§ hChi2min2d

TH2F* MethodAbsScan::hChi2min2d
protected

histogram for the chi2min values before Prob()

Definition at line 190 of file MethodAbsScan.h.

§ hCL

TH1F* MethodAbsScan::hCL
protected

1-CL curve

Definition at line 179 of file MethodAbsScan.h.

§ hCL2d

TH2F* MethodAbsScan::hCL2d
protected

1-CL curve

Definition at line 187 of file MethodAbsScan.h.

§ hCLs

TH1F* MethodAbsScan::hCLs
protected

1-CL curve

Definition at line 180 of file MethodAbsScan.h.

§ hCLs2d

TH2F* MethodAbsScan::hCLs2d
protected

1-CL curve

Definition at line 188 of file MethodAbsScan.h.

§ hCLsErr1Dn

TH1F* MethodAbsScan::hCLsErr1Dn
protected

1-CL curve

Definition at line 184 of file MethodAbsScan.h.

§ hCLsErr1Up

TH1F* MethodAbsScan::hCLsErr1Up
protected

1-CL curve

Definition at line 183 of file MethodAbsScan.h.

§ hCLsErr2Dn

TH1F* MethodAbsScan::hCLsErr2Dn
protected

1-CL curve

Definition at line 186 of file MethodAbsScan.h.

§ hCLsErr2Up

TH1F* MethodAbsScan::hCLsErr2Up
protected

1-CL curve

Definition at line 185 of file MethodAbsScan.h.

§ hCLsExp

TH1F* MethodAbsScan::hCLsExp
protected

1-CL curve

Definition at line 182 of file MethodAbsScan.h.

§ hCLsFreq

TH1F* MethodAbsScan::hCLsFreq
protected

1-CL curve

Definition at line 181 of file MethodAbsScan.h.

§ lineColor

int MethodAbsScan::lineColor
protected

Definition at line 194 of file MethodAbsScan.h.

§ lineStyle

int MethodAbsScan::lineStyle
protected

Definition at line 196 of file MethodAbsScan.h.

§ m_initialized

bool MethodAbsScan::m_initialized
protected

true if initScan() was called

Definition at line 208 of file MethodAbsScan.h.

§ m_xrangeset

bool MethodAbsScan::m_xrangeset
protected

true if the x range was set manually (setXscanRange())

Definition at line 206 of file MethodAbsScan.h.

§ m_yrangeset

bool MethodAbsScan::m_yrangeset
protected

true if the y range was set manually (setYscanRange())

Definition at line 207 of file MethodAbsScan.h.

§ methodName

TString MethodAbsScan::methodName
protected

Prob, ...

Definition at line 159 of file MethodAbsScan.h.

§ name

TString MethodAbsScan::name
protected

basename, e.g. ggsz

Definition at line 157 of file MethodAbsScan.h.

§ nPoints1d

int MethodAbsScan::nPoints1d
protected

number of scan points used by 1d scan

Definition at line 167 of file MethodAbsScan.h.

§ nPoints2dx

int MethodAbsScan::nPoints2dx
protected

number of scan points used by 2d scan, x axis

Definition at line 168 of file MethodAbsScan.h.

§ nPoints2dy

int MethodAbsScan::nPoints2dy
protected

number of scan points used by 2d scan, y axis

Definition at line 169 of file MethodAbsScan.h.

§ nWarnings

int MethodAbsScan::nWarnings
protected

number of warnings printed in getScanVarSolution()

Definition at line 203 of file MethodAbsScan.h.

§ obsDataset

RooDataSet* MethodAbsScan::obsDataset
protected

save the nominal observables so we can restore them after we have fitted toys

Definition at line 176 of file MethodAbsScan.h.

§ obsName

TString MethodAbsScan::obsName
protected

dataset name of observables, derived from name

Definition at line 161 of file MethodAbsScan.h.

§ parsName

TString MethodAbsScan::parsName
protected

set name of physics parameters, derived from name

Definition at line 162 of file MethodAbsScan.h.

§ pdfName

TString MethodAbsScan::pdfName
protected

PDF name in workspace, derived from name.

Definition at line 160 of file MethodAbsScan.h.

§ pvalueCorrector

PValueCorrection* MethodAbsScan::pvalueCorrector
protected

Definition at line 171 of file MethodAbsScan.h.

§ pvalueCorrectorSet

bool MethodAbsScan::pvalueCorrectorSet
protected

Definition at line 172 of file MethodAbsScan.h.

§ rndm

TRandom3 MethodAbsScan::rndm
protected

Definition at line 174 of file MethodAbsScan.h.

§ scanVar1

TString MethodAbsScan::scanVar1
protected

scan parameter

Definition at line 165 of file MethodAbsScan.h.

§ scanVar2

TString MethodAbsScan::scanVar2
protected

second scan parameter if we're scanning 2d

Definition at line 166 of file MethodAbsScan.h.

§ solutions

vector<RooSlimFitResult*> MethodAbsScan::solutions

Local minima filled by saveSolutions() and saveSolutions2d().

Definition at line 148 of file MethodAbsScan.h.

§ startPars

RooDataSet* MethodAbsScan::startPars
protected

save the start parameter values before any scan

Definition at line 177 of file MethodAbsScan.h.

§ textColor

int MethodAbsScan::textColor
protected

color used for plotted central values

Definition at line 195 of file MethodAbsScan.h.

§ thName

TString MethodAbsScan::thName
protected

set name of theory parameters, derived from name

Definition at line 163 of file MethodAbsScan.h.

§ title

TString MethodAbsScan::title
protected

nice string for the legends

Definition at line 158 of file MethodAbsScan.h.

§ toysName

TString MethodAbsScan::toysName
protected

set name of parameters to vary in toys

Definition at line 164 of file MethodAbsScan.h.

§ verbose

bool MethodAbsScan::verbose
protected

Definition at line 202 of file MethodAbsScan.h.

§ w

RooWorkspace* MethodAbsScan::w
protected

Definition at line 175 of file MethodAbsScan.h.


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