LikeFCN.h
Go to the documentation of this file.
1 #ifndef _MdLDFFinderAG_LikeFCN_h_
2 #define _MdLDFFinderAG_LikeFCN_h_
3 
14 #include <Minuit2/FCNBase.h>
15 #include <vector>
16 #include <utility>
17 
18 
19 namespace MdLDFFinderAG {
20 
21  typedef std::vector<std::pair<unsigned int, unsigned int> > SegmentsOnMulti;
22 
23 
24  class LikeFCN : public ROOT::Minuit2::FCNBase {
25 
26  static const double EPSILON;
27  // set the dependent parameter to this value when pushed below 0 by the independent parameters
28 
29  public:
30  LikeFCN(const unsigned int, const std::vector<unsigned int>&, const double);
31  // Constructor without multiplicity
32 
33  LikeFCN(const unsigned int, const SegmentsOnMulti&, const double);
34  // Constructor using multiplicity (optimisation)
35 
36  double Up() const { return 0.5; } // error definition corresponding to a likelihood
37 
38  double operator()(const std::vector<double>&) const;
39 
40  double operator()(const double* const mup, const double* const) const;
41  // required by ROOT to implement a TF1 with a functor - used only for drawing purposes
42 
43  double GetMu() const { return fMuons; }
44 
45  unsigned int GetN() const { return fNumberSegments; }
46 
48 
49  private:
50  unsigned int fNumberSegments; // number of segments
51 
53  // holds the number of segments on and their multiplicity
54 
55  double fMuons; // total number of muons
56 
57  };
58 
59 }
60 
61 
62 #endif
unsigned int fNumberSegments
Definition: LikeFCN.h:50
unsigned int GetN() const
Definition: LikeFCN.h:45
double operator()(const std::vector< double > &) const
Definition: LikeFCN.cc:35
SegmentsOnMulti GetK() const
Definition: LikeFCN.h:47
SegmentsOnMulti fSegmentsOnMulti
Definition: LikeFCN.h:52
LikeFCN(const unsigned int, const std::vector< unsigned int > &, const double)
Definition: LikeFCN.cc:19
double GetMu() const
Definition: LikeFCN.h:43
static const double EPSILON
Definition: LikeFCN.h:26
double Up() const
Definition: LikeFCN.h:36
std::vector< std::pair< unsigned int, unsigned int > > SegmentsOnMulti
Definition: LikeFCN.h:21

, generated on Tue Sep 26 2023.