BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
UserDIY.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of models developed at BES collaboration
5// based on the EvtGen framework. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/BesCopyright
9// Copyright (A) 2006 Ping Rong-Gang @IHEP
10//
11// Module: EvtDIY.cc
12//
13// Description: Routine for users to create model to use the model DIY
14//
15// Modification history:
16//
17// Ping R.-G. December, 2006 Module created
18//
19//------------------------------------------------------------------------
20//
24#include <math.h>
25#include <stdlib.h>
26
32#include <string>
33using namespace std;
34
35// **** angular sample test
36
38
39public:
41 _a = alpha;
42 pd1 = p1;
43 }
44 // virtual ~AngularSam();
45 double amps();
46
47private:
48 EvtVector4R pd1;
49 double _a;
50};
51
53 double costheta = pd1.get( 3 ) / pd1.d3mag();
54 return 1 + _a * pow( costheta, 2. );
55}
56//--------------------
57
58// ******** rhopi decays without interference
59class rhopi {
60public:
62 _pd[0] = pd1;
63 _pd[1] = pd2;
64 _pd[2] = pd3;
65 }
66 double F00( double s );
67 double F10( double s );
68 double amps1( double s, int i, int j );
69 double amps();
70
71private:
72 EvtVector4R _pd[3];
73};
74
75double rhopi::F00( double s ) {
76 double mpi = 0.1395;
77 return sqrt( s - 4 * mpi * mpi ) / sqrt( s );
78}
79
80double rhopi::F10( double s ) {
81 double mpi = 0.1395, mpsi = 3.096916;
82 double tep = sqrt( ( mpsi * mpsi - pow( mpi + sqrt( s ), 2. ) ) *
83 ( mpsi * mpsi - pow( mpi - sqrt( s ), 2. ) ) );
84 return tep;
85}
86
87double rhopi::amps1( double s, int i, int j ) {
88 double mrho = 0.771, wrho = 0.1492, dpro;
89 EvtComplex img( 0.0, 1.0 );
90 dpro = pow( abs( s - mrho * mrho + img * sqrt( s ) * wrho ), 2. );
91 EvtVector4R prho;
92 prho = _pd[i] + _pd[j];
93 EvtHelSys angles( prho, _pd[i] ), labAngles;
94 double theta, phi, ct1, st1, phi1, st, ct, temp;
95 theta = angles.getHelAng( 1 );
96 phi = angles.getHelAng( 2 );
97 ct1 = labAngles.Angles( prho, 1 );
98 phi1 = labAngles.Angles( prho, 2 );
99 st = sin( theta );
100 ct = cos( theta );
101 temp = pow( F00( s ), 2. ) * pow( F10( s ), 2. ) * pow( st, 2. ) /
102 dpro; // *(1+pow(ct1,2.)+pow(st1,2.)*cos(2*(phi1+phi)));
103 return temp;
104}
105
106double rhopi::amps() {
107 double temp, s12, s13, s23;
108 s12 = ( _pd[0] + _pd[1] ).mass2();
109 s13 = ( _pd[0] + _pd[2] ).mass2();
110 s23 = ( _pd[1] + _pd[2] ).mass2();
111 temp = amps1( s12, 0, 1 ) + amps1( s13, 0, 2 ) + amps1( s23, 1, 2 );
112 return temp;
113}
114// ************** end class rhopi
115
116// ******** rhopi decays with interference
118public:
120 _pd[0] = pd1;
121 _pd[1] = pd2;
122 _pd[2] = pd3;
123 }
124 double Fij( int i, int j, double r );
125 double R00( double r );
126 EvtComplex amps1( int m, int i, int j );
127 double amps();
128
129private:
130 EvtVector4R _pd[3];
131};
132
133double rhopifull::R00( double r ) {
134 double mpi = 0.1395;
135 return r;
136}
137
138double rhopifull::Fij( int i, int j, double r ) {
139 double mpi = 0.1395, mpsi = 3.096916;
140 double temp = mpsi * r;
141 if ( i == 0 && j == 0 ) return 0;
142 if ( i == 1 && j == 0 ) return temp;
143 if ( i == -1 && j == 0 ) return -temp;
144
145 cerr << __FILE__ << ":" << __LINE__ << ": "
146 << "Should not reach here!" << endl;
147 abort();
148}
149
150EvtComplex rhopifull::amps1( int m, int i, int j ) {
151 double mrho = 0.771, wrho = 0.1492, s;
152 EvtComplex img( 0.0, 1.0 ), dpro;
153 EvtVector4R prho;
154 prho = _pd[i] + _pd[j];
155 s = prho.mass2();
156 dpro = s - mrho * mrho + img * sqrt( s ) * wrho;
157 EvtHelSys angles( prho, _pd[i] ), labAngles;
158 double theta, phi, ct1, st1, phi1, st, ct;
159 double rpp = angles.getHelAng( 0 );
160 theta = angles.getHelAng( 1 );
161 phi = angles.getHelAng( 2 );
162 ct1 = labAngles.Angles( prho, 1 );
163 phi1 = labAngles.Angles( prho, 2 );
164 int lamb;
165 EvtComplex temp( 0.0, 0.0 );
166 for ( lamb = -1; lamb <= 1; lamb++ )
167 temp = temp + Fij( lamb, 0, prho.d3mag() ) * Djmn( 1, m, lamb, phi1, ct1, 0.0 ) / dpro *
168 R00( rpp ) * Djmn( 1, lamb, 0, phi, theta, 0.0 );
169 return temp;
170}
171
173 double temp = 0.0;
174 int m;
175 for ( m = -1; m <= 1; m += 2 )
176 temp = temp + pow( abs( amps1( m, 0, 1 ) + amps1( m, 0, 2 ) + amps1( m, 1, 2 ) ), 2. );
177 return temp;
178}
179// ************** end class rhopifull
180
181//////////////////***** DIY Model
183 EvtVector4R dp1 = GetDaugMomLab( 0 );
184 EvtVector4R dp2 = GetDaugMomLab( 1 ), dp3 = GetDaugMomLab( 2 );
185
186 // AngularSam ppbar(0.7,dp1);
187 // return ppbar.amps();
188
189 // rhopi Jpsi2rhopi(dp1,dp2,dp3);
190 // return Jpsi2rhopi.amps();
191
192 rhopifull Jpsi2rhopi( dp1, dp2, dp3 );
193 return Jpsi2rhopi.amps();
194}
double p1[4]
Double_t phi1
EvtComplex Djmn(int j, int m, int n, double phi, double theta, double gamma)
Definition EvtHelSys.cc:165
double alpha
double mpi
XmlRpcServer s
AngularSam(double alpha, EvtVector4R p1)
Definition UserDIY.cc:40
double amps()
Definition UserDIY.cc:52
double AmplitudeSquare()
Definition UserDIY.cc:182
EvtVector4R GetDaugMomLab(int i)
Definition EvtDIY.hh:47
double Angles(EvtVector4R, int)
Definition EvtHelSys.cc:110
double get(int i) const
double d3mag() const
double mass2() const
double amps()
Definition UserDIY.cc:106
double F10(double s)
Definition UserDIY.cc:80
double amps1(double s, int i, int j)
Definition UserDIY.cc:87
double F00(double s)
Definition UserDIY.cc:75
rhopi(EvtVector4R pd1, EvtVector4R pd2, EvtVector4R pd3)
Definition UserDIY.cc:61
double R00(double r)
Definition UserDIY.cc:133
rhopifull(EvtVector4R pd1, EvtVector4R pd2, EvtVector4R pd3)
Definition UserDIY.cc:119
EvtComplex amps1(int m, int i, int j)
Definition UserDIY.cc:150
double amps()
Definition UserDIY.cc:172
double Fij(int i, int j, double r)
Definition UserDIY.cc:138