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