]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliDetector.h
- TrackReference related methods and data members moved from AliDetector to AliModule
[u/mrichter/AliRoot.git] / STEER / AliDetector.h
CommitLineData
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
8494b010 8#include <AliModule.h>
94de3818 9class AliHit;
2ab0c725 10class TTree;
9e1a0ddb 11class TBranch;
8494b010 12class AliDetector : public AliModule {
fe4da5cc 13
fe4da5cc 14public:
15
16 // Creators - distructors
17 AliDetector(const char* name, const char *title);
18 AliDetector();
e2afb3b6 19 AliDetector(const AliDetector &det);
fe4da5cc 20 virtual ~AliDetector();
21
22 // Inline functions
6644b9ca 23 void Copy(AliDetector &det) const;
94de3818 24 virtual int GetNdigits() const {return fNdigits;}
25 virtual int GetNhits() const {return fNhits;}
26 TClonesArray *Digits() const {return fDigits;}
27 TClonesArray *Hits() const {return fHits;}
28 TObjArray *Points() const {return fPoints;}
29 Int_t GetIshunt() const {return fIshunt;}
8918e700 30 void SetIshunt(Int_t ishunt) {fIshunt=ishunt;}
ef42d733 31 AliDetector &operator=(const AliDetector &det)
8918e700 32 {det.Copy(*this); return (*this);}
fe4da5cc 33
fe4da5cc 34 // Other methods
9e1a0ddb 35 virtual void Publish(const char *dir, void *c, const char *name=0);
fe4da5cc 36 virtual void Browse(TBrowser *b);
fe4da5cc 37 virtual void FinishRun();
fe4da5cc 38 virtual void LoadPoints(Int_t track);
9e1a0ddb 39 virtual void MakeBranch(Option_t *opt=" ", const char *file=0 );
aab9c8d5 40 virtual void MakeBranchTR(Option_t *opt=" ", const char *file=0 );
fe4da5cc 41 virtual void ResetDigits();
42 virtual void ResetHits();
43 virtual void ResetPoints();
44 virtual void SetTreeAddress();
45 virtual void SetTimeGate(Float_t gate) {fTimeGate=gate;}
94de3818 46 virtual Float_t GetTimeGate() const {return fTimeGate;}
8494b010 47 virtual void StepManager() {}
48 virtual void DrawModule() {}
8918e700 49 virtual AliHit* FirstHit(Int_t track);
fe4da5cc 50 virtual AliHit* NextHit();
51 virtual void SetBufferSize(Int_t bufsize=8000) {fBufferSize = bufsize;}
9e1a0ddb 52 virtual TBranch* MakeBranchInTree(TTree *tree, const char* cname, void* address, Int_t size=32000, const char *file=0);
d0f40f23 53 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);
9e1a0ddb 54
8918e700 55 // Data members
56protected:
57
58 Float_t fTimeGate; //Time gate in seconds
59
60 Int_t fIshunt; //1 if the hit is attached to the primary
2ab0c725 61 Int_t fNhits; //!Number of hits
62 Int_t fNdigits; //!Number of digits
63 Int_t fBufferSize; //!buffer size for Tree detector branches
8918e700 64 TClonesArray *fHits; //List of hits for one track only
65 TClonesArray *fDigits; //List of digits for this detector
2ab0c725 66 char *fDigitsFile; //!File to store branches of digits tree for detector
67 TObjArray *fPoints; //!Array of points for each track (all tracks in memory)
2cad796f 68
69 ClassDef(AliDetector,3) //Base class for ALICE detectors
fe4da5cc 70};
71#endif