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