/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenModels/EvtBtoXsEtap.cc

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 //
00003 //
00004 // Copyright Information: See EvtGen/COPYRIGHT
00005 //
00006 // Environment:
00007 //      This software is part of the EvtGen package developed jointly
00008 //      for the BaBar and CLEO collaborations.  If you use all or part
00009 //      of it, please give an appropriate acknowledgement.
00010 //
00011 // Module: EvtBtoXsEtap.cc
00012 //
00013 // Description: Routine to perform two-body non-resonant B->Xs,gluon decays.
00014 // It generates an X_s mass spectrum based on a parameterisation of the
00015 // b->s,gluon  spectrum of Atwood-Soni. The resultant X_s particles may
00016 // be decayed by JETSET.
00017 //
00018 // Modification history:
00019 //
00020 //    Adlene Hicheur       January 10, 2001       Module created
00021 //------------------------------------------------------------------------
00022 //
00023 #include "EvtGenBase/EvtPatches.hh"
00024 
00025 #include <stdlib.h>
00026 #include "EvtGenBase/EvtRandom.hh"
00027 #include "EvtGenBase/EvtParticle.hh"
00028 #include "EvtGenBase/EvtGenKine.hh"
00029 #include "EvtGenBase/EvtPDL.hh"
00030 #include "EvtGenBase/EvtReport.hh"
00031 #include "EvtGenModels/EvtBtoXsEtap.hh"
00032 #include <string>
00033 #include "EvtGenBase/EvtConst.hh"
00034 using std::endl;
00035 
00036 EvtBtoXsEtap::~EvtBtoXsEtap() {}
00037 
00038 void EvtBtoXsEtap::getName(std::string& model_name){
00039 
00040   model_name="BTOXSETAP";     
00041 
00042 }
00043 
00044 EvtDecayBase* EvtBtoXsEtap::clone(){
00045 
00046   return new EvtBtoXsEtap;
00047 
00048 }
00049 
00050 
00051 void EvtBtoXsEtap::init(){
00052 
00053   // check that there are no arguments
00054 
00055   checkNArg(0);
00056 }
00057 
00058 void EvtBtoXsEtap::initProbMax(){
00059 
00060   noProbMax();
00061 
00062 }
00063 
00064 void EvtBtoXsEtap::decay( EvtParticle *p ){
00065 
00066   // useless
00067   //  if ( p->getNDaug() != 0 ) {
00068   //  //Will end up here because maxrate multiplies by 1.2
00069   //  report(DEBUG,"EvtGen") << "In EvtBtoXsEtap: X_s daughters should not be here!"<<endl;
00070   //  return;
00071   //}
00072 
00073   double m_b;
00074   int i;
00075   p->makeDaughters(getNDaug(),getDaugs());
00076   EvtParticle *pdaug[MAX_DAUG];
00077 
00078   for(i=0;i<getNDaug();i++){
00079      pdaug[i]=p->getDaug(i);   
00080   }
00081 
00082   static EvtVector4R p4[MAX_DAUG];
00083   static double mass[MAX_DAUG];
00084 
00085   m_b = p->mass();
00086 
00087   // Prepare for phase space routine.
00088 
00089   mass[1] = EvtPDL::getMass(getDaug(1));
00090 
00091   double xbox, ybox, min, max,hichfit;
00092   min=0.493;
00093   max=4.3;
00094   const double TwoPi = EvtConst::twoPi;
00095   int Xscode = EvtPDL::getStdHep(getDaug(0));
00096 
00097   // A five parameters fit, the shape is taken from Atwood & Soni
00098 
00099   //  double par[18];
00100   double par[6];
00101   if ((Xscode == 30343) || (Xscode == -30343) || 
00102       (Xscode == 30353) || (Xscode == -30353)) { // Xsu or Xsd
00103     min=0.6373; //  Just above K pi threshold for Xsd/u
00104     //min=0.6333; //  K pi threshold for neutral Xsd
00105     //    par[0]=-2057.2380371094;
00106     par[0]=2.36816;
00107     //    par[1]=2502.2556152344;
00108     par[1]=0.62325725;
00109     //    par[2]=1151.5632324219;
00110     par[2]=2.2;
00111     //    par[3]=0.82431584596634;
00112     par[3]=-0.2109375;
00113     //    par[4]=-4110.5234375000;
00114     par[4]=2.7;
00115     //    par[5]=8445.6757812500;
00116     par[5]=0.54;
00117     //    par[6]=-3034.1894531250;
00118     //    par[7]=1.1557708978653;
00119     //    par[8]=1765.9311523438;
00120     //    par[9]=1.3730158805847;
00121     //    par[10]=0.51371538639069;
00122     //    par[11]=2.0056934356689;
00123     //    par[12]=37144.097656250;
00124     //    par[13]=-50296.781250000;
00125     //    par[14]=27319.095703125;
00126     //    par[15]=-7408.0678710938;
00127     //    par[16]=1000.8093261719;
00128     //    par[17]=-53.834449768066;
00129   } else {
00130     report(DEBUG,"EvtGen") << "In EvtBtoXsEtap: Particle with id " << Xscode << " is not a Xsd/u particle"<<endl;
00131     return;
00132   }
00133 
00134   double boxheight=par[5];
00135   double boxwidth=max-min;
00136 
00137   mass[0]=0.0;
00138   while ((mass[0] > max) || (mass[0] < min)){
00139     xbox = EvtRandom::Flat(boxwidth)+min;
00140     ybox=EvtRandom::Flat(boxheight);
00141     if (xbox<par[2]) {
00142 
00143       hichfit=(1/sqrt(TwoPi*par[1]))*exp(-0.5*pow((xbox-par[0])/par[1],2));      
00144       //      alifit=par[0]+par[1]*xbox+par[2]*pow(xbox,2);
00145       //    } else if (xbox<par[7]) {
00146       //      alifit=par[4]+par[5]*xbox+par[6]*pow(xbox,2);
00147       //    } else if (xbox<par[11]) {
00148       //      alifit=par[8]*exp(-0.5*pow((xbox-par[9])/par[10],2));
00149     } else {
00150       hichfit=par[3]*pow((xbox-par[4]),2)+par[5];
00151       //      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);
00152     }
00153     if (ybox>hichfit) {
00154       mass[0]=0.0;
00155     } else {
00156       mass[0]=xbox;
00157     }
00158   }
00159 
00160   // debug stuff:  report(INFO,"EvtGen") << "Xscode " << Xscode << " daughter 1 mass " << mass[0] << " daughter 2 mass " << mass[1] << endl;
00161 
00162   EvtGenKine::PhaseSpace( getNDaug(), mass, p4, m_b );
00163 
00164   for(i=0;i<getNDaug();i++){
00165      pdaug[i]->init( getDaugs()[i], p4[i] );
00166   }
00167 
00168   return ;
00169 }
00170 
00171 

Generated on Tue Nov 29 23:12:17 2016 for BOSS_7.0.2 by  doxygen 1.4.7