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