1 //--------------------------------------------------------------------------
4 // Copyright Information: See EvtGen/COPYRIGHT
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.
11 // Module: EvtBtoXsEtap.cc
13 // Description: Routine to perform two-body non-resonant B->Xs,gluon decays.
14 // It generates an X_s mass spectrum based on a parameterisation of the
15 // b->s,gluon spectrum of Atwood-Soni. The resultant X_s particles may
16 // be decayed by JETSET.
18 // Modification history:
20 // Adlene Hicheur January 10, 2001 Module created
21 //------------------------------------------------------------------------
23 #include "EvtGenBase/EvtPatches.hh"
26 #include "EvtGenBase/EvtRandom.hh"
27 #include "EvtGenBase/EvtParticle.hh"
28 #include "EvtGenBase/EvtGenKine.hh"
29 #include "EvtGenBase/EvtPDL.hh"
30 #include "EvtGenBase/EvtReport.hh"
31 #include "EvtGenModels/EvtBtoXsEtap.hh"
33 #include "EvtGenBase/EvtConst.hh"
36 EvtBtoXsEtap::~EvtBtoXsEtap() {}
38 std::string EvtBtoXsEtap::getName(){
44 EvtDecayBase* EvtBtoXsEtap::clone(){
46 return new EvtBtoXsEtap;
51 void EvtBtoXsEtap::init(){
53 // check that there are no arguments
58 void EvtBtoXsEtap::initProbMax(){
64 void EvtBtoXsEtap::decay( EvtParticle *p ){
67 // if ( p->getNDaug() != 0 ) {
68 // //Will end up here because maxrate multiplies by 1.2
69 // report(DEBUG,"EvtGen") << "In EvtBtoXsEtap: X_s daughters should not be here!"<<endl;
75 p->makeDaughters(getNDaug(),getDaugs());
76 EvtParticle *pdaug[MAX_DAUG];
78 for(i=0;i<getNDaug();i++){
79 pdaug[i]=p->getDaug(i);
82 static EvtVector4R p4[MAX_DAUG];
83 static double mass[MAX_DAUG];
87 // Prepare for phase space routine.
89 mass[1] = EvtPDL::getMass(getDaug(1));
91 double xbox, ybox, min, max,hichfit;
94 const double TwoPi = EvtConst::twoPi;
95 int Xscode = EvtPDL::getStdHep(getDaug(0));
97 // A five parameters fit, the shape is taken from Atwood & Soni
101 if ((Xscode == 30343) || (Xscode == -30343) ||
102 (Xscode == 30353) || (Xscode == -30353)) { // Xsu or Xsd
103 min=0.6373; // Just above K pi threshold for Xsd/u
104 //min=0.6333; // K pi threshold for neutral Xsd
105 // par[0]=-2057.2380371094;
107 // par[1]=2502.2556152344;
109 // par[2]=1151.5632324219;
111 // par[3]=0.82431584596634;
113 // par[4]=-4110.5234375000;
115 // par[5]=8445.6757812500;
117 // par[6]=-3034.1894531250;
118 // par[7]=1.1557708978653;
119 // par[8]=1765.9311523438;
120 // par[9]=1.3730158805847;
121 // par[10]=0.51371538639069;
122 // par[11]=2.0056934356689;
123 // par[12]=37144.097656250;
124 // par[13]=-50296.781250000;
125 // par[14]=27319.095703125;
126 // par[15]=-7408.0678710938;
127 // par[16]=1000.8093261719;
128 // par[17]=-53.834449768066;
130 report(DEBUG,"EvtGen") << "In EvtBtoXsEtap: Particle with id " << Xscode << " is not a Xsd/u particle"<<endl;
134 double boxheight=par[5];
135 double boxwidth=max-min;
138 while ((mass[0] > max) || (mass[0] < min)){
139 xbox = EvtRandom::Flat(boxwidth)+min;
140 ybox=EvtRandom::Flat(boxheight);
143 hichfit=(1/sqrt(TwoPi*par[1]))*exp(-0.5*pow((xbox-par[0])/par[1],2));
144 // alifit=par[0]+par[1]*xbox+par[2]*pow(xbox,2);
145 // } else if (xbox<par[7]) {
146 // alifit=par[4]+par[5]*xbox+par[6]*pow(xbox,2);
147 // } else if (xbox<par[11]) {
148 // alifit=par[8]*exp(-0.5*pow((xbox-par[9])/par[10],2));
150 hichfit=par[3]*pow((xbox-par[4]),2)+par[5];
151 // 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);
160 // debug stuff: report(INFO,"EvtGen") << "Xscode " << Xscode << " daughter 1 mass " << mass[0] << " daughter 2 mass " << mass[1] << endl;
162 EvtGenKine::PhaseSpace( getNDaug(), mass, p4, m_b );
164 for(i=0;i<getNDaug();i++){
165 pdaug[i]->init( getDaugs()[i], p4[i] );