Pass custom name and title to the TTask base class
[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();
abaf1f1d 33 virtual Bool_t InitDetector();
34 virtual void ReInit();
6f1e466d 35 virtual Bool_t Open(const Char_t *name, Int_t nEvent = 0);
abaf1f1d 36 virtual Bool_t MakeBranch(const Char_t *file = 0);
6f1e466d 37 virtual Bool_t MakeDigits();
abaf1f1d 38 virtual void AddSDigitsManager(AliTRDdigitsManager *man);
39 virtual Bool_t ConvertSDigits();
40 virtual Bool_t MergeSDigits();
41 virtual Bool_t SDigits2Digits();
6f1e466d 42 virtual Bool_t WriteDigits();
793ff80c 43
16bf9884 44 virtual void SetGasGain(Float_t gasgain) { fGasGain = gasgain; };
45 virtual void SetNoise(Float_t noise) { fNoise = noise; };
46 virtual void SetChipGain(Float_t chipgain) { fChipGain = chipgain; };
47 virtual void SetADCoutRange(Float_t range) { fADCoutRange = range; };
48 virtual void SetADCinRange(Float_t range) { fADCinRange = range; };
49 virtual void SetADCthreshold(Int_t thresh) { fADCthreshold = thresh; };
50 virtual void SetDiffusion(Int_t diffOn = 1) { fDiffusionOn = diffOn; };
51 virtual void SetElAttach(Int_t elOn = 1) { fElAttachOn = elOn; };
52 virtual void SetElAttachProp(Float_t prop) { fElAttachProp = prop; };
53 virtual void SetExB(Int_t exbOn = 1) { fExBOn = exbOn; };
54 virtual void SetPadResponse(Int_t prfOn = 1) { fPRFOn = prfOn; };
55 virtual void SetTimeResponse(Int_t trfOn = 1) { fTRFOn = trfOn;
56 ReInit(); };
57 virtual void SetDriftVelocity(Float_t v) { fDriftVelocity = v;
58 ReInit(); };
59 virtual void SetPadCoupling(Float_t v) { fPadCoupling = v; };
60 virtual void SetTimeCoupling(Float_t v) { fTimeCoupling = v; };
61 virtual void SetCompress(Int_t c = 1) { fCompress = c; };
62 virtual void SetVerbose(Int_t v = 1) { fVerbose = v; };
63 virtual void SetSDigits(Int_t v = 1) { fSDigits = v; };
abaf1f1d 64 virtual void SetSDigitsScale(Float_t s) { fSDigitsScale = s; };
16bf9884 65 virtual void SetEvent(Int_t v = 0) { fEvent = v; };
abaf1f1d 66 virtual void SetManager(AliTRDdigitsManager *man) { fDigitsManager = man; };
793ff80c 67
abaf1f1d 68 AliTRDdigitsManager *Digits() const { return fDigitsManager; };
872a7aba 69
16bf9884 70 Float_t GetGasGain() const { return fGasGain; };
71 Float_t GetNoise() const { return fNoise; };
72 Float_t GetChipGain() const { return fChipGain; };
73 Float_t GetADCoutRange() const { return fADCoutRange; };
74 Float_t GetADCinRange() const { return fADCinRange; };
75 Int_t GetADCthreshold() const { return fADCthreshold; };
76 Float_t GetDiffusionT() const { return fDiffusionT; };
77 Float_t GetDiffusionL() const { return fDiffusionL; };
78 Float_t GetElAttachProp() const { return fElAttachProp; };
79 Int_t GetExB() const { return fExBOn; };
80 Float_t GetOmegaTau() const { return fOmegaTau; };
81 Float_t GetDriftVelocity() const { return fDriftVelocity; };
82 Float_t GetPadCoupling() const { return fPadCoupling; };
83 Float_t GetTimeCoupling() const { return fTimeCoupling; };
84 Bool_t GetCompress() const { return fCompress; };
85 Bool_t GetSDigits() const { return fSDigits; };
abaf1f1d 86 Float_t GetSDigitsScale() const { return fSDigitsScale; };
16bf9884 87 Float_t GetTimeBinWidth() const { return fTimeBinWidth; };
db30bf0f 88 virtual Float_t GetDiffusionL(Float_t vd, Float_t b);
89 virtual Float_t GetDiffusionT(Float_t vd, Float_t b);
90 virtual Float_t GetOmegaTau(Float_t vd, Float_t b);
f7336fa3 91
92 protected:
93
abaf1f1d 94 TFile *fInputFile; //! ALIROOT-file
95 AliTRDdigitsManager *fDigitsManager; //! Manager for the output digits
96 AliTRDdigitsManager *fSDigitsManager; //! Manager for the summed input s-digits
97 TList *fSDigitsManagerList; //! List of managers of input s-digits
98 AliTRD *fTRD; //! TRD detector class
99 AliTRDgeometry *fGeo; //! TRD geometry
f7336fa3 100
abaf1f1d 101 Int_t fEvent; //! Event number
102
103 Float_t fField; // Magnetic field
104 Float_t fGasGain; // Gas gain
105 Float_t fNoise; // Electronics noise
106 Float_t fChipGain; // Electronics gain
107 Float_t fADCoutRange; // ADC output range (number of channels)
108 Float_t fADCinRange; // ADC input range (input charge)
109 Int_t fADCthreshold; // ADC threshold in ADC channel
110 Int_t fDiffusionOn; // Switch for the diffusion
111 Float_t fDiffusionT; // Diffusion in transverse direction
112 Float_t fDiffusionL; // Diffusion in longitudinal direction
113 Int_t fElAttachOn; // Switch for the electron attachment
114 Float_t fElAttachProp; // Propability for electron attachment (for 1m)
115 Int_t fExBOn; // Switch for the ExB effects
116 Float_t fOmegaTau; // Tangens of the Lorentz angle
117 Float_t fLorentzFactor; // Factor due to Lorentz force
118 Int_t fPRFOn; // Switch for the pad response
119 Float_t *fPRFsmp; //! Sampled pad response
120 Int_t fPRFbin; // Number of bins for the PRF
121 Float_t fPRFlo; // Lower boundary of the PRF
122 Float_t fPRFhi; // Higher boundary of the PRF
123 Float_t fPRFwid; // Bin width of the sampled PRF
124 Int_t fPRFpad; // Distance to next pad in PRF
125 Int_t fTRFOn; // Switch for the time response
126 Float_t *fTRFsmp; //! 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)
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)
135 Bool_t fCompress; // Switch to keep only compressed data in memory
136 Int_t fVerbose; // Sets the verbose level
137 Bool_t fSDigits; // Switch for the summable digits
138 Float_t fSDigitsScale; // Scale factor for the summable digits
f7336fa3 139
140 private:
141
793ff80c 142 virtual Int_t Diffusion(Float_t driftlength, Float_t *xyz);
143 virtual Int_t ExB(Float_t driftlength, Float_t *xyz);
144 virtual Int_t PadResponse(Float_t signal, Float_t dist, Float_t *pad);
145 virtual Float_t TimeResponse(Float_t time);
146 virtual Bool_t CheckDetector(Int_t plane, Int_t chamber, Int_t sector);
e153aaf6 147 virtual void SamplePRF();
6244debe 148 virtual void SampleTRF();
793ff80c 149
abaf1f1d 150 ClassDef(AliTRDdigitizer,5) // Produces TRD-Digits
f7336fa3 151
152};
153
154#endif