]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIGENFIXED_H | |
2 | #define ALIGENFIXED_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | // Simple particle gun. | |
9 | // Momentum, phi and theta of the particle as well as the particle type can be set. | |
10 | // andreas.morsch@cern.ch | |
11 | ||
12 | ||
13 | #include "AliGenerator.h" | |
14 | ||
15 | class AliGenFixed : public AliGenerator | |
16 | { | |
17 | public: | |
18 | AliGenFixed(); | |
19 | AliGenFixed(Int_t npart); | |
20 | virtual ~AliGenFixed() {} | |
21 | virtual void Generate(); | |
22 | virtual void Init() {} | |
23 | virtual void SetMomentum(Float_t pmom) {fPMin=pmom; fPMax=pmom; SetBit(kMomentumRange);} | |
24 | virtual void SetPhi(Float_t phi) {fPhiMin=phi*TMath::Pi()/180; fPhiMax=phi*TMath::Pi()/180; SetBit(kPhiRange);} | |
25 | virtual void SetTheta(Float_t theta) {fThetaMin=theta*TMath::Pi()/180; fThetaMax=theta*TMath::Pi()/180; SetBit(kThetaRange);} | |
26 | virtual void SetPart(Int_t part) {fIpart=part;} | |
27 | virtual void SetGun(Double_t px, Double_t py, Double_t pz, Double_t x, | |
28 | Double_t y, Double_t z) {fP[0]=px;fP[1]=py;fP[2]=pz;fOrigin[0]=x;fOrigin[1]=y; | |
29 | fOrigin[2]=z;fExplicit=kTRUE;} | |
30 | ||
31 | protected: | |
32 | ||
33 | Int_t fIpart; // Particle type | |
34 | Int_t fExplicit; // True if momentum vector has been set by user. | |
35 | Float_t fP[3]; // Momentum vector | |
36 | ||
37 | ClassDef(AliGenFixed,1) // Single particle generator | |
38 | }; | |
39 | #endif |