00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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/EvtVector4C.hh"
00027 #include "EvtGenBase/EvtVector4R.hh"
00028 #include "EvtGenBase/EvtTensor4C.hh"
00029 #include "EvtGenBase/EvtReport.hh"
00030 #include "EvtGenBase/EvtdFunction.hh"
00031 #include "EvtGenBase/EvtHelSys.hh"
00032 #include "EvtP2GC0.hh"
00033 #include <string>
00034 using std::endl;
00035
00036 EvtP2GC0::~EvtP2GC0() {}
00037
00038 void EvtP2GC0::getName(std::string& model_name){
00039
00040 model_name="P2GC0";
00041
00042 }
00043
00044
00045 EvtDecayBase* EvtP2GC0::clone(){
00046
00047 return new EvtP2GC0;
00048
00049 }
00050
00051 void EvtP2GC0::init(){
00052 static EvtId GAM=EvtPDL::getId("gamma");
00053
00054 checkNArg(0);
00055 checkNDaug(2);
00056 checkSpinParent(EvtSpinType::VECTOR);
00057 checkSpinDaughter(0,EvtSpinType::PHOTON);
00058 checkSpinDaughter(1,EvtSpinType::SCALAR);
00059 if (!(getDaug(0)==GAM)) {
00060 report(ERROR,"EvtGen") << "EvtP2GC0 generator radiative decays expected "<<endl;
00061 ::abort();
00062 }
00063 }
00064
00065
00066 void EvtP2GC0::initProbMax() {
00067
00068
00069 setProbMax(1.0);
00070
00071 }
00072
00073 void EvtP2GC0::decay( EvtParticle *p){
00074
00075 p->initializePhaseSpace(getNDaug(),getDaugs());
00076
00077 EvtParticle *v,*s1;
00078 EvtVector4R pv,ps,ppr;
00079
00080 v =p->getDaug(0);
00081 s1=p->getDaug(1);
00082 pv=v->getP4();
00083 ps=s1->getP4();
00084 ppr=p->getP4();
00085
00086 EvtHelSys angles(ppr,pv);
00087 double theta =angles.getHelAng(1);
00088 double phi =angles.getHelAng(2);
00089 double gamma =0;
00090
00091 int j1,j2,j3;
00092 for(j1=0;j1<=1;){
00093 for(j2=0;j2<=1;){
00094 vertex(j1,j2,0.0);j2++;}
00095 j1++;}
00096
00097
00098
00099
00100
00101
00102
00103 vertex(0,1,Djmn(1, 1,-1,phi,theta,gamma));
00104 vertex(0,0,Djmn(1, 1, 1,phi,theta,gamma));
00105 vertex(2,1,Djmn(1, 0,-1,phi,theta,gamma));
00106 vertex(2,0,Djmn(1, 0, 1,phi,theta,gamma));
00107 vertex(1,1,Djmn(1,-1,-1,phi,theta,gamma));
00108 vertex(1,0,Djmn(1,-1, 1,phi,theta,gamma));
00109
00110 return ;
00111
00112 }
00113
00114
00115
00116