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

Go to the documentation of this file.
00001 
00002 //--------------------------------------------------------------------------
00003 //
00004 // Environment:
00005 //      This software is part of models developed at BES collaboration
00006 //      based on the EvtGen framework.  If you use all or part
00007 //      of it, please give an appropriate acknowledgement.
00008 //
00009 // Copyright Information: See EvtGen/BesCopyright
00010 //      Copyright (A) 2006      Ping Rong-Gang @IHEP
00011 //
00012 // Module: EvtBody3.cc  //Modified Body3 model
00013 //
00014 // usage:
00015 // Users need to provide the MC and data file in NTuple style. The decays are described as
00016 //                        A->  x1    +   x2     +  x3
00017 //angular distribution:    costheta1, costheta2 ,costheta3
00018 // mass distribution:          m12, m13, and m23, here, m12 ==> mass of x1 and x2, etc.
00019 // these variables are defined as double type, the tree name is mc and data, repectively
00020 // Modification history:
00021 //
00022 //    Ping R.-G.       Aug., 2010       Module created
00023 //
00024 //------------------------------------------------------------------------
00025 //
00026 #include "EvtGenBase/EvtPatches.hh"
00027 #include <stdlib.h>
00028 #include "EvtGenBase/EvtParticle.hh"
00029 #include "EvtGenBase/EvtGenKine.hh"
00030 #include "EvtGenBase/EvtPDL.hh"
00031 #include "EvtGenBase/EvtVector4C.hh"
00032 #include "EvtGenBase/EvtVector4R.hh"
00033 #include "EvtGenBase/EvtTensor4C.hh"
00034 #include "EvtGenBase/EvtDiracParticle.hh"
00035 #include "EvtGenBase/EvtScalarParticle.hh"
00036 #include "EvtGenBase/EvtVectorParticle.hh"
00037 #include "EvtGenBase/EvtTensorParticle.hh"
00038 #include "EvtGenBase/EvtPhotonParticle.hh" 
00039 #include "EvtGenBase/EvtNeutrinoParticle.hh"
00040 #include "EvtGenBase/EvtStringParticle.hh"
00041 #include "EvtGenBase/EvtRaritaSchwingerParticle.hh"
00042 #include "EvtGenBase/EvtHighSpinParticle.hh"
00043 #include "EvtGenBase/EvtReport.hh"
00044 #include "EvtGenBase/EvtHelSys.hh"
00045 #include "EvtGenModels/EvtMBody3.hh"
00046 #include "EvtGenBase/EvtRandom.hh"
00047 #include <string>
00048 #include "TFile.h"
00049 
00050 using std::endl;
00051 
00052 EvtNT3 body3Ntuple;
00053 EvtMBody3::~EvtMBody3() {}
00054 
00055 void EvtMBody3::getName(std::string& model_name){
00056 
00057   model_name="MBody3";     
00058 
00059 }
00060 
00061 EvtDecayBase* EvtMBody3::clone(){
00062 
00063   return new EvtMBody3;
00064 
00065 }
00066 
00067 void EvtMBody3::init(){
00068 
00069   // check that there are 4 arguments: Invariant mass part. Index: i,j, histor. file name, Hid 
00070   checkNArg(0);
00071 
00072   const char* datafile;
00073   const char* mcfile;
00074   datafile=setFileName(1);
00075   mcfile  =setFileName(2);
00076   body3Ntuple.setMCfile(mcfile);
00077   body3Ntuple.setDTfile(datafile);
00078   body3Ntuple.init();
00079   std::cout<<"End to initiate the MBody3 model"<<std::endl;
00080  }  
00081 
00082 void EvtMBody3::initProbMax(){
00083 
00084   noProbMax();
00085 
00086 }
00087 
00088 void EvtMBody3::decay( EvtParticle *p ){
00089 
00090 loop:
00091   p->initializePhaseSpace(getNDaug(),getDaugs());
00092 
00093   EvtVector4R pd1,pd2,pd3,ps;
00094   double m12,m13,m23,costheta1,costheta2,costheta3;
00095 
00096   pd1 =p->getDaug(0)->getP4Lab();
00097   pd2 =p->getDaug(1)->getP4Lab();
00098   pd3 =p->getDaug(2)->getP4Lab();
00099   ps =p->getP4();
00100  
00101   m12=(pd1 + pd2).mass(); 
00102   m13=(pd1 + pd3).mass();
00103   m23=(pd2 + pd3).mass();
00104 
00105   costheta1=pd1.get(3)/pd1.d3mag();
00106   costheta2=pd2.get(3)/pd2.d3mag();
00107   costheta3=pd3.get(3)/pd3.d3mag();
00108   /*
00109   bool ac=body3Ntuple.AR123(costheta1,costheta2,costheta3,
00110                                   m23,      m13,      m12);
00111   */
00112   bool b1=body3Ntuple.AR1(costheta1,m23);
00113   bool b2=body3Ntuple.AR2(costheta2,m13);
00114   bool b3=body3Ntuple.AR3(costheta3,m12);
00115  
00116   if(!(b1 && b2 && b3)) goto loop;
00117   
00118                           // if(!(ac)) goto loop;
00119   //  std::cout<<"I find an envent." <<std::endl;
00120   return ;
00121 }
00122 
00123 

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