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