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