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