]>
Commit | Line | Data |
---|---|---|
fe4da5cc | 1 | #ifndef ALIGENERATOR_H |
2 | #define ALIGENERATOR_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 | /////////////////////////////////////////////////////////// |
9 | // // | |
10 | // Class to generate the particles for the MC // | |
11 | // The base class is empty // | |
12 | // // | |
13 | /////////////////////////////////////////////////////////// | |
14 | ||
c9001868 | 15 | #include "TLorentzVector.h" |
fe4da5cc | 16 | #include "TArrayF.h" |
17 | #include "TGenerator.h" | |
65fb704d | 18 | #include "AliRndm.h" |
fe4da5cc | 19 | |
aee8290b | 20 | typedef enum { kNoSmear, kPerEvent, kPerTrack } VertexSmear_t; |
fe4da5cc | 21 | |
65fb704d | 22 | class AliGenerator : public TNamed, public AliRndm |
fe4da5cc | 23 | { |
24 | ||
fe4da5cc | 25 | public: |
26 | AliGenerator(); | |
27 | AliGenerator(Int_t npart); | |
aee8290b | 28 | AliGenerator(const AliGenerator &gen); |
fe4da5cc | 29 | virtual ~AliGenerator(); |
30 | virtual void Init(); | |
ef42d733 | 31 | void Copy(AliGenerator &gen) const; |
94de3818 | 32 | virtual void SetOrigin(Float_t ox, Float_t oy, Float_t oz); |
33 | virtual void SetOrigin(const TLorentzVector &o); | |
34 | virtual void SetSigma(Float_t sx, Float_t sy, Float_t sz); | |
35 | virtual void SetMomentumRange(Float_t pmin=0, Float_t pmax=1.e10); | |
10797936 | 36 | virtual void SetPtRange(Float_t ptmin=0, Float_t ptmax=100); |
94de3818 | 37 | virtual void SetPhiRange(Float_t phimin=-180., Float_t phimax=180); |
38 | virtual void SetYRange(Float_t ymin=-100, Float_t ymax=100); | |
fe4da5cc | 39 | virtual void SetVRange(Float_t vxmin, Float_t vxmax, |
40 | Float_t vymin, Float_t vymax, | |
94de3818 | 41 | Float_t vzmin, Float_t vzmax); |
fe4da5cc | 42 | virtual void SetNumberParticles(Int_t npart=100) {fNpart=npart;} |
94de3818 | 43 | virtual Int_t NumberParticles() const {return fNpart;} |
44 | virtual void SetThetaRange(Float_t thetamin=0, Float_t thetamax=180); | |
fe4da5cc | 45 | virtual void Generate()=0; |
46 | virtual void SetParentWeight(Float_t wgt) {fParentWeight=wgt;} | |
47 | virtual void SetChildWeight(Float_t wgt) {fChildWeight=wgt;} | |
48 | virtual void SetAnalog(Int_t flag=1) {fAnalog=flag;} | |
49 | virtual void SetVertexSmear(VertexSmear_t smear) {fVertexSmear = smear;} | |
4a3ba9d2 | 50 | virtual void SetTrackingFlag(Int_t flag=1) {fTrackIt=flag;} |
51 | ||
fe4da5cc | 52 | virtual void SetMC(TGenerator *theMC) |
53 | {if (!fgMCEvGen) fgMCEvGen =theMC;} | |
c9001868 | 54 | |
ef42d733 | 55 | AliGenerator & operator=(const AliGenerator &gen); |
aee8290b | 56 | |
c9001868 | 57 | // Getters |
58 | ||
94de3818 | 59 | virtual void GetOrigin(Float_t &ox, Float_t &oy, Float_t &oz) const |
60 | {ox=fOrigin.At(0);oy=fOrigin.At(1);oz=fOrigin.At(2);} | |
61 | virtual void GetOrigin(TLorentzVector &o) const | |
62 | {o[0]=fOrigin.At(0);o[1]=fOrigin.At(1);o[2]=fOrigin.At(2);o[3]=0;} | |
c9001868 | 63 | |
aee8290b | 64 | protected: |
65 | static TGenerator* fgMCEvGen; // Pointer to the generator | |
66 | Float_t fThetaMin; //Minimum theta of generation in radians | |
67 | Float_t fThetaMax; //Maximum theta of generation in radians | |
68 | Float_t fPhiMin; //Minimum phi of generation in radians | |
69 | Float_t fPhiMax; //Maximum phi of generation in radians | |
70 | Float_t fPMin; //Minimum momentum of generation in GeV/c | |
71 | Float_t fPMax; //Minimum momentum of generation in GeV/c | |
72 | Float_t fPtMin; //Minimum transverse momentum | |
73 | Float_t fPtMax; //Maximum transverse momentum | |
74 | Float_t fYMin; //Minimum rapidity | |
75 | Float_t fYMax; //Maximum rapidity | |
76 | TArrayF fVMin; //Minimum Decaylength | |
77 | TArrayF fVMax; //Minimum Decaylength | |
78 | Int_t fNpart; //Maximum number of particles per event | |
79 | Float_t fParentWeight; //Parent Weight | |
80 | Float_t fChildWeight; //ChildWeight | |
81 | Int_t fTrackit; // Track the generated final state particle if 1 | |
82 | Int_t fAnalog; //Flaf for anolog or pt-weighted generation | |
83 | // | |
84 | VertexSmear_t fVertexSmear; //Vertex Smearing mode | |
85 | Int_t fTrackIt; // if 1 Track final state particles | |
86 | TArrayF fOrigin; //Origin of event | |
87 | TArrayF fOsigma; //Sigma of the Origin of event | |
88 | ||
89 | enum {kThetaRange=1, kVertexRange=2, kPhiRange=4, kPtRange=8, | |
90 | kYRange=32, kMomentumRange=16}; | |
91 | ||
94de3818 | 92 | ClassDef(AliGenerator,1) // Base class for event generators |
fe4da5cc | 93 | }; |
94 | ||
95 | #endif |