Belle II Software  release-05-01-25
EvtLLSW.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/EvtParticle.hh"
12 #include "EvtGenBase/EvtPDL.hh"
13 #include <string>
14 #include "EvtGenBase/EvtSemiLeptonicScalarAmp.hh"
15 #include "EvtGenBase/EvtSemiLeptonicVectorAmp.hh"
16 #include "EvtGenBase/EvtSemiLeptonicTensorAmp.hh"
17 
18 #include "generators/evtgen/EvtGenModelRegister.h"
19 #include "generators/evtgen/models/EvtLLSW.h"
20 #include "generators/evtgen/models/EvtLLSWFF.h"
21 
23 
25  llswffmodel(0)
26  , calcamp(0)
27 {}
28 
29 
31 {
32  delete llswffmodel;
33  llswffmodel = 0;
34  delete calcamp;
35  calcamp = 0;
36 }
37 
38 std::string EvtLLSW::getName()
39 {
40 
41  return "LLSW";
42 
43 }
44 
45 
46 
47 EvtDecayBase* EvtLLSW::clone()
48 {
49 
50  return new EvtLLSW;
51 
52 }
53 
54 void EvtLLSW::decay(EvtParticle* p)
55 {
56 
57  p->initializePhaseSpace(getNDaug(), getDaugs());
58 
59  calcamp->CalcAmp(p, _amp2, llswffmodel);
60 
61 }
62 
64 {
65 
66  EvtId lnum; //parnum, mesnum;
67 
68  //parnum = getParentId();
69  //mesnum = getDaug(0);
70  lnum = getDaug(1);
71 
72  // Leptons
73  static EvtId EM = EvtPDL::getId("e-");
74  static EvtId EP = EvtPDL::getId("e+");
75  static EvtId MUM = EvtPDL::getId("mu-");
76  static EvtId MUP = EvtPDL::getId("mu+");
77  static EvtId TAUM = EvtPDL::getId("tau-");
78  static EvtId TAUP = EvtPDL::getId("tau+");
79 
80 
81  if (lnum == EP || lnum == EM || lnum == MUP || lnum == MUM) {
82  setProbMax(5000.0);
83  return;
84  }
85  if (lnum == TAUP || lnum == TAUM) {
86  setProbMax(4000.0);
87  return;
88  }
89 
90 
91 }
92 
94 {
95 
96  if (getNArg() < 2) checkNArg(2);
97  checkNDaug(3);
98 
99  static EvtId D1P1P = EvtPDL::getId("D_1+");
100  static EvtId D1P1N = EvtPDL::getId("D_1-");
101  static EvtId D1P10 = EvtPDL::getId("D_10");
102  static EvtId D1P1B = EvtPDL::getId("anti-D_10");
103  static EvtId D3P2P = EvtPDL::getId("D_2*+");
104  static EvtId D3P2N = EvtPDL::getId("D_2*-");
105  static EvtId D3P20 = EvtPDL::getId("D_2*0");
106  static EvtId D3P2B = EvtPDL::getId("anti-D_2*0");
107 
108  static EvtId DS1P = EvtPDL::getId("D_s1+");
109  static EvtId DS1M = EvtPDL::getId("D_s1-");
110  static EvtId DS2STP = EvtPDL::getId("D_s2*+");
111  static EvtId DS2STM = EvtPDL::getId("D_s2*-");
112 
113  EvtId daughter = getDaug(0);
114 
115  bool isNarrow = false;
116 
117  if (daughter == D1P1P || daughter == D1P1N || daughter == D1P10 || daughter == D1P1B ||
118  daughter == D3P2P || daughter == D3P2N || daughter == D3P20 || daughter == D3P2B ||
119  daughter == DS1P || daughter == DS1M || daughter == DS2STP || daughter == DS2STM)
120  isNarrow = true;
121 
122  //We expect the parent to be a scalar
123  //and the daughters to be X lepton neutrino
124 
125  checkSpinParent(EvtSpinType::SCALAR);
126  checkSpinDaughter(1, EvtSpinType::DIRAC);
127  checkSpinDaughter(2, EvtSpinType::NEUTRINO);
128 
129  EvtSpinType::spintype mesontype = EvtPDL::getSpinType(getDaug(0));
130 
131  if (isNarrow)
132  llswffmodel = new EvtLLSWFF(getArg(0), getArg(1), getNArg() > 2 ? getArg(2) : 0., getNArg() > 3 ? getArg(3) : 0.);
133  else
134  llswffmodel = new EvtLLSWFF(getArg(0), getArg(1), getNArg() > 2 ? getArg(2) : 0.);
135 
136  if (mesontype == EvtSpinType::SCALAR) {
137  calcamp = new EvtSemiLeptonicScalarAmp;
138  }
139  if (mesontype == EvtSpinType::VECTOR) {
140  calcamp = new EvtSemiLeptonicVectorAmp;
141  }
142  if (mesontype == EvtSpinType::TENSOR) {
143  calcamp = new EvtSemiLeptonicTensorAmp;
144  }
145 
146 }
147 
148 
149 
150 
151 
152 
153 
EvtLLSW::~EvtLLSW
virtual ~EvtLLSW()
virtual destructor
Definition: EvtLLSW.cc:30
EvtLLSW
The class provides the decay amplitude for orbitally excited semileptonic decays.
Definition: EvtLLSW.h:21
EvtLLSW::initProbMax
void initProbMax()
Sets maximal probab.
Definition: EvtLLSW.cc:63
EvtLLSW::calcamp
EvtSemiLeptonicAmp * calcamp
Pointers needed to calculate amplitude.
Definition: EvtLLSW.h:52
EvtLLSWFF
The class provides the form factors for orbitally excited semileptonic decays.
Definition: EvtLLSWFF.h:19
B2_EVTGEN_REGISTER_MODEL
#define B2_EVTGEN_REGISTER_MODEL(classname)
Class to register B2_EVTGEN_REGISTER_MODEL.
Definition: EvtGenModelRegister.h:77
EvtLLSW::llswffmodel
EvtSemiLeptonicFF * llswffmodel
Pointers needed for FFs.
Definition: EvtLLSW.h:49
EvtLLSW::decay
void decay(EvtParticle *p)
Creates a decay.
Definition: EvtLLSW.cc:54
EvtLLSW::getName
std::string getName()
Returns name of module.
Definition: EvtLLSW.cc:38
EvtLLSW::init
void init()
Initializes module.
Definition: EvtLLSW.cc:93
EvtLLSW::EvtLLSW
EvtLLSW()
Default constructor.
Definition: EvtLLSW.cc:24
EvtLLSW::clone
EvtDecayBase * clone()
Clones module.
Definition: EvtLLSW.cc:47