MINT2
FlexiIntegCalculator.h
Go to the documentation of this file.
1 #ifndef INTEG_CALCULATOR_HH
2 #define INTEG_CALCULATOR_HH
3 
5 #include "Mint/FitAmpPairList.h"
6 #include "Mint/counted_ptr.h"
7 #include "Mint/DalitzHistoSet.h"
8 #include "Mint/IDalitzEvent.h"
10 #include "Mint/FitFractionList.h"
11 #include <iostream>
12 
13 namespace MINT{
14  class Minimiser;
15 }
16 
17 class IntegCalculator : public virtual IIntegrationCalculator{
18  protected:
20 
23 
24  static std::string dirNameWithEff();
25  static std::string dirNameNoEff();
26  bool makeDirectories(const std::string& asSubdirOf=".")const;
27  public:
29  IntegCalculator(const IntegCalculator& other);
30  IntegCalculator(const FitAmpPairList& wEff);
33 
34  const FitAmpPairList& withEff()const {return _withEff;}
35  const FitAmpPairList& noEff()const {return _noEff;}
36 
38  void unsetEfficiency();
39  double efficiency(IDalitzEvent* evtPtr);
40 
41  virtual void addAmps(FitAmplitude* a1, FitAmplitude* a2);
42  virtual void addEvent(IDalitzEvent* evtPtr, double weight=1);
43  virtual void addEvent(MINT::counted_ptr<IDalitzEvent> evtPtr
44  , double weight=1);
45 
46  virtual void reAddEvent(IDalitzEvent* evtPtr, double weight=1);
48  , double weight=1);
49 
50  virtual bool add(const IntegCalculator& other);
51  virtual bool add(const IntegCalculator* other);
52  virtual bool add(const MINT::const_counted_ptr<IntegCalculator>& other);
53 
54  virtual bool append(const IntegCalculator& other);
55  virtual bool append(const IntegCalculator* other);
56  virtual bool append(const MINT::const_counted_ptr<IntegCalculator>& other);
57 
58  virtual int numEvents() const;
59  virtual double integral() const;
60  virtual double variance() const;
61 
62  double sumOfFitFractions() {
63  return withEff().sumOfFitFractions();
64  }
65 
68  }
69 
72  }
73 
75  return withEff().sumOfSqrtFitFractions();
76  }
77 
80  }
81 
82  virtual bool makeAndStoreFractions(MINT::Minimiser* mini=0);
83  virtual double getFractionChi2() const;
84 
85  virtual DalitzHistoSet histoSet() const;
86  virtual void saveEachAmpsHistograms(const std::string& prefix) const;
87  virtual std::vector<DalitzHistoSet> GetEachAmpsHistograms();
88 
89  virtual DalitzHistoSet interferenceHistoSet() const;
90  virtual void saveInterferenceHistograms(const std::string& prefix) const;
91  virtual std::vector<DalitzHistoSet> GetInterferenceHistograms();
92 
93  virtual void doFinalStats(MINT::Minimiser* mini=0);
94 
95  virtual bool save(const std::string& dirname) const;
96  virtual bool retrieve(const std::string& commaSeparatedList);
97  virtual bool retrieveSingle(const std::string& dirname);
98 
99  virtual FitFractionList getFractions() const;
100 
101  virtual void print(std::ostream& os=std::cout) const;
102 
103  bool needToReIntegrate() const;
104  void startIntegration();
105  void startReIntegration();
106  void endIntegration();
107 
108  virtual ~IntegCalculator(){}
109 
110 };
111 
112 #endif
113 //
virtual bool append(const IntegCalculator &other)
const FitAmpPairList & withEff() const
virtual bool retrieve(const std::string &commaSeparatedList)
virtual DalitzHistoSet interferenceHistoSet() const
virtual void saveInterferenceHistograms(const std::string &prefix) const
virtual DalitzHistoSet histoSet() const
virtual double integral() const
virtual bool save(const std::string &dirname) const
int numberOfFitFractionsLargerThanThreshold(double threshold)
virtual FitFractionList getFractions() const
virtual void print(std::ostream &os=std::cout) const
virtual std::vector< DalitzHistoSet > GetInterferenceHistograms()
const FitAmpPairList & noEff() const
static std::string dirNameWithEff()
double sumOfSqrtFitFractions()
FitAmpPairList & noEff()
virtual std::vector< DalitzHistoSet > GetEachAmpsHistograms()
virtual bool add(const IntegCalculator &other)
double absSumOfSqrtInterferenceFractions()
virtual void addAmps(FitAmplitude *a1, FitAmplitude *a2)
int numberOfFitFractionsLargerThanThreshold(double threshold)
double absSumOfInterferenceFractions()
virtual bool makeAndStoreFractions(MINT::Minimiser *mini=0)
virtual int numEvents() const
virtual MINT::counted_ptr< IIntegrationCalculator > clone_IIntegrationCalculator() const
double sumOfFitFractions()
virtual double variance() const
virtual void doFinalStats(MINT::Minimiser *mini=0)
virtual void addEvent(IDalitzEvent *evtPtr, double weight=1)
virtual bool retrieveSingle(const std::string &dirname)
bool makeDirectories(const std::string &asSubdirOf=".") const
virtual void saveEachAmpsHistograms(const std::string &prefix) const
static std::string dirNameNoEff()
virtual double getFractionChi2() const
double efficiency(IDalitzEvent *evtPtr)
FitAmpPairList _withEff
bool needToReIntegrate() const
double sumOfSqrtFitFractions()
void setEfficiency(MINT::counted_ptr< MINT::IReturnRealForEvent< IDalitzEvent > > eff)
FitAmpPairList _noEff
double absSumOfSqrtInterferenceFractions()
double absSumOfInterferenceFractions()
FitAmpPairList & withEff()
virtual void reAddEvent(IDalitzEvent *evtPtr, double weight=1)