GammaCombo  Rev:Unversioneddirectory
Classes | Enumerations | Functions | Variables
Utils Namespace Reference

Classes

struct  FixPar
 
struct  RangePar
 

Enumerations

enum  config {
  year2014, babar, babar2007, babar2008,
  babar2010, babar2012, babar_dpi0, babar_dg,
  belle, belle2005cleo2009, belle2006, belle2007,
  belle2009, belle2012, belle2012preliminary, belle2013,
  belle2014, belle2013cleo2014, belle_dpi0, belle_dg,
  belle_md, belle_1ab, belle_5ab, belle_50ab,
  belle2_1ab, belle2_5ab, belle2_50ab, belle2_1ab_had,
  belle2_5ab_had, belle2_50ab_had, belle2_1ab_sl, belle2_5ab_sl,
  belle2_50ab_sl, belle2_1ab_WA, belle2_5ab_WA, belle2_50ab_WA,
  belle2_1ab_Dstar, belle2_5ab_Dstar, belle2_50ab_Dstar, belle2_1ab_D,
  belle2_5ab_D, belle2_50ab_D, belle2_1ab_tagged, belle2_5ab_tagged,
  belle2_50ab_tagged, belle2_1ab_untagged, belle2_5ab_untagged, belle2_50ab_untagged,
  cdf, cdf2007, cdf2012, cdf2013,
  check, ckm2014, ckm2015, cleo,
  cleo2001, cleo2009, cleo2012, cleo2014,
  cleo2015, cleo2016, cleoFullDP, combos2008,
  combpipi, default_config, excludeKdDdK3pi, exclusive2014,
  inclusive2014, focus2000, hfag, hfagFP2014,
  hfagLP2011, hfagCHARM2015, hfagCKM2016, highrb,
  highstattoy, lhcb, lhcb_WA, lhcb_md,
  lhcb_mi, lhcb2011, lhcb2012, lhcb2013,
  lhcb2013KK, lhcb2013pipi, lhcb2013preliminary, lhcb2014,
  lhcb2018KK_extrap, lhcb_upgrade_extrap, lhcbphis, lhcbcomb,
  lhcb_old, lhcb_pipi, lhcb_kk, lhcb_3fb,
  lhcb_10fb, lhcb_22fb, lhcb_50fb, lhcb_3fb_WA,
  lhcb_10fb_WA, lhcb_22fb_WA, lumi40pb, lumi1fb,
  lumi1fbConfcFit, lumi1fbConfsFit, lumi1fbNoAfav, lumi1fbPapercFit,
  lumi1fbPapercFitExpected, lumi1fbPapersFit, lumi1fbSystCor, lumi1fbprompt,
  lumi1fbsl, lumi2fb, lumi3fb, lumi3fbCPVA,
  lumi3fbFix, lumi3fbFullDP, lumi3fbPaper, lumi3fbDKstz,
  lumi3fb_estimate, lumi5ab, lumi5fb, lumi9fb,
  lumi50ab, lumi50fb, lambda1_3fb, lambdafree_3fb,
  manual, milc_update, none, nophicorr,
  onlyGsDGs, pdg, sneha, SM_prediction,
  statonly, test, test1, test2,
  test3, test4, test5, test6,
  test7, test8, test9, toy,
  truth, useBicubic, useCartCoords, useGaussian,
  useHistogram, useParametric, usePolarCoords, useTradObs,
  ut2014, world_average, zero
}
 
enum  histogramType { kChi2, kPvalue }
 

Functions

double angularDifference (double angle1, double angle2)
 Compute the difference between 2 angles. More...
 
void assertFileExists (TString strFilename)
 
double bringBackAngle (double angle)
 Return an equivalent angle between 0 and 2pi. More...
 
void buildCorMatrix (TMatrixDSym &cor)
 Build a full correlation matrix by filling diagonal elements with unity and symmetrizing. More...
 
TMatrixDSym * buildCovMatrix (TMatrixDSym &cor, float *err)
 Build a covariance matrix from a correlation matrix and error vectors. More...
 
TMatrixDSym * buildCovMatrix (TMatrixDSym &cor, vector< double > &err)
 Build a covariance matrix from a correlation matrix and error vectors. More...
 
int calcNsubdigits (double value, int sigdigits=2)
 Compute number of digits needed behind the decimal point to achieve a certain number of significant digits. More...
 
bool checkBoundary (const RooSlimFitResult &r, std::vector< TString > lowProb, std::vector< TString > highProb)
 searches for unphysical values in a fit result, fills problematic var names in vectors returns true if everything is within boundaries More...
 
std::vector< double > computeNormalQuantiles (std::vector< double > &values, int nsigma)
 
TString ConfigToTString (config c)
 Gamma Combination Author: Till Moritz Karbach, morit.nosp@m.z.ka.nosp@m.rbach.nosp@m.@cer.nosp@m.n.ch Date: June 2014. More...
 
TTree * convertRooDatasetToTTree (RooDataSet *d)
 Converts a RooDataSet to a TTree which then can be browsed. More...
 
TGraph * convertTH1ToTGraph (TH1 *h, bool withErrors=false)
 Converts a TH1* to a TGraph* doesn't take responsibilty for ownership. More...
 
double DegToRad (double deg)
 
void dump_map (const std::map< int, std::vector< int > > &map)
 Debug tools: print the content of a 2d map to stdout. More...
 
void dump_matrix (const std::vector< std::vector< int > > &l)
 
void dump_vector (const std::vector< int > &l)
 Debug tools: print the content of a vector to stdout. More...
 
void dump_vector (const std::vector< float > &l)
 
bool FileExists (TString strFilename)
 
void fillArgList (RooArgList *list, RooWorkspace *w, std::vector< TString > names)
 function filling a RooArgList with parameters within a Workspace parameter names given by an vector with TStrings More...
 
RooFitResult * fitToMin (RooAbsPdf *pdf, bool thorough, int printLevel)
 Fit PDF to minimum. More...
 
RooFitResult * fitToMinBringBackAngles (RooAbsPdf *pdf, bool thorough, int printLevel)
 Fit a pdf to the minimum, but keep angular parameters in a range of [0,2pi]. More...
 
RooFitResult * fitToMinForce (RooWorkspace *w, TString name, TString forceVariables="")
 Find the global minimum in a more thorough way. More...
 
RooFitResult * fitToMinImprove (RooWorkspace *w, TString name)
 Fit to the minimum using an improve method. More...
 
void fixParameters (const RooAbsCollection *set)
 
void fixParameters (RooWorkspace *w, TString parname)
 Fix each parameter in the named set "parname" inside workspace "w". More...
 
void floatParameters (const RooAbsCollection *set)
 
void floatParameters (RooWorkspace *w, TString parname)
 Float each parameter in the named set "parname" inside workspace "w". More...
 
double getChi2 (RooAbsPdf *pdf)
 
void getParameters (const RooFitResult &result, std::vector< TString > &names)
 Fills vector with floating pars names. More...
 
std::vector< TString > getParsWithName (const TString &subString, const RooArgSet &set)
 finds a variable within a RooArgSet with a specific name sub-string return all variables containing the sub-string in a std::vector More...
 
TString getUniqueRootName ()
 
void HFAGLabel (const TString &label="please set label", Double_t xpos=0, Double_t ypos=0, Double_t scale=1)
 
TH1F * histHardCopy (const TH1F *h, bool copyContent=true, bool uniqueName=true)
 Creates a fresh, independent copy of the input histogram. More...
 
TH2F * histHardCopy (const TH2F *h, bool copyContent=true, bool uniqueName=true)
 Creates a fresh, independent copy of the input histogram. More...
 
bool isAngle (RooRealVar *v)
 Check if a RooRealVar is an angle. More...
 
template<class T >
bool isIn (vector< T > vec, T var)
 
bool isPosDef (TMatrixDSym *c)
 Check if a matrix is positive definite. More...
 
double Max (double v1, double v2)
 
void mergeNamedSets (RooWorkspace *w, TString mergedSet, TString set1, TString set2)
 Merge two named sets of variables inside a RooWorkspace. More...
 
TCanvas * newNoWarnTCanvas (TString name="NoWarnTCanvas", TString title="NoWarnTCanvas", int width=800, int height=600)
 
TCanvas * newNoWarnTCanvas (TString name, TString title, int x, int y, int width, int height)
 
double RadToDeg (double rad)
 
void randomizeParameters (RooWorkspace *w, TString setname)
 
void randomizeParametersGaussian (RooWorkspace *w, TString setname, RooSlimFitResult *r)
 
void randomizeParametersUniform (RooWorkspace *w, TString setname, RooSlimFitResult *r, double sigmaRange)
 
float Round (double value, int digits)
 Round a number to a certain number of decimal points. More...
 
void savePlot (TCanvas *c1, TString name)
 
void setLimit (RooRealVar *v, TString limitname)
 Load a named parameter range for a certain parameter. More...
 
void setLimit (RooWorkspace *w, TString parname, TString limitname)
 Load a named parameter range for a certain parameter, which is found inside a workspace. More...
 
void setLimit (const RooAbsCollection *set, TString limitname)
 Load a named parameter range for a list of parameters. More...
 
void setParameters (const RooAbsCollection *setMe, const RooAbsCollection *values)
 Set each parameter in setMe to the value found in values. More...
 
void setParameters (RooWorkspace *w, TString parname, const RooAbsCollection *set)
 Set each parameter in the named set parname inside workspace w to the value found in set. More...
 
void setParameters (RooWorkspace *w, TString parname, RooFitResult *r, bool constAndFloat=false)
 Set each parameter in the named set parname inside workspace w to the value found in the final set of floating (or floating and constant) fit parameters in r. More...
 
void setParameters (RooWorkspace *w, TString parname, RooSlimFitResult *r, bool constAndFloat=false)
 
void setParameters (RooWorkspace *w, TString parname, RooDataSet *d)
 Set each parameter in the named set parname inside workspace w to the value found in the first row of the provided dataset. More...
 
void setParameters (RooWorkspace *w, RooFitResult *values)
 Set each parameter in workspace to the values found in the fit result. More...
 
void setParametersFloating (const RooAbsCollection *setMe, const RooAbsCollection *values)
 Set each floating parameter in setMe to the value found in values. More...
 
void setParametersFloating (RooWorkspace *w, TString parname, const RooAbsCollection *set)
 Set each floating parameter in the named set parname inside workspace w to the value found in set. More...
 
void setParametersFloating (RooWorkspace *w, TString parname, RooFitResult *r)
 Set each floating parameter in the named set parname inside workspace w to the value found in the final set of floating fit parameters in r. More...
 
void setParametersFloating (RooWorkspace *w, TString parname, RooDataSet *d)
 Set each floating parameter in the named set parname inside workspace w to the value found in the first row of the provided dataset. More...
 
void setParametersFloating (RooWorkspace *w, std::vector< TString > names)
 
void setParametersFloating (RooWorkspace *w, std::vector< TString > names, std::vector< TString > names2)
 
void setParsConstToBound (RooWorkspace *w, std::vector< TString > names, bool low)
 
void setParsConstToBound (RooWorkspace *w, std::vector< TString > namesLow, std::vector< TString > namesHigh)
 
TGraph * smoothGraph (TGraph *g, int option=0)
 Smooths a graph. More...
 
TGraph * smoothHist (TH1 *h, int option=0)
 
double sq (double x)
 
std::vector< std::vector< int > > transpose (std::vector< std::vector< int > > &v)
 
config TStringToConfig (TString s)
 

Variables

int countAllFitBringBackAngle
 counts how many times fitBringBackAngle() was called More...
 
int countFitBringBackAngle
 counts how many times an angle needed to be brought back More...
 

Enumeration Type Documentation

§ config

Enumerator
year2014 
babar 
babar2007 
babar2008 
babar2010 
babar2012 
babar_dpi0 
babar_dg 
belle 
belle2005cleo2009 
belle2006 
belle2007 
belle2009 
belle2012 
belle2012preliminary 
belle2013 
belle2014 
belle2013cleo2014 
belle_dpi0 
belle_dg 
belle_md 
belle_1ab 
belle_5ab 
belle_50ab 
belle2_1ab 
belle2_5ab 
belle2_50ab 
belle2_1ab_had 
belle2_5ab_had 
belle2_50ab_had 
belle2_1ab_sl 
belle2_5ab_sl 
belle2_50ab_sl 
belle2_1ab_WA 
belle2_5ab_WA 
belle2_50ab_WA 
belle2_1ab_Dstar 
belle2_5ab_Dstar 
belle2_50ab_Dstar 
belle2_1ab_D 
belle2_5ab_D 
belle2_50ab_D 
belle2_1ab_tagged 
belle2_5ab_tagged 
belle2_50ab_tagged 
belle2_1ab_untagged 
belle2_5ab_untagged 
belle2_50ab_untagged 
cdf 
cdf2007 
cdf2012 
cdf2013 
check 
ckm2014 
ckm2015 
cleo 
cleo2001 
cleo2009 
cleo2012 
cleo2014 
cleo2015 
cleo2016 
cleoFullDP 
combos2008 
combpipi 
default_config 
excludeKdDdK3pi 
exclusive2014 
inclusive2014 
focus2000 
hfag 
hfagFP2014 
hfagLP2011 
hfagCHARM2015 
hfagCKM2016 
highrb 
highstattoy 
lhcb 
lhcb_WA 
lhcb_md 
lhcb_mi 
lhcb2011 
lhcb2012 
lhcb2013 
lhcb2013KK 
lhcb2013pipi 
lhcb2013preliminary 
lhcb2014 
lhcb2018KK_extrap 
lhcb_upgrade_extrap 
lhcbphis 
lhcbcomb 
lhcb_old 
lhcb_pipi 
lhcb_kk 
lhcb_3fb 
lhcb_10fb 
lhcb_22fb 
lhcb_50fb 
lhcb_3fb_WA 
lhcb_10fb_WA 
lhcb_22fb_WA 
lumi40pb 
lumi1fb 
lumi1fbConfcFit 
lumi1fbConfsFit 
lumi1fbNoAfav 
lumi1fbPapercFit 
lumi1fbPapercFitExpected 
lumi1fbPapersFit 
lumi1fbSystCor 
lumi1fbprompt 
lumi1fbsl 
lumi2fb 
lumi3fb 
lumi3fbCPVA 
lumi3fbFix 
lumi3fbFullDP 
lumi3fbPaper 
lumi3fbDKstz 
lumi3fb_estimate 
lumi5ab 
lumi5fb 
lumi9fb 
lumi50ab 
lumi50fb 
lambda1_3fb 
lambdafree_3fb 
manual 
milc_update 
none 
nophicorr 
onlyGsDGs 
pdg 
sneha 
SM_prediction 
statonly 
test 
test1 
test2 
test3 
test4 
test5 
test6 
test7 
test8 
test9 
toy 
truth 
useBicubic 
useCartCoords 
useGaussian 
useHistogram 
useParametric 
usePolarCoords 
useTradObs 
ut2014 
world_average 
zero 

Definition at line 22 of file UtilsConfig.h.

§ histogramType

Enumerator
kChi2 
kPvalue 

Definition at line 65 of file Utils.h.

Function Documentation

§ angularDifference()

double Utils::angularDifference ( double  angle1,
double  angle2 
)

Compute the difference between 2 angles.

This will never be larger than pi because they wrap around!

Parameters
angle1- first angle
angle2- second angle
Returns
difference

Definition at line 83 of file Utils.cpp.

§ assertFileExists()

void Utils::assertFileExists ( TString  strFilename)

Definition at line 1247 of file Utils.cpp.

§ bringBackAngle()

double Utils::bringBackAngle ( double  angle)

Return an equivalent angle between 0 and 2pi.

Parameters
angleAngle that is possibly smaller than 0 or larger than 2pi.

Definition at line 68 of file Utils.cpp.

§ buildCorMatrix()

void Utils::buildCorMatrix ( TMatrixDSym &  cor)

Build a full correlation matrix by filling diagonal elements with unity and symmetrizing.

Definition at line 706 of file Utils.cpp.

§ buildCovMatrix() [1/2]

TMatrixDSym * Utils::buildCovMatrix ( TMatrixDSym &  cor,
float *  err 
)

Build a covariance matrix from a correlation matrix and error vectors.

Definition at line 727 of file Utils.cpp.

§ buildCovMatrix() [2/2]

TMatrixDSym * Utils::buildCovMatrix ( TMatrixDSym &  cor,
vector< double > &  err 
)

Build a covariance matrix from a correlation matrix and error vectors.

Definition at line 743 of file Utils.cpp.

§ calcNsubdigits()

int Utils::calcNsubdigits ( double  value,
int  sigdigits = 2 
)

Compute number of digits needed behind the decimal point to achieve a certain number of significant digits.

The result can be used in the printf() function. Examples: 23.243: returns 0 with sigdigits=2 2.2634: returns 1 with sigdigits=2

Definition at line 846 of file Utils.cpp.

§ checkBoundary()

bool Utils::checkBoundary ( const RooSlimFitResult r,
std::vector< TString >  lowProb,
std::vector< TString >  highProb 
)

searches for unphysical values in a fit result, fills problematic var names in vectors returns true if everything is within boundaries

Definition at line 1058 of file Utils.cpp.

§ computeNormalQuantiles()

std::vector< double > Utils::computeNormalQuantiles ( std::vector< double > &  values,
int  nsigma 
)

Definition at line 1254 of file Utils.cpp.

§ ConfigToTString()

TString Utils::ConfigToTString ( config  s)

Gamma Combination Author: Till Moritz Karbach, morit.nosp@m.z.ka.nosp@m.rbach.nosp@m.@cer.nosp@m.n.ch Date: June 2014.

Definition at line 10 of file UtilsConfig.cpp.

§ convertRooDatasetToTTree()

TTree * Utils::convertRooDatasetToTTree ( RooDataSet *  d)

Converts a RooDataSet to a TTree which then can be browsed.

< the proxy variables

Definition at line 875 of file Utils.cpp.

§ convertTH1ToTGraph()

TGraph * Utils::convertTH1ToTGraph ( TH1 *  h,
bool  withErrors = false 
)

Converts a TH1* to a TGraph* doesn't take responsibilty for ownership.

Definition at line 904 of file Utils.cpp.

§ DegToRad()

double Utils::DegToRad ( double  deg)
inline

Definition at line 68 of file Utils.h.

§ dump_map()

void Utils::dump_map ( const std::map< int, std::vector< int > > &  map)

Debug tools: print the content of a 2d map to stdout.

Definition at line 1126 of file Utils.cpp.

§ dump_matrix()

void Utils::dump_matrix ( const std::vector< std::vector< int > > &  l)

Definition at line 1114 of file Utils.cpp.

§ dump_vector() [1/2]

void Utils::dump_vector ( const std::vector< int > &  l)

Debug tools: print the content of a vector to stdout.

Definition at line 1104 of file Utils.cpp.

§ dump_vector() [2/2]

void Utils::dump_vector ( const std::vector< float > &  l)

Definition at line 1109 of file Utils.cpp.

§ FileExists()

bool Utils::FileExists ( TString  strFilename)

Definition at line 793 of file Utils.cpp.

§ fillArgList()

void Utils::fillArgList ( RooArgList *  list,
RooWorkspace *  w,
std::vector< TString >  names 
)

function filling a RooArgList with parameters within a Workspace parameter names given by an vector with TStrings

Definition at line 1017 of file Utils.cpp.

§ fitToMin()

RooFitResult * Utils::fitToMin ( RooAbsPdf *  pdf,
bool  thorough,
int  printLevel 
)

Fit PDF to minimum.

Parameters
pdfThe PDF.
thoroughActivate Hesse and Minos
printLevel-1 = no output, 1 verbose output

Definition at line 19 of file Utils.cpp.

§ fitToMinBringBackAngles()

RooFitResult * Utils::fitToMinBringBackAngles ( RooAbsPdf *  pdf,
bool  thorough,
int  printLevel 
)

Fit a pdf to the minimum, but keep angular parameters in a range of [0,2pi].

If after an initial fit, a parameter has walked outside this interval, add multiples of 2pi to bring it back. Then, refit. All variables that have unit 'rad' are taken to be angles.

Definition at line 98 of file Utils.cpp.

§ fitToMinForce()

RooFitResult * Utils::fitToMinForce ( RooWorkspace *  w,
TString  name,
TString  forceVariables = "" 
)

Find the global minimum in a more thorough way.

First fit with external start parameters, then for each parameter that starts with "d" or "r" (typically angles and ratios):

  • at upper scan range, rest at start parameters
  • at lower scan range, rest at start parameters This amounts to a maximum of 1+2^n fits, where n is the number of parameters to be varied.
Parameters
wWorkspace holding the pdf.
nameName of the pdf without leading "pdf_".
forceVariablesApply the force method for these variables only. Format "var1,var2,var3," (list must end with comma). Default is to apply for all angles, all ratios except rD_k3pi and rD_kpi, and the k3pi coherence factor.

< use these variables

< don't use these

Definition at line 138 of file Utils.cpp.

§ fitToMinImprove()

RooFitResult * Utils::fitToMinImprove ( RooWorkspace *  w,
TString  name 
)

Fit to the minimum using an improve method.

The idea is to kill known minima. For this, we add a multivariate Gaussian to the chi2 at the position of the minimum. Ideally it should be a parabola shaped function, but the Gaussian is readily available. A true parabola like in the original IMPROVE algorithm doesn't work because apparently it affects the other regions of the chi2 too much. There are two parameters to tune: the width of the Gaussian, which is controlled by the error definition of the first fit, and the height of the Gaussian, which is set to 16 (=4 sigma). Three fits are performed: 1) initial fit, 2) fit with improved FCN, 3) fit of the non-improved FCN using the result from step 2 as the start parameters. So far it is only available for the Prob method, via the probimprove command line flag.

< define 2 sigma errors. This will make the hesse PDF 2 sigma wide!

Definition at line 270 of file Utils.cpp.

§ fixParameters() [1/2]

void Utils::fixParameters ( const RooAbsCollection *  set)

Definition at line 630 of file Utils.cpp.

§ fixParameters() [2/2]

void Utils::fixParameters ( RooWorkspace *  w,
TString  parname 
)

Fix each parameter in the named set "parname" inside workspace "w".

Definition at line 625 of file Utils.cpp.

§ floatParameters() [1/2]

void Utils::floatParameters ( const RooAbsCollection *  set)

Definition at line 649 of file Utils.cpp.

§ floatParameters() [2/2]

void Utils::floatParameters ( RooWorkspace *  w,
TString  parname 
)

Float each parameter in the named set "parname" inside workspace "w".

Definition at line 641 of file Utils.cpp.

§ getChi2()

double Utils::getChi2 ( RooAbsPdf *  pdf)

Definition at line 408 of file Utils.cpp.

§ getParameters()

void Utils::getParameters ( const RooFitResult &  result,
std::vector< TString > &  names 
)

Fills vector with floating pars names.

Definition at line 1029 of file Utils.cpp.

§ getParsWithName()

std::vector< TString > Utils::getParsWithName ( const TString &  subString,
const RooArgSet &  set 
)

finds a variable within a RooArgSet with a specific name sub-string return all variables containing the sub-string in a std::vector

Definition at line 1041 of file Utils.cpp.

§ getUniqueRootName()

TString Utils::getUniqueRootName ( )
inline

Definition at line 122 of file Utils.h.

§ HFAGLabel()

void Utils::HFAGLabel ( const TString &  label = "please set label",
Double_t  xpos = 0,
Double_t  ypos = 0,
Double_t  scale = 1 
)

Definition at line 1181 of file Utils.cpp.

§ histHardCopy() [1/2]

TH1F * Utils::histHardCopy ( const TH1F *  h,
bool  copyContent = true,
bool  uniqueName = true 
)

Creates a fresh, independent copy of the input histogram.

We cannot use Root's Clone() or the like, because that crap always copies Draw options and whatnot.

Parameters
h- the input histogram
copyContent- true: also copy content. false: initialize with zeroes
uniqueName- true: append a unique string to the histogram name
Returns
a new histogram. Caller assumes ownership.

Definition at line 950 of file Utils.cpp.

§ histHardCopy() [2/2]

TH2F * Utils::histHardCopy ( const TH2F *  h,
bool  copyContent = true,
bool  uniqueName = true 
)

Creates a fresh, independent copy of the input histogram.

2d version of TH1F* Utils::histHardCopy().

Definition at line 969 of file Utils.cpp.

§ isAngle()

bool Utils::isAngle ( RooRealVar *  v)

Check if a RooRealVar is an angle.

Definition at line 1008 of file Utils.cpp.

§ isIn()

template<class T >
bool Utils::isIn ( vector< T >  vec,
var 
)
inline

Definition at line 119 of file Utils.h.

§ isPosDef()

bool Utils::isPosDef ( TMatrixDSym *  c)

Check if a matrix is positive definite.

Definition at line 991 of file Utils.cpp.

§ Max()

double Utils::Max ( double  v1,
double  v2 
)
inline

Definition at line 69 of file Utils.h.

§ mergeNamedSets()

void Utils::mergeNamedSets ( RooWorkspace *  w,
TString  mergedSet,
TString  set1,
TString  set2 
)

Merge two named sets of variables inside a RooWorkspace.

Duplicate variables will only be contained once.

Definition at line 758 of file Utils.cpp.

§ newNoWarnTCanvas() [1/2]

TCanvas * Utils::newNoWarnTCanvas ( TString  name = "NoWarnTCanvas",
TString  title = "NoWarnTCanvas",
int  width = 800,
int  height = 600 
)

Definition at line 1165 of file Utils.cpp.

§ newNoWarnTCanvas() [2/2]

TCanvas * Utils::newNoWarnTCanvas ( TString  name,
TString  title,
int  x,
int  y,
int  width,
int  height 
)

Definition at line 1173 of file Utils.cpp.

§ RadToDeg()

double Utils::RadToDeg ( double  rad)
inline

Definition at line 67 of file Utils.h.

§ randomizeParameters()

void Utils::randomizeParameters ( RooWorkspace *  w,
TString  setname 
)

Definition at line 418 of file Utils.cpp.

§ randomizeParametersGaussian()

void Utils::randomizeParametersGaussian ( RooWorkspace *  w,
TString  setname,
RooSlimFitResult r 
)

Definition at line 432 of file Utils.cpp.

§ randomizeParametersUniform()

void Utils::randomizeParametersUniform ( RooWorkspace *  w,
TString  setname,
RooSlimFitResult r,
double  sigmaRange 
)

Definition at line 459 of file Utils.cpp.

§ Round()

float Utils::Round ( double  value,
int  digits 
)

Round a number to a certain number of decimal points.

Definition at line 833 of file Utils.cpp.

§ savePlot()

void Utils::savePlot ( TCanvas *  c1,
TString  name 
)

Definition at line 817 of file Utils.cpp.

§ setLimit() [1/3]

void Utils::setLimit ( RooRealVar *  v,
TString  limitname 
)

Load a named parameter range for a certain parameter.

Parameters
v- The parameter which will get the limit set.
limitname- Name of the limit to set.

Definition at line 663 of file Utils.cpp.

§ setLimit() [2/3]

void Utils::setLimit ( RooWorkspace *  w,
TString  parname,
TString  limitname 
)

Load a named parameter range for a certain parameter, which is found inside a workspace.

Parameters
w- The workspace holding the parameter.
parname- The name of the parameter.
limitname- Name of the limit to set.

Definition at line 678 of file Utils.cpp.

§ setLimit() [3/3]

void Utils::setLimit ( const RooAbsCollection *  set,
TString  limitname 
)

Load a named parameter range for a list of parameters.

Parameters
set- The list holding the parameters.
limitname- Name of the limit to set.

Definition at line 691 of file Utils.cpp.

§ setParameters() [1/6]

void Utils::setParameters ( const RooAbsCollection *  setMe,
const RooAbsCollection *  values 
)

Set each parameter in setMe to the value found in values.

Do nothing if parameter is not found in values.

Definition at line 504 of file Utils.cpp.

§ setParameters() [2/6]

void Utils::setParameters ( RooWorkspace *  w,
TString  parname,
const RooAbsCollection *  set 
)

Set each parameter in the named set parname inside workspace w to the value found in set.

Do nothing if a parameter is present in the parname set, but not found in set.

Parameters
wworkspace containing a parameter set of name parname
parnameName of the parameter set containing the "destination" parameters.
setparameter set holding the "from" parameters.

Definition at line 537 of file Utils.cpp.

§ setParameters() [3/6]

void Utils::setParameters ( RooWorkspace *  w,
TString  parname,
RooFitResult *  r,
bool  constAndFloat = false 
)

Set each parameter in the named set parname inside workspace w to the value found in the final set of floating (or floating and constant) fit parameters in r.

Parameters
w- workspace containing a parameter set of name parname
parname- Name of the parameter set containing the "destination" parameters.
r- a fit result holding the parameter values to be set
constAndFloat- If set to true, parameter values will be copied from both constant and floating fit parameters in the RooFitResult. Default is false.

Definition at line 572 of file Utils.cpp.

§ setParameters() [4/6]

void Utils::setParameters ( RooWorkspace *  w,
TString  parname,
RooSlimFitResult r,
bool  constAndFloat = false 
)

Definition at line 583 of file Utils.cpp.

§ setParameters() [5/6]

void Utils::setParameters ( RooWorkspace *  w,
TString  parname,
RooDataSet *  d 
)

Set each parameter in the named set parname inside workspace w to the value found in the first row of the provided dataset.

Definition at line 608 of file Utils.cpp.

§ setParameters() [6/6]

void Utils::setParameters ( RooWorkspace *  w,
RooFitResult *  values 
)

Set each parameter in workspace to the values found in the fit result.

Definition at line 483 of file Utils.cpp.

§ setParametersFloating() [1/6]

void Utils::setParametersFloating ( const RooAbsCollection *  setMe,
const RooAbsCollection *  values 
)

Set each floating parameter in setMe to the value found in values.

Do nothing if parameter is not found in values.

Definition at line 518 of file Utils.cpp.

§ setParametersFloating() [2/6]

void Utils::setParametersFloating ( RooWorkspace *  w,
TString  parname,
const RooAbsCollection *  set 
)

Set each floating parameter in the named set parname inside workspace w to the value found in set.

Do nothing if a parameter is present in the parname set, but not found in set.

Parameters
wworkspace containing a parameter set of name parname
parnameName of the parameter set containing the "destination" parameters.
setparameter set holding the "from" parameters.

Definition at line 555 of file Utils.cpp.

§ setParametersFloating() [3/6]

void Utils::setParametersFloating ( RooWorkspace *  w,
TString  parname,
RooFitResult *  r 
)

Set each floating parameter in the named set parname inside workspace w to the value found in the final set of floating fit parameters in r.

Definition at line 599 of file Utils.cpp.

§ setParametersFloating() [4/6]

void Utils::setParametersFloating ( RooWorkspace *  w,
TString  parname,
RooDataSet *  d 
)

Set each floating parameter in the named set parname inside workspace w to the value found in the first row of the provided dataset.

Definition at line 617 of file Utils.cpp.

§ setParametersFloating() [5/6]

void Utils::setParametersFloating ( RooWorkspace *  w,
std::vector< TString >  names 
)

Definition at line 1094 of file Utils.cpp.

§ setParametersFloating() [6/6]

void Utils::setParametersFloating ( RooWorkspace *  w,
std::vector< TString >  names,
std::vector< TString >  names2 
)

Definition at line 1090 of file Utils.cpp.

§ setParsConstToBound() [1/2]

void Utils::setParsConstToBound ( RooWorkspace *  w,
std::vector< TString >  names,
bool  low 
)

Definition at line 1082 of file Utils.cpp.

§ setParsConstToBound() [2/2]

void Utils::setParsConstToBound ( RooWorkspace *  w,
std::vector< TString >  namesLow,
std::vector< TString >  namesHigh 
)

Definition at line 1076 of file Utils.cpp.

§ smoothGraph()

TGraph * Utils::smoothGraph ( TGraph *  g,
int  option = 0 
)

Smooths a graph.

Definition at line 918 of file Utils.cpp.

§ smoothHist()

TGraph * Utils::smoothHist ( TH1 *  h,
int  option = 0 
)

Definition at line 933 of file Utils.cpp.

§ sq()

double Utils::sq ( double  x)
inline

Definition at line 66 of file Utils.h.

§ transpose()

std::vector< std::vector< int > > Utils::transpose ( std::vector< std::vector< int > > &  v)

Definition at line 1134 of file Utils.cpp.

§ TStringToConfig()

Utils::config Utils::TStringToConfig ( TString  s)

Definition at line 94 of file UtilsConfig.cpp.

Variable Documentation

§ countAllFitBringBackAngle

int Utils::countAllFitBringBackAngle

counts how many times fitBringBackAngle() was called

Definition at line 11 of file Utils.cpp.

§ countFitBringBackAngle

int Utils::countFitBringBackAngle

counts how many times an angle needed to be brought back

Gamma Combination Author: Till Moritz Karbach, morit.nosp@m.z.ka.nosp@m.rbach.nosp@m.@cer.nosp@m.n.ch Date: August 2012.

counts how many times an angle needed to be brought back

Definition at line 10 of file Utils.cpp.