PWGJE
[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
ccc5bf38 18#include "AliGenerator.h"
19class TF3;
20
21class AliGenFunction : public AliGenerator
22{
23public:
24
25 AliGenFunction();
21eff5bc 26 AliGenFunction(const AliGenFunction& func);
27 AliGenFunction &operator=(const AliGenFunction& func);
ccc5bf38 28 virtual ~AliGenFunction() {}
29 virtual void Generate();
30 virtual void Init();
31 void SetFunctions(TF1 * momentum, TF1 *fphi, TF1 *ftheta, TF3 * position, TF1* pdg);
32 void SetCylinder(Double_t refR, Double_t zmin, Double_t zmax);
33 void SetBkG(Float_t b) { fBkG=b; return; }
34private:
35 Bool_t IntersectCylinder(Float_t r,Float_t zmin, Float_t zmax,Int_t pdg,
36 Float_t o[3],Float_t p[3]) const;
37
38 Float_t fBkG; // field in kGauss
39 TF1 * fFMomentum; // momentum distribution function
40 TF1 * fFPhi; // phi distribution function
21eff5bc 41 TF1 * fFTheta; // theta distribution function
ccc5bf38 42 TF3 * fFPosition; // position distribution function
43 TF1 * fFPdg; // pdg distribution function
44 //
45 Double_t fRefRadius; // reference radius to be crossed
46 Double_t fZmin; // minimal z at reference radius
47 Double_t fZmax; // maximal z at reference radius
48 Int_t fMaxTrial; // maximal number of attempts
49 //
50 ClassDef(AliGenFunction,1) // parametrized cosmics generator
51};
52
53#endif