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