00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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
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
00110
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
00119
00120 return ;
00121 }
00122
00123