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

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 //
00003 //
00004 // Module: EvtSinglePoint.cc
00005 //
00006 // Description: Special model to generate single particles with fixed momentu.
00007 //
00008 // Modification history:
00009 //
00010 //    RYD       Febuary 17,1998       Module created
00011 //
00012 //------------------------------------------------------------------------
00013 //
00014 #include "EvtGenBase/EvtPatches.hh"
00015 #include <stdlib.h>
00016 #include "EvtGenBase/EvtParticle.hh"
00017 #include "EvtGenBase/EvtRandom.hh"
00018 #include "EvtGenBase/EvtPDL.hh"
00019 #include "EvtGenModels/EvtSinglePoint.hh"
00020 #include "EvtGenBase/EvtReport.hh"
00021 #include <string>
00022 #include "EvtGenBase/EvtConst.hh"
00023 using std::endl;
00024 
00025 EvtSinglePoint::~EvtSinglePoint() {}
00026 
00027 void EvtSinglePoint::getName(std::string& model_name){
00028 
00029   model_name="SinglePoint";     
00030 
00031 }
00032 
00033 EvtDecayBase* EvtSinglePoint::clone(){
00034 
00035   return new EvtSinglePoint();
00036 
00037 }
00038 
00039 void EvtSinglePoint::init(){
00040 
00041 
00042   //turn off checks for charge conservation
00043   disableCheckQ();
00044 
00045   if ((getNArg()==3)) {
00046     px = getArg(0);
00047     py = getArg(1);
00048     pz = getArg(2);
00049     
00050   } else{
00051     std::cout<<"expected three parameters: px, py, pz, but find "<<getNArg()<<" parameters"<<std::endl;
00052     ::abort();
00053   }
00054   
00055 }
00056 
00057 void EvtSinglePoint::decay( EvtParticle *p ){
00058 
00059   EvtParticle *d;
00060   EvtVector4R p4;
00061 
00062   double mass=EvtPDL::getMass(getDaug(0));
00063 
00064   p->makeDaughters(getNDaug(),getDaugs());
00065   d=p->getDaug(0);
00066 
00067   //generate flat distribution in p 
00068   //we are now in the parents restframe! This means the 
00069   //restframe of the e+e- collison.
00070   
00071   double pmag;
00072   pmag = sqrt(px*px + py*py + py*pz);
00073 
00074  
00075     p4.set(sqrt(mass*mass+pmag*pmag),px,py,pz);
00076     d->init( getDaug(0),p4);
00077   return ;
00078 }
00079 
00080 
00081 

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