LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenBase - EvtSemiLeptonicScalarAmp.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 42 0.0 %
Date: 2016-06-14 17:26:59 Functions: 0 1 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: EvtSemiLeptonicScalarAmp.cc
      12             : //
      13             : // Description: Routine to implement semileptonic decays to pseudo-scalar
      14             : //              mesons. 
      15             : //
      16             : // Modification history:
      17             : //
      18             : //    DJL       April 17,1998       Module created
      19             : //
      20             : //------------------------------------------------------------------------
      21             : //
      22             : #include "EvtGenBase/EvtPatches.hh"
      23             : #include "EvtGenBase/EvtPatches.hh"
      24             : #include "EvtGenBase/EvtParticle.hh"
      25             : #include "EvtGenBase/EvtGenKine.hh"
      26             : #include "EvtGenBase/EvtPDL.hh"
      27             : #include "EvtGenBase/EvtReport.hh"
      28             : #include "EvtGenBase/EvtVector4C.hh"
      29             : #include "EvtGenBase/EvtTensor4C.hh"
      30             : #include "EvtGenBase/EvtDiracSpinor.hh"
      31             : #include "EvtGenBase/EvtSemiLeptonicScalarAmp.hh"
      32             : #include "EvtGenBase/EvtId.hh"
      33             : #include "EvtGenBase/EvtAmp.hh"
      34             : #include "EvtGenBase/EvtSemiLeptonicFF.hh"
      35             : 
      36             : void EvtSemiLeptonicScalarAmp::CalcAmp( EvtParticle *parent,
      37             :                                         EvtAmp& amp,
      38             :                                         EvtSemiLeptonicFF *FormFactors ) {
      39             : 
      40           0 :   static EvtId EM=EvtPDL::getId("e-");
      41           0 :   static EvtId MUM=EvtPDL::getId("mu-");
      42           0 :   static EvtId TAUM=EvtPDL::getId("tau-");
      43           0 :   static EvtId EP=EvtPDL::getId("e+");
      44           0 :   static EvtId MUP=EvtPDL::getId("mu+");
      45           0 :   static EvtId TAUP=EvtPDL::getId("tau+");
      46             :   
      47             :   //Add the lepton and neutrino 4 momenta to find q2
      48             : 
      49           0 :   EvtVector4R q = parent->getDaug(1)->getP4() 
      50           0 :                     + parent->getDaug(2)->getP4();
      51           0 :   double q2 = (q.mass2());
      52             : 
      53           0 :   double fpf,f0f;
      54           0 :   double mesonmass = parent->getDaug(0)->mass();
      55           0 :   double parentmass = parent->mass();
      56             : 
      57           0 :   FormFactors->getscalarff(parent->getId(),
      58           0 :                            parent->getDaug(0)->getId(),
      59             :                            q2,
      60             :                            mesonmass,
      61             :                            &fpf, 
      62             :                            &f0f);
      63             : 
      64             : 
      65           0 :   EvtVector4R p4b;
      66           0 :   p4b.set(parent->mass(),0.0,0.0,0.0);
      67           0 :   EvtVector4R p4meson = parent->getDaug(0)->getP4();
      68             :   double mdiffoverq2;
      69           0 :   mdiffoverq2 = parentmass*parentmass - mesonmass*mesonmass;
      70           0 :   mdiffoverq2 = mdiffoverq2 / q2;
      71             : 
      72           0 :   EvtVector4C l1,l2;
      73             : 
      74           0 :   EvtId l_num = parent->getDaug(1)->getId();
      75           0 :   EvtVector4C tds;
      76             : 
      77           0 :   if (l_num==EM||l_num==MUM||l_num==TAUM){
      78             : 
      79           0 :     tds = EvtVector4C(fpf*(p4b+p4meson - (mdiffoverq2*(p4b-p4meson)))+
      80           0 :                     + f0f*mdiffoverq2*(p4b-p4meson));
      81             : 
      82           0 :     l1=EvtLeptonVACurrent(parent->getDaug(1)->spParent(0),
      83           0 :                           parent->getDaug(2)->spParentNeutrino());
      84           0 :     l2=EvtLeptonVACurrent(parent->getDaug(1)->spParent(1),
      85           0 :                           parent->getDaug(2)->spParentNeutrino());
      86           0 :   }
      87             :   else{
      88           0 :     if (l_num==EP||l_num==MUP||l_num==TAUP){
      89             : 
      90           0 :       tds = EvtVector4C(fpf*(p4b+p4meson - (mdiffoverq2*(p4b-p4meson)))+
      91           0 :                     + f0f*mdiffoverq2*(p4b-p4meson));
      92             : 
      93           0 :       l1=EvtLeptonVACurrent(parent->getDaug(2)->spParentNeutrino(),
      94           0 :                             parent->getDaug(1)->spParent(0));
      95           0 :       l2=EvtLeptonVACurrent(parent->getDaug(2)->spParentNeutrino(),
      96           0 :                             parent->getDaug(1)->spParent(1));
      97           0 :     }
      98             :     else{
      99           0 :       report(Severity::Error,"EvtGen") << "dfnb89agngri wrong lepton number\n";
     100             :     }
     101             :   }
     102             : 
     103           0 :   amp.vertex(0,l1*tds);
     104           0 :   amp.vertex(1,l2*tds);
     105             : 
     106           0 : }
     107             : 

Generated by: LCOV version 1.11