16 #include <Minuit2/FunctionMinimum.h> 21 bool find_in(std::vector<T> list, T item) {
22 return std::find_if(std::begin(list), std::end(list), [item](T p) {
return p == item; }) != std::end(list);
42 component->checkInitStatus(unInited);
50 component->recursiveSetNormalisation(norm);
55 static int unique_param = 0;
58 return static_cast<unsigned int>(var.
getIndex());
66 return static_cast<unsigned int>(var.
getIndex());
73 comp->unregisterParameter(var);
82 std::vector<Variable> ret;
87 for(
const Variable &sub_comp : comp->getParameters())
88 if(!find_in(ret, sub_comp))
89 ret.push_back(sub_comp);
102 Variable *cand = component->getParameterByName(n);
112 std::vector<Observable> ret;
117 for(
const Observable &sub_comp : comp->getObservables())
118 if(!find_in(ret, sub_comp))
119 ret.push_back(sub_comp);
128 "totalConstants {} + amount {} can not be more than {}", totalConstants, amount,
maxParams);
130 totalConstants += amount;
Thrown when a general error is encountered.
__host__ void unregisterParameter(Variable var)
unsigned int host_indices[maxParams]
std::vector< Observable > observables
__host__ Variable * getParameterByName(std::string n)
__host__ void checkInitStatus(std::vector< std::string > &unInited) const
__host__ void setIntegrationFineness(int i)
void setIndex(int value)
Set the GooFit index.
bool getChanged() const
Check to see if the value has changed this iteration (always true the first time) ...
std::vector< PdfBase * > components
__host__ unsigned int registerConstants(unsigned int amount)
Special class for observables. Used in DataSets.
void setNumPerTask(PdfBase *p, const int &c)
This needs to be set before a call to setData.
__host__ void registerObservable(Observable obs)
__host__ void generateNormRange()
void setVerbosity(int value)
Set the fitting verbosity.
__host__ void setData(DataSet *data)
std::vector< Variable > parameterList
__host__ bool parametersChanged() const
#define GOOFIT_DEBUG(...)
virtual __host__ std::vector< Observable > getObservables() const
int getIndex() const
Get the GooFit index.
__host__ ROOT::Minuit2::FunctionMinimum fitTo(DataSet *data, int verbosity=3)
RooFit style fitting shortcut.
virtual __host__ void recursiveSetNormalisation(fptype norm=1) const
__host__ unsigned int registerParameter(Variable var)
fptype host_normalisation[maxParams]
__host__ std::string getName() const
fptype host_params[maxParams]
virtual __host__ std::vector< Variable > getParameters() const
const std::string & getName() const
Get the name.