107 Log() << kFATAL <<
"COPY CONSTRUCTOR NOT IMPLEMENTED" <<
Endl;
130 std::map<Int_t, Float_t> txvec;
131 for (std::map<Int_t, Float_t>::const_iterator it = xvec.begin();
132 it != xvec.end(); ++it) {
133 Float_t coordinate = it->second;
134 Int_t dim = it->first;
137 if (coordinate <=
fXmin[dim])
138 coordinate =
fXmin[dim] + std::numeric_limits<float>::epsilon();
139 else if (coordinate >=
fXmax[dim])
140 coordinate =
fXmax[dim] - std::numeric_limits<float>::epsilon();
142 txvec.insert(std::pair<Int_t, Float_t>(dim,
VarTransform(dim, coordinate)));
146 std::map<Int_t, Float_t> target;
149 std::vector<PDEFoamCell*> cells =
FindCells(txvec);
153 return std::vector<Float_t>(
GetTotDim() - xvec.size(), 0);
159 if (txvec.find(idim) == txvec.end())
160 target.insert(std::pair<Int_t, Float_t>(idim, 0));
171 Log() <<
"<PDEFoamMultiTarget::GetCellValue>: "
172 <<
"unknown target selection type!" <<
Endl;
177 std::vector<Float_t> result;
178 result.reserve(target.size());
179 for (std::map<Int_t, Float_t>::const_iterator it = target.begin();
180 it != target.end(); ++it)
181 result.push_back(it->second);
206 for (std::vector<PDEFoamCell*>::const_iterator cell_it = cells.begin();
207 cell_it != cells.end(); ++cell_it) {
213 if (cell_density > max_dens) {
216 (*cell_it)->GetHcub(cellPosi, cellSize);
219 max_dens = cell_density;
222 for (std::map<Int_t, Float_t>::iterator target_it = target.begin();
223 target_it != target.end(); ++target_it) {
224 const Int_t dim = target_it->first;
250 std::map<Int_t, Float_t> norm;
253 for (std::vector<PDEFoamCell*>::const_iterator cell_it = cells.begin();
254 cell_it != cells.end(); ++cell_it) {
261 (*cell_it)->GetHcub(cellPosi, cellSize);
264 for (std::map<Int_t, Float_t>::iterator target_it = target.begin();
265 target_it != target.end(); ++target_it) {
266 const Int_t dim = target_it->first;
267 target_it->second += cell_density *
269 norm[dim] += cell_density;
274 for (std::map<Int_t, Float_t>::iterator target_it = target.begin();
275 target_it != target.end(); ++target_it) {
278 const Int_t dim = target_it->first;
281 if (norm[dim] > std::numeric_limits<Float_t>::epsilon()) {
282 target[dim] /= norm[dim];
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
float Float_t
Float 4 bytes (float).
PDEFoamEvent(const PDEFoamEvent &)
Copy Constructor NOT IMPLEMENTED (NEVER USED).
PDEFoamMultiTarget(const PDEFoamMultiTarget &)
Copy Constructor NOT IMPLEMENTED (NEVER USED).
virtual void CalculateMean(std::map< Int_t, Float_t > &, const std::vector< PDEFoamCell * > &)
This function calculates the mean target value from a given number of cells.
ETargetSelection fTargetSelection
std::vector< Float_t > GetCellValue(const std::map< Int_t, Float_t > &, ECellValue) override
This function is overridden from PDFEFoam.
virtual void CalculateMpv(std::map< Int_t, Float_t > &, const std::vector< PDEFoamCell * > &)
This function calculates the most probable target value from a given number of cells.
PDEFoamMultiTarget()
Default constructor for streamer, user should not use it.
Float_t VarTransformInvers(Int_t idim, Float_t x) const
Float_t VarTransform(Int_t idim, Float_t x) const
Double_t * fXmin
[fDim] minimum for variable transform
std::vector< TMVA::PDEFoamCell * > FindCells(const std::vector< Float_t > &) const
Find all cells, that contain txvec.
Double_t * fXmax
[fDim] maximum for variable transform
MsgLogger & Endl(MsgLogger &ml)