laura is hosted by Hepforge, IPPP Durham
Laura++  v3r4
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauComplex.cc
Go to the documentation of this file.
1 
2 /*
3 Copyright 2004 University of Warwick
4 
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 */
17 
18 /*
19 Laura++ package authors:
20 John Back
21 Paul Harrison
22 Thomas Latham
23 */
24 
29 /*****************************************************************************
30  * Class based on RooFit/RooComplex. *
31  * Original copyright given below. *
32  *****************************************************************************
33  * Authors: *
34  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
35  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
36  * *
37  * Copyright (c) 2000-2005, Regents of the University of California *
38  * and Stanford University. All rights reserved. *
39  * *
40  * Redistribution and use in source and binary forms, *
41  * with or without modification, are permitted according to the terms *
42  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
43  *****************************************************************************/
44 
45 #include <iostream>
46 
47 #include "LauComplex.hh"
48 
50 
51 
52 void LauComplex::print() const
53 {
54  std::cout << (*this) << std::endl;
55 }
56 
57 std::ostream& operator<<(std::ostream& os, const LauComplex& z)
58 {
59  return os<<"("<<z.re()<<","<<z.im()<<")";
60 }
61 
62 std::istream& operator>>(std::istream& ios, LauComplex& z)
63 {
64  Double_t a(0.0), b(0.0);
65  char temp;
66  ios >> temp >> a >> temp >> b >> temp;
67  z.setRealImagPart( a, b );
68  return ios;
69 }
70 
ClassImp(LauAbsCoeffSet)
Double_t re() const
Get the real part.
Definition: LauComplex.hh:219
Double_t im() const
Get the imaginary part.
Definition: LauComplex.hh:228
std::ostream & operator<<(std::ostream &os, const LauComplex &z)
Definition: LauComplex.cc:57
File containing declaration of LauComplex class.
void setRealImagPart(Double_t realpart, Double_t imagpart)
Set both real and imaginary part.
Definition: LauComplex.hh:328
Class for defining a complex number.
Definition: LauComplex.hh:61
std::istream & operator>>(std::istream &os, LauComplex &z)
input/output operator formatting of a complex number
Definition: LauComplex.cc:62
void print() const
Print the complex number.
Definition: LauComplex.cc:52