42 Box(
const vector<double>& min,
const vector<double>& max,
43 const double value = 0.0,
const double error = 1.0):
94 vector<double>::const_iterator boxit = b2.
fMin.begin();
95 vector<double>::const_iterator bigit = b1.
fMax.begin();
96 while ( isIn && boxit != b2.
fMin.end() )
98 if ( (*boxit) >= (*bigit) ) isIn =
false;
103 boxit = b2.
fMax.begin();
104 bigit = b1.
fMin.begin();
105 while ( isIn && boxit != b2.
fMax.end() )
107 if ( (*boxit) <= (*bigit) ) isIn =
false;
152 void DivideBox(
const vector<double>& min,
const vector<double>& max,
153 const vector<double>& bmin,
const vector<double>& bmax,
154 const unsigned int size,
const unsigned int n,
155 list<Box>&
l,
const double val,
const double error)
157 vector<double> boxmin(min);
158 vector<double> boxmax(max);
162 if ( for_each(boxmin.begin(), boxmin.end(),
AreaComparer(boxmax.begin())).IsThereArea() )
163 l.push_back(
Box(boxmin, boxmax));
169 if ( for_each(boxmin.begin(), boxmin.end(),
AreaComparer(boxmax.begin())).IsThereArea() )
170 l.push_back(
Box(boxmin, boxmax, val, error));
177 if ( for_each(boxmin.begin(), boxmin.end(),
AreaComparer(boxmax.begin())).IsThereArea() )
178 l.push_back(
Box(boxmin, boxmax));
199 Box originalBox(min, max);
209 vector<double> minv(min,min+dim);
210 vector<double> maxv(max,max+dim);
211 Box originalBox(minv, maxv);
232 const double content,
const double error)
239 Box littleBox(min, max);
240 list<Box>::iterator it;
248 cout <<
"SparseData::Add -> FAILED! box not found! " << endl;
249 cout << littleBox << endl;
261 it->GetMin().size(), it->GetMin().size() - 1,
269 std::vector<double>& min, std::vector<double>&max,
270 double& content,
double& error)
275 unsigned int counter = 0;
277 while ( it !=
fList->
End() && counter != i ) {
282 if ( (it ==
fList->
End()) || (counter != i) )
283 throw std::out_of_range(
"SparseData::GetPoint");
287 content = it->GetVal();
288 error = it->GetError();
303 const unsigned int dim = it->GetMin().size();
309 vector<double> mid(dim);
311 for (
unsigned int i = 0; i < dim; ++i)
313 mid[i] = ((it->GetMax()[i] - it->GetMin()[i]) /2) + it->GetMin()[i];
316 bd.
Add(&mid[0], it->GetVal(), it->GetError());
332 bd.
Add(&(it->GetMin()[0]), it->GetVal(), it->GetError());
344 const unsigned int dim = it->GetMin().size();
351 if ( it->GetVal() == 0 )
continue;
352 vector<double> mid(dim);
354 for (
unsigned int i = 0; i < dim; ++i)
356 mid[i] = ((it->GetMax()[i] - it->GetMin()[i]) /2) + it->GetMin()[i];
359 bd.
Add(&mid[0], it->GetVal(), it->GetError());
367 copy(
b.GetMin().begin(),
b.GetMin().end(), ostream_iterator<double>(os,
" "));
369 copy(
b.GetMax().begin(),
b.GetMax().end(), ostream_iterator<double>(os,
" "));
370 os <<
"val: " <<
b.GetVal();
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
void operator()(double value)
AreaComparer(vector< double >::iterator iter)
vector< double >::iterator fIter
Class describing the binned data sets : vectors of x coordinates, y values and optionally error on y ...
void AddBinUpEdge(const double *xup)
add the bin width data, a pointer to an array with the bin upper edge information.
void Add(double x, double y)
add one dim data with only coordinate and values
void Initialize(unsigned int newPoints, unsigned int dim=1, ErrorType err=kValueError)
bool operator()(const Box &b1)
BoxContainer(const Box &b)
const vector< double > & GetMax() const
void AddVal(const double value)
friend ostream & operator<<(ostream &os, const Box &b)
bool operator==(const Box &b)
Box(const vector< double > &min, const vector< double > &max, const double value=0.0, const double error=1.0)
const vector< double > & GetMin() const
list< Box >::iterator Begin()
void Remove(list< Box >::iterator it)
list< Box >::iterator End()
void Add(std::vector< double > &min, std::vector< double > &max, const double content, const double error=1.0)
unsigned int NDim() const
void GetPoint(const unsigned int i, std::vector< double > &min, std::vector< double > &max, double &content, double &error)
unsigned int NPoints() const
void GetBinDataNoZeros(BinData &) const
void GetBinData(BinData &) const
SparseData(std::vector< double > &min, std::vector< double > &max)
void GetBinDataIntegral(BinData &) const
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
void DivideBox(const vector< double > &min, const vector< double > &max, const vector< double > &bmin, const vector< double > &bmax, const unsigned int size, const unsigned int n, list< Box > &l, const double val, const double error)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...