]>
Commit | Line | Data |
---|---|---|
3551db50 | 1 | #ifndef ALITRDSIMPARAM_H |
2 | #define ALITRDSIMPARAM_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
3551db50 | 6 | /* $Id$ */ |
7 | ||
4d18a639 | 8 | //////////////////////////////////////////////////////////////////////////// |
9 | // // | |
10 | // Class containing constant simulation parameters // | |
11 | // // | |
12 | //////////////////////////////////////////////////////////////////////////// | |
13 | ||
3551db50 | 14 | #include "TObject.h" |
15 | ||
4d18a639 | 16 | class AliTRDSimParam : public TObject { |
3551db50 | 17 | |
4d18a639 | 18 | public: |
3551db50 | 19 | |
4d18a639 | 20 | enum { kNplan = 6 |
21 | , kNcham = 5 | |
22 | , kNsect = 18 | |
23 | , kNdet = 540 }; | |
24 | ||
25 | static AliTRDSimParam *Instance(); | |
26 | static void Terminate(); | |
3551db50 | 27 | |
28 | AliTRDSimParam(const AliTRDSimParam &p); | |
29 | AliTRDSimParam &operator=(const AliTRDSimParam &p); | |
4d18a639 | 30 | |
31 | virtual void Copy(TObject &p) const; | |
32 | ||
f2979d08 | 33 | void SetGasGain(Float_t gasgain) { fGasGain = gasgain; } |
34 | void SetNoise(Float_t noise) { fNoise = noise; } | |
35 | void SetChipGain(Float_t chipgain) { fChipGain = chipgain; } | |
36 | void SetADCoutRange(Float_t range) { fADCoutRange = range; } | |
37 | void SetADCinRange(Float_t range) { fADCinRange = range; } | |
38 | void SetADCbaseline(Int_t basel) { fADCbaseline = basel; } | |
39 | void SetDiffusion(Int_t diffOn = 1) { fDiffusionOn = diffOn; } | |
40 | void SetElAttach(Int_t elOn = 1) { fElAttachOn = elOn; } | |
41 | void SetElAttachProp(Float_t prop) { fElAttachProp = prop; } | |
42 | void SetTimeResponse(Int_t trfOn = 1) { fTRFOn = trfOn; ReInit(); } | |
43 | void SetCrossTalk(Int_t ctOn = 1) { fCTOn = ctOn; ReInit(); } | |
44 | void SetPadCoupling(Float_t v) { fPadCoupling = v; } | |
45 | void SetTimeCoupling(Float_t v) { fTimeCoupling = v; } | |
f2979d08 | 46 | void SetTimeStruct(Bool_t tsOn = 1) { fTimeStructOn = tsOn; } |
47 | void SetPadResponse(Int_t prfOn = 1) { fPRFOn = prfOn; } | |
3551db50 | 48 | |
f2979d08 | 49 | Float_t GetGasGain() const { return fGasGain; } |
50 | Float_t GetNoise() const { return fNoise; } | |
51 | Float_t GetChipGain() const { return fChipGain; } | |
52 | Float_t GetADCoutRange() const { return fADCoutRange; } | |
53 | Float_t GetADCinRange() const { return fADCinRange; } | |
54 | Int_t GetADCbaseline() const { return fADCbaseline; } | |
55 | Float_t GetTRFlo() const { return fTRFlo; } | |
56 | Float_t GetTRFhi() const { return fTRFhi; } | |
57 | Float_t GetPadCoupling() const { return fPadCoupling; } | |
58 | Float_t GetTimeCoupling() const { return fTimeCoupling; } | |
f2979d08 | 59 | |
60 | Bool_t DiffusionOn() const { return fDiffusionOn; } | |
61 | Bool_t ElAttachOn() const { return fElAttachOn; } | |
62 | Float_t GetElAttachProp() const { return fElAttachProp; } | |
63 | Bool_t TRFOn() const { return fTRFOn; } | |
64 | Bool_t CTOn() const { return fCTOn; } | |
65 | Bool_t TimeStructOn() const { return fTimeStructOn; } | |
66 | Bool_t PRFOn() const { return fPRFOn; } | |
4d18a639 | 67 | |
68 | Double_t TimeResponse(Double_t time) const; | |
69 | Double_t CrossTalk(Double_t time) const; | |
f2979d08 | 70 | |
a076fc2f | 71 | void ReInit(); |
72 | ||
f2979d08 | 73 | protected: |
4d18a639 | 74 | |
b43a3e17 | 75 | static AliTRDSimParam* fgInstance; // Instance of this class (singleton implementation) |
76 | static Bool_t fgTerminated; // Defines if this class has already been terminated and | |
77 | // therefore does not return instances in GetInstance anymore | |
3551db50 | 78 | |
4d18a639 | 79 | // Digitization parameter |
b43a3e17 | 80 | Float_t fGasGain; // Gas gain |
81 | Float_t fNoise; // Electronics noise | |
82 | Float_t fChipGain; // Electronics gain | |
3551db50 | 83 | |
b43a3e17 | 84 | Float_t fADCoutRange; // ADC output range (number of channels) |
85 | Float_t fADCinRange; // ADC input range (input charge) | |
ecf39416 | 86 | Int_t fADCbaseline; // ADC intrinsic baseline in ADC channel |
3551db50 | 87 | |
b43a3e17 | 88 | Int_t fDiffusionOn; // Switch for the diffusion |
3551db50 | 89 | |
b43a3e17 | 90 | Int_t fElAttachOn; // Switch for the electron attachment |
91 | Float_t fElAttachProp; // Propability for electron attachment (for 1m) | |
3551db50 | 92 | |
b43a3e17 | 93 | Int_t fTRFOn; // Switch for the time response |
94 | Float_t *fTRFsmp; //! Integrated time response | |
95 | Int_t fTRFbin; // Number of bins for the TRF | |
96 | Float_t fTRFlo; // Lower boundary of the TRF | |
97 | Float_t fTRFhi; // Higher boundary of the TRF | |
98 | Float_t fTRFwid; // Bin width of the integrated TRF | |
3551db50 | 99 | |
b43a3e17 | 100 | Int_t fCTOn; // Switch for cross talk |
101 | Float_t *fCTsmp; //! Integrated cross talk | |
3551db50 | 102 | |
b43a3e17 | 103 | Float_t fPadCoupling; // Pad coupling factor |
104 | Float_t fTimeCoupling; // Time coupling factor (image charge of moving ions) | |
105 | Int_t fTimeStructOn; // Switch for cell time structure | |
3551db50 | 106 | |
b43a3e17 | 107 | Int_t fPRFOn; // Switch for the pad response |
f2979d08 | 108 | |
4d18a639 | 109 | private: |
110 | ||
111 | // This is a singleton, constructor is private! | |
3551db50 | 112 | AliTRDSimParam(); |
113 | virtual ~AliTRDSimParam(); | |
114 | ||
4d18a639 | 115 | void Init(); |
4d18a639 | 116 | void SampleTRF(); |
3551db50 | 117 | |
a076fc2f | 118 | ClassDef(AliTRDSimParam,4) // The TRD simulation parameters |
4d18a639 | 119 | |
3551db50 | 120 | }; |
121 | ||
122 | #endif |