3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
10 #include "AliPythia.h"
16 class AliGenPythia : public AliGenMC
20 typedef enum {kFlavorSelection, kParentSelection} StackFillOpt_t;
21 typedef enum {kCountAll, kCountParents, kCountTrackables} CountMode_t;
24 AliGenPythia(Int_t npart);
25 AliGenPythia(const AliGenPythia &Pythia);
26 virtual ~AliGenPythia();
27 virtual void Generate();
29 // set a cut on the Z coord. of the primary vertex (cm)
31 virtual void SetEventListRange(Int_t eventFirst=-1, Int_t eventLast=-1);
32 // select process type
33 virtual void SetProcess(Process_t proc = kPyCharm) {fProcess = proc;}
34 // select structure function
35 virtual void SetStrucFunc(StrucFunc_t func = kGRV_HO) {fStrucFunc = func;}
36 // select pt of hard scattering
37 virtual void SetPtHard(Float_t ptmin = 0, Float_t ptmax = 1.e10)
38 {fPtHardMin = ptmin; fPtHardMax = ptmax; }
39 // set centre of mass energy
40 virtual void SetEnergyCMS(Float_t energy = 5500) {fEnergyCMS = energy;}
41 // treat protons as inside nuclei
42 virtual void SetNuclei(Int_t a1, Int_t a2);
43 virtual void SetJetEtaRange(Float_t etamin = -20., Float_t etamax = 20.)
44 {fEtaMinJet = etamin; fEtaMaxJet = etamax;}
45 virtual void SetJetPhiRange(Float_t phimin = -180., Float_t phimax = 180.)
46 {fPhiMinJet = TMath::Pi()*phimin/180.; fPhiMaxJet = TMath::Pi()*phimax/180.;}
47 virtual void SetGammaEtaRange(Float_t etamin = -20., Float_t etamax = 20.)
48 {fEtaMinGamma = etamin; fEtaMaxGamma = etamax;}
49 virtual void SetGammaPhiRange(Float_t phimin = -180., Float_t phimax = 180.)
50 {fPhiMinGamma = TMath::Pi()*phimin/180.; fPhiMaxGamma = TMath::Pi()*phimax/180.;}
51 // Set option for feed down from higher family
52 virtual void SetFeedDownHigherFamily(Bool_t opt) {
55 // Set option for selecting particles kept in stack according to flavor
56 // or to parent selection
57 virtual void SetStackFillOpt(StackFillOpt_t opt) {
60 // Set fragmentation option
61 virtual void SetFragmentation(const Bool_t opt) {
65 virtual void SetCountMode(const CountMode_t mode) {
69 // get cross section of process
70 virtual Float_t GetXsection() {return fXsection;}
71 virtual void FinishRun();
72 Bool_t CheckTrigger(TParticle* jet1, TParticle* jet2);
74 // Assignment Operator
75 AliGenPythia & operator=(const AliGenPythia & rhs);
78 virtual void MakeHeader();
80 TClonesArray* fParticles; //Particle List
82 Process_t fProcess; //Process type
83 StrucFunc_t fStrucFunc; //Structure Function
84 Float_t fEnergyCMS; //Centre of mass energy
85 Float_t fKineBias; //!Bias from kinematic selection
86 Int_t fTrials; //!Number of trials
87 Int_t fFlavorSelect; //Heavy Flavor Selection
88 Float_t fXsection; //Cross-section
89 AliPythia *fPythia; //!Pythia
90 Float_t fPtHardMin; //lower pT-hard cut
91 Float_t fPtHardMax; //higher pT-hard cut
92 Int_t fNucA1; //mass number nucleus side 1
93 Int_t fNucA2; //mass number nucleus side 2
94 Bool_t fFullEvent; //!Write Full event if true
95 AliDecayer *fDecayer; //!Pointer to the decayer instance
96 Int_t fDebugEventFirst; //!First event to debug
97 Int_t fDebugEventLast; //!Last event to debug
98 Float_t fEtaMinJet; // Minimum eta of triggered Jet
99 Float_t fEtaMaxJet; // Maximum eta of triggered Jet
100 Float_t fPhiMinJet; // Minimum phi of triggered Jet
101 Float_t fPhiMaxJet; // Maximum phi of triggered Jet
103 Float_t fEtaMinGamma; // Minimum eta of triggered gamma
104 Float_t fEtaMaxGamma; // Maximum eta of triggered gamma
105 Float_t fPhiMinGamma; // Minimum phi of triggered gamma
106 Float_t fPhiMaxGamma; // Maximum phi of triggered gamma
108 StackFillOpt_t fStackFillOpt; // Stack filling with all particles with
109 // that flavour or only with selected
110 // parents and their decays
111 Bool_t fFeedDownOpt; // Option to set feed down from higher
112 // quark families (e.g. b->c)
113 Bool_t fFragmentation; // Option to activate fragmentation by Pythia
115 // Options for counting when the event will be finished.
116 // fCountMode = kCountAll --> All particles that end up in the
118 // fCountMode = kCountParents --> Only selected parents are counted
119 // fCountMode = kCountTrackabless --> Only particles flagged for tracking
121 CountMode_t fCountMode;
124 // adjust the weight from kinematic cuts
125 void AdjustWeights();
127 ClassDef(AliGenPythia,2) // AliGenerator interface to Pythia