]>
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}; | |
29 | ||
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;} | |
49 | virtual void SetPtRMS(Double_t pt) {fPtRMS=pt;} | |
50 | virtual void SetMaxPr(Int_t i) {fMaxPr=i;} | |
51 | virtual void SetMaxErrors(Int_t i) {fMaxErrors=i;} | |
52 | virtual void FinishRun(); | |
7677b281 | 53 | virtual void FinishRunJimmy(); |
618e1dc0 | 54 | virtual void SetEnSoft(Double_t e) {fEnSoft=e;} |
7677b281 | 55 | |
e2054d85 | 56 | virtual void SetHardProcessFile(TString filename) {fFileName=TString(filename);}; |
57 | virtual void SetEventListRange(Int_t eventFirst=-1, Int_t eventLast=-1); | |
58 | ||
618e1dc0 | 59 | protected: |
60 | Bool_t SelectFlavor(Int_t pid); | |
61 | ||
62 | protected: | |
618e1dc0 | 63 | TString fAutPDF; // PDF group |
64 | Int_t fModPDF; // PDF set | |
65 | StrucFunc_t fStrucFunc; //Structure Function | |
66 | Int_t fKeep; // Flag to keep full event information | |
67 | Int_t fDecaysOff; // Flag to turn off decays of pi0, K_s, D, Lambda, sigma | |
68 | Int_t fTrigger; // Trigger type | |
69 | Int_t fSelectAll; // Flag to write the full event | |
70 | Int_t fFlavor; // Selected particle flavor 4: charm+beauty 5: beauty | |
71 | Float_t fEnergyCMS; // Centre of mass energy | |
72 | Float_t fMomentum1; // Momentum of projectile | |
73 | Float_t fMomentum2; // Momentum of target | |
74 | Float_t fKineBias; // Bias from kinematic selection | |
75 | Int_t fTrials; // Number of trials | |
618e1dc0 | 76 | Float_t fXsection; // Cross-section |
77 | THerwig6 *fHerwig; // Herwig | |
78 | Int_t fProcess; // Process number | |
7677b281 | 79 | Double_t fPtHardMin; // lower pT-hard cut |
618e1dc0 | 80 | Double_t fPtRMS; // intrinsic pt of incoming hadrons |
81 | Int_t fMaxPr; // maximum number of events to print out | |
82 | Int_t fMaxErrors; // maximum number of errors allowed | |
83 | Double_t fEnSoft; // change on soft energy distribution | |
e2054d85 | 84 | Int_t fEv1Pr; // first event to be printed |
85 | Int_t fEv2Pr; // last event to be printed | |
86 | TString fFileName; //!Name of file to read from hard scattering | |
7677b281 | 87 | |
618e1dc0 | 88 | private: |
93a2041b | 89 | AliGenHerwig(const AliGenHerwig &Herwig); |
90 | AliGenHerwig & operator=(const AliGenHerwig & rhs); | |
91 | ||
618e1dc0 | 92 | // check if particle is selected as parent particle |
93 | Bool_t ParentSelected(Int_t ip); | |
94 | // check if particle is selected as child particle | |
95 | Bool_t ChildSelected(Int_t ip); | |
96 | // adjust the weight from kinematic cuts | |
97 | void AdjustWeights(); | |
98 | // check seleted daughters | |
99 | Bool_t DaughtersSelection(TParticle* iparticle, TClonesArray* particles); | |
100 | // check if stable | |
101 | Bool_t Stable(TParticle* particle); | |
7677b281 | 102 | |
618e1dc0 | 103 | void InitPDF(); |
104 | ||
105 | ClassDef(AliGenHerwig,1) // AliGenerator interface to Herwig | |
106 | }; | |
107 | #endif | |
108 | ||
109 | ||
110 | ||
111 | ||
112 |