ComPWA
Common Partial-Wave-Analysis Framework
RootEfficiency.hpp
Go to the documentation of this file.
1 // Copyright (c) 2013, 2017 The ComPWA Team.
2 // This file is part of the ComPWA framework, check
3 // https://github.com/ComPWA/ComPWA/license.txt for details.
4 
5 #ifndef COMPWA_DATA_ROOTEFFICIENCY_HPP_
6 #define COMPWA_DATA_ROOTEFFICIENCY_HPP_
7 
8 #include <memory>
9 #include <vector>
10 
11 #include "Core/Efficiency.hpp"
12 
13 #include <TEfficiency.h>
14 
15 class TH1;
16 
17 namespace ComPWA {
18 namespace Data {
19 struct DataSet;
20 
21 namespace Root {
22 
27 class RootEfficiency : public Efficiency {
28 protected:
29  std::shared_ptr<TEfficiency> effHist;
30 
31 public:
33  RootEfficiency(TEfficiency *eff);
36  RootEfficiency(TH1 *passed, TH1 *total);
37  ~RootEfficiency() = default;
38 
39  virtual std::vector<double> evaluate(const DataSet &dataset) const;
40 };
41 
52 public:
53  RootAngleEfficiency(TEfficiency *eff) : RootEfficiency(eff){};
54 
55  RootAngleEfficiency(TH1 *passed, TH1 *total)
56  : RootEfficiency(passed, total){};
57 
58  ~RootAngleEfficiency() = default;
59 
60  virtual std::vector<double> evaluate(const DataSet &dataset) const;
61 };
62 
63 } // namespace Root
64 } // namespace Data
65 } // namespace ComPWA
66 
67 #endif
Uses also TEfficiency object, but the variables are one invariant mass and the corresponding helicity...
RootEfficiency(TEfficiency *eff)
Construct RootEfficiency from TEfficiency object.
Efficiency provided by a histogram.
Efficiency base class.
RootAngleEfficiency(TH1 *passed, TH1 *total)
std::shared_ptr< TEfficiency > effHist
Base class for efficiency description over the phase space.
Definition: Efficiency.hpp:23
virtual std::vector< double > evaluate(const DataSet &dataset) const