SetObjectClassName removed
[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
85cbec76 8#include "AliDigitizer.h"
f7336fa3 9
793ff80c 10class TFile;
11class TF1;
12
85cbec76 13class AliRunDigitizer;
88cb7938 14class AliRunLoader;
85cbec76 15
793ff80c 16class AliTRD;
6f1e466d 17class AliTRDdigitsManager;
793ff80c 18class AliTRDgeometry;
f7336fa3 19
20///////////////////////////////////////////////////////
21// Produces digits from the hits information //
22///////////////////////////////////////////////////////
23
85cbec76 24class 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; };
4487dad0 52 virtual void SetSDigits(Int_t v = 1) { fSDigits = v; };
53 virtual void SetSDigitsScale(Float_t s) { fSDigitsScale = s; };
54 virtual void SetEvent(Int_t v = 0) { fEvent = v; };
7754cd1f 55 virtual void SetManager(AliTRDdigitsManager *man) { fDigitsManager = man; };
4487dad0 56 virtual void SetGeometry(AliTRDgeometry *geo) { fGeo = geo; };
4487dad0 57 virtual void SetMergeSignalOnly(Bool_t m = kTRUE) { fMergeSignalOnly = m; };
58
59 AliTRDdigitsManager *Digits() const { return fDigitsManager; };
60
3becff3c 61 Bool_t GetCompress() const { return fCompress; };
62 Bool_t GetSDigits() const { return fSDigits; };
63 Float_t GetSDigitsScale() const { return fSDigitsScale; };
f7336fa3 64
7754cd1f 65 virtual Double_t TimeStruct(Float_t vdrift, Double_t time, Double_t z);
3551db50 66
3becff3c 67 Float_t GetDiffusionT(Float_t vdrift);
68 Float_t GetDiffusionL(Float_t vdrift);
69 virtual Int_t Diffusion(Float_t vdrift, Double_t driftlength, Double_t *xyz);
3551db50 70
3becff3c 71 Float_t GetLorentzFactor(Float_t vdrift);
72 virtual Int_t ExB(Float_t vdrift, Double_t driftlength, Double_t *xyz);
3551db50 73
3becff3c 74 protected:
f7336fa3 75
f4611fed 76 AliRunLoader *fRunLoader; //! Local pointer
abaf1f1d 77 AliTRDdigitsManager *fDigitsManager; //! Manager for the output digits
78 AliTRDdigitsManager *fSDigitsManager; //! Manager for the summed input s-digits
79 TList *fSDigitsManagerList; //! List of managers of input s-digits
80 AliTRD *fTRD; //! TRD detector class
81 AliTRDgeometry *fGeo; //! TRD geometry
abaf1f1d 82 Int_t fEvent; //! Event number
e23fbb27 83 Int_t *fMasks; //! Masks for the merging
abaf1f1d 84 Bool_t fCompress; // Switch to keep only compressed data in memory
abaf1f1d 85 Bool_t fSDigits; // Switch for the summable digits
86 Float_t fSDigitsScale; // Scale factor for the summable digits
4487dad0 87 Bool_t fMergeSignalOnly; // Merge only detectors that contain a signal
3becff3c 88
89 void SampleTimeStruct(Float_t vdrift);
90 void RecalcDiffusion(Float_t vdrift);
3551db50 91
92 struct
93 {
0180a001 94 Float_t fLastVdrift; //! The structures are valid for fLastVdrift (caching)
95 Float_t fDiffusionT; //! Transverse drift coefficient
96 Float_t fDiffusionL; //! Longitudinal drift coefficient
97 Float_t fOmegaTau; //! Tangens of the Lorentz angle
98 Float_t fLorentzFactor; //! Factor due to Lorentz force
99 } fDiffusionInfo; //! Do not write the structures
3551db50 100
101 struct
102 {
0180a001 103 Float_t fLastVdrift; //! The structures are valid for fLastVdrift (caching)
3551db50 104 Float_t *fTimeStruct1; //! Time Structure of Drift Cells
105 Float_t *fTimeStruct2; //! Time Structure of Drift Cells
0180a001 106 Float_t fVDlo; //! Lower drift velocity, for interpolation
107 Float_t fVDhi; //! Higher drift velocity, for interpolation
108 } fTimeStructInfo; //! Do not write the structures
3551db50 109
3becff3c 110 private:
3551db50 111
3becff3c 112 virtual Bool_t Init();
793ff80c 113
9afbd7de 114 ClassDef(AliTRDdigitizer,12) // Produces TRD-Digits
f7336fa3 115
116};
117
118#endif