Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

EvtAmpFactory< T > Class Template Reference

#include <EvtAmpFactory.hh>

List of all members.

Public Member Functions

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

Protected Attributes

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

template<class T>
class EvtAmpFactory< T >


Constructor & Destructor Documentation

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

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

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

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]
 

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]
 

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]
 

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

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

00089 { return _dm; }

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

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

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

00094 { return _amp; }

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

00095 { return _ampConj; }

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

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

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

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

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

00096 { return _pc; }

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

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]
 

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

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

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.

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

00091 { _verbose = true; }


Member Data Documentation

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

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

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

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

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

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


The documentation for this class was generated from the following file:
Generated on Wed Feb 2 16:03:09 2011 for BOSS6.5.5 by  doxygen 1.3.9.1