diff --git a/DECAY.DEC b/DECAY.DEC
--- a/DECAY.DEC
+++ b/DECAY.DEC
@@ -1016,8 +1016,7 @@
# adding J/psi rho and omega - for lack of better thing will use the Kstar helicity amplitudes.
# Psi2sKs 30 ->31
# chic1 Kstar: 12 ->6
-0.000435500 J/psi K_S0 SVS; #[Reconstructed PDG2011]
-0.000435500 J/psi K_L0 SVS; #[Reconstructed PDG2011]
+0.000891000 J/psi anti-K0 SVS; #[New mode added] #[Reconstructed PDG2011]
#
#
0.001330000 J/psi anti-K*0 SVV_HELAMP PKHminus PKphHminus PKHzero PKphHzero PKHplus PKphHplus; #[Reconstructed PDG2011]
@@ -1034,8 +1033,7 @@
0.0005 J/psi anti-K_2*0 PHSP;
0.000094000 J/psi phi anti-K0 PHSP; #[Reconstructed PDG2011]
#
-0.000310000 psi(2S) K_S0 SVS; #[Reconstructed PDG2011]
-0.000310000 psi(2S) K_L0 SVS; #[Reconstructed PDG2011]
+0.000620000 psi(2S) anti-K0 SVS; #[New mode added] #[Reconstructed PDG2011]
#
#
0.000610000 psi(2S) anti-K*0 SVV_HELAMP PKHminus PKphHminus PKHzero PKphHzero PKHplus PKphHplus; #[Reconstructed PDG2011]
@@ -1048,8 +1046,7 @@
0.0004 psi(2S) anti-K_10 PHSP;
#
-0.000445000 eta_c K_S0 PHSP; #[Reconstructed PDG2011]
-0.000445000 eta_c K_L0 PHSP; #[Reconstructed PDG2011]
+0.000900000 eta_c anti-K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
#
#
0.000610000 anti-K*0 eta_c SVS; #[Reconstructed PDG2011]
@@ -1070,8 +1067,7 @@
0.00005 eta_c(2S) anti-K0 pi0 pi0 PHSP;
0.00005 eta_c(2S) K- pi+ pi0 PHSP;
#
-0.000070000 chi_c0 K_S0 PHSP; #[Reconstructed PDG2011]
-0.000070000 chi_c0 K_L0 PHSP; #[Reconstructed PDG2011]
+0.000190000 chi_c0 anti-K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
#
#
0.00030 anti-K*0 chi_c0 SVS;
@@ -1081,8 +1077,7 @@
0.0001 chi_c0 anti-K0 pi0 pi0 PHSP;
0.0001 chi_c0 K- pi+ pi0 PHSP;
#
-0.000195000 chi_c1 K_S0 SVS; #[Reconstructed PDG2011]
-0.000195000 chi_c1 K_L0 SVS; #[Reconstructed PDG2011]
+0.000395000 chi_c1 anti-K0 SVS; #[New mode added] #[Reconstructed PDG2011]
#
#
0.000222000 chi_c1 anti-K*0 SVV_HELAMP PKHminus PKphHminus PKHzero PKphHzero PKHplus PKphHplus; #[Reconstructed PDG2011]
@@ -1319,10 +1314,10 @@
# PR LHCb Add p pbar mode
0.0000001 p+ anti-p- PHSP;
#
-0.250525685 anti-u d c anti-d PYTHIA 23;
-0.042705898 anti-u d c anti-d PYTHIA 65;
+0.252848685 anti-u d c anti-d PYTHIA 23;
+0.043008898 anti-u d c anti-d PYTHIA 65;
0.019975978 anti-u s c anti-d PYTHIA 63;
-0.017122253 anti-u c d anti-d PYTHIA 23;
+0.017322253 anti-u c d anti-d PYTHIA 23;
0.000856098 anti-u c s anti-d PYTHIA 23;
#lange - try to crank up the psi production....
0.070391402 anti-c s c anti-d PYTHIA 43;
@@ -1350,8 +1345,6 @@
0.000006000 anti-D0 K- pi+ PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000036000 D*0 anti-K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
0.002700000 anti-D*0 pi- pi- pi+ pi+ PHSP; #[New mode added] #[Reconstructed PDG2011]
-0.000890000 eta_c anti-K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
-0.000871000 J/psi anti-K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000310000 J/psi omega anti-K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000009500 J/psi eta PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000019000 J/psi pi- pi+ PHSP; #[New mode added] #[Reconstructed PDG2011]
@@ -1360,10 +1353,7 @@
0.000800000 J/psi K*- pi+ PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000660000 J/psi anti-K*0 pi- pi+ PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000170000 anti-K0 anti-D0 D0 pi0 PHSP; #[New mode added] #[Reconstructed PDG2011]
-0.000620000 psi(2S) anti-K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
-0.000140000 chi_c0 anti-K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000011200 chi_c1 pi0 PHSP; #[New mode added] #[Reconstructed PDG2011]
-0.000390000 chi_c1 anti-K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000158000 chi_c1 K+ pi- PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000011000 eta anti-K_0*0 PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000009600 eta anti-K_2*0 PHSP; #[New mode added] #[Reconstructed PDG2011]
@@ -2237,8 +2227,7 @@
0.000050 a_1+ a_1- PHSP;
#
# B -> cc= s
-0.000435500 J/psi K_S0 SVS; #[Reconstructed PDG2011]
-0.000435500 J/psi K_L0 SVS; #[Reconstructed PDG2011]
+0.000891000 J/psi K0 SVS; #[New mode added] #[Reconstructed PDG2011]
#
#
0.001330000 J/psi K*0 SVV_HELAMP PKHplus PKphHplus PKHzero PKphHzero PKHminus PKphHminus; #[Reconstructed PDG2011]
@@ -2255,8 +2244,7 @@
0.0005 J/psi K_2*0 PHSP;
0.000094000 J/psi phi K0 PHSP; #[Reconstructed PDG2011]
#
-0.000310000 psi(2S) K_S0 SVS; #[Reconstructed PDG2011]
-0.000310000 psi(2S) K_L0 SVS; #[Reconstructed PDG2011]
+0.000620000 psi(2S) K0 SVS; #[New mode added] #[Reconstructed PDG2011]
#
#
0.000610000 psi(2S) K*0 SVV_HELAMP PKHplus PKphHplus PKHzero PKphHzero PKHminus PKphHminus; #[Reconstructed PDG2011]
@@ -2268,8 +2256,7 @@
0.0001 psi(2S) K+ pi- pi0 PHSP;
0.0004 psi(2S) K_10 PHSP;
#
-0.000445000 eta_c K_S0 PHSP; #[Reconstructed PDG2011]
-0.000445000 eta_c K_L0 PHSP; #[Reconstructed PDG2011]
+0.000900000 eta_c K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
#
#
0.000610000 K*0 eta_c SVS; #[Reconstructed PDG2011]
@@ -2279,8 +2266,6 @@
0.0001 eta_c K0 pi0 pi0 PHSP;
0.0001 eta_c K+ pi- pi0 PHSP;
#
-0.00024 eta_c(2S) K_S0 PHSP;
-0.00024 eta_c(2S) K_L0 PHSP;
#
#
0.00066 K*0T eta_c(2S) SVS;
@@ -2290,8 +2275,7 @@
0.00005 eta_c(2S) K0 pi0 pi0 PHSP;
0.00005 eta_c(2S) K+ pi- pi0 PHSP;
#
-0.000070000 chi_c0 K_S0 PHSP; #[Reconstructed PDG2011]
-0.000070000 chi_c0 K_L0 PHSP; #[Reconstructed PDG2011]
+0.000190000 chi_c0 K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
#
#
0.0003 K*0 chi_c0 SVS;
@@ -2301,8 +2285,7 @@
0.0001 chi_c0 K0 pi0 pi0 PHSP;
0.0001 chi_c0 K+ pi- pi0 PHSP;
#
-0.000195000 chi_c1 K_S0 SVS; #[Reconstructed PDG2011]
-0.000195000 chi_c1 K_L0 SVS; #[Reconstructed PDG2011]
+0.000395000 chi_c1 K0 SVS; #[New mode added] #[Reconstructed PDG2011]
#
#
0.000222000 chi_c1 K*0 SVV_HELAMP PKHplus PKphHplus PKHzero PKphHzero PKHminus PKphHminus; #[Reconstructed PDG2011]
@@ -2540,10 +2523,10 @@
0.005738595 anti-cs_1 ud_1 PYTHIA 63;
#
#
-0.251926466 u anti-d anti-c d PYTHIA 23;
-0.042944682 u anti-d anti-c d PYTHIA 43;
-0.020084989 u anti-s anti-c d PYTHIA 43;
-0.017215691 u anti-c anti-d d PYTHIA 23;
+0.253929466 u anti-d anti-c d PYTHIA 23;
+0.043947682 u anti-d anti-c d PYTHIA 43;
+0.020284989 u anti-s anti-c d PYTHIA 43;
+0.017315691 u anti-c anti-d d PYTHIA 23;
0.000860770 u anti-c anti-s d PYTHIA 23;
#lange - try to crank up the psi production....
0.070775534 c anti-s anti-c d PYTHIA 43;
@@ -2567,8 +2550,6 @@
0.000006000 D0 K+ pi- PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000036000 anti-D*0 K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
0.002700000 D*0 pi+ pi+ pi- pi- PHSP; #[New mode added] #[Reconstructed PDG2011]
-0.000890000 eta_c K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
-0.000871000 J/psi K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000310000 J/psi omega K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000009500 J/psi eta PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000019000 J/psi pi+ pi- PHSP; #[New mode added] #[Reconstructed PDG2011]
@@ -2577,10 +2558,7 @@
0.000800000 J/psi K*+ pi- PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000660000 J/psi K*0 pi+ pi- PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000170000 K0 D0 anti-D0 pi0 PHSP; #[New mode added] #[Reconstructed PDG2011]
-0.000620000 psi(2S) K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
-0.000140000 chi_c0 K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000011200 chi_c1 pi0 PHSP; #[New mode added] #[Reconstructed PDG2011]
-0.000390000 chi_c1 K0 PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000158000 chi_c1 K- pi+ PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000011000 eta K_0*0 PHSP; #[New mode added] #[Reconstructed PDG2011]
0.000009600 eta K_2*0 PHSP; #[New mode added] #[Reconstructed PDG2011]
diff --git a/DECAY.XML b/DECAY.XML
--- a/DECAY.XML
+++ b/DECAY.XML
@@ -1039,9 +1039,7 @@
-
-
-
+
@@ -1062,9 +1060,7 @@
-
-
-
+
@@ -1074,9 +1070,7 @@
-
-
-
+
@@ -1093,9 +1087,7 @@
-
-
-
+
@@ -1103,9 +1095,7 @@
-
-
-
+
@@ -1331,10 +1321,10 @@
-
-
+
+
-
+
@@ -1374,10 +1364,6 @@
-
-
-
-
@@ -1394,14 +1380,8 @@
-
-
-
-
-
-
@@ -2326,9 +2306,7 @@
-
-
-
+
@@ -2349,9 +2327,7 @@
-
-
-
+
@@ -2361,9 +2337,7 @@
-
-
-
+
@@ -2372,17 +2346,13 @@
-
-
-
-
-
+
@@ -2390,9 +2360,7 @@
-
-
-
+
@@ -2622,10 +2590,10 @@
-
-
-
-
+
+
+
+
@@ -2657,10 +2625,6 @@
-
-
-
-
@@ -2677,14 +2641,8 @@
-
-
-
-
-
-
diff --git a/History.md b/History.md
--- a/History.md
+++ b/History.md
@@ -8,6 +8,12 @@
https://phab.hepforge.org/Dxyz
+11 May 2022 Tom Latham
+* D80: Add CMake options for enabling clang-tidy static analysis checks during build
+
+10 May 2022 Michal Kreps
+* D83: Fix double counting of charmonia with K0 decays for B0.
+
14 Apr 2022 John Back
* D82: EvtDecayProb: initialise data members and remove empty destructor
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -218,7 +218,7 @@
4. It is possible to use decay files in xml format. Use the python script
- convertDecayFile.py for converting decay files to the new format.
+ scripts/convertDecayFile.py for converting decay files to the new format.
The src/EvtGen.cpp constructor has an additional boolean argument useXml that
needs to be set to true if xml decay files are to be used (default is useXml=false).
For example, DECAY_2010.XML is the xml version of DECAY_2010.DEC.
diff --git a/convertDecayFile.py b/scripts/convertDecayFile.py
rename from convertDecayFile.py
rename to scripts/convertDecayFile.py
--- a/convertDecayFile.py
+++ b/scripts/convertDecayFile.py
@@ -1,7 +1,7 @@
-#!/usr/bin/python
+#!/usr/bin/env python
########################################################################
-# Copyright 1998-2020 CERN for the benefit of the EvtGen authors #
+# Copyright 1998-2022 CERN for the benefit of the EvtGen authors #
# #
# This file is part of EvtGen. #
# #
@@ -239,7 +239,7 @@
if words[x][-1] == ';':
daughtersList.append(words[x][:-1])
if len(words) > x+1:
- print words[x+1:]
+ print(words[x+1:])
line = " ".join(words[x+1:])
else:
getMore = True
@@ -624,7 +624,7 @@
s3 = words[1].find("=")
if s1 == -1 or s2 == -1 or s3 == -1:
countBad += 1
- print "bad line: "+words[0]+" "+words[1]+" copied as comment, please fix manually!\n"
+ print("bad line: "+words[0]+" "+words[1]+" copied as comment, please fix manually!\n")
fh2.write("\t\n")
else:
countPythia6 += 1
@@ -674,27 +674,27 @@
break
else:
countBad += 1
- print "bad line: "+line+"copied as comment, please fix manually!\n"
+ print("bad line: "+line+"copied as comment, please fix manually!\n")
fh2.write("\n")
getMore = True
if comments:
- print str(countComment)+" commented lines copied without modification"
+ print(str(countComment)+" commented lines copied without modification")
else:
- print str(countComment)+" commented lines ignored"
- print str(count)+" other lines converted including:"
- print str(countDec)+" decays"
- print str(countParticle)+" modified particles"
- print str(countAlias)+" aliases"
- print str(countModelAlias)+" model aliases"
- print str(countDef)+" definitions"
- print str(countConj)+" conjugates"
- print str(countConjDecay)+" conjugate decays"
- print str(countLineShapePW)+" line shape PWs"
- print str(countPhotos)+" PHOTOS lines"
- print str(countCopyDec)+" copied decays"
- print str(countRemoveDec)+" removed decays"
- print str(countPythia6)+" pythia commands"
- print str(countBad)+" bad lines!"
+ print(str(countComment)+" commented lines ignored")
+ print(str(count)+" other lines converted including:")
+ print(str(countDec)+" decays")
+ print(str(countParticle)+" modified particles")
+ print(str(countAlias)+" aliases")
+ print(str(countModelAlias)+" model aliases")
+ print(str(countDef)+" definitions")
+ print(str(countConj)+" conjugates")
+ print(str(countConjDecay)+" conjugate decays")
+ print(str(countLineShapePW)+" line shape PWs")
+ print(str(countPhotos)+" PHOTOS lines")
+ print(str(countCopyDec)+" copied decays")
+ print(str(countRemoveDec)+" removed decays")
+ print(str(countPythia6)+" pythia commands")
+ print(str(countBad)+" bad lines!")
fh1.close()
fh2.close()
diff --git a/scripts/countTotalBF.py b/scripts/countTotalBF.py
new file mode 100755
--- /dev/null
+++ b/scripts/countTotalBF.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+
+########################################################################
+# Copyright 1998-2022 CERN for the benefit of the EvtGen authors #
+# #
+# This file is part of EvtGen. #
+# #
+# EvtGen is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# EvtGen is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with EvtGen. If not, see . #
+########################################################################
+
+import os,sys
+import argparse
+
+parser = argparse.ArgumentParser(
+ description='Script to count total BF for given particle')
+parser.add_argument('-decfile', default='DECAY.DEC')
+parser.add_argument('-particle', default='')
+
+args = parser.parse_args()
+
+decFiles = open( args.decfile )
+
+inDecay = False
+bfSum = 0.0
+nDecays = 0
+for line in decFiles:
+ if (inDecay == False) and (line.find('Decay') != -1):
+ ss = line.split(' ')
+ if ( ss[len(ss)-1].strip() == args.particle ):
+ inDecay = True
+ print(line)
+ continue
+ if (inDecay == True) and (line.find('Enddecay') != -1):
+ inDecay = False
+ break
+ if inDecay == True:
+ if line[0] == '#' or len(line)<2: # This is comment, skip
+ continue
+ print(line.strip())
+ bfSum += float(line.strip().split(' ')[0])
+ nDecays += 1
+
+print('Counted ',nDecays,' decays with total BF = ',bfSum)
+print('Missing to 1 is ',1-bfSum)
+decFiles.close()
+
diff --git a/scripts/printParticleDecays.py b/scripts/printParticleDecays.py
new file mode 100755
--- /dev/null
+++ b/scripts/printParticleDecays.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+
+########################################################################
+# Copyright 1998-2022 CERN for the benefit of the EvtGen authors #
+# #
+# This file is part of EvtGen. #
+# #
+# EvtGen is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# EvtGen is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with EvtGen. If not, see . #
+########################################################################
+
+import os,sys
+import argparse
+
+parser = argparse.ArgumentParser(
+ description='Script to print out decays of particle containing specific daughters')
+parser.add_argument('-decfile', default='DECAY.DEC')
+parser.add_argument('-particle', default='')
+parser.add_argument('-daughter1', default=[], nargs='*')
+parser.add_argument('-daughter2', default=[], nargs='*')
+
+args = parser.parse_args()
+
+print(args)
+
+decFiles = open( args.decfile )
+
+inDecay = False
+bfSum = 0.0
+nDecays = 0
+for line in decFiles:
+ if (inDecay == False) and (line.find('Decay') != -1):
+ ss = line.split(' ')
+ if ( ss[len(ss)-1].strip() == args.particle ):
+ inDecay = True
+ print(line)
+ continue
+ if (inDecay == True) and (line.find('Enddecay') != -1):
+ inDecay = False
+ break
+ if inDecay == True:
+ if line[0] == '#' or len(line)<2: # This is comment, skip
+ continue
+ # Now check whether we have given daughters
+ wanted = False
+ if len(args.daughter1)!=0:
+ for ii in args.daughter1:
+ if ii in line: # one of the daughers is in
+ if len(args.daughter2)!=0:
+ for jj in args.daughter2:
+ if jj in line:
+ wanted = True
+ else:
+ wanted = True
+ if wanted:
+ print(line.strip())
+
+decFiles.close()
+
diff --git a/scripts/updateParticleProperties.py b/scripts/updateParticleProperties.py
--- a/scripts/updateParticleProperties.py
+++ b/scripts/updateParticleProperties.py
@@ -1,5 +1,24 @@
#!/usr/bin/env python
+########################################################################
+# Copyright 1998-2022 CERN for the benefit of the EvtGen authors #
+# #
+# This file is part of EvtGen. #
+# #
+# EvtGen is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# EvtGen is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with EvtGen. If not, see . #
+########################################################################
+
from __future__ import division, print_function
import sys
import re