Minor correction
[u/mrichter/AliRoot.git] / TRD / AliTRDdigitizer.h
CommitLineData
dd9a6ee3 1#ifndef ALITRDDIGITIZER_H
2#define ALITRDDIGITIZER_H
f7336fa3 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8#include <TNamed.h>
f7336fa3 9
793ff80c 10class TFile;
11class TF1;
12
13class AliTRD;
6f1e466d 14class AliTRDdigitsManager;
793ff80c 15class AliTRDgeometry;
f7336fa3 16
17///////////////////////////////////////////////////////
18// Produces digits from the hits information //
19///////////////////////////////////////////////////////
20
f7336fa3 21class AliTRDdigitizer : public TNamed {
22
23 public:
24
25 AliTRDdigitizer();
26 AliTRDdigitizer(const Text_t* name, const Text_t* title);
dd9a6ee3 27 AliTRDdigitizer(const AliTRDdigitizer &d);
8230f242 28 virtual ~AliTRDdigitizer();
dd9a6ee3 29 AliTRDdigitizer &operator=(const AliTRDdigitizer &d);
f7336fa3 30
dd9a6ee3 31 virtual void Copy(TObject &d);
6f1e466d 32 virtual void Init();
33 virtual Bool_t Open(const Char_t *name, Int_t nEvent = 0);
34 virtual Bool_t MakeDigits();
6244debe 35 virtual void ReInit();
36 virtual Bool_t SumSDigits();
6f1e466d 37 virtual Bool_t WriteDigits();
793ff80c 38 virtual Bool_t InitDetector();
39
6244debe 40 virtual void SetGasGain(Float_t gasgain) { fGasGain = gasgain; };
41 virtual void SetNoise(Float_t noise) { fNoise = noise; };
42 virtual void SetChipGain(Float_t chipgain) { fChipGain = chipgain; };
43 virtual void SetADCoutRange(Float_t range) { fADCoutRange = range; };
44 virtual void SetADCinRange(Float_t range) { fADCinRange = range; };
45 virtual void SetADCthreshold(Int_t thresh) { fADCthreshold = thresh; };
46 virtual void SetDiffusion(Int_t diffOn = 1) { fDiffusionOn = diffOn; };
6244debe 47 virtual void SetElAttach(Int_t elOn = 1) { fElAttachOn = elOn; };
48 virtual void SetElAttachProp(Float_t prop) { fElAttachProp = prop; };
49 virtual void SetExB(Int_t exbOn = 1) { fExBOn = exbOn; };
6244debe 50 virtual void SetPadResponse(Int_t prfOn = 1) { fPRFOn = prfOn; };
6244debe 51 virtual void SetTimeResponse(Int_t trfOn = 1) { fTRFOn = trfOn;
52 ReInit(); };
6244debe 53 virtual void SetDriftVelocity(Float_t v) { fDriftVelocity = v;
54 ReInit(); };
55 virtual void SetPadCoupling(Float_t v) { fPadCoupling = v; };
56 virtual void SetTimeCoupling(Float_t v) { fTimeCoupling = v; };
57 virtual void SetCompress(Int_t c = 1) { fCompress = c; };
58 virtual void SetVerbose(Int_t v = 1) { fVerbose = v; };
59 virtual void SetSDigits(Int_t v = 1) { fSDigits = v; };
9e1a0ddb 60 virtual void SetEvent(Int_t v = 0) { fEvent = v; };
793ff80c 61
872a7aba 62 AliTRDdigitsManager *Digits() const { return fDigits; };
63
db30bf0f 64 Float_t GetGasGain() const { return fGasGain; };
65 Float_t GetNoise() const { return fNoise; };
66 Float_t GetChipGain() const { return fChipGain; };
67 Float_t GetADCoutRange() const { return fADCoutRange; };
68 Float_t GetADCinRange() const { return fADCinRange; };
69 Int_t GetADCthreshold() const { return fADCthreshold; };
70 Float_t GetDiffusionT() const { return fDiffusionT; };
71 Float_t GetDiffusionL() const { return fDiffusionL; };
72 Float_t GetElAttachProp() const { return fElAttachProp; };
a819a5f7 73 Int_t GetExB() const { return fExBOn; };
db30bf0f 74 Float_t GetOmegaTau() const { return fOmegaTau; };
75 Float_t GetDriftVelocity() const { return fDriftVelocity; };
76 Float_t GetPadCoupling() const { return fPadCoupling; };
77 Float_t GetTimeCoupling() const { return fTimeCoupling; };
78 Bool_t GetCompress() const { return fCompress; };
79 Bool_t GetSDigits() const { return fSDigits; };
80 Float_t GetTimeBinWidth() const { return fTimeBinWidth; };
81 virtual Float_t GetDiffusionL(Float_t vd, Float_t b);
82 virtual Float_t GetDiffusionT(Float_t vd, Float_t b);
83 virtual Float_t GetOmegaTau(Float_t vd, Float_t b);
f7336fa3 84
85 protected:
86
6f1e466d 87 TFile *fInputFile; //! ALIROOT-filename
88 AliTRDdigitsManager *fDigits; //! TRD digits manager
89 AliTRD *fTRD; //! TRD detector class
90 AliTRDgeometry *fGeo; //! TRD geometry
f7336fa3 91
6f1e466d 92 Int_t fEvent; //! Event number
93
db30bf0f 94 Float_t fField; // Magnetic field
6f1e466d 95 Float_t fGasGain; // Gas gain
96 Float_t fNoise; // Electronics noise
97 Float_t fChipGain; // Electronics gain
98 Float_t fADCoutRange; // ADC output range (number of channels)
99 Float_t fADCinRange; // ADC input range (input charge)
6244debe 100 Float_t fSinRange; // Input range for summable digits
101 Float_t fSoutRange; // Output range for summable digits
6f1e466d 102 Int_t fADCthreshold; // ADC threshold in ADC channel
103 Int_t fDiffusionOn; // Switch for the diffusion
104 Float_t fDiffusionT; // Diffusion in transverse direction
105 Float_t fDiffusionL; // Diffusion in longitudinal direction
106 Int_t fElAttachOn; // Switch for the electron attachment
107 Float_t fElAttachProp; // Propability for electron attachment (for 1m)
108 Int_t fExBOn; // Switch for the ExB effects
793ff80c 109 Float_t fOmegaTau; // Tangens of the Lorentz angle
6f1e466d 110 Float_t fLorentzFactor; // Factor due to Lorentz force
793ff80c 111 Int_t fPRFOn; // Switch for the pad response
e153aaf6 112 Float_t *fPRFsmp; //!Sampled pad response
113 Int_t fPRFbin; // Number of bins for the PRF
114 Float_t fPRFlo; // Lower boundary of the PRF
115 Float_t fPRFhi; // Higher boundary of the PRF
116 Float_t fPRFwid; // Bin width of the sampled PRF
117 Int_t fPRFpad; // Distance to next pad in PRF
793ff80c 118 Int_t fTRFOn; // Switch for the time response
872a7aba 119 Float_t *fTRFsmp; //!Integrated time response
793ff80c 120 Int_t fTRFbin; // Number of bins for the TRF
121 Float_t fTRFlo; // Lower boundary of the TRF
122 Float_t fTRFhi; // Higher boundary of the TRF
123 Float_t fTRFwid; // Bin width of the integrated TRF
124 Float_t fDriftVelocity; // Drift velocity (cm / mus)
6244debe 125 Float_t fTimeBinWidth; // Time bin width in ns
126 Float_t fPadCoupling; // Pad coupling factor
127 Float_t fTimeCoupling; // Time coupling factor (image charge of moving ions)
793ff80c 128 Bool_t fCompress; // Switch to keep only compressed data in memory
129 Int_t fVerbose; // Sets the verbose level
6244debe 130 Bool_t fSDigits; // Switch for the summable digits
f7336fa3 131
132 private:
133
793ff80c 134 virtual Int_t Diffusion(Float_t driftlength, Float_t *xyz);
135 virtual Int_t ExB(Float_t driftlength, Float_t *xyz);
136 virtual Int_t PadResponse(Float_t signal, Float_t dist, Float_t *pad);
137 virtual Float_t TimeResponse(Float_t time);
138 virtual Bool_t CheckDetector(Int_t plane, Int_t chamber, Int_t sector);
e153aaf6 139 virtual void SamplePRF();
6244debe 140 virtual void SampleTRF();
793ff80c 141
872a7aba 142 ClassDef(AliTRDdigitizer,4) // Produces TRD-Digits
f7336fa3 143
144};
145
146#endif