Skip to content

Commit 7d254f1

Browse files
authored
Merge pull request #12 from amorsch/master
updates for DPMJET v19.1.2
2 parents ef70bd5 + be4af65 commit 7d254f1

File tree

3 files changed

+26
-23
lines changed

3 files changed

+26
-23
lines changed

TDPMjet/DPMcommon.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include "cfortran.h"
77
//*KEND.
88
#endif
9-
9+
const Int_t NMXHKK=250000;
1010
extern "C" {
1111
/*========================================================*/
1212
/* COMMON/DTEVNO/NEVENT,ICASCA */
@@ -33,13 +33,13 @@ COMMON_BLOCK_DEF(DtevnoCommon,DTEVNO);
3333
typedef struct {
3434
Int_t nhkk;
3535
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];
36+
Int_t isthkk[NMXHKK];
37+
Int_t idhkk[NMXHKK];
38+
Int_t jmohkk[NMXHKK][2];
39+
Int_t jdahkk[NMXHKK][2];
40+
Double_t phkk[NMXHKK][5];
41+
Double_t vhkk[NMXHKK][4];
42+
Double_t whkk[NMXHKK][4];
4343
} Dtevt1Common;
4444

4545
#define DTEVT1 COMMON_BLOCK(DTEVT1,dtevt1)
@@ -107,13 +107,13 @@ COMMON_BLOCK_DEF(Dtevt1Common,DTEVT1);
107107
/* IHIST(2,NMXHKK) */
108108
/*--------------------------------------------------------*/
109109
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];
110+
Int_t idres[NMXHKK];
111+
Int_t idxres[NMXHKK];
112+
Int_t nobam[NMXHKK];
113+
Int_t idbam[NMXHKK];
114+
Int_t idch[NMXHKK];
115115
Int_t npoint[10];
116-
Int_t ihist[200000][2];
116+
Int_t ihist[NMXHKK][2];
117117
} Dtevt2Common;
118118

119119
#define DTEVT2 COMMON_BLOCK(DTEVT2,dtevt2)
@@ -168,7 +168,7 @@ typedef struct {
168168
Double_t bimin;
169169
Double_t bimax;
170170
Double_t xsfrac;
171-
Double_t icent;
171+
Int_t icent;
172172
} DtimpaCommon;
173173

174174
#define DTIMPA COMMON_BLOCK(DTIMPA,dtimpa)
@@ -229,7 +229,7 @@ typedef struct {
229229
Int_t idifr1;
230230
Int_t idifr2;
231231
Int_t iddpom;
232-
Int_t ipron[15][4];
232+
Int_t ipron[4][15];
233233
} PoprcsCommon;
234234

235235
#define POPRCS COMMON_BLOCK(POPRCS,poprcs)
@@ -245,7 +245,7 @@ COMMON_BLOCK_DEF(PoprcsCommon,POPRCS);
245245
& JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),
246246
& VHEP(4,NMXHEP), NSD1, NSD2, NDD
247247
*/
248-
const Int_t nmxhep = 4000;
248+
const Int_t nmxhep = 8000;
249249

250250
typedef struct {
251251
Int_t nevhep;

TDPMjet/TDPMjet.cxx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ ClassImp(TDPMjet)
110110
fEpn(0.),
111111
fPpn(0.),
112112
fCMEn(0.),
113-
fIdp(0),
113+
fIdp(1),
114114
fBmin(0.),
115115
fBmax(0.),
116116
fFCentr(0),
@@ -134,7 +134,7 @@ TDPMjet::TDPMjet(DpmProcess_t iproc, Int_t Ip=208, Int_t Ipz=82, Int_t It=208,
134134
fEpn(Epn),
135135
fPpn(0.),
136136
fCMEn(CMEn),
137-
fIdp(0),
137+
fIdp(1),
138138
fBmin(0.),
139139
fBmax(0.),
140140
fFCentr(0),
@@ -377,8 +377,11 @@ void TDPMjet::GenerateEvent()
377377
DTEVNO.nevent=fNEvent;
378378
Int_t kkmat=-1;
379379
Float_t Elab = fEpn;
380-
Int_t irej=0;
381-
Dt_Kkinc(fIp, fIpz, fIt, fItz, fIdp, Elab, kkmat, irej);
380+
Int_t irej = 1;
381+
while (irej) {
382+
Dt_Kkinc(fIp, fIpz, fIt, fItz, fIdp, Elab, kkmat, irej);
383+
}
384+
382385
}
383386
//______________________________________________________________________________
384387
void TDPMjet::Dt_Dtuini(int nevts, double epn, int npmass, int npchar,
@@ -402,7 +405,7 @@ void TDPMjet::Dt_Dtuini(int nevts, double epn, int npmass, int npchar,
402405

403406
//______________________________________________________________________________
404407
void TDPMjet::Dt_Kkinc(int npmass, int npchar, int ntmass, int ntchar,
405-
int idp, double elab, int kkmat, int irej)
408+
int idp, double elab, int kkmat, int& irej)
406409
{
407410
// Call dmpjet routine DT_KKINC passing the parameters
408411
// in a way accepted by Fortran routines

TDPMjet/TDPMjet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class TDPMjet : public TGenerator {
115115
int ntmass, int ntchar, int idp, int iemu);
116116

117117
virtual void Dt_Kkinc(int npmass, int npchar, int ntmass, int ntchar,
118-
int idp, double elab, int kkmat, int irej);
118+
int idp, double elab, int kkmat, int& irej);
119119

120120
virtual void Pho_Phist(int imode, double weight);
121121

0 commit comments

Comments
 (0)