Belle II Software  release-05-02-19
EvtBCL.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Markus Prim *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include "EvtGenBase/EvtParticle.hh"
12 #include "EvtGenBase/EvtPDL.hh"
13 #include "EvtGenBase/EvtSemiLeptonicVectorAmp.hh"
14 #include "EvtGenBase/EvtSemiLeptonicScalarAmp.hh"
15 #include <string>
16 
17 #include "generators/evtgen/EvtGenModelRegister.h"
18 #include "generators/evtgen/models/EvtBCL.h"
19 #include "generators/evtgen/models/EvtBCLFF.h"
20 
21 
22 namespace Belle2 {
30 
31  EvtBCL::EvtBCL() : bclmodel(nullptr), calcamp(nullptr) {}
32 
34  {
35  delete bclmodel;
36  bclmodel = nullptr;
37  delete calcamp;
38  calcamp = nullptr;
39  }
40 
41  std::string EvtBCL::getName()
42  {
43  return "BCL";
44  }
45 
46  EvtDecayBase* EvtBCL::clone()
47  {
48  return new EvtBCL;
49  }
50 
51  void EvtBCL::decay(EvtParticle* p)
52  {
53  p->initializePhaseSpace(getNDaug(), getDaugs());
54  calcamp->CalcAmp(p, _amp2, bclmodel);
55  }
56 
57 
58  void EvtBCL::initProbMax()
59  {
60 
61  EvtId parnum, mesnum, lnum, nunum;
62 
63  parnum = getParentId();
64  mesnum = getDaug(0);
65  lnum = getDaug(1);
66  nunum = getDaug(2);
67 
68  double mymaxprob = calcamp->CalcMaxProb(parnum, mesnum, lnum, nunum, bclmodel);
69 
70  setProbMax(mymaxprob);
71  }
72 
73 
74  void EvtBCL::init()
75  {
76 
77  checkNDaug(3);
78 
79  //We expect the parent to be a scalar
80  //and the daughters to be X lepton neutrino
81 
82  checkSpinParent(EvtSpinType::SCALAR);
83  checkSpinDaughter(1, EvtSpinType::DIRAC);
84  checkSpinDaughter(2, EvtSpinType::NEUTRINO);
85 
86  EvtSpinType::spintype mesontype = EvtPDL::getSpinType(getDaug(0));
87 
88  bclmodel = new EvtBCLFF(getNArg(), getArgs());
89 
90  if (mesontype == EvtSpinType::SCALAR) {
91  calcamp = new EvtSemiLeptonicScalarAmp;
92  }
93  if (mesontype == EvtSpinType::VECTOR) {
94  calcamp = new EvtSemiLeptonicVectorAmp;
95  }
96  // Tensor Meson implementation is possible here.
97 
98  }
99 
101 }
102 
Belle2::EvtBCL::initProbMax
void initProbMax()
Sets maximal probab.
Definition: EvtBCL.cc:66
Belle2::EvtBCLFF
BCL Form Factors.
Definition: EvtBCLFF.h:31
Belle2::EvtBCL::decay
void decay(EvtParticle *p)
Creates a decay.
Definition: EvtBCL.cc:59
Belle2::EvtBCL::getName
std::string getName()
Returns name of module.
Definition: EvtBCL.cc:49
Belle2::EvtBCL::bclmodel
EvtSemiLeptonicFF * bclmodel
Pointers needed for FFs.
Definition: EvtBCL.h:54
Belle2::EvtBCL::calcamp
EvtSemiLeptonicAmp * calcamp
Pointers needed to calculate amplitude.
Definition: EvtBCL.h:57
Belle2::B2_EVTGEN_REGISTER_MODEL
B2_EVTGEN_REGISTER_MODEL(EvtB0toKsKK)
register the model in EvtGen
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::EvtBCL::init
void init()
Initializes module.
Definition: EvtBCL.cc:82
Belle2::EvtBCL::EvtBCL
EvtBCL()
Default constructor.
Definition: EvtBCL.cc:39
Belle2::EvtBCL::~EvtBCL
virtual ~EvtBCL()
virtual destructor
Definition: EvtBCL.cc:41
Belle2::EvtBCL::clone
EvtDecayBase * clone()
Clones module.
Definition: EvtBCL.cc:54