Classes moved to STEERBase.
[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
4d18a639 8////////////////////////////////////////////////////////////////////////////
9// //
10// Produces digits from the hits information //
11// //
12////////////////////////////////////////////////////////////////////////////
13
85cbec76 14#include "AliDigitizer.h"
f7336fa3 15
793ff80c 16class TFile;
17class TF1;
18
85cbec76 19class AliRunDigitizer;
88cb7938 20class AliRunLoader;
85cbec76 21
793ff80c 22class AliTRD;
6f1e466d 23class AliTRDdigitsManager;
793ff80c 24class AliTRDgeometry;
f7336fa3 25
85cbec76 26class AliTRDdigitizer : public AliDigitizer {
f7336fa3 27
28 public:
29
30 AliTRDdigitizer();
4d18a639 31 AliTRDdigitizer(const Text_t *name, const Text_t *title);
32 AliTRDdigitizer(AliRunDigitizer *manager, const Text_t *name, const Text_t *title);
bfc40adc 33 AliTRDdigitizer(AliRunDigitizer *manager);
dd9a6ee3 34 AliTRDdigitizer(const AliTRDdigitizer &d);
4d18a639 35 virtual ~AliTRDdigitizer();
dd9a6ee3 36 AliTRDdigitizer &operator=(const AliTRDdigitizer &d);
f7336fa3 37
4d18a639 38 virtual void Copy(TObject &d) const;
39 virtual Bool_t InitDetector();
40 void InitOutput(Int_t iEvent);
41 virtual void Exec(Option_t *option = 0);
42 virtual Bool_t Open(const Char_t *file, Int_t nEvent = 0);
95867fd1 43 virtual Bool_t Open(AliRunLoader *runLoader, Int_t nEvent = 0);
4d18a639 44 virtual Bool_t MakeBranch(TTree *tree) const;
45 virtual Bool_t MakeDigits();
46
47 virtual void AddSDigitsManager(AliTRDdigitsManager *manager);
48 virtual void DeleteSDigitsManager();
49 virtual Bool_t ConvertSDigits();
50 virtual Bool_t MergeSDigits();
51 virtual Bool_t SDigits2Digits();
52 virtual Bool_t WriteDigits() const;
53
54 virtual void SetCompress(Int_t c = 1) { fCompress = c; }
55 virtual void SetSDigits(Int_t v = 1) { fSDigits = v; }
56 virtual void SetSDigitsScale(Float_t s) { fSDigitsScale = s; }
57 virtual void SetEvent(Int_t v = 0) { fEvent = v; }
58 virtual void SetManager(AliTRDdigitsManager *man) { fDigitsManager = man; }
59 virtual void SetGeometry(AliTRDgeometry *geo) { fGeo = geo; }
60 virtual void SetMergeSignalOnly(Bool_t m = kTRUE) { fMergeSignalOnly = m; }
61
62 Bool_t GetCompress() const { return fCompress; }
63 Bool_t GetSDigits() const { return fSDigits; }
64 Float_t GetSDigitsScale() const { return fSDigitsScale; }
65 Float_t GetDiffusionT(Float_t vdrift);
66 Float_t GetDiffusionL(Float_t vdrift);
67 Float_t GetLorentzFactor(Float_t vdrift);
68
69 virtual Double_t TimeStruct(Float_t vdrift, Double_t time, Double_t z);
4329977a 70 virtual Int_t Diffusion(Float_t vdrift, Double_t absdriftlength
71 , Double_t &lRow, Double_t &lCol, Double_t &lTime);
72 virtual Int_t ExB(Float_t vdrift, Double_t driftlength, Double_t &lRow);
4d18a639 73
74 AliTRDdigitsManager *Digits() const { return fDigitsManager; }
3551db50 75
3becff3c 76 protected:
f7336fa3 77
4d18a639 78 void SampleTimeStruct(Float_t vdrift);
79 void RecalcDiffusion(Float_t vdrift);
80
f4611fed 81 AliRunLoader *fRunLoader; //! Local pointer
abaf1f1d 82 AliTRDdigitsManager *fDigitsManager; //! Manager for the output digits
83 AliTRDdigitsManager *fSDigitsManager; //! Manager for the summed input s-digits
84 TList *fSDigitsManagerList; //! List of managers of input s-digits
85 AliTRD *fTRD; //! TRD detector class
86 AliTRDgeometry *fGeo; //! TRD geometry
4d18a639 87
88 Int_t fEvent; //! Event number
89 Int_t *fMasks; //! Masks for the merging
90 Bool_t fCompress; // Switch to keep only compressed data in memory
91 Bool_t fSDigits; // Switch for the summable digits
92 Float_t fSDigitsScale; // Scale factor for the summable digits
93 Bool_t fMergeSignalOnly; // Merge only detectors that contain a signal
3551db50 94
4d18a639 95 Float_t fDiffLastVdrift; // The structures are valid for fLastVdrift (caching)
96 Float_t fDiffusionT; // Transverse drift coefficient
97 Float_t fDiffusionL; // Longitudinal drift coefficient
98 Float_t fOmegaTau; // Tangens of the Lorentz angle
99 Float_t fLorentzFactor; // Factor due to Lorentz force
100
101 Float_t fTimeLastVdrift; // The structures are valid for fLastVdrift (caching)
324b8ec7 102 Float_t *fTimeStruct1; //! Time Structure of Drift Cells
103 Float_t *fTimeStruct2; //! Time Structure of Drift Cells
4d18a639 104 Float_t fVDlo; // Lower drift velocity, for interpolation
105 Float_t fVDhi; // Higher drift velocity, for interpolation
3551db50 106
3becff3c 107 private:
3551db50 108
4d18a639 109 virtual Bool_t Init();
793ff80c 110
324b8ec7 111 ClassDef(AliTRDdigitizer,14) // Produces TRD-Digits
f7336fa3 112
113};
114
115#endif