MINT2
MultiTopHat.h
Go to the documentation of this file.
1 #ifndef MULTITOPHAT_HH
2 #define MULTITOPHAT_HH
3 // author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
4 // status: Mon 9 Feb 2009 19:18:03 GMT
5 
6 #include <iostream>
7 
8 #include "Mint/counted_ptr.h"
9 
10 #include "Mint/DalitzBoxSet.h"
11 #include "Mint/DalitzBWBoxSet.h"
12 #include "Mint/IntegCalculator.h"
13 
18 
20 
21 #include "Mint/FitAmpListBase.h"
22 
24  : virtual public MINT::IReturnRealForEvent<IDalitzEvent>
25  , virtual public MINT::IReturnComplexForEvent<IDalitzEvent>
26  , virtual public IFastAmplitudeIntegrable
27  , virtual public ILookLikeFitAmpSum
28  , public FitAmpListBase
29 {
30  protected:
31  public:
32  MultiTopHat();
33  MultiTopHat(const MultiTopHat& other);
34  MultiTopHat(const FitAmpListBase& other);
35  /*
36  The copy constructor copies like this: There'll be 'physical'
37  copies of all Amplitudes, but the FitParameters remain the
38  same (pointers to the same FitParameter Object). This is
39  useful for the CP-conj coding as it is now, but perhaps a bit
40  counter-intuitive. needs to be reviewed at some point. This
41  behaviour is defined in the copy constructor of the
42  FitAmplitude class.
43  */
45 
46 
48  , double nSigma=2){
49  return FitAmpListBase::makeBoxes(pat, this, nSigma);}
50 
52  , TRandom* rnd=gRandom){
53  return FitAmpListBase::makeBWBoxes(pat, this, rnd);}
54 
55 
56  std::complex<double> getVal(IDalitzEvent& evt);
57  std::complex<double> getVal(IDalitzEvent* evtPtr){
58  if(0 == evtPtr) return 0;
59  return getVal(*evtPtr);
60  }
61 
62 
66 
67  virtual double Prob(IDalitzEvent& evt){
68  std::complex<double> res = getVal(evt);
69  return res.real()*res.real() + res.imag()*res.imag();
70  }
71 
72  virtual std::complex<double> ComplexVal(IDalitzEvent& evt){return getVal(evt);}
73 
74  virtual double RealVal(IDalitzEvent& evt){
75  return Prob(evt);
76  }
77 
78  /*
79  virtual double SmootherLargerRealVal(){
80  return SmootherLargerProb();
81  }
82  */
83 
85  makeEventGenerator(const DalitzEventPattern& pat, TRandom* rnd=gRandom){
87  ptr(new DalitzBWBoxSet(makeBWBoxes(pat, rnd)));
88  return ptr;
89  }
90 
91  virtual void print(std::ostream& os=std::cout) const{
93  virtual void printNonZero(std::ostream& os=std::cout) const{
95 
96  virtual ~MultiTopHat();
97 
98  friend class FitAmplitude;
99 
100  MultiTopHat& operator*=(double r);
101  MultiTopHat& operator*=(const std::complex<double>& z);
103 
104  MultiTopHat operator*(double r) const;
105  MultiTopHat operator*(const std::complex<double>& z) const;
107 
108 
109  MultiTopHat& operator=(const MultiTopHat& other);
110  MultiTopHat& operator=(const FitAmpListBase& other);
111  MultiTopHat& operator+=(const MultiTopHat& other);
112  MultiTopHat operator+(const MultiTopHat& other) const;
113 
114 };
115 
116 MultiTopHat operator*(double r, const MultiTopHat& rhs);
117 MultiTopHat operator*(const std::complex<double>& z, const MultiTopHat& rhs);
119  , const MultiTopHat& rhs);
120 
121 
122 #endif
123 //
virtual ~MultiTopHat()
DalitzBWBoxSet makeBWBoxes(const DalitzEventPattern &pat, MINT::IReturnRealForEvent< IDalitzEvent > *pdf, TRandom *rnd=gRandom)
virtual MINT::counted_ptr< FitAmpPairList > makeFitAmpPairList()
virtual void printNonZero(std::ostream &os=std::cout) const
DalitzBoxSet makeBoxes(const DalitzEventPattern &pat, MINT::IReturnRealForEvent< IDalitzEvent > *pdf, double nSigma=2)
virtual MINT::counted_ptr< IntegCalculator > makeIntegCalculator()
virtual DalitzBWBoxSet makeBWBoxes(const DalitzEventPattern &pat, TRandom *rnd=gRandom)
Definition: MultiTopHat.h:51
virtual MINT::counted_ptr< MINT::IUnweightedEventGenerator< IDalitzEvent > > makeEventGenerator(const DalitzEventPattern &pat, TRandom *rnd=gRandom)
Definition: MultiTopHat.h:85
virtual double Prob(IDalitzEvent &evt)
Definition: MultiTopHat.h:67
virtual double RealVal(IDalitzEvent &evt)
Definition: MultiTopHat.h:74
MultiTopHat & operator+=(const MultiTopHat &other)
MultiTopHat operator+(const MultiTopHat &other) const
MultiTopHat & operator *=(double r)
MultiTopHat & operator=(const MultiTopHat &other)
Definition: MultiTopHat.cpp:67
virtual MINT::counted_ptr< FitAmpListBase > GetCloneSameFitParameters() const
Definition: MultiTopHat.cpp:37
std::complex< double > getVal(IDalitzEvent *evtPtr)
Definition: MultiTopHat.h:57
std::complex< double > getVal(IDalitzEvent &evt)
Definition: MultiTopHat.cpp:78
virtual MINT::counted_ptr< IIntegrationCalculator > makeIntegrationCalculator()
MultiTopHat operator *(double r, const MultiTopHat &rhs)
MultiTopHat operator *(double r) const
virtual void printNonZero(std::ostream &os=std::cout) const
Definition: MultiTopHat.h:93
virtual void print(std::ostream &os=std::cout) const
Definition: MultiTopHat.h:91
virtual std::complex< double > ComplexVal(IDalitzEvent &evt)
Definition: MultiTopHat.h:72
virtual DalitzBoxSet makeBoxes(const DalitzEventPattern &pat, double nSigma=2)
Definition: MultiTopHat.h:47
virtual void print(std::ostream &os=std::cout) const