| 
    GammaCombo
    Rev:Unversioneddirectory
    
   | 
 
Classes | |
| struct | FixPar | 
| struct | RangePar | 
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, moritz.karbach@cern.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... | |
| enum Utils::config | 
Definition at line 22 of file UtilsConfig.h.
| enum Utils::histogramType | 
| double Utils::angularDifference | ( | double | angle1, | 
| double | angle2 | ||
| ) | 
| double Utils::bringBackAngle | ( | double | angle | ) | 
| void Utils::buildCorMatrix | ( | TMatrixDSym & | cor | ) | 
| TMatrixDSym * Utils::buildCovMatrix | ( | TMatrixDSym & | cor, | 
| float * | err | ||
| ) | 
| TMatrixDSym * Utils::buildCovMatrix | ( | TMatrixDSym & | cor, | 
| vector< double > & | err | ||
| ) | 
| int Utils::calcNsubdigits | ( | double | value, | 
| int | sigdigits = 2  | 
        ||
| ) | 
| bool Utils::checkBoundary | ( | const RooSlimFitResult & | r, | 
| std::vector< TString > | lowProb, | ||
| std::vector< TString > | highProb | ||
| ) | 
| std::vector< double > Utils::computeNormalQuantiles | ( | std::vector< double > & | values, | 
| int | nsigma | ||
| ) | 
| TString Utils::ConfigToTString | ( | config | s | ) | 
Gamma Combination Author: Till Moritz Karbach, moritz.karbach@cern.ch Date: June 2014.
Definition at line 10 of file UtilsConfig.cpp.
| TTree * Utils::convertRooDatasetToTTree | ( | RooDataSet * | d | ) | 
| TGraph * Utils::convertTH1ToTGraph | ( | TH1 * | h, | 
| bool | withErrors = false  | 
        ||
| ) | 
| void Utils::dump_map | ( | const std::map< int, std::vector< int > > & | map | ) | 
| void Utils::dump_matrix | ( | const std::vector< std::vector< int > > & | l | ) | 
| void Utils::dump_vector | ( | const std::vector< int > & | l | ) | 
| void Utils::dump_vector | ( | const std::vector< float > & | l | ) | 
| void Utils::fillArgList | ( | RooArgList * | list, | 
| RooWorkspace * | w, | ||
| std::vector< TString > | names | ||
| ) | 
| RooFitResult * Utils::fitToMin | ( | RooAbsPdf * | pdf, | 
| bool | thorough, | ||
| int | printLevel | ||
| ) | 
| RooFitResult * Utils::fitToMinBringBackAngles | ( | RooAbsPdf * | pdf, | 
| bool | thorough, | ||
| int | printLevel | ||
| ) | 
| 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):
| w | Workspace holding the pdf. | 
| name | Name of the pdf without leading "pdf_". | 
| forceVariables | Apply 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
| 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!
| void Utils::fixParameters | ( | RooWorkspace * | w, | 
| TString | parname | ||
| ) | 
| void Utils::floatParameters | ( | const RooAbsCollection * | set | ) | 
| void Utils::floatParameters | ( | RooWorkspace * | w, | 
| TString | parname | ||
| ) | 
| void Utils::getParameters | ( | const RooFitResult & | result, | 
| std::vector< TString > & | names | ||
| ) | 
| std::vector< TString > Utils::getParsWithName | ( | const TString & | subString, | 
| const RooArgSet & | set | ||
| ) | 
| void Utils::HFAGLabel | ( | const TString & | label = "please set label",  | 
        
| Double_t | xpos = 0,  | 
        ||
| Double_t | ypos = 0,  | 
        ||
| Double_t | scale = 1  | 
        ||
| ) | 
| 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.
| h | - the input histogram | 
| copyContent | - true: also copy content. false: initialize with zeroes | 
| uniqueName | - true: append a unique string to the histogram name | 
| 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().
| bool Utils::isAngle | ( | RooRealVar * | v | ) | 
      
  | 
  inline | 
| bool Utils::isPosDef | ( | TMatrixDSym * | c | ) | 
| void Utils::mergeNamedSets | ( | RooWorkspace * | w, | 
| TString | mergedSet, | ||
| TString | set1, | ||
| TString | set2 | ||
| ) | 
| TCanvas * Utils::newNoWarnTCanvas | ( | TString | name = "NoWarnTCanvas",  | 
        
| TString | title = "NoWarnTCanvas",  | 
        ||
| int | width = 800,  | 
        ||
| int | height = 600  | 
        ||
| ) | 
| TCanvas * Utils::newNoWarnTCanvas | ( | TString | name, | 
| TString | title, | ||
| int | x, | ||
| int | y, | ||
| int | width, | ||
| int | height | ||
| ) | 
| void Utils::randomizeParameters | ( | RooWorkspace * | w, | 
| TString | setname | ||
| ) | 
| void Utils::randomizeParametersGaussian | ( | RooWorkspace * | w, | 
| TString | setname, | ||
| RooSlimFitResult * | r | ||
| ) | 
| void Utils::randomizeParametersUniform | ( | RooWorkspace * | w, | 
| TString | setname, | ||
| RooSlimFitResult * | r, | ||
| double | sigmaRange | ||
| ) | 
| float Utils::Round | ( | double | value, | 
| int | digits | ||
| ) | 
| void Utils::setLimit | ( | RooRealVar * | v, | 
| TString | limitname | ||
| ) | 
| void Utils::setLimit | ( | RooWorkspace * | w, | 
| TString | parname, | ||
| TString | limitname | ||
| ) | 
| void Utils::setLimit | ( | const RooAbsCollection * | set, | 
| TString | limitname | ||
| ) | 
| void Utils::setParameters | ( | const RooAbsCollection * | setMe, | 
| const RooAbsCollection * | values | ||
| ) | 
| 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.
| w | workspace containing a parameter set of name parname | 
| parname | Name of the parameter set containing the "destination" parameters. | 
| set | parameter set holding the "from" parameters. | 
| 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.
| 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. | 
| void Utils::setParameters | ( | RooWorkspace * | w, | 
| TString | parname, | ||
| RooSlimFitResult * | r, | ||
| bool | constAndFloat = false  | 
        ||
| ) | 
| void Utils::setParameters | ( | RooWorkspace * | w, | 
| TString | parname, | ||
| RooDataSet * | d | ||
| ) | 
| void Utils::setParameters | ( | RooWorkspace * | w, | 
| RooFitResult * | values | ||
| ) | 
| void Utils::setParametersFloating | ( | const RooAbsCollection * | setMe, | 
| const RooAbsCollection * | values | ||
| ) | 
| 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.
| w | workspace containing a parameter set of name parname | 
| parname | Name of the parameter set containing the "destination" parameters. | 
| set | parameter set holding the "from" parameters. | 
| void Utils::setParametersFloating | ( | RooWorkspace * | w, | 
| TString | parname, | ||
| RooFitResult * | r | ||
| ) | 
| void Utils::setParametersFloating | ( | RooWorkspace * | w, | 
| TString | parname, | ||
| RooDataSet * | d | ||
| ) | 
| void Utils::setParametersFloating | ( | RooWorkspace * | w, | 
| std::vector< TString > | names | ||
| ) | 
| void Utils::setParametersFloating | ( | RooWorkspace * | w, | 
| std::vector< TString > | names, | ||
| std::vector< TString > | names2 | ||
| ) | 
| void Utils::setParsConstToBound | ( | RooWorkspace * | w, | 
| std::vector< TString > | names, | ||
| bool | low | ||
| ) | 
| void Utils::setParsConstToBound | ( | RooWorkspace * | w, | 
| std::vector< TString > | namesLow, | ||
| std::vector< TString > | namesHigh | ||
| ) | 
| TGraph * Utils::smoothGraph | ( | TGraph * | g, | 
| int | option = 0  | 
        ||
| ) | 
| std::vector< std::vector< int > > Utils::transpose | ( | std::vector< std::vector< int > > & | v | ) | 
| Utils::config Utils::TStringToConfig | ( | TString | s | ) | 
Definition at line 94 of file UtilsConfig.cpp.
| int Utils::countAllFitBringBackAngle | 
| int Utils::countFitBringBackAngle | 
counts how many times an angle needed to be brought back
Gamma Combination Author: Till Moritz Karbach, moritz.karbach@cern.ch Date: August 2012.
counts how many times an angle needed to be brought back
 1.8.12