BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtAmpFactory< T > Class Template Referenceabstract

#include <EvtAmpFactory.hh>

Public Member Functions

 EvtAmpFactory ()
 
 EvtAmpFactory (const EvtAmpFactory< T > &other)
 
virtual ~EvtAmpFactory ()
 
virtual EvtAmpFactory< T > * clone () const =0
 
virtual void build (const EvtMultiChannelParser &parser, int nItg)
 
virtual void processAmp (EvtComplex c, std::vector< std::string > v, bool conj=false)=0
 
bool isCPModel () const
 
double dm () const
 
void setVerbose ()
 
EvtAmplitudeSum< T > * getAmp () const
 
EvtAmplitudeSum< T > * getAmpConj () const
 
EvtPdfSum< T > * getPC () const
 
EvtAmplitude< T > * getAmp (int i) const
 
EvtPdf< T > * getPC (int i) const
 
const char * compName (int i) const
 
EvtComplex getCoeff (int i) const
 
double getTermCoeff (int i) const
 
double getTermCoeff (int type, int i, int j) const
 

Protected Attributes

EvtAmplitudeSum< T > * _amp
 
EvtAmplitudeSum< T > * _ampConj
 
EvtPdfSum< T > * _pc
 
std::vector< std::string > _names
 
double _dm
 
bool _verbose
 

Detailed Description

template<class T>
class EvtAmpFactory< T >

Definition at line 32 of file EvtAmpFactory.hh.

Constructor & Destructor Documentation

◆ EvtAmpFactory() [1/2]

template<class T >
EvtAmpFactory< T >::EvtAmpFactory ( )
inline

Definition at line 35 of file EvtAmpFactory.hh.

36 : _amp(0), _ampConj(0), _pc(0), _dm(0.), _verbose(false)
37 {}
EvtPdfSum< T > * _pc
EvtAmplitudeSum< T > * _ampConj
EvtAmplitudeSum< T > * _amp

◆ EvtAmpFactory() [2/2]

template<class T >
EvtAmpFactory< T >::EvtAmpFactory ( const EvtAmpFactory< T > & other)
inline

Definition at line 39 of file EvtAmpFactory.hh.

40 :
41 _amp(other._amp ? (EvtAmplitudeSum<T>*) other._amp : 0),
42 _ampConj(other._ampConj ? (EvtAmplitudeSum<T>*) other._ampConj : 0),
43 _pc(other._pc ? (EvtPdfSum<T>*) other._pc : 0),
44 _dm(other._dm),
45 _verbose(other._verbose)
46 {}
Index other(Index i, Index j)

◆ ~EvtAmpFactory()

template<class T >
virtual EvtAmpFactory< T >::~EvtAmpFactory ( )
inlinevirtual

Definition at line 48 of file EvtAmpFactory.hh.

49 {
50 if(_amp) delete _amp;
51 if(_ampConj) delete _ampConj;
52 if(_pc) delete _pc;
53 }

Member Function Documentation

◆ build()

template<class T >
virtual void EvtAmpFactory< T >::build ( const EvtMultiChannelParser & parser,
int nItg )
inlinevirtual

Definition at line 57 of file EvtAmpFactory.hh.

58 {
61 _pc = new EvtPdfSum<T>();
62
63 printf("Amplitude with %d terms\n",parser.getNAmp());
64 int i;
65 for(i=0;i<parser.getNAmp();i++) {
66
67 std::vector<std::string> v = parser.amp(i);
68 EvtComplex c = parser.ampCoef(i);
69 processAmp(c,v);
70 }
71
72 printf("Conj. amplitude with %d terms\n",parser.getNAmpConj());
73 for(i=0;i<parser.getNAmpConj();i++) {
74
75 std::vector<std::string> v = parser.ampConj(i);
76 EvtComplex c = parser.ampConjCoef(i);
77 processAmp(c,v,true);
78 }
79
80 printf("Calculating pole compensator integrals %d steps\n",nItg);
81 if(nItg > 0) _pc->getItg(nItg);
82
83 printf("End build\n");
84 }
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
virtual void processAmp(EvtComplex c, std::vector< std::string > v, bool conj=false)=0
std::vector< std::string > ampConj(int i) const
EvtComplex ampConjCoef(int i) const
std::vector< std::string > amp(int i) const
EvtComplex ampCoef(int i) const

Referenced by EvtPto3P::createFactory().

◆ clone()

template<class T >
virtual EvtAmpFactory< T > * EvtAmpFactory< T >::clone ( ) const
pure virtual

Implemented in EvtPto3PAmpFactory.

◆ compName()

template<class T >
const char * EvtAmpFactory< T >::compName ( int i) const
inline

Definition at line 99 of file EvtAmpFactory.hh.

99{ return _names[i].c_str(); }
std::vector< std::string > _names

◆ dm()

template<class T >
double EvtAmpFactory< T >::dm ( ) const
inline

Definition at line 89 of file EvtAmpFactory.hh.

89{ return _dm; }

◆ getAmp() [1/2]

template<class T >
EvtAmplitudeSum< T > * EvtAmpFactory< T >::getAmp ( ) const
inline

Definition at line 94 of file EvtAmpFactory.hh.

94{ return _amp; }

◆ getAmp() [2/2]

template<class T >
EvtAmplitude< T > * EvtAmpFactory< T >::getAmp ( int i) const
inline

Definition at line 97 of file EvtAmpFactory.hh.

97{ return _amp->getTerm(i); }

◆ getAmpConj()

template<class T >
EvtAmplitudeSum< T > * EvtAmpFactory< T >::getAmpConj ( ) const
inline

Definition at line 95 of file EvtAmpFactory.hh.

95{ return _ampConj; }

◆ getCoeff()

template<class T >
EvtComplex EvtAmpFactory< T >::getCoeff ( int i) const
inline

Definition at line 101 of file EvtAmpFactory.hh.

101{ return _amp->c(i); }

◆ getPC() [1/2]

template<class T >
EvtPdfSum< T > * EvtAmpFactory< T >::getPC ( ) const
inline

Definition at line 96 of file EvtAmpFactory.hh.

96{ return _pc; }

◆ getPC() [2/2]

template<class T >
EvtPdf< T > * EvtAmpFactory< T >::getPC ( int i) const
inline

Definition at line 98 of file EvtAmpFactory.hh.

98{ return _pc->getPdf(i); }

◆ getTermCoeff() [1/2]

template<class T >
double EvtAmpFactory< T >::getTermCoeff ( int i) const
inline

Definition at line 103 of file EvtAmpFactory.hh.

103{ return abs2(_amp->c(i)); }
double abs2(const EvtComplex &c)

◆ getTermCoeff() [2/2]

template<class T >
double EvtAmpFactory< T >::getTermCoeff ( int type,
int i,
int j ) const
inline

Definition at line 104 of file EvtAmpFactory.hh.

105 {
106 switch(type) {
107
108 case 0: return 2*real(_amp->c(i)*conj(_amp->c(j))); //posre
109 case 1: return -2*real(_amp->c(i)*conj(_amp->c(j))); //negre
110 case 2: return -2*imag(_amp->c(i)*conj(_amp->c(j))); //posim
111 case 3: return 2*imag(_amp->c(i)*conj(_amp->c(j))); //negim
112 default: assert(0);
113 }
114 }
Evt3Rank3C conj(const Evt3Rank3C &t2)
double imag(const EvtComplex &c)

◆ isCPModel()

template<class T >
bool EvtAmpFactory< T >::isCPModel ( ) const
inline

Definition at line 88 of file EvtAmpFactory.hh.

88{ return (_ampConj->nTerms() > 0 ? true : false); }

◆ processAmp()

template<class T >
virtual void EvtAmpFactory< T >::processAmp ( EvtComplex c,
std::vector< std::string > v,
bool conj = false )
pure virtual

Implemented in EvtPto3PAmpFactory.

Referenced by EvtAmpFactory< T >::build().

◆ setVerbose()

template<class T >
void EvtAmpFactory< T >::setVerbose ( )
inline

Definition at line 91 of file EvtAmpFactory.hh.

91{ _verbose = true; }

Member Data Documentation

◆ _amp

◆ _ampConj

◆ _dm

template<class T >
double EvtAmpFactory< T >::_dm
protected

Definition at line 123 of file EvtAmpFactory.hh.

Referenced by EvtAmpFactory< T >::dm().

◆ _names

template<class T >
std::vector<std::string> EvtAmpFactory< T >::_names
protected

Definition at line 121 of file EvtAmpFactory.hh.

Referenced by EvtAmpFactory< T >::compName().

◆ _pc

◆ _verbose

template<class T >
bool EvtAmpFactory< T >::_verbose
protected

Definition at line 124 of file EvtAmpFactory.hh.

Referenced by EvtAmpFactory< T >::setVerbose().


The documentation for this class was generated from the following file: