Trainer.hh
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "TFile.h"
7 
8 #include "TMVA/Factory.h"
9 // #include "TMVA/DataLoader.h"
10 
12 
13 namespace boca {
14 
15 namespace tagger{
16 class Base;
17 }
18 
23 class Trainer {
24 
25 public:
26 
32 
33 private:
34 
39  std::vector<double> BookMethod();
40 
44  void AddObservables();
45 
50  long AddAllTrees();
51 
52  long AddTrees(Tag tag);
53 
58  void PrepareTrainingAndTestTree(long event_number);
59 
60  long AddTree(std::string const& tree_name, Tag tag);
61 
62  long Entries(std::string const& tree_name, Tag tag);
63 
64  double Weight(std::string const& tree_name, Tag tag);
65 
66  std::string FactoryOptions();
67 
68  std::string DataLoaderOptions();
69 
70  std::string MethodOptions() const;
71 
72  tagger::Base const& Tagger() const;
73 
74  tagger::Base & Tagger();
75 
76  TMVA::Factory const& Factory() const;
77 
78  TMVA::Factory& Factory();
79 
80  TMVA::Factory & DataLoader();
81 
82 // TMVA::DataLoader data_loader_;
83 
84  tagger::Base& tagger_;
85 
86  TFile output_;
87 
88  TMVA::Factory factory_;
89 
90  std::map<Tag, TFile> input_;
91 
92 };
93 
94 }
Tag
The Tag distinguishes between signal and background events.
Definition: Tag.hh:14
Prepares multivariant analysis.
Definition: Trainer.hh:23
Boosted Collider Analysis.
Definition: Analysis.hh:15
Tagger base class using Branch template
Definition: Tagger.hh:23
::Weight Weight
Definition: TypeDef.hh:22
Prepares multivariant analysis.
Definition: Base.hh:47