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.
EvtbsToLLLLHyperCP.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/EvtGenKine.hh"
24 #include "EvtGenBase/EvtPDL.hh"
26 #include "EvtGenBase/EvtReport.hh"
27 
29 
30 #include <stdlib.h>
31 #include <string.h>
32 
34 {
35  if ( _calcamp )
36  delete _calcamp;
37 }
38 
39 // The module name specification
41 {
42  return "BQTOLLLLHYPERCP";
43 }
44 
45 // The implementation of the clone() method
47 {
48  return new EvtbsToLLLLHyperCP;
49 }
50 
51 // The inicialization of the decay model
52 //
53 // Tn the our model we have are following 14 arguments:
54 //
55 // mS - the mass of the scalar sgoldstino "S" (GeV);
56 // mP - the mass of the pseudoscalar sgoldstino "P" (GeV);
57 // gammaS - the decay width of the scalar sgoldstino "S" (GeV);
58 // gammaP - the decay width of the pseudoscalar sgoldstino "P" (GeV);
59 // mLiiLR -
60 // Fc - coupling constant (GeV);
61 // mDijLL(RR) - parameters for \bar Bq-decays
62 // mDjiLL(RR) - parameters for Bq-decays (i <-> j!)
63 // d==1, s==2, b==3
64 //
66 {
67  // check that there are 14 arguments
68  checkNArg( 14 );
69  // check that there are 4 daughteres
70  checkNDaug( 4 );
71 
72  // We expect that the parent to be a scalar (B-meson)
73  // and the daughters to be l^+, l^-, l^+ and l^-
75 
76  // We expect that the all daughters are the ell+ or ell- == DIRAC
81 
83 }
84 
85 // Set the maximum probability of the decay
87 {
88  double mymaxprob = -10.0; // maximum of the probability
89 
90  EvtId parnum, l1num, l2num, l3num, l4num;
91 
92  parnum = getParentId();
93  l1num = getDaug( 0 );
94  l2num = getDaug( 1 );
95  l3num = getDaug( 2 );
96  l4num = getDaug( 3 );
97 
98  double mS = getArg( 0 );
99  double mP = getArg( 1 );
100  double gammaS = getArg( 2 );
101  double gammaP = getArg( 3 );
102  double mLiiLR = getArg( 4 );
103  double Fc = getArg( 5 );
104  double mD23LL = getArg( 6 );
105  double mD23RR = getArg( 7 );
106  double mD32LL = getArg( 8 );
107  double mD32RR = getArg( 9 );
108  double mD13LL = getArg( 10 );
109  double mD13RR = getArg( 11 );
110  double mD31LL = getArg( 12 );
111  double mD31RR = getArg( 13 );
112 
113  mymaxprob = _calcamp->CalcMaxProb( parnum, l1num, l2num, l3num, l4num, mS,
114  mP, gammaS, gammaP, mLiiLR, Fc, mD23LL,
115  mD23RR, mD32LL, mD32RR, mD13LL, mD13RR,
116  mD31LL, mD31RR );
117 
118  if ( mymaxprob <= 0.0 ) {
119  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
120  << "The function void EvtbsToLLLLHyperCP::initProbMax()"
121  << "\n Unexpected value of the probability maximum!"
122  << "\n mymaxprob = " << mymaxprob << std::endl;
123  ::abort();
124  }
125 
126  setProbMax( mymaxprob );
127 }
128 
130 {
131  double mS = getArg( 0 );
132  double mP = getArg( 1 );
133  double gammaS = getArg( 2 );
134  double gammaP = getArg( 3 );
135  double mLiiLR = getArg( 4 );
136  double Fc = getArg( 5 );
137  double mD23LL = getArg( 6 );
138  double mD23RR = getArg( 7 );
139  double mD32LL = getArg( 8 );
140  double mD32RR = getArg( 9 );
141  double mD13LL = getArg( 10 );
142  double mD13RR = getArg( 11 );
143  double mD31LL = getArg( 12 );
144  double mD31RR = getArg( 13 );
145 
147 
148  _calcamp->CalcAmp( p, _amp2, mS, mP, gammaS, gammaP, mLiiLR, Fc, mD23LL,
149  mD23RR, mD32LL, mD32RR, mD13LL, mD13RR, mD31LL, mD31RR );
150 
151  // EvtGenReport(EVTGEN_NOTICE,"EvtGen") << "\n The function EvtbsToLLLLHyperCP::decay(...) passed with arguments:"
152  // << "\n mS = " << mS
153  // << "\n mP = " << mP
154  // << "\n gammaS = " << gammaS
155  // << "\n gammaP = " << gammaP
156  // << "\n mLiiLR = " << mLiiLR
157  // << "\n Fc = " << Fc
158  // << "\n mD23LL = " << mD23LL
159  // << "\n mD23RR = " << mD23RR
160  // << "\n mD32LL = " << mD32LL
161  // << "\n mD32RR = " << mD32RR
162  // << "\n mD13LL = " << mD13LL
163  // << "\n mD13RR = " << mD13RR
164  // << "\n mD31LL = " << mD31LL
165  // << "\n mD31RR = " << mD31RR
166  // << std::endl;
167 }
double CalcMaxProb(EvtId parnum, EvtId l1num, EvtId l2num, EvtId l3num, EvtId l4num, double mS, double mP, double gammaS, double gammaP, double mLiiLR, double Fc, double mD23LL, double mD23RR, double mD32LL, double mD32RR, double mD13LL, double mD13RR, double mD31LL, double mD31RR)
double getArg(unsigned int j)
void decay(EvtParticle *p) override
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
EvtDecayBase * clone() override
void CalcAmp(EvtParticle *parent, EvtAmp &amp, double mS, double mP, double gammaS, double gammaP, double mLiiLR, double Fc, double mD23LL, double mD23RR, double mD32LL, double mD32RR, double mD13LL, double mD13RR, double mD31LL, double mD31RR)
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void setProbMax(double prbmx)
Definition: EvtId.hh:27
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)
void checkNDaug(int d1, int d2=-1)
void checkSpinParent(EvtSpinType::spintype sp)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
std::string getName() override
int getNDaug() const
Definition: EvtDecayBase.hh:65
EvtbsToLLLLHyperCPAmp * _calcamp
EvtAmp _amp2
Definition: EvtDecayAmp.hh:73
void initProbMax() override
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67