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