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 -> (DDx) + ISR photon from 3.9 to 4.3 GeV, using CLEO-c data (Brian Lang)
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/EvtVPHOtoVISRHi.hh"
34 EvtVPHOtoVISRHi::~EvtVPHOtoVISRHi() {}
36 std::string EvtVPHOtoVISRHi::getName(){
38 return "VPHOTOVISRHI";
43 EvtDecayBase* EvtVPHOtoVISRHi::clone(){
45 return new EvtVPHOtoVISRHi;
49 void EvtVPHOtoVISRHi::init(){
51 // check that there are 0 or 1 arguments
54 // check that there are 2 daughters
57 // check the parent and daughter spins
58 checkSpinParent(EvtSpinType::VECTOR);
59 checkSpinDaughter(0,EvtSpinType::VECTOR);
60 checkSpinDaughter(1,EvtSpinType::PHOTON);
63 void EvtVPHOtoVISRHi::initProbMax() {
69 void EvtVPHOtoVISRHi::decay( EvtParticle *p){
70 //take photon along z-axis, either forward or backward.
71 //Implement this as generating the photon momentum along
72 //the z-axis uniformly
74 if (getNArg()==1) power=getArg(0);
75 // define particle names
76 static EvtId D0=EvtPDL::getId("D0");
77 static EvtId D0B=EvtPDL::getId("anti-D0");
78 static EvtId DP=EvtPDL::getId("D+");
79 static EvtId DM=EvtPDL::getId("D-");
80 static EvtId DSM=EvtPDL::getId("D_s-");
81 static EvtId DSP=EvtPDL::getId("D_s+");
82 static EvtId DSMS=EvtPDL::getId("D_s*-");
83 static EvtId DSPS=EvtPDL::getId("D_s*+");
84 static EvtId D0S=EvtPDL::getId("D*0");
85 static EvtId D0BS=EvtPDL::getId("anti-D*0");
86 static EvtId DPS=EvtPDL::getId("D*+");
87 static EvtId DMS=EvtPDL::getId("D*-");
88 // setup some parameters
91 double L=2.0*log(w/0.000511);
93 double beta=(L-1)*2.0*alpha/EvtConst::pi;
94 // make sure only 2 or 3 body are present
95 assert (p->getDaug(0)->getNDaug() == 2 || p->getDaug(0)->getNDaug() == 3);
97 // determine minimum rest mass of parent
98 double md1 = EvtPDL::getMeanMass(p->getDaug(0)->getDaug(0)->getId());
99 double md2 = EvtPDL::getMeanMass(p->getDaug(0)->getDaug(1)->getId());
100 double minResMass = md1+md2;
101 if (p->getDaug(0)->getNDaug() == 3) {
102 double md3 = EvtPDL::getMeanMass(p->getDaug(0)->getDaug(2)->getId());
103 minResMass = minResMass + md3;
106 // calculate the maximum energy of the ISR photon
107 double pgmax=(s-minResMass*minResMass)/(2.0*w);
108 double pgz=0.99*pgmax*exp(log(EvtRandom::Flat(1.0))/(beta*power));
109 if (EvtRandom::Flat(1.0)<0.5) pgz=-pgz;
112 // print of ISR energy
113 // std::cout << "Energy ISR :"<< k <<std::endl;
114 EvtVector4R p4g(k,0.0,0.0,pgz);
116 EvtVector4R p4res=p->getP4Restframe()-p4g;
118 double mres=p4res.mass();
121 p->getDaug(0)->init(getDaug(0),p4res);
122 p->getDaug(1)->init(getDaug(1),p4g);
125 // determine XS - langbw
126 // very crude way of determining XS just a simple straight line Approx.
127 // this was determined by eye.
128 // lots of cout statements to make plots to check that things are working as expected
130 if (mres<=3.9) sigma = 0.00001;
132 bool sigmacomputed(false);
134 // DETERMINE XS FOR D*D*
135 if (p->getDaug(0)->getNDaug() == 2
136 &&((p->getDaug(0)->getDaug(0)->getId()==D0S
137 && p->getDaug(0)->getDaug(1)->getId()==D0BS)
138 ||(p->getDaug(0)->getDaug(0)->getId()==DPS
139 && p->getDaug(0)->getDaug(1)->getId()==DMS))){
141 sigma*=5./9.*(1.-1.*sqrt((4.18-mres)*(4.18-mres))/(4.3-4.18));
143 else if(mres>4.07 && mres<=4.18) {
146 else if (mres<=4.07&&mres>4.03)
148 sigma*=(5./9. - 1.5/9.*sqrt((4.07-mres)*(4.07-mres))/(4.07-4.03));
150 else if (mres<=4.03&& mres>=4.013)
152 sigma*=(3.5/9. - 3.5/9.*sqrt((4.03-mres)*(4.03-mres))/(4.03-4.013));
157 sigmacomputed = true;
158 // std::cout << "DSDSXS "<<sigma<< " " << mres<<std::endl;
161 // DETERMINE XS FOR D*D
162 if(p->getDaug(0)->getNDaug() == 2 && ((p->getDaug(0)->getDaug(0)->getId()==D0S
163 && p->getDaug(0)->getDaug(1)->getId()==D0B)
164 ||(p->getDaug(0)->getDaug(0)->getId()==DPS
165 && p->getDaug(0)->getDaug(1)->getId()==DM)
166 ||(p->getDaug(0)->getDaug(0)->getId()==D0BS
167 && p->getDaug(0)->getDaug(1)->getId()==D0)
168 ||(p->getDaug(0)->getDaug(0)->getId()==DMS
169 && p->getDaug(0)->getDaug(1)->getId()==DP)) )
174 else if( mres>4.06 && mres<4.2){
175 sigma*=((1.5/9.+2.5/9.*sqrt((4.2-mres)*(4.2-mres))/(4.2-4.06)));
177 else if(mres>=4.015 && mres<4.06){
178 sigma*=((4./9.+3./9.*sqrt((4.06-mres)*(4.06-mres))/(4.06-4.015)));
180 else if (mres<4.015 && mres>=3.9){
181 sigma*=((7./9.-7/9.*sqrt((4.015-mres)*(4.015-mres))/(4.015-3.9)));
186 sigmacomputed = true;
187 // std::cout << "DSDXS "<<sigma<< " " << mres<<std::endl;
190 // DETERMINE XS FOR Ds*Ds*
191 if (((p->getDaug(0)->getDaug(0)->getId()==DSPS && p->getDaug(0)->getDaug(1)->getId()==DSMS)))
193 if(mres>(2.112+2.112)){
198 // sigma = 0 surely below Ds*Ds* threshold? - ponyisi
201 sigmacomputed = true;
202 // std::cout << "DsSDsSXS "<<sigma<< " " << mres<<std::endl;
205 // DETERMINE XS FOR Ds*Ds
206 if (p->getDaug(0)->getNDaug() == 2 && ((p->getDaug(0)->getDaug(0)->getId()==DSPS
207 && p->getDaug(0)->getDaug(1)->getId()==DSM)
208 || (p->getDaug(0)->getDaug(0)->getId()==DSMS
209 && p->getDaug(0)->getDaug(1)->getId()==DSP)))
214 else if (mres>4.18 && mres<=4.26){
215 sigma*=1./9.*(0.05+0.95*sqrt((4.26-mres)*(4.26-mres))/(4.26-4.18));
217 else if (mres>4.16 && mres<=4.18){
220 else if (mres<=4.16 && mres>4.08){
221 sigma*=1/9.*(1-sqrt((4.16-mres)*(4.16-mres))/(4.16-4.08));
223 else if (mres<=(4.08)){
226 sigmacomputed = true;
227 // std::cout << "DsSDsXS "<<sigma<< " " << mres<<std::endl;
230 // DETERMINE XS FOR DD
231 if (p->getDaug(0)->getNDaug() == 2 && ((p->getDaug(0)->getDaug(0)->getId()==D0
232 && p->getDaug(0)->getDaug(1)->getId()==D0B)
233 ||(p->getDaug(0)->getDaug(0)->getId()==DP
234 && p->getDaug(0)->getDaug(1)->getId()==DM))){
236 sigmacomputed = true;
237 // std::cout << "DDXS "<<sigma<< " " << mres<<std::endl;
240 // DETERMINE XS FOR DsDs
241 if (p->getDaug(0)->getNDaug() == 2 && ((p->getDaug(0)->getDaug(0)->getId()==DSP && p->getDaug(0)->getDaug(1)->getId()==DSM))){
243 sigmacomputed = true;
244 // std::cout << "DsDsXS "<<sigma<< " " << mres<<std::endl;
247 // DETERMINE XS FOR MULTIBODY
248 if (p->getDaug(0)->getNDaug() == 3){
255 sigmacomputed = true;
256 // std::cout << "DSDpiXS "<<sigma<< " " << mres<<std::endl;
259 if (! sigmacomputed) {
260 report(ERROR,"EvtGen") << "VPHOTOVISRHI: This model requires daughters to be listed in a particular order." << endl
261 << "The following are acceptable:" << endl
262 << "D0 anti-D0" << endl
264 << "D*0 anti-D0" << endl
265 << "anti-D*0 D0" << endl
268 << "D*0 anti-D*0" << endl
270 << "D_s+ D_s-" << endl
271 << "D_s*+ D_s-" << endl
272 << "D_s*- D_s+" << endl
273 << "D_s*+ D_s*-" << endl
274 << "(D* D pi can be in any order)" << endl
275 << "Aborting..." << endl;
279 if(sigma<0) sigma = 0.0;
281 // static double sigmax=sigma;
282 // if (sigma>sigmax){
290 // if (count%10000==0){
291 // std::cout << "sigma :"<<sigma<<std::endl;
292 // std::cout << "sigmax:"<<sigmax<<std::endl;
295 double norm=sqrt(sigma);
297 // EvtParticle* d=p->getDaug(0);
300 vertex(0,0,0,norm*p->eps(0)*p->epsParent(0).conj());
301 vertex(1,0,0,norm*p->eps(1)*p->epsParent(0).conj());
302 vertex(2,0,0,norm*p->eps(2)*p->epsParent(0).conj());
304 vertex(0,1,0,norm*p->eps(0)*p->epsParent(1).conj());
305 vertex(1,1,0,norm*p->eps(1)*p->epsParent(1).conj());
306 vertex(2,1,0,norm*p->eps(2)*p->epsParent(1).conj());
308 vertex(0,2,0,norm*p->eps(0)*p->epsParent(2).conj());
309 vertex(1,2,0,norm*p->eps(1)*p->epsParent(2).conj());
310 vertex(2,2,0,norm*p->eps(2)*p->epsParent(2).conj());
312 vertex(0,0,1,norm*p->eps(0)*p->epsParent(0).conj());
313 vertex(1,0,1,norm*p->eps(1)*p->epsParent(0).conj());
314 vertex(2,0,1,norm*p->eps(2)*p->epsParent(0).conj());
316 vertex(0,1,1,norm*p->eps(0)*p->epsParent(1).conj());
317 vertex(1,1,1,norm*p->eps(1)*p->epsParent(1).conj());
318 vertex(2,1,1,norm*p->eps(2)*p->epsParent(1).conj());
320 vertex(0,2,1,norm*p->eps(0)*p->epsParent(2).conj());
321 vertex(1,2,1,norm*p->eps(1)*p->epsParent(2).conj());
322 vertex(2,2,1,norm*p->eps(2)*p->epsParent(2).conj());