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" |
fe4da5cc |
9 | #include "TF1.h" |
fe4da5cc |
10 | #include "TArrayI.h" |
34825e2b |
11 | #include "AliPythia.h" |
12 | #include "GenTypeDefs.h" |
fe4da5cc |
13 | //------------------------------------------------------------- |
fe4da5cc |
14 | class AliGenParam : public AliGenerator |
15 | { |
34825e2b |
16 | public: |
17 | AliGenParam(); |
18 | AliGenParam(Int_t npart, Param_t param); |
19 | AliGenParam(Int_t npart, Param_t param, |
20 | Double_t (*PtPara)(Double_t*, Double_t*), |
21 | Double_t (*YPara )(Double_t*, Double_t*), |
22 | Int_t (*IpPara)() ); |
23 | virtual ~AliGenParam(); |
24 | virtual void Generate(); |
25 | virtual void Init(); |
26 | // select particle type |
27 | virtual void SetParam(Param_t param=jpsi_p) {fParam=param;} |
28 | // force decay type |
29 | virtual void SetForceDecay(Decay_t decay=dimuon) {fForceDecay=decay;} |
30 | virtual void SetWeighting(Weighting_t flag=analog) {fAnalog=flag;} |
31 | virtual void SetCutOnChild(Int_t flag=0) {fCutOnChild=flag;} |
32 | virtual void SetChildMomentumRange(Float_t pmin=0, Float_t pmax=1.e10) |
33 | {fChildPMin = pmin; fChildPMax = pmax;} |
34 | virtual void SetChildPtRange(Float_t ptmin=0, Float_t ptmax=20.) |
35 | {fChildPtMin = ptmin; fChildPtMax = ptmax;} |
36 | virtual void SetChildPhiRange(Float_t phimin=-180., Float_t phimax=180) |
37 | {fChildPhiMin = TMath::Pi()*phimin/180; |
38 | fChildPhiMax = TMath::Pi()*phimax/180;} |
39 | virtual void SetChildThetaRange(Float_t thetamin=0, Float_t thetamax=180) |
40 | {fChildThetaMin = TMath::Pi()*thetamin/180; |
41 | fChildThetaMax = TMath::Pi()*thetamax/180;} |
42 | virtual void SetDeltaPt(Float_t delta=0.01) {fDeltaPt=delta;} |
43 | |
44 | |
45 | protected: |
46 | Double_t (*fPtParaFunc)(Double_t*, Double_t*); //! Pointer to Pt parametrisation function |
47 | Double_t (*fYParaFunc )(Double_t*, Double_t*); //! Pointer to Y parametrisation function |
48 | Int_t (*fIpParaFunc )(); //! Pointer to particle type parametrisation function |
49 | TF1* fPtPara; // Transverse momentum parameterisation |
50 | TF1* fYPara; // Rapidity parameterisation |
4d9d5cbd |
51 | Param_t fParam; // Parameterisation type |
52 | Float_t fdNdy0; // central multiplicity per event |
53 | Float_t fYWgt; // Y-weight |
54 | Float_t fPtWgt; // Pt-weight |
55 | Weighting_t fAnalog; // Flag for anolog or pt-weighted generation |
56 | Float_t fBias; // Biasing factor |
57 | Int_t fTrials; // Number of trials |
58 | Decay_t fForceDecay; // Decay channel forced |
59 | Int_t fCutOnChild; // Cuts on decay products (children) are enabled/disabled |
60 | Float_t fChildPtMin; // Children minimum pT |
61 | Float_t fChildPtMax; // Children maximum pT |
62 | Float_t fChildPMin; // Children minimum p |
63 | Float_t fChildPMax; // Children maximum p |
64 | Float_t fChildPhiMin; // Children minimum phi |
65 | Float_t fChildPhiMax; // Children maximum phi |
66 | Float_t fChildThetaMin;// Children minimum theta |
67 | Float_t fChildThetaMax;// Children maximum theta |
34825e2b |
68 | Float_t fDeltaPt; // pT sampling in steps of fDeltaPt |
69 | TArrayI fChildSelect; // Children to be selected from decay products |
70 | AliPythia *fPythia; // Pointer to pythia object for decays |
fe4da5cc |
71 | private: |
72 | // check if particle is selected as child |
73 | Bool_t ChildSelected(Int_t ip); |
74 | // all kinematic selection goes here |
1578254f |
75 | Bool_t KinematicSelection(TParticle *particle); |
34825e2b |
76 | |
b7601ac4 |
77 | ClassDef(AliGenParam,1) // Generator using parameterised pt- and y-distribution |
fe4da5cc |
78 | }; |
79 | #endif |
80 | |
81 | |
82 | |
83 | |
84 | |
85 | |
86 | |
87 | |
88 | |
89 | |