18 #ifndef EVT_AMP_FACTORY_HH
19 #define EVT_AMP_FACTORY_HH
24 #include "EvtGenBase/EvtAmplitudeSum.hh"
25 #include "EvtGenBase/EvtPdfSum.hh"
26 #include "EvtGenBase/EvtMultiChannelParser.hh"
27 #include "EvtGenBase/EvtAmpPdf.hh"
28 #include "EvtGenBase/EvtPdfMax.hh"
29 #include "EvtGenBase/EvtMacros.hh"
36 : _amp(0), _ampConj(0), _pc(0), _dm(0.), _verbose(
false)
45 _verbose(other._verbose)
51 if(_ampConj)
delete _ampConj;
63 _mixAmpli = parser.mixAmpli();
64 _mixPhase = parser.mixPhase();
66 printf(
"Amplitude with %d terms\n",parser.getNAmp());
68 for(i=0;i<parser.getNAmp();i++) {
70 std::vector<std::string> v = parser.amp(i);
75 printf(
"Conj. amplitude with %d terms\n",parser.getNAmpConj());
76 for(i=0;i<parser.getNAmpConj();i++) {
78 std::vector<std::string> v = parser.ampConj(i);
83 printf(
"Calculating pole compensator integrals %d steps\n",nItg);
84 if(nItg > 0) _pc->getItg(nItg);
86 printf(
"End build\n");
89 virtual void processAmp(
EvtComplex c, std::vector<std::string> v,
bool conj =
false) = 0;
91 inline bool isCPModel()
const {
return (_ampConj->nTerms() > 0 ?
true :
false); }
92 inline double dm()
const {
return _dm; }
93 inline double mixAmpli()
const {
return _mixAmpli; }
94 inline double mixPhase()
const {
return _mixPhase; }
96 void setVerbose() { _verbose =
true; }
103 EvtPdf<T>* getPC(
int i)
const {
return _pc->getPdf(i); }
104 const char* compName(
int i)
const {
return _names[i].c_str(); }
106 EvtComplex getCoeff(
int i)
const {
return _amp->c(i); }
108 double getTermCoeff(
int i)
const {
return abs2(_amp->c(i)); }
109 double getTermCoeff(
int type,
int i,
int j)
const
113 case 0:
return 2*real(_amp->c(i)*conj(_amp->c(j)));
114 case 1:
return -2*real(_amp->c(i)*conj(_amp->c(j)));
115 case 2:
return -2*imag(_amp->c(i)*conj(_amp->c(j)));
116 case 3:
return 2*imag(_amp->c(i)*conj(_amp->c(j)));
126 std::vector<std::string> _names;