]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA6/AliGenPythia.h
If present, pass header to container.
[u/mrichter/AliRoot.git] / PYTHIA6 / AliGenPythia.h
index d1a4ffc43c287f905bf1a5004d6bc2b4f407f291..2c28671921cc7f7c1f0ea54a22f5da0f10fae2f9 100644 (file)
@@ -3,6 +3,7 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
+
 /* $Id$ */
 
 //
@@ -21,6 +22,9 @@
 class AliPythia;
 class TParticle;
 class AliGenPythiaEventHeader;
+class AliGenEventHeader;
+class AliStack;
+class AliRunLoader;
 
 class AliGenPythia : public AliGenMC
 {
@@ -78,17 +82,20 @@ class AliGenPythia : public AliGenMC
       fStackFillOpt = opt;
     }
     // Set fragmentation option
-    virtual void SetFragmentation(const Bool_t opt) {
+    virtual void SetFragmentation(Bool_t opt) {
       fFragmentation = opt;
     }
     // Set counting mode
-    virtual void SetCountMode(const CountMode_t mode) {
+    virtual void SetCountMode(CountMode_t mode) {
       fCountMode = mode;
     }
-
+    // Set quenching mode 0 = no, 1 = AM, 2 = IL
     virtual void SetQuench(Int_t flag = 0) {fQuench = flag;}
-    
-           
+    virtual void SetHadronisation(Int_t flag = 1) {fHadronisation = flag;}
+    virtual void SetReadFromFile(const Text_t *filname) {fFileName = filname;  fReadFromFile = 1;}    
+    // Get interaction rate for pileup studies
+    virtual void    SetInteractionRate(Float_t rate,Float_t timewindow = 90.e-6);
+    virtual Float_t GetInteractionRate() const {return fInteractionRate;}
     // get cross section of process
     virtual Float_t GetXsection() const {return fXsection;}
     // get triggered jets
@@ -98,12 +105,12 @@ class AliGenPythia : public AliGenMC
                             Float_t thresh = 0., Float_t etseed = 4.,
                             Float_t minet = 10., Float_t r = 1.);
     
-    void LoadEvent();
+    void LoadEvent(AliStack* stack, Int_t flag = 0, Int_t reHadr = 0);
     // Getters
     virtual Process_t    GetProcess() {return fProcess;}
     virtual StrucFunc_t  GetStrucFunc() {return fStrucFunc;}
     virtual void         GetPtHard(Float_t& ptmin, Float_t& ptmax)
-       {ptmin = fPtHardMin; ptmax = fPtHardMax = ptmax;}
+       {ptmin = fPtHardMin; ptmax = fPtHardMax;}
     virtual Float_t      GetEnergyCMS() {return fEnergyCMS;}
     virtual void         GetNuclei(Int_t&  a1, Int_t& a2)
        {a1 = fAProjectile; a2 = fATarget;}
@@ -121,13 +128,15 @@ class AliGenPythia : public AliGenMC
     
     // Assignment Operator
     AliGenPythia & operator=(const AliGenPythia & rhs);
+    void     GetSubEventTime();
+    void     AddHeader(AliGenEventHeader* header);
+    
  protected:
     // adjust the weight from kinematic cuts
-    void   AdjustWeights();
-    Int_t  GenerateMB();
-    void   MakeHeader();    
-
-    
+    void     AdjustWeights();
+    Int_t    GenerateMB();
+    void     MakeHeader();    
+    void     GeneratePileup();
     Process_t   fProcess;           //Process type
     StrucFunc_t fStrucFunc;         //Structure Function
     Float_t     fEnergyCMS;         //Centre of mass energy
@@ -137,6 +146,11 @@ class AliGenPythia : public AliGenMC
     Float_t     fQ;                 //Mean Q
     Float_t     fX1;                //Mean x1
     Float_t     fX2;                //Mean x2
+    Float_t     fEventTime;         //Time of the subevent
+    Float_t     fInteractionRate;   //Interaction rate (set by user)
+    Float_t     fTimeWindow;        //Time window for pileup events (set by user)
+    Int_t       fCurSubEvent;       //Index of the current sub-event
+    TArrayF     *fEventsTime;       //Subevents time for pileup
     Int_t       fNev;               //Number of events 
     Int_t       fFlavorSelect;      //Heavy Flavor Selection
     Float_t     fXsection;          //Cross-section
@@ -147,6 +161,9 @@ class AliGenPythia : public AliGenMC
     Float_t     fYHardMax;          //higher y-hard cut
     Int_t       fGinit;             //initial state gluon radiation
     Int_t       fGfinal;            //final state gluon radiation
+    Int_t       fHadronisation;     //hadronisation
+    Int_t       fNpartons;          //Number of partons before hadronisation
+    Int_t       fReadFromFile;      //read partons from file
     Int_t       fQuench;            //Flag for quenching
     Float_t     fPtKick;            //Transverse momentum kick
     Bool_t      fFullEvent;         //!Write Full event if true
@@ -180,8 +197,10 @@ class AliGenPythia : public AliGenMC
     Bool_t fSetNuclei;              // Flag indicating that SetNuclei has been called
     //
 
-    CountMode_t fCountMode;         // Options for counting when the event will be finished.
-    AliGenPythiaEventHeader* fHeader; //! Event header
+    CountMode_t fCountMode;            // Options for counting when the event will be finished.
+    AliGenPythiaEventHeader* fHeader;  //! Event header
+    AliRunLoader*            fRL;      //! Run Loader
+    const Text_t* fFileName;           //! Name of file to read from
      
     // fCountMode = kCountAll         --> All particles that end up in the
     //                                    stack are counted