Belle II Software  release-05-01-25
EvtBGL.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Lu Cao and Chaoyi Lyu *
7  * *
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 
12 #include <stdlib.h>
13 #include "EvtGenBase/EvtParticle.hh"
14 #include "EvtGenBase/EvtGenKine.hh"
15 #include "EvtGenBase/EvtPDL.hh"
16 #include "EvtGenBase/EvtReport.hh"
17 #include "EvtGenBase/EvtSemiLeptonicScalarAmp.hh"
18 #include "EvtGenBase/EvtSemiLeptonicVectorAmp.hh"
19 #include <string>
20 
21 #include "generators/evtgen/EvtGenModelRegister.h"
22 #include "generators/evtgen/models/EvtBGL.h"
23 #include "generators/evtgen/models/EvtBGLFF.h"
24 
26 
27 using std::endl;
28 
30  bglffmodel(0)
31  , calcamp(0)
32 {}
33 
35 {
36  delete bglffmodel;
37  bglffmodel = 0;
38  delete calcamp;
39  calcamp = 0;
40 }
41 
42 std::string EvtBGL::getName()
43 {
44 
45  return "BGL";
46 
47 }
48 
49 
50 
51 EvtDecayBase* EvtBGL::clone()
52 {
53 
54  return new EvtBGL;
55 
56 }
57 
58 
59 void EvtBGL::decay(EvtParticle* p)
60 {
61 
62  p->initializePhaseSpace(getNDaug(), getDaugs());
63  calcamp->CalcAmp(p, _amp2, bglffmodel);
64 
65 }
66 
68 {
69 
70  EvtId parnum, mesnum, lnum, nunum;
71 
72  parnum = getParentId();
73  mesnum = getDaug(0);
74  lnum = getDaug(1);
75  nunum = getDaug(2);
76 
77  double mymaxprob = calcamp->CalcMaxProb(parnum, mesnum,
78  lnum, nunum, bglffmodel);
79 
80  // Leptons
81  static EvtId EM = EvtPDL::getId("e-");
82  static EvtId EP = EvtPDL::getId("e+");
83  static EvtId MUM = EvtPDL::getId("mu-");
84  static EvtId MUP = EvtPDL::getId("mu+");
85  static EvtId TAUM = EvtPDL::getId("tau-");
86  static EvtId TAUP = EvtPDL::getId("tau+");
87 
88  if (lnum == EP || lnum == EM || lnum == MUP || lnum == MUM) {
89  setProbMax(mymaxprob);
90  return;
91  }
92  if (lnum == TAUP || lnum == TAUM) {
93  setProbMax(6500);
94  return;
95  }
96 
97 
98 
99 }
100 
101 
103 {
104 
105  checkNDaug(3);
106 
107  //We expect the parent to be a scalar
108  //and the daughters to be X lepton neutrino
109  checkSpinParent(EvtSpinType::SCALAR);
110 
111  checkSpinDaughter(1, EvtSpinType::DIRAC);
112  checkSpinDaughter(2, EvtSpinType::NEUTRINO);
113 
114  EvtSpinType::spintype d1type = EvtPDL::getSpinType(getDaug(0));
115  if (d1type == EvtSpinType::SCALAR) {
116  if (getNArg() == 8) {
117  bglffmodel = new EvtBGLFF(getArg(0), getArg(1), getArg(2), getArg(3), getArg(4), getArg(5), getArg(6), getArg(7));
118  calcamp = new EvtSemiLeptonicScalarAmp;
119  } else {
120  EvtGenReport(EVTGEN_ERROR, "EvtGen") << "BGL (N=3) model for scalar meson daughters needs 8 arguments. Sorry." << endl;
121 
122  ::abort();
123  }
124  } else if (d1type == EvtSpinType::VECTOR) {
125  if (getNArg() == 6) {
126  bglffmodel = new EvtBGLFF(getArg(0), getArg(1), getArg(2), getArg(3), getArg(4), getArg(5));
127  calcamp = new EvtSemiLeptonicVectorAmp;
128  } else {
129  EvtGenReport(EVTGEN_ERROR, "EvtGen") << "BGL model for vector meson daughters needs 6 arguments. Sorry." << endl;
130  ::abort();
131  }
132  } else {
133  EvtGenReport(EVTGEN_ERROR, "EvtGen") << "BGL model handles only scalar and vector meson daughters. Sorry." << endl;
134  ::abort();
135  }
136 
137 
138 }
139 
EvtBGL::init
void init()
Initializes module.
Definition: EvtBGL.cc:102
EvtBGL::calcamp
EvtSemiLeptonicAmp * calcamp
Pointers needed to calculate amplitude.
Definition: EvtBGL.h:53
EvtBGL::bglffmodel
EvtSemiLeptonicFF * bglffmodel
Pointers needed for FFs.
Definition: EvtBGL.h:50
EvtBGL::clone
EvtDecayBase * clone()
Clones module.
Definition: EvtBGL.cc:51
EvtBGL::decay
void decay(EvtParticle *p)
Creates a decay.
Definition: EvtBGL.cc:59
EvtBGL::~EvtBGL
virtual ~EvtBGL()
virtual destructor
Definition: EvtBGL.cc:34
EvtBGL::initProbMax
void initProbMax()
Sets maximal probab.
Definition: EvtBGL.cc:67
B2_EVTGEN_REGISTER_MODEL
#define B2_EVTGEN_REGISTER_MODEL(classname)
Class to register B2_EVTGEN_REGISTER_MODEL.
Definition: EvtGenModelRegister.h:77
EvtBGL::getName
std::string getName()
Returns name of module.
Definition: EvtBGL.cc:42
EvtBGLFF
The class provides the form factors for semileptonic D and D* decays with full mass dependence.
Definition: EvtBGLFF.h:20
EvtBGL::EvtBGL
EvtBGL()
Default constructor.
Definition: EvtBGL.cc:29
EvtBGL
The class provides the form factors for orbitally excited semileptonic decays.
Definition: EvtBGL.h:22