Option for antiproton collisions (neagative z).
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 24 Jul 2008 14:05:02 +0000 (14:05 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 24 Jul 2008 14:05:02 +0000 (14:05 +0000)
TDPMjet/AliGenDPMjet.cxx
TDPMjet/TDPMjet.cxx

index 4692ccf..93d1784 100644 (file)
@@ -141,7 +141,7 @@ void AliGenDPMjet::Init()
     // fICentr<-99 -> fraction of x-sec. = XSFRAC                
     // fICentr=-1. -> evaporation/fzc suppressed                 
     // fICentr<-1. -> evaporation/fzc suppressed                 
-    if (fAProjectile == 1 && fZProjectile == 1) fDPMjet->SetfIdp(1);
+    if (fAProjectile == 1 && TMath::Abs(fZProjectile == 1)) fDPMjet->SetfIdp(1);
     
     fDPMjet->SetfFCentr(fICentr);  
     fDPMjet->SetbRange(fMinImpactParam, fMaxImpactParam); 
@@ -215,7 +215,7 @@ void AliGenDPMjet::Generate()
          Bool_t  hasSelectedDaughters =  kFALSE;
          
          kf = iparticle->GetPdgCode();
-         if (kf == 92) continue;
+         if (kf == 92 || kf == 99999) continue;
          ks = iparticle->GetStatusCode();
 // No initial state partons
           if (ks==21) continue;
@@ -292,11 +292,10 @@ void AliGenDPMjet::Generate()
              if (hasMother) {
                  imo = iparticle->GetFirstMother();
                  mother = (TParticle *) fParticles.At(imo);
-                 imo = (mother->GetPdgCode() != 92) ? newPos[imo] : -1;
+                 imo = (mother->GetPdgCode() != 92 && mother->GetPdgCode() != 99999) ? newPos[imo] : -1;
              } // if has mother   
 
              Bool_t tFlag = (fTrackIt && (ks == 1));
-             
              PushTrack(tFlag,imo,kf,p,origin,polar,tof,kPNoProcess,nt, 1., ks);
              KeepTrack(nt);
              newPos[i] = nt;
index f982cdd..aa35249 100644 (file)
@@ -253,8 +253,22 @@ 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