First implementation of calibration scheme by Jan Fiete
[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
55 Float_t GetGasGain() const { return fGasGain; };
56 Float_t GetNoise() const { return fNoise; };
57 Float_t GetChipGain() const { return fChipGain; };
58
59 Float_t GetADCoutRange() const { return fADCoutRange; };
60 Float_t GetADCinRange() const { return fADCinRange; };
61 Int_t GetADCthreshold() const { return fADCthreshold; };
62 Int_t GetADCbaseline() const { return fADCbaseline; };
63
64 Bool_t DiffusionOn() const { return fDiffusionOn; };
65
66 Bool_t ElAttachOn() const { return fElAttachOn; };
67 Float_t GetElAttachProp() const { return fElAttachProp; };
68
69 Bool_t TRFOn() const { return fTRFOn; };
70 Double_t TimeResponse(Double_t time) const;
71 Float_t GetTRFlo() const { return fTRFlo; };
72 Float_t GetTRFhi() const { return fTRFhi; };
73
74 Bool_t CTOn() const { return fCTOn; };
75 Double_t CrossTalk(Double_t time) const;
76
77 Bool_t TCOn() const { return fTCOn; };
78 Int_t GetTCnexp() const { return fTCnexp; };
79
80 Float_t GetPadCoupling() const { return fPadCoupling; };
81 Float_t GetTimeCoupling() const { return fTimeCoupling; };
82 Float_t GetAnodeWireOffset() const { return fAnodeWireOffset; };
83 Bool_t TimeStructOn() const { return fTimeStructOn; };
84
85protected:
86 static AliTRDSimParam* fgInstance; // Instance of this class (singleton implementation)
87 static Bool_t fgTerminated; // Defines if this class has already been terminated and therefore does not return instances in GetInstance anymore
88
89 // Digitization parameter
90 Float_t fGasGain; // Gas gain
91 Float_t fNoise; // Electronics noise
92 Float_t fChipGain; // Electronics gain
93
94 Float_t fADCoutRange; // ADC output range (number of channels)
95 Float_t fADCinRange; // ADC input range (input charge)
96 Int_t fADCthreshold; // ADC threshold in ADC channel
97 Int_t fADCbaseline; // ADC baseline in ADC chann
98
99 Int_t fDiffusionOn; // Switch for the diffusion
100
101 Int_t fElAttachOn; // Switch for the electron attachment
102 Float_t fElAttachProp; // Propability for electron attachment (for 1m)
103
104 Int_t fTRFOn; // Switch for the time response
105 Float_t *fTRFsmp; //! Integrated time response
106 Int_t fTRFbin; // Number of bins for the TRF
107 Float_t fTRFlo; // Lower boundary of the TRF
108 Float_t fTRFhi; // Higher boundary of the TRF
109 Float_t fTRFwid; // Bin width of the integrated TRF
110
111 Int_t fCTOn; // Switch for cross talk
112 Float_t *fCTsmp; //! Integrated cross talk
113
114 Int_t fTCOn; // Switch for the tail cancelation
115 Int_t fTCnexp; // Number of exponential of the digital filter
116
117 Float_t fAnodeWireOffset; // Distance of first anode wire from pad edge
118 Float_t fPadCoupling; // Pad coupling factor
119 Float_t fTimeCoupling; // Time coupling factor (image charge of moving ions)
120 Int_t fTimeStructOn; // Switch for cell time structure
121
122private:
123 // this is a singleton, constructor is private!
124 AliTRDSimParam();
125 virtual ~AliTRDSimParam();
126
127 void Init();
128 void ReInit();
129 void SampleTRF();
130
131 ClassDef(AliTRDSimParam, 0)
132};
133
134#endif