Dimitri just makes it work
[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>
9#include <TFile.h>
6f1e466d 10#include <TF1.h>
f7336fa3 11
12#include "AliHit.h"
6f1e466d 13#include "AliTRDdigit.h"
f7336fa3 14#include "AliTRDconst.h"
15#include "AliTRDgeometry.h"
6f1e466d 16
17class AliTRDdigitsManager;
f7336fa3 18
19///////////////////////////////////////////////////////
20// Produces digits from the hits information //
21///////////////////////////////////////////////////////
22
f7336fa3 23class AliTRDdigitizer : public TNamed {
24
25 public:
26
27 AliTRDdigitizer();
28 AliTRDdigitizer(const Text_t* name, const Text_t* title);
dd9a6ee3 29 AliTRDdigitizer(const AliTRDdigitizer &d);
8230f242 30 virtual ~AliTRDdigitizer();
dd9a6ee3 31 AliTRDdigitizer &operator=(const AliTRDdigitizer &d);
f7336fa3 32
dd9a6ee3 33 virtual void Copy(TObject &d);
6f1e466d 34 virtual void Init();
35 virtual Bool_t Open(const Char_t *name, Int_t nEvent = 0);
36 virtual Bool_t MakeDigits();
37 virtual Bool_t WriteDigits();
38
39 virtual void SetGasGain(Float_t gasgain) { fGasGain = gasgain; };
40 virtual void SetNoise(Float_t noise) { fNoise = noise; };
41 virtual void SetChipGain(Float_t chipgain) { fChipGain = chipgain; };
42 virtual void SetADCoutRange(Float_t range) { fADCoutRange = range; };
43 virtual void SetADCinRange(Float_t range) { fADCinRange = range; };
44 virtual void SetADCthreshold(Int_t thresh) { fADCthreshold = thresh; };
8230f242 45 virtual void SetDiffusion(Int_t diffOn = 1) { fDiffusionOn = diffOn; };
6f1e466d 46 virtual void SetDiffusionT(Float_t diff) { fDiffusionT = diff; };
47 virtual void SetDiffusionL(Float_t diff) { fDiffusionL = diff; };
8230f242 48 virtual void SetElAttach(Int_t elOn = 1) { fElAttachOn = elOn; };
6f1e466d 49 virtual void SetElAttachProp(Float_t prop) { fElAttachProp = prop; };
8230f242 50 virtual void SetExB(Int_t exbOn = 1) { fExBOn = exbOn; };
6f1e466d 51 virtual void SetLorentzAngle(Float_t angle) { fLorentzAngle = angle; };
52 virtual void SetPadResponse(TF1 *PRF) { if (fPRF) delete fPRF;
53 fPRF = PRF; };
54
55 AliTRDdigitsManager *Digits() { return fDigits; };
56
57 virtual Float_t GetGasGain() { return fGasGain; };
58 virtual Float_t GetNoise() { return fNoise; };
59 virtual Float_t GetChipGain() { return fChipGain; };
60 virtual Float_t GetADCoutRange() { return fADCoutRange; };
61 virtual Float_t GetADCinRange() { return fADCinRange; };
62 virtual Int_t GetADCthreshold() { return fADCthreshold; };
63 virtual Float_t GetDiffusionT() { return fDiffusionT; };
64 virtual Float_t GetDiffusionL() { return fDiffusionL; };
65 virtual Float_t GetElAttachProp() { return fElAttachProp; };
66 virtual Float_t GetLorentzAngle() { return fLorentzAngle; };
67 virtual TF1 *GetPadResponse() { return fPRF; };
f7336fa3 68
69 protected:
70
6f1e466d 71 TFile *fInputFile; //! ALIROOT-filename
72 AliTRDdigitsManager *fDigits; //! TRD digits manager
73 AliTRD *fTRD; //! TRD detector class
74 AliTRDgeometry *fGeo; //! TRD geometry
f7336fa3 75
6f1e466d 76 Int_t fEvent; //! Event number
77
78 Float_t fGasGain; // Gas gain
79 Float_t fNoise; // Electronics noise
80 Float_t fChipGain; // Electronics gain
81 Float_t fADCoutRange; // ADC output range (number of channels)
82 Float_t fADCinRange; // ADC input range (input charge)
83 Int_t fADCthreshold; // ADC threshold in ADC channel
84 Int_t fDiffusionOn; // Switch for the diffusion
85 Float_t fDiffusionT; // Diffusion in transverse direction
86 Float_t fDiffusionL; // Diffusion in longitudinal direction
87 Int_t fElAttachOn; // Switch for the electron attachment
88 Float_t fElAttachProp; // Propability for electron attachment (for 1m)
89 Int_t fExBOn; // Switch for the ExB effects
90 Float_t fLorentzAngle; // Lorentz angle
91 Float_t fLorentzFactor; // Factor due to Lorentz force
92 TF1 *fPRF; // Pad response function
f7336fa3 93
94 private:
95
96 virtual Int_t Diffusion(Float_t driftlength, Float_t *xyz);
97 virtual Int_t ExB(Float_t driftlength, Float_t *xyz);
f7336fa3 98
6f1e466d 99 ClassDef(AliTRDdigitizer,1) // Produces TRD-Digits
f7336fa3 100
101};
102
103#endif