3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
9 // Class to generate particles from using paramtrized pT and y distributions.
10 // Distributions are obtained from pointer to object of type AliGenLib.
11 // (For example AliGenMUONlib)
13 // andreas.morsch@cern.ch
23 typedef enum { kAnalog, kNonAnalog} Weighting_t;
24 //-------------------------------------------------------------
25 class AliGenParam : public AliGenMC
29 AliGenParam(Int_t npart, AliGenLib * Library, Int_t param, char* tname = 0);
30 AliGenParam(Int_t npart, Int_t param, char* tname = 0);
31 AliGenParam(Int_t npart, Int_t param,
32 Double_t (*PtPara)(Double_t*, Double_t*),
33 Double_t (*YPara )(Double_t*, Double_t*),
34 Int_t (*IpPara)(TRandom*) );
35 AliGenParam(const AliGenParam &Param);
37 virtual ~AliGenParam();
38 virtual void Generate();
40 // select particle type
41 virtual void SetParam(Int_t param) {fParam = param;}
43 virtual void SetWeighting(Weighting_t flag = kAnalog) {fAnalog = flag;}
44 virtual void SetDeltaPt(Float_t delta=0.01) {fDeltaPt = delta;}
46 AliGenParam & operator=(const AliGenParam & rhs);
48 Double_t (*fPtParaFunc)(Double_t*, Double_t*); //! Pointer to Pt parametrisation function
49 Double_t (*fYParaFunc )(Double_t*, Double_t*); //! Pointer to Y parametrisation function
50 Int_t (*fIpParaFunc )(TRandom*); //! Pointer to particle type parametrisation function
51 TF1* fPtPara; // Transverse momentum parameterisation
52 TF1* fYPara; // Rapidity parameterisation
53 Int_t fParam; // Parameterisation type
54 Float_t fdNdy0; // central multiplicity per event
55 Float_t fYWgt; // Y-weight
56 Float_t fPtWgt; // Pt-weight
57 Float_t fBias; // Biasing factor
58 Int_t fTrials; // Number of trials
59 Float_t fDeltaPt; // pT sampling in steps of fDeltaPt
60 AliDecayer *fDecayer; // ! Pointer to pythia object for decays
61 ClassDef(AliGenParam,1) // Generator using parameterised pt- and y-distribution