Derive from AliGenMC.
[u/mrichter/AliRoot.git] / EVGEN / AliGenHijing.h
index 51717cc98ddddd89b7b8b6fc558755077cc04ba9..8e6c5194c2601575ca50a78f51feff7f5026deb8 100644 (file)
@@ -5,17 +5,21 @@
 
 /* $Id$ */
 
 
 /* $Id$ */
 
+// Generator using HIJING as an external generator
+// The main HIJING options are accessable for the user through this interface.
+// andreas.morsch@cern.ch
 
 
-#include "AliGenerator.h"
-#include "GenTypeDefs.h"
-#include <THijing.h>
+#include "AliGenMC.h"
 #include <TString.h>
 #include <TArrayI.h>
 
 #include <TString.h>
 #include <TArrayI.h>
 
+class THijing;
 class TArrayI;
 class TParticle;
 class TArrayI;
 class TParticle;
+class TClonesArray;
+class TGraph;
 
 
-class AliGenHijing : public AliGenerator
+class AliGenHijing : public AliGenMC
 {
     enum {kNoTrigger, kHardProcesses, kDirectPhotons};
 
 {
     enum {kNoTrigger, kHardProcesses, kDirectPhotons};
 
@@ -28,14 +32,14 @@ class AliGenHijing : public AliGenerator
     virtual void    Init();
     // set centre of mass energy
     virtual void    SetEnergyCMS(Float_t energy=5500) {fEnergyCMS=energy;}
     virtual void    Init();
     // set centre of mass energy
     virtual void    SetEnergyCMS(Float_t energy=5500) {fEnergyCMS=energy;}
-    virtual void    SetReferenceFrame(TString frame=TString("CMS"))
+    virtual void    SetReferenceFrame(TString frame="CMS")
        {fFrame=frame;}
        {fFrame=frame;}
-    virtual void    SetProjectile(TString proj=TString("A"),
+    virtual void    SetProjectile(TString proj="A",
                                  Int_t a=208, Int_t z=82)
        {fProjectile = proj;
        fAProjectile = a;
        fZProjectile = z;}    
                                  Int_t a=208, Int_t z=82)
        {fProjectile = proj;
        fAProjectile = a;
        fZProjectile = z;}    
-    virtual void    SetTarget(TString tar=TString("A"),
+    virtual void    SetTarget(TString tar="A",
                              Int_t a=208, Int_t z=82)
        {fTarget = tar;
        fATarget = a;
                              Int_t a=208, Int_t z=82)
        {fTarget = tar;
        fATarget = a;
@@ -52,9 +56,12 @@ class AliGenHijing : public AliGenerator
     virtual void    SetFlavor(Int_t flag=0)           {fFlavor    = flag;}    
     virtual void    SetEvaluate(Int_t flag=0)         {fEvaluate  = flag;}
     virtual void    SetSelectAll(Int_t flag=0)        {fSelectAll = flag;}    
     virtual void    SetFlavor(Int_t flag=0)           {fFlavor    = flag;}    
     virtual void    SetEvaluate(Int_t flag=0)         {fEvaluate  = flag;}
     virtual void    SetSelectAll(Int_t flag=0)        {fSelectAll = flag;}    
+    virtual void    SetSpectators(Int_t spects=1)     {fSpectators = spects;}
     AliGenHijing &  operator=(const AliGenHijing & rhs);
 // Physics Routines        
     virtual void EvaluateCrossSections();
     AliGenHijing &  operator=(const AliGenHijing & rhs);
 // Physics Routines        
     virtual void EvaluateCrossSections();
+    virtual TGraph* CrossSection()     {return fDsigmaDb;}
+    virtual TGraph* BinaryCollisions() {return fDnDb;}    
  protected:
     Bool_t SelectFlavor(Int_t pid);
     void   MakeHeader();
  protected:
     Bool_t SelectFlavor(Int_t pid);
     void   MakeHeader();
@@ -77,7 +84,6 @@ class AliGenHijing : public AliGenerator
     Int_t       fEvaluate;       // Evaluate total and partial cross-sections
     Int_t       fSelectAll;      // Flag to write the full event
     Int_t       fFlavor;         // Selected particle flavor 4: charm+beauty 5: beauty
     Int_t       fEvaluate;       // Evaluate total and partial cross-sections
     Int_t       fSelectAll;      // Flag to write the full event
     Int_t       fFlavor;         // Selected particle flavor 4: charm+beauty 5: beauty
-    Decay_t     fForceDecay;     // Decay channel  are forced
     Float_t     fEnergyCMS;      // Centre of mass energy
     Float_t     fKineBias;       // Bias from kinematic selection
     Int_t       fTrials;         // Number of trials
     Float_t     fEnergyCMS;      // Centre of mass energy
     Float_t     fKineBias;       // Bias from kinematic selection
     Int_t       fTrials;         // Number of trials
@@ -87,18 +93,17 @@ class AliGenHijing : public AliGenerator
     THijing    *fHijing;         // Hijing
     Float_t     fPtHardMin;      // lower pT-hard cut 
     Float_t     fPtHardMax;      // higher pT-hard cut
     THijing    *fHijing;         // Hijing
     Float_t     fPtHardMin;      // lower pT-hard cut 
     Float_t     fPtHardMax;      // higher pT-hard cut
-
+    Int_t       fSpectators;     // put spectators on stack
+    TGraph*     fDsigmaDb;       // dSigma/db for the system
+    TGraph*     fDnDb;           // dNBinaryCollisions/db    
  private:
  private:
-    // check if particle is selected as parent particle
-    Bool_t ParentSelected(Int_t ip);
-    // check if particle is selected as child particle
-    Bool_t ChildSelected(Int_t ip);
-    // all kinematic selection cuts go here 
-    Bool_t KinematicSelection(TParticle *particle);
     // adjust the weight from kinematic cuts
     void   AdjustWeights();
     // check seleted daughters
     Bool_t DaughtersSelection(TParticle* iparticle, TClonesArray* particles);
     // adjust the weight from kinematic cuts
     void   AdjustWeights();
     // check seleted daughters
     Bool_t DaughtersSelection(TParticle* iparticle, TClonesArray* particles);
+    // check if stable
+    Bool_t Stable(TParticle*  particle);
+    
     ClassDef(AliGenHijing,1) // AliGenerator interface to Hijing
 };
 #endif
     ClassDef(AliGenHijing,1) // AliGenerator interface to Hijing
 };
 #endif