]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDsim.h
Removing semaphore .done files.
[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) const;
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(Float_t p, Float_t mass
35                            , Int_t &nPhoton, Float_t *ePhoton);
36   virtual Double_t Sigma(Double_t energykeV);
37   virtual Double_t Interpolate(Double_t energyMeV
38                              , Double_t *en, Double_t *mu, Int_t n);
39   virtual Int_t    Locate(Double_t *xv, Int_t n, Double_t xval
40                         , Int_t &kl, Double_t &dx);
41   virtual Double_t Omega(Float_t rho, Float_t z, Float_t a)  { return (28.8 * TMath::Sqrt(rho * z / a)); };
42   virtual Int_t    SelectNFoils(Float_t p);
43
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   virtual Double_t GetMuAi(Double_t energyMeV);
75
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 / 273.16; };
83           TH1D    *GetSpectrum() const                       { return fSpectrum;      };
84
85  protected:
86
87           Int_t     fNFoilsDim;            //  Dimension of the NFoils array
88           Int_t    *fNFoils;               //[fNFoilsDim] Number of foils in the radiator stack
89           Double_t *fNFoilsUp;             //[fNFoilsDim] Upper momenta for a given number of foils
90           Float_t   fFoilThick;            //  Thickness of the foils (cm)
91           Float_t   fGapThick;             //  Thickness of the gaps between the foils (cm)
92
93           Float_t   fFoilDens;             //  Density of the radiator foils (g/cm^3) 
94           Float_t   fGapDens;              //  Density of the gas in the radiator gaps (g/cm^3)
95
96           Double_t  fFoilOmega;            //  Plasma frequency of the radiator foils
97           Double_t  fGapOmega;             //  Plasma frequency of the gas in the radiator gaps
98
99           Float_t   fFoilZ;                //  Z of the foil material
100           Float_t   fGapZ;                 //  Z of the gas in the gaps
101
102           Float_t   fFoilA;                //  A of the foil material
103           Float_t   fGapA;                 //  A of the gas in the gaps
104
105           Float_t   fTemp;                 //  Temperature of the radiator gas (Kelvin)
106
107           Int_t     fSpNBins;              //  Number of bins of the TR spectrum
108           Float_t   fSpRange;              //  Range of the TR spectrum
109           Float_t   fSpBinWidth;           //  Bin width of the TR spectrum
110           Float_t   fSpLower;              //  Lower border of the TR spectrum
111           Float_t   fSpUpper;              //  Upper border of the TR spectrum
112
113           Double_t *fSigma;                //[fSpNBins] Array of sigma values
114
115           TH1D     *fSpectrum;             //! TR photon energy spectrum
116
117   ClassDef(AliTRDsim,2)                    //  Simulates TR photons
118
119 };
120 #endif