]>
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 | ||
11 | ||
12 | #include "AliGenMC.h" | |
13 | #include <TString.h> | |
14 | #include <TArrayI.h> | |
15 | #include <AliRndm.h> | |
16 | #include <AliStructFuncType.h> | |
17 | ||
18 | class THerwig6; | |
19 | class TArrayI; | |
20 | class TParticle; | |
21 | class TClonesArray; | |
22 | ||
23 | ||
24 | class AliGenHerwig : public AliGenMC | |
25 | ||
26 | { | |
27 | enum {kNoTrigger, kHardProcesses, kDirectPhotons}; | |
28 | ||
29 | public: | |
30 | AliGenHerwig(); | |
31 | AliGenHerwig(Int_t npart); | |
32 | AliGenHerwig(const AliGenHerwig &Herwig); | |
33 | virtual ~AliGenHerwig(); | |
34 | virtual void Generate(); | |
35 | virtual void Init(); | |
36 | // set centre of mass energy | |
37 | virtual void SetBeamMomenta(Float_t p1=7000., Float_t p2=7000.) | |
38 | {fMomentum1 = p1; fMomentum2 = p2;} | |
39 | virtual void SetProjectile(TString proj="P") {fProjectile = proj;} | |
40 | virtual void SetTarget(TString tar="P") {fTarget = tar;} | |
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 | AliGenHerwig & operator=(const AliGenHerwig & rhs); | |
48 | virtual void SetStrucFunc(StrucFunc_t func = kGRVHO) | |
49 | {fStrucFunc = func;} | |
50 | virtual void SetPtHardMin(Double_t pt) {fPtHardMin=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 SetEnSoft(Double_t e) {fEnSoft=e;} | |
56 | protected: | |
57 | Bool_t SelectFlavor(Int_t pid); | |
58 | ||
59 | protected: | |
60 | TString fProjectile; // Projectile | |
61 | TString fTarget; // Target | |
62 | TString fAutPDF; // PDF group | |
63 | Int_t fModPDF; // PDF set | |
64 | StrucFunc_t fStrucFunc; //Structure Function | |
65 | Int_t fKeep; // Flag to keep full event information | |
66 | Int_t fDecaysOff; // Flag to turn off decays of pi0, K_s, D, Lambda, sigma | |
67 | Int_t fTrigger; // Trigger type | |
68 | Int_t fSelectAll; // Flag to write the full event | |
69 | Int_t fFlavor; // Selected particle flavor 4: charm+beauty 5: beauty | |
70 | Float_t fEnergyCMS; // Centre of mass energy | |
71 | Float_t fMomentum1; // Momentum of projectile | |
72 | Float_t fMomentum2; // Momentum of target | |
73 | Float_t fKineBias; // Bias from kinematic selection | |
74 | Int_t fTrials; // Number of trials | |
75 | TArrayI fParentSelect; // Parent particles to be selected | |
76 | TArrayI fChildSelect; // Decay products to be selected | |
77 | Float_t fXsection; // Cross-section | |
78 | THerwig6 *fHerwig; // Herwig | |
79 | Int_t fProcess; // Process number | |
80 | Double_t fPtHardMin; // lower pT-hard cut | |
81 | Double_t fPtRMS; // intrinsic pt of incoming hadrons | |
82 | Int_t fMaxPr; // maximum number of events to print out | |
83 | Int_t fMaxErrors; // maximum number of errors allowed | |
84 | Double_t fEnSoft; // change on soft energy distribution | |
85 | ||
86 | private: | |
87 | // check if particle is selected as parent particle | |
88 | Bool_t ParentSelected(Int_t ip); | |
89 | // check if particle is selected as child particle | |
90 | Bool_t ChildSelected(Int_t ip); | |
91 | // adjust the weight from kinematic cuts | |
92 | void AdjustWeights(); | |
93 | // check seleted daughters | |
94 | Bool_t DaughtersSelection(TParticle* iparticle, TClonesArray* particles); | |
95 | // check if stable | |
96 | Bool_t Stable(TParticle* particle); | |
97 | ||
98 | void InitPDF(); | |
99 | ||
100 | ClassDef(AliGenHerwig,1) // AliGenerator interface to Herwig | |
101 | }; | |
102 | #endif | |
103 | ||
104 | ||
105 | ||
106 | ||
107 |