ROOT
6.18/05
Reference Guide
tmva
tmva
src
BDTEventWrapper.cxx
Go to the documentation of this file.
1
/**********************************************************************************
2
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
3
* Package: TMVA *
4
* Class : BDTEventWrapper *
5
* Web : http://tmva.sourceforge.net *
6
* *
7
* Description: *
8
* *
9
* *
10
* Author: Doug Schouten (dschoute@sfu.ca) *
11
* *
12
* *
13
* Copyright (c) 2007: *
14
* CERN, Switzerland *
15
* MPI-K Heidelberg, Germany *
16
* U. of Texas at Austin, USA *
17
* *
18
* Redistribution and use in source and binary forms, with or without *
19
* modification, are permitted according to the terms listed in LICENSE *
20
* (http://tmva.sourceforge.net/LICENSE) *
21
**********************************************************************************/
22
23
#include "
TMVA/BDTEventWrapper.h
"
24
25
/*! \class TMVA::BDTEventWrapper
26
\ingroup TMVA
27
*/
28
29
#include "
RtypesCore.h
"
30
31
using namespace
TMVA
;
32
33
////////////////////////////////////////////////////////////////////////////////
34
/// Constructor.
35
36
BDTEventWrapper::BDTEventWrapper(
const
Event
*
e
) : fEvent(
e
) {
37
38
fBkgWeight
= 0.0;
39
fSigWeight
= 0.0;
40
}
41
42
////////////////////////////////////////////////////////////////////////////////
43
/// Destructor.
44
45
BDTEventWrapper::~BDTEventWrapper
() {
46
}
47
48
////////////////////////////////////////////////////////////////////////////////
49
/// Set the accumulated weight, for sorted signal/background events
50
///
51
/// @param fType - true for signal, false for background
52
/// @param weight - the total weight
53
54
void
BDTEventWrapper::SetCumulativeWeight
(
Bool_t
type
,
Double_t
weight) {
55
56
57
if
(
type
)
fSigWeight
= weight;
58
else
fBkgWeight
= weight;
59
}
60
61
////////////////////////////////////////////////////////////////////////////////
62
/// Get the accumulated weight
63
64
Double_t
BDTEventWrapper::GetCumulativeWeight
(
Bool_t
type
)
const
{
65
if
(
type
)
return
fSigWeight
;
66
return
fBkgWeight
;
67
}
BDTEventWrapper.h
e
#define e(i)
Definition:
RSha256.hxx:103
RtypesCore.h
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
Double_t
double Double_t
Definition:
RtypesCore.h:55
type
int type
Definition:
TGX11.cxx:120
TMVA::BDTEventWrapper::~BDTEventWrapper
~BDTEventWrapper()
Destructor.
Definition:
BDTEventWrapper.cxx:45
TMVA::BDTEventWrapper::SetCumulativeWeight
void SetCumulativeWeight(Bool_t type, Double_t weight)
Set the accumulated weight, for sorted signal/background events.
Definition:
BDTEventWrapper.cxx:54
TMVA::BDTEventWrapper::fBkgWeight
Double_t fBkgWeight
Definition:
BDTEventWrapper.h:76
TMVA::BDTEventWrapper::fSigWeight
Double_t fSigWeight
Definition:
BDTEventWrapper.h:77
TMVA::BDTEventWrapper::GetCumulativeWeight
Double_t GetCumulativeWeight(Bool_t type) const
Get the accumulated weight.
Definition:
BDTEventWrapper.cxx:64
TMVA::Event
Definition:
Event.h:52
TMVA
create variable transformations
Definition:
GeneticMinimizer.h:21