delphi-edm4hep
DELPHI SDST/FDST -> EDM4hep converter
Loading...
Searching...
No Matches
DelphiParticleCode.cpp
Go to the documentation of this file.
1
#include "
delphi_edm4hep/Truth/DelphiParticleCode.h
"
2
3
#include <cstdlib>
4
5
namespace
delphi_edm4hep::truth
{
6
7
int
pdgFromDelphiCode
(
int
delphiCode) {
8
// A negative DELPHI code is the antiparticle of the positive one, except
9
// -39, which DELPHI uses for the triton.
10
if
(delphiCode == -39)
return
1000010030;
// triton
11
const
int
sign = delphiCode < 0 ? -1 : +1;
12
switch
(std::abs(delphiCode)) {
13
case
1:
return
sign * 12;
// electron neutrino
14
case
2:
return
sign * 11;
// electron
15
case
5:
return
sign * 14;
// muon neutrino
16
case
6:
return
sign * 13;
// muon
17
case
9:
return
sign * 16;
// tau neutrino
18
case
21:
return
22;
// photon
19
case
39:
return
1000010020;
// deuteron
20
case
40:
return
1000020040;
// alpha
21
case
41:
return
sign * 211;
// pi+
22
case
42:
return
sign * 321;
// K+
23
case
43:
return
sign * 311;
// K0
24
case
47:
return
111;
// pi0
25
case
61:
return
310;
// K0S
26
case
62:
return
130;
// K0L
27
case
65:
return
sign * 2212;
// proton
28
case
66:
return
sign * 2112;
// neutron
29
case
67:
return
sign * 3222;
// Sigma+
30
case
68:
return
sign * 3212;
// Sigma0
31
case
69:
return
sign * 3112;
// Sigma-
32
case
70:
return
sign * 3322;
// Xi0
33
case
71:
return
sign * 3312;
// Xi-
34
case
81:
return
sign * 3122;
// Lambda
35
case
94:
return
sign * 3334;
// Omega-
36
default
:
return
0;
// includes 17, GHEISHA's geantino
37
}
38
}
39
40
}
// namespace delphi_edm4hep::truth
DelphiParticleCode.h
delphi_edm4hep::truth
Definition
DelphiParticleCode.h:13
delphi_edm4hep::truth::pdgFromDelphiCode
int pdgFromDelphiCode(int delphiCode)
Definition
DelphiParticleCode.cpp:7
delphi_edm4hep
src
Truth
DelphiParticleCode.cpp
Generated by
1.15.0