]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDSimParam.h
Added a commented out version with new digitizers.
[u/mrichter/AliRoot.git] / TRD / AliTRDSimParam.h
CommitLineData
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
6///////////////////////////////////////////////////////////////////////////////
7// //
8// Class containing constant simulation parameters //
9// //
10///////////////////////////////////////////////////////////////////////////////
11
12/* $Id$ */
13
14#include "TObject.h"
15
16class AliTRDSimParam : public TObject
17{
18
19public:
20 static AliTRDSimParam* Instance();
21 static void Terminate();
22
23 enum { kNplan = 6, kNcham = 5, kNsect = 18, kNdet = 540 };
24
25 AliTRDSimParam(const AliTRDSimParam &p);
26 AliTRDSimParam &operator=(const AliTRDSimParam &p);
27 virtual void Copy(TObject &p) const;
28
29 void SetGasGain(Float_t gasgain) { fGasGain = gasgain; };
30 void SetNoise(Float_t noise) { fNoise = noise; };
31 void SetChipGain(Float_t chipgain) { fChipGain = chipgain; };
32
33 void SetADCoutRange(Float_t range) { fADCoutRange = range; };
34 void SetADCinRange(Float_t range) { fADCinRange = range; };
35 void SetADCthreshold(Int_t thresh) { fADCthreshold = thresh; };
36 void SetADCbaseline(Int_t basel) { fADCbaseline = basel; };
37
38 void SetDiffusion(Int_t diffOn = 1) { fDiffusionOn = diffOn; };
39
40 void SetElAttach(Int_t elOn = 1) { fElAttachOn = elOn; };
41 void SetElAttachProp(Float_t prop) { fElAttachProp = prop; };
42
43 void SetTimeResponse(Int_t trfOn = 1) { fTRFOn = trfOn; ReInit(); };
44
45 void SetCrossTalk(Int_t ctOn = 1) { fCTOn = ctOn; ReInit(); };
46
47 void SetTailCancelation(Int_t tcOn = 1) { fTCOn = tcOn; };
48 void SetNexponential(Int_t nexp) { fTCnexp = nexp; };
49
50 void SetPadCoupling(Float_t v) { fPadCoupling = v; };
51 void SetTimeCoupling(Float_t v) { fTimeCoupling = v; };
52 void SetAnodeWireOffset(Float_t offset = 0.25) { fAnodeWireOffset = offset;};
53 void SetTimeStruct(Bool_t tsOn = 1) { fTimeStructOn = tsOn; };
54
cc7cef99 55 void SetPadResponse(Int_t prfOn = 1) { fPRFOn = prfOn; };
56
3551db50 57 Float_t GetGasGain() const { return fGasGain; };
58 Float_t GetNoise() const { return fNoise; };
59 Float_t GetChipGain() const { return fChipGain; };
60
61 Float_t GetADCoutRange() const { return fADCoutRange; };
62 Float_t GetADCinRange() const { return fADCinRange; };
63 Int_t GetADCthreshold() const { return fADCthreshold; };
64 Int_t GetADCbaseline() const { return fADCbaseline; };
65
66 Bool_t DiffusionOn() const { return fDiffusionOn; };
67
68 Bool_t ElAttachOn() const { return fElAttachOn; };
69 Float_t GetElAttachProp() const { return fElAttachProp; };
70
71 Bool_t TRFOn() const { return fTRFOn; };
72 Double_t TimeResponse(Double_t time) const;
73 Float_t GetTRFlo() const { return fTRFlo; };
74 Float_t GetTRFhi() const { return fTRFhi; };
75
76 Bool_t CTOn() const { return fCTOn; };
77 Double_t CrossTalk(Double_t time) const;
78
79 Bool_t TCOn() const { return fTCOn; };
80 Int_t GetTCnexp() const { return fTCnexp; };
81
82 Float_t GetPadCoupling() const { return fPadCoupling; };
83 Float_t GetTimeCoupling() const { return fTimeCoupling; };
84 Float_t GetAnodeWireOffset() const { return fAnodeWireOffset; };
85 Bool_t TimeStructOn() const { return fTimeStructOn; };
86
cc7cef99 87 Bool_t PRFOn() const { return fPRFOn; };
88
3551db50 89protected:
90 static AliTRDSimParam* fgInstance; // Instance of this class (singleton implementation)
91 static Bool_t fgTerminated; // Defines if this class has already been terminated and therefore does not return instances in GetInstance anymore
92
93 // Digitization parameter
94 Float_t fGasGain; // Gas gain
95 Float_t fNoise; // Electronics noise
96 Float_t fChipGain; // Electronics gain
97
98 Float_t fADCoutRange; // ADC output range (number of channels)
99 Float_t fADCinRange; // ADC input range (input charge)
100 Int_t fADCthreshold; // ADC threshold in ADC channel
101 Int_t fADCbaseline; // ADC baseline in ADC chann
102
103 Int_t fDiffusionOn; // Switch for the diffusion
104
105 Int_t fElAttachOn; // Switch for the electron attachment
106 Float_t fElAttachProp; // Propability for electron attachment (for 1m)
107
108 Int_t fTRFOn; // Switch for the time response
109 Float_t *fTRFsmp; //! Integrated time response
110 Int_t fTRFbin; // Number of bins for the TRF
111 Float_t fTRFlo; // Lower boundary of the TRF
112 Float_t fTRFhi; // Higher boundary of the TRF
113 Float_t fTRFwid; // Bin width of the integrated TRF
114
115 Int_t fCTOn; // Switch for cross talk
116 Float_t *fCTsmp; //! Integrated cross talk
117
118 Int_t fTCOn; // Switch for the tail cancelation
119 Int_t fTCnexp; // Number of exponential of the digital filter
120
121 Float_t fAnodeWireOffset; // Distance of first anode wire from pad edge
122 Float_t fPadCoupling; // Pad coupling factor
123 Float_t fTimeCoupling; // Time coupling factor (image charge of moving ions)
124 Int_t fTimeStructOn; // Switch for cell time structure
125
cc7cef99 126 Int_t fPRFOn; // Switch for the pad response
127
3551db50 128private:
129 // this is a singleton, constructor is private!
130 AliTRDSimParam();
131 virtual ~AliTRDSimParam();
132
133 void Init();
134 void ReInit();
135 void SampleTRF();
136
cc7cef99 137 ClassDef(AliTRDSimParam, 1)
3551db50 138};
139
140#endif