]>
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 | ||
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 | ||
21 | class AliPythia; | |
22 | class TParticle; | |
e5c87a3d | 23 | class AliGenPythiaEventHeader; |
8d2cd130 | 24 | |
25 | class 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 | |
81 | virtual void SetFragmentation(const Bool_t opt) { | |
82 | fFragmentation = opt; | |
83 | } | |
84 | // Set counting mode | |
85 | virtual void SetCountMode(const CountMode_t mode) { | |
86 | fCountMode = mode; | |
87 | } | |
88 | ||
89 | // get cross section of process | |
90 | virtual Float_t GetXsection() const {return fXsection;} | |
91 | // get triggered jets | |
92 | void GetJets(Int_t& njets, Int_t& ntrig, Float_t[4][10]); | |
93 | void RecJetsUA1(Float_t eCellMin, Float_t eCellSeed, Float_t eMin, Float_t rMin, | |
592f8307 | 94 | Int_t& njets, Float_t jets[4][50]); |
95 | void SetPycellParameters(Float_t etamax = 2., Int_t neta = 274, Int_t nphi = 432, | |
96 | Float_t thresh = 0., Float_t etseed = 4., | |
97 | Float_t minet = 10., Float_t r = 1.); | |
98 | ||
8d2cd130 | 99 | void LoadEvent(); |
100 | // Getters | |
101 | virtual Process_t GetProcess() {return fProcess;} | |
102 | virtual StrucFunc_t GetStrucFunc() {return fStrucFunc;} | |
103 | virtual void GetPtHard(Float_t& ptmin, Float_t& ptmax) | |
104 | {ptmin = fPtHardMin; ptmax = fPtHardMax = ptmax;} | |
105 | virtual Float_t GetEnergyCMS() {return fEnergyCMS;} | |
106 | virtual void GetNuclei(Int_t& a1, Int_t& a2) | |
1a626d4e | 107 | {a1 = fAProjectile; a2 = fATarget;} |
8d2cd130 | 108 | virtual void GetJetEtRange(Float_t& etamin, Float_t& etamax) |
109 | {etamin = fEtaMinJet; etamax = fEtaMaxJet;} | |
110 | virtual void GetJetPhiRange(Float_t& phimin, Float_t& phimax) | |
111 | {phimin = fPhiMinJet*180./TMath::Pi(); phimax = fPhiMaxJet*180/TMath::Pi();} | |
112 | virtual void GetGammaEtaRange(Float_t& etamin, Float_t& etamax) | |
113 | {etamin = fEtaMinGamma; etamax = fEtaMaxGamma;} | |
114 | virtual void GetGammaPhiRange(Float_t& phimin, Float_t& phimax) | |
115 | {phimin = fPhiMinGamma*180./TMath::Pi(); phimax = fPhiMaxGamma*180./TMath::Pi();} | |
116 | // | |
117 | virtual void FinishRun(); | |
118 | Bool_t CheckTrigger(TParticle* jet1, TParticle* jet2); | |
119 | ||
120 | // Assignment Operator | |
121 | AliGenPythia & operator=(const AliGenPythia & rhs); | |
122 | protected: | |
123 | // adjust the weight from kinematic cuts | |
124 | void AdjustWeights(); | |
125 | Int_t GenerateMB(); | |
126 | void MakeHeader(); | |
127 | ||
8d2cd130 | 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 | |
8d2cd130 | 146 | Int_t fGinit; //initial state gluon radiation |
147 | Int_t fGfinal; //final state gluon radiation | |
148 | Float_t fPtKick; //Transverse momentum kick | |
149 | Bool_t fFullEvent; //!Write Full event if true | |
150 | AliDecayer *fDecayer; //!Pointer to the decayer instance | |
151 | Int_t fDebugEventFirst; //!First event to debug | |
152 | Int_t fDebugEventLast; //!Last event to debug | |
153 | Float_t fEtMinJet; //Minimum et of triggered Jet | |
154 | Float_t fEtMaxJet; //Maximum et of triggered Jet | |
155 | Float_t fEtaMinJet; //Minimum eta of triggered Jet | |
156 | Float_t fEtaMaxJet; //Maximum eta of triggered Jet | |
157 | Float_t fPhiMinJet; //Minimum phi of triggered Jet | |
158 | Float_t fPhiMaxJet; //Maximum phi of triggered Jet | |
159 | Int_t fJetReconstruction; //Jet Reconstruction mode | |
160 | Float_t fEtaMinGamma; // Minimum eta of triggered gamma | |
161 | Float_t fEtaMaxGamma; // Maximum eta of triggered gamma | |
162 | Float_t fPhiMinGamma; // Minimum phi of triggered gamma | |
163 | Float_t fPhiMaxGamma; // Maximum phi of triggered gamma | |
592f8307 | 164 | Float_t fPycellEtaMax; // Max. eta for Pycell |
165 | Int_t fPycellNEta; // Number of eta bins for Pycell | |
166 | Int_t fPycellNPhi; // Number of phi bins for Pycell | |
167 | Float_t fPycellThreshold; // Pycell threshold | |
168 | Float_t fPycellEtSeed; // Pycell seed | |
169 | Float_t fPycellMinEtJet; // Pycell min. jet et | |
170 | Float_t fPycellMaxRadius; // Pycell cone radius | |
8d2cd130 | 171 | StackFillOpt_t fStackFillOpt; // Stack filling with all particles with |
172 | // that flavour or only with selected | |
173 | // parents and their decays | |
174 | Bool_t fFeedDownOpt; // Option to set feed down from higher | |
175 | // quark families (e.g. b->c) | |
176 | Bool_t fFragmentation; // Option to activate fragmentation by Pythia | |
1d568bc2 | 177 | Bool_t fSetNuclei; // Flag indicating that SetNuclei has been called |
8d2cd130 | 178 | // |
179 | ||
180 | CountMode_t fCountMode; // Options for counting when the event will be finished. | |
e5c87a3d | 181 | AliGenPythiaEventHeader* fHeader; //! Event header |
182 | ||
8d2cd130 | 183 | // fCountMode = kCountAll --> All particles that end up in the |
184 | // stack are counted | |
185 | // fCountMode = kCountParents --> Only selected parents are counted | |
186 | // fCountMode = kCountTrackabless --> Only particles flagged for tracking | |
187 | // are counted | |
188 | // | |
e5c87a3d | 189 | ClassDef(AliGenPythia,5) // AliGenerator interface to Pythia |
8d2cd130 | 190 | }; |
191 | #endif | |
192 | ||
193 | ||
194 | ||
195 | ||
196 |