]>
Commit | Line | Data |
---|---|---|
34825e2b | 1 | #ifndef ALIGENPARAM_H |
2 | #define ALIGENPARAM_H | |
3da30618 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
fe4da5cc | 8 | #include "AliGenerator.h" |
34f60c01 | 9 | #include "AliDecayer.h" |
5c3fd7ea | 10 | #include <TArrayI.h> |
f87cfe57 | 11 | |
12 | class AliPythia; | |
13 | class TParticle; | |
b22ee262 | 14 | class AliGenLib; |
f87cfe57 | 15 | class TF1; |
16 | ||
34f60c01 | 17 | typedef enum { kAnalog, kNonAnalog} Weighting_t; |
fe4da5cc | 18 | //------------------------------------------------------------- |
fe4da5cc | 19 | class AliGenParam : public AliGenerator |
20 | { | |
34825e2b | 21 | public: |
22 | AliGenParam(); | |
34f60c01 | 23 | AliGenParam(Int_t npart, AliGenLib * Library, Int_t param, char* tname = 0); |
24 | AliGenParam(Int_t npart, Int_t param, char* tname = 0); | |
25 | AliGenParam(Int_t npart, Int_t param, | |
34825e2b | 26 | Double_t (*PtPara)(Double_t*, Double_t*), |
27 | Double_t (*YPara )(Double_t*, Double_t*), | |
65fb704d | 28 | Int_t (*IpPara)(TRandom*) ); |
f87cfe57 | 29 | AliGenParam(const AliGenParam &Param); |
30 | ||
34825e2b | 31 | virtual ~AliGenParam(); |
32 | virtual void Generate(); | |
33 | virtual void Init(); | |
34 | // select particle type | |
34f60c01 | 35 | virtual void SetParam(Int_t param) {fParam = param;} |
34825e2b | 36 | // force decay type |
34f60c01 | 37 | virtual void SetForceDecay(Decay_t decay = kDiMuon) {fForceDecay = decay;} |
38 | virtual void SetWeighting(Weighting_t flag = kAnalog) {fAnalog = flag;} | |
39 | virtual void SetCutOnChild(Int_t flag = 0) {fCutOnChild = flag;} | |
40 | virtual void SetChildMomentumRange(Float_t pmin = 0, Float_t pmax = 1.e10) | |
34825e2b | 41 | {fChildPMin = pmin; fChildPMax = pmax;} |
34f60c01 | 42 | virtual void SetChildPtRange(Float_t ptmin = 0, Float_t ptmax = 20.) |
34825e2b | 43 | {fChildPtMin = ptmin; fChildPtMax = ptmax;} |
34f60c01 | 44 | virtual void SetChildPhiRange(Float_t phimin = -180., Float_t phimax = 180) |
34825e2b | 45 | {fChildPhiMin = TMath::Pi()*phimin/180; |
34f60c01 | 46 | fChildPhiMax = TMath::Pi()*phimax/180;} |
47 | virtual void SetChildThetaRange(Float_t thetamin = 0, Float_t thetamax = 180) | |
34825e2b | 48 | {fChildThetaMin = TMath::Pi()*thetamin/180; |
34f60c01 | 49 | fChildThetaMax = TMath::Pi()*thetamax/180;} |
50 | virtual void SetDeltaPt(Float_t delta=0.01) {fDeltaPt = delta;} | |
34825e2b | 51 | |
f87cfe57 | 52 | AliGenParam & operator=(const AliGenParam & rhs); |
34825e2b | 53 | protected: |
54 | Double_t (*fPtParaFunc)(Double_t*, Double_t*); //! Pointer to Pt parametrisation function | |
55 | Double_t (*fYParaFunc )(Double_t*, Double_t*); //! Pointer to Y parametrisation function | |
65fb704d | 56 | Int_t (*fIpParaFunc )(TRandom*); //! Pointer to particle type parametrisation function |
34825e2b | 57 | TF1* fPtPara; // Transverse momentum parameterisation |
58 | TF1* fYPara; // Rapidity parameterisation | |
34f60c01 | 59 | Int_t fParam; // Parameterisation type |
4d9d5cbd | 60 | Float_t fdNdy0; // central multiplicity per event |
61 | Float_t fYWgt; // Y-weight | |
62 | Float_t fPtWgt; // Pt-weight | |
4d9d5cbd | 63 | Float_t fBias; // Biasing factor |
64 | Int_t fTrials; // Number of trials | |
65 | Decay_t fForceDecay; // Decay channel forced | |
66 | Int_t fCutOnChild; // Cuts on decay products (children) are enabled/disabled | |
67 | Float_t fChildPtMin; // Children minimum pT | |
68 | Float_t fChildPtMax; // Children maximum pT | |
69 | Float_t fChildPMin; // Children minimum p | |
70 | Float_t fChildPMax; // Children maximum p | |
71 | Float_t fChildPhiMin; // Children minimum phi | |
72 | Float_t fChildPhiMax; // Children maximum phi | |
73 | Float_t fChildThetaMin;// Children minimum theta | |
74 | Float_t fChildThetaMax;// Children maximum theta | |
34825e2b | 75 | Float_t fDeltaPt; // pT sampling in steps of fDeltaPt |
76 | TArrayI fChildSelect; // Children to be selected from decay products | |
6c24ee7c | 77 | AliDecayer *fDecayer; // ! Pointer to pythia object for decays |
fe4da5cc | 78 | private: |
79 | // check if particle is selected as child | |
80 | Bool_t ChildSelected(Int_t ip); | |
81 | // all kinematic selection goes here | |
1578254f | 82 | Bool_t KinematicSelection(TParticle *particle); |
34825e2b | 83 | |
b7601ac4 | 84 | ClassDef(AliGenParam,1) // Generator using parameterised pt- and y-distribution |
fe4da5cc | 85 | }; |
86 | #endif | |
87 | ||
88 | ||
89 | ||
90 | ||
91 | ||
92 | ||
93 | ||
94 | ||
95 | ||
96 |