LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenModels - EvtSVS.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 25 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: EvtSVS.cc
      12             : //
      13             : // Description: Routine to decay scalar -> vector + scalar
      14             : //
      15             : // Modification history:
      16             : //
      17             : //    RYD       November 24, 1996       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/EvtReport.hh"
      26             : #include "EvtGenBase/EvtPDL.hh"
      27             : #include "EvtGenBase/EvtVector4C.hh"
      28             : #include "EvtGenModels/EvtSVS.hh"
      29             : #include <string>
      30             : 
      31           0 : EvtSVS::~EvtSVS() {}
      32             : 
      33             : std::string EvtSVS::getName(){
      34             : 
      35           0 :   return "SVS";     
      36             : 
      37             : }
      38             : 
      39             : 
      40             : EvtDecayBase* EvtSVS::clone(){
      41             : 
      42           0 :   return new EvtSVS;
      43             : 
      44           0 : }
      45             : 
      46             : void EvtSVS::init(){
      47             : 
      48             :   // check that there are 0 arguments
      49           0 :   checkNArg(0);
      50           0 :   checkNDaug(2);
      51             :     
      52           0 :   checkSpinParent(EvtSpinType::SCALAR);
      53             : 
      54           0 :   checkSpinDaughter(0,EvtSpinType::VECTOR);
      55           0 :   checkSpinDaughter(1,EvtSpinType::SCALAR);
      56             : 
      57             : 
      58           0 : }
      59             : 
      60             : 
      61             : 
      62             : void EvtSVS::initProbMax(){
      63             : 
      64           0 :   setProbMax(1.0);
      65             : 
      66           0 : }
      67             : 
      68             : void EvtSVS::decay( EvtParticle *p){
      69             : 
      70           0 :   p->initializePhaseSpace(getNDaug(),getDaugs());
      71             : 
      72             :   EvtParticle *v;
      73           0 :   v = p->getDaug(0);
      74           0 :   double massv = v->mass();
      75           0 :   EvtVector4R momv = v->getP4();
      76           0 :   EvtVector4R moms = p->getDaug(1)->getP4();
      77           0 :   double m_parent = p->mass();
      78           0 :   EvtVector4R p4_parent = momv+moms;
      79             : 
      80           0 :   double norm=massv/(momv.d3mag()*m_parent);
      81           0 :   p4_parent = norm*p4_parent;
      82           0 :   vertex(0,p4_parent*(v->epsParent(0)));
      83           0 :   vertex(1,p4_parent*(v->epsParent(1)));
      84           0 :   vertex(2,p4_parent*(v->epsParent(2)));
      85             :   
      86             :   return ;
      87           0 : }
      88             : 

Generated by: LCOV version 1.11