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