3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
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
17 #include <AliStructFuncType.h>
25 class AliGenHerwig : public AliGenMC
28 enum {kNoTrigger, kHardProcesses, kDirectPhotons};
32 AliGenHerwig(Int_t npart);
33 AliGenHerwig(const AliGenHerwig &Herwig);
34 virtual ~AliGenHerwig();
35 virtual void Generate();
37 // set centre of mass energy
38 virtual void SetBeamMomenta(Float_t p1=7000., Float_t p2=7000.)
39 {fMomentum1 = p1; fMomentum2 = p2;}
40 virtual void SetProjectile(TString proj="P") {fProjectile = proj;}
41 virtual void SetTarget(TString tar="P") {fTarget = tar;}
42 virtual void SetProcess(Int_t proc) {fProcess = proc;}
43 virtual void KeepFullEvent();
44 virtual void SetDecaysOff(Int_t flag=1) {fDecaysOff = flag;}
45 virtual void SetTrigger(Int_t flag=kNoTrigger) {fTrigger = flag;}
46 virtual void SetFlavor(Int_t flag=0) {fFlavor = flag;}
47 virtual void SetSelectAll(Int_t flag=0) {fSelectAll = flag;}
48 AliGenHerwig & operator=(const AliGenHerwig & rhs);
49 virtual void SetStrucFunc(StrucFunc_t func = kGRVHO)
51 virtual void SetPtHardMin(Double_t pt) {fPtHardMin=pt;}
52 virtual void SetPtRMS(Double_t pt) {fPtRMS=pt;}
53 virtual void SetMaxPr(Int_t i) {fMaxPr=i;}
54 virtual void SetMaxErrors(Int_t i) {fMaxErrors=i;}
55 virtual void FinishRun();
56 virtual void SetEnSoft(Double_t e) {fEnSoft=e;}
58 Bool_t SelectFlavor(Int_t pid);
61 TString fAutPDF; // PDF group
62 Int_t fModPDF; // PDF set
63 StrucFunc_t fStrucFunc; //Structure Function
64 Int_t fKeep; // Flag to keep full event information
65 Int_t fDecaysOff; // Flag to turn off decays of pi0, K_s, D, Lambda, sigma
66 Int_t fTrigger; // Trigger type
67 Int_t fSelectAll; // Flag to write the full event
68 Int_t fFlavor; // Selected particle flavor 4: charm+beauty 5: beauty
69 Float_t fEnergyCMS; // Centre of mass energy
70 Float_t fMomentum1; // Momentum of projectile
71 Float_t fMomentum2; // Momentum of target
72 Float_t fKineBias; // Bias from kinematic selection
73 Int_t fTrials; // Number of trials
74 Float_t fXsection; // Cross-section
75 THerwig6 *fHerwig; // Herwig
76 Int_t fProcess; // Process number
77 Double_t fPtHardMin; // lower pT-hard cut
78 Double_t fPtRMS; // intrinsic pt of incoming hadrons
79 Int_t fMaxPr; // maximum number of events to print out
80 Int_t fMaxErrors; // maximum number of errors allowed
81 Double_t fEnSoft; // change on soft energy distribution
84 // check if particle is selected as parent particle
85 Bool_t ParentSelected(Int_t ip);
86 // check if particle is selected as child particle
87 Bool_t ChildSelected(Int_t ip);
88 // adjust the weight from kinematic cuts
90 // check seleted daughters
91 Bool_t DaughtersSelection(TParticle* iparticle, TClonesArray* particles);
93 Bool_t Stable(TParticle* particle);
97 ClassDef(AliGenHerwig,1) // AliGenerator interface to Herwig