evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
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 
23 #include "EvtGenBase/EvtIdSet.hh"
24 #include "EvtGenBase/EvtPDL.hh"
26 #include "EvtGenBase/EvtReport.hh"
28 
29 EvtBLLNuL::EvtBLLNuL() : calcAmp_()
30 {
31 }
32 
33 std::string EvtBLLNuL::getName()
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)
58  checkSpinDaughter( 2, EvtSpinType::NEUTRINO ); // neu (k_3)
59  checkSpinDaughter( 3, EvtSpinType::DIRAC ); // ell-(k_4)
60 
61  // Check that we have a charged B parent
62  static 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  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  calcAmp_.CalcAmp( p, _amp2 );
148 }
void CalcAmp(EvtParticle *parent, EvtAmp &amp) const
virtual void initProbMax() override
Definition: EvtBLLNuL.cpp:128
double getArg(unsigned int j)
virtual EvtDecayBase * clone() override
Definition: EvtBLLNuL.cpp:39
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
void setParameters(double qSqMin, double kSqMin, bool symmetry)
static double getMeanMass(EvtId i)
Definition: EvtPDL.cpp:314
static int chg3(EvtId i)
Definition: EvtPDL.cpp:372
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void setProbMax(double prbmx)
EvtId getParentId() const
Definition: EvtDecayBase.hh:61
double initializePhaseSpace(unsigned int numdaughter, EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
virtual void decay(EvtParticle *p) override
Definition: EvtBLLNuL.cpp:143
void checkNDaug(int d1, int d2=-1)
void checkSpinParent(EvtSpinType::spintype sp)
double abs(const EvtComplex &c)
Definition: EvtComplex.hh:201
static EvtId getId(const std::string &name)
Definition: EvtPDL.cpp:287
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
int getNDaug() const
Definition: EvtDecayBase.hh:65
virtual void init() override
Definition: EvtBLLNuL.cpp:44
virtual std::string getName() override
Definition: EvtBLLNuL.cpp:33
EvtAmp _amp2
Definition: EvtDecayAmp.hh:73
int contains(const EvtId id)
Definition: EvtIdSet.cpp:422
int getNArg() const
Definition: EvtDecayBase.hh:68
static int getStdHep(EvtId id)
Definition: EvtPDL.cpp:362
EvtBLLNuLAmp calcAmp_
Definition: EvtBLLNuL.hh:49
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67