]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDsim.h
New version of SPD raw-data reconstruction. The format now correponds to the actual...
[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
3bc9d03e 8////////////////////////////////////////////////////////////////////////////
9// //
10// TRD simulation - multimodule (regular rad.) //
11// //
12////////////////////////////////////////////////////////////////////////////
0a29d0f1 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
3bc9d03e 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; };
46d29e70 84
85 protected:
86
3bc9d03e 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)
46d29e70 92
3bc9d03e 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)
46d29e70 95
3bc9d03e 96 Double_t fFoilOmega; // Plasma frequency of the radiator foils
97 Double_t fGapOmega; // Plasma frequency of the gas in the radiator gaps
46d29e70 98
3bc9d03e 99 Float_t fFoilZ; // Z of the foil material
100 Float_t fGapZ; // Z of the gas in the gaps
46d29e70 101
3bc9d03e 102 Float_t fFoilA; // A of the foil material
103 Float_t fGapA; // A of the gas in the gaps
46d29e70 104
3bc9d03e 105 Float_t fTemp; // Temperature of the radiator gas (Kelvin)
46d29e70 106
3bc9d03e 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
46d29e70 112
3bc9d03e 113 Double_t *fSigma; //[fSpNBins] Array of sigma values
46d29e70 114
3bc9d03e 115 TH1D *fSpectrum; //! TR photon energy spectrum
46d29e70 116
3bc9d03e 117 ClassDef(AliTRDsim,2) // Simulates TR photons
46d29e70 118
119};
120#endif