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

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 //
00003 // Environment:
00004 //      This software is part of the EvtGen package developed jointly
00005 //      for the BaBar and CLEO collaborations.  If you use all or part
00006 //      of it, please give an appropriate acknowledgement.
00007 //
00008 // Copyright Information: See EvtGen/COPYRIGHT
00009 //      Copyright (C) 1998      Caltech, UCSB
00010 //
00011 // Module: EvtSVSCPiso.cc
00012 //
00013 // Description: Routine to decay scalar -> vectors scalar
00014 //              with CP violation and isospin amplitudes.
00015 //              More specifically, it is indended to handle
00016 //              decays like B->rho pi and B->a1 pi.
00017 //
00018 // Modification history:
00019 //
00020 //    RYD/NK    Febuary 16, 1998          Module created
00021 //
00022 //------------------------------------------------------------------------
00023 // 
00024 #include "EvtGenBase/EvtPatches.hh"
00025 #include <stdlib.h>
00026 #include "EvtGenBase/EvtParticle.hh"
00027 #include "EvtGenBase/EvtRandom.hh"
00028 #include "EvtGenBase/EvtGenKine.hh"
00029 #include "EvtGenBase/EvtCPUtil.hh"
00030 #include "EvtGenBase/EvtPDL.hh"
00031 #include "EvtGenBase/EvtReport.hh"
00032 #include "EvtGenBase/EvtVector4C.hh"
00033 #include "EvtGenModels/EvtSVSCPiso.hh"
00034 #include "EvtGenBase/EvtId.hh"
00035 #include <string>
00036 #include "EvtGenBase/EvtConst.hh"
00037 
00038 EvtSVSCPiso::~EvtSVSCPiso() {}
00039 
00040 void EvtSVSCPiso::getName(std::string& model_name){
00041 
00042   model_name="SVS_CP_ISO";     
00043 
00044 }
00045 
00046 
00047 EvtDecayBase* EvtSVSCPiso::clone(){
00048 
00049   return new EvtSVSCPiso;
00050 
00051 }
00052 
00053 void EvtSVSCPiso::init(){
00054 
00055   // check that there are 26 arguments
00056   checkNArg(26);
00057   checkNDaug(2);
00058 
00059   checkSpinParent(EvtSpinType::SCALAR);
00060 
00061   checkSpinDaughter(0,EvtSpinType::VECTOR);
00062   checkSpinDaughter(1,EvtSpinType::SCALAR);
00063 
00064 }
00065 
00066 
00067 void EvtSVSCPiso::initProbMax(){
00068 
00069 //this might need some revision..
00070 
00071 if ((EvtPDL::chg3(getDaug(0)) > 0) && (EvtPDL::chg3(getDaug(1)) == 0)) {
00072   setProbMax(2.0*(getArg(3)*getArg(3) + 4.0*getArg(23)*getArg(23)));
00073 }
00074 
00075 if ((EvtPDL::chg3(getDaug(0)) < 0) && (EvtPDL::chg3(getDaug(1)) == 0)) {
00076   setProbMax(2.0*(getArg(5)*getArg(5) + 4.0*getArg(25)*getArg(25)));
00077 }
00078 
00079 if ((EvtPDL::chg3(getDaug(0)) == 0) && (EvtPDL::chg3(getDaug(1)) > 0)) {
00080   setProbMax(2.0*(getArg(7)*getArg(7) + 4.0*getArg(23)*getArg(23)));
00081 }
00082 
00083 if ((EvtPDL::chg3(getDaug(0)) == 0) && (EvtPDL::chg3(getDaug(1)) < 0)) {
00084   setProbMax(2.0*(getArg(9)*getArg(9) + 4.0*getArg(25)*getArg(25)));
00085 }
00086 
00087 if ((EvtPDL::chg3(getDaug(0)) > 0) && (EvtPDL::chg3(getDaug(1)) < 0)) {
00088   setProbMax(2.0*(getArg(11)*getArg(11) + getArg(23)*getArg(23) + 
00089                   getArg(19)*getArg(19) + getArg(13)*getArg(13) + 
00090                   getArg(25)*getArg(25) + getArg(21)*getArg(21)));
00091 }
00092 
00093 if ((EvtPDL::chg3(getDaug(0)) < 0) && (EvtPDL::chg3(getDaug(1)) > 0)) {
00094   setProbMax(2.0*(getArg(15)*getArg(15) + getArg(23)*getArg(23) + 
00095                   getArg(19)*getArg(19) + getArg(17)*getArg(17) + 
00096                   getArg(25)*getArg(25) + getArg(21)*getArg(21)));
00097 }
00098 
00099 if ((EvtPDL::chg3(getDaug(0)) == 0) && (EvtPDL::chg3(getDaug(1)) == 0)) {
00100    setProbMax(2.0*(getArg(7)*getArg(7) + getArg(3)*getArg(3) + getArg(11)*getArg(11) + 
00101                   getArg(15)*getArg(15) + 4.0*getArg(19)*getArg(19) + getArg(9)*getArg(9)+
00102                    getArg(5)*getArg(5) + getArg(13)*getArg(13) + getArg(17)*getArg(17) + 
00103                    4.0*getArg(21)*getArg(21)));
00104 }
00105 
00106 }
00107 
00108 
00109 void EvtSVSCPiso::decay( EvtParticle *p){
00110 
00111   //added by Lange Jan4,2000
00112   static EvtId B0=EvtPDL::getId("B0");
00113   static EvtId B0B=EvtPDL::getId("anti-B0");
00114 
00115   double t;
00116   EvtId other_b;
00117   int charged(0);
00118 
00119   int first_time=0;
00120   int flip=0;
00121   EvtId ds[2];
00122 
00123 
00124 //randomly generate the tag (B0 or B0B) 
00125 
00126    double tag = EvtRandom::Flat(0.0,1.0);
00127    if (tag < 0.5) {
00128  
00129     EvtCPUtil::OtherB(p,t,other_b,1.0);
00130     other_b = B0;
00131    }
00132    else {
00133     
00134     EvtCPUtil::OtherB(p,t,other_b,0.0);
00135     other_b = B0B;
00136    }
00137 
00138   if (p->getNDaug()==0) first_time=1;
00139 
00140   if (first_time){
00141     if (EvtRandom::Flat(0.0,1.0)<getArg(3)) flip=1;
00142   }
00143   else{
00144     if (getDaug(0)!=p->getDaug(0)->getId()) flip=1;
00145   }
00146 
00147   if (!flip) {
00148     ds[0]=getDaug(0);
00149     ds[1]=getDaug(1);
00150   }
00151   else{
00152     ds[0]=EvtPDL::chargeConj(getDaug(0));
00153     ds[1]=EvtPDL::chargeConj(getDaug(1));
00154   }
00155 
00156   p->initializePhaseSpace(getNDaug(),ds);
00157 
00158   EvtParticle *v,*s;
00159   v=p->getDaug(0);
00160   s=p->getDaug(1);
00161 
00162    EvtComplex amp;
00163 
00164    EvtComplex A_f,Abar_f;
00165    EvtComplex A_fbar,Abar_fbar;
00166    EvtComplex Apm, Apm_bar, Amp, Amp_bar;
00167 
00168    EvtComplex Tp0, Tp0_bar, T0p, T0p_bar,Tpm, Tpm_bar, Tmp, Tmp_bar;
00169    EvtComplex P1, P1_bar, P0, P0_bar;
00170 
00171    Tp0 = EvtComplex(getArg(3)*cos(getArg(4)),getArg(3)*sin(getArg(4)));
00172    Tp0_bar = EvtComplex(getArg(5)*cos(getArg(6)),getArg(5)*sin(getArg(6)));
00173    T0p = EvtComplex(getArg(7)*cos(getArg(8)),getArg(7)*sin(getArg(8)));
00174    T0p_bar = EvtComplex(getArg(9)*cos(getArg(10)),getArg(9)*sin(getArg(10)));
00175    Tpm = EvtComplex(getArg(11)*cos(getArg(12)),getArg(11)*sin(getArg(12)));
00176    Tpm_bar = EvtComplex(getArg(13)*cos(getArg(14)),getArg(13)*sin(getArg(14)));
00177    Tmp = EvtComplex(getArg(15)*cos(getArg(16)),getArg(15)*sin(getArg(16)));
00178    Tmp_bar = EvtComplex(getArg(17)*cos(getArg(18)),getArg(17)*sin(getArg(18)));
00179    P0 = EvtComplex(getArg(19)*cos(getArg(20)),getArg(19)*sin(getArg(20)));
00180    P0_bar = EvtComplex(getArg(21)*cos(getArg(22)),getArg(21)*sin(getArg(22)));
00181    P1 = EvtComplex(getArg(23)*cos(getArg(24)),getArg(23)*sin(getArg(24)));
00182    P1_bar = EvtComplex(getArg(25)*cos(getArg(26)),getArg(25)*sin(getArg(26)));
00183 
00184 
00185 //***********************charged modes****************************
00186 
00187  if ((EvtPDL::chg3(getDaug(0)) > 0 ) && (EvtPDL::chg3(getDaug(1)) == 0)) {
00188 
00189 //V+ S0, so T+0 + 2 P1
00190    
00191    charged = 1;
00192    A_f = Tp0 + 2.0*P1;
00193  }
00194 
00195  if ((EvtPDL::chg3(getDaug(0)) < 0 ) && (EvtPDL::chg3(getDaug(1)) == 0)) {
00196 
00197 //V- S0, so T+0_bar + 2P1_bar
00198    
00199    charged = 1;
00200    A_f = Tp0_bar + 2.0*P1_bar; 
00201  }
00202  
00203  if ((EvtPDL::chg3(getDaug(0)) == 0 ) && (EvtPDL::chg3(getDaug(1)) > 0)) {
00204 
00205 //V0 S+, so T0+ - 2 P1
00206 
00207    charged = 1;
00208    A_f = T0p - 2.0*P1;
00209  }
00210 
00211  if ((EvtPDL::chg3(getDaug(0)) == 0 ) && (EvtPDL::chg3(getDaug(1)) < 0)) {
00212 
00213 //V0 S-, so T0+_bar - 2 P1_bar
00214 
00215    charged = 1;
00216    A_f = T0p_bar - 2.0*P1_bar;
00217  }
00218 
00219 
00220 //***********************neutral modes***************************
00221 
00222 
00223 //V+ S-, so Af = T+- + P1 + P0
00224 Apm = Tpm + P1 + P0;
00225 Apm_bar = Tpm_bar + P1_bar + P0_bar;
00226 
00227 //V- S+, so Af = T-+ - P1 + P0
00228 Amp = Tmp - P1 + P0;
00229 Amp_bar = Tmp_bar - P1_bar + P0;
00230 
00231 
00232  if ((EvtPDL::chg3(getDaug(0)) > 0 ) && (EvtPDL::chg3(getDaug(1)) < 0)) {
00233 
00234 //V+ S-
00235    charged = 0;
00236    A_f = Apm; 
00237    Abar_f = Apm_bar;
00238    A_fbar = Amp;
00239    Abar_fbar = Amp_bar;
00240 
00241  }
00242 
00243  if ((EvtPDL::chg3(getDaug(0)) < 0 ) && (EvtPDL::chg3(getDaug(1)) > 0)) {
00244 
00245 //V- S+
00246    charged = 0;
00247    A_f = Amp; 
00248    Abar_f = Amp_bar;
00249    A_fbar = Apm;
00250    Abar_fbar = Apm_bar;
00251 
00252  }
00253 
00254  if ((EvtPDL::chg3(getDaug(0)) == 0 ) && (EvtPDL::chg3(getDaug(1)) == 0)) {
00255 
00256 //V0 S0
00257    charged = 0;
00258    A_f = T0p + Tp0 - Tpm - Tmp - 2.0*P0 ; 
00259    Abar_f = T0p_bar + Tp0_bar - Tpm_bar - Tmp_bar - 2.0*P0_bar;
00260    A_fbar = A_f;
00261    Abar_fbar = Abar_f;
00262 
00263  }
00264 
00265 if (charged==0) {
00266    
00267    if (!flip) {
00268      if (other_b==B0B){
00269 
00270        amp=A_f*cos(getArg(1)*t/(2*EvtConst::c))+
00271          EvtComplex(cos(-2.0*getArg(0)),sin(-2.0*getArg(0)))*
00272          EvtComplex(0.0,1.0)*Abar_f*sin(getArg(1)*t/(2*EvtConst::c));
00273      }
00274      if (other_b==B0){
00275             
00276        amp=A_f*EvtComplex(cos(2.0*getArg(0)),sin(2.0*getArg(0)))*
00277          EvtComplex(0.0,1.0)*sin(getArg(1)*t/(2*EvtConst::c))+       
00278          Abar_f*cos(getArg(1)*t/(2*EvtConst::c));
00279      }
00280    }
00281    else{
00282      if (other_b==B0B){
00283 
00284        amp=A_fbar*cos(getArg(1)*t/(2*EvtConst::c))+
00285          EvtComplex(cos(-2.0*getArg(0)),sin(-2.0*getArg(0)))*
00286          EvtComplex(0.0,1.0)*Abar_fbar*sin(getArg(1)*t/(2*EvtConst::c));
00287      }
00288      if (other_b==B0){
00289 
00290        amp=A_fbar*EvtComplex(cos(2.0*getArg(0)),sin(2.0*getArg(0)))*
00291          EvtComplex(0.0,1.0)*sin(getArg(1)*t/(2*EvtConst::c))+       
00292          Abar_fbar*cos(getArg(1)*t/(2*EvtConst::c));
00293      }
00294    }
00295 
00296 }
00297 else amp = A_f;
00298 
00299   EvtVector4R p4_parent;
00300 
00301   p4_parent=v->getP4()+s->getP4();
00302 
00303   double norm=1.0/v->getP4().d3mag();
00304 
00305    vertex(0,amp*norm*p4_parent*(v->epsParent(0)));
00306    vertex(1,amp*norm*p4_parent*(v->epsParent(1)));
00307    vertex(2,amp*norm*p4_parent*(v->epsParent(2)));
00308 
00309   return ;
00310 }
00311 

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