3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 #include "AliGenerator.h"
9 #include "AliACORDEConstants.h"
14 class AliGenACORDE : public AliGenerator {
17 AliGenACORDE(Int_t npart);
18 virtual ~AliGenACORDE();
21 virtual void Generate();
22 virtual void SetPart(Int_t part) {fIpart = part;}
24 void SetMode(ECRMode mode) {fCRMode = mode;}
25 const TString* GetMode() const {return fCRModeName;}
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;}
30 void SetGridRange(Int_t nx,Float_t xwidth, Int_t nz, Float_t zwidth);
31 Float_t GetMomentumResolution() const {return fPResolution;}
33 void SetMomentumDistrubutionFunction(TF1 *func) {fMomentumDist=func;}
34 void SetZenithalDistributionFunction(TF1 *func) {fZenithDist = func;}
35 void SetMomentumResolution(Float_t res=1.) {fPResolution=res;}
37 Float_t GetMomentum() const;
38 Float_t GetZenithAngle(Float_t mom) const;
41 void SetNumberOfParticles(Int_t nParticles) {fNParticles = nParticles;}
43 // The following methods are for testing pourpuses
44 TF1* GetMomentumDistibution() const {return fMomentumDist;}
45 TF1* GetUnfoldedDistribution() const {return fUnfoldedMomentumDist;}
47 TClonesArray* GetArray() const {return fPDist;}
50 void InitApWeightFactors();
51 void InitMomentumGeneration();
52 void InitZenithalAngleGeneration();
53 void GenerateOneMuonBundle();
54 void GenerateOneSingleMuon(Bool_t withFlatMomentum=kFALSE);
57 AliGenACORDE(const AliGenACORDE& gen);
58 AliGenACORDE& operator= (const AliGenACORDE& gen);
60 Int_t fIpart; //! Particle type.
61 ECRMode fCRMode; //! Cosmic muons generation method flag
62 TString* fCRModeName; //! Cosmic muons generation mode name
64 Float_t fXwidth; //! X width of the grid
65 Int_t fNx; //! Number of divisions in x
66 Float_t fZwidth; //! Z widht of the grid
67 Int_t fNz; //! Number of divisions in z
68 Bool_t fMuonGrid; //! Flag for method (Muon-bundles) checkout
70 Float_t fZenithMin; //! Minimum zenithal angle.
71 Float_t fZenithMax; //! Maximum zenithal angle.
73 Float_t fAzimuthMin; //! Minimum azimuthal angle.
74 Float_t fAzimuthMax; //! Maximum azimuthal angle.
76 Float_t fPRange; //! Cosmic muon momentum range width in GeVs.
77 Float_t fPResolution; //! Momentum resolution in GeVs.
79 TArrayF* fAp; //! a(p) correction factors for the ang. dist.
81 TF1* fMomentumDist; //! Function to generate the momentum dist.
82 TF1* fUnfoldedMomentumDist; //!
83 TF1* fZenithDist; //! Function to generate the zenith angle dist.
85 TClonesArray* fPDist; //! Array of fZenithDist, to be used by a(p).
87 Int_t fNParticles; //! Fixed number of particles per event
89 ClassDef(AliGenACORDE, 1) // Generator for AliACORDE class
92 typedef AliGenACORDE AliGenCRT; // for backward compatibility
94 #endif // ALIGENACORDE_H