LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenModels - EvtVSPPwave.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 34 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: EvtVSPPwave.cc
      12             : //
      13             : // Description: Routine to decay vector-> scalar photon in P-wave
      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/EvtTensor4C.hh"
      26             : #include "EvtGenBase/EvtPDL.hh"
      27             : #include "EvtGenModels/EvtVSPPwave.hh"
      28             : #include "EvtGenBase/EvtReport.hh"
      29             : #include <string>
      30             : #include "EvtGenBase/EvtVector4C.hh"
      31             : 
      32           0 : EvtVSPPwave::~EvtVSPPwave() {}
      33             : 
      34             : std::string EvtVSPPwave::getName(){
      35             : 
      36           0 :   return "VSP_PWAVE";     
      37             : 
      38             : }
      39             : 
      40             : 
      41             : EvtDecayBase* EvtVSPPwave::clone(){
      42             : 
      43           0 :   return new EvtVSPPwave;
      44             : 
      45           0 : }
      46             : 
      47             : void EvtVSPPwave::init(){
      48             : 
      49             :   // check that there are 0 arguments
      50           0 :   checkNArg(0);
      51           0 :   checkNDaug(2);
      52             : 
      53           0 :   checkSpinParent(EvtSpinType::VECTOR);
      54             :   
      55           0 :   checkSpinDaughter(0,EvtSpinType::SCALAR);
      56           0 :   checkSpinDaughter(1,EvtSpinType::PHOTON);
      57             : 
      58           0 : }
      59             : 
      60             : void EvtVSPPwave::initProbMax(){
      61             : 
      62           0 :   setProbMax(1);
      63           0 : }
      64             : 
      65             : void EvtVSPPwave::decay( EvtParticle *p){
      66             : 
      67           0 :   p->initializePhaseSpace(getNDaug(),getDaugs());
      68             : 
      69             :   EvtParticle *gamma;
      70           0 :   gamma = p->getDaug(1);
      71             : 
      72           0 :   double m_p=p->mass();
      73           0 :   EvtVector4R momgamma = gamma->getP4();
      74             : 
      75             :   //work in the parent ,p,  rest frame.
      76           0 :   EvtVector4R p4_p;
      77           0 :   p4_p.set(m_p, 0.0, 0.0, 0.0 );
      78             : 
      79             :   //  Put phase space results into the daughters.
      80             :  
      81           0 :   EvtTensor4C tds;
      82             : 
      83           0 :   double norm=1/(m_p*momgamma.d3mag());
      84             : 
      85           0 :   tds = dual(EvtGenFunctions::directProd(norm*p4_p,momgamma));
      86             : 
      87           0 :   vertex(0,0,(tds.cont1( p->eps(0))).cont(
      88           0 :          gamma->epsParentPhoton(0).conj() ) );
      89           0 :   vertex(0,1,(tds.cont1( p->eps(0))).cont(
      90           0 :               gamma->epsParentPhoton(1).conj() ) );
      91             : 
      92           0 :   vertex(1,0,(tds.cont1( p->eps(1))).cont(
      93           0 :               gamma->epsParentPhoton(0).conj() ) );
      94           0 :   vertex(1,1,(tds.cont1( p->eps(1))).cont(
      95           0 :               gamma->epsParentPhoton(1).conj() ) );
      96             : 
      97           0 :   vertex(2,0,(tds.cont1( p->eps(2))).cont(
      98           0 :               gamma->epsParentPhoton(0).conj() ) );
      99           0 :   vertex(2,1,(tds.cont1( p->eps(2))).cont(
     100           0 :               gamma->epsParentPhoton(1).conj() ) );
     101             : 
     102             :   return ;
     103           0 : }
     104             : 

Generated by: LCOV version 1.11