]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVGEN/AliGenPythia.h
New stack-fill and count options introduced (N. Carrer).
[u/mrichter/AliRoot.git] / EVGEN / AliGenPythia.h
1 #ifndef ALIGENPYTHIA_H
2 #define ALIGENPYTHIA_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8
9 #include "AliGenMC.h"
10 #include "AliPythia.h"
11 #include "TArrayF.h"
12
13 class AliPythia;
14 class TParticle;
15
16 class AliGenPythia : public AliGenMC
17 {
18  public:
19
20   typedef enum {kFlavorSelection, kParentSelection} StackFillOpt_t;
21   typedef enum {kCountAll, kCountParents, kCountTrackables} CountMode_t;
22
23     AliGenPythia();
24     AliGenPythia(Int_t npart);
25     AliGenPythia(const AliGenPythia &Pythia);
26     virtual ~AliGenPythia();
27     virtual void    Generate();
28     virtual void    Init();
29     // set a cut on the Z coord. of the primary vertex (cm)
30     //
31     virtual void    SetEventListRange(Int_t eventFirst=-1, Int_t eventLast=-1);
32     // select process type
33     virtual void    SetProcess(Process_t proc = kPyCharm) {fProcess = proc;}
34     // select structure function
35     virtual void    SetStrucFunc(StrucFunc_t func = kGRV_HO) {fStrucFunc = func;}
36     // select pt of hard scattering 
37     virtual void    SetPtHard(Float_t ptmin = 0, Float_t ptmax = 1.e10)
38         {fPtHardMin = ptmin; fPtHardMax = ptmax; }
39     // set centre of mass energy
40     virtual void    SetEnergyCMS(Float_t energy = 5500) {fEnergyCMS = energy;}
41     // treat protons as inside nuclei
42     virtual void    SetNuclei(Int_t a1, Int_t a2);
43     virtual void    SetJetEtaRange(Float_t etamin = -20., Float_t etamax = 20.)
44         {fEtaMinJet = etamin; fEtaMaxJet = etamax;}
45     virtual void    SetJetPhiRange(Float_t phimin = -180., Float_t phimax = 180.)
46         {fPhiMinJet = TMath::Pi()*phimin/180.; fPhiMaxJet = TMath::Pi()*phimax/180.;}
47     virtual void    SetGammaEtaRange(Float_t etamin = -20., Float_t etamax = 20.)
48         {fEtaMinGamma = etamin; fEtaMaxGamma = etamax;}
49     virtual void    SetGammaPhiRange(Float_t phimin = -180., Float_t phimax = 180.)
50         {fPhiMinGamma = TMath::Pi()*phimin/180.; fPhiMaxGamma = TMath::Pi()*phimax/180.;}
51     // Set option for feed down from higher family
52     virtual void SetFeedDownHigherFamily(Bool_t opt) {
53       fFeedDownOpt = opt;
54     }
55     // Set option for selecting particles kept in stack according to flavor
56     // or to parent selection
57     virtual void SetStackFillOpt(StackFillOpt_t opt) {
58       fStackFillOpt = opt;
59     }
60     // Set fragmentation option
61     virtual void SetFragmentation(const Bool_t opt) {
62       fFragmentation = opt;
63     }
64     // Set counting mode
65     virtual void SetCountMode(const CountMode_t mode) {
66       fCountMode = mode;
67     }
68     
69     // get cross section of process
70     virtual Float_t GetXsection() {return fXsection;}      
71     virtual void    FinishRun();
72     Bool_t CheckTrigger(TParticle* jet1, TParticle* jet2);
73     
74     // Assignment Operator
75     AliGenPythia & operator=(const AliGenPythia & rhs);
76  private:
77     Int_t  GenerateMB();
78     virtual void    MakeHeader();    
79  protected:
80     TClonesArray* fParticles;     //Particle  List
81     
82     Process_t   fProcess;         //Process type
83     StrucFunc_t fStrucFunc;       //Structure Function
84     Float_t     fEnergyCMS;       //Centre of mass energy
85     Float_t     fKineBias;        //!Bias from kinematic selection
86     Int_t       fTrials;          //!Number of trials
87     Int_t       fFlavorSelect;    //Heavy Flavor Selection
88     Float_t     fXsection;        //Cross-section
89     AliPythia   *fPythia;         //!Pythia 
90     Float_t     fPtHardMin;       //lower pT-hard cut 
91     Float_t     fPtHardMax;       //higher pT-hard cut
92     Int_t       fNucA1;           //mass number nucleus side 1
93     Int_t       fNucA2;           //mass number nucleus side 2
94     Bool_t      fFullEvent;       //!Write Full event if true
95     AliDecayer  *fDecayer;        //!Pointer to the decayer instance
96     Int_t       fDebugEventFirst; //!First event to debug
97     Int_t       fDebugEventLast;  //!Last  event to debug
98     Float_t     fEtaMinJet;      // Minimum eta of triggered Jet
99     Float_t     fEtaMaxJet;      // Maximum eta of triggered Jet
100     Float_t     fPhiMinJet;      // Minimum phi of triggered Jet
101     Float_t     fPhiMaxJet;      // Maximum phi of triggered Jet
102
103     Float_t     fEtaMinGamma;    // Minimum eta of triggered gamma
104     Float_t     fEtaMaxGamma;    // Maximum eta of triggered gamma
105     Float_t     fPhiMinGamma;    // Minimum phi of triggered gamma
106     Float_t     fPhiMaxGamma;    // Maximum phi of triggered gamma
107
108     StackFillOpt_t fStackFillOpt; // Stack filling with all particles with
109                                   // that flavour or only with selected
110                                   // parents and their decays
111     Bool_t fFeedDownOpt;          // Option to set feed down from higher
112                                   // quark families (e.g. b->c)
113     Bool_t fFragmentation;        // Option to activate fragmentation by Pythia
114     //
115     // Options for counting when the event will be finished.
116     // fCountMode = kCountAll         --> All particles that end up in the
117     //                                    stack are counted
118     // fCountMode = kCountParents     --> Only selected parents are counted
119     // fCountMode = kCountTrackabless --> Only particles flagged for tracking
120     //                                     are counted
121     CountMode_t fCountMode;
122
123  private:
124     // adjust the weight from kinematic cuts
125     void   AdjustWeights();
126
127     ClassDef(AliGenPythia,2) // AliGenerator interface to Pythia
128 };
129 #endif
130
131
132
133
134