]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA6/AliGenPythia.cxx
add some extra protections and a locking mechanism
[u/mrichter/AliRoot.git] / PYTHIA6 / AliGenPythia.cxx
index 1c5e6d32afefdd2daadb06f89bbbec88eff57529..ed4d2c1388da47902982da1407e4fad0d1acd797 100644 (file)
@@ -524,9 +524,10 @@ void AliGenPythia::Init()
     case kPyDirectGamma:
     case kPyLhwgMb:    
        break;
-    case kPyWPWHG:   /// !!!!!!!!!! Change done for W prod with POWHEG !!!!!!!!!! :)
+    case kPyWPWHG:
     case kPyW:
     case kPyZ:
+    case kPyZgamma:
     case kPyMBRSingleDiffraction:
     case kPyMBRDoubleDiffraction:
     case kPyMBRCentralDiffraction:
@@ -607,6 +608,9 @@ void AliGenPythia::Init()
        fPythia->SetMSTJ(44, 2);  // option to run alpha_s
        fPythia->SetPARJ(82, 1.); // Cut off for parton showers
     }
+  
+  StdoutToAliDebug(1, fPythia->Pystat(4));
+  StdoutToAliDebug(1, fPythia->Pystat(5));
 }
 
 void AliGenPythia::Generate()
@@ -737,10 +741,11 @@ void AliGenPythia::Generate()
            fProcess != kPyMbMSEL1     &&
            fProcess != kPyW && 
            fProcess != kPyZ &&
+      fProcess != kPyZgamma &&
            fProcess != kPyCharmppMNRwmi && 
            fProcess != kPyBeautyppMNRwmi &&
            fProcess != kPyBeautyJets &&
-     fProcess != kPyWPWHG &&  /// !!!!!!!!!!!!!!!!! Change done for W with POHWEG !!!!!!!!!!!!!!!!!!! :)
+     fProcess != kPyWPWHG &&
      fProcess != kPyJetsPWHG &&
      fProcess != kPyCharmPWHG &&
      fProcess != kPyBeautyPWHG) {
@@ -1112,9 +1117,10 @@ Int_t  AliGenPythia::GenerateMB()
 
     //Introducing child cuts in case kPyW, kPyZ, kPyMb, and kPyMbNonDiff
     if ( (
-    fProcess == kPyWPWHG ||  /// !!!!!!!!!!!!!!!! Added for W with POWHEG !!!!!!!!!! :)
+    fProcess == kPyWPWHG ||
     fProcess == kPyW ||
          fProcess == kPyZ ||
+    fProcess == kPyZgamma ||
          fProcess == kPyMbDefault ||
          fProcess == kPyMb ||
          fProcess == kPyMbAtlasTuneMC09 ||
@@ -1252,6 +1258,9 @@ void AliGenPythia::MakeHeader()
 // Number of primaries
     fHeader->SetNProduced(fNprimaries);
 //
+// Event weight
+    fHeader->SetEventWeight(fPythia->GetVINT(97));
+//
 // Jets that have triggered
 
     //Need to store jets for b-jet studies too!
@@ -1319,12 +1328,13 @@ void AliGenPythia::MakeHeader()
            ((AliGenPythiaEventHeader*) fHeader)->SetZQuench(z);
     }
 //
-// Store pt^hard 
+// Store pt^hard and cross-section
     ((AliGenPythiaEventHeader*) fHeader)->SetPtHard(fPythia->GetVINT(47));
+    ((AliGenPythiaEventHeader*) fHeader)->SetXsection(fPythia->GetPARI(1)); 
                
 //
 // Store Event Weight
-               ((AliGenPythiaEventHeader*) fHeader)->SetEventWeight(fPythia->GetPARI(7));
+    ((AliGenPythiaEventHeader*) fHeader)->SetEventWeight(fPythia->GetPARI(7));
                                
 //
 //  Pass header