MINT2
FitAmpIncoherentSumEvtGen.h
Go to the documentation of this file.
1 #ifndef FitAmpIncoherentSumEvtGen_HH
2 #define FitAmpIncoherentSumEvtGen_HH
3 // author: Philippe d'Argent
4 
5 
6 #include <iostream>
7 #include "Mint/counted_ptr.h"
8 #include "Mint/DalitzBoxSet.h"
9 #include "Mint/DalitzBWBoxSet.h"
10 #include "Mint/IntegCalculator.h"
16 #include "Mint/FitAmpList.h"
17 #include <vector>
18 
20 : virtual public MINT::IReturnRealForEvent<IDalitzEvent>
21 , virtual public IFastAmplitudeIntegrable
22 , virtual public ILookLikeFitAmpSum
23 , public FitAmpList
24 {
25  protected:
27  static std::string IncPrefix();
28  public:
30  , const char* fname=0
31  , MINT::MinuitParameterSet* pset=0
32  , const std::string& prefix=""
33  , const std::string& lineshapePrefix=""
34  , const std::string& opt=""
35  );
36 
39  , const std::string& prefix=""
40  , const std::string& lineshapePrefix=""
41  , const std::string& opt=""
42  );
44  , const std::string& prefix
45  , const std::string& lineshapePrefix=""
46  , const std::string& opt=""
47  );
48 
51  /*
52  The copy constructor copies like this: There'll be 'physical'
53  copies of all Amplitudes, but the FitParameters remain the
54  same (pointers to the same FitParameter Object). This is
55  useful for the CP-conj coding as it is now, but perhaps a bit
56  counter-intuitive. needs to be reviewed at some point. This
57  behaviour is defined in the copy constructor of the
58  FitAmplitude class.
59  */
61 
62 
64  , double nSigma=2){
65  return FitAmpList::makeBoxes(pat, this, nSigma);}
66 
68  , TRandom* rnd=gRandom){
69  return FitAmpList::makeBWBoxes(pat, this, rnd);}
70 
71 
72  double getVal(IDalitzEvent& evt);
73  double getVal(IDalitzEvent* evtPtr){
74  if(0 == evtPtr) return 0;
75  return getVal(*evtPtr);
76  }
77 
78  virtual void Gradient(IDalitzEvent& evt,std::vector<double>& grad, MINT::MinuitParameterSet* mps);
79  virtual bool useAnalyticGradient() {return _useAnalyticGradient;}
80 
81  /*
82  double getSmootherLargerVal();
83  double getSmootherLargerVal(IDalitzEvent* evt);
84  */
85 
89 
90  virtual double Prob(IDalitzEvent& evt){
91  return getVal(evt);
92  }
93 
94  /*
95  virtual double SmootherLargerProb(){
96  return getSmootherLargerVal();
97  }
98  */
99 
100  virtual double RealVal(IDalitzEvent& evt){
101  return Prob(evt);
102  }
103 
104  /*
105  virtual double SmootherLargerRealVal(){
106  return SmootherLargerProb();
107  }
108  */
109 
111  makeEventGenerator(const DalitzEventPattern& pat, TRandom* rnd=gRandom){
113  ptr(new DalitzBWBoxSet(makeBWBoxes(pat, rnd)));
114  return ptr;
115  }
116 
117  virtual ~FitAmpIncoherentSumEvtGen();
118 
119  void printLargestAmp(std::ostream& os = std::cout);
120  virtual void printLargestAmp(IDalitzEvent& evt, std::ostream& os = std::cout){
121  FitAmpList::printLargestAmp(evt, os);}
122 
123  virtual void print(std::ostream& os=std::cout) const;
124  virtual void printNonZero(std::ostream& os=std::cout) const;
125 
126  friend class FitAmplitude;
127 
129  FitAmpIncoherentSumEvtGen& operator*=(const std::complex<double>& z);
131 
132  FitAmpIncoherentSumEvtGen operator*(double r) const;
133  FitAmpIncoherentSumEvtGen operator*(const std::complex<double>& z) const;
135 
136 
141 
142 };
143 
145 FitAmpIncoherentSumEvtGen operator*(const std::complex<double>& z, const FitAmpIncoherentSumEvtGen& rhs);
147  , const FitAmpIncoherentSumEvtGen& rhs);
148 
149 
150 #endif
151 //
FitAmpIncoherentSumEvtGen(const DalitzEventPattern &pat, const char *fname=0, MINT::MinuitParameterSet *pset=0, const std::string &prefix="", const std::string &lineshapePrefix="", const std::string &opt="")
virtual void printLargestAmp(IDalitzEvent &evt, std::ostream &os=std::cout)
Definition: FitAmpList.cpp:231
double getVal(IDalitzEvent *evtPtr)
DalitzBWBoxSet makeBWBoxes(const DalitzEventPattern &pat, MINT::IReturnRealForEvent< IDalitzEvent > *pdf, TRandom *rnd=gRandom)
DalitzBoxSet makeBoxes(const DalitzEventPattern &pat, MINT::IReturnRealForEvent< IDalitzEvent > *pdf, double nSigma=2)
void printLargestAmp(std::ostream &os=std::cout)
virtual MINT::counted_ptr< MINT::IUnweightedEventGenerator< IDalitzEvent > > makeEventGenerator(const DalitzEventPattern &pat, TRandom *rnd=gRandom)
double getVal(IDalitzEvent &evt)
virtual void print(std::ostream &os=std::cout) const
MINT::NamedParameter< int > _useAnalyticGradient
virtual double RealVal(IDalitzEvent &evt)
virtual MINT::counted_ptr< FitAmpPairList > makeFitAmpPairList()
virtual void printLargestAmp(IDalitzEvent &evt, std::ostream &os=std::cout)
FitAmpIncoherentSumEvtGen operator+(const FitAmpIncoherentSumEvtGen &other) const
virtual MINT::counted_ptr< IntegCalculator > makeIntegCalculator()
FitAmpIncoherentSumEvtGen operator *(double r) const
FitAmpIncoherentSumEvtGen operator *(double r, const FitAmpIncoherentSumEvtGen &rhs)
virtual DalitzBoxSet makeBoxes(const DalitzEventPattern &pat, double nSigma=2)
virtual MINT::counted_ptr< FitAmpListBase > GetCloneSameFitParameters() const
FitAmpIncoherentSumEvtGen & operator *=(double r)
FitAmpIncoherentSumEvtGen & operator=(const FitAmpIncoherentSumEvtGen &other)
virtual DalitzBWBoxSet makeBWBoxes(const DalitzEventPattern &pat, TRandom *rnd=gRandom)
FitAmpIncoherentSumEvtGen & operator+=(const FitAmpIncoherentSumEvtGen &other)
virtual double Prob(IDalitzEvent &evt)
virtual void printNonZero(std::ostream &os=std::cout) const
virtual MINT::counted_ptr< IIntegrationCalculator > makeIntegrationCalculator()
virtual void Gradient(IDalitzEvent &evt, std::vector< double > &grad, MINT::MinuitParameterSet *mps)