EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
BeastMagneticField
delphes_EIC
Doxygen_Assist
east
eic-smear
EicRoot
blob
master
base
cbmbase
cbmdata
dbase
eic
ayk
base
cad
calorimetry
detectors
event
field
htc
eichtcLinkDef.h
EicHtcTask.cxx
EicHtcTask.h
geant.cxx
geant.h
htclib.h
KalmanFilter.cxx
KalmanFilter.h
KalmanNode.cxx
KalmanNode.h
MediaBank.cxx
MediaBank.h
MediaLayer.cxx
MediaLayer.h
MediaSlice.cxx
MediaSlice.h
MediaSliceArray.cxx
MediaSliceArray.h
misc.cxx
misc.h
runge-kutta.cxx
runge-kutta.h
RungeKuttaRequest.cxx
RungeKuttaRequest.h
SensitiveVolume.cxx
SensitiveVolume.h
TrKalmanFilter.cxx
TrKalmanFilter.h
TrKalmanNode.cxx
TrKalmanNode.h
TrKalmanNodeLocation.cxx
TrKalmanNodeLocation.h
htree
infrastructure
jana
proto
tracking
eventdisplay
examples
fairtools
field
gconfig
geane
genfit
GenfitTools
geobase
geometry
input
littrack
parbase
passive
pCDR-2018
pid
pnddata
PndTools
rich
trackbase
eicsmear-jetexample
eicsmeardetectors
EicToyModel
estarlight
Fun4All-lmon
fun4all_coresoftware
fun4all_eic_qa
fun4all_eic_tutorials
fun4all_eicdetectors
fun4all_eicmacros
fun4all_g4jleic
fun4all_GenFit
fun4all_macros
fun4all_tutorials
g4exampledetector
g4lblvtx
online_distribution
PEPSI
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant.cxx
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file geant.cxx
1
/* ----------------------------------------------------------------- */
2
/* geant.c */
3
/* */
4
/* It looks like GEANT pass initialization/run is always the same.*/
5
/* Therefore it makes sense to pack it into a standard call with */
6
/* several parameters describing wanted behaviour. */
7
/* */
8
/* A.Kisselev, PNPI, St.Petersburg, Russia. */
9
/* e-mail: kisselev@hermes.desy.de */
10
/* ----------------------------------------------------------------- */
11
12
#include <cassert>
13
//#include <cunistd>
14
#include <cstring>
15
16
#include <
htclib.h
>
17
//#include <geant.h>
18
19
// NB: if e+/e- included make sure that energy losses in the Kalman
20
// filter are taken into account properly; if neutral particles in
21
// decay chains are used later, will need to restructure; but since
22
// GEANT particle ID is encoded in htcTrack.status[1], it will be
23
// backwards compatible anyway;
24
t_particle_group
particle_groups
[] = {
25
{(
char
*)
"pion"
, 0.1395700,
_DEDX_HADRON_
,
26
// Changed to string letters in order to match GEANT4;
27
{{(
char
*)
"pi+"
, 8, 211}, {(
char
*)
"pi-"
, 9, -211}}},
28
{(
char
*)
"kaon"
, 0.493677,
_DEDX_HADRON_
,
29
{{(
char
*)
"K+"
, 11, 321}, {(
char
*)
"K-"
, 12, -321}}},
30
{(
char
*)
"proton"
, 0.93827231,
_DEDX_HADRON_
,
31
{{(
char
*)
"Proton"
, 14, 2212}, {(
char
*)
"Antiproton"
,15, -2212}}},
32
{(
char
*)
"electron"
, 5.109990615E-4,
_DEDX_ELECTRON_
,
33
{{(
char
*)
"Positron"
, 2, -11}, {(
char
*)
"Electron"
, 3, 11}}}};
34
int
particle_group_num
=
sizeof
(
particle_groups
)/
sizeof
(particle_groups[0]);
35
36
/* ================================================================= */
37
/* Particle names are compared ignoring case; */
38
39
t_particle
*
get_particle_by_name
(
const
char
*
name
)
40
{
41
for
(
int
gr=0; gr<
particle_group_num
; gr++)
42
for
(
int
ch=0; ch<2; ch++)
43
{
44
t_particle
*
particle
= particle_groups[gr].
members
+ ch;
45
46
if
(!strcasecmp(particle->
name
, name))
47
return
particle
;
48
}
/*for gr..ch*/
49
50
return
NULL;
51
}
/* get_particle_by_name */
52
53
/* ----------------------------------------------------------------- */
54
55
t_particle_group
*
get_particle_group_by_name
(
const
char
*grname)
56
{
57
for
(
int
gr=0; gr<
particle_group_num
; gr++)
58
{
59
t_particle_group
*pgroup = particle_groups + gr;
60
61
if
(!strcmp(pgroup->
grname
, grname))
return
pgroup;
62
}
/*for gr*/
63
64
return
NULL;
65
}
/* get_particle_group_by_name */
66
67
/* ================================================================= */
EicRoot
blob
master
eic
htc
geant.cxx
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:35
using
1.8.2 with
EIC GitHub integration