Logo ROOT  
Reference Guide
ResultsClassification.h
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Andreas Hoecker, Peter Speckmayer, Joerg Stelzer, Helge Voss
3 
4 /**********************************************************************************
5  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6  * Package: TMVA *
7  * Class : ResultsClassification *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * Base-class for result-vectors *
12  * *
13  * Authors (alphabetical): *
14  * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
15  * Peter Speckmayer <Peter.Speckmayer@cern.ch> - CERN, Switzerland *
16  * Joerg Stelzer <Joerg.Stelzer@cern.ch> - CERN, Switzerland *
17  * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany *
18  * *
19  * Copyright (c) 2006: *
20  * CERN, Switzerland *
21  * U. of Victoria, Canada *
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  * (http://tmva.sourceforge.net/LICENSE) *
27  **********************************************************************************/
28 
29 #ifndef ROOT_TMVA_ResultsClassification
30 #define ROOT_TMVA_ResultsClassification
31 
32 //////////////////////////////////////////////////////////////////////////
33 // //
34 // ResultsClassification //
35 // //
36 // Class that is the base-class for a vector of result //
37 // //
38 //////////////////////////////////////////////////////////////////////////
39 
40 #include <vector>
41 
42 #include "TMVA/Results.h"
43 
44 namespace TMVA {
45 
46  class MsgLogger;
47 
48  class ResultsClassification : public Results {
49 
50  public:
51 
52  ResultsClassification( const DataSetInfo* dsi, TString resultsName );
54 
55  // setters : set score value and type for each single event.
56  // note type=TRUE for signal and FLASE for background
57  void SetValue( Float_t value, Int_t ievt, Bool_t type );
58 
59  void Resize( Int_t entries ) {
60  fMvaValues.resize( entries );
61  fMvaValuesTypes.resize(entries);
62  }
63  using TObject::Clear;
64  virtual void Clear(Option_t *) { fMvaValues.clear(); fMvaValuesTypes.clear(); }
65 
66  // getters
67  Long64_t GetSize() const { return fMvaValues.size(); }
68  virtual const std::vector< Float_t >& operator [] ( Int_t ievt ) const { fRet[0] = fMvaValues[ievt]; return fRet; }
69  std::vector<Float_t>* GetValueVector() { return &fMvaValues; }
70  std::vector<Bool_t>* GetValueVectorTypes() { return &fMvaValuesTypes; }
71 
73 
74 
75  private:
76 
77  std::vector< Float_t > fMvaValues; // mva values (Results)
78  std::vector< Bool_t> fMvaValuesTypes;// mva values type(sig/bkg) (Results)
79  mutable std::vector< Float_t > fRet; // return val
80  mutable MsgLogger* fLogger; //! message logger
81  MsgLogger& Log() const { return *fLogger; }
82  protected:
83 
84  ClassDef(Results,2);
85 
86  };
87 }
88 
89 #endif
TMVA::ResultsClassification::ResultsClassification
ResultsClassification(const DataSetInfo *dsi, TString resultsName)
constructor
Definition: ResultsClassification.cxx:51
TMVA::ResultsClassification::Log
MsgLogger & Log() const
message logger
Definition: ResultsClassification.h:81
TMVA::ResultsClassification::GetValueVectorTypes
std::vector< Bool_t > * GetValueVectorTypes()
Definition: ResultsClassification.h:70
TMVA::ResultsClassification::Resize
void Resize(Int_t entries)
Definition: ResultsClassification.h:59
Option_t
const char Option_t
Definition: RtypesCore.h:66
TMVA::ResultsClassification::Clear
virtual void Clear(Option_t *)
Definition: ResultsClassification.h:64
TMVA::ResultsClassification::fRet
std::vector< Float_t > fRet
Definition: ResultsClassification.h:79
TMVA::ResultsClassification::fLogger
MsgLogger * fLogger
Definition: ResultsClassification.h:80
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
TMVA::ResultsClassification::fMvaValues
std::vector< Float_t > fMvaValues
Definition: ResultsClassification.h:77
Float_t
float Float_t
Definition: RtypesCore.h:57
TMVA::ResultsClassification::GetSize
Long64_t GetSize() const
Definition: ResultsClassification.h:67
TString
Basic string class.
Definition: TString.h:136
bool
TMVA::ResultsClassification::GetAnalysisType
Types::EAnalysisType GetAnalysisType()
Definition: ResultsClassification.h:72
TMVA::ResultsClassification::GetValueVector
std::vector< Float_t > * GetValueVector()
Definition: ResultsClassification.h:69
TMVA::ResultsClassification
Class that is the base-class for a vector of result.
Definition: ResultsClassification.h:48
TMVA::ResultsClassification::SetValue
void SetValue(Float_t value, Int_t ievt, Bool_t type)
set MVA response
Definition: ResultsClassification.cxx:69
TMVA::ResultsClassification::~ResultsClassification
~ResultsClassification()
destructor
Definition: ResultsClassification.cxx:61
TMVA::DataSetInfo
Class that contains all the data information.
Definition: DataSetInfo.h:62
TMVA::Types::EAnalysisType
EAnalysisType
Definition: Types.h:128
TMVA::Types::kClassification
@ kClassification
Definition: Types.h:129
TMVA::Results
Class that is the base-class for a vector of result.
Definition: Results.h:57
TMVA::ResultsClassification::fMvaValuesTypes
std::vector< Bool_t > fMvaValuesTypes
Definition: ResultsClassification.h:78
TMVA::MsgLogger
ostringstream derivative to redirect and format output
Definition: MsgLogger.h:59
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TMVA::ResultsClassification::operator[]
virtual const std::vector< Float_t > & operator[](Int_t ievt) const
Definition: ResultsClassification.h:68
type
int type
Definition: TGX11.cxx:121
Results.h
TObject::Clear
virtual void Clear(Option_t *="")
Definition: TObject.h:100
TMVA
create variable transformations
Definition: GeneticMinimizer.h:22
int