Changes for kPyJets
[u/mrichter/AliRoot.git] / EVGEN / AliGenPythia.h
CommitLineData
a0134e39 1#ifndef ALIGENPYTHIA_H
2#define ALIGENPYTHIA_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
6d4dd317 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//
f87cfe57 17
fff02fee 18#include "AliGenMC.h"
f1a48a38 19#include "AliPythia.h"
f87cfe57 20
21class AliPythia;
22class TParticle;
fe4da5cc 23
fff02fee 24class AliGenPythia : public AliGenMC
fe4da5cc 25{
fe4da5cc 26 public:
719b6b8a 27
28 typedef enum {kFlavorSelection, kParentSelection} StackFillOpt_t;
29 typedef enum {kCountAll, kCountParents, kCountTrackables} CountMode_t;
30
fe4da5cc 31 AliGenPythia();
32 AliGenPythia(Int_t npart);
f87cfe57 33 AliGenPythia(const AliGenPythia &Pythia);
fe4da5cc 34 virtual ~AliGenPythia();
35 virtual void Generate();
36 virtual void Init();
a0b2b296 37 // set a cut on the Z coord. of the primary vertex (cm)
a0b2b296 38 //
11dfaf8d 39 virtual void SetEventListRange(Int_t eventFirst=-1, Int_t eventLast=-1);
fe4da5cc 40 // select process type
f1a48a38 41 virtual void SetProcess(Process_t proc = kPyCharm) {fProcess = proc;}
fe4da5cc 42 // select structure function
6d4dd317 43 virtual void SetStrucFunc(StrucFunc_t func = kGRVHO) {fStrucFunc = func;}
fe4da5cc 44 // select pt of hard scattering
f1a48a38 45 virtual void SetPtHard(Float_t ptmin = 0, Float_t ptmax = 1.e10)
46 {fPtHardMin = ptmin; fPtHardMax = ptmax; }
f953bc79 47 virtual void SetYHard(Float_t ymin = -1.e10, Float_t ymax = 1.e10)
48 {fYHardMin = ymin; fYHardMax = ymax; }
cc363573 49 // Set initial and final state gluon radiation
50 virtual void SetGluonRadiation(Int_t iIn, Int_t iFin)
51 {fGinit = iIn; fGfinal = iFin;}
52 virtual void SetPtKick(Float_t kt)
53 {fPtKick = kt;}
fe4da5cc 54 // set centre of mass energy
f1a48a38 55 virtual void SetEnergyCMS(Float_t energy = 5500) {fEnergyCMS = energy;}
811826d8 56 // treat protons as inside nuclei
57 virtual void SetNuclei(Int_t a1, Int_t a2);
cc363573 58 virtual void SetJetEtRange(Float_t etmin = 0., Float_t etmax = 1.e4)
59 {fEtMinJet = etmin; fEtMaxJet = etmax;}
988b118b 60 virtual void SetJetEtaRange(Float_t etamin = -20., Float_t etamax = 20.)
61 {fEtaMinJet = etamin; fEtaMaxJet = etamax;}
62 virtual void SetJetPhiRange(Float_t phimin = -180., Float_t phimax = 180.)
63 {fPhiMinJet = TMath::Pi()*phimin/180.; fPhiMaxJet = TMath::Pi()*phimax/180.;}
b2bb450d 64 virtual void SetGammaEtaRange(Float_t etamin = -20., Float_t etamax = 20.)
65 {fEtaMinGamma = etamin; fEtaMaxGamma = etamax;}
66 virtual void SetGammaPhiRange(Float_t phimin = -180., Float_t phimax = 180.)
67 {fPhiMinGamma = TMath::Pi()*phimin/180.; fPhiMaxGamma = TMath::Pi()*phimax/180.;}
719b6b8a 68 // Set option for feed down from higher family
69 virtual void SetFeedDownHigherFamily(Bool_t opt) {
70 fFeedDownOpt = opt;
71 }
72 // Set option for selecting particles kept in stack according to flavor
73 // or to parent selection
74 virtual void SetStackFillOpt(StackFillOpt_t opt) {
75 fStackFillOpt = opt;
76 }
77 // Set fragmentation option
78 virtual void SetFragmentation(const Bool_t opt) {
79 fFragmentation = opt;
80 }
81 // Set counting mode
82 virtual void SetCountMode(const CountMode_t mode) {
83 fCountMode = mode;
84 }
b2bb450d 85
fe4da5cc 86 // get cross section of process
651cd38e 87 virtual Float_t GetXsection() const {return fXsection;}
cc363573 88 // get triggered jets
89 void GetJets(Float_t dist, Int_t part, Int_t& njets, Int_t& ntrig, Float_t[4][10]);
90 void LoadEvent();
651cd38e 91 // Getters
92 virtual Process_t GetProcess() {return fProcess;}
93 virtual StrucFunc_t GetStrucFunc() {return fStrucFunc;}
94 virtual void GetPtHard(Float_t& ptmin, Float_t& ptmax)
95 {ptmin = fPtHardMin; ptmax = fPtHardMax = ptmax;}
96 virtual Float_t GetEnergyCMS() {return fEnergyCMS;}
97 virtual void GetNuclei(Int_t& a1, Int_t& a2)
98 {a1 = fNucA1; a2 = fNucA2;}
cc363573 99 virtual void GetJetEtRange(Float_t& etamin, Float_t& etamax)
651cd38e 100 {etamin = fEtaMinJet; etamax = fEtaMaxJet;}
101 virtual void GetJetPhiRange(Float_t& phimin, Float_t& phimax)
102 {phimin = fPhiMinJet*180./TMath::Pi(); phimax = fPhiMaxJet*180/TMath::Pi();}
103 virtual void GetGammaEtaRange(Float_t& etamin, Float_t& etamax)
104 {etamin = fEtaMinGamma; etamax = fEtaMaxGamma;}
105 virtual void GetGammaPhiRange(Float_t& phimin, Float_t& phimax)
106 {phimin = fPhiMinGamma*180./TMath::Pi(); phimax = fPhiMaxGamma*180./TMath::Pi();}
107 //
108 virtual void FinishRun();
cc363573 109 Bool_t CheckTrigger(TParticle* jet1, TParticle* jet2);
9faa0850 110
f87cfe57 111 // Assignment Operator
112 AliGenPythia & operator=(const AliGenPythia & rhs);
a0134e39 113 protected:
6d4dd317 114 // adjust the weight from kinematic cuts
115 void AdjustWeights();
116 Int_t GenerateMB();
cc363573 117 void MakeHeader();
6d4dd317 118
c5d36e84 119 TClonesArray* fParticles; //Particle List
120
121 Process_t fProcess; //Process type
122 StrucFunc_t fStrucFunc; //Structure Function
123 Float_t fEnergyCMS; //Centre of mass energy
124 Float_t fKineBias; //!Bias from kinematic selection
8a8f459f 125 Int_t fTrials; //!Number of trials for current event
126 Int_t fTrialsRun; //!Number of trials for run
127 Float_t fQ; //Mean Q
128 Float_t fX1; //Mean x1
129 Float_t fX2; //Mean x2
130 Int_t fNev; //Number of events
c5d36e84 131 Int_t fFlavorSelect; //Heavy Flavor Selection
132 Float_t fXsection; //Cross-section
133 AliPythia *fPythia; //!Pythia
134 Float_t fPtHardMin; //lower pT-hard cut
135 Float_t fPtHardMax; //higher pT-hard cut
f953bc79 136 Float_t fYHardMin; //lower y-hard cut
137 Float_t fYHardMax; //higher y-hard cut
c5d36e84 138 Int_t fNucA1; //mass number nucleus side 1
139 Int_t fNucA2; //mass number nucleus side 2
cc363573 140 Int_t fGinit; //initial state gluon radiation
141 Int_t fGfinal; //final state gluon radiation
142 Float_t fPtKick; //Transverse momentum kick
c5d36e84 143 Bool_t fFullEvent; //!Write Full event if true
144 AliDecayer *fDecayer; //!Pointer to the decayer instance
145 Int_t fDebugEventFirst; //!First event to debug
146 Int_t fDebugEventLast; //!Last event to debug
cc363573 147 Float_t fEtMinJet; //Minimum et of triggered Jet
148 Float_t fEtMaxJet; //Maximum et of triggered Jet
6d4dd317 149 Float_t fEtaMinJet; //Minimum eta of triggered Jet
150 Float_t fEtaMaxJet; //Maximum eta of triggered Jet
151 Float_t fPhiMinJet; //Minimum phi of triggered Jet
152 Float_t fPhiMaxJet; //Maximum phi of triggered Jet
b2bb450d 153
6d4dd317 154 Float_t fEtaMinGamma; // Minimum eta of triggered gamma
155 Float_t fEtaMaxGamma; // Maximum eta of triggered gamma
156 Float_t fPhiMinGamma; // Minimum phi of triggered gamma
157 Float_t fPhiMaxGamma; // Maximum phi of triggered gamma
988b118b 158
719b6b8a 159 StackFillOpt_t fStackFillOpt; // Stack filling with all particles with
160 // that flavour or only with selected
161 // parents and their decays
162 Bool_t fFeedDownOpt; // Option to set feed down from higher
163 // quark families (e.g. b->c)
164 Bool_t fFragmentation; // Option to activate fragmentation by Pythia
165 //
ea8b656d 166
167 CountMode_t fCountMode; // Options for counting when the event will be finished.
719b6b8a 168 // fCountMode = kCountAll --> All particles that end up in the
169 // stack are counted
170 // fCountMode = kCountParents --> Only selected parents are counted
171 // fCountMode = kCountTrackabless --> Only particles flagged for tracking
172 // are counted
6d4dd317 173 //
8a8f459f 174 ClassDef(AliGenPythia,3) // AliGenerator interface to Pythia
fe4da5cc 175};
176#endif
177
178
179
180
181