66 const std::vector<Float_t>& tg,
87 const std::vector<Float_t>& tg,
88 const std::vector<Float_t>& vi,
161 UInt_t nvar = event.GetNVariables();
163 std::vector<Float_t*>::iterator itDyn=event.fValuesDynamic->begin(), itDynEnd=event.fValuesDynamic->end();
164 for (; itDyn!=itDynEnd && idx<nvar; ++itDyn){
165 Float_t value=*(*itDyn);
166 fValues.push_back( value );
170 for (; itDyn!=itDynEnd; ++itDyn){
213 for (; itDyn!=itDynEnd && idx<nvar; ++itDyn){
219 for (; itDyn!=itDynEnd; ++itDyn){
269 throw std::runtime_error(
"Spectator variable has an invalid type ");
351 (
fDynamic ?( (*fValuesDynamic).resize(ivar+1) ) :
fValues.resize(ivar+1));
361 o << *
this << std::endl;
418 os <<
"Variables [" <<
event.fValues.size() <<
"]:";
419 for (
UInt_t ivar=0; ivar<
event.fValues.size(); ++ivar)
420 os <<
" " << std::setw(10) <<
event.GetValue(ivar);
421 os <<
", targets [" <<
event.fTargets.size() <<
"]:";
422 for (
UInt_t ivar=0; ivar<
event.fTargets.size(); ++ivar)
423 os <<
" " << std::setw(10) <<
event.GetTarget(ivar);
424 os <<
", spectators ["<<
event.fSpectators.size() <<
"]:";
425 for (
UInt_t ivar=0; ivar<
event.fSpectators.size(); ++ivar)
426 os <<
" " << std::setw(10) <<
event.GetSpectator(ivar);
427 os <<
", weight: " <<
event.GetWeight();
428 os <<
", class: " <<
event.GetClass();
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
float Float_t
Float 4 bytes (float).
std::vector< Float_t > fValues
the event values ; mutable, to be able to copy the dynamic values in there
static Bool_t fgIsTraining
Double_t fWeight
event weight (product of global and individual weights)
Float_t GetValue(UInt_t ivar) const
return value of i'th variable
void SetTarget(UInt_t itgt, Float_t value)
set the target value (dimension itgt) to value
std::vector< Float_t > fTargets
target values for regression
Double_t fBoostWeight
internal weight to be set by boosting algorithm
std::vector< char > fSpectatorTypes
type of the spectator variable (typically F or I). Used ony for dynamic events
Bool_t fDynamic
is set when the dynamic values are taken
std::vector< Float_t > fSpectators
"visiting" variables not used in MVAs ; mutable, to be able to copy the dynamic values in there
UInt_t GetNSpectators() const
accessor to the number of spectators
std::vector< UInt_t > fVariableArrangement
needed for MethodCategories, where we can train on other than the main variables
~Event()
Event destructor.
std::vector< Float_t * > * fValuesDynamic
! the event values
UInt_t GetNVariables() const
accessor to the number of variables
void CopyVarValues(const Event &other)
copies only the variable values
UInt_t GetNTargets() const
accessor to the number of targets
static Bool_t fgIgnoreNegWeightsInTraining
Double_t GetWeight() const
return the event weight - depending on whether the flag IgnoreNegWeightsInTraining is or not.
void SetVal(UInt_t ivar, Float_t val)
set variable ivar to val
static void SetIsTraining(Bool_t)
when this static function is called, it sets the flag whether events with negative event weight shoul...
void SetVariableArrangement(std::vector< UInt_t > *const m) const
set the variable arrangement
Float_t GetSpectator(UInt_t ivar) const
return spectator content
void SetSpectator(UInt_t ivar, Float_t value)
set spectator value (dimension ivar) to value
Bool_t fDoNotBoost
mark event as not to be boosted (used to compensate for events with negative event weights
std::vector< Float_t > fValuesRearranged
the event values ; mutable, to be able to copy the dynamic values in there
std::vector< Float_t > & GetValues()
static void SetIgnoreNegWeightsInTraining(Bool_t)
when this static function is called, it sets the flag whether events with negative event weight shoul...
void Print(std::ostream &o) const
print method
UInt_t fClass
class number
TObject()
TObject constructor.
std::ostream & operator<<(std::ostream &os, const BinaryTree &tree)