]>
Commit | Line | Data |
---|---|---|
8918e700 | 1 | #ifndef ALIDETECTOR_H |
2 | #define ALIDETECTOR_H | |
3da30618 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
3a83c716 | 8 | // |
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 | |
12 | // in ALICE | |
13 | // | |
14 | ||
88cb7938 | 15 | #include "AliModule.h" |
16 | ||
94de3818 | 17 | class AliHit; |
2ab0c725 | 18 | class TTree; |
9e1a0ddb | 19 | class TBranch; |
88cb7938 | 20 | class AliLoader; |
21 | ||
8494b010 | 22 | class AliDetector : public AliModule { |
fe4da5cc | 23 | |
fe4da5cc | 24 | public: |
25 | ||
26 | // Creators - distructors | |
27 | AliDetector(const char* name, const char *title); | |
28 | AliDetector(); | |
29 | virtual ~AliDetector(); | |
30 | ||
31 | // Inline functions | |
94de3818 | 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;} | |
88cb7938 | 36 | |
94de3818 | 37 | TObjArray *Points() const {return fPoints;} |
38 | Int_t GetIshunt() const {return fIshunt;} | |
8918e700 | 39 | void SetIshunt(Int_t ishunt) {fIshunt=ishunt;} |
fe4da5cc | 40 | |
fe4da5cc | 41 | // Other methods |
3a83c716 | 42 | virtual void Publish(const char *dir, void *c, const char *name=0) const; |
fe4da5cc | 43 | virtual void Browse(TBrowser *b); |
fe4da5cc | 44 | virtual void FinishRun(); |
fe4da5cc | 45 | virtual void LoadPoints(Int_t track); |
88cb7938 | 46 | virtual void MakeBranch(Option_t *opt=" "); |
fe4da5cc | 47 | virtual void ResetDigits(); |
48 | virtual void ResetHits(); | |
4787b401 | 49 | virtual void AddAlignableVolumes() const; |
88cb7938 | 50 | |
fe4da5cc | 51 | virtual void ResetPoints(); |
52 | virtual void SetTreeAddress(); | |
53 | virtual void SetTimeGate(Float_t gate) {fTimeGate=gate;} | |
94de3818 | 54 | virtual Float_t GetTimeGate() const {return fTimeGate;} |
8494b010 | 55 | virtual void StepManager() {} |
ba380e33 | 56 | virtual void DrawModule() const {} |
8918e700 | 57 | virtual AliHit* FirstHit(Int_t track); |
fe4da5cc | 58 | virtual AliHit* NextHit(); |
59 | virtual void SetBufferSize(Int_t bufsize=8000) {fBufferSize = bufsize;} | |
9e1a0ddb | 60 | virtual TBranch* MakeBranchInTree(TTree *tree, const char* cname, void* address, Int_t size=32000, const char *file=0); |
d0f40f23 | 61 | 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); |
88cb7938 | 62 | |
63 | void MakeTree(Option_t *option); //skowron | |
64 | ||
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 | |
3a83c716 | 68 | TTree* TreeH() const; //shorcut method for accessing treeH from folder |
88cb7938 | 69 | // Data members |
8918e700 | 70 | protected: |
71 | ||
72 | Float_t fTimeGate; //Time gate in seconds | |
73 | ||
74 | Int_t fIshunt; //1 if the hit is attached to the primary | |
2ab0c725 | 75 | Int_t fNhits; //!Number of hits |
76 | Int_t fNdigits; //!Number of digits | |
77 | Int_t fBufferSize; //!buffer size for Tree detector branches | |
3a83c716 | 78 | Int_t fMaxIterHit; //!Limit for the hit iterator |
79 | Int_t fCurIterHit; //!Counter for the hit iterator | |
2388c363 | 80 | TClonesArray *fHits; //!List of hits for one track only |
81 | TClonesArray *fDigits; //!List of digits for this detector | |
2ab0c725 | 82 | TObjArray *fPoints; //!Array of points for each track (all tracks in memory) |
2cad796f | 83 | |
88cb7938 | 84 | AliLoader* fLoader;//! pointer to getter for this module skowron |
85 | ||
e939a978 | 86 | private: |
87 | AliDetector(const AliDetector &det); | |
88 | AliDetector &operator=(const AliDetector &det); | |
89 | ||
ac4ea1ec | 90 | ClassDef(AliDetector,5) //Base class for ALICE detectors |
fe4da5cc | 91 | }; |
92 | #endif |