EvtGen 2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Loading...
Searching...
No Matches
EvtBLLNuL.cpp
Go to the documentation of this file.
1
2/***********************************************************************
3* Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4* *
5* This file is part of EvtGen. *
6* *
7* EvtGen is free software: you can redistribute it and/or modify *
8* it under the terms of the GNU General Public License as published by *
9* the Free Software Foundation, either version 3 of the License, or *
10* (at your option) any later version. *
11* *
12* EvtGen is distributed in the hope that it will be useful, *
13* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15* GNU General Public License for more details. *
16* *
17* You should have received a copy of the GNU General Public License *
18* along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19***********************************************************************/
20
22
24#include "EvtGenBase/EvtPDL.hh"
28
32
33std::string EvtBLLNuL::getName() const
34{
35 // The model name
36 return "BLLNUL";
37}
38
40{
41 return new EvtBLLNuL();
42}
43
45{
46 // check that there are 4 daughters
47 checkNDaug( 4 );
48
49 // We expect that the parent to be a scalar (B meson) and
50 // the daughters to be ell+ (k1), ell- (k2), neutrino (k3)
51 // and the last lepton ell- (k4)
52
53 // Check spin types
55
56 checkSpinDaughter( 0, EvtSpinType::DIRAC ); // ell+(k_1)
57 checkSpinDaughter( 1, EvtSpinType::DIRAC ); // ell-(k_2)
59 checkSpinDaughter( 3, EvtSpinType::DIRAC ); // ell-(k_4)
60
61 // Check that we have a charged B parent
62 static const EvtIdSet BMesons{ "B-", "B+" };
63 if ( !BMesons.contains( getParentId() ) ) {
64 EvtGenReport( EVTGEN_ERROR, "EvtBLLNuL" )
65 << "Expecting the parent to be a charged B. Found PDG = "
66 << EvtPDL::getStdHep( getParentId() ) << std::endl;
67 ::abort();
68 }
69
70 // Make sure the first two leptons are charged conjugates of each other
71 int id1 = EvtPDL::getStdHep( getDaug( 0 ) );
72 int id2 = EvtPDL::getStdHep( getDaug( 1 ) );
73 if ( id1 != -id2 ) {
74 EvtGenReport( EVTGEN_ERROR, "EvtBLLNuL" )
75 << "Expecting the first 2 leptons, with PDG codes " << id1 << " and "
76 << id2 << ", to be charged conjugates of each other" << std::endl;
77 ::abort();
78 }
79
80 // Check that the last lepton has the same charge as the B parent
81 int q3 = EvtPDL::chg3( getDaug( 3 ) ) / 3;
82 int qB = EvtPDL::chg3( getParentId() ) / 3;
83 if ( q3 != qB ) {
84 EvtGenReport( EVTGEN_ERROR, "EvtBLLNuL" )
85 << "The 3rd lepton charge " << q3 << " does not match the B charge "
86 << qB << std::endl;
87 ::abort();
88 }
89
90 // Also check that the 2nd lepton has the same charge as the 3rd one
91 int q2 = EvtPDL::chg3( getDaug( 1 ) ) / 3;
92 if ( q2 != q3 ) {
93 EvtGenReport( EVTGEN_ERROR, "EvtBLLNuL" )
94 << "The 2nd lepton charge " << q2
95 << " does not match the 3rd lepton charge " << q3 << std::endl;
96 ::abort();
97 }
98
99 // Identify if the decay has 3 charged leptons with the same flavour.
100 // If so, then we need to include amplitude terms where the 2nd and 3rd
101 // same-sign leptons are interchanged: k2 <-> k4
102 bool symmetry( false );
103 int id3 = EvtPDL::getStdHep( getDaug( 3 ) );
104
105 if ( abs( id1 ) == abs( id2 ) && abs( id1 ) == abs( id3 ) ) {
106 symmetry = true;
107 }
108
109 // Specify the qSq minimum cut-off as 4*(muon mass)^2 = 0.044655 and the
110 // kSq minimum cut off as 4*(electron mass)^2 = 1.044e-6
111 double muMass = EvtPDL::getMeanMass( EvtPDL::getId( "mu+" ) );
112 double eMass = EvtPDL::getMeanMass( EvtPDL::getId( "e+" ) );
113 double qSqMin = 4.0 * muMass * muMass;
114 double kSqMin = 4.0 * eMass * eMass;
115
116 // Optionally set these cut-offs using two decay file parameters. We may
117 // have a 3rd parameter (max prob), so check for at least 2 parameters
118 if ( getNArg() >= 2 ) {
119 qSqMin = getArg( 0 );
120 kSqMin = getArg( 1 );
121 }
122
123 // Define the amplitude qSq and kSq cut-offs, also
124 // specifying if the decay mode has flavour symmetry
125 m_calcAmp.setParameters( qSqMin, kSqMin, symmetry );
126}
127
129{
130 // Set the maximum probability of the decay
131 double maxProb( 3.2 );
132
133 // Optional 3rd decay file parameter, e.g. if qSq and/or kSq min have changed.
134 // Note that both qSq and kSq parameters must still be specified in the decay
135 // file to ensure that the maximum probability value is the 3rd parameter!
136 if ( getNArg() == 3 ) {
137 maxProb = getArg( 2 );
138 }
139
140 setProbMax( maxProb );
141}
142
144{
146
147 m_calcAmp.CalcAmp( p, m_amp2 );
148}
double abs(const EvtComplex &c)
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition EvtReport.cpp:32
@ EVTGEN_ERROR
Definition EvtReport.hh:49
virtual void init() override
Definition EvtBLLNuL.cpp:44
virtual void initProbMax() override
virtual void decay(EvtParticle *p) override
EvtBLLNuLAmp m_calcAmp
Definition EvtBLLNuL.hh:49
virtual std::string getName() const override
Definition EvtBLLNuL.cpp:33
virtual EvtDecayBase * clone() const override
Definition EvtBLLNuL.cpp:39
EvtAmp m_amp2
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
EvtDecayBase()=default
int getNDaug() const
void checkSpinParent(EvtSpinType::spintype sp)
int getNArg() const
double getArg(unsigned int j)
void setProbMax(double prbmx)
EvtId getParentId() const
EvtId getDaug(int i) const
void checkNDaug(int d1, int d2=-1)
const EvtId * getDaugs() const
bool contains(const EvtId &id) const
Definition EvtIdSet.cpp:46
static int getStdHep(EvtId id)
Definition EvtPDL.cpp:356
static int chg3(EvtId i)
Definition EvtPDL.cpp:366
static double getMeanMass(EvtId i)
Definition EvtPDL.cpp:306
static EvtId getId(const std::string &name)
Definition EvtPDL.cpp:283
double initializePhaseSpace(size_t numdaughter, const EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)