BOSS
7.1.3
BESIII Offline Software System
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
x
z
Typedefs
c
d
e
g
h
i
l
m
n
o
p
r
s
t
Enumerations
Enumerator
a
b
c
d
e
f
i
k
l
m
n
o
p
r
s
t
u
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
v
w
Enumerations
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
v
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Related Symbols
:
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
v
w
x
Files
File List
File Members
All
!
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
!
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
!
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
h
i
j
k
l
m
n
p
r
s
t
u
v
w
z
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
w
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
EvtTwoBodyKine.cc
Go to the documentation of this file.
1
#include "
EvtGenBase/EvtPatches.hh
"
2
/*******************************************************************************
3
* Project: BaBar detector at the SLAC PEP-II B-factory
4
* Package: EvtGenBase
5
* File: $Id: EvtTwoBodyKine.cc,v 1.1.1.2 2007/10/26 05:03:14 pingrg Exp $
6
* Author: Alexei Dvoretskii, dvoretsk@slac.stanford.edu, 2001-2002
7
*
8
* Copyright (C) 2002 Caltech
9
*******************************************************************************/
10
11
#include <iostream>
12
#include <assert.h>
13
#include <math.h>
14
#include "
EvtGenBase/EvtTwoBodyKine.hh
"
15
#include "
EvtGenBase/EvtReport.hh
"
16
using
std::endl;
17
using
std::ostream;
18
19
20
EvtTwoBodyKine::EvtTwoBodyKine
()
21
: _mA(0.), _mB(0.), _mAB(0.)
22
{}
20
EvtTwoBodyKine::EvtTwoBodyKine
() {
…
}
23
24
EvtTwoBodyKine::EvtTwoBodyKine
(
double
mA
,
double
mB
,
double
mAB
)
25
: _mA(
mA
), _mB(
mB
), _mAB(
mAB
)
26
{
27
if
(
mAB
<
mA
+
mB
) {
28
29
report
(
INFO
,
"EvtGen"
) <<
mAB
<<
" < "
<<
mA
<<
" + "
<<
mB
<< endl;
30
assert(0);
31
}
32
}
24
EvtTwoBodyKine::EvtTwoBodyKine
(
double
mA
,
double
mB
,
double
mAB
) {
…
}
33
34
EvtTwoBodyKine::EvtTwoBodyKine
(
const
EvtTwoBodyKine
& other)
35
: _mA(other._mA), _mB(other._mB), _mAB(other._mAB)
36
{}
34
EvtTwoBodyKine::EvtTwoBodyKine
(
const
EvtTwoBodyKine
& other) {
…
}
37
38
EvtTwoBodyKine::~EvtTwoBodyKine
()
39
{}
38
EvtTwoBodyKine::~EvtTwoBodyKine
() {
…
}
40
41
42
double
EvtTwoBodyKine::m
(
Index
i)
const
43
{
44
double
ret = _mAB;
45
if
(
A
== i) ret = _mA;
46
else
47
if
(
B
== i) ret = _mB;
48
49
return
ret;
50
}
42
double
EvtTwoBodyKine::m
(
Index
i)
const
{
…
}
51
52
53
double
EvtTwoBodyKine::p
(
Index
i)
const
54
{
55
double
p0 = 0.;
56
57
if
(i ==
AB
) {
58
59
double
x = _mAB*_mAB - _mA*_mA - _mB*_mB;
60
double
y
= 2*_mA*_mB;
61
p0 = sqrt(x*x -
y
*
y
)/2./_mAB;
62
}
63
else
64
if
(i ==
A
) {
65
66
double
x = _mA*_mA - _mAB*_mAB - _mB*_mB;
67
double
y
= 2*_mAB*_mB;
68
p0 = sqrt(x*x -
y
*
y
)/2./_mA;
69
}
70
else
{
71
72
double
x = _mB*_mB - _mAB*_mAB - _mA*_mA;
73
double
y
= 2*_mAB*_mA;
74
p0 = sqrt(x*x -
y
*
y
)/2./_mB;
75
}
76
77
return
p0;
78
}
53
double
EvtTwoBodyKine::p
(
Index
i)
const
{
…
}
79
80
81
double
EvtTwoBodyKine::e
(
Index
i,
Index
j)
const
82
{
83
double
ret =
m
(i);
84
if
(i != j) {
85
86
double
pD =
p
(j);
87
ret = sqrt(ret*ret + pD*pD);
88
}
89
return
ret;
90
}
81
double
EvtTwoBodyKine::e
(
Index
i,
Index
j)
const
{
…
}
91
92
93
void
EvtTwoBodyKine::print
(ostream& os)
const
94
{
95
os <<
" mA = "
<< _mA << endl;
96
os <<
" mB = "
<< _mB << endl;
97
os <<
"mAB = "
<< _mAB << endl;
98
}
93
void
EvtTwoBodyKine::print
(ostream& os)
const
{
…
}
99
100
101
ostream&
operator<<
(ostream& os,
const
EvtTwoBodyKine
& p)
102
{
103
p.
print
(os);
104
return
os;
105
}
101
ostream&
operator<<
(ostream& os,
const
EvtTwoBodyKine
& p) {
…
}
EvtPatches.hh
report
ostream & report(Severity severity, const char *facility)
Definition
EvtReport.cc:36
EvtReport.hh
INFO
@ INFO
Definition
EvtReport.hh:52
operator<<
ostream & operator<<(ostream &os, const EvtTwoBodyKine &p)
Definition
EvtTwoBodyKine.cc:101
EvtTwoBodyKine.hh
EvtTwoBodyKine
Definition
EvtTwoBodyKine.hh:17
EvtTwoBodyKine::mB
double mB() const
Definition
EvtTwoBodyKine.hh:31
EvtTwoBodyKine::Index
Index
Definition
EvtTwoBodyKine.hh:21
EvtTwoBodyKine::A
@ A
Definition
EvtTwoBodyKine.hh:21
EvtTwoBodyKine::AB
@ AB
Definition
EvtTwoBodyKine.hh:21
EvtTwoBodyKine::B
@ B
Definition
EvtTwoBodyKine.hh:21
EvtTwoBodyKine::~EvtTwoBodyKine
~EvtTwoBodyKine()
Definition
EvtTwoBodyKine.cc:38
EvtTwoBodyKine::mAB
double mAB() const
Definition
EvtTwoBodyKine.hh:32
EvtTwoBodyKine::print
void print(std::ostream &os) const
Definition
EvtTwoBodyKine.cc:93
EvtTwoBodyKine::EvtTwoBodyKine
EvtTwoBodyKine()
Definition
EvtTwoBodyKine.cc:20
EvtTwoBodyKine::m
double m(Index i) const
Definition
EvtTwoBodyKine.cc:42
EvtTwoBodyKine::p
double p(Index i=AB) const
Definition
EvtTwoBodyKine.cc:53
EvtTwoBodyKine::mA
double mA() const
Definition
EvtTwoBodyKine.hh:30
EvtTwoBodyKine::e
double e(Index i, Index j) const
Definition
EvtTwoBodyKine.cc:81
y
double y[1000]
Definition
draw_charge_space_coarse_II.cxx:8
7.1.3
Generator
BesEvtGen
BesEvtGen-00-04-30
src
EvtGen
EvtGenBase
EvtTwoBodyKine.cc
Generated by
1.13.2