BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtVPHOtoVISR.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) 2004 Cornell
10//
11// Module: EvtVPHOtoVISR.cc
12//
13// Description: Routine to decay vpho -> vector ISR photon
14//
15// Modification history:
16//
17// Ryd March 20, 2004 Module created
18//
19//------------------------------------------------------------------------
20//
21#include "EvtVPHOtoVISR.hh"
29#include <stdlib.h>
30#include <string>
31
33
34void EvtVPHOtoVISR::getName( std::string& model_name ) { model_name = "VPHOTOVISR"; }
35
37
39
40 // check that there are 0 or 2 arguments
41 checkNArg( 0, 2 );
42
43 // check that there are 2 daughters
44 checkNDaug( 2 );
45
46 // check the parent and daughter spins
50}
51
53
54 // setProbMax(100000.0);
55}
56
58
59 // take photon along z-axis, either forward or backward.
60 // Implement this as generating the photon momentum along
61 // the z-axis uniformly
62
63 double w = p->mass();
64 double s = w * w;
65
66 double L = 2.0 * log( w / 0.000511 );
67 double alpha = 1 / 137.0;
68 double beta = ( L - 1 ) * 2.0 * alpha / EvtConst::pi;
69
70 // This uses the fact that there is a daughter of the
71 // psi(3770)
72 assert( p->getDaug( 0 )->getDaug( 0 ) != 0 );
73 double md = EvtPDL::getMeanMass( p->getDaug( 0 )->getDaug( 0 )->getId() );
74
75 static double mD0 = EvtPDL::getMeanMass( EvtPDL::getId( "D0" ) );
76 static double mDp = EvtPDL::getMeanMass( EvtPDL::getId( "D+" ) );
77
78 double pgmax = ( s - 4.0 * md * md ) / ( 2.0 * w );
79
80 assert( pgmax > 0.0 );
81
82 double pgz = 0.99 * pgmax * exp( log( EvtRandom::Flat( 1.0 ) ) / beta );
83
84 if ( EvtRandom::Flat( 1.0 ) < 0.5 ) pgz = -pgz;
85
86 double k = fabs( pgz );
87
88 EvtVector4R p4g( k, 0.0, 0.0, pgz );
89
90 EvtVector4R p4res = p->getP4Restframe() - p4g;
91
92 double mres = p4res.mass();
93
94 double ed = mres / 2.0;
95
96 assert( ed > md );
97
98 double pd = sqrt( ed * ed - md * md );
99
100 // std::cout << "k, mres, w, md, ed, pd:"<<k<<" "<<mres<<" "<<w<<" "<<md<<" "<<ed<<"
101 // "<<pd<<std::endl;
102
103 p->getDaug( 0 )->init( getDaug( 0 ), p4res );
104 p->getDaug( 1 )->init( getDaug( 1 ), p4g );
105
106 double sigma =
107 beta * pow( 2 / w, beta ) *
108 ( 1 + alpha * ( 1.5 * L - 2.0 + EvtConst::pi * EvtConst::pi / 3.0 ) / EvtConst::pi );
109
110 double m = EvtPDL::getMeanMass( p->getDaug( 0 )->getId() );
111 double Gamma = EvtPDL::getWidth( p->getDaug( 0 )->getId() );
112
113 // mres is the energy of the psi(3770)
114
115 double p0 = 0.0;
116 if ( ed > mD0 ) p0 = sqrt( ed * ed - mD0 * mD0 );
117 double pp = 0.0;
118 if ( ed > mDp ) pp = sqrt( ed * ed - mDp * mDp );
119
120 double p0norm = sqrt( 0.25 * m * m - mD0 * mD0 );
121 double ppnorm = sqrt( 0.25 * m * m - mDp * mDp );
122
123 double r0 = 12.7;
124 double rp = 12.7;
125
126 if ( getNArg() == 2 )
127 {
128 r0 = getArg( 0 );
129 rp = getArg( 1 );
130 }
131
132 double GammaTot =
133 Gamma *
134 ( pp * pp * pp / ( 1 + pp * pp * rp * rp ) + p0 * p0 * p0 / ( 1 + p0 * p0 * r0 * r0 ) ) /
135 ( ppnorm * ppnorm * ppnorm / ( 1 + ppnorm * ppnorm * rp * rp ) +
136 p0norm * p0norm * p0norm / ( 1 + p0norm * p0norm * r0 * r0 ) );
137
138 sigma *= pd * pd * pd / ( ( mres - m ) * ( mres - m ) + 0.25 * GammaTot * GammaTot );
139
140 assert( sigma > 0.0 );
141
142 static double sigmax = sigma;
143
144 if ( sigma > sigmax ) { sigmax = sigma; }
145
146 static int count = 0;
147
148 count++;
149
150 // if (count%10000==0){
151 // std::cout << "sigma :"<<sigma<<std::endl;
152 // std::cout << "sigmax:"<<sigmax<<std::endl;
153 // }
154
155 double norm = sqrt( sigma );
156
157 vertex( 0, 0, 0, norm * p->eps( 0 ) * p->epsParent( 0 ).conj() );
158 vertex( 1, 0, 0, norm * p->eps( 1 ) * p->epsParent( 0 ).conj() );
159 vertex( 2, 0, 0, norm * p->eps( 2 ) * p->epsParent( 0 ).conj() );
160
161 vertex( 0, 1, 0, norm * p->eps( 0 ) * p->epsParent( 1 ).conj() );
162 vertex( 1, 1, 0, norm * p->eps( 1 ) * p->epsParent( 1 ).conj() );
163 vertex( 2, 1, 0, norm * p->eps( 2 ) * p->epsParent( 1 ).conj() );
164
165 vertex( 0, 2, 0, norm * p->eps( 0 ) * p->epsParent( 2 ).conj() );
166 vertex( 1, 2, 0, norm * p->eps( 1 ) * p->epsParent( 2 ).conj() );
167 vertex( 2, 2, 0, norm * p->eps( 2 ) * p->epsParent( 2 ).conj() );
168
169 vertex( 0, 0, 1, norm * p->eps( 0 ) * p->epsParent( 0 ).conj() );
170 vertex( 1, 0, 1, norm * p->eps( 1 ) * p->epsParent( 0 ).conj() );
171 vertex( 2, 0, 1, norm * p->eps( 2 ) * p->epsParent( 0 ).conj() );
172
173 vertex( 0, 1, 1, norm * p->eps( 0 ) * p->epsParent( 1 ).conj() );
174 vertex( 1, 1, 1, norm * p->eps( 1 ) * p->epsParent( 1 ).conj() );
175 vertex( 2, 1, 1, norm * p->eps( 2 ) * p->epsParent( 1 ).conj() );
176
177 vertex( 0, 2, 1, norm * p->eps( 0 ) * p->epsParent( 2 ).conj() );
178 vertex( 1, 2, 1, norm * p->eps( 1 ) * p->epsParent( 2 ).conj() );
179 vertex( 2, 2, 1, norm * p->eps( 2 ) * p->epsParent( 2 ).conj() );
180
181 return;
182}
EvtComplex exp(const EvtComplex &c)
DOUBLE_PRECISION count[3]
double alpha
double w
XmlRpcServer s
const double mD0
Definition MyConst.h:5
static const double pi
Definition EvtConst.hh:27
void vertex(const EvtComplex &amp)
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void checkSpinParent(EvtSpinType::spintype sp)
double getArg(int j)
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
EvtId getDaug(int i)
static double getWidth(EvtId i)
Definition EvtPDL.hh:59
static double getMeanMass(EvtId i)
Definition EvtPDL.hh:43
static EvtId getId(const std::string &name)
Definition EvtPDL.cc:272
virtual EvtVector4C epsParent(int i) const
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtId getId() const
EvtVector4R getP4Restframe()
EvtParticle * getDaug(int i)
double mass() const
virtual EvtVector4C eps(int i) const
static double Flat(double min, double max)
Definition EvtRandom.cc:55
EvtDecayBase * clone()
void decay(EvtParticle *p)
virtual ~EvtVPHOtoVISR()
void getName(std::string &name)
EvtVector4C conj() const
double mass() const