LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenModels - EvtBtoKpiCPiso.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 84 0.0 %
Date: 2016-06-14 17:26:59 Functions: 0 8 0.0 %

          Line data    Source code
       1             : //--------------------------------------------------------------------------
       2             : //
       3             : // Environment:
       4             : //      This software is part of the EvtGen package developed jointly
       5             : //      for the BaBar and CLEO collaborations.  If you use all or part
       6             : //      of it, please give an appropriate acknowledgement.
       7             : //
       8             : // Copyright Information: See EvtGen/COPYRIGHT
       9             : //      Copyright (C) 1998      Caltech, UCSB
      10             : //
      11             : // Module: EvtBtoKpiCPiso.cc
      12             : //
      13             : // Description: Routine to decay B -> K pi with isospin amplitudes
      14             : //
      15             : // Modification history:
      16             : //
      17             : //    RYD/NK     Febuary 7, 1998         Module created
      18             : //
      19             : //------------------------------------------------------------------------
      20             : // 
      21             : #include "EvtGenBase/EvtPatches.hh"
      22             : #include <stdlib.h>
      23             : #include "EvtGenBase/EvtParticle.hh"
      24             : #include "EvtGenBase/EvtGenKine.hh"
      25             : #include "EvtGenBase/EvtPDL.hh"
      26             : #include "EvtGenBase/EvtReport.hh"
      27             : #include "EvtGenModels/EvtBtoKpiCPiso.hh"
      28             : #include <string>
      29             : 
      30           0 : EvtBtoKpiCPiso::~EvtBtoKpiCPiso() {}
      31             : 
      32             : std::string EvtBtoKpiCPiso::getName(){
      33             : 
      34           0 :   return "BTOKPI_CP_ISO";     
      35             : 
      36             : }
      37             : 
      38             : 
      39             : EvtDecayBase* EvtBtoKpiCPiso::clone(){
      40             : 
      41           0 :   return new EvtBtoKpiCPiso;
      42             : 
      43           0 : }
      44             : 
      45             : 
      46             : void EvtBtoKpiCPiso::init(){
      47             : 
      48             :   // check that there are 15 arguments
      49           0 :   checkNArg(15);
      50           0 :   checkNDaug(2);
      51             : 
      52           0 :   checkSpinParent(EvtSpinType::SCALAR);
      53             : 
      54           0 :   checkSpinDaughter(0,EvtSpinType::SCALAR);
      55           0 :   checkSpinDaughter(1,EvtSpinType::SCALAR);
      56           0 : }
      57             : 
      58             : 
      59             : void EvtBtoKpiCPiso::initProbMax() {
      60             : 
      61             : //this might need to be revised
      62             : 
      63             :   //added by Lange Jan4,2000
      64           0 :   static EvtId PI0=EvtPDL::getId("pi0");
      65           0 :   static EvtId PIP=EvtPDL::getId("pi+");
      66           0 :   static EvtId PIM=EvtPDL::getId("pi+");
      67           0 :   static EvtId K0=EvtPDL::getId("K0");
      68           0 :   static EvtId KB=EvtPDL::getId("anti-K0");
      69           0 :   static EvtId KP=EvtPDL::getId("K+");
      70           0 :   static EvtId KM=EvtPDL::getId("K-");
      71             : 
      72           0 : if (((getDaug(0)==PI0) && (getDaug(1)==KP)) || ((getDaug(0)==KP) && (getDaug(1)==PI0)))  {
      73           0 :    setProbMax(2.0*(getArg(2)*getArg(2) + getArg(10)*getArg(10)));
      74           0 :  }
      75             : 
      76           0 : if (((getDaug(0)==PI0) && (getDaug(1)==KM)) || ((getDaug(0)==KM) && (getDaug(1)==PI0)))  {
      77           0 :    setProbMax( 2.0*(getArg(4)*getArg(4) + getArg(12)*getArg(12)));
      78           0 :  }
      79             : 
      80           0 : if (((getDaug(0)==PIP) && (getDaug(1)==K0)) || ((getDaug(0)==K0) && (getDaug(1)==PIP))) {
      81           0 :    setProbMax( 4.0*(getArg(6)*getArg(6) + getArg(10)*getArg(10)));
      82           0 :  }
      83             : 
      84           0 : if (((getDaug(0)==PIM) && (getDaug(1)==KB)) || ((getDaug(0)==KB) && (getDaug(1)==PIM))) {
      85           0 :    setProbMax( 4.0*(getArg(8)*getArg(8) + getArg(12)*getArg(12)));
      86           0 : }
      87             : 
      88           0 : if (((getDaug(0)==PI0) && (getDaug(1)==K0)) || ((getDaug(0)==K0) && (getDaug(1)==PI0))) { 
      89           0 :    setProbMax( 2.0*(getArg(2)*getArg(2) + getArg(10)*getArg(10))); 
      90           0 : }
      91             : 
      92           0 : if (((getDaug(0)==PI0) && (getDaug(1)==KB)) || ((getDaug(0)==KB) && (getDaug(1)==PI0))) {
      93           0 :    setProbMax( 2.0*(getArg(4)*getArg(4) + getArg(12)*getArg(12))); 
      94           0 : }
      95             : 
      96           0 : if (((getDaug(0)==PIM) && (getDaug(1)==KP)) || ((getDaug(0)==KP) && (getDaug(1)==PIM))) {
      97           0 :    setProbMax( 4.0*(getArg(6)*getArg(6) + getArg(10)*getArg(10)));
      98           0 : }
      99             : 
     100           0 : if (((getDaug(0)==PIP) && (getDaug(1)==KM)) || ((getDaug(0)==KM) && (getDaug(1)==PIP))) {
     101           0 :    setProbMax( 4.0*(getArg(8)*getArg(8) + getArg(12)*getArg(12)));
     102           0 : }
     103           0 : }
     104             : 
     105             : void EvtBtoKpiCPiso::decay( EvtParticle *p ){
     106             : 
     107             : 
     108           0 :   p->initializePhaseSpace(getNDaug(),getDaugs());
     109             :   //added by Lange Jan4,2000
     110           0 :   static EvtId PI0=EvtPDL::getId("pi0");
     111           0 :   static EvtId PIP=EvtPDL::getId("pi+");
     112           0 :   static EvtId PIM=EvtPDL::getId("pi+");
     113           0 :   static EvtId K0=EvtPDL::getId("K0");
     114           0 :   static EvtId KB=EvtPDL::getId("anti-K0");
     115           0 :   static EvtId KP=EvtPDL::getId("K+");
     116           0 :   static EvtId KM=EvtPDL::getId("K-");
     117             : 
     118             : 
     119           0 :    EvtComplex A;
     120           0 :    EvtComplex U, Ubar, V, Vbar, W, Wbar;
     121             : 
     122           0 :    U = EvtComplex(getArg(2)*cos(getArg(3)),getArg(2)*sin(getArg(3)));
     123           0 :    Ubar = EvtComplex(getArg(4)*cos(getArg(5)),getArg(4)*sin(getArg(5)));
     124           0 :    V = EvtComplex(getArg(6)*cos(getArg(7)),getArg(6)*sin(getArg(7)));
     125           0 :    Vbar = EvtComplex(getArg(8)*cos(getArg(9)),getArg(8)*sin(getArg(9)));
     126           0 :    W = EvtComplex(getArg(10)*cos(getArg(11)),getArg(10)*sin(getArg(11)));
     127           0 :    Wbar = EvtComplex(getArg(12)*cos(getArg(13)),getArg(12)*sin(getArg(13)));  
     128             : 
     129             : //depending on what combination of K pi we have, there will be different 
     130             : //A and Abar (only A given in comments!)
     131             : 
     132           0 : if (((getDaug(0)==PI0) && (getDaug(1)==KP)) || ((getDaug(0)==KP) && (getDaug(1)==PI0)))  {
     133             : 
     134             : //pi0 K+, so U - W
     135             : 
     136           0 :    A = U - W;
     137           0 :   }
     138             :  
     139           0 : if (((getDaug(0)==PI0) && (getDaug(1)==KM)) || ((getDaug(0)==KM) && (getDaug(1)==PI0)))  {
     140             : 
     141             : //pi0 K-, so Ubar - Wbar
     142             :   
     143           0 :    A = Ubar - Wbar;
     144           0 :  }
     145             : 
     146           0 :  if (((getDaug(0)==PIP) && (getDaug(1)==K0)) || ((getDaug(0)==K0) && (getDaug(1)==PIP))) {
     147             : 
     148             : //pi+ K0, so V + W
     149             :   
     150           0 :     A = sqrt(2.0)*(V + W);
     151           0 :  }
     152             : 
     153           0 :  if (((getDaug(0)==PIM) && (getDaug(1)==KB)) || ((getDaug(0)==KB) && (getDaug(1)==PIM))) {
     154             : 
     155             : //pi- K0bar, so Vbar + Wbar
     156           0 :    A = sqrt(2.0)*(Vbar + Wbar);
     157           0 :  }
     158             : 
     159           0 :  if (((getDaug(0)==PI0) && (getDaug(1)==K0)) || ((getDaug(0)==K0) && (getDaug(1)==PI0))) { 
     160             : 
     161             : //pi0 K0, so U + W
     162             : 
     163           0 :    A= U + W;
     164           0 :   }
     165             : 
     166           0 :  if (((getDaug(0)==PI0) && (getDaug(1)==KB)) || ((getDaug(0)==KB) && (getDaug(1)==PI0))) {
     167             : 
     168           0 :   A = Ubar + Wbar;
     169           0 :   }
     170             : 
     171           0 :  if (((getDaug(0)==PIM) && (getDaug(1)==KP)) || ((getDaug(0)==KP) && (getDaug(1)==PIM))) {
     172             : 
     173             : //pi- K+, so V - W
     174             :     
     175           0 :     A = sqrt(2.0)*(V - W);
     176           0 :   }
     177             : 
     178           0 :  if (((getDaug(0)==PIP) && (getDaug(1)==KM)) || ((getDaug(0)==KM) && (getDaug(1)==PIP))) {
     179             : 
     180           0 :      A = sqrt(2.0)*(Vbar - Wbar);
     181           0 :   }
     182             : 
     183           0 :    vertex(A);
     184             : 
     185             :   return ;
     186           0 : }
     187             : 

Generated by: LCOV version 1.11