Belle II Software  release-06-02-00
Utility.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 
11 #include <mva/interface/Interface.h>
12 #include <mva/interface/Options.h>
13 #include <mva/interface/Weightfile.h>
14 
15 namespace Belle2 {
20  namespace MVA {
21 
27  void loadRootDictionary();
28 
37  void download(const std::string& identifier, const std::string& filename, int experiment = 0, int run = 0, int event = 0);
38 
48  void upload(const std::string& filename, const std::string& identifier, int exp1 = 0, int run1 = 0, int exp2 = -1, int run2 = -1);
49 
59  void upload_array(std::vector<std::string>& filenames, const std::string& identifier, int exp1 = 0, int run1 = 0, int exp2 = -1,
60  int run2 = -1);
61 
69  bool available(const std::string& filename, int experiment = 0, int run = 0, int event = 0);
70 
76  void extract(const std::string& filename, const std::string& directory);
77 
82  std::string info(const std::string& filename);
83 
91  void save_custom_weightfile(const GeneralOptions& general_options, const SpecificOptions& specific_options,
92  const std::string& custom_weightfile, const std::string& output_identifier = "");
93 
100  void teacher(const GeneralOptions& general_options, const SpecificOptions& specific_options,
101  const MetaOptions& meta_options = MetaOptions());
102 
115  void expert(const std::vector<std::string>& filenames, const std::vector<std::string>& datafile, const std::string& treename,
116  const std::string& outputfile, int experiment = 0, int run = 0, int event = 0, bool copy_target = true);
117 
124  std::unique_ptr<Belle2::MVA::Expert> teacher_dataset(GeneralOptions general_options, const SpecificOptions& specific_options,
125  Dataset& data);
126 
133  std::unique_ptr<Belle2::MVA::Expert> teacher_splot(const GeneralOptions& general_options, const SpecificOptions& specific_options,
134  const MetaOptions& meta_options);
135 
142  std::unique_ptr<Belle2::MVA::Expert> teacher_sideband_subtraction(const GeneralOptions& general_options,
143  const SpecificOptions& specific_options,
144  const MetaOptions& meta_options);
145 
152  std::unique_ptr<Belle2::MVA::Expert> teacher_reweighting(const GeneralOptions& general_options,
153  const SpecificOptions& specific_options,
154  const MetaOptions& meta_options);
155 
156 
157  }
159 }
Abstract base class for different kinds of events.