]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TEvtGen/EvtGenModels/EvtBtoXsgammaAliGreub.cxx
AliDecayer realisation for the EvtGen code and EvtGen itself.
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenModels / EvtBtoXsgammaAliGreub.cxx
1 //--------------------------------------------------------------------------
2 //
3 //
4 // Copyright Information: See EvtGen/COPYRIGHT
5 //
6 // Environment:
7 //      This software is part of the EvtGen package developed jointly
8 //      for the BaBar and CLEO collaborations.  If you use all or part
9 //      of it, please give an appropriate acknowledgement.
10 //
11 // Module: EvtBtoXsgammaAliGreub.cc
12 //
13 // Description: Routine to perform two-body non-resonant B->Xs,gamma decays.
14 // It generates an X_s mass spectrum based on a parameterisation of the
15 // b->s,gamma photon spectrum of Ali-Greub. The resultant X_s particles may
16 // be decayed by JETSET.
17 //
18 // Modification history:
19 //
20 //    Mark Ian Williams       July 20, 2000       Module created
21 //    Mark Ian Williams       July 21, 2000       Module works
22 //    Mark Ian Williams       July 25, 2000       Works for all Xs modes
23 //    Mark Ian Williams       Aug  09, 2000       New values for mass minima
24 //    Mark Ian Williams       Sept 06, 2000       14 parameter M_Xs function
25 //    Mark Ian Williams       Sept 07, 2000       18 parameter M_Xs function
26 //    Mark Ian Williams       Sept 07, 2000       Tidied up the code
27 //    Mark Ian Williams       Sept 10, 2000       Updated parameters
28 //    Mark Ian Williams       Sept 11, 2000       Finalised code
29 //    Jane Tinslay            March 21, 2000      Separated from EvtBtoXsgamma 
30 //                                                class to allow choice of input models.
31 //------------------------------------------------------------------------
32 //
33 #include "EvtGenBase/EvtPatches.hh"
34
35 #include <stdlib.h>
36 #include "EvtGenBase/EvtRandom.hh"
37 #include "EvtGenModels/EvtBtoXsgammaAliGreub.hh"
38 #include <string>
39 #include "EvtGenBase/EvtConst.hh"
40 #include "EvtGenBase/EvtParticle.hh"
41 #include "EvtGenBase/EvtGenKine.hh"
42 #include "EvtGenBase/EvtPDL.hh"
43 #include "EvtGenBase/EvtReport.hh"
44 using std::endl;
45
46
47 EvtBtoXsgammaAliGreub::~EvtBtoXsgammaAliGreub(){}
48
49 void EvtBtoXsgammaAliGreub::init(int nArg, double* /*args*/){
50  
51   if ((nArg - 1) != 0) {
52     
53     report(ERROR,"EvtGen") << "EvtBtoXsgamma generator model "
54                            << "EvtBtoXsgammaAliGreub expected " 
55                            << "zero arguments but found: "<<nArg-1<<endl;
56     report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
57     ::abort();
58   
59   }
60  
61 }
62
63 double EvtBtoXsgammaAliGreub::GetMass(int Xscode) {
64
65   // The special lineshape for strange hadrons X_s in b -> s gamma:
66   // An 18 parameter function fitted to the theoretical mass spectrum
67   // of Ali & Greub for a B meson mass of 5.279 GeV; top quark mass of
68   // 174.3 GeV; strange quark mass of 0.48 GeV (tuned to give minimum 
69   // M_Xs of 0.64 GeV) and Fermi momentum of 265 MeV for spectator quark
70   // mass of 150 MeV (from CLEO fit). Truncated at max on high side
71   // and min (just above K pi or KK thresold) on low side.
72   double min=0.64;
73   double max=4.5;
74   double xbox, ybox, alifit;
75   double mass=0.0;
76
77   double par[18];
78   if ((Xscode == 30343) || (Xscode == -30343) || 
79       (Xscode == 30353) || (Xscode == -30353)) { // Xsu or Xsd
80     min=0.6373; //  Just above K pi threshold for Xsd/u
81     //min=0.6333; //  K pi threshold for neutral Xsd
82     par[0]=-2057.2380371094;
83     par[1]=2502.2556152344;
84     par[2]=1151.5632324219;
85     par[3]=0.82431584596634;
86     par[4]=-4110.5234375000;
87     par[5]=8445.6757812500;
88     par[6]=-3034.1894531250;
89     par[7]=1.1557708978653;
90     par[8]=1765.9311523438;
91     par[9]=1.3730158805847;
92     par[10]=0.51371538639069;
93     par[11]=2.0056934356689;
94     par[12]=37144.097656250;
95     par[13]=-50296.781250000;
96     par[14]=27319.095703125;
97     par[15]=-7408.0678710938;
98     par[16]=1000.8093261719;
99     par[17]=-53.834449768066;
100   } else if ((Xscode == 30363) || (Xscode == -30363)) {
101     min = 0.9964; // Just above KK threshold for Xss
102     par[0]=-32263.908203125;
103     par[1]=57186.589843750;
104     par[2]=-24230.728515625;
105     par[3]=1.1155973672867;
106     par[4]=-12161.131835938;
107     par[5]=20162.146484375;
108     par[6]=-7198.8564453125;
109     par[7]=1.3783323764801;
110     par[8]=1995.1691894531;
111     par[9]=1.4655895233154;
112     par[10]=0.48869228363037;
113     par[11]=2.1038570404053;
114     par[12]=55100.058593750;
115     par[13]=-75201.703125000;
116     par[14]=41096.066406250;
117     par[15]=-11205.986328125;
118     par[16]=1522.4024658203;
119     par[17]=-82.379623413086;
120   } else {
121     report(DEBUG,"EvtGen") << "In EvtBtoXsgammaAliGreub: Particle with id " << Xscode << " is not a Xss particle"<<endl;
122     return 0;
123   }
124
125   double boxheight=par[8];
126   double boxwidth=max-min;
127
128   while ((mass > max) || (mass < min)){
129     xbox = EvtRandom::Flat(boxwidth)+min;
130     ybox=EvtRandom::Flat(boxheight);
131     if (xbox<par[3]) {
132       alifit=par[0]+par[1]*xbox+par[2]*pow(xbox,2);
133     } else if (xbox<par[7]) {
134       alifit=par[4]+par[5]*xbox+par[6]*pow(xbox,2);
135     } else if (xbox<par[11]) {
136       alifit=par[8]*exp(-0.5*pow((xbox-par[9])/par[10],2));
137     } else {
138       alifit=par[12]+par[13]*xbox+par[14]*pow(xbox,2)+par[15]*pow(xbox,3)+par[16]*pow(xbox,4)+par[17]*pow(xbox,5);
139     }
140     if (ybox>alifit) {
141       mass=0.0;
142     } else {
143       mass=xbox;
144     }
145   }
146   return mass;
147 }