This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / STEER / AliDetector.h
CommitLineData
fe4da5cc 1#ifndef AliDetector_H
2#define AliDetector_H
3#include <TNamed.h>
4#include <TClonesArray.h>
5#include <TBrowser.h>
6#include <TAttLine.h>
7#include <TAttMarker.h>
8#include <TArrayI.h>
9#include <Gtypes.h>
10#include <AliHit.h>
11
12class AliDetector : public TNamed , public TAttLine, public TAttMarker {
13
14 // Data members
15protected:
16
17 TString fEuclidMaterial; //Name of the Euclid file for materials (if any)
18 TString fEuclidGeometry; //Name of the Euclid file for geometry (if any)
19
20 TArrayI *fIdtmed; //List of tracking medium numbers
21 TArrayI *fIdmate; //List of material numbers
22 Int_t fLoMedium; //Minimum tracking medium ID for this detector
23 Int_t fHiMedium; //Maximum tracking medium ID for this detector
24
25 Float_t fTimeGate; //Time gate in seconds
26
27 Bool_t fActive; //Detector activity flag
28 Int_t fIshunt; //1 if the hit is attached to the primary
29 Int_t fNhits; //Number of hits
30 Int_t fNdigits; //Number of digits
31 Int_t fBufferSize; //buffer size for Tree detector branches
32 TList *fHistograms; //List of histograms
33 TList *fNodes; //List of geometry nodes
34 TClonesArray *fHits; //List of hits for one track only
35 TClonesArray *fDigits; //List of digits for this detector
36 TObjArray *fPoints; //Array of points for each track (all tracks in memory)
37
38public:
39
40 // Creators - distructors
41 AliDetector(const char* name, const char *title);
42 AliDetector();
43 virtual ~AliDetector();
44
45 // Inline functions
46 inline virtual int GetNdigits() {return fNdigits;}
47 inline virtual int GetNhits() {return fNhits;}
48 inline TList *Histograms() {return fHistograms;}
49 inline TList *Nodes() {return fNodes;}
50 inline TClonesArray *Digits() {return fDigits;}
51 inline TClonesArray *Hits() {return fHits;}
52 inline TObjArray *Points() {return fPoints;}
53 inline Int_t GetIshunt() {return fIshunt;}
54 inline void SetIshunt(Int_t ishunt) {fIshunt=ishunt;}
55 inline Bool_t IsActive() {return fActive;}
56 inline Bool_t IsFolder() {return kTRUE;}
57 inline Int_t& LoMedium() {return fLoMedium;}
58 inline Int_t& HiMedium() {return fHiMedium;}
59
60 // Detector composition
61 virtual void AliMaterial(Int_t, const char*, Float_t, Float_t, Float_t, Float_t,
62 Float_t, Float_t* buf=0, Int_t nwbuf=0) const;
63 virtual void AliMixture(Int_t, const char*, Float_t*, Float_t*, Float_t, Int_t, Float_t*) const;
64 virtual void AliMedium(Int_t, const char*, Int_t, Int_t, Int_t, Float_t, Float_t,
65 Float_t, Float_t, Float_t, Float_t, Float_t* ubuf=0, Int_t nbuf=0) const;
66 virtual void AliMatrix(Int_t&, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t) const;
67
68 // Virtual methods
69 virtual void BuildGeometry()=0;
70 virtual Int_t IsVersion() const =0;
71
72 // Other methods
73 virtual void AddDigit(Int_t*, Int_t*){}
74 virtual void AddHit(Int_t, Int_t*, Float_t *) {}
75 virtual void Browse(TBrowser *b);
76 virtual void CreateGeometry() {}
77 virtual void CreateMaterials() {}
78 virtual void Disable();
79 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
80 virtual void Enable();
81 virtual inline void PreTrack(){}
82 virtual inline void PostTrack(){}
83 virtual inline void FinishEvent() {}
84 virtual void FinishRun();
85 virtual void Hits2Digits() {}
86 virtual void Init() {}
87 virtual void LoadPoints(Int_t track);
88 virtual void MakeBranch(Option_t *opt=" ");
89 virtual void Paint(Option_t *) {}
90 virtual void ResetDigits();
91 virtual void ResetHits();
92 virtual void ResetPoints();
93 virtual void SetTreeAddress();
94 virtual void SetTimeGate(Float_t gate) {fTimeGate=gate;}
95 virtual Float_t GetTimeGate() {return fTimeGate;}
96 virtual void StepManager();
97 virtual void DrawDetector() {}
98 virtual AliHit* FirstHit(Int_t);
99 virtual AliHit* NextHit();
100 virtual void SetBufferSize(Int_t bufsize=8000) {fBufferSize = bufsize;}
101 virtual void SetEuclidFile(char*,char*geometry=0);
102
103 ClassDef(AliDetector,1) //Base class for ALICE detectors
104};
105#endif