LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenModels - EvtSLN.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 33 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: EvtSLN.cc
      12             : //
      13             : // Description: B ==> tau + nu
      14             : //
      15             : // Modification history:
      16             : //
      17             : //    RYD/SHY   April 23, 1997           Module created
      18             : //
      19             : //------------------------------------------------------------------------
      20             : //
      21             : #include "EvtGenBase/EvtPatches.hh"
      22             : #include <stdlib.h>
      23             : #include <iostream>
      24             : #include <string>
      25             : #include "EvtGenBase/EvtParticle.hh"
      26             : #include "EvtGenBase/EvtPDL.hh"
      27             : #include "EvtGenBase/EvtGenKine.hh"
      28             : #include "EvtGenModels/EvtSLN.hh"
      29             : #include "EvtGenBase/EvtDiracSpinor.hh"
      30             : #include "EvtGenBase/EvtReport.hh"
      31             : #include "EvtGenBase/EvtVector4C.hh"
      32             : 
      33           0 : EvtSLN::~EvtSLN() {}
      34             : 
      35             : std::string EvtSLN::getName(){
      36             : 
      37           0 :   return "SLN";     
      38             : 
      39             : }
      40             : 
      41             : EvtDecayBase* EvtSLN::clone(){
      42             : 
      43           0 :   return new EvtSLN;
      44             : 
      45           0 : }
      46             : 
      47             : 
      48             : void EvtSLN::init(){
      49             : 
      50             :   // check that there are 0 arguments
      51           0 :   checkNArg(0);
      52           0 :   checkNDaug(2);
      53             :     
      54           0 :   checkSpinParent(EvtSpinType::SCALAR);
      55             : 
      56           0 :   checkSpinDaughter(0,EvtSpinType::DIRAC);
      57           0 :   checkSpinDaughter(1,EvtSpinType::NEUTRINO);
      58             : 
      59           0 : }
      60             : 
      61             : 
      62             : void EvtSLN::initProbMax(){
      63             : 
      64           0 :   double M=EvtPDL::getMeanMass(getParentId());
      65           0 :   double m=EvtPDL::getMeanMass(getDaug(0));
      66             : 
      67           0 :   double probMax=8.0*(M*M-m*m)*m*m;
      68             : 
      69           0 :   setProbMax(probMax);
      70             : 
      71           0 : }
      72             : 
      73             : 
      74             : void EvtSLN::decay(EvtParticle *p){
      75             : 
      76           0 :   static EvtId EM=EvtPDL::getId("e-");
      77           0 :   static EvtId MUM=EvtPDL::getId("mu-");
      78           0 :   static EvtId TAUM=EvtPDL::getId("tau-");
      79             : 
      80           0 :   p->initializePhaseSpace(getNDaug(),getDaugs());
      81             : 
      82             :   EvtParticle *l, *nul;
      83           0 :   l= p->getDaug(0);
      84           0 :   nul= p->getDaug(1);
      85             : 
      86           0 :   EvtVector4R p4_p;
      87           0 :   p4_p.set(p->mass(),0.0,0.0,0.0);
      88             : 
      89           0 :   EvtVector4C l1, l2;
      90             :   
      91           0 :   if (getDaug(0)==TAUM || getDaug(0)==MUM || getDaug(0)==EM) {
      92           0 :     l1=EvtLeptonVACurrent(l->spParent(0),nul->spParentNeutrino());
      93           0 :     l2=EvtLeptonVACurrent(l->spParent(1),nul->spParentNeutrino());
      94           0 :   }
      95             :   else{
      96           0 :     l1=EvtLeptonVACurrent(nul->spParentNeutrino(),l->spParent(0));
      97           0 :     l2=EvtLeptonVACurrent(nul->spParentNeutrino(),l->spParent(1));
      98             :   }
      99             : 
     100           0 :   vertex(0,p4_p*l1);
     101           0 :   vertex(1,p4_p*l2);
     102             :   
     103             :   return;
     104             : 
     105           0 : }
     106             : 
     107             : 

Generated by: LCOV version 1.11