]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDsim.h
Provides digitization
[u/mrichter/AliRoot.git] / TRD / AliTRDsim.h
CommitLineData
46d29e70 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
0a29d0f1 8///////////////////////////////////////////////////////////////////////////////
9// //
10// TRD simulation - multimodule (regular rad.) //
11// //
12///////////////////////////////////////////////////////////////////////////////
13
46d29e70 14#include <TObject.h>
15
16class TH1D;
17
18class AliModule;
19
20class 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);
842287f2 74 virtual Double_t GetMuAi(Double_t energyMeV);
75
76 Int_t GetNFoils() const { return fNFoils; };
77 Float_t GetFoilThick() const { return fFoilThick; };
78 Float_t GetGapThick() const { return fGapThick; };
79 Float_t GetFoilDens() const { return fFoilDens; };
80 Float_t GetGapDens() const { return fGapDens; };
81 Double_t GetFoilOmega() const { return fFoilOmega; };
82 Double_t GetGapOmega() const { return fGapOmega; };
83 Float_t GetTemp() const { return fTemp / 273.16; };
84 TH1D *GetSpectrum() const { return fSpectrum; };
46d29e70 85
86 protected:
87
88 Int_t fNFoils; // Number of foils in the radiator stack
89 Float_t fFoilThick; // Thickness of the foils (cm)
90 Float_t fGapThick; // Thickness of the gaps between the foils (cm)
91
92 Float_t fFoilDens; // Density of the radiator foils (g/cm^3)
93 Float_t fGapDens; // Density of the gas in the radiator gaps (g/cm^3)
94
95 Double_t fFoilOmega; // Plasma frequency of the radiator foils
96 Double_t fGapOmega; // Plasma frequency of the gas in the radiator gaps
97
98 Float_t fFoilZ; // Z of the foil material
99 Float_t fGapZ; // Z of the gas in the gaps
100
101 Float_t fFoilA; // A of the foil material
102 Float_t fGapA; // A of the gas in the gaps
103
104 Float_t fTemp; // Temperature of the radiator gas (Kelvin)
105
106 Int_t fSpNBins; // Number of bins of the TR spectrum
107 Float_t fSpRange; // Range of the TR spectrum
108 Float_t fSpBinWidth; // Bin width of the TR spectrum
109 Float_t fSpLower; // Lower border of the TR spectrum
110 Float_t fSpUpper; // Upper border of the TR spectrum
111
d1b06c24 112 Double_t *fSigma; //[fSpNBins] Array of sigma values
46d29e70 113
a2b90f83 114 TH1D *fSpectrum; //!TR photon energy spectrum
46d29e70 115
116 ClassDef(AliTRDsim,1) // Simulates TR photons
117
118};
119#endif