]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PYTHIA6/AliGenPythia.h
Including TPolyLine.h (Root v4-01-02)
[u/mrichter/AliRoot.git] / PYTHIA6 / AliGenPythia.h
CommitLineData
8d2cd130 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// Generator using the TPythia interface (via AliPythia)
10// to generate pp collisions.
11// Using SetNuclei() also nuclear modifications to the structure functions
12// can be taken into account. This makes, of course, only sense for the
13// generation of the products of hard processes (heavy flavor, jets ...)
14//
15// andreas.morsch@cern.ch
16//
17
18#include "AliGenMC.h"
19#include "AliPythia.h"
20
21class AliPythia;
22class TParticle;
e5c87a3d 23class AliGenPythiaEventHeader;
32d6ef7d 24class AliStack;
5fa4b20b 25class AliRunLoader;
26
8d2cd130 27class AliGenPythia : public AliGenMC
28{
29 public:
30
31 typedef enum {kFlavorSelection, kParentSelection} StackFillOpt_t;
32 typedef enum {kCountAll, kCountParents, kCountTrackables} CountMode_t;
33 typedef enum {kCluster, kCell} JetRecMode_t;
34
35 AliGenPythia();
36 AliGenPythia(Int_t npart);
37 AliGenPythia(const AliGenPythia &Pythia);
38 virtual ~AliGenPythia();
39 virtual void Generate();
40 virtual void Init();
41 // set a cut on the Z coord. of the primary vertex (cm)
42 //
43 virtual void SetEventListRange(Int_t eventFirst=-1, Int_t eventLast=-1);
44 // select process type
45 virtual void SetProcess(Process_t proc = kPyCharm) {fProcess = proc;}
46 // select structure function
47 virtual void SetStrucFunc(StrucFunc_t func = kGRVHO) {fStrucFunc = func;}
48 // select pt of hard scattering
49 virtual void SetPtHard(Float_t ptmin = 0, Float_t ptmax = 1.e10)
50 {fPtHardMin = ptmin; fPtHardMax = ptmax; }
51 virtual void SetYHard(Float_t ymin = -1.e10, Float_t ymax = 1.e10)
52 {fYHardMin = ymin; fYHardMax = ymax; }
53 // Set initial and final state gluon radiation
54 virtual void SetGluonRadiation(Int_t iIn, Int_t iFin)
55 {fGinit = iIn; fGfinal = iFin;}
56 virtual void SetPtKick(Float_t kt = 1.)
57 {fPtKick = kt;}
58 // set centre of mass energy
59 virtual void SetEnergyCMS(Float_t energy = 5500) {fEnergyCMS = energy;}
60 // treat protons as inside nuclei
61 virtual void SetNuclei(Int_t a1, Int_t a2);
62 virtual void SetJetEtRange(Float_t etmin = 0., Float_t etmax = 1.e4)
63 {fEtMinJet = etmin; fEtMaxJet = etmax;}
64 virtual void SetJetEtaRange(Float_t etamin = -20., Float_t etamax = 20.)
65 {fEtaMinJet = etamin; fEtaMaxJet = etamax;}
66 virtual void SetJetReconstructionMode(Int_t mode = kCell) {fJetReconstruction = mode;}
67 virtual void SetJetPhiRange(Float_t phimin = 0., Float_t phimax = 360.)
68 {fPhiMinJet = TMath::Pi()*phimin/180.; fPhiMaxJet = TMath::Pi()*phimax/180.;}
69 virtual void SetGammaEtaRange(Float_t etamin = -20., Float_t etamax = 20.)
70 {fEtaMinGamma = etamin; fEtaMaxGamma = etamax;}
71 virtual void SetGammaPhiRange(Float_t phimin = 0., Float_t phimax = 360.)
72 {fPhiMinGamma = TMath::Pi()*phimin/180.; fPhiMaxGamma = TMath::Pi()*phimax/180.;}
73 // Set option for feed down from higher family
74 virtual void SetFeedDownHigherFamily(Bool_t opt) {
75 fFeedDownOpt = opt;
76 }
77 // Set option for selecting particles kept in stack according to flavor
78 // or to parent selection
79 virtual void SetStackFillOpt(StackFillOpt_t opt) {
80 fStackFillOpt = opt;
81 }
82 // Set fragmentation option
c125238c 83 virtual void SetFragmentation(Bool_t opt) {
8d2cd130 84 fFragmentation = opt;
85 }
86 // Set counting mode
c125238c 87 virtual void SetCountMode(CountMode_t mode) {
8d2cd130 88 fCountMode = mode;
89 }
b6bbf811 90 // Set quenching mode 0 = no, 1 = AM, 2 = IL
7ea3ea5b 91 virtual void SetQuench(Int_t flag = 0) {fQuench = flag;}
5fa4b20b 92 virtual void SetHadronisation(Int_t flag = 1) {fHadronisation = flag;}
93 virtual void SetReadFromFile(const Text_t *filname) {fFileName = filname; fReadFromFile = 1;}
7ea3ea5b 94
8d2cd130 95 // get cross section of process
96 virtual Float_t GetXsection() const {return fXsection;}
97 // get triggered jets
98 void GetJets(Int_t& njets, Int_t& ntrig, Float_t[4][10]);
014a9521 99 void RecJetsUA1(Int_t& njets, Float_t jets[4][50]);
592f8307 100 void SetPycellParameters(Float_t etamax = 2., Int_t neta = 274, Int_t nphi = 432,
101 Float_t thresh = 0., Float_t etseed = 4.,
102 Float_t minet = 10., Float_t r = 1.);
103
5fa4b20b 104 void LoadEvent(AliStack* stack, Int_t flag = 0, Int_t reHadr = 0);
8d2cd130 105 // Getters
106 virtual Process_t GetProcess() {return fProcess;}
107 virtual StrucFunc_t GetStrucFunc() {return fStrucFunc;}
108 virtual void GetPtHard(Float_t& ptmin, Float_t& ptmax)
109 {ptmin = fPtHardMin; ptmax = fPtHardMax = ptmax;}
110 virtual Float_t GetEnergyCMS() {return fEnergyCMS;}
111 virtual void GetNuclei(Int_t& a1, Int_t& a2)
1a626d4e 112 {a1 = fAProjectile; a2 = fATarget;}
8d2cd130 113 virtual void GetJetEtRange(Float_t& etamin, Float_t& etamax)
114 {etamin = fEtaMinJet; etamax = fEtaMaxJet;}
115 virtual void GetJetPhiRange(Float_t& phimin, Float_t& phimax)
116 {phimin = fPhiMinJet*180./TMath::Pi(); phimax = fPhiMaxJet*180/TMath::Pi();}
117 virtual void GetGammaEtaRange(Float_t& etamin, Float_t& etamax)
118 {etamin = fEtaMinGamma; etamax = fEtaMaxGamma;}
119 virtual void GetGammaPhiRange(Float_t& phimin, Float_t& phimax)
120 {phimin = fPhiMinGamma*180./TMath::Pi(); phimax = fPhiMaxGamma*180./TMath::Pi();}
121 //
122 virtual void FinishRun();
123 Bool_t CheckTrigger(TParticle* jet1, TParticle* jet2);
124
125 // Assignment Operator
126 AliGenPythia & operator=(const AliGenPythia & rhs);
127 protected:
128 // adjust the weight from kinematic cuts
129 void AdjustWeights();
130 Int_t GenerateMB();
131 void MakeHeader();
132
8d2cd130 133
134 Process_t fProcess; //Process type
135 StrucFunc_t fStrucFunc; //Structure Function
136 Float_t fEnergyCMS; //Centre of mass energy
137 Float_t fKineBias; //!Bias from kinematic selection
138 Int_t fTrials; //!Number of trials for current event
139 Int_t fTrialsRun; //!Number of trials for run
140 Float_t fQ; //Mean Q
141 Float_t fX1; //Mean x1
142 Float_t fX2; //Mean x2
143 Int_t fNev; //Number of events
144 Int_t fFlavorSelect; //Heavy Flavor Selection
145 Float_t fXsection; //Cross-section
146 AliPythia *fPythia; //!Pythia
147 Float_t fPtHardMin; //lower pT-hard cut
148 Float_t fPtHardMax; //higher pT-hard cut
149 Float_t fYHardMin; //lower y-hard cut
150 Float_t fYHardMax; //higher y-hard cut
8d2cd130 151 Int_t fGinit; //initial state gluon radiation
152 Int_t fGfinal; //final state gluon radiation
5fa4b20b 153 Int_t fHadronisation; //hadronisation
154 Int_t fNpartons; //Number of partons before hadronisation
155 Int_t fReadFromFile; //read partons from file
7ea3ea5b 156 Int_t fQuench; //Flag for quenching
8d2cd130 157 Float_t fPtKick; //Transverse momentum kick
158 Bool_t fFullEvent; //!Write Full event if true
159 AliDecayer *fDecayer; //!Pointer to the decayer instance
160 Int_t fDebugEventFirst; //!First event to debug
161 Int_t fDebugEventLast; //!Last event to debug
162 Float_t fEtMinJet; //Minimum et of triggered Jet
163 Float_t fEtMaxJet; //Maximum et of triggered Jet
164 Float_t fEtaMinJet; //Minimum eta of triggered Jet
165 Float_t fEtaMaxJet; //Maximum eta of triggered Jet
166 Float_t fPhiMinJet; //Minimum phi of triggered Jet
167 Float_t fPhiMaxJet; //Maximum phi of triggered Jet
168 Int_t fJetReconstruction; //Jet Reconstruction mode
169 Float_t fEtaMinGamma; // Minimum eta of triggered gamma
170 Float_t fEtaMaxGamma; // Maximum eta of triggered gamma
171 Float_t fPhiMinGamma; // Minimum phi of triggered gamma
172 Float_t fPhiMaxGamma; // Maximum phi of triggered gamma
592f8307 173 Float_t fPycellEtaMax; // Max. eta for Pycell
174 Int_t fPycellNEta; // Number of eta bins for Pycell
175 Int_t fPycellNPhi; // Number of phi bins for Pycell
176 Float_t fPycellThreshold; // Pycell threshold
177 Float_t fPycellEtSeed; // Pycell seed
178 Float_t fPycellMinEtJet; // Pycell min. jet et
179 Float_t fPycellMaxRadius; // Pycell cone radius
8d2cd130 180 StackFillOpt_t fStackFillOpt; // Stack filling with all particles with
181 // that flavour or only with selected
182 // parents and their decays
183 Bool_t fFeedDownOpt; // Option to set feed down from higher
184 // quark families (e.g. b->c)
185 Bool_t fFragmentation; // Option to activate fragmentation by Pythia
1d568bc2 186 Bool_t fSetNuclei; // Flag indicating that SetNuclei has been called
8d2cd130 187 //
188
5fa4b20b 189 CountMode_t fCountMode; // Options for counting when the event will be finished.
190 AliGenPythiaEventHeader* fHeader; //! Event header
191 AliRunLoader* fRL; //! Run Loader
192 const Text_t* fFileName; //Name of file to read from
e5c87a3d 193
8d2cd130 194 // fCountMode = kCountAll --> All particles that end up in the
195 // stack are counted
196 // fCountMode = kCountParents --> Only selected parents are counted
197 // fCountMode = kCountTrackabless --> Only particles flagged for tracking
198 // are counted
199 //
e5c87a3d 200 ClassDef(AliGenPythia,5) // AliGenerator interface to Pythia
8d2cd130 201};
202#endif
203
204
205
206
207