BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtAmplitude.hh
Go to the documentation of this file.
1/*******************************************************************************
2 * Project: BaBar detector at the SLAC PEP-II B-factory
3 * Package: EvtGenBase
4 * File: $Id: EvtAmplitude.hh,v 1.1.1.2 2007/10/26 05:03:14 pingrg Exp $
5 * Author: Alexei Dvoretskii, dvoretsk@slac.stanford.edu, 2001-2002
6 *
7 * Copyright (C) 2002 Caltech
8 *******************************************************************************/
9
10// Complex-valued amplitude
11
12#ifndef EVT_AMPLITUDE_HH
13#define EVT_AMPLITUDE_HH
14
15#include "EvtComplex.hh"
16
17template <class T> class EvtAmplitude {
18public:
21 virtual ~EvtAmplitude() {}
22 virtual EvtAmplitude<T>* clone() const = 0;
23
24 EvtComplex evaluate( const T& p ) const {
25 EvtComplex ret( 0., 0. );
26 if ( p.isValid() ) ret = amplitude( p );
27 return ret;
28 }
29
30protected:
31 // Derive in subclasses to define amplitude computation
32 // for a fully constructed amplitude object.
33
34 virtual EvtComplex amplitude( const T& ) const = 0;
35};
36
37#endif
virtual EvtAmplitude< T > * clone() const =0
EvtComplex evaluate(const T &p) const
virtual ~EvtAmplitude()
virtual EvtComplex amplitude(const T &) const =0
EvtAmplitude(const EvtAmplitude &)