1 //--------------------------------------------------------------------------
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.
8 // Copyright Information: See EvtGen/COPYRIGHT
9 // Copyright (C) 2004 Cornell
11 // Module: EvtVPHOtoVISR.cc
13 // Description: Routine to decay vpho -> vector ISR photon
15 // Modification history:
17 // Ryd March 20, 2004 Module created
19 //------------------------------------------------------------------------
22 #include "EvtGenBase/EvtParticle.hh"
23 #include "EvtGenBase/EvtGenKine.hh"
24 #include "EvtGenBase/EvtPDL.hh"
25 #include "EvtGenBase/EvtVector4C.hh"
26 #include "EvtGenBase/EvtVector4R.hh"
27 #include "EvtGenBase/EvtReport.hh"
28 #include "EvtGenBase/EvtRandom.hh"
29 #include "EvtGenModels/EvtVPHOtoVISR.hh"
32 EvtVPHOtoVISR::~EvtVPHOtoVISR() {}
34 std::string EvtVPHOtoVISR::getName(){
41 EvtDecayBase* EvtVPHOtoVISR::clone(){
43 return new EvtVPHOtoVISR;
47 void EvtVPHOtoVISR::init(){
49 // check that there are 0 or 2 arguments
52 // check that there are 2 daughters
55 // check the parent and daughter spins
56 checkSpinParent(EvtSpinType::VECTOR);
57 checkSpinDaughter(0,EvtSpinType::VECTOR);
58 checkSpinDaughter(1,EvtSpinType::PHOTON);
61 void EvtVPHOtoVISR::initProbMax() {
63 //setProbMax(100000.0);
67 void EvtVPHOtoVISR::decay( EvtParticle *p){
69 //take photon along z-axis, either forward or backward.
70 //Implement this as generating the photon momentum along
71 //the z-axis uniformly
76 double L=2.0*log(w/0.000511);
78 double beta=(L-1)*2.0*alpha/EvtConst::pi;
80 //This uses the fact that there is a daughter of the
82 assert(p->getDaug(0)->getDaug(0)!=0);
83 double md=EvtPDL::getMeanMass(p->getDaug(0)->getDaug(0)->getId());
85 static double mD0=EvtPDL::getMeanMass(EvtPDL::getId("D0"));
86 static double mDp=EvtPDL::getMeanMass(EvtPDL::getId("D+"));
88 double pgmax=(s-4.0*md*md)/(2.0*w);
92 double pgz=0.99*pgmax*exp(log(EvtRandom::Flat(1.0))/beta);
94 if (EvtRandom::Flat(1.0)<0.5) pgz=-pgz;
98 EvtVector4R p4g(k,0.0,0.0,pgz);
100 EvtVector4R p4res=p->getP4Restframe()-p4g;
102 double mres=p4res.mass();
108 double pd=sqrt(ed*ed-md*md);
111 //std::cout << "k, mres, w, md, ed, pd:"<<k<<" "<<mres<<" "<<w<<" "<<md<<" "<<ed<<" "<<pd<<std::endl;
113 p->getDaug(0)->init(getDaug(0),p4res);
114 p->getDaug(1)->init(getDaug(1),p4g);
117 double sigma=beta*pow(2/w,beta)*(1+alpha*(1.5*L-2.0+EvtConst::pi*EvtConst::pi/3.0)/EvtConst::pi);
119 double m=EvtPDL::getMeanMass(p->getDaug(0)->getId());
120 double Gamma=EvtPDL::getWidth(p->getDaug(0)->getId());
122 //mres is the energy of the psi(3770)
125 if (ed>mD0) p0=sqrt(ed*ed-mD0*mD0);
127 if (ed>mDp) pp=sqrt(ed*ed-mDp*mDp);
129 double p0norm=sqrt(0.25*m*m-mD0*mD0);
130 double ppnorm=sqrt(0.25*m*m-mDp*mDp);
140 double GammaTot=Gamma*(pp*pp*pp/(1+pp*pp*rp*rp)+p0*p0*p0/(1+p0*p0*r0*r0))/
141 (ppnorm*ppnorm*ppnorm/(1+ppnorm*ppnorm*rp*rp)+
142 p0norm*p0norm*p0norm/(1+p0norm*p0norm*r0*r0));
145 sigma*=pd*pd*pd/((mres-m)*(mres-m)+0.25*GammaTot*GammaTot);
149 static double sigmax=sigma;
161 //if (count%10000==0){
162 // std::cout << "sigma :"<<sigma<<std::endl;
163 // std::cout << "sigmax:"<<sigmax<<std::endl;
166 double norm=sqrt(sigma);
168 vertex(0,0,0,norm*p->eps(0)*p->epsParent(0).conj());
169 vertex(1,0,0,norm*p->eps(1)*p->epsParent(0).conj());
170 vertex(2,0,0,norm*p->eps(2)*p->epsParent(0).conj());
172 vertex(0,1,0,norm*p->eps(0)*p->epsParent(1).conj());
173 vertex(1,1,0,norm*p->eps(1)*p->epsParent(1).conj());
174 vertex(2,1,0,norm*p->eps(2)*p->epsParent(1).conj());
176 vertex(0,2,0,norm*p->eps(0)*p->epsParent(2).conj());
177 vertex(1,2,0,norm*p->eps(1)*p->epsParent(2).conj());
178 vertex(2,2,0,norm*p->eps(2)*p->epsParent(2).conj());
180 vertex(0,0,1,norm*p->eps(0)*p->epsParent(0).conj());
181 vertex(1,0,1,norm*p->eps(1)*p->epsParent(0).conj());
182 vertex(2,0,1,norm*p->eps(2)*p->epsParent(0).conj());
184 vertex(0,1,1,norm*p->eps(0)*p->epsParent(1).conj());
185 vertex(1,1,1,norm*p->eps(1)*p->epsParent(1).conj());
186 vertex(2,1,1,norm*p->eps(2)*p->epsParent(1).conj());
188 vertex(0,2,1,norm*p->eps(0)*p->epsParent(2).conj());
189 vertex(1,2,1,norm*p->eps(1)*p->epsParent(2).conj());
190 vertex(2,2,1,norm*p->eps(2)*p->epsParent(2).conj());