Obtain jet production point from pyquen common block.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Apr 2005 10:11:41 +0000 (10:11 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Apr 2005 10:11:41 +0000 (10:11 +0000)
PYTHIA6/AliGenPythia.cxx
PYTHIA6/pyquenCommon.h [new file with mode: 0644]

index afb5b85..9486253 100644 (file)
@@ -30,7 +30,6 @@
 #include <TPDGCode.h>
 #include <TSystem.h>
 #include <TTree.h>
-
 #include "AliConst.h"
 #include "AliDecayerPythia.h"
 #include "AliGenPythia.h"
@@ -42,6 +41,7 @@
 #include "AliStack.h"
 #include "AliRunLoader.h"
 #include "AliMC.h"
+#include "pyquenCommon.h"
 
 ClassImp(AliGenPythia)
 
@@ -380,7 +380,7 @@ void AliGenPythia::Generate()
 
        Int_t np = fParticles->GetEntriesFast();
        
-       if (np == 0 ) continue;
+       if (np == 0) continue;
 //
        
 //
@@ -764,12 +764,23 @@ void AliGenPythia::MakeHeader()
     if (fQuench){
        Double_t z[4];
        Double_t xp, yp;
-       
-       fPythia->GetQuenchingParameters(xp, yp, z);
-       
-       ((AliGenPythiaEventHeader*) fHeader)->SetXYJet(xp, yp);
-       ((AliGenPythiaEventHeader*) fHeader)->SetZQuench(z);
-    }
+       if (fQuench == 1) {
+           // Pythia::Quench()
+           fPythia->GetQuenchingParameters(xp, yp, z);
+       } else {
+           // Pyquen
+           Double_t r1 = PARIMP.rb1;
+           Double_t r2 = PARIMP.rb2;
+           Double_t b  = PARIMP.b1;
+           Double_t r   = 0.5 * TMath::Sqrt(2. * (r1 * r1 + r2 * r2) - b * b);
+           Double_t phi = PARIMP.psib1;
+           xp = r * TMath::Cos(phi);
+           yp = r * TMath::Sin(phi);
+           
+       }
+           ((AliGenPythiaEventHeader*) fHeader)->SetXYJet(xp, yp);
+           ((AliGenPythiaEventHeader*) fHeader)->SetZQuench(z);
+       }
     
 //
 //  Pass header to RunLoader
diff --git a/PYTHIA6/pyquenCommon.h b/PYTHIA6/pyquenCommon.h
new file mode 100644 (file)
index 0000000..8a90895
--- /dev/null
@@ -0,0 +1,16 @@
+#include "Rtypes.h"
+#include "cfortran.h"
+//
+// common /parimp/ b1, psib1, rb1, rb2
+//
+extern "C" {
+
+    typedef struct {
+       Double_t b1;
+       Double_t psib1;
+       Double_t rb1;
+       Double_t rb2;
+} parimpCommon;
+#define PARIMP COMMON_BLOCK(PARIMP,parimp)
+COMMON_BLOCK_DEF(parimpCommon,PARIMP);
+}