ATLAS Offline Software
Loading...
Searching...
No Matches
FsmwMode1dFinder.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRKVERTEXSEEDFINDERUTILS_FSMWMODE1DFINDERALGO_H
6#define TRKVERTEXSEEDFINDERUTILS_FSMWMODE1DFINDERALGO_H
7
10#include <vector>
11
12namespace Trk
13{
14
34
35
36
37 class FsmwMode1dFinder final : public AthAlgTool, virtual public IMode1dFinder
38 {
39 public:
40 //default constructor due to Athena interface
41 FsmwMode1dFinder(const std::string& t, const std::string& n, const IInterface* p);
42
43 //destructor
45
46 //obtain the 1d-mode (double) from a list of doubles (unidimensional distribution)
47 virtual double getMode(std::vector<DoubleAndWeight>) const override final;
48
49 virtual double getMode(std::vector<double>) const override final;
50
51
52
53 private:
55 {
56 int operator()(const DoubleAndWeight& first,
57 const DoubleAndWeight& second) const
58 {
59 return first.first < second.first;
60 }
61 };
63 {
64 int operator()(const double& first, const double& second) const
65 {
66 return first < second;
67 }
68 };
69
70 double m_fraction;
72 };
73}
74#endif
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
virtual ~FsmwMode1dFinder()
FsmwMode1dFinder(const std::string &t, const std::string &n, const IInterface *p)
virtual double getMode(std::vector< DoubleAndWeight >) const override final
Interface class for the algotool which calculates the mode of a unidimensional distribution.
Ensure that the ATLAS eigen extensions are properly loaded.
std::pair< double, double > DoubleAndWeight
int operator()(const DoubleAndWeight &first, const DoubleAndWeight &second) const
int operator()(const double &first, const double &second) const