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