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

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 //
00003 // Environment:
00004 //      This software is part of the EvtGen package developed jointly
00005 //      for the BaBar and CLEO collaborations.  If you use all or part
00006 //      of it, please give an appropriate acknowledgement.
00007 //
00008 // Module: EvtBtoXsgamma.cc
00009 //
00010 // Description: Routine to perform two-body non-resonant B->Xs,gamma decays.
00011 //              Set the first input parameter to 1 to use the Ali-Greub model,
00012 //              or 2 to use the Kagan-Neubert model.
00013 #include "EvtGenBase/EvtPatches.hh"
00014 
00015 //
00016 // Modification history:
00017 //
00018 //    Mark Ian Williams       July 20, 2000       Module created
00019 //    Mark Ian Williams       July 21, 2000       Module works
00020 //    Mark Ian Williams       July 25, 2000       Works for all Xs modes
00021 //    Mark Ian Williams       Aug  09, 2000       New values for mass minima
00022 //    Mark Ian Williams       Sept 06, 2000       14 parameter M_Xs function
00023 //    Mark Ian Williams       Sept 07, 2000       18 parameter M_Xs function
00024 //    Mark Ian Williams       Sept 07, 2000       Tidied up the code
00025 //    Mark Ian Williams       Sept 10, 2000       Updated parameters
00026 //    Mark Ian Williams       Sept 11, 2000       Finalised code
00027 //    Jane Tinslay            March 21, 2001      Re-worked so that you can choose
00028 //                                                between the Ali-Greub and Kagan-Neubert
00029 //                                                Modules.                          
00030 //------------------------------------------------------------------------
00031 //
00032 
00033 #include <stdlib.h>
00034 #include "EvtGenBase/EvtParticle.hh"
00035 #include "EvtGenBase/EvtGenKine.hh"
00036 #include "EvtGenBase/EvtPDL.hh"
00037 #include "EvtGenBase/EvtReport.hh"
00038 #include "EvtGenModels/EvtBtoXsgamma.hh"
00039 #include <string>
00040 #include "EvtGenBase/EvtConst.hh"
00041 #include "EvtGenModels/EvtBtoXsgammaAliGreub.hh"
00042 #include "EvtGenModels/EvtBtoXsgammaKagan.hh"
00043 #include "EvtGenModels/EvtBtoXsgammaFixedMass.hh"
00044 #include "EvtGenModels/EvtBtoXsgammaFlatEnergy.hh"
00045 using std::endl;
00046 
00047 EvtBtoXsgamma::~EvtBtoXsgamma() {
00048 
00049   delete _model; _model=0;
00050 
00051 }
00052 
00053 void EvtBtoXsgamma::getName(std::string& model_name){
00054 
00055   model_name="BTOXSGAMMA";     
00056 
00057 }
00058 
00059 EvtDecayBase* EvtBtoXsgamma::clone(){
00060 
00061   return new EvtBtoXsgamma;
00062 
00063 }
00064 
00065 void EvtBtoXsgamma::init(){
00066   //Arguments:
00067   // 0: Ali-Greub model = 1, Kagan model = 2
00068  //No more arguments for Ali-Greub model
00069   // 1:
00070   // 2:
00071   // 3:
00072 
00073   // check that at least one b->sg model has been selected
00074   if (getNArg() == 0) {
00075     
00076     report(ERROR,"EvtGen") << "EvtBtoXsgamma generator expected "
00077                            << " at least 1 argument but found: "<<getNArg()<<endl;
00078     report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
00079     ::abort();
00080   }    
00081 }
00082 
00083 void EvtBtoXsgamma::initProbMax(){
00084 
00085   noProbMax();
00086 
00087 }
00088 
00089 void EvtBtoXsgamma::decay( EvtParticle *p ){
00090 
00091   //initialize here. -- its too damn slow otherwise.
00092 
00093   if ( _model == 0 ) {
00094     
00095     if (getArg(0) == 1) _model = new EvtBtoXsgammaAliGreub();
00096     else if (getArg(0) == 2) _model = new EvtBtoXsgammaKagan();
00097     else if (getArg(0) == 3) _model = new EvtBtoXsgammaFixedMass();
00098     else if (getArg(0) == 4) _model = new EvtBtoXsgammaFlatEnergy();
00099     else{
00100       report(ERROR,"EvtGen") << "No valid EvtBtoXsgamma generator model selected "
00101                              << "Set arg(0) to 1 for Ali-Greub model or 2 for "
00102                              <<" Kagan model or 3 for a fixed mass"<<endl;
00103       report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
00104       ::abort();
00105       
00106     }
00107     _model->init(getNArg(),getArgs());
00108   }
00109 
00110 
00111   //  if ( p->getNDaug() != 0 ) {
00112     //Will end up here because maxrate multiplies by 1.2
00113   //  report(DEBUG,"EvtGen") << "In EvtBtoXsgamma: X_s daughters should not be here!"<<endl;
00114   //  return;
00115   //}
00116 
00117   double m_b;
00118   int i;
00119   p->makeDaughters(getNDaug(),getDaugs());
00120   EvtParticle *pdaug[MAX_DAUG];
00121 
00122   for(i=0;i<getNDaug();i++){
00123      pdaug[i]=p->getDaug(i);   
00124   }
00125 
00126   static EvtVector4R p4[MAX_DAUG];
00127   static double mass[MAX_DAUG];
00128 
00129   m_b = p->mass();
00130 
00131   mass[1] = EvtPDL::getMass(getDaug(1));
00132  
00133   int Xscode = EvtPDL::getStdHep(getDaug(0));
00134    
00135   mass[0] = _model->GetMass(Xscode);
00136 
00137   EvtGenKine::PhaseSpace( getNDaug(), mass, p4, m_b );
00138 
00139   for(i=0;i<getNDaug();i++){
00140      pdaug[i]->init( getDaugs()[i], p4[i] );
00141   }
00142 
00143 }
00144 

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