Resolved merge conflict
[u/mrichter/AliRoot.git] / TRD / AliTRDdigitizer.h
CommitLineData
f7336fa3 1#ifndef TRDdigitizer_h
2#define TRDdigitizer_h
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>
10
11#include "AliHit.h"
12#include "AliDigit.h"
13#include "AliTRDconst.h"
14#include "AliTRDgeometry.h"
15#include "AliTRDsegmentArray.h"
16
17///////////////////////////////////////////////////////
18// Produces digits from the hits information //
19///////////////////////////////////////////////////////
20
21const Int_t kNDict = 3;
22
23class AliTRDdigitizer : public TNamed {
24
25 public:
26
27 AliTRDdigitizer();
28 AliTRDdigitizer(const Text_t* name, const Text_t* title);
29 ~AliTRDdigitizer();
30
31 virtual void Init();
32 virtual Bool_t Open(const Char_t *name, Int_t nEvent = 0);
33 virtual Bool_t MakeBranch();
34 virtual Bool_t MakeDigits();
35 virtual Bool_t WriteDigits();
36
37 virtual void SetGasGain(Float_t gasgain) { fGasGain = gasgain; };
38 virtual void SetNoise(Float_t noise) { fNoise = noise; };
39 virtual void SetChipGain(Float_t chipgain) { fChipGain = chipgain; };
40 virtual void SetADCoutRange(Float_t range) { fADCoutRange = range; };
41 virtual void SetADCinRange(Float_t range) { fADCinRange = range; };
42 virtual void SetADCthreshold(Int_t thresh) { fADCthreshold = thresh; };
43 virtual void SetDiffusion(Int_t diff_on = 1) { fDiffusionOn = diff_on; };
44 virtual void SetDiffusionT(Float_t diff) { fDiffusionT = diff; };
45 virtual void SetDiffusionL(Float_t diff) { fDiffusionL = diff; };
46 virtual void SetElAttach(Int_t el_on = 1) { fElAttachOn = el_on; };
47 virtual void SetElAttachProp(Float_t prop) { fElAttachProp = prop; };
48 virtual void SetExB(Int_t exb_on = 1) { fExBOn = exb_on; };
49 virtual void SetLorentzAngle(Float_t angle) { fLorentzAngle = angle; };
50
51 AliTRDsegmentArray *DigitsArray() { return fDigitsArray; };
52 AliTRDsegmentArray *Dictionary(Int_t i) { return fDictionary[i]; };
53
54 virtual Float_t GetGasGain() { return fGasGain; };
55 virtual Float_t GetNoise() { return fNoise; };
56 virtual Float_t GetChipGain() { return fChipGain; };
57 virtual Float_t GetADCoutRange() { return fADCoutRange; };
58 virtual Float_t GetADCinRange() { return fADCinRange; };
59 virtual Int_t GetADCthreshold() { return fADCthreshold; };
60 virtual Float_t GetDiffusionT() { return fDiffusionT; };
61 virtual Float_t GetDiffusionL() { return fDiffusionL; };
62 virtual Float_t GetElAttachProp() { return fElAttachProp; };
63 virtual Float_t GetLorentzAngle() { return fLorentzAngle; };
64
65 protected:
66
67 TFile *fInputFile; //! ALIROOT-filename
68
69 AliTRDsegmentArray *fDigitsArray; //! Array of detector segments containing the digits
70 AliTRDsegmentArray *fDictionary[3]; //! Dictionary array, connecting MC tracks to the digits
71
72 Int_t fEvent; //! Event number
73
74 Float_t fGasGain; // Gas gain
75 Float_t fNoise; // Electronics noise
76 Float_t fChipGain; // Electronics gain
77 Float_t fADCoutRange; // ADC output range (number of channels)
78 Float_t fADCinRange; // ADC input range (input charge)
79 Int_t fADCthreshold; // ADC threshold in ADC channel
80 Int_t fDiffusionOn; // Switch for the diffusion
81 Float_t fDiffusionT; // Diffusion in transverse direction
82 Float_t fDiffusionL; // Diffusion in longitudinal direction
83 Int_t fElAttachOn; // Switch for the electron attachment
84 Float_t fElAttachProp; // Propability for electron attachment (for 1m)
85 Int_t fExBOn; // Switch for the ExB effects
86 Float_t fLorentzAngle; // Lorentz angle
87 Float_t fLorentzFactor; // Factor due to Lorentz force
88
89 private:
90
91 virtual Int_t Diffusion(Float_t driftlength, Float_t *xyz);
92 virtual Int_t ExB(Float_t driftlength, Float_t *xyz);
93 virtual Float_t PadResponse(Float_t x);
94
95 ClassDef(AliTRDdigitizer,1) // TRD-Digits manager
96
97};
98
99//_____________________________________________________________________________
100class AliTRDdigit : public AliDigitNew {
101
102 public:
103
104 AliTRDdigit() {};
105 AliTRDdigit(Int_t *digits);
106 virtual ~AliTRDdigit() {};
107
108 virtual Int_t GetAmp() { return fAmplitude; };
109 virtual Int_t GetDetector() { return fDetector; };
110 virtual Int_t GetRow() { return fRow; };
111 virtual Int_t GetCol() { return fCol; };
112 virtual Int_t GetTime() { return fTime; };
113
114 protected:
115
116 Int_t fDetector; // TRD detector number
117 Int_t fRow; // Pad row number
118 Int_t fCol; // Pad col number
119 Int_t fTime; // Time bucket
120 Int_t fAmplitude; // Signal amplitude
121
122 ClassDef(AliTRDdigit,1) // Digits for Transition Radiation Detector
123
124};
125
126#endif