MINT2
CoherenceFactorStoreAndEvaluate.h
Go to the documentation of this file.
1 #ifndef COHERENCE_FACTOR_STORE_AND_EVALUATE_HH
2 #define COHERENCE_FACTOR_STORE_AND_EVALUATE_HH
3 // author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
4 // status: Mon 9 Feb 2009 19:17:59 GMT
5 //
6 // Using Equations 5 (and around that) in
7 // Phys. Rev. D 68, 033003 (2003),
8 // http://prola.aps.org/abstract/PRD/v68/i3/e033003
9 //
10 
13 
14 #include "Mint/IDalitzEvent.h"
15 #include "Mint/IEventGenerator.h"
16 
17 #include "Mint/FitAmpSum.h"
18 #include "Mint/DalitzHistoSet.h"
19 
20 #include "Mint/counted_ptr.h"
21 
22 #include <complex>
23 #include <iostream>
24 
26 
28 
29  // MINT::counted_ptr<IDalitzEvent> _dummyEvent;
30 
32  double _CSAbs;
33  double _CSPhase;
34 
37  double _precision;
38 
41  std::complex<double> _sumAxAbarStar, _sumAxAbarStarSquared;
42  // watchi it, _sumAxAbarStarSquared is (sum real^2, sum imag^2)
44  long int _tries;
45  long int _Nevents;
46 
51 
52  std::complex<double> A_Value(IDalitzEvent& evt);
53  std::complex<double> A_Value(IDalitzEvent* evtPtr){
54  if(0 == evtPtr) return 0;
55  return A_Value(*evtPtr);
56  }
57  std::complex<double> Abar_Value(IDalitzEvent& evt);
58  std::complex<double> Abar_Value(IDalitzEvent* evtPtr){
59  if(0 == evtPtr) return 0;
60  return Abar_Value(*evtPtr);
61  }
62 
63  std::complex<double> integAxAbarStar()const;
64  double integA()const;
65  double integAbar()const;
66 
67  double integASq()const;
68  double integAbarSq()const;
69 
70  std::complex<double> complexVar(std::complex<double> s
71  , std::complex<double> s_sq
72  )const;
73  double realAorAbarVar(double s, double sq)const;
74 
75  std::complex<double> cvarAxAbarStar() const;
76  double varA()const;
77  double varAbar()const;
78 
79  double varASq()const;
80  double varAbarSq()const;
81 
82  std::complex<double> Rval() const;
83 
84  double getEff(IDalitzEvent& evt);
86  if(0 == evtPtr) return 0;
87  return getEff(*evtPtr);
88  }
89 
90 
91  public:
93  , double CSAbs = 1
94  , double CSPhase = 0.0
96  , double prec=1.e-3);
97  std::complex<double> var()const;
98  std::complex<double> sigma()const;
99  double varAbs()const;
100  double sigmaAbs()const;
101  double varAngle()const;
102  double varAngleDeg()const;
103  double sigmaAngle()const;
104  double sigmaAngleDeg()const;
105  void printLong(std::ostream& os = std::cout) const;
106  void print(std::ostream& os = std::cout, const std::string& pref="") const;
107 
108  void setPrecision(double prec){_precision = prec;}
109  double estimatedPrecision() const;
110 
111  std::complex<double> getCVal();
112  double absR() const;
113  double phaseR() const;
114  double phaseRdeg() const;
115 
117 
118  const DalitzHistoSet& getHistoA() const;
119  const DalitzHistoSet& getHistoAbar() const;
120  const DalitzHistoSet& getHistoBoth() const;
121 
122  bool saveHistos(const std::string& fname = "CoherenceFactorHistos") const;
123  bool drawHistos(const std::string& fname = "CoherenceFactorHistos") const;
125  , const std::string& fname = "CoherenceFactorHistosWith"
126  , double sf=1) const;
128  , const std::string& fname = "CoherenceFactorHistosWith"
129  , double sf=1) const;
130  void scaleHistos(double sf=1);
131 
133 
134 };
135 #endif
136 //
std::complex< double > Abar_Value(IDalitzEvent &evt)
std::complex< double > complexVar(std::complex< double > s, std::complex< double > s_sq) const
bool drawHistoRatios(const CoherenceFactorStoreAndEvaluate &other, const std::string &fname="CoherenceFactorHistosWith", double sf=1) const
void printLong(std::ostream &os=std::cout) const
MINT::IReturnComplexForEvent< IDalitzEvent > * A()
static const double s
double getEff(MINT::counted_ptr< IDalitzEvent > evtPtr)
std::complex< double > A_Value(IDalitzEvent *evtPtr)
std::complex< double > cvarAxAbarStar() const
std::complex< double > integAxAbarStar() const
void print(std::ostream &os=std::cout, const std::string &pref="") const
std::complex< double > A_Value(IDalitzEvent &evt)
double realAorAbarVar(double s, double sq) const
CoherenceFactorStoreAndEvaluate(FitAmpSum &A, FitAmpSum &Abar, double CSAbs=1, double CSPhase=0.0, MINT::IReturnRealForEvent< IDalitzEvent > *eff=0, double prec=1.e-3)
bool addEvent(MINT::counted_ptr< IDalitzEvent > &evtPtr)
MINT::IReturnRealForEvent< IDalitzEvent > * _eff
std::complex< double > Abar_Value(IDalitzEvent *evtPtr)
MINT::IReturnComplexForEvent< IDalitzEvent > * Abar()
bool drawHistosWith(const CoherenceFactorStoreAndEvaluate &other, const std::string &fname="CoherenceFactorHistosWith", double sf=1) const
bool saveHistos(const std::string &fname="CoherenceFactorHistos") const
std::complex< double > getCVal()
bool drawHistos(const std::string &fname="CoherenceFactorHistos") const