LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenModels - EvtHQET.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 44 0.0 %
Date: 2016-06-14 17:26:59 Functions: 0 10 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: EvtHQET.cc
      12             : //
      13             : // Description: Routine to implement semileptonic B->D*lnu decays according
      14             : //              to the model HQET
      15             : //
      16             : //   Lange Nov9/01 adding Dlnu and possible (w-1)^2 term
      17             : //
      18             : //
      19             : // Modification history:
      20             : //
      21             : //    DJL     April 20, 1998        Module created
      22             : //
      23             : //------------------------------------------------------------------------
      24             : // 
      25             : #include "EvtGenBase/EvtPatches.hh"
      26             : #include <stdlib.h>
      27             : #include <assert.h>
      28             : #include "EvtGenBase/EvtParticle.hh"
      29             : #include "EvtGenBase/EvtGenKine.hh"
      30             : #include "EvtGenBase/EvtPDL.hh"
      31             : #include "EvtGenBase/EvtReport.hh"
      32             : #include "EvtGenModels/EvtHQET.hh"
      33             : #include "EvtGenModels/EvtHQETFF.hh"
      34             : #include "EvtGenBase/EvtSemiLeptonicVectorAmp.hh"
      35             : #include "EvtGenBase/EvtSemiLeptonicScalarAmp.hh"
      36             : #include <string>
      37             : using std::endl;
      38             : 
      39           0 : EvtHQET::EvtHQET():
      40           0 :   hqetffmodel(0)
      41           0 :   ,calcamp(0)
      42           0 : {}
      43             : 
      44           0 : EvtHQET::~EvtHQET() {
      45           0 :   delete hqetffmodel;
      46           0 :   hqetffmodel=0;
      47           0 :   delete calcamp;
      48           0 :   calcamp=0;
      49           0 : }
      50             : 
      51             : std::string EvtHQET::getName(){
      52             : 
      53           0 :   return "HQET";     
      54             : 
      55             : }
      56             : 
      57             : 
      58             : 
      59             : EvtDecayBase* EvtHQET::clone(){
      60             : 
      61           0 :   return new EvtHQET;
      62             : 
      63           0 : }
      64             : 
      65             : 
      66             : void EvtHQET::decay( EvtParticle *p ){
      67             : 
      68           0 :   p->initializePhaseSpace(getNDaug(),getDaugs());
      69           0 :   calcamp->CalcAmp(p,_amp2,hqetffmodel);
      70             : 
      71           0 : }
      72             : 
      73             : void EvtHQET::initProbMax(){
      74             : 
      75           0 : EvtId parnum,mesnum,lnum,nunum;
      76             : 
      77           0 : parnum = getParentId();
      78           0 : mesnum = getDaug(0);
      79           0 : lnum = getDaug(1);
      80           0 : nunum = getDaug(2);
      81             : 
      82           0 : double mymaxprob = calcamp->CalcMaxProb(parnum,mesnum,
      83           0 :                            lnum,nunum,hqetffmodel);
      84             : 
      85           0 : setProbMax(mymaxprob);
      86             : 
      87           0 : }
      88             : 
      89             : 
      90             : void EvtHQET::init(){
      91             : 
      92           0 :   checkNDaug(3);
      93             : 
      94             :   //We expect the parent to be a scalar 
      95             :   //and the daughters to be X lepton neutrino
      96           0 :   checkSpinParent(EvtSpinType::SCALAR);
      97             : 
      98           0 :   checkSpinDaughter(1,EvtSpinType::DIRAC);
      99           0 :   checkSpinDaughter(2,EvtSpinType::NEUTRINO);
     100             : 
     101           0 :   EvtSpinType::spintype d1type = EvtPDL::getSpinType(getDaug(0));
     102           0 :   if ( d1type==EvtSpinType::SCALAR) {
     103           0 :     checkNArg(1,2);
     104           0 :     if ( getNArg()==1 ) hqetffmodel = new EvtHQETFF(getArg(0));
     105           0 :     else hqetffmodel = new EvtHQETFF(getArg(0),getArg(1));
     106           0 :     calcamp = new EvtSemiLeptonicScalarAmp; 
     107           0 :   }
     108           0 :   else if ( d1type==EvtSpinType::VECTOR) {
     109           0 :     checkNArg(3,4);
     110           0 :     if ( getNArg()==3 ) hqetffmodel = new EvtHQETFF(getArg(0),getArg(1),getArg(2));
     111           0 :     else hqetffmodel = new EvtHQETFF(getArg(0),getArg(1),getArg(2),getArg(3));
     112           0 :     calcamp = new EvtSemiLeptonicVectorAmp; 
     113             :   }
     114             :   else{
     115           0 :     report(Severity::Error,"EvtGen") << "HQET model handles only scalar and vector meson daughters. Sorry."<<endl;
     116           0 :     ::abort();
     117             :   }
     118             : 
     119             :   
     120           0 : }
     121             : 

Generated by: LCOV version 1.11