82 , fTarget(from.fTarget)
84 Log() << kFATAL <<
"COPY CONSTRUCTOR NOT IMPLEMENTED" <<
Endl;
95 std::vector<Float_t> values = ev->
GetValues();
96 std::vector<Float_t> tvalues = VarTransform(values);
97 std::vector<Float_t> targets = ev->
GetTargets();
102 SetCellElement(cell, 0, GetCellElement(cell, 0) + wt);
103 SetCellElement(cell, 1, GetCellElement(cell, 1) + wt * targets.at(fTarget));
114 for (
Long_t iCell = 0; iCell <= fLastCe; iCell++) {
115 if (!(fCells[iCell]->GetStat()))
118 Double_t n_ev = GetCellElement(fCells[iCell], 0);
119 Double_t tar = GetCellElement(fCells[iCell], 1);
122 SetCellElement(fCells[iCell], 0, tar / n_ev);
123 SetCellElement(fCells[iCell], 1, tar /
TMath::Sqrt(n_ev));
125 SetCellElement(fCells[iCell], 0, 0.0);
126 SetCellElement(fCells[iCell], 1, -1);
137 return GetCellValue(cell, kValueError) == -1;
151 std::vector<Float_t> txvec(VarTransform(xvec));
154 if (!CellValueIsUndefined(cell)) {
157 return GetCellValue(cell, cv);
159 return kernel->
Estimate(
this, txvec, cv);
162 return GetAverageNeighborsValue(txvec, kValue);
184 cell->
GetHcub(cellPosi, cellSize);
187 for (
Int_t dim = 0; dim < GetTotDim(); dim++) {
188 std::vector<Float_t> ntxvec(txvec);
193 ntxvec[dim] = cellPosi[dim] - xoffset;
194 left_cell = FindCell(ntxvec);
195 if (!CellValueIsUndefined(left_cell)) {
197 result += GetCellValue(left_cell, cv);
201 ntxvec[dim] = cellPosi[dim] + cellSize[dim] + xoffset;
202 right_cell = FindCell(ntxvec);
203 if (!CellValueIsUndefined(right_cell)) {
205 result += GetCellValue(right_cell, cv);
209 if (norm > 0)
result /= norm;
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
float Float_t
Float 4 bytes (float)
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...
void Finalize() override
Calculate average cell target in every cell and save them to the cell.
Bool_t CellValueIsUndefined(PDEFoamCell *cell) override
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.
Float_t GetCellValue(const std::vector< Float_t > &xvec, ECellValue cv, PDEFoamKernelBase *) override
This function finds the cell, which corresponds to the given untransformed event vector 'xvec' and re...
void FillFoamCells(const Event *ev, Float_t wt) override
This function fills an event into the discriminant PDEFoam.
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.