#include <CrossSectionHandler.h>
Public Member Functions | |
void | addParameters (std::vector< double > &initpar) |
Inputs the vars in a vector. More... | |
CrossSectionHandler (const std::vector< double > &crossSection, const std::vector< int > &resfind) | |
unsigned int | parNum () |
std::vector< double > | relativeCrossSections (const double *variables, const std::vector< int > &resfind) |
Perform a variable transformation from N-1 to relative cross sections. More... | |
bool | releaseParameters (TMinuit &rmin, const std::vector< int > &resfind, const std::vector< int > &parfix, const int *ind, const int iorder, const unsigned int shift) |
Use the information in resfind, parorder and parfix to release the N-1 variables. More... | |
void | setParameters (double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const std::vector< double > &parCrossSection, const std::vector< int > &parCrossSectionOrder, const std::vector< int > &resfind) |
Initializes the arrays needed by Minuit. More... | |
Protected Member Functions | |
void | computeRelativeCrossSections (const std::vector< double > &crossSection, const std::vector< int > &resfind) |
void | imposeConstraint () |
Change of variables so that we move from N to N-1 variables using the constraint that Sum(x_i) = 1. More... | |
Protected Attributes | |
unsigned int | numberOfResonances_ |
unsigned int | parNum_ |
std::vector< double > | relativeCrossSectionVec_ |
std::vector< double > | vars_ |
Handles the cross sections for MuScleFit.
What counts in the fit is the ratio of the cross sections. However it depends on which resonances are used in the fit. If we are fitting only the Upsilon(1S), for example, we do not need to consider the cross section ratio, because the probability of the other resonances will be 0. This is useful when running on MC to test the algorithm.
The constructor receives the array of cross sections and the array of resfind that tells which of the resonances are considered in the fit.
It builds the relative cross section parameters for each of the resonance and it has a method that unlocks the parameter accordingly.
If for example only the Upsilon(1S) is fitted, the relative cross section will be 1 and it will remain fixed.
The relative cross sections are fitted only when a background fit is done.
Note that this handles only the initialization of the cross sections, so that it is consistent with the fitted resonances, and the fix/release of the cross section parameters.
This assumes that resfind is the same during all the processing (it is saved internally when received in the constructor).
Definition at line 24 of file CrossSectionHandler.h.
|
inline |
Definition at line 27 of file CrossSectionHandler.h.
References computeRelativeCrossSections(), imposeConstraint(), parNum_, and vars_.
|
inline |
Inputs the vars in a vector.
Definition at line 45 of file CrossSectionHandler.h.
References vars_.
Referenced by MuScleFit::duringFastLoop().
|
inlineprotected |
Initializes the relative cross sections for the range of resonances in [minRes, maxRes]. (note that both minRes and maxRes are included).
Also sets the lock on resonances. If only one of the resonances in the range is fitted its relative cross section will be 1 and it will not be fitted. If there are more than one only those that are fitted will have the relative cross section parameters unlocked during the fit.
Definition at line 160 of file CrossSectionHandler.h.
References ires, and relativeCrossSectionVec_.
Referenced by CrossSectionHandler(), and setParameters().
|
inlineprotected |
Change of variables so that we move from N to N-1 variables using the constraint that Sum(x_i) = 1.
Definition at line 179 of file CrossSectionHandler.h.
References parNum_, relativeCrossSectionVec_, and vars_.
Referenced by CrossSectionHandler(), and setParameters().
|
inline |
Definition at line 109 of file CrossSectionHandler.h.
References parNum_.
Referenced by MuScleFitUtils::massProb(), and MuScleFitUtils::minimizeLikelihood().
|
inline |
Perform a variable transformation from N-1 to relative cross sections.
Definition at line 115 of file CrossSectionHandler.h.
References i, numberOfResonances_, parNum_, and relativeCrossSectionVec_.
Referenced by MuScleFitUtils::massProb(), and MuScleFitUtils::minimizeLikelihood().
|
inline |
Use the information in resfind, parorder and parfix to release the N-1 variables.
Definition at line 88 of file CrossSectionHandler.h.
References i, and numberOfResonances_.
Referenced by MuScleFitUtils::minimizeLikelihood().
|
inline |
Initializes the arrays needed by Minuit.
Definition at line 54 of file CrossSectionHandler.h.
References computeRelativeCrossSections(), imposeConstraint(), numberOfResonances_, parNum_, and vars_.
Referenced by MuScleFitUtils::minimizeLikelihood().
|
protected |
Definition at line 192 of file CrossSectionHandler.h.
Referenced by relativeCrossSections(), releaseParameters(), and setParameters().
|
protected |
Definition at line 191 of file CrossSectionHandler.h.
Referenced by CrossSectionHandler(), imposeConstraint(), parNum(), relativeCrossSections(), and setParameters().
|
protected |
Definition at line 189 of file CrossSectionHandler.h.
Referenced by computeRelativeCrossSections(), imposeConstraint(), and relativeCrossSections().
|
protected |
Definition at line 190 of file CrossSectionHandler.h.
Referenced by addParameters(), CrossSectionHandler(), imposeConstraint(), and setParameters().