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