ROOTPWA
TPWAPhaseConstraint.cc
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 // File and Version Information:
3 // $Id$
4 //
5 // Description:
6 // Implementation of class TPWAPhaseConstraint
7 // see TPWAPhaseConstraint.hh for details
8 //
9 // Environment:
10 // rootpwa
11 //
12 // Author List:
13 // Sebastian Neubert TUM (original author)
14 //
15 //
16 //-----------------------------------------------------------
17 
18 
19 
20 // This Class' Header ------------------
21 #include "TPWAPhaseConstraint.h"
22 
23 
25  : _phi(phase), _master(master)
26 {}
27 
28 
29 std::complex<double>
30 TPWAPhaseConstraint::cAmp(const std::complex<double>& amp){
31  // parameter 1 is the length of the vector in C-plane
32  double phi1=std::arg(_master->amp());
33  phi1+=_phi;
34  std::complex<double> result(cos(phi1),sin(phi1));
35  return amp.real()*result;
36 }
37 
38 std::complex<double>
40  double phi1=std::arg(_master->amp());
41  phi1+=_phi;
42  std::complex<double> result(cos(phi1),sin(phi1));
43  return result;
44 }