Adding histos for the LEGO train
[u/mrichter/AliRoot.git] / EVGEN / AliGenParam.h
CommitLineData
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
18class AliPythia;
19class TParticle;
b22ee262 20class AliGenLib;
f87cfe57 21class TF1;
22
34f60c01 23typedef enum { kAnalog, kNonAnalog} Weighting_t;
fe4da5cc 24//-------------------------------------------------------------
fff02fee 25class AliGenParam : public AliGenMC
fe4da5cc 26{
34825e2b 27 public:
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*),
65fb704d 34 Int_t (*IpPara)(TRandom*) );
f87cfe57 35
34825e2b 36 virtual ~AliGenParam();
37 virtual void Generate();
38 virtual void Init();
39 // select particle type
34f60c01 40 virtual void SetParam(Int_t param) {fParam = param;}
18e09c20 41 //Setting the flag for Background transportation while using SetForceDecay()
42 void SetSelectAll(Bool_t selectall) {fSelectAll = selectall;}
34825e2b 43 // force decay type
34f60c01 44 virtual void SetWeighting(Weighting_t flag = kAnalog) {fAnalog = flag;}
34f60c01 45 virtual void SetDeltaPt(Float_t delta=0.01) {fDeltaPt = delta;}
a595093b 46 virtual void SetDecayer(AliDecayer* decayer) {fDecayer = decayer;}
dc1d768c 47 virtual void Draw(const char * opt);
2ad38d56 48 TF1 * GetPt() { return fPtPara;}
49 TF1 * GetY() {return fYPara;}
50 Float_t GetRelativeArea(Float_t ptMin, Float_t ptMax, Float_t yMin, Float_t yMax, Float_t phiMin, Float_t phiMax);
51
34825e2b 52 protected:
75e0cc59 53 Double_t (*fPtParaFunc)(const Double_t*, const Double_t*); //! Pointer to Pt parametrisation function
54 Double_t (*fYParaFunc )(const Double_t*, const Double_t*); //! Pointer to Y parametrisation function
65fb704d 55 Int_t (*fIpParaFunc )(TRandom*); //! Pointer to particle type parametrisation function
c5c3e4b0 56 TF1* fPtPara; // Transverse momentum parameterisation
57 TF1* fYPara; // Rapidity parameterisation
34f60c01 58 Int_t fParam; // Parameterisation type
4d9d5cbd 59 Float_t fdNdy0; // central multiplicity per event
60 Float_t fYWgt; // Y-weight
61 Float_t fPtWgt; // Pt-weight
4d9d5cbd 62 Float_t fBias; // Biasing factor
63 Int_t fTrials; // Number of trials
34825e2b 64 Float_t fDeltaPt; // pT sampling in steps of fDeltaPt
18e09c20 65 Bool_t fSelectAll; // Flag for transportation of Background while using SetForceDecay()
6c24ee7c 66 AliDecayer *fDecayer; // ! Pointer to pythia object for decays
93a2041b 67
68 private:
69 AliGenParam(const AliGenParam &Param);
70 AliGenParam & operator=(const AliGenParam & rhs);
71
18e09c20 72 ClassDef(AliGenParam, 2) // Generator using parameterised pt- and y-distribution
fe4da5cc 73};
74#endif
75
76
77
78
79
80
81
82
83
84