]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIGENHERWIG_H | |
2 | #define ALIGENHERWIG_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 | // Generator using HERWIG as an external generator | |
9 | // The main HERWIG options are accessable for the user through this interface. | |
10 | // Author Andreas Morsch | |
11 | // andreas.morsch@cern.ch | |
12 | ||
13 | #include "AliGenMC.h" | |
14 | #include <TString.h> | |
15 | #include <TArrayI.h> | |
16 | #include <AliRndm.h> | |
17 | #include <AliStructFuncType.h> | |
18 | ||
19 | class THerwig6; | |
20 | class AliGenHerwigEventHeader; | |
21 | class TArrayI; | |
22 | class TParticle; | |
23 | class TClonesArray; | |
24 | ||
25 | ||
26 | class AliGenHerwig : public AliGenMC | |
27 | ||
28 | { | |
29 | enum {kNoTrigger, kHardProcesses, kDirectPhotons}; | |
30 | enum {kHeJets = 1500, kHeDirectGamma = 1800}; | |
31 | public: | |
32 | AliGenHerwig(); | |
33 | AliGenHerwig(Int_t npart); | |
34 | virtual ~AliGenHerwig(); | |
35 | virtual void Generate(); | |
36 | virtual void Init(); | |
37 | virtual void InitJimmy(); | |
38 | // set centre of mass energy | |
39 | virtual void SetBeamMomenta(Float_t p1=7000., Float_t p2=7000.) | |
40 | {fMomentum1 = p1; fMomentum2 = p2;} | |
41 | virtual void SetProcess(Int_t proc) {fProcess = proc;} | |
42 | virtual void KeepFullEvent(); | |
43 | virtual void SetDecaysOff(Int_t flag=1) {fDecaysOff = flag;} | |
44 | virtual void SetTrigger(Int_t flag=kNoTrigger) {fTrigger = flag;} | |
45 | virtual void SetFlavor(Int_t flag=0) {fFlavor = flag;} | |
46 | virtual void SetSelectAll(Int_t flag=0) {fSelectAll = flag;} | |
47 | virtual void SetStrucFunc(StrucFunc_t func = kCTEQ5L) | |
48 | {fStrucFunc = func;} | |
49 | virtual void SetPtHardMin(Double_t pt) {fPtHardMin=pt;} | |
50 | virtual void SetPtHardMax(Double_t pt) {fPtHardMax=pt;} | |
51 | virtual void SetPtRMS(Double_t pt) {fPtRMS=pt;} | |
52 | virtual void SetMaxPr(Int_t i) {fMaxPr=i;} | |
53 | virtual void SetMaxErrors(Int_t i) {fMaxErrors=i;} | |
54 | virtual void FinishRun(); | |
55 | virtual void FinishRunJimmy(); | |
56 | virtual void SetEnSoft(Double_t e) {fEnSoft=e;} | |
57 | ||
58 | virtual void SetHardProcessFile(TString filename) {fFileName=TString(filename);}; | |
59 | virtual void SetEventListRange(Int_t eventFirst=-1, Int_t eventLast=-1); | |
60 | ||
61 | virtual Bool_t CheckParton(const TParticle* parton1, const TParticle* parton2); | |
62 | ||
63 | virtual void GetPartonEtaRange(Float_t& etamin, Float_t& etamax) const | |
64 | {etamin = fEtaMinParton; etamax = fEtaMaxParton;} | |
65 | virtual void GetPartonPhiRange(Float_t& phimin, Float_t& phimax) const | |
66 | {phimin = fPhiMinParton*180./TMath::Pi(); phimax = fPhiMaxParton*180/TMath::Pi();} | |
67 | virtual void GetGammaEtaRange(Float_t& etamin, Float_t& etamax) const | |
68 | {etamin = fEtaMinGamma; etamax = fEtaMaxGamma;} | |
69 | virtual void GetGammaPhiRange(Float_t& phimin, Float_t& phimax) const | |
70 | {phimin = fPhiMinGamma*180./TMath::Pi(); phimax = fPhiMaxGamma*180./TMath::Pi();} | |
71 | ||
72 | virtual void SetPartonEtaRange(Float_t etamin = -20., Float_t etamax = 20.) | |
73 | {fEtaMinParton = etamin; fEtaMaxParton = etamax;} | |
74 | // Phi range for jet trigger | |
75 | virtual void SetPartonPhiRange(Float_t phimin = 0., Float_t phimax = 360.) | |
76 | {fPhiMinParton = TMath::Pi()*phimin/180.; fPhiMaxParton = TMath::Pi()*phimax/180.;} | |
77 | // Eta range for gamma trigger | |
78 | virtual void SetGammaEtaRange(Float_t etamin = -20., Float_t etamax = 20.) | |
79 | {fEtaMinGamma = etamin; fEtaMaxGamma = etamax;} | |
80 | // Phi range for gamma trigger | |
81 | virtual void SetGammaPhiRange(Float_t phimin = 0., Float_t phimax = 360.) | |
82 | {fPhiMinGamma = TMath::Pi()*phimin/180.; fPhiMaxGamma = TMath::Pi()*phimax/180.;} | |
83 | ||
84 | protected: | |
85 | Bool_t SelectFlavor(Int_t pid) const; | |
86 | void MakeHeader(); | |
87 | protected: | |
88 | TString fAutPDF; // PDF group | |
89 | Int_t fModPDF; // PDF set | |
90 | StrucFunc_t fStrucFunc; // Structure Function | |
91 | Int_t fKeep; // Flag to keep full event information | |
92 | Int_t fDecaysOff; // Flag to turn off decays of pi0, K_s, D, Lambda, sigma | |
93 | Int_t fTrigger; // Trigger type | |
94 | Int_t fSelectAll; // Flag to write the full event | |
95 | Int_t fFlavor; // Selected particle flavor 4: charm+beauty 5: beauty | |
96 | Float_t fMomentum1; // Momentum of projectile | |
97 | Float_t fMomentum2; // Momentum of target | |
98 | Float_t fKineBias; // Bias from kinematic selection | |
99 | Int_t fTrials; // Number of trials | |
100 | Float_t fXsection; // Cross-section | |
101 | THerwig6 *fHerwig; // Herwig | |
102 | Int_t fProcess; // Process number | |
103 | Double_t fPtHardMin; // higher pT-hard cut | |
104 | Double_t fPtHardMax; // lower pT-hard cut | |
105 | Double_t fPtRMS; // intrinsic pt of incoming hadrons | |
106 | Int_t fMaxPr; // maximum number of events to print out | |
107 | Int_t fMaxErrors; // maximum number of errors allowed | |
108 | Double_t fEnSoft; // change on soft energy distribution | |
109 | Int_t fEv1Pr; // first event to be printed | |
110 | Int_t fEv2Pr; // last event to be printed | |
111 | TString fFileName; //!Name of file to read from hard scattering | |
112 | Float_t fEtaMinParton; //Minimum eta of parton shower | |
113 | Float_t fEtaMaxParton; //Maximum eta of parton shower | |
114 | Float_t fPhiMinParton; //Minimum phi of parton shower | |
115 | Float_t fPhiMaxParton; //Maximum phi of parton shower | |
116 | Float_t fEtaMinGamma; // Minimum eta of triggered gamma | |
117 | Float_t fEtaMaxGamma; // Maximum eta of triggered gamma | |
118 | Float_t fPhiMinGamma; // Minimum phi of triggered gamma | |
119 | Float_t fPhiMaxGamma; // Maximum phi of triggered gamma | |
120 | AliGenHerwigEventHeader* fHeader; //! Event header | |
121 | private: | |
122 | AliGenHerwig(const AliGenHerwig &Herwig); | |
123 | AliGenHerwig & operator=(const AliGenHerwig & rhs); | |
124 | ||
125 | // check if particle is selected as parent particle | |
126 | Bool_t ParentSelected(Int_t ip); | |
127 | // check if particle is selected as child particle | |
128 | Bool_t ChildSelected(Int_t ip); | |
129 | // adjust the weight from kinematic cuts | |
130 | void AdjustWeights(); | |
131 | // check seleted daughters | |
132 | Bool_t DaughtersSelection(const TParticle* iparticle, const TClonesArray* particles); | |
133 | // check if stable | |
134 | Bool_t Stable(const TParticle* particle) const; | |
135 | ||
136 | void InitPDF(); | |
137 | ||
138 | ClassDef(AliGenHerwig,2) // AliGenerator interface to Herwig | |
139 | }; | |
140 | #endif | |
141 | ||
142 | ||
143 | ||
144 | ||
145 |