MINT2
FitAmpList.h
Go to the documentation of this file.
1 #ifndef FITAMPLIST_HH
2 #define FITAMPLIST_HH
3 // author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
4 // status: Mon 9 Feb 2009 19:18:03 GMT
5 
6 #include <complex>
7 #include <iostream>
8 #include <ostream>
9 
10 #include "Mint/counted_ptr.h"
11 
12 #include "Mint/DalitzBoxSet.h"
13 #include "Mint/DalitzBWBoxSet.h"
14 
15 #include "Mint/FitAmpPairList.h"
16 
17 
21 #include "Mint/IntegCalculator.h"
22 #include "Mint/FitAmpListBase.h"
23 
24 class FitAmplitude;
25 namespace MINT{
26  class MinuitParameterSet;
27 }
28 
29 class FitAmpList : public FitAmpListBase
30 {
31  protected:
33  std::string _paraFName; // default: read from stdin;
34 
36 
37  std::string _opt; // option (not yet used)
38 
39  public:
41  , const char* fname=0
42  , MINT::MinuitParameterSet* pset=0
43  , const std::string& prefix=""
44  , const std::string& lineshapePrefix=""
45  , const std::string& opt=""
46  );
47 
50  , const std::string& prefix=""
51  , const std::string& lineshapePrefix=""
52  , const std::string& opt=""
53  );
55  , const std::string& prefix
56  , const std::string& lineshapePrefix=""
57  , const std::string& opt=""
58  );
59 
60  FitAmpList(const FitAmpList& other);
61  /*
62  The copy constructor copies like this: There'll be 'physical'
63  copies of all Amplitudes, but the FitParameters remain the
64  same (pointers to the same FitParameter Object). This is
65  useful for the CP-conj coding as it is now, but perhaps a bit
66  counter-intuitive. Needs to be reviewed at some point. This
67  behaviour is defined in the copy constructor of the
68  FitAmplitude class.
69  */
70 
71  // following two routines are the same for now:
72 
74 
76 
77  // if you inherit from this class, you must re-implement
78  // the clone routine below, otherwise error.
80  // ... see example in FitAmpSum. The Trick is the different new...
81 
82  virtual bool createAllAmps(const DalitzEventPattern& thePattern
83  , const std::string& prefix=""
84  , const std::string& lineshapePrefix=""
85  );
86 
87  virtual bool createAmpsFromFile(){return false;}// to be implemented later
88 
89 
90  virtual ~FitAmpList();
91 
92  virtual void printLargestAmp(IDalitzEvent& evt, std::ostream& os = std::cout);
93  virtual void printAllAmps(std::ostream& os = std::cout)const{
95 
96  virtual void printAllAmps(IDalitzEvent& evt, std::ostream& os = std::cout);
97  virtual void printNonZeroWithValue(IDalitzEvent& evt, std::ostream& os = std::cout);
98  virtual void printNonZero(std::ostream& os = std::cout) const{
100 
101 
102  friend class FitAmplitude;
103 
104  FitAmpList& operator*=(double r);
105  FitAmpList& operator*=(const std::complex<double>& z);
107 
108  FitAmpList operator*(double r) const;
109  FitAmpList operator*(const std::complex<double>& z) const;
111 
112  FitAmpList& operator=(const FitAmpList& other);
113  FitAmpList& operator+=(const FitAmpList& other);
114  FitAmpList operator+(const FitAmpList& other) const;
115 };
116 
117 FitAmpList operator*(double r, const FitAmpList& rhs);
118 FitAmpList operator*(const std::complex<double>& z, const FitAmpList& rhs);
120  , const FitAmpList& rhs);
121 
122 std::ostream& operator<<(std::ostream& os, const FitAmpList& fal);
123 
124 #endif
125 //
FitAmpList & operator+=(const FitAmpList &other)
Definition: FitAmpList.cpp:260
std::ostream & operator<<(std::ostream &os, const FitAmpList &fal)
Definition: FitAmpList.cpp:318
virtual void printLargestAmp(IDalitzEvent &evt, std::ostream &os=std::cout)
Definition: FitAmpList.cpp:231
FitAmpList & operator *=(double r)
Definition: FitAmpList.cpp:271
virtual void printNonZero(std::ostream &os=std::cout) const
virtual void printNonZero(std::ostream &os=std::cout) const
Definition: FitAmpList.h:98
virtual void printAllAmps(std::ostream &os=std::cout) const
Definition: FitAmpList.h:93
std::string _opt
Definition: FitAmpList.h:37
FitAmpList operator+(const FitAmpList &other) const
Definition: FitAmpList.cpp:264
virtual bool createAmpsFromFile()
Definition: FitAmpList.h:87
virtual void printNonZeroWithValue(IDalitzEvent &evt, std::ostream &os=std::cout)
Definition: FitAmpList.cpp:246
FitAmpList operator *(double r) const
Definition: FitAmpList.cpp:284
DalitzEventPattern _pat
Definition: FitAmpList.h:32
virtual MINT::MinuitParameterSet * getMPS()
Definition: FitAmpList.cpp:95
FitAmpList(const DalitzEventPattern &pat, const char *fname=0, MINT::MinuitParameterSet *pset=0, const std::string &prefix="", const std::string &lineshapePrefix="", const std::string &opt="")
Definition: FitAmpList.cpp:19
virtual MINT::counted_ptr< FitAmpListBase > GetCPConjugateSameFitParameters() const
Definition: FitAmpList.cpp:116
std::string _paraFName
Definition: FitAmpList.h:33
virtual MINT::counted_ptr< FitAmpListBase > GetCloneSameFitParameters() const
Definition: FitAmpList.cpp:100
virtual bool createAllAmps(const DalitzEventPattern &thePattern, const std::string &prefix="", const std::string &lineshapePrefix="")
Definition: FitAmpList.cpp:125
MINT::MinuitParameterSet * _minuitParaSet
Definition: FitAmpList.h:35
virtual void printAllAmps(std::ostream &os=std::cout) const
virtual ~FitAmpList()
Definition: FitAmpList.cpp:253
FitAmpList & operator=(const FitAmpList &other)
Definition: FitAmpList.cpp:83
FitAmpList operator *(double r, const FitAmpList &rhs)
Definition: FitAmpList.cpp:301