New version from M.Kowalski
[u/mrichter/AliRoot.git] / STEER / AliDetector.h
... / ...
CommitLineData
1#ifndef AliDetector_H
2#define AliDetector_H
3#include <AliModule.h>
4#include <AliHit.h>
5
6class AliDetector : public AliModule {
7
8 // Data members
9protected:
10
11 Float_t fTimeGate; //Time gate in seconds
12
13 Int_t fIshunt; //1 if the hit is attached to the primary
14 Int_t fNhits; //Number of hits
15 Int_t fNdigits; //Number of digits
16 Int_t fBufferSize; //buffer size for Tree detector branches
17 TClonesArray *fHits; //List of hits for one track only
18 TClonesArray *fDigits; //List of digits for this detector
19 TObjArray *fPoints; //Array of points for each track (all tracks in memory)
20
21public:
22
23 // Creators - distructors
24 AliDetector(const char* name, const char *title);
25 AliDetector();
26 virtual ~AliDetector();
27
28 // Inline functions
29 inline virtual int GetNdigits() {return fNdigits;}
30 inline virtual int GetNhits() {return fNhits;}
31 inline TClonesArray *Digits() {return fDigits;}
32 inline TClonesArray *Hits() {return fHits;}
33 inline TObjArray *Points() {return fPoints;}
34 inline Int_t GetIshunt() {return fIshunt;}
35 inline void SetIshunt(Int_t ishunt) {fIshunt=ishunt;}
36
37 // Other methods
38 virtual void Browse(TBrowser *b);
39 virtual void FinishRun();
40 virtual void LoadPoints(Int_t track);
41 virtual void MakeBranch(Option_t *opt=" ");
42 virtual void ResetDigits();
43 virtual void ResetHits();
44 virtual void ResetPoints();
45 virtual void SetTreeAddress();
46 virtual void SetTimeGate(Float_t gate) {fTimeGate=gate;}
47 virtual Float_t GetTimeGate() {return fTimeGate;}
48 virtual void StepManager() {}
49 virtual void DrawModule() {}
50 virtual AliHit* FirstHit(Int_t);
51 virtual AliHit* NextHit();
52 virtual void SetBufferSize(Int_t bufsize=8000) {fBufferSize = bufsize;}
53
54 ClassDef(AliDetector,1) //Base class for ALICE detectors
55};
56#endif