laura is hosted by Hepforge, IPPP Durham
Laura++  v2r0
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauComplex.cc
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2004 - 2013.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 // Authors:
7 // Thomas Latham
8 // John Back
9 // Paul Harrison
10 
15 /*****************************************************************************
16  * Class based on RooFit/RooComplex. *
17  * Original copyright given below. *
18  *****************************************************************************
19  * Authors: *
20  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
21  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
22  * *
23  * Copyright (c) 2000-2005, Regents of the University of California *
24  * and Stanford University. All rights reserved. *
25  * *
26  * Redistribution and use in source and binary forms, *
27  * with or without modification, are permitted according to the terms *
28  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
29  *****************************************************************************/
30 
31 #include <iostream>
32 
33 #include "LauComplex.hh"
34 
35 ClassImp(LauComplex)
36 
37 
38 void LauComplex::print() const
39 {
40  std::cout << (*this) << std::endl;
41 }
42 
43 std::ostream& operator<<(std::ostream& os, const LauComplex& z)
44 {
45  return os<<"("<<z.re()<<","<<z.im()<<")";
46 }
47 
48 std::istream& operator>>(std::istream& ios, LauComplex& z)
49 {
50  Double_t a(0.0), b(0.0);
51  char temp;
52  ios >> temp >> a >> temp >> b >> temp;
53  z.setRealImagPart( a, b );
54  return ios;
55 }
56 
Double_t re() const
Get the real part.
Definition: LauComplex.hh:202
Double_t im() const
Get the imaginary part.
Definition: LauComplex.hh:211
std::ostream & operator<<(std::ostream &os, const LauComplex &z)
Definition: LauComplex.cc:43
File containing declaration of LauComplex class.
void setRealImagPart(Double_t realpart, Double_t imagpart)
Set both real and imaginary part.
Definition: LauComplex.hh:311
Class for defining a complex number.
Definition: LauComplex.hh:47
std::istream & operator>>(std::istream &os, LauComplex &z)
input/output operator formatting of a complex number
Definition: LauComplex.cc:48