83 , fTarget(from.fTarget)
85 Log() << kFATAL <<
"COPY CONSTRUCTOR NOT IMPLEMENTED" <<
Endl;
96 std::vector<Float_t> values = ev->
GetValues();
97 std::vector<Float_t> tvalues = VarTransform(values);
98 std::vector<Float_t> targets = ev->
GetTargets();
103 SetCellElement(cell, 0, GetCellElement(cell, 0) + wt);
104 SetCellElement(cell, 1, GetCellElement(cell, 1) + wt * targets.at(fTarget));
115 for (
Long_t iCell = 0; iCell <= fLastCe; iCell++) {
116 if (!(fCells[iCell]->GetStat()))
119 Double_t n_ev = GetCellElement(fCells[iCell], 0);
120 Double_t tar = GetCellElement(fCells[iCell], 1);
123 SetCellElement(fCells[iCell], 0, tar / n_ev);
124 SetCellElement(fCells[iCell], 1, tar /
TMath::Sqrt(n_ev));
126 SetCellElement(fCells[iCell], 0, 0.0);
127 SetCellElement(fCells[iCell], 1, -1);
138 return GetCellValue(cell, kValueError) == -1;
152 std::vector<Float_t> txvec(VarTransform(xvec));
155 if (!CellValueIsUndefined(cell)) {
158 return GetCellValue(cell, cv);
160 return kernel->
Estimate(
this, txvec, cv);
163 return GetAverageNeighborsValue(txvec, kValue);
185 cell->
GetHcub(cellPosi, cellSize);
188 for (
Int_t dim = 0; dim < GetTotDim(); dim++) {
189 std::vector<Float_t> ntxvec(txvec);
194 ntxvec[dim] = cellPosi[dim] - xoffset;
195 left_cell = FindCell(ntxvec);
196 if (!CellValueIsUndefined(left_cell)) {
198 result += GetCellValue(left_cell, cv);
202 ntxvec[dim] = cellPosi[dim] + cellSize[dim] + xoffset;
203 right_cell = FindCell(ntxvec);
204 if (!CellValueIsUndefined(right_cell)) {
206 result += GetCellValue(right_cell, cv);
210 if (norm > 0)
result /= norm;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
std::vector< Float_t > & GetTargets()
std::vector< Float_t > & GetValues()
void GetHcub(PDEFoamVect &, PDEFoamVect &) const
Provides size and position of the cell These parameter are calculated by analyzing information in all...
This class is the abstract kernel interface for PDEFoam.
virtual Float_t Estimate(PDEFoam *, std::vector< Float_t > &, ECellValue)=0
This PDEFoam variant stores in every cell the average target fTarget (see the Constructor) as well as...
Bool_t CellValueIsUndefined(PDEFoamCell *cell)
Returns true, if the target error equals -1, as set in Finalize() in case of no events in the cell.
PDEFoamTarget()
Default constructor for streamer, user should not use it.
virtual void Finalize()
Calculate average cell target in every cell and save them to the cell.
virtual void FillFoamCells(const Event *ev, Float_t wt)
This function fills an event into the discriminant PDEFoam.
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...
Float_t GetAverageNeighborsValue(std::vector< Float_t > &, ECellValue)
This function returns the average value 'cv' of only nearest neighbor cells.
Implementation of PDEFoam.
MsgLogger & Endl(MsgLogger &ml)
Double_t Sqrt(Double_t x)
Returns the square root of x.