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