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: EvtGenModels/EvtBToPlnuBK.cc
12 : //
13 : // Description: B->Xu l nu with BK (Becirevic-Kaidalov) parametrization
14 : // Xu is a pseudoscalar (pi_plus,pi0,eta or eta_prime)
15 : //
16 : // Modification history:
17 : //
18 : // Martin Simard, U. de Montreal, 08/01/2007 Module created
19 : //
20 : //------------------------------------------------------------------------
21 : //
22 : #include "EvtGenBase/EvtPatches.hh"
23 : #include <stdlib.h>
24 : #include <assert.h>
25 : #include "EvtGenBase/EvtParticle.hh"
26 : #include "EvtGenBase/EvtGenKine.hh"
27 : #include "EvtGenBase/EvtPDL.hh"
28 : #include "EvtGenBase/EvtReport.hh"
29 : #include "EvtGenModels/EvtBToPlnuBK.hh"
30 : #include "EvtGenModels/EvtBToPlnuBKFF.hh"
31 : #include "EvtGenBase/EvtSemiLeptonicScalarAmp.hh"
32 :
33 : using std::fstream;
34 : using std::cout;
35 : using std::endl;
36 :
37 :
38 0 : EvtBToPlnuBK::EvtBToPlnuBK():
39 0 : BKmodel(0)
40 0 : ,calcamp(0)
41 0 : {}
42 :
43 0 : EvtBToPlnuBK::~EvtBToPlnuBK(){
44 0 : delete BKmodel;
45 0 : BKmodel=0;
46 0 : delete calcamp;
47 0 : calcamp=0;
48 0 : }
49 :
50 : std::string EvtBToPlnuBK::getName(){
51 :
52 0 : return "BTOPLNUBK";
53 :
54 : }
55 :
56 : EvtDecayBase* EvtBToPlnuBK::clone(){
57 :
58 0 : return new EvtBToPlnuBK;
59 :
60 0 : }
61 :
62 :
63 : void EvtBToPlnuBK::initProbMax(){
64 :
65 0 : EvtId parnum,mesnum,lnum,nunum;
66 :
67 0 : parnum = getParentId();
68 0 : mesnum = getDaug(0);
69 0 : lnum = getDaug(1);
70 0 : nunum = getDaug(2);
71 :
72 0 : double mymaxprob = calcamp->CalcMaxProb(parnum,mesnum,
73 0 : lnum,nunum,BKmodel);
74 :
75 0 : setProbMax(mymaxprob);
76 :
77 0 : }
78 :
79 : void EvtBToPlnuBK::init(){
80 :
81 0 : checkNDaug(3);
82 :
83 : //We expect the parent to be a scalar
84 : //and the daughters to be X lepton neutrino
85 0 : checkSpinParent(EvtSpinType::SCALAR);
86 :
87 0 : checkSpinDaughter(1,EvtSpinType::DIRAC);
88 0 : checkSpinDaughter(2,EvtSpinType::NEUTRINO);
89 :
90 0 : EvtSpinType::spintype d1type = EvtPDL::getSpinType(getDaug(0));
91 0 : if ( d1type==EvtSpinType::SCALAR) {
92 0 : checkNArg(2);
93 0 : BKmodel = new EvtBToPlnuBKFF(getArg(0),getArg(1));
94 0 : calcamp = new EvtSemiLeptonicScalarAmp;
95 : }
96 : else{
97 0 : report(Severity::Error,"EvtGen") << "BK model handles only scalar meson daughters. Sorry."<<endl;
98 0 : ::abort();
99 : }
100 :
101 0 : }
102 :
103 : void EvtBToPlnuBK::decay( EvtParticle *p ){
104 :
105 0 : p->initializePhaseSpace(getNDaug(),getDaugs());
106 0 : calcamp->CalcAmp(p,_amp2,BKmodel);
107 :
108 0 : }
109 :
110 :
111 :
|