CGEM BOSS 6.6.5.g
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, [email protected], 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
16
17template <class T>
19public:
20
23 virtual ~EvtAmplitude() {}
24 virtual EvtAmplitude<T>* clone() const = 0;
25
26 EvtComplex evaluate(const T& p) const
27 {
28 EvtComplex ret(0.,0.);
29 if(p.isValid()) ret = amplitude(p);
30 return ret;
31 }
32
33protected:
34
35 // Derive in subclasses to define amplitude computation
36 // for a fully constructed amplitude object.
37
38 virtual EvtComplex amplitude(const T&) const = 0;
39
40};
41
42#endif
43
44
45
46
47
virtual EvtAmplitude< T > * clone() const =0
EvtComplex evaluate(const T &p) const
Definition: EvtAmplitude.hh:26
virtual ~EvtAmplitude()
Definition: EvtAmplitude.hh:23
virtual EvtComplex amplitude(const T &) const =0
EvtAmplitude(const EvtAmplitude &)
Definition: EvtAmplitude.hh:22