]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDSimParam.h
GRID jdl for TRD QA (Markus)
[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
3551db50 6/* $Id$ */
7
4d18a639 8////////////////////////////////////////////////////////////////////////////
9// //
10// Class containing constant simulation parameters //
11// //
12////////////////////////////////////////////////////////////////////////////
13
3551db50 14#include "TObject.h"
15
4d18a639 16class 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
f2979d08 25 enum { kXenon = 0
26 , kArgon = 1 };
27
4d18a639 28 static AliTRDSimParam *Instance();
29 static void Terminate();
3551db50 30
31 AliTRDSimParam(const AliTRDSimParam &p);
32 AliTRDSimParam &operator=(const AliTRDSimParam &p);
4d18a639 33
34 virtual void Copy(TObject &p) const;
35
f2979d08 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; }
f2979d08 49 void SetTimeStruct(Bool_t tsOn = 1) { fTimeStructOn = tsOn; }
50 void SetPadResponse(Int_t prfOn = 1) { fPRFOn = prfOn; }
51 void SetXenon() { fGasMixture = kXenon; ReInit(); }
52 void SetArgon() { fGasMixture = kArgon; ReInit(); }
3551db50 53
f2979d08 54 Float_t GetGasGain() const { return fGasGain; }
55 Float_t GetNoise() const { return fNoise; }
56 Float_t GetChipGain() const { return fChipGain; }
57 Float_t GetADCoutRange() const { return fADCoutRange; }
58 Float_t GetADCinRange() const { return fADCinRange; }
59 Int_t GetADCbaseline() const { return fADCbaseline; }
60 Float_t GetTRFlo() const { return fTRFlo; }
61 Float_t GetTRFhi() const { return fTRFhi; }
62 Float_t GetPadCoupling() const { return fPadCoupling; }
63 Float_t GetTimeCoupling() const { return fTimeCoupling; }
f2979d08 64 Int_t GetGasMixture() const { return fGasMixture; }
65
66 Bool_t DiffusionOn() const { return fDiffusionOn; }
67 Bool_t ElAttachOn() const { return fElAttachOn; }
68 Float_t GetElAttachProp() const { return fElAttachProp; }
69 Bool_t TRFOn() const { return fTRFOn; }
70 Bool_t CTOn() const { return fCTOn; }
71 Bool_t TimeStructOn() const { return fTimeStructOn; }
72 Bool_t PRFOn() const { return fPRFOn; }
4d18a639 73
74 Double_t TimeResponse(Double_t time) const;
75 Double_t CrossTalk(Double_t time) const;
cc7cef99 76
f2979d08 77 Bool_t IsXenon() const { return (fGasMixture == kXenon)
78 ? kTRUE : kFALSE; }
79 Bool_t IsArgon() const { return (fGasMixture == kArgon)
80 ? kTRUE : kFALSE; }
81
82 protected:
4d18a639 83
b43a3e17 84 static AliTRDSimParam* fgInstance; // Instance of this class (singleton implementation)
85 static Bool_t fgTerminated; // Defines if this class has already been terminated and
86 // therefore does not return instances in GetInstance anymore
3551db50 87
4d18a639 88 // Digitization parameter
b43a3e17 89 Float_t fGasGain; // Gas gain
90 Float_t fNoise; // Electronics noise
91 Float_t fChipGain; // Electronics gain
3551db50 92
b43a3e17 93 Float_t fADCoutRange; // ADC output range (number of channels)
94 Float_t fADCinRange; // ADC input range (input charge)
ecf39416 95 Int_t fADCbaseline; // ADC intrinsic baseline in ADC channel
3551db50 96
b43a3e17 97 Int_t fDiffusionOn; // Switch for the diffusion
3551db50 98
b43a3e17 99 Int_t fElAttachOn; // Switch for the electron attachment
100 Float_t fElAttachProp; // Propability for electron attachment (for 1m)
3551db50 101
b43a3e17 102 Int_t fTRFOn; // Switch for the time response
103 Float_t *fTRFsmp; //! Integrated time response
104 Int_t fTRFbin; // Number of bins for the TRF
105 Float_t fTRFlo; // Lower boundary of the TRF
106 Float_t fTRFhi; // Higher boundary of the TRF
107 Float_t fTRFwid; // Bin width of the integrated TRF
3551db50 108
b43a3e17 109 Int_t fCTOn; // Switch for cross talk
110 Float_t *fCTsmp; //! Integrated cross talk
3551db50 111
b43a3e17 112 Float_t fPadCoupling; // Pad coupling factor
113 Float_t fTimeCoupling; // Time coupling factor (image charge of moving ions)
114 Int_t fTimeStructOn; // Switch for cell time structure
3551db50 115
b43a3e17 116 Int_t fPRFOn; // Switch for the pad response
f2979d08 117
118 Int_t fGasMixture; // Gas mixture: 0-Xe/C02 1-Ar/CO2.
119
4d18a639 120 private:
121
122 // This is a singleton, constructor is private!
3551db50 123 AliTRDSimParam();
124 virtual ~AliTRDSimParam();
125
4d18a639 126 void Init();
127 void ReInit();
128 void SampleTRF();
3551db50 129
58897a75 130 ClassDef(AliTRDSimParam,3) // The TRD simulation parameters
4d18a639 131
3551db50 132};
133
134#endif