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
EvtBaryonPCR.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
26#include "EvtGenBase/EvtPDL.hh"
29
31
32#include <stdlib.h>
33#include <string>
34
35using namespace std;
36#ifdef D0
37#undef D0
38#endif
39
40std::string EvtBaryonPCR::getName() const
41{
42 return "BaryonPCR";
43}
44
46{
47 return new EvtBaryonPCR;
48}
49
51{
52 //This is a kludge to avoid warnings because the K_2* mass becomes to large.
53 static const EvtIdSet regenerateMasses{
54 "K_2*+", "K_2*-", "K_2*0", "anti-K_2*0", "K_1+", "K_1-",
55 "K_10", "anti-K_10", "D'_1+", "D'_1-", "D'_10", "anti-D'_10" };
56
57 if ( regenerateMasses.contains( getDaug( 0 ) ) ) {
58 p->resetFirstOrNot();
59 }
60
62
63 EvtComplex r00( getArg( 0 ), 0.0 );
64 EvtComplex r01( getArg( 1 ), 0.0 );
65 EvtComplex r10( getArg( 2 ), 0.0 );
66 EvtComplex r11( getArg( 3 ), 0.0 );
67
68 m_calcamp->CalcAmp( p, m_amp2, m_baryonpcrffmodel.get(), r00, r01, r10, r11 );
69}
70
72{
73 // Baryons (partial list 5/28/04)
74
75 static const EvtId SIGC0 = EvtPDL::getId( "Sigma_c0" );
76 static const EvtId SIGC0B = EvtPDL::getId( "anti-Sigma_c0" );
77 static const EvtId SIGCP = EvtPDL::getId( "Sigma_c+" );
78 static const EvtId SIGCM = EvtPDL::getId( "anti-Sigma_c-" );
79 static const EvtId SIGCPP = EvtPDL::getId( "Sigma_c++" );
80 static const EvtId SIGCMM = EvtPDL::getId( "anti-Sigma_c--" );
81 static const EvtId LAMCP = EvtPDL::getId( "Lambda_c+" );
82 static const EvtId LAMCM = EvtPDL::getId( "anti-Lambda_c-" );
83 static const EvtId LAMC1P = EvtPDL::getId( "Lambda_c(2593)+" );
84 static const EvtId LAMC1M = EvtPDL::getId( "anti-Lambda_c(2593)-" );
85 static const EvtId LAMC2P = EvtPDL::getId( "Lambda_c(2625)+" );
86 static const EvtId LAMC2M = EvtPDL::getId( "anti-Lambda_c(2625)-" );
87 static const EvtId LAMB = EvtPDL::getId( "Lambda_b0" );
88 static const EvtId LAMBB = EvtPDL::getId( "anti-Lambda_b0" );
89
90 EvtId parnum, barnum, lnum;
91
92 parnum = getParentId();
93 barnum = getDaug( 0 );
94 lnum = getDaug( 1 );
95
96 if ( parnum == LAMB || parnum == LAMBB ) {
97 if ( barnum == LAMCP || barnum == LAMCM || barnum == LAMC1P ||
98 barnum == LAMC1M || barnum == LAMC2P || barnum == LAMC2M ||
99 barnum == SIGC0 || barnum == SIGC0B || barnum == SIGCP ||
100 barnum == SIGCM || barnum == SIGCPP || barnum == SIGCMM ) {
101 setProbMax( 22000.0 );
102 return;
103 }
104 }
105
106 //This is a real cludge.. (ryd)
107 setProbMax( 0.0 );
108}
109
111{
112 //if (getNArg()!=0) {
113 if ( getNArg() != 4 ) {
114 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
115 << "EvtBaryonPCR generator expected "
116 << " 4 arguments but found:" << getNArg() << endl;
117 //<< " 0 arguments but found:"<<getNArg()<<endl;
118 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
119 << "Will terminate execution!" << endl;
120 ::abort();
121 }
122
123 if ( getNDaug() != 3 ) {
124 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
125 << "Wrong number of daughters in EvtBaryonPCR.cc "
126 << " 3 daughters expected but found: " << getNDaug() << endl;
127 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
128 << "Will terminate execution!" << endl;
129 ::abort();
130 }
131
132 //We expect the parent to be a scalar
133 //and the daughters to be X lepton neutrino
134
139
140 if ( parenttype != EvtSpinType::DIRAC ) {
141 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
142 << "EvtBaryonPCR generator expected "
143 << " a DIRAC parent, found:" << EvtPDL::name( getParentId() )
144 << endl;
145 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
146 << "Will terminate execution!" << endl;
147 ::abort();
148 }
149 if ( leptontype != EvtSpinType::DIRAC ) {
150 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
151 << "EvtBaryonPCR generator expected "
152 << " a DIRAC 2nd daughter, found:" << EvtPDL::name( getDaug( 1 ) )
153 << endl;
154 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
155 << "Will terminate execution!" << endl;
156 ::abort();
157 }
158 if ( neutrinotype != EvtSpinType::NEUTRINO ) {
159 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
160 << "EvtBaryonPCR generator expected "
161 << " a NEUTRINO 3rd daughter, found:" << EvtPDL::name( getDaug( 2 ) )
162 << endl;
163 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
164 << "Will terminate execution!" << endl;
165 ::abort();
166 }
167
168 m_baryonpcrffmodel = std::make_unique<EvtBaryonPCRFF>();
169
170 if ( baryontype == EvtSpinType::DIRAC ||
171 baryontype == EvtSpinType::RARITASCHWINGER ) {
172 m_calcamp = std::make_unique<EvtSemiLeptonicBaryonAmp>();
173 } else {
174 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
175 << "Wrong baryon spin type in EvtBaryonPCR.cc "
176 << "Expected spin type " << EvtSpinType::DIRAC
177 << ", found spin type " << baryontype << endl;
178 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
179 << "Will terminate execution!" << endl;
180 ::abort();
181 }
182}
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition EvtReport.cpp:32
@ EVTGEN_ERROR
Definition EvtReport.hh:49
void initProbMax() override
void decay(EvtParticle *p) override
std::unique_ptr< EvtSemiLeptonicBaryonAmp > m_calcamp
EvtBaryonPCR * clone() const override
void init() override
std::unique_ptr< EvtSemiLeptonicFF > m_baryonpcrffmodel
std::string getName() const override
EvtAmp m_amp2
int getNDaug() const
int getNArg() const
double getArg(unsigned int j)
void setProbMax(double prbmx)
EvtId getParentId() const
EvtId getDaug(int i) const
const EvtId * getDaugs() const
bool contains(const EvtId &id) const
Definition EvtIdSet.cpp:46
Definition EvtId.hh:27
static EvtSpinType::spintype getSpinType(EvtId i)
Definition EvtPDL.cpp:371
static std::string name(EvtId i)
Definition EvtPDL.cpp:376
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)
void resetFirstOrNot()