Event generator configurable using TF objects for theta, phi, p and vertex. (M. Ivano...
[u/mrichter/AliRoot.git] / EVGEN / AliGenFunction.h
CommitLineData
ccc5bf38 1#ifndef ALIGENFUNCTION_H
2#define ALIGENFUNCTION_H
3/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5// Generator for particles according generic functions
6//
7// TF1 * fFMomentum; // momentum distribution function inGeV
8// TF1 * fFPhi; // phi distribution function in rad
9// TF1 * fFTheta; // theta distribution function in rad
10// TF3 * fFPosition; // position distribution function in cm
11// TF1 * fFPdg; // pdg distribution function
12// We assume that the moment, postion and PDG code of particles are independent
13// Only tracks/particle crossing the reference radius at given z range
14//
15// Origin: marian.ivanov@cern.ch
16
17
18#include "AliLog.h"
19#include "AliGenerator.h"
20class TF3;
21
22class AliGenFunction : public AliGenerator
23{
24public:
25
26 AliGenFunction();
27 virtual ~AliGenFunction() {}
28 virtual void Generate();
29 virtual void Init();
30 void SetFunctions(TF1 * momentum, TF1 *fphi, TF1 *ftheta, TF3 * position, TF1* pdg);
31 void SetCylinder(Double_t refR, Double_t zmin, Double_t zmax);
32 void SetBkG(Float_t b) { fBkG=b; return; }
33private:
34 Bool_t IntersectCylinder(Float_t r,Float_t zmin, Float_t zmax,Int_t pdg,
35 Float_t o[3],Float_t p[3]) const;
36
37 Float_t fBkG; // field in kGauss
38 TF1 * fFMomentum; // momentum distribution function
39 TF1 * fFPhi; // phi distribution function
40 TF1 * fFTheta; // phi distribution function
41 TF3 * fFPosition; // position distribution function
42 TF1 * fFPdg; // pdg distribution function
43 //
44 Double_t fRefRadius; // reference radius to be crossed
45 Double_t fZmin; // minimal z at reference radius
46 Double_t fZmax; // maximal z at reference radius
47 Int_t fMaxTrial; // maximal number of attempts
48 //
49 ClassDef(AliGenFunction,1) // parametrized cosmics generator
50};
51
52#endif