]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
#99699: Code needed to run DPMJET with FLUKA for fragment production
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Jan 2013 14:51:00 +0000 (14:51 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Jan 2013 14:51:00 +0000 (14:51 +0000)
DPMJET/AliDpmJetRndm.cxx
DPMJET/CMakelibdpmjet.pkg
TDPMjet/AliGenDPMjet.cxx
TDPMjet/AliGenDPMjet.h
TDPMjet/AliIonPDGCodes.cxx

index ac0d03aad24c9b8d075b2d758a214e6cfa1dd5d0..ce287b3728686f4c63136584416de0ef23cf3670 100644 (file)
@@ -56,12 +56,14 @@ TRandom * AliDpmJetRndm::GetDpmJetRandom() {
 # define dt_rndmst_dpmjet dt_rndmst_dpmjet_
 # define dt_rndmin_dpmjet dt_rndmin_dpmjet_
 # define dt_rndmou_dpmjet dt_rndmou_dpmjet_
+# define rninit_dpmjet           rninit_dpmjet_
 # define type_of_call
 #else
 # define dt_rndm_dpmjet   DT_RNDM_DPMJET_
 # define dt_rndmst_dpmjet DT_RNDMST_DPMJET
 # define dt_rndmin_dpmjet DT_RNDMIN_DPMJET
 # define dt_rndmou_dpmjet DT_RNDMOU_DPMJET
+# define rninit_dpmjet    RNINIT_DPMJET
 # define type_of_call _stdcall
 #endif
 
@@ -79,6 +81,9 @@ extern "C" {
   void type_of_call dt_rndmte_(Int_t &, Int_t &, Int_t &, Int_t &, Int_t &, Int_t &)
   {printf("Dummy version of dt_rndmou reached\n");}
 
+  void type_of_call rninit_(Int_t &, Int_t &, Int_t &, Int_t &)
+  {printf("Dummy version of rninit reached\n");}
+
   Double_t type_of_call dt_rndm_(Int_t &) 
   {
     // Wrapper to static method which retrieves the 
index 064047d2c736bd0c43b2089258156724e63059ae..d3f62b419bba4d87cdc05c5e693051bfc6d4abb4 100644 (file)
@@ -33,6 +33,15 @@ set ( DHDR dpmjetLinkDef.h)
 
 set ( FSRCS dpmjet3.0-5F.f phojet1.12-35c4.f user3.0-5F.f openfile.f) 
 
+set(FLUPRO $ENV{FLUPRO})
+
+if(FLUPRO)
+
+  set ( ELIBS  libflukahp.a)
+  set ( ELIBSDIR  ${FLUPRO})  
+  
+endif(FLUPRO)
+
 if( ALICE_TARGET MATCHES "macosx")
                
                set ( CSRCS ${CSRCS}  ../PYTHIA6/pythia6_common_address.c)
index 35bd1659af2404a6e56331a273aad6038fc9a3b8..8dd9565310d57fb20a4394a52e3d41089b1e1177 100644 (file)
@@ -35,6 +35,7 @@
 #include "AliGenDPMjetEventHeader.h"
 #include "AliRun.h"
 #include "AliDpmJetRndm.h"
+#include "AliIonPDGCodes.h"
 #include "AliHeader.h"
 #include "AliStack.h"
 #include "AliMC.h"
@@ -374,7 +375,9 @@ void AliGenDPMjet::Generate()
 
 
              
-             Bool_t tFlag = (fTrackIt && (ks==1 || ks==-1 || ks==1001));
+             Bool_t tFlag = (fTrackIt && (ks==1 || ks==-1));
+             //printf(" AliGemDPMJet->PushTrack: kf %d  ks %d  flag %d\n",kf,ks,tFlag);
+             if(kf>10000 && (ks==-1 || ks==1000 || ks==1001)) kf += 1000000000;
              PushTrack(tFlag, imo, kf, 
                        p[0], p[1], p[2], p[3], 
                        origin[0], origin[1], origin[2], tof,
@@ -457,9 +460,8 @@ Bool_t AliGenDPMjet::Stable(TParticle*  particle)
 {
 // Return true for a stable particle
 //
-    
-//    if (particle->GetFirstDaughter() < 0 ) return kTRUE;
-    if (particle->GetStatusCode() == 1) return kTRUE;
+    int st = particle->GetStatusCode();
+    if(st == 1 || st == -1) return kTRUE;
     else return kFALSE;
 
 }
@@ -677,8 +679,15 @@ Bool_t AliGenDPMjet::CheckDiffraction()
     return kTRUE;
 }
 
+// -------------------------------------------------------
+void AliGenDPMjet::SetIonPDGCodes()
+{
+   // Defining PDG codes for the ions
+   AliIonPDGCodes *pdgcodes = new AliIonPDGCodes();
+   pdgcodes->AddParticlesToPdgDataBase();
+}
 
-
+// -------------------------------------------------------
 Bool_t AliGenDPMjet::GetWeightsDiffraction(Double_t M, Double_t &Mmin, Double_t &Mmax, 
                                                        Double_t &wSD, Double_t &wDD, Double_t &wND)
 {
index 0b5a786cd03f74892f88570992a24015b72b689a..c65e1e30128466cca32fe88c426487cc29aef3bb 100644 (file)
 #include <TArrayI.h>
 
 class TDPMjet;
-class TArrayI;
 class TParticle;
 class TClonesArray;
-class TGraph;
 class AliGenEventHeader;
 class AliStack;
 class AliRunLoader;
 class AliGenDPMjetEventHeader;
-
+class AliIonPDGCodes;
 
 
 class AliGenDPMjet : public AliGenMC
@@ -47,6 +45,7 @@ class AliGenDPMjet : public AliGenMC
     virtual void    SetBoostLHC(Int_t flag=0)         {fLHC        = flag;}
     virtual void    SetPi0Decay(Int_t iPi0)  {fPi0Decay = iPi0;}
     virtual void    SetDecayAll(Int_t iDec)  {fDecayAll = iDec;}
+    virtual void    SetIonPDGCodes();
     virtual void    GetImpactParameterRange(Float_t& bmin, Float_t& bmax)
                        {bmin = fMinImpactParam; bmax = fMaxImpactParam;}
     virtual Int_t   GetSpectators()        {return fSpectators;}
index b1f690e177e62ba06bc45f26cdf95f87bb5576af..d397e90db566e2295a85615cc72c193e1774ea13 100644 (file)
@@ -62,7 +62,7 @@ void AliIonPDGCodes::AddParticlesToPdgDataBase()
   
   TDatabasePDG *pdgDB = TDatabasePDG::Instance();
   
-  const Int_t kOffset=10000000;
+  const Int_t kOffset=1000000000;
   
   pdgDB->AddParticle("H","H",1.00794,kTRUE,0,1,"Ion",1*10000+1*10+kOffset,-1,8);
   //pdgDB->AddParticle("Helium","Helium",4.0026,kTRUE,0,2,"Ion",2*10000+4*10+kOffset,-1,8);