BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtKine.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of the EvtGen package developed jointly
5// for the BaBar and CLEO collaborations. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/COPYRIGHT
9// Copyright (C) 1998 Caltech, UCSB
10//
11// Module: EvtKine.cc
12//
13// Description: routines to calculate decay angles.
14//
15// Modification history:
16//
17// DJL/RYD September 25, 1996 Module created
18//
19//------------------------------------------------------------------------
20//
21#include "EvtKine.hh"
22#include "EvtConst.hh"
23#include "EvtPatches.hh"
24#include "EvtReport.hh"
25#include "EvtTensor4C.hh"
26#include "EvtVector4C.hh"
27#include "EvtVector4R.hh"
28#include "EvtdFunction.hh"
29#include <math.h>
30
31double EvtDecayAngle( const EvtVector4R& p, const EvtVector4R& q, const EvtVector4R& d ) {
32
33 double pd = p * d;
34 double pq = p * q;
35 double qd = q * d;
36 double mp2 = p.mass2();
37 double mq2 = q.mass2();
38 double md2 = d.mass2();
39
40 double cost =
41 ( pd * mq2 - pq * qd ) / sqrt( ( pq * pq - mq2 * mp2 ) * ( qd * qd - mq2 * md2 ) );
42
43 return cost;
44}
45
46double EvtDecayAngleChi( const EvtVector4R& p4_p, const EvtVector4R& p4_d1,
47 const EvtVector4R& p4_d2, const EvtVector4R& p4_h1,
48 const EvtVector4R& p4_h2 ) {
49
50 EvtVector4R p4_d1p, p4_h1p, p4_h2p, p4_d2p;
51
52 // boost all vectors parent restframe
53
54 p4_d1p = boostTo( p4_d1, p4_p );
55 p4_d2p = boostTo( p4_d2, p4_p );
56 p4_h1p = boostTo( p4_h1, p4_p );
57 p4_h2p = boostTo( p4_h2, p4_p );
58
59 EvtVector4R d1_perp, d1_prime, h1_perp;
61
62 D = p4_d1p + p4_d2p;
63
64 d1_perp = p4_d1p - ( D.dot( p4_d1p ) / D.dot( D ) ) * D;
65 h1_perp = p4_h1p - ( D.dot( p4_h1p ) / D.dot( D ) ) * D;
66
67 // orthogonal to both D and d1_perp
68
69 d1_prime = D.cross( d1_perp );
70
71 d1_perp = d1_perp / d1_perp.d3mag();
72 d1_prime = d1_prime / d1_prime.d3mag();
73
74 double x, y;
75
76 x = d1_perp.dot( h1_perp );
77 y = d1_prime.dot( h1_perp );
78
79 double chi = atan2( y, x );
80
81 if ( chi < 0.0 ) chi += EvtConst::twoPi;
82
83 return chi;
84}
85
87 const EvtVector4R& d1, const EvtVector4R& d2 ) {
88
89 EvtVector4C lc = dual( directProd( d1, d2 ) ).cont2( q );
90
91 EvtVector4R l( real( lc.get( 0 ) ), real( lc.get( 1 ) ), real( lc.get( 2 ) ),
92 real( lc.get( 3 ) ) );
93
94 double pq = p * q;
95
96 return q.mass() * ( p * l ) / sqrt( -( pq * pq - p.mass2() * q.mass2() ) * l.mass2() );
97}
98
99// Calculate phi using the given 4 vectors (all in the same frame)
100double EvtDecayAnglePhi( const EvtVector4R& z, const EvtVector4R& p, const EvtVector4R& q,
101 const EvtVector4R& d ) {
102 double eq = ( p * q ) / p.mass();
103 double ed = ( p * d ) / p.mass();
104 double mq = q.mass();
105 double q2 = p.mag2r3( q );
106 double qd = p.dotr3( q, d );
107 double zq = p.dotr3( z, q );
108 double zd = p.dotr3( z, d );
109 double alpha = ( eq - mq ) / ( q2 * mq ) * qd - ed / mq;
110
111 double y = p.scalartripler3( z, q, d ) + alpha * p.scalartripler3( z, q, q );
112 double x = ( zq * ( qd + alpha * q2 ) - q2 * ( zd + alpha * zq ) ) / sqrt( q2 );
113
114 double phi = atan2( y, x );
115
116 return phi < 0 ? ( phi + EvtConst::twoPi ) : phi;
117}
118
119EvtComplex wignerD( int j, int m1, int m2, double phi, double theta, double gamma ) {
120 EvtComplex gp( 0.0, -phi * m1 );
121 EvtComplex gm( 0.0, -gamma * m2 );
122 // double d = EvtdFunction::d(j, m1, m2, theta);
123
124 return exp( gp ) * EvtdFunction::d( 2 * j, 2 * m1, 2 * m2, theta ) *
125 exp( gm ); // pingrg, 2010-11-29, d(j,m1,m2,theta)->d(2*j,2*m1,2*m2,theta)consistent
126 // with Djmn in EvtHelSys
127}
Evt3Rank3C directProd(const EvtVector3C &c1, const EvtVector3C &c2, const EvtVector3C &c3)
EvtComplex exp(const EvtComplex &c)
EvtDiracSpinor boostTo(const EvtDiracSpinor &sp, const EvtVector4R p4)
double EvtDecayPlaneNormalAngle(const EvtVector4R &p, const EvtVector4R &q, const EvtVector4R &d1, const EvtVector4R &d2)
Definition EvtKine.cc:86
double EvtDecayAnglePhi(const EvtVector4R &z, const EvtVector4R &p, const EvtVector4R &q, const EvtVector4R &d)
Definition EvtKine.cc:100
double EvtDecayAngle(const EvtVector4R &p, const EvtVector4R &q, const EvtVector4R &d)
Definition EvtKine.cc:31
EvtComplex wignerD(int j, int m1, int m2, double phi, double theta, double gamma)
Definition EvtKine.cc:119
double EvtDecayAngleChi(const EvtVector4R &p4_p, const EvtVector4R &p4_d1, const EvtVector4R &p4_d2, const EvtVector4R &p4_h1, const EvtVector4R &p4_h2)
Definition EvtKine.cc:46
double alpha
EvtTensor4C dual(const EvtTensor4C &t2)
****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
static const double twoPi
Definition EvtConst.hh:28
EvtVector4C cont2(const EvtVector4C &v4) const
const EvtComplex & get(int) const
double dot(const EvtVector4R &v2) const
double mass() const
EvtVector4R cross(const EvtVector4R &v2)
double d3mag() const
double dotr3(const EvtVector4R &p1, const EvtVector4R &p2) const
double scalartripler3(const EvtVector4R &p1, const EvtVector4R &p2, const EvtVector4R &p3) const
double mag2r3(const EvtVector4R &p1) const
double mass2() const
static double d(int j, int m1, int m2, double theta)
double double * m2
Definition qcdloop1.h:83
double * m1
Definition qcdloop1.h:83