3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
9 // This is the basic detector class from which
10 // all ALICE detector derive.
11 // This class is the base for the implementation of all detectors
15 #include "AliModule.h"
22 class AliDetector : public AliModule {
26 // Creators - distructors
27 AliDetector(const char* name, const char *title);
29 virtual ~AliDetector();
32 virtual int GetNdigits() const {return fNdigits;}
33 virtual int GetNhits() const {return fNhits;}
34 TClonesArray *Digits() const {return fDigits;}
35 TClonesArray *Hits() const {return fHits;}
36 virtual Bool_t IsModule() const {return kFALSE;}
37 virtual Bool_t IsDetector() const {return kTRUE;}
39 Int_t GetIshunt() const {return fIshunt;}
40 void SetIshunt(Int_t ishunt) {fIshunt=ishunt;}
43 virtual void Publish(const char *dir, void *c, const char *name=0) const;
44 virtual void Browse(TBrowser *b);
45 virtual void FinishRun();
46 virtual void MakeBranch(Option_t *opt=" ");
47 virtual void ResetDigits();
48 virtual void ResetHits();
49 virtual void AddAlignableVolumes() const;
51 virtual void SetTreeAddress();
52 virtual void SetTimeGate(Float_t gate) {fTimeGate=gate;}
53 virtual Float_t GetTimeGate() const {return fTimeGate;}
54 virtual void StepManager() {}
55 virtual void DrawModule() const {}
56 virtual AliHit* FirstHit(Int_t track);
57 virtual AliHit* NextHit();
58 virtual void SetBufferSize(Int_t bufsize=8000) {fBufferSize = bufsize;}
59 virtual TBranch* MakeBranchInTree(TTree *tree, const char* cname, void* address, Int_t size=32000, const char *file=0);
60 virtual TBranch* MakeBranchInTree(TTree *tree, const char* cname, const char* name, void* address, Int_t size=32000, Int_t splitlevel=99, const char *file=0);
62 void MakeTree(Option_t *option); //skowron
63 virtual void RemapTrackHitIDs(Int_t *) {}
65 virtual AliLoader* MakeLoader(const char* topfoldername); //builds standard getter (AliLoader type)
66 void SetLoader(AliLoader* loader){fLoader = loader;}
67 AliLoader* GetLoader() const {return fLoader;} //skowron
71 Float_t fTimeGate; //Time gate in seconds
73 Int_t fIshunt; //1 if the hit is attached to the primary
74 Int_t fNhits; //!Number of hits
75 Int_t fNdigits; //!Number of digits
76 Int_t fBufferSize; //!buffer size for Tree detector branches
77 Int_t fMaxIterHit; //!Limit for the hit iterator
78 Int_t fCurIterHit; //!Counter for the hit iterator
79 TClonesArray *fHits; //!List of hits for one track only
80 TClonesArray *fDigits; //!List of digits for this detector
82 AliLoader* fLoader;//! pointer to getter for this module skowron
85 AliDetector(const AliDetector &det);
86 AliDetector &operator=(const AliDetector &det);
88 ClassDef(AliDetector,5) //Base class for ALICE detectors