/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenModels/EvtmPhsp.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 // Copyright Information: See EvtGen/COPYRIGHT
00009 //      Copyright (C) 1998      Caltech, UCSB
00010 //
00011 // Module: EvtmPhsp.cc
00012 //
00013 // Description: Routine to decay a particle according th phase space
00014 //
00015 // Modification history:
00016 //
00017 //    RYD       January 8, 1997       Module created
00018 //
00019 //------------------------------------------------------------------------
00020 //
00021 #include "EvtGenBase/EvtPatches.hh"
00022 #include <stdlib.h>
00023 #include "EvtGenBase/EvtParticle.hh"
00024 #include "EvtGenBase/EvtGenKine.hh"
00025 #include "EvtGenBase/EvtPDL.hh"
00026 #include "EvtGenBase/EvtReport.hh"
00027 #include "EvtGenModels/EvtmPhsp.hh"
00028 #include <string>
00029 using std::endl;
00030 
00031 EvtmPhsp::~EvtmPhsp() {}
00032 
00033 void EvtmPhsp::getName(std::string& model_name){
00034 
00035   model_name="mPHSP";     
00036 
00037 }
00038 
00039 EvtDecayBase* EvtmPhsp::clone(){
00040 
00041   return new EvtmPhsp;
00042 
00043 }
00044 
00045 
00046 void EvtmPhsp::init(){
00047 
00048   if (getNArg()==3) {
00049     nd1=getArg(0); //assign the first nd1 particle in the son list
00050     ma1=getArg(1); // the lower mass for the nd1 son cluster
00051     ma2=getArg(2); // the upper mass for the nd1 son cluster
00052   }else if(getNArg()==6){
00053     nd1=getArg(0); //assign the first nd1 particle in the son list
00054     ma1=getArg(1); // the lower mass for the nd1 son cluster
00055     ma2=getArg(2); // the upper mass for the nd1 son cluster
00056     nd2=getArg(3); //assign the first nd1 particle in the son list
00057     mb1=getArg(4); // the lower mass for the nd2 son cluster
00058     mb2=getArg(5); // the upper mass for the nd2 son cluster
00059   }else{
00060     
00061     report(ERROR,"EvtGen") << "EvtmPHSP generator expected "
00062                            << " 3 or 6 arguments but found:"<<getNArg()<<endl;
00063     report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
00064     ::abort();
00065   }
00066 
00067 }
00068 
00069 void EvtmPhsp::initProbMax(){
00070 
00071   noProbMax();
00072 
00073 }
00074 
00075 void EvtmPhsp::decay( EvtParticle *p ){
00076   EvtVector4R pt,pt2;
00077  loop:
00078 
00079   p->initializePhaseSpace(getNDaug(),getDaugs());
00080 
00081   pt=p->getDaug(0)->getP4Lab();
00082   for (int ii=1;ii<nd1;ii++){
00083     pt=pt+p->getDaug(ii)->getP4Lab();
00084   }
00085   xmass1=pt.mass();
00086 
00087   if(getNArg()==6) {
00088     pt2=p->getDaug(nd1)->getP4Lab();
00089     for(int jj=nd1+1;jj<nd1+nd2;jj++) pt2=pt2+p->getDaug(jj)->getP4Lab();
00090    }
00091   xmass2=pt2.mass();
00092 
00093   // std::cout<<"xmass1= "<<xmass1<<std::endl;
00094 
00095   if(getNArg()==3 && (xmass1<ma1||xmass1>ma2) )goto loop;
00096   if(getNArg()==6 && (xmass1<ma1||xmass1>ma2 || xmass2<mb1 || xmass2>mb2) ) goto loop;
00097 
00098   return ;
00099 }
00100 
00101 

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