EvtAmpFactory< T > Class Template Reference

#include <EvtAmpFactory.hh>

List of all members.

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

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

Definition at line 35 of file EvtAmpFactory.hh.

00036     : _amp(0), _ampConj(0), _pc(0), _dm(0.), _verbose(false)
00037   {}

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

Definition at line 39 of file EvtAmpFactory.hh.

00040     : 
00041     _amp(other._amp ? (EvtAmplitudeSum<T>*) other._amp : 0),
00042     _ampConj(other._ampConj ? (EvtAmplitudeSum<T>*) other._ampConj : 0),
00043     _pc(other._pc ? (EvtPdfSum<T>*) other._pc : 0),
00044     _dm(other._dm),
00045     _verbose(other._verbose)
00046   {}

template<class T>
virtual EvtAmpFactory< T >::~EvtAmpFactory (  )  [inline, virtual]

Definition at line 48 of file EvtAmpFactory.hh.

00049   {
00050     if(_amp) delete _amp;
00051     if(_ampConj) delete _ampConj;
00052     if(_pc) delete _pc;
00053   }


Member Function Documentation

template<class T>
virtual void EvtAmpFactory< T >::build ( const EvtMultiChannelParser parser,
int  nItg 
) [inline, virtual]

Definition at line 57 of file EvtAmpFactory.hh.

Referenced by EvtPto3P::createFactory().

00058   {
00059     _amp = new EvtAmplitudeSum<T>();
00060     _ampConj = new EvtAmplitudeSum<T>();
00061     _pc = new EvtPdfSum<T>();
00062 
00063     printf("Amplitude with %d terms\n",parser.getNAmp());
00064     int i;
00065     for(i=0;i<parser.getNAmp();i++) {
00066       
00067       std::vector<std::string> v = parser.amp(i);
00068       EvtComplex c = parser.ampCoef(i);
00069       processAmp(c,v);
00070     }
00071     
00072     printf("Conj. amplitude with %d terms\n",parser.getNAmpConj());
00073     for(i=0;i<parser.getNAmpConj();i++) {      
00074 
00075       std::vector<std::string> v = parser.ampConj(i);
00076       EvtComplex c = parser.ampConjCoef(i);
00077       processAmp(c,v,true);
00078     }
00079    
00080     printf("Calculating pole compensator integrals %d steps\n",nItg);
00081     if(nItg > 0) _pc->getItg(nItg);
00082  
00083     printf("End build\n");
00084   }

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

Implemented in EvtPto3PAmpFactory.

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

Definition at line 99 of file EvtAmpFactory.hh.

00099 { return _names[i].c_str(); }

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

Definition at line 89 of file EvtAmpFactory.hh.

00089 { return _dm; }

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

Definition at line 97 of file EvtAmpFactory.hh.

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

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

Definition at line 94 of file EvtAmpFactory.hh.

00094 { return _amp; }

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

Definition at line 95 of file EvtAmpFactory.hh.

00095 { return _ampConj; }

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

Definition at line 101 of file EvtAmpFactory.hh.

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

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

Definition at line 98 of file EvtAmpFactory.hh.

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

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

Definition at line 96 of file EvtAmpFactory.hh.

00096 { return _pc; }

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

Definition at line 104 of file EvtAmpFactory.hh.

00105   {
00106     switch(type) {
00107 
00108     case 0: return 2*real(_amp->c(i)*conj(_amp->c(j)));  //posre
00109     case 1: return -2*real(_amp->c(i)*conj(_amp->c(j))); //negre
00110     case 2: return -2*imag(_amp->c(i)*conj(_amp->c(j)));  //posim
00111     case 3: return 2*imag(_amp->c(i)*conj(_amp->c(j)));  //negim
00112     default: assert(0);
00113     }
00114   }

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

Definition at line 103 of file EvtAmpFactory.hh.

00103 { return abs2(_amp->c(i)); }

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

Definition at line 88 of file EvtAmpFactory.hh.

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

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< EvtDalitzPoint >::build().

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

Definition at line 91 of file EvtAmpFactory.hh.

00091 { _verbose = true; }


Member Data Documentation

template<class T>
EvtAmplitudeSum<T>* EvtAmpFactory< T >::_amp [protected]

Definition at line 118 of file EvtAmpFactory.hh.

Referenced by EvtAmpFactory< EvtDalitzPoint >::build(), EvtAmpFactory< EvtDalitzPoint >::getAmp(), EvtAmpFactory< EvtDalitzPoint >::getCoeff(), EvtAmpFactory< EvtDalitzPoint >::getTermCoeff(), and EvtAmpFactory< EvtDalitzPoint >::~EvtAmpFactory().

template<class T>
EvtAmplitudeSum<T>* EvtAmpFactory< T >::_ampConj [protected]

Definition at line 119 of file EvtAmpFactory.hh.

Referenced by EvtAmpFactory< EvtDalitzPoint >::build(), EvtAmpFactory< EvtDalitzPoint >::getAmpConj(), EvtAmpFactory< EvtDalitzPoint >::isCPModel(), and EvtAmpFactory< EvtDalitzPoint >::~EvtAmpFactory().

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

Definition at line 123 of file EvtAmpFactory.hh.

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

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

Definition at line 121 of file EvtAmpFactory.hh.

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

template<class T>
EvtPdfSum<T>* EvtAmpFactory< T >::_pc [protected]

Definition at line 120 of file EvtAmpFactory.hh.

Referenced by EvtAmpFactory< EvtDalitzPoint >::build(), EvtAmpFactory< EvtDalitzPoint >::getPC(), and EvtAmpFactory< EvtDalitzPoint >::~EvtAmpFactory().

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

Definition at line 124 of file EvtAmpFactory.hh.

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


Generated on Tue Nov 29 23:18:51 2016 for BOSS_7.0.2 by  doxygen 1.4.7