LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenModels - EvtCBTo3piP00.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 57 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: EvtCBTo3piP00.cc
      12             : //
      13             : // Description: Routine to decay B+/-->pi0 pi0 pi+/-
      14             : //              and has CP violation.
      15             : //
      16             : // Modification history:
      17             : //
      18             : //    RYD,Versille     May 6, 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/EvtReport.hh"
      28             : #include "EvtGenModels/EvtCBTo3piP00.hh"
      29             : #include <string>
      30             : 
      31             : //Below you will have do modify the declaration to be appropriate
      32             : //for your new routine for the calculation of the amplitude
      33             : 
      34             : #ifdef WIN32
      35             : extern "C" {
      36             :   extern void EVT3PIONSP00(double *,int *,
      37             :                            double *,
      38             :                            double *,double *,
      39             :                            double *,double *,
      40             :                            double *,double *,double *,double *);
      41             : }
      42             : #else
      43             : extern "C" {
      44             :   extern void evt3pionsp00_(double *,int *,
      45             :                              double *,
      46             :                              double *,double *,
      47             :                              double *,double *,
      48             :                              double *,double *,double *,double *);
      49             : }
      50             : #endif
      51             : 
      52           0 : EvtCBTo3piP00::~EvtCBTo3piP00() {}
      53             : 
      54             : std::string EvtCBTo3piP00::getName(){
      55             : 
      56           0 :   return "CB3PI-P00";     
      57             : 
      58             : }
      59             : 
      60             : 
      61             : EvtDecayBase* EvtCBTo3piP00::clone(){
      62             : 
      63           0 :   return new EvtCBTo3piP00;
      64             : 
      65           0 : }
      66             : 
      67             : void EvtCBTo3piP00::init(){
      68             : 
      69             :   // check that there are 1 argument
      70           0 :   checkNArg(1);
      71           0 :   checkNDaug(3);
      72             : 
      73           0 :   checkSpinParent(EvtSpinType::SCALAR);
      74             :   
      75           0 :   checkSpinDaughter(0,EvtSpinType::SCALAR);
      76           0 :   checkSpinDaughter(1,EvtSpinType::SCALAR);
      77           0 :   checkSpinDaughter(2,EvtSpinType::SCALAR);
      78             : 
      79           0 : }
      80             : 
      81             : 
      82             : 
      83             : void EvtCBTo3piP00::initProbMax(){
      84             : 
      85             : 
      86           0 :   setProbMax(1.5);
      87             : 
      88           0 : }
      89             : 
      90             : 
      91             : void EvtCBTo3piP00::decay( EvtParticle *p ){
      92             : 
      93             :   //added by Lange Jan4,2000
      94           0 :   static EvtId BM=EvtPDL::getId("B-");
      95           0 :   static EvtId BP=EvtPDL::getId("B+");
      96             : 
      97             :   EvtParticle *pi1,*pi2,*pi3;
      98             : 
      99           0 :   p->makeDaughters(getNDaug(),getDaugs());
     100           0 :   pi1=p->getDaug(0);
     101           0 :   pi2=p->getDaug(1);
     102           0 :   pi3=p->getDaug(2);
     103             : 
     104           0 :   EvtVector4R p4[3];
     105           0 :   double alpha = getArg(0);
     106           0 :   int iset;
     107             :   static int first=1;
     108             : 
     109           0 :   if (first==1) {
     110           0 :     iset=10000;
     111           0 :     first=0;
     112           0 :   }
     113             :   else{
     114           0 :     iset=0;
     115             :   }
     116             : 
     117           0 :   double p4pi1[4],p4Gamma11[4],p4Gamma12[4];
     118           0 :   double p4Gamma21[4],p4Gamma22[4];
     119             : 
     120           0 :   double realA,imgA,realbarA,imgbarA;
     121             : 
     122           0 :   evt3pionsp00_(&alpha,&iset,
     123           0 :                  p4pi1,
     124           0 :                  p4Gamma11,p4Gamma12,
     125           0 :                  p4Gamma21,p4Gamma22,
     126             :                  &realA,&imgA,&realbarA,&imgbarA);
     127             : 
     128           0 :   p4[0].set(p4pi1[3],p4pi1[0],p4pi1[1],p4pi1[2]);
     129           0 :   p4[1].set(p4Gamma11[3]+p4Gamma12[3],
     130           0 :             p4Gamma11[0]+p4Gamma12[0],
     131           0 :             p4Gamma11[1]+p4Gamma12[1],
     132           0 :             p4Gamma11[2]+p4Gamma12[2]);
     133           0 :   p4[2].set(p4Gamma21[3]+p4Gamma22[3],
     134           0 :             p4Gamma21[0]+p4Gamma22[0],
     135           0 :             p4Gamma21[1]+p4Gamma22[1],
     136           0 :             p4Gamma21[2]+p4Gamma22[2]);
     137             : 
     138           0 :   pi1->init( getDaug(0), p4[0] );
     139           0 :   pi2->init( getDaug(1), p4[1] );
     140           0 :   pi3->init( getDaug(2), p4[2] );
     141             : 
     142           0 :   EvtComplex A(realA,imgA);
     143           0 :   EvtComplex Abar(realbarA, imgbarA);
     144             :    
     145           0 :   EvtComplex  amp;
     146           0 :   if(p->getId()==BP)
     147             :     {
     148           0 :       amp = A;
     149           0 :     }
     150           0 :   if(p->getId()==BM)
     151             :     {
     152           0 :       amp = Abar;
     153           0 :     }
     154             : 
     155           0 :   vertex(amp);
     156             : 
     157             :   return ;
     158           0 : }
     159             : 

Generated by: LCOV version 1.11