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