LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenModels - EvtVtoSll.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 45 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: EvtVll.cc
      12             : //
      13             : // Description: The decay of a vector meson to a scalar and a 
      14             : //              lepton pair. E.g. D_s*+ -> D_s+ e+ e-
      15             : //           
      16             : //
      17             : // Modification history:
      18             : //
      19             : //    RYD       February 28, 2009       Module created
      20             : //
      21             : //------------------------------------------------------------------------
      22             : //
      23             : #include "EvtGenBase/EvtPatches.hh"
      24             : #include <stdlib.h>
      25             : #include <iostream>
      26             : #include <string>
      27             : #include "EvtGenBase/EvtParticle.hh"
      28             : #include "EvtGenBase/EvtPDL.hh"
      29             : #include "EvtGenBase/EvtGenKine.hh"
      30             : #include "EvtGenModels/EvtVtoSll.hh"
      31             : #include "EvtGenBase/EvtDiracSpinor.hh"
      32             : #include "EvtGenBase/EvtReport.hh"
      33             : #include "EvtGenBase/EvtVector4C.hh"
      34             : #include "EvtGenBase/EvtTensor4C.hh"
      35             : 
      36           0 : EvtVtoSll::~EvtVtoSll() {}
      37             : 
      38             : std::string EvtVtoSll::getName(){
      39             : 
      40           0 :   return "VTOSLL";     
      41             : 
      42             : }
      43             : 
      44             : 
      45             : EvtDecayBase* EvtVtoSll::clone(){
      46             : 
      47           0 :   return new EvtVtoSll;
      48             : 
      49           0 : }
      50             : 
      51             : void EvtVtoSll::init(){
      52             : 
      53             :   // check that there are 0 arguments
      54           0 :   checkNArg(0);
      55           0 :   checkNDaug(3);
      56             : 
      57           0 :   checkSpinParent(EvtSpinType::VECTOR);
      58             :   
      59           0 :   checkSpinDaughter(0,EvtSpinType::SCALAR);
      60           0 :   checkSpinDaughter(1,EvtSpinType::DIRAC);
      61           0 :   checkSpinDaughter(2,EvtSpinType::DIRAC);
      62             : 
      63           0 : }
      64             : 
      65             : void EvtVtoSll::initProbMax(){
      66             : 
      67             :   //setProbMax(1.0);
      68             : 
      69           0 : }
      70             : 
      71             : void EvtVtoSll::decay(EvtParticle *p){
      72             : 
      73           0 :   p->initializePhaseSpace(getNDaug(),getDaugs());
      74             : 
      75             :   EvtParticle *l1, *l2;
      76           0 :   l1 = p->getDaug(1);
      77           0 :   l2 = p->getDaug(2);
      78             : 
      79           0 :   EvtVector4C l11, l12, l21, l22;
      80           0 :   l11=EvtLeptonVCurrent(l1->spParent(0),l2->spParent(0));
      81           0 :   l12=EvtLeptonVCurrent(l1->spParent(0),l2->spParent(1));
      82           0 :   l21=EvtLeptonVCurrent(l1->spParent(1),l2->spParent(0));
      83           0 :   l22=EvtLeptonVCurrent(l1->spParent(1),l2->spParent(1));
      84             : 
      85           0 :   EvtVector4C eps0=p->eps(0);
      86           0 :   EvtVector4C eps1=p->eps(1);
      87           0 :   EvtVector4C eps2=p->eps(2);
      88             : 
      89           0 :   EvtVector4R P=p->getP4Restframe();
      90           0 :   EvtVector4R k=l1->getP4()+l2->getP4();
      91           0 :   double k2=k*k;
      92             : 
      93           0 :   EvtTensor4C T(dual(EvtGenFunctions::directProd(P,(1.0/k2)*k)));
      94             : 
      95           0 :   double M2=p->mass();
      96           0 :   M2*=M2;
      97           0 :   double m2=l1->mass();
      98           0 :   m2*=m2;
      99             : 
     100           0 :   double norm=1.0/sqrt(2*M2+4*m2-4*m2*m2/M2);
     101             : 
     102           0 :   vertex(0,0,0,norm*(eps0*T.cont2(l11)));
     103           0 :   vertex(0,0,1,norm*(eps0*T.cont2(l12)));
     104           0 :   vertex(0,1,0,norm*(eps0*T.cont2(l21)));
     105           0 :   vertex(0,1,1,norm*(eps0*T.cont2(l22)));
     106             :   
     107           0 :   vertex(1,0,0,norm*(eps1*T.cont2(l11)));
     108           0 :   vertex(1,0,1,norm*(eps1*T.cont2(l12)));
     109           0 :   vertex(1,1,0,norm*(eps1*T.cont2(l21)));
     110           0 :   vertex(1,1,1,norm*(eps1*T.cont2(l22)));
     111             :   
     112           0 :   vertex(2,0,0,norm*(eps2*T.cont2(l11)));
     113           0 :   vertex(2,0,1,norm*(eps2*T.cont2(l12)));
     114           0 :   vertex(2,1,0,norm*(eps2*T.cont2(l21)));
     115           0 :   vertex(2,1,1,norm*(eps2*T.cont2(l22)));
     116             :   
     117             :   return;
     118             : 
     119           0 : }
     120             : 
     121             : 
     122             : 
     123             : 
     124             : 
     125             : 
     126             : 
     127             : 
     128             : 
     129             : 
     130             : 
     131             : 
     132             : 

Generated by: LCOV version 1.11