]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenPythia.h
Limited pT range for parameterized Upsilon and J/Psi pT distributions.
[u/mrichter/AliRoot.git] / EVGEN / AliGenPythia.h
index 5e8ee9d74e5e33cf448e3a81d8f6dbc38c963f31..34a9e34667bc52083656ae02c6a3194f23bb5001 100644 (file)
@@ -5,10 +5,18 @@
 
 /* $Id$ */
 
+//
+// Generator using the TPythia interface (via AliPythia)
+// to generate pp collisions.
+// Using SetNuclei() also nuclear modifications to the structure functions
+// can be taken into account. This makes, of course, only sense for the
+// generation of the products of hard processes (heavy flavor, jets ...)
+//
+// andreas.morsch@cern.ch
+//
 
 #include "AliGenMC.h"
 #include "AliPythia.h"
-#include "TArrayF.h"
 
 class AliPythia;
 class TParticle;
@@ -16,6 +24,11 @@ class TParticle;
 class AliGenPythia : public AliGenMC
 {
  public:
+
+    typedef enum {kFlavorSelection, kParentSelection} StackFillOpt_t;
+    typedef enum {kCountAll, kCountParents, kCountTrackables} CountMode_t;
+    typedef enum {kCluster, kCell} JetRecMode_t;
+         
     AliGenPythia();
     AliGenPythia(Int_t npart);
     AliGenPythia(const AliGenPythia &Pythia);
@@ -23,55 +36,146 @@ class AliGenPythia : public AliGenMC
     virtual void    Generate();
     virtual void    Init();
     // set a cut on the Z coord. of the primary vertex (cm)
-    virtual void    SetCutVertexZ(Float_t cut=999999.) {fCutVertexZ = cut;}
     //
     virtual void    SetEventListRange(Int_t eventFirst=-1, Int_t eventLast=-1);
     // select process type
     virtual void    SetProcess(Process_t proc = kPyCharm) {fProcess = proc;}
     // select structure function
-    virtual void    SetStrucFunc(StrucFunc_t func = kGRV_HO) {fStrucFunc = func;}
+    virtual void    SetStrucFunc(StrucFunc_t func = kGRVHO) {fStrucFunc = func;}
     // select pt of hard scattering 
     virtual void    SetPtHard(Float_t ptmin = 0, Float_t ptmax = 1.e10)
        {fPtHardMin = ptmin; fPtHardMax = ptmax; }
+    virtual void    SetYHard(Float_t ymin = -1.e10, Float_t ymax = 1.e10)
+       {fYHardMin = ymin; fYHardMax = ymax; }
+    // Set initial and final state gluon radiation
+    virtual void    SetGluonRadiation(Int_t iIn, Int_t iFin)
+       {fGinit = iIn; fGfinal = iFin;}
+    virtual void    SetPtKick(Float_t kt = 1.)
+       {fPtKick = kt;}
     // set centre of mass energy
     virtual void    SetEnergyCMS(Float_t energy = 5500) {fEnergyCMS = energy;}
     // treat protons as inside nuclei
     virtual void    SetNuclei(Int_t a1, Int_t a2);
+    virtual void    SetJetEtRange(Float_t etmin = 0., Float_t etmax = 1.e4)
+       {fEtMinJet = etmin; fEtMaxJet = etmax;}
+    virtual void    SetJetEtaRange(Float_t etamin = -20., Float_t etamax = 20.)
+       {fEtaMinJet = etamin; fEtaMaxJet = etamax;}
+    virtual void    SetJetReconstructionMode(Int_t mode = kCell) {fJetReconstruction = mode;}
+    virtual void    SetJetPhiRange(Float_t phimin = 0., Float_t phimax = 360.)
+       {fPhiMinJet = TMath::Pi()*phimin/180.; fPhiMaxJet = TMath::Pi()*phimax/180.;}
+    virtual void    SetGammaEtaRange(Float_t etamin = -20., Float_t etamax = 20.)
+       {fEtaMinGamma = etamin; fEtaMaxGamma = etamax;}
+    virtual void    SetGammaPhiRange(Float_t phimin = 0., Float_t phimax = 360.)
+       {fPhiMinGamma = TMath::Pi()*phimin/180.; fPhiMaxGamma = TMath::Pi()*phimax/180.;}
+    // Set option for feed down from higher family
+    virtual void SetFeedDownHigherFamily(Bool_t opt) {
+      fFeedDownOpt = opt;
+    }
+    // Set option for selecting particles kept in stack according to flavor
+    // or to parent selection
+    virtual void SetStackFillOpt(StackFillOpt_t opt) {
+      fStackFillOpt = opt;
+    }
+    // Set fragmentation option
+    virtual void SetFragmentation(const Bool_t opt) {
+      fFragmentation = opt;
+    }
+    // Set counting mode
+    virtual void SetCountMode(const CountMode_t mode) {
+      fCountMode = mode;
+    }
+    
     // get cross section of process
-    virtual Float_t GetXsection() {return fXsection;}      
-    virtual void    FinishRun();
+    virtual Float_t GetXsection() const {return fXsection;}
+    // get triggered jets
+    void GetJets(Int_t& njets, Int_t& ntrig, Float_t[4][10]);
+    void RecJetsUA1(Float_t eCellMin, Float_t eCellSeed, Float_t eMin, Float_t rMin, 
+                   Int_t& njets, Float_t jets[4][50]);    
+    void LoadEvent();
+    // 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;}
+    virtual Float_t      GetEnergyCMS() {return fEnergyCMS;}
+    virtual void         GetNuclei(Int_t&  a1, Int_t& a2)
+       {a1 = fNucA1; a2 = fNucA2;}
+    virtual void         GetJetEtRange(Float_t& etamin, Float_t& etamax)
+       {etamin = fEtaMinJet; etamax = fEtaMaxJet;}
+    virtual void         GetJetPhiRange(Float_t& phimin, Float_t& phimax)
+       {phimin = fPhiMinJet*180./TMath::Pi(); phimax = fPhiMaxJet*180/TMath::Pi();}
+    virtual void         GetGammaEtaRange(Float_t& etamin, Float_t& etamax)
+       {etamin = fEtaMinGamma; etamax = fEtaMaxGamma;}
+    virtual void         GetGammaPhiRange(Float_t& phimin, Float_t& phimax)
+       {phimin = fPhiMinGamma*180./TMath::Pi(); phimax = fPhiMaxGamma*180./TMath::Pi();}
+    //
+    virtual void FinishRun();
+    Bool_t CheckTrigger(TParticle* jet1, TParticle* jet2);
     
     // Assignment Operator
     AliGenPythia & operator=(const AliGenPythia & rhs);
- private:
-    Int_t  GenerateMB();
-    virtual void    MakeHeader();    
  protected:
-    TClonesArray* fParticles;     //Particle  List
-    
-    Process_t   fProcess;         //Process type
-    StrucFunc_t fStrucFunc;       //Structure Function
-    Float_t     fEnergyCMS;       //Centre of mass energy
-    Float_t     fKineBias;        //!Bias from kinematic selection
-    Int_t       fTrials;          //!Number of trials
-    Int_t       fFlavorSelect;    //Heavy Flavor Selection
-    Float_t     fXsection;        //Cross-section
-    AliPythia   *fPythia;         //!Pythia 
-    Float_t     fPtHardMin;       //lower pT-hard cut 
-    Float_t     fPtHardMax;       //higher pT-hard cut
-    Int_t       fNucA1;           //mass number nucleus side 1
-    Int_t       fNucA2;           //mass number nucleus side 2
-    Bool_t      fFullEvent;       //!Write Full event if true
-    AliDecayer  *fDecayer;        //!Pointer to the decayer instance
-    Int_t       fDebugEventFirst; //!First event to debug
-    Int_t       fDebugEventLast;  //!Last  event to debug
-    TArrayF     fEventVertex;     //!The current event vertex
-    Float_t     fCutVertexZ;      //cut on Z vertex position (cm)
- private:
     // adjust the weight from kinematic cuts
     void   AdjustWeights();
+    Int_t  GenerateMB();
+    void   MakeHeader();    
 
-    ClassDef(AliGenPythia,1) // AliGenerator interface to Pythia
+    TClonesArray* fParticles;       //Particle  List
+    
+    Process_t   fProcess;           //Process type
+    StrucFunc_t fStrucFunc;         //Structure Function
+    Float_t     fEnergyCMS;         //Centre of mass energy
+    Float_t     fKineBias;          //!Bias from kinematic selection
+    Int_t       fTrials;            //!Number of trials for current event
+    Int_t       fTrialsRun;         //!Number of trials for run
+    Float_t     fQ;                 //Mean Q
+    Float_t     fX1;                //Mean x1
+    Float_t     fX2;                //Mean x2
+    Int_t       fNev;               //Number of events 
+    Int_t       fFlavorSelect;      //Heavy Flavor Selection
+    Float_t     fXsection;          //Cross-section
+    AliPythia   *fPythia;           //!Pythia 
+    Float_t     fPtHardMin;         //lower pT-hard cut 
+    Float_t     fPtHardMax;         //higher pT-hard cut
+    Float_t     fYHardMin;          //lower  y-hard cut 
+    Float_t     fYHardMax;          //higher y-hard cut
+    Int_t       fNucA1;             //mass number nucleus side 1
+    Int_t       fNucA2;             //mass number nucleus side 2
+    Int_t       fGinit;             //initial state gluon radiation
+    Int_t       fGfinal;            //final state gluon radiation
+    Float_t     fPtKick;            //Transverse momentum kick
+    Bool_t      fFullEvent;         //!Write Full event if true
+    AliDecayer  *fDecayer;          //!Pointer to the decayer instance
+    Int_t       fDebugEventFirst;   //!First event to debug
+    Int_t       fDebugEventLast;    //!Last  event to debug
+    Float_t     fEtMinJet;          //Minimum et of triggered Jet
+    Float_t     fEtMaxJet;          //Maximum et of triggered Jet
+    Float_t     fEtaMinJet;         //Minimum eta of triggered Jet
+    Float_t     fEtaMaxJet;         //Maximum eta of triggered Jet
+    Float_t     fPhiMinJet;         //Minimum phi of triggered Jet
+    Float_t     fPhiMaxJet;         //Maximum phi of triggered Jet
+    Int_t       fJetReconstruction; //Jet Reconstruction mode 
+    Float_t     fEtaMinGamma;       // Minimum eta of triggered gamma
+    Float_t     fEtaMaxGamma;       // Maximum eta of triggered gamma
+    Float_t     fPhiMinGamma;       // Minimum phi of triggered gamma
+    Float_t     fPhiMaxGamma;       // Maximum phi of triggered gamma
+
+    StackFillOpt_t fStackFillOpt;   // Stack filling with all particles with
+                                    // that flavour or only with selected
+                                    // parents and their decays
+    Bool_t fFeedDownOpt;            // Option to set feed down from higher
+                                    // quark families (e.g. b->c)
+    Bool_t fFragmentation;          // Option to activate fragmentation by Pythia
+    //
+
+    CountMode_t fCountMode;         // Options for counting when the event will be finished.
+    // fCountMode = kCountAll         --> All particles that end up in the
+    //                                    stack are counted
+    // fCountMode = kCountParents     --> Only selected parents are counted
+    // fCountMode = kCountTrackabless --> Only particles flagged for tracking
+    //                                     are counted
+    //
+    ClassDef(AliGenPythia,4) // AliGenerator interface to Pythia
 };
 #endif