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