declaration for StepManager()
[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();
16bf9884 35 virtual Bool_t Merge(TTree *trees, Int_t *mask, Int_t nin, Int_t event);
6244debe 36 virtual void ReInit();
37 virtual Bool_t SumSDigits();
6f1e466d 38 virtual Bool_t WriteDigits();
793ff80c 39 virtual Bool_t InitDetector();
40
16bf9884 41 virtual void SetGasGain(Float_t gasgain) { fGasGain = gasgain; };
42 virtual void SetNoise(Float_t noise) { fNoise = noise; };
43 virtual void SetChipGain(Float_t chipgain) { fChipGain = chipgain; };
44 virtual void SetADCoutRange(Float_t range) { fADCoutRange = range; };
45 virtual void SetADCinRange(Float_t range) { fADCinRange = range; };
46 virtual void SetADCthreshold(Int_t thresh) { fADCthreshold = thresh; };
47 virtual void SetDiffusion(Int_t diffOn = 1) { fDiffusionOn = diffOn; };
48 virtual void SetElAttach(Int_t elOn = 1) { fElAttachOn = elOn; };
49 virtual void SetElAttachProp(Float_t prop) { fElAttachProp = prop; };
50 virtual void SetExB(Int_t exbOn = 1) { fExBOn = exbOn; };
51 virtual void SetPadResponse(Int_t prfOn = 1) { fPRFOn = prfOn; };
52 virtual void SetTimeResponse(Int_t trfOn = 1) { fTRFOn = trfOn;
53 ReInit(); };
54 virtual void SetDriftVelocity(Float_t v) { fDriftVelocity = v;
55 ReInit(); };
56 virtual void SetPadCoupling(Float_t v) { fPadCoupling = v; };
57 virtual void SetTimeCoupling(Float_t v) { fTimeCoupling = v; };
58 virtual void SetCompress(Int_t c = 1) { fCompress = c; };
59 virtual void SetVerbose(Int_t v = 1) { fVerbose = v; };
60 virtual void SetSDigits(Int_t v = 1) { fSDigits = v; };
61 virtual void SetEvent(Int_t v = 0) { fEvent = v; };
62 virtual void SetManager(AliTRDdigitsManager *man) { fDigits = man; };
793ff80c 63
16bf9884 64 AliTRDdigitsManager *Digits() const { return fDigits; };
872a7aba 65
16bf9884 66 Float_t GetGasGain() const { return fGasGain; };
67 Float_t GetNoise() const { return fNoise; };
68 Float_t GetChipGain() const { return fChipGain; };
69 Float_t GetADCoutRange() const { return fADCoutRange; };
70 Float_t GetADCinRange() const { return fADCinRange; };
71 Int_t GetADCthreshold() const { return fADCthreshold; };
72 Float_t GetDiffusionT() const { return fDiffusionT; };
73 Float_t GetDiffusionL() const { return fDiffusionL; };
74 Float_t GetElAttachProp() const { return fElAttachProp; };
75 Int_t GetExB() const { return fExBOn; };
76 Float_t GetOmegaTau() const { return fOmegaTau; };
77 Float_t GetDriftVelocity() const { return fDriftVelocity; };
78 Float_t GetPadCoupling() const { return fPadCoupling; };
79 Float_t GetTimeCoupling() const { return fTimeCoupling; };
80 Bool_t GetCompress() const { return fCompress; };
81 Bool_t GetSDigits() const { return fSDigits; };
82 Float_t GetTimeBinWidth() const { return fTimeBinWidth; };
db30bf0f 83 virtual Float_t GetDiffusionL(Float_t vd, Float_t b);
84 virtual Float_t GetDiffusionT(Float_t vd, Float_t b);
85 virtual Float_t GetOmegaTau(Float_t vd, Float_t b);
f7336fa3 86
87 protected:
88
6f1e466d 89 TFile *fInputFile; //! ALIROOT-filename
90 AliTRDdigitsManager *fDigits; //! TRD digits manager
91 AliTRD *fTRD; //! TRD detector class
92 AliTRDgeometry *fGeo; //! TRD geometry
f7336fa3 93
6f1e466d 94 Int_t fEvent; //! Event number
95
db30bf0f 96 Float_t fField; // Magnetic field
6f1e466d 97 Float_t fGasGain; // Gas gain
98 Float_t fNoise; // Electronics noise
99 Float_t fChipGain; // Electronics gain
100 Float_t fADCoutRange; // ADC output range (number of channels)
101 Float_t fADCinRange; // ADC input range (input charge)
6244debe 102 Float_t fSinRange; // Input range for summable digits
103 Float_t fSoutRange; // Output range for summable digits
6f1e466d 104 Int_t fADCthreshold; // ADC threshold in ADC channel
105 Int_t fDiffusionOn; // Switch for the diffusion
106 Float_t fDiffusionT; // Diffusion in transverse direction
107 Float_t fDiffusionL; // Diffusion in longitudinal direction
108 Int_t fElAttachOn; // Switch for the electron attachment
109 Float_t fElAttachProp; // Propability for electron attachment (for 1m)
110 Int_t fExBOn; // Switch for the ExB effects
793ff80c 111 Float_t fOmegaTau; // Tangens of the Lorentz angle
6f1e466d 112 Float_t fLorentzFactor; // Factor due to Lorentz force
793ff80c 113 Int_t fPRFOn; // Switch for the pad response
e153aaf6 114 Float_t *fPRFsmp; //!Sampled pad response
115 Int_t fPRFbin; // Number of bins for the PRF
116 Float_t fPRFlo; // Lower boundary of the PRF
117 Float_t fPRFhi; // Higher boundary of the PRF
118 Float_t fPRFwid; // Bin width of the sampled PRF
119 Int_t fPRFpad; // Distance to next pad in PRF
793ff80c 120 Int_t fTRFOn; // Switch for the time response
872a7aba 121 Float_t *fTRFsmp; //!Integrated time response
793ff80c 122 Int_t fTRFbin; // Number of bins for the TRF
123 Float_t fTRFlo; // Lower boundary of the TRF
124 Float_t fTRFhi; // Higher boundary of the TRF
125 Float_t fTRFwid; // Bin width of the integrated TRF
126 Float_t fDriftVelocity; // Drift velocity (cm / mus)
6244debe 127 Float_t fTimeBinWidth; // Time bin width in ns
128 Float_t fPadCoupling; // Pad coupling factor
129 Float_t fTimeCoupling; // Time coupling factor (image charge of moving ions)
793ff80c 130 Bool_t fCompress; // Switch to keep only compressed data in memory
131 Int_t fVerbose; // Sets the verbose level
6244debe 132 Bool_t fSDigits; // Switch for the summable digits
f7336fa3 133
134 private:
135
793ff80c 136 virtual Int_t Diffusion(Float_t driftlength, Float_t *xyz);
137 virtual Int_t ExB(Float_t driftlength, Float_t *xyz);
138 virtual Int_t PadResponse(Float_t signal, Float_t dist, Float_t *pad);
139 virtual Float_t TimeResponse(Float_t time);
140 virtual Bool_t CheckDetector(Int_t plane, Int_t chamber, Int_t sector);
e153aaf6 141 virtual void SamplePRF();
6244debe 142 virtual void SampleTRF();
793ff80c 143
872a7aba 144 ClassDef(AliTRDdigitizer,4) // Produces TRD-Digits
f7336fa3 145
146};
147
148#endif