53 TMVA::PDEFoamKernelGauss::PDEFoamKernelGauss(
Float_t sigma)
64 , fSigma(other.fSigma)
85 Log() <<
kFATAL <<
"<PDEFoamKernelGauss::Estimate>: PDEFoam not set!" <<
Endl;
99 cell_val = GetAverageNeighborsValue(foam, txvec, cv);
104 result += gau * cell_val;
108 return (
norm != 0 ? result /
norm : 0);
123 std::vector<Float_t> &txvec,
133 cell->
GetHcub(cellPosi, cellSize);
137 std::vector<Float_t> ntxvec(txvec);
142 ntxvec[dim] = cellPosi[dim] - xoffset;
150 ntxvec[dim] = cellPosi[dim] + cellSize[dim] + xoffset;
151 right_cell = foam->
FindCell(ntxvec);
158 if (norm > 0) result /=
norm;
181 std::vector<Float_t> &txvec)
186 cell->
GetHcub(cellPosi, cellSize);
189 std::vector<Float_t> cell_center;
192 if (txvec[i] < 0.) txvec[i] = 0.;
193 if (txvec[i] > 1.) txvec[i] = 1.;
195 if (cellPosi[i] > txvec.at(i))
196 cell_center.push_back(cellPosi[i]);
197 else if (cellPosi[i] + cellSize[i] < txvec.at(i))
198 cell_center.push_back(cellPosi[i] + cellSize[i]);
200 cell_center.push_back(txvec.at(i));
205 distance += Sqr(txvec.at(i) - cell_center.at(i));
ClassImp(TMVA::PDEFoamKernelGauss) TMVA
Default constructor for streamer.
MsgLogger & Endl(MsgLogger &ml)
Double_t distance(const TPoint2 &p1, const TPoint2 &p2)
Float_t WeightGaus(PDEFoam *, PDEFoamCell *, std::vector< Float_t > &)
Returns the gauss weight between the 'cell' and a given coordinate 'txvec'.
virtual Bool_t CellValueIsUndefined(PDEFoamCell *)
Returns true, if the value of the given cell is undefined.
Float_t GetAverageNeighborsValue(PDEFoam *, std::vector< Float_t > &, ECellValue)
This function returns the average value 'cv' of only nearest neighbor cells.
PDEFoamKernelGauss(Float_t sigma)
virtual Float_t Estimate(PDEFoam *, std::vector< Float_t > &, ECellValue)
Gaussian kernel estimator.
Double_t Gaus(Double_t x, Double_t mean=0, Double_t sigma=1, Bool_t norm=kFALSE)
Calculate a gaussian function with mean and sigma.
virtual Float_t GetCellValue(const std::vector< Float_t > &xvec, ECellValue cv, PDEFoamKernelBase *)
This function finds the cell, which corresponds to the given untransformed event vector 'xvec' and re...
PDEFoamCell * FindCell(const std::vector< Float_t > &) const
Find cell that contains 'xvec' (in foam coordinates [0,1]).
Double_t Sqrt(Double_t x)
void GetHcub(PDEFoamVect &, PDEFoamVect &) const
Provides size and position of the cell These parameter are calculated by analyzing information in all...
double norm(double *x, double *p)