ROOT
master
Reference Guide
Loading...
Searching...
No Matches
PDEFoamEvent.cxx
Go to the documentation of this file.
1
// @(#)root/tmva $Id$
2
// Author: Tancredi Carli, Dominik Dannheim, Alexander Voigt
3
4
/**********************************************************************************
5
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6
* Package: TMVA *
7
* Classes: PDEFoamEvent *
8
* *
9
* *
10
* Description: *
11
* Implementation. *
12
* *
13
* Authors (alphabetical): *
14
* Tancredi Carli - CERN, Switzerland *
15
* Dominik Dannheim - CERN, Switzerland *
16
* S. Jadach - Institute of Nuclear Physics, Cracow, Poland *
17
* Alexander Voigt - TU Dresden, Germany *
18
* Peter Speckmayer - CERN, Switzerland *
19
* *
20
* Copyright (c) 2008, 2010: *
21
* CERN, Switzerland *
22
* MPI-K Heidelberg, Germany *
23
* *
24
* Redistribution and use in source and binary forms, with or without *
25
* modification, are permitted according to the terms listed in LICENSE *
26
* (see tmva/doc/LICENSE) *
27
**********************************************************************************/
28
29
/*! \class TMVA::PDEFoamEvent
30
\ingroup TMVA
31
This PDEFoam variant stores in every cell the sum of event weights
32
and the sum of the squared event weights. It therefore acts as
33
event density estimator. It should be booked together with the
34
PDEFoamEventDensity density estimator, which returns the event
35
weight density at a given phase space point during the foam
36
build-up.
37
*/
38
39
#include "
TMVA/PDEFoamEvent.h
"
40
41
#include "
TMVA/Event.h
"
42
#include "
TMVA/MsgLogger.h
"
43
#include "
TMVA/PDEFoam.h
"
44
#include "
TMVA/Types.h
"
45
46
#include "
Rtypes.h
"
47
48
namespace
TMVA
{
49
class
PDEFoamCell;
50
}
51
class
TString
;
52
53
54
////////////////////////////////////////////////////////////////////////////////
55
/// Default constructor for streamer, user should not use it.
56
57
TMVA::PDEFoamEvent::PDEFoamEvent
()
58
:
PDEFoam
()
59
{
60
}
61
62
////////////////////////////////////////////////////////////////////////////////
63
64
TMVA::PDEFoamEvent::PDEFoamEvent
(
const
TString
&
name
)
65
:
PDEFoam
(
name
)
66
{}
67
68
////////////////////////////////////////////////////////////////////////////////
69
/// Copy Constructor NOT IMPLEMENTED (NEVER USED)
70
71
TMVA::PDEFoamEvent::PDEFoamEvent
(
const
PDEFoamEvent
&from)
72
:
PDEFoam
(from)
73
{
74
Log
() << kFATAL <<
"COPY CONSTRUCTOR NOT IMPLEMENTED"
<<
Endl
;
75
}
76
77
////////////////////////////////////////////////////////////////////////////////
78
/// This function fills an event weight 'wt' into the PDEFoam. Cell
79
/// element 0 is filled with the weight 'wt', and element 1 is
80
/// filled with the squared weight.
81
82
void
TMVA::PDEFoamEvent::FillFoamCells
(
const
Event
* ev,
Float_t
wt)
83
{
84
// find corresponding foam cell
85
std::vector<Float_t> values = ev->
GetValues
();
86
std::vector<Float_t> tvalues = VarTransform(values);
87
PDEFoamCell
*cell = FindCell(tvalues);
88
89
// 0. Element: Sum of event weights 'wt'
90
// 1. Element: Sum of squared event weights 'wt'
91
SetCellElement(cell, 0, GetCellElement(cell, 0) + wt);
92
SetCellElement(cell, 1, GetCellElement(cell, 1) + wt * wt);
93
}
Event.h
MsgLogger.h
PDEFoamEvent.h
PDEFoam.h
Float_t
float Float_t
Float 4 bytes (float)
Definition
RtypesCore.h:72
Rtypes.h
name
char name[80]
Definition
TGX11.cxx:142
TMVA::Event
Definition
Event.h:51
TMVA::Event::GetValues
std::vector< Float_t > & GetValues()
Definition
Event.h:94
TMVA::PDEFoamCell
Definition
PDEFoamCell.h:41
TMVA::PDEFoamEvent
This PDEFoam variant stores in every cell the sum of event weights and the sum of the squared event w...
Definition
PDEFoamEvent.h:39
TMVA::PDEFoamEvent::PDEFoamEvent
PDEFoamEvent()
Default constructor for streamer, user should not use it.
Definition
PDEFoamEvent.cxx:57
TMVA::PDEFoamEvent::FillFoamCells
void FillFoamCells(const Event *ev, Float_t wt) override
This function fills an event weight 'wt' into the PDEFoam.
Definition
PDEFoamEvent.cxx:82
TMVA::PDEFoam
Implementation of PDEFoam.
Definition
PDEFoam.h:79
TMVA::PDEFoam::Log
MsgLogger & Log() const
Definition
PDEFoam.h:240
TString
Basic string class.
Definition
TString.h:137
TMVA
create variable transformations
Definition
GeneticMinimizer.h:22
TMVA::Endl
MsgLogger & Endl(MsgLogger &ml)
Definition
MsgLogger.h:148
Types.h
tmva
tmva
src
PDEFoamEvent.cxx
ROOTmaster - Reference Guide Generated on Fri Oct 16 2026 04:43:15 (GVA Time) using Doxygen 1.10.0