]>
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 | ||
6d4dd317 | 8 | // |
2ad38d56 | 9 | // Class to generate particles from using parametrized pT and y distributions. |
6d4dd317 | 10 | // Distributions are obtained from pointer to object of type AliGenLib. |
11 | // (For example AliGenMUONlib) | |
12 | // | |
13 | // andreas.morsch@cern.ch | |
14 | // | |
15 | ||
fff02fee | 16 | #include "AliGenMC.h" |
f87cfe57 | 17 | |
18 | class AliPythia; | |
19 | class TParticle; | |
b22ee262 | 20 | class AliGenLib; |
f87cfe57 | 21 | class TF1; |
22 | ||
34f60c01 | 23 | typedef enum { kAnalog, kNonAnalog} Weighting_t; |
fe4da5cc | 24 | //------------------------------------------------------------- |
fff02fee | 25 | class AliGenParam : public AliGenMC |
fe4da5cc | 26 | { |
6078e216 | 27 | public: |
34825e2b | 28 | AliGenParam(); |
f2c13e03 | 29 | AliGenParam(Int_t npart, const AliGenLib * Library, Int_t param, const char* tname = 0); |
4725e0d2 | 30 | AliGenParam(Int_t npart, Int_t param, const char* tname = 0, const char* name = 0); |
34f60c01 | 31 | AliGenParam(Int_t npart, Int_t param, |
75e0cc59 | 32 | Double_t (*PtPara)(const Double_t*, const Double_t*), |
33 | Double_t (*YPara )(const Double_t*, const Double_t*), | |
6078e216 | 34 | Double_t (*V2Para)(const Double_t*, const Double_t*), |
65fb704d | 35 | Int_t (*IpPara)(TRandom*) ); |
f87cfe57 | 36 | |
34825e2b | 37 | virtual ~AliGenParam(); |
d5615b85 | 38 | virtual void GenerateN(Int_t ntimes); |
34825e2b | 39 | virtual void Generate(); |
40 | virtual void Init(); | |
41 | // select particle type | |
34f60c01 | 42 | virtual void SetParam(Int_t param) {fParam = param;} |
18e09c20 | 43 | //Setting the flag for Background transportation while using SetForceDecay() |
44 | void SetSelectAll(Bool_t selectall) {fSelectAll = selectall;} | |
34825e2b | 45 | // force decay type |
34f60c01 | 46 | virtual void SetWeighting(Weighting_t flag = kAnalog) {fAnalog = flag;} |
34f60c01 | 47 | virtual void SetDeltaPt(Float_t delta=0.01) {fDeltaPt = delta;} |
a595093b | 48 | virtual void SetDecayer(AliDecayer* decayer) {fDecayer = decayer;} |
4ae1c9f0 | 49 | virtual void SetForceGammaConversion(Bool_t force=kTRUE) {fForceConv = force;} |
dc1d768c | 50 | virtual void Draw(const char * opt); |
2ad38d56 | 51 | TF1 * GetPt() { return fPtPara;} |
52 | TF1 * GetY() {return fYPara;} | |
53 | Float_t GetRelativeArea(Float_t ptMin, Float_t ptMax, Float_t yMin, Float_t yMax, Float_t phiMin, Float_t phiMax); | |
54 | ||
4ae1c9f0 | 55 | static TVector3 OrthogonalVector(TVector3 &inVec); |
71443190 | 56 | static void RotateVector(Double_t *pin, Double_t *pout, Double_t costheta, Double_t sintheta, |
57 | Double_t cosphi, Double_t sinphi); | |
71443190 | 58 | static double ScreenFunction1(double d); |
59 | static double ScreenFunction2(double d); | |
60 | double RandomEnergyFraction(double Z, double E); | |
61 | double RandomPolarAngle(); | |
62 | double RandomMass(Double_t mh); | |
63 | Int_t VirtualGammaPairProduction(TClonesArray *particles, Int_t nPart); | |
4ae1c9f0 | 64 | Int_t ForceGammaConversion(TClonesArray *particles, Int_t nPart); |
65 | ||
6078e216 | 66 | protected: |
75e0cc59 | 67 | Double_t (*fPtParaFunc)(const Double_t*, const Double_t*); //! Pointer to Pt parametrisation function |
68 | Double_t (*fYParaFunc )(const Double_t*, const Double_t*); //! Pointer to Y parametrisation function | |
65fb704d | 69 | Int_t (*fIpParaFunc )(TRandom*); //! Pointer to particle type parametrisation function |
6078e216 | 70 | Double_t (*fV2ParaFunc )(const Double_t*, const Double_t*);//! Pointer to V2 parametrisation function |
c5c3e4b0 | 71 | TF1* fPtPara; // Transverse momentum parameterisation |
72 | TF1* fYPara; // Rapidity parameterisation | |
6078e216 | 73 | TF1* fV2Para; // v2 parametrization |
74 | TF1* fdNdPhi; // Phi distribution depending on v2 | |
34f60c01 | 75 | Int_t fParam; // Parameterisation type |
4d9d5cbd | 76 | Float_t fdNdy0; // central multiplicity per event |
77 | Float_t fYWgt; // Y-weight | |
78 | Float_t fPtWgt; // Pt-weight | |
4d9d5cbd | 79 | Float_t fBias; // Biasing factor |
80 | Int_t fTrials; // Number of trials | |
34825e2b | 81 | Float_t fDeltaPt; // pT sampling in steps of fDeltaPt |
18e09c20 | 82 | Bool_t fSelectAll; // Flag for transportation of Background while using SetForceDecay() |
6c24ee7c | 83 | AliDecayer *fDecayer; // ! Pointer to pythia object for decays |
4ae1c9f0 | 84 | Bool_t fForceConv; // |
93a2041b | 85 | |
6078e216 | 86 | private: |
93a2041b | 87 | AliGenParam(const AliGenParam &Param); |
88 | AliGenParam & operator=(const AliGenParam & rhs); | |
89 | ||
18e09c20 | 90 | ClassDef(AliGenParam, 2) // Generator using parameterised pt- and y-distribution |
fe4da5cc | 91 | }; |
92 | #endif | |
93 | ||
94 | ||
95 | ||
96 | ||
97 | ||
98 | ||
99 | ||
100 | ||
101 | ||
102 |