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 */
8 ////////////////////////////////////////////////////////////////////////////
10 // Class containing constant simulation parameters //
12 ////////////////////////////////////////////////////////////////////////////
16 class AliTRDSimParam : public TObject {
28 static AliTRDSimParam *Instance();
29 static void Terminate();
31 AliTRDSimParam(const AliTRDSimParam &p);
32 AliTRDSimParam &operator=(const AliTRDSimParam &p);
34 virtual void Copy(TObject &p) const;
36 void SetGasGain(Float_t gasgain) { fGasGain = gasgain; }
37 void SetNoise(Float_t noise) { fNoise = noise; }
38 void SetChipGain(Float_t chipgain) { fChipGain = chipgain; }
39 void SetADCoutRange(Float_t range) { fADCoutRange = range; }
40 void SetADCinRange(Float_t range) { fADCinRange = range; }
41 void SetADCbaseline(Int_t basel) { fADCbaseline = basel; }
42 void SetDiffusion(Int_t diffOn = 1) { fDiffusionOn = diffOn; }
43 void SetElAttach(Int_t elOn = 1) { fElAttachOn = elOn; }
44 void SetElAttachProp(Float_t prop) { fElAttachProp = prop; }
45 void SetTimeResponse(Int_t trfOn = 1) { fTRFOn = trfOn; ReInit(); }
46 void SetCrossTalk(Int_t ctOn = 1) { fCTOn = ctOn; ReInit(); }
47 void SetPadCoupling(Float_t v) { fPadCoupling = v; }
48 void SetTimeCoupling(Float_t v) { fTimeCoupling = v; }
49 void SetAnodeWireOffset(Float_t offset = 0.25) { fAnodeWireOffset = offset; }
50 void SetTimeStruct(Bool_t tsOn = 1) { fTimeStructOn = tsOn; }
51 void SetPadResponse(Int_t prfOn = 1) { fPRFOn = prfOn; }
52 void SetXenon() { fGasMixture = kXenon; ReInit(); }
53 void SetArgon() { fGasMixture = kArgon; ReInit(); }
55 Float_t GetGasGain() const { return fGasGain; }
56 Float_t GetNoise() const { return fNoise; }
57 Float_t GetChipGain() const { return fChipGain; }
58 Float_t GetADCoutRange() const { return fADCoutRange; }
59 Float_t GetADCinRange() const { return fADCinRange; }
60 Int_t GetADCbaseline() const { return fADCbaseline; }
61 Float_t GetTRFlo() const { return fTRFlo; }
62 Float_t GetTRFhi() const { return fTRFhi; }
63 Float_t GetPadCoupling() const { return fPadCoupling; }
64 Float_t GetTimeCoupling() const { return fTimeCoupling; }
65 Float_t GetAnodeWireOffset() const { return fAnodeWireOffset; }
66 Int_t GetGasMixture() const { return fGasMixture; }
68 Bool_t DiffusionOn() const { return fDiffusionOn; }
69 Bool_t ElAttachOn() const { return fElAttachOn; }
70 Float_t GetElAttachProp() const { return fElAttachProp; }
71 Bool_t TRFOn() const { return fTRFOn; }
72 Bool_t CTOn() const { return fCTOn; }
73 Bool_t TimeStructOn() const { return fTimeStructOn; }
74 Bool_t PRFOn() const { return fPRFOn; }
76 Double_t TimeResponse(Double_t time) const;
77 Double_t CrossTalk(Double_t time) const;
79 Bool_t IsXenon() const { return (fGasMixture == kXenon)
81 Bool_t IsArgon() const { return (fGasMixture == kArgon)
86 static AliTRDSimParam* fgInstance; // Instance of this class (singleton implementation)
87 static Bool_t fgTerminated; // Defines if this class has already been terminated and
88 // therefore does not return instances in GetInstance anymore
90 // Digitization parameter
91 Float_t fGasGain; // Gas gain
92 Float_t fNoise; // Electronics noise
93 Float_t fChipGain; // Electronics gain
95 Float_t fADCoutRange; // ADC output range (number of channels)
96 Float_t fADCinRange; // ADC input range (input charge)
97 Int_t fADCbaseline; // ADC intrinsic baseline in ADC channel
99 Int_t fDiffusionOn; // Switch for the diffusion
101 Int_t fElAttachOn; // Switch for the electron attachment
102 Float_t fElAttachProp; // Propability for electron attachment (for 1m)
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
111 Int_t fCTOn; // Switch for cross talk
112 Float_t *fCTsmp; //! Integrated cross talk
114 Float_t fAnodeWireOffset; // Distance of first anode wire from pad edge
115 Float_t fPadCoupling; // Pad coupling factor
116 Float_t fTimeCoupling; // Time coupling factor (image charge of moving ions)
117 Int_t fTimeStructOn; // Switch for cell time structure
119 Int_t fPRFOn; // Switch for the pad response
121 Int_t fGasMixture; // Gas mixture: 0-Xe/C02 1-Ar/CO2.
125 // This is a singleton, constructor is private!
127 virtual ~AliTRDSimParam();
133 ClassDef(AliTRDSimParam,2) // The TRD simulation parameters