ComPWA
Common Partial-Wave-Analysis Framework
GFMinIndividual.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) Gemfony scientific UG (haftungsbeschraenkt)
3  *
4  * See the AUTHORS file in the top-level directory for a list of authors.
5  *
6  * Contact: contact [at] gemfony (dot) eu
7  *
8  * This file is part of the Geneva library collection.
9  *
10  * Geneva was developed with kind support from Karlsruhe Institute of
11  * Technology (KIT) and Steinbuch Centre for Computing (SCC). Further
12  * information about KIT and SCC can be found at http://www.kit.edu/english
13  * and http://scc.kit.edu .
14  *
15  * Geneva is free software: you can redistribute and/or modify it under
16  * the terms of version 3 of the GNU Affero General Public License
17  * as published by the Free Software Foundation.
18  *
19  * Geneva is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU Affero General Public License for more details.
23  *
24  * You should have received a copy of the GNU Affero General Public License
25  * along with the Geneva library. If not, see <http://www.gnu.org/licenses/>.
26  *
27  * For further information on Gemfony scientific and Geneva, visit
28  * http://www.gemfony.eu .
29  */
30 
31 #ifndef COMPWA_OPTIMIZER_GENEVA_GFMININDIVIDUAL_HPP_
32 #define COMPWA_OPTIMIZER_GENEVA_GFMININDIVIDUAL_HPP_
33 
34 #include "Core/FitParameter.hpp"
35 #include "Estimator/Estimator.hpp"
36 
37 // Global checks, defines and includes needed for all of Geneva
38 #include "common/GGlobalDefines.hpp"
39 
40 #include "geneva/GParameterSet.hpp"
41 
42 namespace Gem {
43 namespace Geneva {
44 
49 class GFMinIndividual : public GParameterSet {
50 public:
51  GFMinIndividual() = default;
52  GFMinIndividual(ComPWA::Estimator::Estimator<double> &estimator,
53  ComPWA::FitParameterList parlist);
54  GFMinIndividual(const GFMinIndividual &);
55  virtual ~GFMinIndividual() = default;
56 
57  const GFMinIndividual &operator=(const GFMinIndividual &);
58 
59 protected:
61  void load_(const GObject *) final;
62 
64  double fitnessCalculation() final;
65 
66 private:
67  friend class boost::serialization::access;
68 
69  template <class Archive> void serialize(Archive &ar, const unsigned int) {
70  ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(GParameterSet);
71  }
72 
74  GObject *clone_() const final;
75 
76  // default settings for the adaption
77  // TODO: overwrite these values from the user
78  const double GFI_DEF_ADPROB = 0.1;
79  const double GFI_DEF_SIGMA = 0.25;
80  const double GFI_DEF_SIGMASIGMA = 0.8;
81  const double GFI_DEF_MINSIGMA = 0.001;
82  const double GFI_DEF_MAXSIGMA = 1;
83 
84  // TODO: this should not be a pointer, but rather a smart pointer
85  // (references cannot be used here, because of the default constructor
86  // requirement)
87  ComPWA::Estimator::Estimator<double> *Estimator = nullptr;
88  std::vector<double> AllParameters;
89  std::vector<unsigned int> FreeParameterIndices;
90 };
91 
92 } /* namespace Geneva */
93 } /* namespace Gem */
94 
95 BOOST_CLASS_EXPORT_KEY(Gem::Geneva::GFMinIndividual)
96 
97 #endif
Support for serialization of std::shared_ptr (and other types) is added in boost 1.56 .
Definition: GenevaIF.hpp:23
std::vector< FitParameter< double > > FitParameterList