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