LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenModels - EvtKstarstargamma.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 13 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) 2002      Caltech
      10             : //
      11             : // Module: EvtKstarstargamma.cc
      12             : //
      13             : // Description: Routine for the decau B->K**gamma
      14             : //
      15             : // Modification history:
      16             : //
      17             : //    Ryd       November 15, 2002       Module created
      18             : //
      19             : //------------------------------------------------------------------------
      20             : // 
      21             : #include "EvtGenBase/EvtPatches.hh"
      22             : #include <stdlib.h>
      23             : #include "EvtGenBase/EvtParticle.hh"
      24             : #include "EvtGenBase/EvtScalarParticle.hh"
      25             : #include "EvtGenBase/EvtVectorParticle.hh"
      26             : #include "EvtGenBase/EvtPhotonParticle.hh"
      27             : #include "EvtGenBase/EvtTensorParticle.hh"
      28             : #include "EvtGenBase/EvtGenKine.hh"
      29             : #include "EvtGenBase/EvtPDL.hh"
      30             : #include "EvtGenBase/EvtVector4C.hh"
      31             : #include "EvtGenBase/EvtVector4R.hh"
      32             : #include "EvtGenBase/EvtReport.hh"
      33             : #include "EvtGenModels/EvtKstarstargamma.hh"
      34             : #include <string>
      35             : #include "EvtGenBase/EvtEvalHelAmp.hh"
      36             : #include "EvtGenBase/EvtPropBreitWignerRel.hh"
      37             : #include "EvtGenBase/EvtTwoBodyVertex.hh"
      38             : 
      39           0 : EvtKstarstargamma::~EvtKstarstargamma() {}
      40             : 
      41             : std::string EvtKstarstargamma::getName(){
      42             : 
      43           0 :   return "KSTARSTARGAMMA"; 
      44             :     
      45             : }
      46             : 
      47             : 
      48             : EvtDecayBase* EvtKstarstargamma::clone(){
      49             : 
      50           0 :   return new EvtKstarstargamma;
      51             : 
      52           0 : }
      53             : 
      54             : void EvtKstarstargamma::init(){
      55             : 
      56             :   // check that there are 0 arguments
      57           0 :   checkNArg(0);
      58             : 
      59             :   // check that there are 3 daughters
      60           0 :   checkNDaug(3);
      61             : 
      62             :   // check the parent and daughter spins
      63           0 :   checkSpinParent(EvtSpinType::SCALAR);
      64           0 :   checkSpinDaughter(0,EvtSpinType::SCALAR);
      65           0 :   checkSpinDaughter(1,EvtSpinType::SCALAR);
      66           0 :   checkSpinDaughter(2,EvtSpinType::PHOTON);
      67           0 : }
      68             : 
      69             : void EvtKstarstargamma::initProbMax() {
      70             : 
      71             :   //setProbMax(1.0);
      72             : 
      73           0 : }      
      74             : 
      75             : void EvtKstarstargamma::decay( EvtParticle * /*p*/){
      76             : 
      77             : /*
      78             : 
      79             :   The EvtEvalHelAmp is completely broken...
      80             : 
      81             :   p->initializePhaseSpace(getNDaug(),getDaugs());
      82             : 
      83             :   EvtParticle* kaon = p->getDaug(0);
      84             :   EvtParticle* pion = p->getDaug(1);
      85             :   EvtParticle* photon = p->getDaug(2);
      86             : 
      87             : 
      88             :   EvtComplexPtrPtr Hd1=new EvtComplexPtr[5];
      89             :   Hd1[0]=new EvtComplex[2]; 
      90             :   Hd1[1]=new EvtComplex[2]; 
      91             :   Hd1[2]=new EvtComplex[2]; 
      92             :   Hd1[3]=new EvtComplex[2]; 
      93             :   Hd1[4]=new EvtComplex[2]; 
      94             : 
      95             :   Hd1[0][0]=0.0;
      96             :   Hd1[0][1]=0.0;
      97             :   Hd1[1][0]=0.0;
      98             :   Hd1[1][1]=0.0;
      99             :   Hd1[2][0]=0.0;
     100             :   Hd1[2][1]=0.0;
     101             :   Hd1[3][0]=0.0;
     102             :   Hd1[3][1]=1.0;
     103             :   Hd1[4][0]=0.0;
     104             :   Hd1[4][1]=0.0;
     105             : 
     106             :   EvtEvalHelAmp d1(EvtSpinType::SCALAR,EvtSpinType::TENSOR,
     107             :                    EvtSpinType::PHOTON,Hd1);
     108             : 
     109             :   EvtScalarParticle theB;
     110             : 
     111             :   theB.init(p->getId(),p->getP4Restframe());
     112             : 
     113             :   EvtVector4R theKstarP4=kaon->getP4()+pion->getP4();
     114             : 
     115             :   EvtTensorParticle theKstar;
     116             :   theKstar.init(EvtPDL::getId(std::string("K_2*0")),theKstarP4);
     117             : 
     118             :   EvtPhotonParticle thePhoton;
     119             :   thePhoton.init(EvtPDL::getId(std::string("K_2*0")),photon->getP4());
     120             : 
     121             :   theKstar.addDaug(&theB);
     122             :   thePhoton.addDaug(&theB);
     123             : 
     124             :   EvtAmp amp1;
     125             : 
     126             :   d1.evalAmp(&theB,amp1);
     127             : 
     128             :   EvtComplexPtrPtr Hd2=new EvtComplexPtr[1];
     129             :   Hd2[0]=new EvtComplex[1]; 
     130             : 
     131             :   Hd2[0][0]=1.0;
     132             : 
     133             : 
     134             :   EvtEvalHelAmp d2(EvtSpinType::TENSOR,EvtSpinType::SCALAR,
     135             :                    EvtSpinType::SCALAR,Hd2);
     136             :   
     137             :   
     138             :   EvtVector4R theKstarP4boost(theKstarP4.get(0),-theKstarP4.get(1),-theKstarP4.get(2),-theKstarP4.get(3));
     139             :   
     140             :   EvtScalarParticle theKaon;
     141             :   theKaon.init(EvtPDL::getId(std::string("K+")),boostTo(kaon->getP4(),theKstarP4boost));
     142             : 
     143             :   EvtScalarParticle thePion;
     144             :   thePion.init(EvtPDL::getId(std::string("pi+")),boostTo(pion->getP4(),theKstarP4boost));
     145             :             
     146             :   theKaon.addDaug(&theKstar);
     147             :   thePion.addDaug(&theKstar);
     148             : 
     149             :   // Calculate the propagator
     150             : 
     151             :   double m = theKstarP4.mass();
     152             :   EvtTwoBodyVertex v(0.5,0.14,1.4,2);
     153             :   EvtTwoBodyKine v1(0.5,0.14,m);
     154             :   EvtPropBreitWignerRel prop(1.4,0.2);
     155             : 
     156             :   // Mass-dependent width correction and amplitude calculation
     157             : 
     158             :   double width = prop.g0() * v.widthFactor(v1);
     159             :   prop.set_g0(width);
     160             :   EvtComplex bwamp = prop.evaluate(m);
     161             : 
     162             : 
     163             :   EvtAmp amp2;
     164             : 
     165             :   d2.evalAmp(&theKstar,amp2);
     166             : 
     167             :   vertex(0,bwamp*(amp1._amp[0]*amp2._amp[0]+
     168             :            amp1._amp[1]*amp2._amp[1]+
     169             :            amp1._amp[2]*amp2._amp[2]+
     170             :            amp1._amp[3]*amp2._amp[3]+
     171             :            amp1._amp[4]*amp2._amp[4]));
     172             : 
     173             :   vertex(1,bwamp*(amp1._amp[5]*amp2._amp[0]+
     174             :            amp1._amp[6]*amp2._amp[1]+
     175             :            amp1._amp[7]*amp2._amp[2]+
     176             :            amp1._amp[8]*amp2._amp[3]+
     177             :            amp1._amp[9]*amp2._amp[4]));
     178             : 
     179             : */
     180             :            
     181           0 :   return;
     182             : }
     183             : 
     184             : 
     185             : 
     186             : 
     187             : 

Generated by: LCOV version 1.11