Update timestamps for new AMANDA simulation (17/02/2015)
[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() {}
0ef961ca 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);}
790bbabf 26 virtual void SetPart(Int_t part) {fIpart=part;}
f1f30542 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;}
790bbabf 30
31protected:
32
0af12c00 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
790bbabf 36
37 ClassDef(AliGenFixed,1) // Single particle generator
38};
39#endif