]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TDPMjet/TDPMjet.cxx
Increase classdef by 1
[u/mrichter/AliRoot.git] / TDPMjet / TDPMjet.cxx
index c4562887c28e014f8c39cc54faace26b19458c33..a0ea803ad2aa6a05492d36baf6f075ce7592d855 100644 (file)
@@ -39,8 +39,9 @@
 #include "TDPMjet.h"
 //*KEEP,DPMCOMMON.
 #include "DPMcommon.h"
-//*KEEP,TParticle,T=C++.
+//*KEEP,TParticle,T=C++
 #include "TParticle.h"
+#include "TClonesArray.h"
 //*KEND.
 
 //*KEEP,TROOT.
@@ -57,6 +58,7 @@
 # define dt_rndmst dt_rndmst_
 # define dt_rndmin dt_rndmin_
 # define dt_rndmou dt_rndmou_
+# define dpmjet_openinp dpmjet_openinp_
 # define type_of_call
 #else
 # define dt_dtuini DT_DTUINI
@@ -68,6 +70,7 @@
 # define dt_rndmst DT_RNDMST
 # define dt_rndmin DT_RNDMIN
 # define dt_rndmou DT_RNDMOU
+# define dpmjet_openinp DPMJET_OPENINP
 # define type_of_call _stdcall
 #endif
 
@@ -83,6 +86,7 @@ extern "C" void   type_of_call dt_rndm(Int_t &);
 extern "C" void   type_of_call dt_rndmst(Int_t &, Int_t &, Int_t &, Int_t &);
 extern "C" void   type_of_call dt_rndmin(Int_t &, Int_t &, Int_t &, Int_t &, Int_t &, Int_t &);
 extern "C" void   type_of_call dt_rndmou(Int_t &, Int_t &, Int_t &, Int_t &, Int_t &, Int_t &);
+extern "C" void   type_of_call dpmjet_openinp();
 
 #else
 
@@ -107,6 +111,7 @@ ClassImp(TDPMjet)
        fBmax(0.),
        fFCentr(0),
        fPi0Decay(0),
+       fDecayAll(0),
        fProcess(kDpmMb)
 {
 // Default Constructor
@@ -122,12 +127,14 @@ TDPMjet::TDPMjet(DpmProcess_t  iproc, Int_t Ip=208, Int_t Ipz=82, Int_t It=208,
       fIt(It),
       fItz(Itz),
       fEpn(Epn),
+      fPpn(0.),
       fCMEn(CMEn),
       fIdp(0),
       fBmin(0.),
       fBmax(0.),
       fFCentr(0),
       fPi0Decay(0),
+      fDecayAll(0),
       fProcess(iproc)
 {  
     printf("TDPMJet Constructor %d %d %d %d \n", Ip, Ipz, It, Itz);
@@ -162,7 +169,7 @@ Int_t TDPMjet::ImportParticles(TClonesArray *particles, Option_t *option)
        entot += DTEVT1.phkk[i][3]; // PHKK[i][3] <-> PHKK(4,i)
      } 
   }
-  //printf("\n TDPMjet: DPMJET stack contains %d particles", numpart);
+  printf("\n TDPMjet: DPMJET stack contains %d particles", numpart);
   // printf("\n TDPMjet: Final not decayed particles: %d",    numStabpart);
   //printf("\n TDPMjet: Total energy: %f GeV          \n",   entot);
   Int_t nump = 0;
@@ -248,15 +255,32 @@ void TDPMjet::Initialize()
 //
     FILE* out = fopen("dpmjet.inp","w");
 //  Projectile and Target definition 
-    fprintf(out, "PROJPAR   %10.1f%10.1f%10.1f%10.1f%10.1f%10.1f\n", (Float_t) fIp, (Float_t) fIpz,  0., 0., 0., 0.);
-    fprintf(out, "TARPAR    %10.1f%10.1f%10.1f%10.1f%10.1f%10.1f\n", (Float_t) fIt, (Float_t) fItz,  0., 0., 0., 0.);
+    if (fIp == 1 && fIpz ==1) {
+       fprintf(out, "PROJPAR                                                               PROTON\n");
+    } else if (fIp == 1 && fIpz == -1) {
+       fprintf(out, "PROJPAR                                                               APROTON\n");
+    } else {
+       fprintf(out, "PROJPAR   %10.1f%10.1f%10.1f%10.1f%10.1f%10.1f\n", (Float_t) fIp, (Float_t) fIpz,  0., 0., 0., 0.);
+    }
+    
+    if (fIt == 1 && fItz ==1) {
+       fprintf(out, "TARPAR                                                                PROTON\n");
+    } else if (fIt == 1 && fItz == -1) {
+       fprintf(out, "TARPAR                                                                APROTON\n");
+    } else {
+       fprintf(out, "TARPAR    %10.1f%10.1f%10.1f%10.1f%10.1f%10.1f\n", (Float_t) fIt, (Float_t) fItz,  0., 0., 0., 0.);
+    }
+
 //  Beam energy and crossing-angle
     fprintf(out, "BEAM      %10.1f%10.1f%10.1f%10.1f%10.1f%10.1f\n",fEpn, fEpn, 0., 0., 0., 0.);
 //  Centrality
-    fprintf(out, "CENTRAL   %10.1f%10.1f%10.1f%10.1f%10.1f%10.1f\n",-1., fBmin, fBmax, 0., 0., 0.);
+    if (fIp > 1. && fIt > 1) 
+       fprintf(out, "CENTRAL   %10.1f%10.1f%10.1f%10.1f%10.1f%10.1f\n",-1., fBmin, fBmax, 0., 0., 0.);
 //  Particle decays
     if (fPi0Decay) 
-    fprintf(out, "PARDECAY  %10.1f%10.1f%10.1f%10.1f%10.1f%10.1f\n", 2., 0., 0., 0., 0., 0.);    
+       fprintf(out, "PARDECAY  %10.1f%10.1f%10.1f%10.1f%10.1f%10.1f\n", 2., 0., 0., 0., 0., 0.);    
+
+    
 //
 //  PHOJET specific
     fprintf(out, "PHOINPUT\n");
@@ -265,21 +289,45 @@ void TDPMjet::Initialize()
     if (fProcess == kDpmMb) {
        fprintf(out, "PROCESS           1 0 1 1 1 1 1 1\n");
     } else if (fProcess == kDpmMbNonDiffr) {
-       fprintf(out, "PROCESS           1 0 1 1 0 0 0 1\n");
+       fprintf(out, "PROCESS           1 0 1 0 0 0 0 1\n");
     } else if (fProcess == kDpmDiffr) {
-       fprintf(out, "PROCESS           0 0 0 0 1 1 1 0\n");
+       fprintf(out, "PROCESS           0 0 0 1 1 1 1 0\n");
     }else if (fProcess == kDpmSingleDiffr) {
         fprintf(out, "PROCESS           0 0 0 0 1 1 0 0\n");
     }else if (fProcess == kDpmDoubleDiffr) {
         fprintf(out, "PROCESS           0 0 0 0 0 0 1 0\n");
+    } else if (fProcess == kDpmCentralDiffr){
+        fprintf(out, "PROCESS           0 0 0 1 0 0 0 0\n");
     }
     
+    Int_t iPDG[19] = 
+       {
+//          K0s   pi0  lam   sig+  sig-  tet0
+       310,  111, 3122, 3222, 3112, 3322,
+//          tet- om-    D+      D0     Ds+
+       3312, 3334,  411,  421,  431,
+//          etac lamc+ sigc++ sigc+ sigc0 Ksic+
+        441, 4122, 4222, 4212, 4112, 4232,
+//         Ksic0 sig0 
+       4132, 3212
+       };
+    
+    
+    Int_t iON = (fDecayAll) ? 1:0;
+    for (Int_t i = 0; i < 19; i++) {
+       fprintf(out, "LUND-DECAY%5d %5d\n",  iPDG[i], iON);    
+    }
+       
+    fprintf(out, "LUND-MSTJ %5d %5d\n",   22, 1);    
+
     fprintf(out, "ENDINPUT\n");
 //
 //  START card
     fprintf(out, "START            1.0       0.0\n");
     fprintf(out, "STOP\n");
     fclose(out);
+    dpmjet_openinp();
+
 //
 //  Call DPMJET initialisation
     Int_t iemu = 0; // No emulsion (default)