flavour
parameters Class Reference

vector of parameters More...

#include <model.h>

Inheritance diagram for parameters:
Collaboration diagram for parameters:

Public Member Functions

void next (TRandom3 *r, double f=1)
 changes randomly the value of the parameters More...
 
bool isvalid () const
 checks if all the values are between their minimums and maximums More...
 
double dist (const parameters &p) const
 checks if this and another vector of parameters are within 1sigma of distance More...
 
void setvalues (const parameters &p)
 
double area () const
 
double gausslikelihood (const parameters &p2) const
 

Public Attributes

lst p
 
vector< double > values
 

Detailed Description

vector of parameters

Definition at line 177 of file model.h.

Member Function Documentation

double parameters::area ( ) const
inline

Definition at line 215 of file model.h.

Referenced by Peak::adjuststeps(), and Proposal::findPeaks().

215  {
216  float a=1;
217  for(const_iterator i=begin();i!=end();i++){
218  a*=i->step;
219  }
220  return a;
221  }

Here is the caller graph for this function:

double parameters::dist ( const parameters p) const
inline

checks if this and another vector of parameters are within 1sigma of distance

Definition at line 200 of file model.h.

200  {
201  double total=0;
202  for(uint i=0;i<size();i++){
203  total+=at(i).dist(p[i].value);
204  }
205  return sqrt(total/size());
206 }
unsigned int uint
Definition: script.cpp:4
double parameters::gausslikelihood ( const parameters p2) const
inline

Definition at line 223 of file model.h.

223  {
224  double l=1;
225  for(uint i=0;i<size();i++){
226  l*=TMath::Gaus((p2[i].value-at(i).value)/at(i).step);
227  }
228  return l;
229  }
unsigned int uint
Definition: script.cpp:4
bool parameters::isvalid ( ) const
inline

checks if all the values are between their minimums and maximums

Definition at line 193 of file model.h.

Referenced by Model::veto(), and BGLmodels::BGL::veto().

193  {
194  for(const_iterator i=begin();i!=end();i++){
195  if(!i->isvalid()) return 0;
196  }
197  return 1;
198  }

Here is the caller graph for this function:

void parameters::next ( TRandom3 *  r,
double  f = 1 
)
inline

changes randomly the value of the parameters

Definition at line 182 of file model.h.

Referenced by Peak::findPeak().

182  {
183  for(iterator i=begin();i!=end();i++){
184  i->next(r,f);
185  }
186 
187  //for(uint i=0;i<discrete.size();i++){
188  //discrete[i].next(r);
189  //}
190  }

Here is the caller graph for this function:

void parameters::setvalues ( const parameters p)
inline

Definition at line 208 of file model.h.

208  {
209 
210  for(uint i=0;i<size();i++){
211  at(i).value=p[i].value;
212  }
213  }
unsigned int uint
Definition: script.cpp:4

Member Data Documentation

lst parameters::p
vector<double> parameters::values

The documentation for this class was generated from the following file: