Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CLHEP
CLHEP
Commits
cefee3dc
Commit
cefee3dc
authored
Apr 21, 2004
by
Lynn Garren
Browse files
merge in changes and translation bug fix from HEAD
parent
85c2be53
Changes
32
Hide whitespace changes
Inline
Side-by-side
HepPDT/HepPDT/DecayChannelT.icc
View file @
cefee3dc
// $Id: DecayChannelT.icc,v 1.1.1.1 200
3
/0
7/15 20:15:05
garren Exp $
// $Id: DecayChannelT.icc,v 1.1.1.1
.4.1
200
4
/0
4/21 16:14:51
garren Exp $
// ----------------------------------------------------------------------
//
// DecayChannelT.icc
...
...
@@ -12,7 +12,7 @@ namespace HepPDT {
template< class Config >
DecayChannelT<Config>::DecayChannelT( const std::string & name,
const Measurement & branchFrac,
const
std::vector<PD >
& decaylist,
const
ProductMap
& decaylist,
const std::vector<double> & dmparam )
: itsDecayName ( name ),
itsBranchingFraction ( branchFrac ),
...
...
HepPDT/HepPDT/Makefile.am
View file @
cefee3dc
...
...
@@ -55,6 +55,10 @@ pkginclude_HEADERS = \
Version.hh
\
QQDecayTable.hh
\
StringStream.h
\
ParticleName.hh
\
ParticleTranslation.hh
\
ParticleTranslation.icc
\
TranslationList.hh
\
defs.h
# Identify generated file(s) to be removed when 'make clean' is requested:
...
...
HepPDT/HepPDT/ParticleID.hh
View file @
cefee3dc
// $Id: ParticleID.hh,v 1.1.1.1 200
3
/0
7/15 20:15:05
garren Exp $
// $Id: ParticleID.hh,v 1.1.1.1
.4.1
200
4
/0
4/21 16:14:51
garren Exp $
// ----------------------------------------------------------------------
//
// ParticleID.hh
...
...
@@ -16,8 +16,12 @@
#ifndef PARTICLEID_HH
#define PARTICLEID_HH
#include <string>
#include <algorithm> // swap()
// Particle names
#include "CLHEP/HepPDT/ParticleName.hh"
namespace
HepPDT
{
// convert from 2J+1 to the actual spin value
...
...
@@ -125,6 +129,8 @@ public:
int
Z
(
)
const
;
// digit returns the digit at a named location in the PID
unsigned
short
digit
(
location
)
const
;
// particle name
const
std
::
string
PDTname
()
const
{
return
particleName
(
itsPID
);
}
private:
...
...
HepPDT/HepPDT/ParticleName.hh
View file @
cefee3dc
#ifndef PARTICLENAME_HH
#define PARTICLENAME_HH
// $Id: ParticleName.hh,v 1.1 2004/04/
14 23:56:27
garren Exp $
// $Id: ParticleName.hh,v 1.1
.2.1
2004/04/
21 16:14:51
garren Exp $
// ----------------------------------------------------------------------
//
// ParticleName.hh
...
...
HepPDT/HepPDT/ParticleTranslation.hh
View file @
cefee3dc
// $Id: ParticleTranslation.hh,v 1.1 2004/04/
14 23:56:27
garren Exp $
// $Id: ParticleTranslation.hh,v 1.1
.2.1
2004/04/
21 16:14:51
garren Exp $
// ----------------------------------------------------------------------
//
// ParticleTranslation.hh
...
...
HepPDT/HepPDT/ParticleTranslation.icc
View file @
cefee3dc
// $Id: ParticleTranslation.icc,v 1.1 2004/04/
14 23:56:27
garren Exp $
// $Id: ParticleTranslation.icc,v 1.1
.2.1
2004/04/
21 16:14:51
garren Exp $
// ----------------------------------------------------------------------
//
// ParticleTranslation.icc
...
...
HepPDT/HepPDT/TranslationList.hh
View file @
cefee3dc
#ifndef TRANSLATIONLIST_HH
#define TRANSLATIONLIST_HH
// $Id: TranslationList.hh,v 1.1 2004/04/
14 23:56:27
garren Exp $
// $Id: TranslationList.hh,v 1.1
.2.1
2004/04/
21 16:14:51
garren Exp $
// ----------------------------------------------------------------------
//
// TranslationList.hh
...
...
HepPDT/configure.in
View file @
cefee3dc
...
...
@@ -39,6 +39,13 @@ AC_CONFIG_FILES([HepPDT-deps])
AC_CONFIG_FILES([test/testPID.sh], [chmod +x test/testPID.sh])
AC_CONFIG_FILES([test/testHepPDT.sh], [chmod +x test/testHepPDT.sh])
AC_CONFIG_FILES([test/testHepPDT.input])
AC_CONFIG_FILES([test/listParticleNames.sh], [chmod +x test/listParticleNames.sh])
AC_CONFIG_FILES([test/listQQTranslation.sh], [chmod +x test/listQQTranslation.sh])
AC_CONFIG_FILES([test/listQQTranslation.cc])
AC_CONFIG_FILES([test/listPythiaNames.sh], [chmod +x test/listPythiaNames.sh])
AC_CONFIG_FILES([test/listPythiaNames.cc])
AC_CONFIG_FILES([test/listPDGNames.sh], [chmod +x test/listPDGNames.sh])
AC_CONFIG_FILES([test/listPDGNames.cc])
# ----------------------------------------------------------------------
# Capture post-install information:
...
...
HepPDT/examples/GNUmakefile
View file @
cefee3dc
#
# $Id: GNUmakefile,v 1.2
2003/10/24 21:44:45
garren Exp $
# $Id: GNUmakefile,v 1.2
.2.1 2004/04/21 16:14:51
garren Exp $
#
# makefile for HepPDT examples
#
...
...
@@ -9,6 +9,8 @@
# CXX=<C++ compiler>
# You can add optional compiler flags to CXX
CLHEP_DIR
=
/scr/cepa01/garren/clhep/cl19/pdt/install
ifndef
DEBUG
DEBUG
=
none
DFLG
=
...
...
@@ -23,13 +25,25 @@ ifndef CXX
endif
ifndef
PDTLIB
PDTLIB
=
$(CLHEP_DIR)
/lib/libCLHEP-2.0.0.0.a
PDTLIB
=
$(CLHEP_DIR)
/lib/libCLHEP-
HepPDT-
2.0.0.0.a
endif
ifndef
INCDIR
INCDIR
=
-I
$(CLHEP_DIR)
/include
endif
ifdef
HERWIG_DIR
INCDIR
+=
-I
$(HERWIG_DIR)
/src
endif
ifndef
F77
F77
=
g77
endif
ifndef
FFLAGS
FFLAGS
=
$(DFLG)
-fno-second-underscore
$(INCDIR)
endif
AR
=
ar
ARFLG
=
-urs
...
...
@@ -47,6 +61,8 @@ include $(SOURCE:.cc=.d)
all
:
build_test run_test
list
:
examListHerwig examListIsajet
test
:
run_test
build_test
:
examReadPDG examReadPythia examReadEvtGen examReadQQ
\
...
...
@@ -83,6 +99,21 @@ examReadEvtGen: examReadEvtGen.o $(PDTLIB)
$(PDTLIB)
-lm
rm
-rf
ti_files
examListHerwig
:
examListHerwig.o examListHerwigInterface.o $(PDTLIB)
$(CXX)
$(CXXFLAGS)
-o
$@
\
examListHerwig.o examListHerwigInterface.o
\
$(HERWIG_DIR)
/lib/hwudat.o
\
-L
$(HERWIG_DIR)
/lib
-lherwig
-lherdum
\
$(PDTLIB)
-lm
-lg2c
rm
-rf
ti_files
examListIsajet
:
examListIsajet.o examListIsajetInterface.o $(PDTLIB)
$(CXX)
$(CXXFLAGS)
-o
$@
\
examListIsajet.o examListIsajetInterface.o
\
$(ISAJET_DIR)
/isajet.a
\
$(PDTLIB)
-lm
-lg2c
rm
-rf
ti_files
run_test
:
examReadPDG examReadPythia examReadEvtGen examMyPDT examReadQQ
examReadPDG
>
examReadPDG.log
diff examReadPDG.out examReadPDG.out.save
...
...
@@ -105,15 +136,16 @@ clean:
rm
-f
*
.d
rm
-rf
ti_files
rm
-f
examReadPDG examReadPythia examReadEvtGen
rm
-f
examMyPDT examDMF examReadQQ
rm
-f
examMyPDT examDMF examReadQQ
examListHerwig examListIsajet
rm
-f
*
.out
*
.log
#------------------------------------------
.PHONY
:
clean cleanobjs
.SUFFIXES
:
#
cancel implicit rules
.SUFFIXES
:
.o .cc .cpp
.SUFFIXES
:
.o .cc .cpp
.F .inc .h .hh
%.d
:
%.cc
@
$(SHELL)
-ec
'
$(CXX)
-M
$(CXXFLAGS)
$< | sed '
\'
's/$*.o/& $@/g'
\'
' > $@'
...
...
@@ -132,3 +164,10 @@ clean:
%_g.o
:
%.cpp %.d
$(CXX)
$(CXXFLAGS)
-c
-o
$@
$<
%.o
:
%.F
$(F77)
$(FFLAGS)
-c
-o
$@
$<
%_g.o
:
%.F
$(F77)
$(FFLAGS)
-c
-o
$@
$<
HepPDT/examples/examListHerwig.cc
View file @
cefee3dc
// $Id: examListHerwig.cc,v 1.1 2004/04/
14 23:56:27
garren Exp $
// $Id: examListHerwig.cc,v 1.1
.2.1
2004/04/
21 16:14:51
garren Exp $
// -------------------------------------------------------------------
//
// List the herwig translation
...
...
HepPDT/examples/examListIsajet.cc
View file @
cefee3dc
// $Id: examListIsajet.cc,v 1.1 2004/04/
14 23:56:27
garren Exp $
// $Id: examListIsajet.cc,v 1.1
.2.1
2004/04/
21 16:14:51
garren Exp $
// -------------------------------------------------------------------
//
// List the isajet translation
...
...
HepPDT/src/Makefile.am
View file @
cefee3dc
...
...
@@ -7,59 +7,64 @@ INCLUDES = -I$(top_builddir)
lib_LTLIBRARIES
=
libCLHEP-HepPDT-@VERSION@.la
libCLHEP_HepPDT_@VERSION@
_la_SOURCES
=
\
Constituent.cc
\
DMFactory.cc
\
DefTable.cc
\
PDGtoQQTable.cc
\
QQChannel.cc
\
QQDecay.cc
\
QQDecayTable.cc
\
ResonanceStructure.cc
\
SimpleDecayModel.cc
\
TempParticleData.cc
\
addEvtGenParticles.cc
\
addPDGParticles.cc
\
addPythiaParticles.cc
\
addQQParticles.cc
\
buildTable.cc
\
calculateWidthFromLifetime.cc
\
digit.cc
\
extraBits.cc
\
fundamentalID.cc
\
hasMethods.cc
\
ion.cc
\
isBaryon.cc
\
isDiQuark.cc
\
isHadron.cc
\
isLepton.cc
\
isMeson.cc
\
isNucleus.cc
\
isValid.cc
\
jSpin.cc
\
lSpin.cc
\
lifetime.cc
\
quarks.cc
\
readQQchannel.cc
\
readQQstream.cc
\
sSpin.cc
\
spindtoi.cc
\
spinitod.cc
\
stringtodouble.cc
\
threeCharge.cc
\
translateEvtGentoPDT.cc
\
translateGeanttoPDT.cc
\
translateHerwigtoPDT.cc
\
translateIsajettoPDT.cc
\
translatePDGtabletoPDT.cc
\
translatePDTtoEvtGen.cc
\
translatePDTtoGeant.cc
\
translatePDTtoHerwig.cc
\
translatePDTtoIsajet.cc
\
translatePDTtoPDGtable.cc
\
translatePDTtoPythia.cc
\
translatePDTtoQQ.cc
\
translatePythiatoPDT.cc
\
translateQQtoPDT.cc
\
version.cc
\
write.cc
\
Constituent.cc
\
DMFactory.cc
\
DefTable.cc
\
PDGtoQQTable.cc
\
ParticleName.cc
\
QQChannel.cc
\
QQDecay.cc
\
QQDecayTable.cc
\
ResonanceStructure.cc
\
SimpleDecayModel.cc
\
TempParticleData.cc
\
listPythiaTranslation.cc
\
listPDGTranslation.cc
\
addEvtGenParticles.cc
\
addPDGParticles.cc
\
addPythiaParticles.cc
\
addQQParticles.cc
\
buildTable.cc
\
calculateWidthFromLifetime.cc
\
digit.cc
\
extraBits.cc
\
fundamentalID.cc
\
getPDGpid.cc
\
getPythiaid.cc
\
hasMethods.cc
\
ion.cc
\
isBaryon.cc
\
isDiQuark.cc
\
isHadron.cc
\
isLepton.cc
\
isMeson.cc
\
isNucleus.cc
\
isValid.cc
\
jSpin.cc
\
lSpin.cc
\
lifetime.cc
\
quarks.cc
\
readQQchannel.cc
\
readQQstream.cc
\
sSpin.cc
\
spindtoi.cc
\
spinitod.cc
\
stringtodouble.cc
\
threeCharge.cc
\
translateEvtGentoPDT.cc
\
translateGeanttoPDT.cc
\
translateHerwigtoPDT.cc
\
translateIsajettoPDT.cc
\
translatePDGtabletoPDT.cc
\
translatePDTtoEvtGen.cc
\
translatePDTtoGeant.cc
\
translatePDTtoHerwig.cc
\
translatePDTtoIsajet.cc
\
translatePDTtoPDGtable.cc
\
translatePDTtoPythia.cc
\
translatePDTtoQQ.cc
\
translatePythiatoPDT.cc
\
translateQQtoPDT.cc
\
version.cc
\
write.cc
\
writeTranslations.cc
HepPDT/src/ParticleName.cc
View file @
cefee3dc
// $Id: ParticleName.cc,v 1.1 2004/04/
14 23:56:28
garren Exp $
// $Id: ParticleName.cc,v 1.1
.2.1
2004/04/
21 16:14:51
garren Exp $
// ----------------------------------------------------------------------
//
// ParticleName.cc
...
...
HepPDT/src/addPDGParticles.cc
View file @
cefee3dc
// $Id: addPDGParticles.cc,v 1.3 200
3
/0
8/13 20:00:1
1 garren Exp $
// $Id: addPDGParticles.cc,v 1.3
.4.1
200
4
/0
4/21 16:14:5
1 garren Exp $
// ----------------------------------------------------------------------
//
// addPDGParticles.cc
// Author: Lynn Garren
//
// this has the functions used by addPDGParticles
//
...
...
@@ -9,6 +10,7 @@
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include "CLHEP/HepPDT/defs.h"
...
...
@@ -26,26 +28,6 @@ void parsePDGline( TempParticleData & tpd, std::string & pdline );
bool
CheckPDGEntry
(
TempParticleData
&
tpd
,
const
std
::
string
&
,
const
std
::
string
&
,
double
,
double
);
void
getPDGpid
(
std
::
vector
<
int
>
&
idlist
,
std
::
string
&
pdline
)
{
int
sl
,
cl
,
id1
,
id2
,
id3
,
id4
;
sl
=
pdline
.
length
();
cl
=
pdline
.
find
(
'*'
);
// make sure the vector is empty
idlist
.
clear
();
if
(
cl
!=
0
&&
sl
>
60
){
// this is a valid line, so parse it
// initialize possible ID's to zero
id1
=
id2
=
id3
=
id4
=
0
;
std
::
istringstream
idnet
(
pdline
.
substr
(
1
,
32
).
c_str
()
);
idnet
>>
id1
>>
id2
>>
id3
>>
id4
;
if
(
id1
>
0
)
{
idlist
.
push_back
(
id1
);
}
if
(
id2
>
0
)
{
idlist
.
push_back
(
id2
);
}
if
(
id3
>
0
)
{
idlist
.
push_back
(
id3
);
}
if
(
id4
>
0
)
{
idlist
.
push_back
(
id4
);
}
}
}
void
parsePDGline
(
TempParticleData
&
tpd
,
std
::
string
&
pdline
)
{
double
v
,
e1
,
e2
,
err
;
...
...
HepPDT/src/addPythiaParticles.cc
View file @
cefee3dc
// $Id: addPythiaParticles.cc,v 1.2 200
3
/0
8/13 20:00:1
1 garren Exp $
// $Id: addPythiaParticles.cc,v 1.2
.4.1
200
4
/0
4/21 16:14:5
1 garren Exp $
// ----------------------------------------------------------------------
//
// addPythiaParticles.cc
...
...
@@ -25,20 +25,6 @@ void parsePythiaLine( TempParticleData & tpd, int & anti, std::string & aname, c
void
parsePythiaDecayLine
(
TempParticleData
&
tpd
,
const
std
::
string
&
pdline
);
TempDecayData
getPythiaDecay
(
const
std
::
string
&
pdline
);
bool
getPythiaid
(
int
&
id
,
const
std
::
string
&
pdline
)
{
int
sl
=
pdline
.
length
();
std
::
string
firstc
=
pdline
.
substr
(
0
,
1
);
id
=
0
;
if
(
sl
>
30
&&
firstc
==
" "
){
std
::
istringstream
var1
(
pdline
.
substr
(
0
,
10
).
c_str
()
);
var1
>>
id
;
// if var1 is blank, id is not changed
return
true
;
}
else
{
return
false
;
}
}
void
parsePythiaLine
(
TempParticleData
&
tpd
,
int
&
anti
,
std
::
string
&
aname
,
const
std
::
string
&
pdline
)
{
// this line defines a particle
...
...
HepPDT/src/getPDGpid.cc
View file @
cefee3dc
// $Id: getPDGpid.cc,v 1.1 2004/04/
14 23:56:28
garren Exp $
// $Id: getPDGpid.cc,v 1.1
.2.1
2004/04/
21 16:14:51
garren Exp $
// ----------------------------------------------------------------------
//
// getPDGpid.cc
...
...
HepPDT/src/getPythiaid.cc
View file @
cefee3dc
// $Id: getPythiaid.cc,v 1.1 2004/04/
14 23:56:28
garren Exp $
// $Id: getPythiaid.cc,v 1.1
.2.1
2004/04/
21 16:14:51
garren Exp $
// ----------------------------------------------------------------------
//
// getPythiaid.cc
...
...
HepPDT/src/listPDGTranslation.cc
View file @
cefee3dc
// $Id: listPDGTranslation.cc,v 1.1 2004/04/
14 23:56:28
garren Exp $
// $Id: listPDGTranslation.cc,v 1.1
.2.1
2004/04/
21 16:14:51
garren Exp $
// ----------------------------------------------------------------------
//
// listPDGTranslation.cc
...
...
HepPDT/src/listPythiaTranslation.cc
View file @
cefee3dc
// $Id: listPythiaTranslation.cc,v 1.1 2004/04/
14 23:56:28
garren Exp $
// $Id: listPythiaTranslation.cc,v 1.1
.2.1
2004/04/
21 16:14:51
garren Exp $
// ----------------------------------------------------------------------
//
// listPythiaTranslation.cc
...
...
HepPDT/src/translateHerwigtoPDT.cc
View file @
cefee3dc
// $Id: translateHerwigtoPDT.cc,v 1.1.1.1 200
3
/0
7/15 20:15:05
garren Exp $
// $Id: translateHerwigtoPDT.cc,v 1.1.1.1
.4.1
200
4
/0
4/21 16:14:51
garren Exp $
// ------------------------------------
//
// translateHerwigtoPDT.cc
...
...
@@ -46,10 +46,10 @@ int kqn=(ida/1000000000)%10;
std
::
cout
<<
" HWTRAN 3: nonallowed ion"
<<
std
::
endl
;
}
else
if
(
ida
<
100
){
// ..Higgs, etc.
hwtran
=
itabj
[
ida
];
hwtran
=
itabj
[
ida
-
1
];
// ..check for illegal antiparticles
if
(
id
<
0
){
hwtran
=
-
itabj
[
ida
];
hwtran
=
-
itabj
[
ida
-
1
];
if
(
hwtran
>=
-
99
&&
hwtran
<=
-
81
)
{
hwtran
=
0
;
}
for
(
i
=
0
;
i
<
7
;
++
i
)
{
if
(
hwtran
==
noant
[
i
])
{
hwtran
=
0
;
}
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment