BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtDalitzPoint.cc
Go to the documentation of this file.
1#include "EvtPatches.hh"
2/*******************************************************************************
3 * Project: BaBar detector at the SLAC PEP-II B-factory
4 * Package: EvtGenBase
5 * File: $Id: EvtDalitzPoint.cc,v 1.2 2007/11/20 08:36:27 pingrg Exp $
6 * Author: Alexei Dvoretskii, dvoretsk@slac.stanford.edu, 2001-2002
7 *
8 * Copyright (C) 2002 Caltech
9 *******************************************************************************/
10
11#include "EvtDalitzPoint.hh"
12#include "EvtPatches.hh"
13#include <assert.h>
14#include <math.h>
15#include <stdio.h>
16using namespace EvtCyclic3;
17
19 : _mA( -1. ), _mB( -1. ), _mC( -1. ), _qAB( -1. ), _qBC( -1. ), _qCA( -1. ) {}
20
21EvtDalitzPoint::EvtDalitzPoint( double mA, double mB, double mC, double qAB, double qBC,
22 double qCA )
23 : _mA( mA ), _mB( mB ), _mC( mC ), _qAB( qAB ), _qBC( qBC ), _qCA( qCA ) {}
24
25// Constructor from Zemach coordinates
26
27EvtDalitzPoint::EvtDalitzPoint( double mA, double mB, double mC, EvtCyclic3::Pair i,
28 double qres, double qhel, double qsum )
29 : _mA( mA ), _mB( mB ), _mC( mC ) {
30 double qi = qres + qsum / 3.;
31 double qj = -qres / 2. + qhel + qsum / 3.;
32 double qk = -qres / 2. - qhel + qsum / 3.;
33
34 if ( i == AB )
35 {
36 _qAB = qi;
37 _qBC = qj;
38 _qCA = qk;
39 }
40 else if ( i == BC )
41 {
42 _qAB = qk;
43 _qBC = qi;
44 _qCA = qj;
45 }
46 else if ( i == CA )
47 {
48 _qAB = qj;
49 _qBC = qk;
50 _qCA = qi;
51 }
52}
53
55 : _mA( dp.m( A ) ), _mB( dp.m( B ) ), _mC( dp.m( C ) ) {
56 if ( x.pair1() == AB ) _qAB = x.q1();
57 else if ( x.pair2() == AB ) _qAB = x.q2();
58 else _qAB = dp.sum() - x.q1() - x.q2();
59
60 if ( x.pair1() == BC ) _qBC = x.q1();
61 else if ( x.pair2() == BC ) _qBC = x.q2();
62 else _qBC = dp.sum() - x.q1() - x.q2();
63
64 if ( x.pair1() == CA ) _qCA = x.q1();
65 else if ( x.pair2() == CA ) _qCA = x.q2();
66 else _qCA = dp.sum() - x.q1() - x.q2();
67}
68
70 : _mA( other._mA )
71 , _mB( other._mB )
72 , _mC( other._mC )
73 , _qAB( other._qAB )
74 , _qBC( other._qBC )
75 , _qCA( other._qCA ) {}
76
78
80 double ret = _qAB;
81 if ( BC == i ) ret = _qBC;
82 else if ( CA == i ) ret = _qCA;
83
84 return ret;
85}
86
88 double ret = _mA;
89 if ( B == i ) ret = _mB;
90 else if ( C == i ) ret = _mC;
91
92 return ret;
93}
94
95// Zemach variables
96
98 return ( 2. * q( i ) - q( EvtCyclic3::prev( i ) ) - q( EvtCyclic3::next( i ) ) ) / 3.;
99}
101 Pair j = next( i );
102 Pair k = prev( i );
103 return ( q( j ) - q( k ) ) / 2.;
104}
105double EvtDalitzPoint::qsum() const { return _qAB + _qBC + _qCA; }
106
109 return dp.qMin( i, j, q( j ) );
110}
111
114 return dp.qMax( i, j, q( j ) );
115}
116
118 if ( i == j ) return m( i ) * m( i );
119 else return ( q( combine( i, j ) ) - m( i ) * m( i ) - m( j ) * m( j ) ) / 2.;
120}
121
124 return dp.e( i, j, q( j ) );
125}
126
129 return dp.p( i, j, q( j ) );
130}
131
134 return dp.cosTh( pairAng, q( pairAng ), pairRes, q( pairRes ) );
135}
136
140
142 return EvtDalitzPlot( _mA, _mB, _mC, bigM() );
143}
144
146 // Check masses
147
148 double M = bigM();
149 if ( _mA < 0 || _mB < 0 || _mC < 0 || M <= 0 ) return false;
150 if ( M < _mA + _mB + _mC ) return false;
151
152 // Check that first coordinate is within absolute limits
153
154 bool inside = false;
156
157 if ( dp.qAbsMin( AB ) <= _qAB && _qAB <= dp.qAbsMax( AB ) )
158 if ( qMin( BC, AB ) <= _qBC && _qBC <= qMax( BC, AB ) ) inside = true;
159
160 return inside;
161}
162
163double EvtDalitzPoint::bigM() const {
164 return sqrt( _qAB + _qBC + _qCA - _mA * _mA - _mB * _mB - _mC * _mC );
165}
166
169 printf( "%f %f %f\n", _qAB, _qBC, _qCA );
170}
****INTEGER imax DOUBLE PRECISION m_pi *DOUBLE PRECISION m_amfin DOUBLE PRECISION m_Chfin DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_sinw2 DOUBLE PRECISION m_GFermi DOUBLE PRECISION m_MfinMin DOUBLE PRECISION m_ta2 INTEGER m_out INTEGER m_KeyFSR INTEGER m_KeyQCD *COMMON c_Semalib $ !copy of input $ !CMS energy $ !beam mass $ !final mass $ !beam charge $ !final charge $ !smallest final mass $ !Z mass $ !Z width $ !EW mixing angle $ !Gmu Fermi $ alphaQED at q
Definition KKsem.h:33
double qAbsMin(EvtCyclic3::Pair i) const
void print() const
double sum() const
double p(EvtCyclic3::Index i, EvtCyclic3::Pair j, double q) const
double qMin(EvtCyclic3::Pair i, EvtCyclic3::Pair j, double q) const
double qAbsMax(EvtCyclic3::Pair i) const
double qMax(EvtCyclic3::Pair i, EvtCyclic3::Pair j, double q) const
double e(EvtCyclic3::Index i, EvtCyclic3::Pair j, double q) const
double cosTh(EvtCyclic3::Pair i1, double q1, EvtCyclic3::Pair i2, double q2) const
double p(EvtCyclic3::Index i, EvtCyclic3::Pair j) const
double bigM() const
double e(EvtCyclic3::Index i, EvtCyclic3::Pair j) const
double m(EvtCyclic3::Index) const
void print() const
double q(EvtCyclic3::Pair) const
double qMin(EvtCyclic3::Pair i, EvtCyclic3::Pair j) const
bool isValid() const
double qsum() const
EvtDalitzCoord getDalitzPoint(EvtCyclic3::Pair i, EvtCyclic3::Pair j) const
double qMax(EvtCyclic3::Pair i, EvtCyclic3::Pair j) const
double pp(EvtCyclic3::Index i, EvtCyclic3::Index j) const
double cosTh(EvtCyclic3::Pair pairAng, EvtCyclic3::Pair pairRes) const
EvtDalitzPlot getDalitzPlot() const
double qhel(EvtCyclic3::Pair i) const
double qres(EvtCyclic3::Pair i) const
Index next(Index i)
Pair combine(Index i, Index j)
Index prev(Index i)
Definition EvtCyclic3.cc:94
Index other(Index i, Index j)