]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVGEN/AliGenFixed.h
No TF1/TF2 objects with the same name allowed in Root v3-10-01a
[u/mrichter/AliRoot.git] / EVGEN / AliGenFixed.h
CommitLineData
790bbabf 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
675e9664 8// Simple particle gun.
0af12c00 9// Momentum, phi and theta of the particle as well as the particle type can be set.
675e9664 10// andreas.morsch@cern.ch
11
12
790bbabf 13#include "AliGenerator.h"
14
15class 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 SetSigma(Float_t sx, Float_t sy, Float_t sz);
0ef961ca 24 virtual void SetMomentum(Float_t pmom) {fPMin=pmom; fPMax=pmom; SetBit(kMomentumRange);}
25 virtual void SetPhi(Float_t phi) {fPhiMin=phi*TMath::Pi()/180; fPhiMax=phi*TMath::Pi()/180; SetBit(kPhiRange);}
26 virtual void SetTheta(Float_t theta) {fThetaMin=theta*TMath::Pi()/180; fThetaMax=theta*TMath::Pi()/180; SetBit(kThetaRange);}
790bbabf 27 virtual void SetPart(Int_t part) {fIpart=part;}
f1f30542 28 virtual void SetGun(Double_t px, Double_t py, Double_t pz, Double_t x,
29 Double_t y, Double_t z) {fP[0]=px;fP[1]=py;fP[2]=pz;fOrigin[0]=x;fOrigin[1]=y;
30 fOrigin[2]=z;fExplicit=kTRUE;}
790bbabf 31
32protected:
33
0af12c00 34 Int_t fIpart; // Particle type
35 Int_t fExplicit; // True if momentum vector has been set by user.
36 Float_t fP[3]; // Momentum vector
790bbabf 37
38 ClassDef(AliGenFixed,1) // Single particle generator
39};
40#endif