LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenModels - EvtSVPHelAmp.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 42 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: EvtSVPHelAmp.cc
      12             : //
      13             : // Description: Routine to decay scalar -> vectors+photon
      14             : //              by specifying the helicity amplitudes
      15             : //
      16             : // Modification history:
      17             : //
      18             : //    RYD       July 26, 1997       Module created
      19             : //
      20             : //------------------------------------------------------------------------
      21             : // 
      22             : #include "EvtGenBase/EvtPatches.hh"
      23             : #include <stdlib.h>
      24             : #include "EvtGenBase/EvtParticle.hh"
      25             : #include "EvtGenBase/EvtGenKine.hh"
      26             : #include "EvtGenBase/EvtPDL.hh"
      27             : #include "EvtGenBase/EvtVector4R.hh"
      28             : #include "EvtGenBase/EvtVector4C.hh"
      29             : #include "EvtGenBase/EvtTensor4C.hh"
      30             : #include "EvtGenBase/EvtReport.hh"
      31             : #include "EvtGenBase/EvtComplex.hh"
      32             : #include "EvtGenModels/EvtSVPHelAmp.hh"
      33             : #include <string>
      34             : 
      35           0 : EvtSVPHelAmp::~EvtSVPHelAmp() {}
      36             : 
      37             : std::string EvtSVPHelAmp::getName(){
      38             : 
      39           0 :   return "SVP_HELAMP";     
      40             : 
      41             : }
      42             : 
      43             : 
      44             : EvtDecayBase* EvtSVPHelAmp::clone(){
      45             : 
      46           0 :   return new EvtSVPHelAmp;
      47             : 
      48           0 : }
      49             : 
      50             : void EvtSVPHelAmp::initProbMax(){
      51             : 
      52           0 :   setProbMax(getArg(0)*getArg(0)+getArg(2)*getArg(2));
      53             : 
      54           0 : }
      55             : 
      56             : 
      57             : void EvtSVPHelAmp::init(){
      58             : 
      59             :   // check that there are 4 arguments
      60           0 :   checkNArg(4);
      61           0 :   checkNDaug(2);
      62             : 
      63           0 :   checkSpinParent(EvtSpinType::SCALAR);
      64             : 
      65           0 :   checkSpinDaughter(0,EvtSpinType::VECTOR);
      66           0 :   checkSpinDaughter(1,EvtSpinType::PHOTON);
      67             : 
      68           0 : }
      69             : 
      70             : void EvtSVPHelAmp::decay( EvtParticle *p ){
      71             : 
      72           0 :   EvtComplex hp(getArg(0)*cos(getArg(1)),getArg(0)*sin(getArg(1)));
      73           0 :   EvtComplex hm(getArg(2)*cos(getArg(3)),getArg(2)*sin(getArg(3)));
      74             : 
      75             : 
      76             :   //  Routine to decay a vector into a vector and scalar.  Started
      77             :   //  by ryd on Oct 17, 1996.
      78             : 
      79             :       
      80             :   // This routine is adopted from EvtSVVHel and since there is
      81             :   // a photon that can not have helicity 0 this is put in by 
      82             :   // setting the h0 amplitude to 0.
      83           0 :   EvtComplex h0=EvtComplex(0.0,0.0);
      84             : 
      85             :   EvtParticle *v1,*ph;
      86             : 
      87           0 :   p->initializePhaseSpace(getNDaug(),getDaugs());
      88           0 :   v1 = p->getDaug(0);
      89           0 :   ph = p->getDaug(1);
      90           0 :   EvtVector4R momv1 = v1->getP4();
      91           0 :   EvtVector4R momph = ph->getP4();
      92             : 
      93           0 :   EvtTensor4C d,g;
      94             : 
      95           0 :   g.setdiag(1.0,-1.0,-1.0,-1.0);
      96             : 
      97           0 :   EvtVector4R v,vp;
      98             : 
      99           0 :   v=momv1/momv1.d3mag();
     100           0 :   vp=(momv1+momph)/(momv1+momph).mass();   
     101             : 
     102           0 :   d=((1.0/sqrt(3.0))*(h0-(hp+hm))*(-1.0/sqrt(3.0)))*g+
     103           0 :     ((1.0/sqrt(2.0))*(hp-hm)*EvtComplex(0.0,1.0)*(sqrt(1.0/2.0)))*dual(EvtGenFunctions::directProd(v,vp))+
     104           0 :     (sqrt(2.0/3.0)*(h0+0.5*(hp+hm))*sqrt(3.0/2.0))*(EvtGenFunctions::directProd(v,v)+(1.0/3.0)*g);
     105             : 
     106           0 :   EvtVector4C ep0,ep1,ep2;  
     107             :   
     108           0 :   ep0=d.cont1(v1->eps(0).conj());
     109           0 :   ep1=d.cont1(v1->eps(1).conj());
     110           0 :   ep2=d.cont1(v1->eps(2).conj());
     111             : 
     112           0 :   EvtVector4C ep20,ep21,ep22;
     113             : 
     114           0 :   ep20=ph->epsParentPhoton(0).conj();  
     115           0 :   ep21=ph->epsParentPhoton(1).conj();  
     116             : 
     117           0 :   vertex(0,0,ep0*ep20);
     118           0 :   vertex(0,1,ep0*ep21);
     119             :   
     120           0 :   vertex(1,0,ep1*ep20);
     121           0 :   vertex(1,1,ep1*ep21);
     122             :    
     123           0 :   vertex(2,0,ep2*ep20);
     124           0 :   vertex(2,1,ep2*ep21);
     125             : 
     126             :                                  
     127             :   return ;
     128             : 
     129           0 : }
     130             : 

Generated by: LCOV version 1.11