]>
Commit | Line | Data |
---|---|---|
b86e74f5 | 1 | #ifndef ALIGENACORDE_H |
2 | #define ALIGENACORDE_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 | ||
8 | #include "AliGenerator.h" | |
9 | #include "AliACORDEConstants.h" | |
10 | ||
11 | class TClonesArray; | |
12 | class TF1; | |
13 | ||
14 | class AliGenACORDE : public AliGenerator { | |
15 | public: | |
16 | AliGenACORDE(); | |
17 | AliGenACORDE(Int_t npart); | |
b86e74f5 | 18 | virtual ~AliGenACORDE(); |
19 | ||
b86e74f5 | 20 | virtual void Init(); |
21 | virtual void Generate(); | |
22 | virtual void SetPart(Int_t part) {fIpart = part;} | |
23 | ||
24 | void SetMode(ECRMode mode) {fCRMode = mode;} | |
25 | const TString* GetMode() const {return fCRModeName;} | |
26 | ||
27 | void SetZenithalAngleRange(Float_t min,Float_t max=0) {fZenithMin=min;fZenithMax=max;} | |
28 | void SetAzimuthalAngleRange(Float_t min, Float_t max=0) {fAzimuthMin=min;fAzimuthMax=max;} | |
29 | ||
30 | void SetGridRange(Int_t nx,Float_t xwidth, Int_t nz, Float_t zwidth); | |
31 | Float_t GetMomentumResolution() const {return fPResolution;} | |
32 | ||
33 | void SetMomentumDistrubutionFunction(TF1 *func) {fMomentumDist=func;} | |
34 | void SetZenithalDistributionFunction(TF1 *func) {fZenithDist = func;} | |
35 | void SetMomentumResolution(Float_t res=1.) {fPResolution=res;} | |
36 | ||
37 | Float_t GetMomentum() const; | |
38 | Float_t GetZenithAngle(Float_t mom) const; | |
39 | ||
40 | // The following methods are for testing pourpuses | |
41 | TF1* GetMomentumDistibution() const {return fMomentumDist;} | |
42 | TF1* GetUnfoldedDistribution() const {return fUnfoldedMomentumDist;} | |
43 | ||
44 | TClonesArray* GetArray() const {return fPDist;} | |
45 | ||
46 | protected: | |
47 | void InitApWeightFactors(); | |
48 | void InitMomentumGeneration(); | |
49 | void InitZenithalAngleGeneration(); | |
50 | void GenerateOneMuonBundle(); | |
51 | void GenerateOneSingleMuon(Bool_t withFlatMomentum=kFALSE); | |
52 | ||
53 | private: | |
93a2041b | 54 | AliGenACORDE(const AliGenACORDE& gen); |
55 | AliGenACORDE& operator= (const AliGenACORDE& gen); | |
56 | ||
b86e74f5 | 57 | Int_t fIpart; //! Particle type. |
58 | ECRMode fCRMode; //! Cosmic muons generation method flag | |
59 | TString* fCRModeName; //! Cosmic muons generation mode name | |
60 | ||
61 | Float_t fXwidth; //! X width of the grid | |
62 | Int_t fNx; //! Number of divisions in x | |
63 | Float_t fZwidth; //! Z widht of the grid | |
64 | Int_t fNz; //! Number of divisions in z | |
65 | Bool_t fMuonGrid; //! Flag for method (Muon-bundles) checkout | |
66 | ||
67 | Float_t fZenithMin; //! Minimum zenithal angle. | |
68 | Float_t fZenithMax; //! Maximum zenithal angle. | |
69 | ||
70 | Float_t fAzimuthMin; //! Minimum azimuthal angle. | |
71 | Float_t fAzimuthMax; //! Maximum azimuthal angle. | |
72 | ||
73 | Float_t fPRange; //! Cosmic muon momentum range width in GeVs. | |
74 | Float_t fPResolution; //! Momentum resolution in GeVs. | |
75 | ||
76 | TArrayF* fAp; //! a(p) correction factors for the ang. dist. | |
77 | ||
78 | TF1* fMomentumDist; //! Function to generate the momentum dist. | |
79 | TF1* fUnfoldedMomentumDist; //! | |
80 | TF1* fZenithDist; //! Function to generate the zenith angle dist. | |
81 | ||
82 | TClonesArray* fPDist; //! Array of fZenithDist, to be used by a(p). | |
83 | ||
84 | ClassDef(AliGenACORDE, 1) // Generator for AliACORDE class | |
85 | }; | |
2814d35e | 86 | |
87 | typedef AliGenACORDE AliGenCRT; // for backward compatibility | |
88 | ||
b86e74f5 | 89 | #endif // ALIGENACORDE_H |