Skip to content

Commit 9e905c3

Browse files
committed
Add basic TDPMjet as found in AliRoot
1 parent 52871fc commit 9e905c3

File tree

6 files changed

+1058
-0
lines changed

6 files changed

+1058
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
22
project(AEGIS)
33
add_subdirectory(MICROCERN)
44
add_subdirectory(THijing)
5+
add_subdirectory(TDPMjet)
56

67
#Install(DIRECTORY Geometry gconfig DESTINATION share/Detectors/)

TDPMjet/CMakeLists.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
2+
project(TDPMjet)
3+
4+
# You need to tell CMake where to find the ROOT installation. This can be done in a number of ways:
5+
# - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake
6+
# - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix for ROOT
7+
list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
8+
9+
#---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
10+
find_package(ROOT REQUIRED COMPONENTS EG)
11+
12+
#---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
13+
include(${ROOT_USE_FILE})
14+
15+
link_directories($ENV{DPMJET_ROOT}/lib)
16+
17+
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.)
18+
ROOT_GENERATE_DICTIONARY(G__TDPMjet TDPMjet.h LINKDEF TDPMjetLinkDef.h)
19+
20+
#---Create a shared library with geneated dictionary
21+
add_library(TDPMjet SHARED TDPMjet.cxx G__TDPMjet.cxx)
22+
target_link_libraries(TDPMjet ${ROOT_LIBRARIES} DPMJET)
23+
24+
install(TARGETS TDPMjet
25+
LIBRARY DESTINATION lib)
26+
27+
if (${ROOT_VERSION} VERSION_GREATER "6.0")
28+
install(
29+
FILES
30+
${CMAKE_CURRENT_BINARY_DIR}/libTDPMjet_rdict.pcm
31+
${CMAKE_CURRENT_BINARY_DIR}/libTDPMjet.rootmap
32+
DESTINATION lib)
33+
endif (${ROOT_VERSION} VERSION_GREATER "6.0")
34+
35+
if(${CMAKE_SYSTEM} MATCHES Darwin)
36+
set_target_properties(TDPMjet PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
37+
endif(${CMAKE_SYSTEM} MATCHES Darwin)

TDPMjet/DPMcommon.h

Lines changed: 267 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,267 @@
1+
#ifndef ROOT_DPMCommon
2+
#define ROOT_DPMCommon
3+
4+
#ifndef __CFORTRAN_LOADED
5+
//*KEEP,cfortran.
6+
#include "cfortran.h"
7+
//*KEND.
8+
#endif
9+
10+
extern "C" {
11+
/*========================================================*/
12+
/* COMMON/DTEVNO/NEVENT,ICASCA */
13+
/*--------------------------------------------------------*/
14+
typedef struct {
15+
Int_t nevent;
16+
Int_t icasca;
17+
} DtevnoCommon;
18+
19+
#define DTEVNO COMMON_BLOCK(DTEVNO,dtevno)
20+
COMMON_BLOCK_DEF(DtevnoCommon,DTEVNO);
21+
22+
/**********************************************************/
23+
/* D E S C R I P T I O N : */
24+
/*--------------------------------------------------------*/
25+
/* Event flag */
26+
/*========================================================*/
27+
28+
/*========================================================*/
29+
/* COMMON/DTEVT1/NHKK,NEVHKK,ISTHKK(NMXHKK),IDHKK(NMXHKK),*/
30+
/* JMOHKK(2,NMXHKK),JDAHKK(2,NMXHKK), */
31+
/* PHKK(5,NMXHKK),VHKK(4,NMXHKK),WHKK(4,NMXHKK) */
32+
/*--------------------------------------------------------*/
33+
typedef struct {
34+
Int_t nhkk;
35+
Int_t nevhkk;
36+
Int_t isthkk[200000];
37+
Int_t idhkk[200000];
38+
Int_t jmohkk[200000][2];
39+
Int_t jdahkk[200000][2];
40+
Double_t phkk[200000][5];
41+
Double_t vhkk[200000][4];
42+
Double_t whkk[200000][4];
43+
} Dtevt1Common;
44+
45+
#define DTEVT1 COMMON_BLOCK(DTEVT1,dtevt1)
46+
COMMON_BLOCK_DEF(Dtevt1Common,DTEVT1);
47+
48+
/**********************************************************/
49+
/* D E S C R I P T I O N : */
50+
/*--------------------------------------------------------*/
51+
/* Event history */
52+
/* */
53+
/* NHKK - number of entries in common block */
54+
/* NEVHKK - number of the event */
55+
/* ISTHKK(i) - status code for entry i with following */
56+
/* meanings: */
57+
/* = 1 final state particle produced in */
58+
/* photon-/hadron-/nucleon-nucleon collisions*/
59+
/* or in intranuclear cascade proc. */
60+
/* =-1 nucleons, deuterons, H3, He3, He4 */
61+
/* evaporated from excited nucleus and */
62+
/* photons produced in nuclear deexcitation */
63+
/* processes; */
64+
/* = 1001 residual nucleus (ground state). */
65+
/* IDHKK(i) - particle identity according to PDG code; */
66+
/* for nuclei (evaporation products and */
67+
/* residual nucleus): IDHKK(IHKK)=80000 */
68+
/* JMOHKK(1,i) - pointer to the position where the mother */
69+
/* is stored; the initial value is 0 */
70+
/* JMOHKK(2,i) - pointer to the position of the 2nd mother*/
71+
/* Normally only 1 mother exists, in which */
72+
/* case the value 0 is used. In cluster */
73+
/* fragmentation models, the 2 mothers would */
74+
/* correspond to the q and qbar which join to*/
75+
/* form a cluster. In string fragmentation, */
76+
/* the two mothers of a particle produced in */
77+
/* the fragmentation would be the 2 endpoints*/
78+
/* of the string. */
79+
/* JDAHKK(1,i) - pointer to the position of the 1st */
80+
/* daughter; if an entry has not decayed =0. */
81+
/* JDAHKK(1,i) - pointer to the position of the last */
82+
/* daughter; if an entry has not decayed =0. */
83+
/* PHKK(1,i) - momentum in x direction in GeV/c */
84+
/* PHKK(2,i) - momentum in y direction in GeV/c */
85+
/* PHKK(3,i) - momentum in z direction in GeV/c */
86+
/* PHKK(4,i) - energy in GeV */
87+
/* PHKK(5,i) - mass in GeV/c^2; for space-like partons */
88+
/* it is allowed to use a mass<0, according */
89+
/* PHKK(5,IHKK) = -sqrt(-m^2) */
90+
/* VHKK(1,i) - production vertex in x position in mm */
91+
/* VHKK(2,i) - production vertex in y position in mm */
92+
/* VHKK(3,i) - production vertex in z position in mm */
93+
/* VHKK(4,i) - production time in mm/c (=3.33*10^(-12)s */
94+
/* WHKK(I,i) - gives positions and times in projectile */
95+
/* frame, the chains are created on the posi-*/
96+
/* tions of the projectile nucleons in the */
97+
/* projectile frame (target nucleons in target*/
98+
/* frame); both positions are therefore not */
99+
/* completely consistent. The times in the */
100+
/* projectile frame are obtained by a Lorentz*/
101+
/* transformation from the LAB system. */
102+
/*========================================================*/
103+
104+
/*========================================================*/
105+
/* COMMON/DTEVT2/IDRES(NMXHKK),IDXRES(NMXHKK),NOBAM(NMXHKK),*/
106+
/* IDBAM(NMXHKK),IDCH(NMXHKK),NPOINT(10), */
107+
/* IHIST(2,NMXHKK) */
108+
/*--------------------------------------------------------*/
109+
typedef struct {
110+
Int_t idres[200000];
111+
Int_t idxres[200000];
112+
Int_t nobam[200000];
113+
Int_t idbam[200000];
114+
Int_t idch[200000];
115+
Int_t npoint[10];
116+
Int_t ihist[200000][2];
117+
} Dtevt2Common;
118+
119+
#define DTEVT2 COMMON_BLOCK(DTEVT2,dtevt2)
120+
COMMON_BLOCK_DEF(Dtevt2Common,DTEVT2);
121+
122+
/**********************************************************/
123+
/* D E S C R I P T I O N : */
124+
/*--------------------------------------------------------*/
125+
/* Extended event history */
126+
/* */
127+
/* NMXHKK - max. num. of entries (partons/particles) that */
128+
/* can be stored in the common block */
129+
/* IDRES(IHKK) - mass num. A in case of nuclear fragments */
130+
/* or residual nuclei (IDHKK(IHKK)=80000). */
131+
/* IDXRES(IHKK) - charge Zin case of nuclear fragments */
132+
/* or residual nuclei (IDHKK(IHKK)=80000). */
133+
/* NOBAM(IHKK) =1 for particles from proj. fragmentation */
134+
/* =2 for particles from target fragmentation.*/
135+
/* IDBAM(IHKK) - internal dpmjet particle code(BAMJET code)*/
136+
/*========================================================*/
137+
138+
}
139+
140+
/*========================================================*/
141+
/* COMMON/DTPRTA/IT,ITZ,IP,IPZ,IJPROJ,IBPROJ,IJTARG,IBTARG*/
142+
/*--------------------------------------------------------*/
143+
typedef struct {
144+
Int_t it;
145+
Int_t itz;
146+
Int_t ip;
147+
Int_t ipz;
148+
Int_t ijproj;
149+
Int_t ibproj;
150+
Int_t ijtarg;
151+
Int_t ibtarg;
152+
} DtprtaCommon;
153+
154+
#define DTPRTA COMMON_BLOCK(DTPRTA,dtprta)
155+
COMMON_BLOCK_DEF(DtprtaCommon,DTPRTA);
156+
/**********************************************************/
157+
/* D E S C R I P T I O N : */
158+
/*--------------------------------------------------------*/
159+
/* IT, ITZ - nucleon/atomic number of target nucleus */
160+
/* IP, IPZ - nucleon/atomic number of projectile nucleus */
161+
/* for incident hadrons IP=IPZ=1 */
162+
/*========================================================*/
163+
164+
/*========================================================*/
165+
/* COMMON /DTIMPA/ BIMIN,BIMAX,XSFRAC,ICENTR */
166+
/*--------------------------------------------------------*/
167+
typedef struct {
168+
Double_t bimin;
169+
Double_t bimax;
170+
Double_t xsfrac;
171+
Double_t icent;
172+
} DtimpaCommon;
173+
174+
#define DTIMPA COMMON_BLOCK(DTIMPA,dtimpa)
175+
COMMON_BLOCK_DEF(DtimpaCommon,DTIMPA);
176+
/**********************************************************/
177+
/* D E S C R I P T I O N : */
178+
/*--------------------------------------------------------*/
179+
/* BIMIN, BIMAX - min., max. b values (default bmin = 0) */
180+
/* XSFRAC - fraction of x-section (default: 1) */
181+
/* ICENTR =1. central production forced (default: 0) */
182+
/* <0 && >-100 -> bmin = BIMIN, bmax = BIMAX */
183+
/* <-99 -> fraction of x-sec. = XSFRAC */
184+
/* =-1. -> evaporation/fzc suppressed */
185+
/* <-1. -> evaporation/fzc suppressed */
186+
/*========================================================*/
187+
188+
189+
/*========================================================*/
190+
/* COMMON /DTGLCP/RPROJ,RTARG,BIMPAC,NWTSAM,NWASAM,NWBSAM,*/
191+
/* NWTACC,NWAACC,NWBACC */
192+
/*--------------------------------------------------------*/
193+
typedef struct {
194+
Double_t rproj;
195+
Double_t rtarg;
196+
Double_t bimpac;
197+
Int_t nwtsam;
198+
Int_t nwasam;
199+
Int_t nwbsam;
200+
Int_t nwtacc;
201+
Int_t nwtaac;
202+
Int_t nwtbac;
203+
Int_t ncp;
204+
Int_t nct;
205+
} DtglcpCommon;
206+
207+
#define DTGLCP COMMON_BLOCK(DTGLCP,dtglcp)
208+
COMMON_BLOCK_DEF(DtglcpCommon,DTGLCP);
209+
/**********************************************************/
210+
/* D E S C R I P T I O N : */
211+
/*--------------------------------------------------------*/
212+
/* RPROJ = radius of projectile nucleus */
213+
/* RPROJ = radius of target nucleus */
214+
/* BIMPAC = impact parameter of the collision */
215+
/* NWTSAM = total number of wounded nucleons */
216+
/* NWASAM = number of wounded nucleons in projectile */
217+
/* NWBSAM = number of wounded nucleons in target */
218+
/* NWTACC = total number of interacting nucleons */
219+
/* NWTAAC = total number of interacting nucleons in proj. */
220+
/* NWTBAC = total number of interacting nucleons in target*/
221+
/*========================================================*/
222+
/*========================================================*/
223+
/* COMMON /POPRCS/IPROCE,IDNODF,IDIFR1,IDIFR2,IDDPOM, */
224+
/* IPRON(15,4) */
225+
/*--------------------------------------------------------*/
226+
typedef struct {
227+
Int_t iproce;
228+
Int_t idnodf;
229+
Int_t idifr1;
230+
Int_t idifr2;
231+
Int_t iddpom;
232+
Int_t ipron[15][4];
233+
} PoprcsCommon;
234+
235+
#define POPRCS COMMON_BLOCK(POPRCS,poprcs)
236+
COMMON_BLOCK_DEF(PoprcsCommon,POPRCS);
237+
238+
239+
/**********************************************************/
240+
/* D E S C R I P T I O N : */
241+
/*--------------------------------------------------------*/
242+
/*
243+
244+
COMMON /POEVT1/ NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
245+
& JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),
246+
& VHEP(4,NMXHEP), NSD1, NSD2, NDD
247+
*/
248+
const Int_t nmxhep = 4000;
249+
250+
typedef struct {
251+
Int_t nevhep;
252+
Int_t nhep;
253+
Int_t isthep[nmxhep];
254+
Int_t idhep [nmxhep];
255+
Int_t jmohep[nmxhep][2];
256+
Int_t jdahep[nmxhep][2];
257+
Double_t phep [nmxhep][5];
258+
Double_t vhep [nmxhep][4];
259+
Int_t nsd1;
260+
Int_t nsd2;
261+
Int_t ndd;
262+
} Poevt1Common;
263+
264+
#define POEVT1 COMMON_BLOCK(POEVT1,poevt1)
265+
COMMON_BLOCK_DEF(Poevt1Common,POEVT1);
266+
267+
#endif

0 commit comments

Comments
 (0)