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 #include "EvtGenBase/EvtPatches.hh"
00026 #include <stdlib.h>
00027 #include <assert.h>
00028 #include "EvtGenBase/EvtParticle.hh"
00029 #include "EvtGenBase/EvtGenKine.hh"
00030 #include "EvtGenBase/EvtPDL.hh"
00031 #include "EvtGenBase/EvtReport.hh"
00032 #include "EvtGenModels/EvtHQET2.hh"
00033 #include "EvtGenModels/EvtHQET2FF.hh"
00034 #include "EvtGenBase/EvtSemiLeptonicVectorAmp.hh"
00035 #include "EvtGenBase/EvtSemiLeptonicScalarAmp.hh"
00036 #include <string>
00037 using std::endl;
00038
00039 EvtHQET2::EvtHQET2():
00040 hqetffmodel(0)
00041 ,calcamp(0)
00042 {}
00043
00044 EvtHQET2::~EvtHQET2() {
00045 delete hqetffmodel;
00046 hqetffmodel=0;
00047 delete calcamp;
00048 calcamp=0;
00049 }
00050
00051 void EvtHQET2::getName(std::string& model_name){
00052
00053 model_name="HQET2";
00054
00055 }
00056
00057
00058
00059 EvtDecayBase* EvtHQET2::clone(){
00060
00061 return new EvtHQET2;
00062
00063 }
00064
00065
00066 void EvtHQET2::decay( EvtParticle *p ){
00067
00068 p->initializePhaseSpace(getNDaug(),getDaugs());
00069 calcamp->CalcAmp(p,_amp2,hqetffmodel);
00070
00071 }
00072
00073 void EvtHQET2::initProbMax(){
00074
00075 EvtId parnum,mesnum,lnum,nunum;
00076
00077 parnum = getParentId();
00078 mesnum = getDaug(0);
00079 lnum = getDaug(1);
00080 nunum = getDaug(2);
00081
00082 double mymaxprob = calcamp->CalcMaxProb(parnum,mesnum,
00083 lnum,nunum,hqetffmodel);
00084
00085 setProbMax(mymaxprob);
00086
00087 }
00088
00089
00090 void EvtHQET2::init(){
00091
00092 checkNDaug(3);
00093
00094
00095
00096 checkSpinParent(EvtSpinType::SCALAR);
00097
00098 checkSpinDaughter(1,EvtSpinType::DIRAC);
00099 checkSpinDaughter(2,EvtSpinType::NEUTRINO);
00100
00101 EvtSpinType::spintype d1type = EvtPDL::getSpinType(getDaug(0));
00102 if ( d1type==EvtSpinType::SCALAR) {
00103 if ( getNArg()==2 ) {hqetffmodel = new EvtHQET2FF(getArg(0),getArg(1));
00104 calcamp = new EvtSemiLeptonicScalarAmp;}
00105 else {
00106 report(ERROR,"EvtGen") << "HQET2 model for scalar meson daughters needs 2 arguments. Sorry."<<endl;
00107 ::abort();
00108 }
00109 }
00110 else if ( d1type==EvtSpinType::VECTOR) {
00111 if ( getNArg()==4 ){ hqetffmodel = new EvtHQET2FF(getArg(0),getArg(1),getArg(2),getArg(3));
00112 calcamp = new EvtSemiLeptonicVectorAmp; }
00113 else {
00114 report(ERROR,"EvtGen") << "HQET2 model for vector meson daughtersneeds 4 arguments. Sorry."<<endl;
00115 ::abort();
00116 }
00117 }
00118 else{
00119 report(ERROR,"EvtGen") << "HQET2 model handles only scalar and vector meson daughters. Sorry."<<endl;
00120 ::abort();
00121 }
00122
00123
00124 }
00125