ROOTPWA
TPWARealConstraint.h
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 // File and Version Information:
3 // $Id$
4 //
5 // Description:
6 // Contraints an amplitude to real values
7 //
8 //
9 // Environment:
10 // rootpwa
11 //
12 // Author List:
13 // Sebastian Neubert TUM (original author)
14 //
15 //
16 //-----------------------------------------------------------
17 
18 #ifndef TPWAREALCONSTRAINT_HH
19 #define TPWAREALCONSTRAINT_HH
20 
21 // Base Class Headers ----------------
22 #include "TPWAConstraint.h"
23 
24 // Collaborating Class Headers -------
25 #include <complex>
26 
27 // Collaborating Class Declarations --
28 
30 public:
31 
32  // Constructors/Destructors ---------
34  virtual ~TPWARealConstraint(){}
35 
36  virtual TPWAConstraint* clone(){return new TPWARealConstraint();}
37 
38  // Accessors -----------------------
39  virtual int npar()const {return 1;} // returns number of free parameters 0,1 or even 2
40  virtual std::string type()const {return "RealConstraint";}
41  virtual std::string parname(unsigned int i) const {return "_RE";}
42 
43  // Operations ----------------------
44  virtual std::complex<double> cAmp(const std::complex<double>& amp)
45  {return amp.real();}
46  virtual std::complex<double> dampdpar(unsigned int i)
47  {return std::complex<double>(1,0);}
48 };
49 
50 #endif
51 
52 //--------------------------------------------------------------
53 // $Log$
54 //--------------------------------------------------------------