Update 'ParamValues Class'
parent
45a9ad4f7b
commit
cfd4835902
@ -1,85 +1,121 @@
|
|||||||
|
The parameter intitial values are set in [ParamValues::SetParamValues()](#void-paramvaluessetparamvalues).
|
||||||
|
|
||||||
|
# Structs
|
||||||
|
### struct FitValuesWithName
|
||||||
|
* **Private members:**
|
||||||
|
* **Public members:**
|
||||||
|
* string name
|
||||||
|
* double val
|
||||||
|
* double err
|
||||||
|
* **Functions:**
|
||||||
|
* *FitValuesWithName() //Default constructor
|
||||||
|
* **Parameters**
|
||||||
|
* string s_name
|
||||||
|
* double d_val
|
||||||
|
* double d_err
|
||||||
|
* **Return**
|
||||||
|
* Initialized FitValuesWithName
|
||||||
|
|
||||||
|
|
||||||
## Global variables:
|
### struct SavedFitValues
|
||||||
|
All values are initialized to their name as a string, value is set to 1.0, error is set to 1.0
|
||||||
|
* FitValuesWithName sig_mean
|
||||||
|
* FitValuesWithName sig_sigma
|
||||||
|
* FitValuesWithName sig_sigma2
|
||||||
|
* FitValuesWithName sig_alpha
|
||||||
|
* FitValuesWithName sig_alpha2
|
||||||
|
* FitValuesWithName sig_n
|
||||||
|
* FitValuesWithName sig_n2
|
||||||
|
* FitValuesWithName sig_f
|
||||||
|
* FitValuesWithName sig_effSigma
|
||||||
|
|
||||||
|
|
||||||
|
### struct SavedFitValuesBackground
|
||||||
|
All values are initialized to their name as a string, value is set to 1.0, error is set to 1.0
|
||||||
|
* FitValuesWithName bkg_mean
|
||||||
|
* FitValuesWithName bkg_sigma
|
||||||
|
* FitValuesWithName bkg_decay
|
||||||
|
* FitValuesWithName bkg_alpha
|
||||||
|
* FitValuesWithName bkg_alpha2
|
||||||
|
* FitValuesWithName bkg_n
|
||||||
|
* FitValuesWithName bkg_n2
|
||||||
|
* FitValuesWithName bkg_f
|
||||||
|
|
||||||
*class ParamValues: public SignalType
|
|
||||||
*public BackgroundType{
|
|
||||||
*protected:
|
|
||||||
*public:
|
|
||||||
*struct FitValuesWithName{
|
|
||||||
*public:
|
|
||||||
*struct SavedFitValues {
|
|
||||||
*struct SavedFitValuesBackground {
|
|
||||||
|
|
||||||
|
|
||||||
# Classes
|
# Classes
|
||||||
### ParamValues: public SignalType, public BackgroundType
|
### ParamValues: public SignalType, public BackgroundType
|
||||||
* **Private members:**
|
* **Protected members:**
|
||||||
|
* string latexName
|
||||||
|
* double constrain
|
||||||
|
* double fix
|
||||||
|
* double ranges[2]
|
||||||
* **Public members:**
|
* **Public members:**
|
||||||
* string name
|
* string name
|
||||||
* double value
|
* double value
|
||||||
* double error
|
* double error
|
||||||
* **Functions:**
|
* **Functions:**
|
||||||
* **mValues()**
|
* ParamValues(){}; //default constructor
|
||||||
* **Parameters**
|
* void SetParamValues(string s_string, bool fitRef=true)
|
||||||
* }; //default constructor
|
* RooRealVar *getRooRealVar(string s_name, bool sig, bool fitRef=true)
|
||||||
* **Return**
|
* void printProperties()
|
||||||
|
* void setValuesAndErrors(bool sig)
|
||||||
|
* ~ParamValues(){}; //default destructor
|
||||||
|
|
||||||
|
**TODO** Link the function descriptions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Functions and their parameters:
|
# Functions and their parameters:
|
||||||
### void ParamValues::printProperties()
|
### void ParamValues::printProperties()
|
||||||
|
Prints the Name and LaTeX name of the parameter, whether it is fixed and/or constrained, its value and error and its range.
|
||||||
* **Parameters**
|
|
||||||
*
|
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### void ParamValues::SetParamValues()
|
### void ParamValues::SetParamValues()
|
||||||
|
This is where the initial values of the parameters are defined. They can be changed later on. In this function the latex names used for plotting are also set.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string s_string
|
* string s_string
|
||||||
* bool fitRef
|
* bool fitRef
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### FitValuesWithName getSignalSavedFitValue()
|
### FitValuesWithName getSignalSavedFitValue()
|
||||||
|
Retrieves the signal-model parameter based on its name
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string s_name //This would have been so much nicer in Python
|
* string s_name
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* Returns the parameter specified by s_name
|
||||||
|
|
||||||
### FitValuesWithName getBackgroundSavedFitValue()
|
### FitValuesWithName getBackgroundSavedFitValue()
|
||||||
|
Retrieves the background-model parameter based on its name
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string s_name //This would have been so much nicer in Python
|
* string s_name //This would have been so much nicer in Python
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* Returns the parameter specified by s_name
|
||||||
|
|
||||||
### RooRealVar \*ParamValues::getRooRealVar()
|
### RooRealVar \*ParamValues::getRooRealVar()
|
||||||
|
Creates an return a RooRealVar based on the parameter name. If the parameter is contrained, it also sets the gaussian constrains.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string s_name
|
* string s_name
|
||||||
* bool sig
|
* bool sig
|
||||||
* bool fitRef
|
* bool fitRef
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* New RooRealVar parameter created based on s_name
|
||||||
|
|
||||||
### void setSignalSavedFitValue()
|
### void setSignalSavedFitValue()
|
||||||
|
Rewrites the signal-model parameter value and error.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string s_name
|
* string s_name
|
||||||
* double d_val
|
* double d_val
|
||||||
* double d_err //This would have been so much nicer in Python
|
* double d_err
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### void setBackgroundSavedFitValue()
|
### void setBackgroundSavedFitValue()
|
||||||
|
Rewrites the background-model parameter value and error.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string s_name
|
* string s_name
|
||||||
* double d_val
|
* double d_val
|
||||||
* double d_err //This would have been so much nicer in Python
|
* double d_err
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### void ParamValues::setValuesAndErrors()
|
### void ParamValues::setValuesAndErrors()
|
||||||
|
Sets the RooVar parameter in order to get the value needed by the constrains. Parameter `sig` decides whether it is a parameter form the signal or background model.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* bool sig
|
* bool sig
|
||||||
* **Return**
|
|
||||||
|
Loading…
Reference in New Issue
Block a user