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