]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDsim.h
Changed timebin 0 to be the one closest to the readout
[u/mrichter/AliRoot.git] / TRD / AliTRDsim.h
1 #ifndef ALITRDSIM_H
2 #define ALITRDSIM_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 <TObject.h>
9
10 class TH1D;
11
12 class AliModule;
13
14 class AliTRDsim : public TObject {
15
16  public:
17
18   AliTRDsim();
19   AliTRDsim(const AliTRDsim &s);
20   AliTRDsim(AliModule *mod, Int_t foil, Int_t gap);
21   virtual ~AliTRDsim();
22   AliTRDsim &operator=(const AliTRDsim &s);
23
24   virtual void          Copy(TObject &s);
25   virtual void          Init();
26   virtual Int_t         CreatePhotons(Int_t pdg, Float_t p
27                                     , Int_t &nPhoton, Float_t *ePhoton);
28   virtual Int_t         TrPhotons(Double_t gamma, Int_t &nPhoton, Float_t *ePhoton);
29   virtual Double_t      Sigma(Double_t energykeV);
30   virtual Double_t      Interpolate(Double_t energyMeV
31                                   , Double_t *en, Double_t *mu, Int_t n);
32   virtual Int_t         Locate(Double_t *xv, Int_t n, Double_t xval
33                              , Int_t &kl, Double_t &dx);
34   virtual Double_t      Omega(Float_t rho, Float_t z, Float_t a) 
35                              { return (28.8 * TMath::Sqrt(rho * z / a)); };
36
37           void          SetNFoils(Int_t n)      { fNFoils    = n;       };
38           void          SetFoilThick(Float_t t) { fFoilThick = t;
39                            SetSigma();                                  };
40           void          SetGapThick(Float_t t)  { fGapThick  = t;
41                            SetSigma();                                  };
42           void          SetFoilDens(Float_t d)  { fFoilDens  = d; 
43                            fFoilOmega = Omega(fFoilDens,fFoilZ,fFoilA);
44                            SetSigma();                                  };
45           void          SetFoilZ(Float_t z)     { fFoilZ     = z; 
46                            fFoilOmega = Omega(fFoilDens,fFoilZ,fFoilA); };
47           void          SetFoilA(Float_t a)     { fFoilA     = a; 
48                            fFoilOmega = Omega(fFoilDens,fFoilZ,fFoilA); };
49           void          SetGapDens(Float_t d)   { fGapDens   = d;
50                            fGapOmega  = Omega(fGapDens ,fGapZ ,fGapA );
51                            SetSigma();                                  };
52           void          SetGapZ(Float_t z)      { fGapZ      = z;
53                            fGapOmega  = Omega(fGapDens ,fGapZ ,fGapA ); };
54           void          SetGapA(Float_t a)      { fGapA      = a;
55                            fGapOmega  = Omega(fGapDens ,fGapZ ,fGapA ); };
56           void          SetTemp(Float_t t)      { fTemp      = t; 
57                            SetSigma();                                  };
58           void          SetSigma();
59
60   virtual Double_t      GetMuPo(Double_t energyMeV);
61   virtual Double_t      GetMuCO(Double_t energyMeV);
62   virtual Double_t      GetMuXe(Double_t energyMeV);
63   virtual Double_t      GetMuBu(Double_t energyMeV);
64   virtual Double_t      GetMuMy(Double_t energyMeV);
65   virtual Double_t      GetMuN2(Double_t energyMeV);
66   virtual Double_t      GetMuO2(Double_t energyMeV);
67   virtual Double_t      GetMuHe(Double_t energyMeV);
68
69           Int_t         GetNFoils() const       { return fNFoils;    };
70           Float_t       GetFoilThick() const    { return fFoilThick; };
71           Float_t       GetGapThick() const     { return fGapThick;  };
72           Float_t       GetFoilDens() const     { return fFoilDens;  };
73           Float_t       GetGapDens() const      { return fGapDens;   };
74           Double_t      GetFoilOmega() const    { return fFoilOmega; };
75           Double_t      GetGapOmega() const     { return fGapOmega;  };
76           Float_t       GetTemp() const         { return fTemp;      };
77           TH1D         *GetSpectrum() const     { return fSpectrum;  };
78
79  protected:
80
81   Int_t     fNFoils;               // Number of foils in the radiator stack
82   Float_t   fFoilThick;            // Thickness of the foils (cm)
83   Float_t   fGapThick;             // Thickness of the gaps between the foils (cm)
84
85   Float_t   fFoilDens;             // Density of the radiator foils (g/cm^3) 
86   Float_t   fGapDens;              // Density of the gas in the radiator gaps (g/cm^3)
87
88   Double_t  fFoilOmega;            // Plasma frequency of the radiator foils
89   Double_t  fGapOmega;             // Plasma frequency of the gas in the radiator gaps
90
91   Float_t   fFoilZ;                // Z of the foil material
92   Float_t   fGapZ;                 // Z of the gas in the gaps
93
94   Float_t   fFoilA;                // A of the foil material
95   Float_t   fGapA;                 // A of the gas in the gaps
96
97   Float_t   fTemp;                 // Temperature of the radiator gas (Kelvin)
98
99   Int_t     fSpNBins;              // Number of bins of the TR spectrum
100   Float_t   fSpRange;              // Range of the TR spectrum
101   Float_t   fSpBinWidth;           // Bin width of the TR spectrum
102   Float_t   fSpLower;              // Lower border of the TR spectrum
103   Float_t   fSpUpper;              // Upper border of the TR spectrum
104
105   Double_t *fSigma;                // Array of sigma values
106
107   TH1D     *fSpectrum;             // TR photon energy spectrum
108
109   ClassDef(AliTRDsim,1)            // Simulates TR photons
110
111 };
112 #endif