evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
EvtDalitzCoord.cpp
Go to the documentation of this file.
1 
2 /***********************************************************************
3 * Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4 * *
5 * This file is part of EvtGen. *
6 * *
7 * EvtGen is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * EvtGen is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU General Public License *
18 * along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19 ***********************************************************************/
20 
22 
23 #include "EvtGenBase/EvtPatches.hh"
24 
25 #include <assert.h>
26 #include <iostream>
27 using EvtCyclic3::Pair;
28 using std::endl;
29 using std::ostream;
30 
31 // For coordinates it's good to alway have a
32 // default ctor. Initialize to something invalid.
33 
35  _i1( EvtCyclic3::AB ), _i2( EvtCyclic3::BC ), _q1( -1. ), _q2( -1. )
36 {
37 }
38 
40  _i1( other._i1 ), _i2( other._i2 ), _q1( other._q1 ), _q2( other._q2 )
41 {
42 }
43 
44 EvtDalitzCoord::EvtDalitzCoord( Pair i1, double q1, Pair i2, double q2 ) :
45  _i1( i1 ), _i2( i2 ), _q1( q1 ), _q2( q2 )
46 {
47 }
48 
50 {
51  return ( _i1 == other._i1 && _i2 == other._i2 && _q1 == other._q1 &&
52  _q2 == other._q2 );
53 }
54 
55 void EvtDalitzCoord::print( ostream& os ) const
56 {
57  os << _i1 << " " << _q1 << endl;
58  os << _i2 << " " << _q2 << endl;
59 }
60 
61 ostream& operator<<( ostream& os, const EvtDalitzCoord& p )
62 {
63  p.print( os );
64  return os;
65 }
bool operator==(const EvtDalitzCoord &) const
EvtCyclic3::Pair _i2
void print(std::ostream &) const
EvtCyclic3::Pair _i1
ostream & operator<<(ostream &os, const EvtDalitzCoord &p)
Index other(Index i, Index j)
Definition: EvtCyclic3.cpp:156