]>
Commit | Line | Data |
---|---|---|
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 | |
21 | class AliPythia; | |
22 | class TParticle; | |
fe4da5cc | 23 | |
fff02fee | 24 | class 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; } | |
fe4da5cc | 47 | // set centre of mass energy |
f1a48a38 | 48 | virtual void SetEnergyCMS(Float_t energy = 5500) {fEnergyCMS = energy;} |
811826d8 | 49 | // treat protons as inside nuclei |
50 | virtual void SetNuclei(Int_t a1, Int_t a2); | |
988b118b | 51 | virtual void SetJetEtaRange(Float_t etamin = -20., Float_t etamax = 20.) |
52 | {fEtaMinJet = etamin; fEtaMaxJet = etamax;} | |
53 | virtual void SetJetPhiRange(Float_t phimin = -180., Float_t phimax = 180.) | |
54 | {fPhiMinJet = TMath::Pi()*phimin/180.; fPhiMaxJet = TMath::Pi()*phimax/180.;} | |
b2bb450d | 55 | virtual void SetGammaEtaRange(Float_t etamin = -20., Float_t etamax = 20.) |
56 | {fEtaMinGamma = etamin; fEtaMaxGamma = etamax;} | |
57 | virtual void SetGammaPhiRange(Float_t phimin = -180., Float_t phimax = 180.) | |
58 | {fPhiMinGamma = TMath::Pi()*phimin/180.; fPhiMaxGamma = TMath::Pi()*phimax/180.;} | |
719b6b8a | 59 | // Set option for feed down from higher family |
60 | virtual void SetFeedDownHigherFamily(Bool_t opt) { | |
61 | fFeedDownOpt = opt; | |
62 | } | |
63 | // Set option for selecting particles kept in stack according to flavor | |
64 | // or to parent selection | |
65 | virtual void SetStackFillOpt(StackFillOpt_t opt) { | |
66 | fStackFillOpt = opt; | |
67 | } | |
68 | // Set fragmentation option | |
69 | virtual void SetFragmentation(const Bool_t opt) { | |
70 | fFragmentation = opt; | |
71 | } | |
72 | // Set counting mode | |
73 | virtual void SetCountMode(const CountMode_t mode) { | |
74 | fCountMode = mode; | |
75 | } | |
b2bb450d | 76 | |
fe4da5cc | 77 | // get cross section of process |
ea8b656d | 78 | virtual Float_t GetXsection() const {return fXsection;} |
9faa0850 | 79 | virtual void FinishRun(); |
ea8b656d | 80 | Bool_t CheckTrigger(TParticle* jet1, TParticle* jet2) const; |
9faa0850 | 81 | |
f87cfe57 | 82 | // Assignment Operator |
83 | AliGenPythia & operator=(const AliGenPythia & rhs); | |
a0134e39 | 84 | protected: |
6d4dd317 | 85 | // adjust the weight from kinematic cuts |
86 | void AdjustWeights(); | |
87 | Int_t GenerateMB(); | |
88 | void MakeHeader() const; | |
89 | ||
c5d36e84 | 90 | TClonesArray* fParticles; //Particle List |
91 | ||
92 | Process_t fProcess; //Process type | |
93 | StrucFunc_t fStrucFunc; //Structure Function | |
94 | Float_t fEnergyCMS; //Centre of mass energy | |
95 | Float_t fKineBias; //!Bias from kinematic selection | |
96 | Int_t fTrials; //!Number of trials | |
97 | Int_t fFlavorSelect; //Heavy Flavor Selection | |
98 | Float_t fXsection; //Cross-section | |
99 | AliPythia *fPythia; //!Pythia | |
100 | Float_t fPtHardMin; //lower pT-hard cut | |
101 | Float_t fPtHardMax; //higher pT-hard cut | |
102 | Int_t fNucA1; //mass number nucleus side 1 | |
103 | Int_t fNucA2; //mass number nucleus side 2 | |
104 | Bool_t fFullEvent; //!Write Full event if true | |
105 | AliDecayer *fDecayer; //!Pointer to the decayer instance | |
106 | Int_t fDebugEventFirst; //!First event to debug | |
107 | Int_t fDebugEventLast; //!Last event to debug | |
6d4dd317 | 108 | Float_t fEtaMinJet; //Minimum eta of triggered Jet |
109 | Float_t fEtaMaxJet; //Maximum eta of triggered Jet | |
110 | Float_t fPhiMinJet; //Minimum phi of triggered Jet | |
111 | Float_t fPhiMaxJet; //Maximum phi of triggered Jet | |
b2bb450d | 112 | |
6d4dd317 | 113 | Float_t fEtaMinGamma; // Minimum eta of triggered gamma |
114 | Float_t fEtaMaxGamma; // Maximum eta of triggered gamma | |
115 | Float_t fPhiMinGamma; // Minimum phi of triggered gamma | |
116 | Float_t fPhiMaxGamma; // Maximum phi of triggered gamma | |
988b118b | 117 | |
719b6b8a | 118 | StackFillOpt_t fStackFillOpt; // Stack filling with all particles with |
119 | // that flavour or only with selected | |
120 | // parents and their decays | |
121 | Bool_t fFeedDownOpt; // Option to set feed down from higher | |
122 | // quark families (e.g. b->c) | |
123 | Bool_t fFragmentation; // Option to activate fragmentation by Pythia | |
124 | // | |
ea8b656d | 125 | |
126 | CountMode_t fCountMode; // Options for counting when the event will be finished. | |
719b6b8a | 127 | // fCountMode = kCountAll --> All particles that end up in the |
128 | // stack are counted | |
129 | // fCountMode = kCountParents --> Only selected parents are counted | |
130 | // fCountMode = kCountTrackabless --> Only particles flagged for tracking | |
131 | // are counted | |
6d4dd317 | 132 | // |
a0134e39 | 133 | |
b2bb450d | 134 | ClassDef(AliGenPythia,2) // AliGenerator interface to Pythia |
6d4dd317 | 135 | |
fe4da5cc | 136 | }; |
137 | #endif | |
138 | ||
139 | ||
140 | ||
141 | ||
142 |