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