CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
Genfun::EfficiencyFunctional Class Reference

#include <EfficiencyFunctional.hh>

+ Inheritance diagram for Genfun::EfficiencyFunctional:

Public Member Functions

 EfficiencyFunctional (const ArgumentList &aList)
 
 ~EfficiencyFunctional ()
 
virtual double operator[] (const AbsFunction &function) const
 
- Public Member Functions inherited from Genfun::AbsFunctional
 AbsFunctional ()
 
virtual ~AbsFunctional ()
 
virtual double operator[] (const AbsFunction &function) const =0
 

Detailed Description

Author

Definition at line 20 of file EfficiencyFunctional.hh.

Constructor & Destructor Documentation

◆ EfficiencyFunctional()

Genfun::EfficiencyFunctional::EfficiencyFunctional ( const ArgumentList aList)

Definition at line 11 of file EfficiencyFunctional.cc.

11 :
12_aList(aList)
13{}

◆ ~EfficiencyFunctional()

Genfun::EfficiencyFunctional::~EfficiencyFunctional ( )

Definition at line 15 of file EfficiencyFunctional.cc.

15 {
16}

Member Function Documentation

◆ operator[]()

double Genfun::EfficiencyFunctional::operator[] ( const AbsFunction function) const
virtual

Implements Genfun::AbsFunctional.

Definition at line 18 of file EfficiencyFunctional.cc.

18 {
19 double logEfficiency(0);
20 for (unsigned int i=0; i<_aList.size()-1;i++) {
21 Argument a = _aList[i];
22 Argument b(a.dimension()-1);
23 for (unsigned int j=0;j<b.dimension();j++) b[j]=a[j];
24 double f = function(b);
25 if (f<0 || f>1) {
26 std::cerr
27 << "Warning.. negative likelihood arg[" << i << "]=" << a << "f=" << f << std::endl;
28 }
29 logEfficiency -= (a[a.dimension()-1]>0.5) ? log(f):log(1-f);
30 }
31 return 2.0*logEfficiency;
32}
void f(void g())
Definition: excDblThrow.cc:38

The documentation for this class was generated from the following files: