AliRoot Core  3dc7879 (3dc7879)
AliDetector.h
Go to the documentation of this file.
1 #ifndef ALIDETECTOR_H
2 #define ALIDETECTOR_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 /* $Id$ */
7 
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 
15 #include "AliModule.h"
16 
17 class AliHit;
18 class TTree;
19 class TBranch;
20 class AliLoader;
21 
22 class AliDetector : public AliModule {
23 
24 public:
25 
26  // Creators - distructors
27  AliDetector(const char* name, const char *title);
28  AliDetector();
29  virtual ~AliDetector();
30 
31  // Inline functions
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;}
38 
39  Int_t GetIshunt() const {return fIshunt;}
40  void SetIshunt(Int_t ishunt) {fIshunt=ishunt;}
41 
42  // Other methods
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;
50 
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);
61 
62  void MakeTree(Option_t *option); //skowron
63  virtual void RemapTrackHitIDs(Int_t *) {}
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
68  // Data members
69 protected:
70 
71  Float_t fTimeGate; //Time gate in seconds
72 
73  Int_t fIshunt; //1 if the hit is attached to the primary
74  Int_t fNhits;
75  Int_t fNdigits;
76  Int_t fBufferSize;
77  Int_t fMaxIterHit;
78  Int_t fCurIterHit;
79  TClonesArray *fHits;
80  TClonesArray *fDigits;
81 
83 
84  private:
85  AliDetector(const AliDetector &det);
86  AliDetector &operator=(const AliDetector &det);
87 
88  ClassDef(AliDetector,5) //Base class for ALICE detectors
89 };
90 #endif
TBrowser b
Definition: RunAnaESD.C:12
TClonesArray * fHits
Counter for the hit iterator.
Definition: AliDetector.h:79
Int_t fBufferSize
Number of digits.
Definition: AliDetector.h:76
virtual void SetTimeGate(Float_t gate)
Definition: AliDetector.h:52
TClonesArray * Hits() const
Definition: AliDetector.h:35
virtual ~AliDetector()
Definition: AliDetector.cxx:96
TClonesArray * Digits() const
Definition: AliDetector.h:34
virtual void SetTreeAddress()
Int_t fCurIterHit
Limit for the hit iterator.
Definition: AliDetector.h:78
Definition: AliHit.h:14
void SetLoader(AliLoader *loader)
Definition: AliDetector.h:66
virtual void DrawModule() const
Definition: AliDetector.h:55
Int_t fNhits
Definition: AliDetector.h:74
virtual Bool_t IsModule() const
Definition: AliDetector.h:36
virtual AliHit * NextHit()
virtual Float_t GetTimeGate() const
Definition: AliDetector.h:53
Int_t fMaxIterHit
buffer size for Tree detector branches
Definition: AliDetector.h:77
Int_t fNdigits
Number of hits.
Definition: AliDetector.h:75
AliTPCfastTrack * track
virtual Bool_t IsDetector() const
Definition: AliDetector.h:37
virtual void SetBufferSize(Int_t bufsize=8000)
Definition: AliDetector.h:58
virtual void ResetHits()
virtual void FinishRun()
virtual int GetNhits() const
Definition: AliDetector.h:33
virtual void Browse(TBrowser *b)
TTree * tree
AliLoader * fLoader
List of digits for this detector.
Definition: AliDetector.h:82
virtual int GetNdigits() const
Definition: AliDetector.h:32
virtual void MakeBranch(Option_t *opt=" ")
TClonesArray * fDigits
List of hits for one track only.
Definition: AliDetector.h:80
Float_t fTimeGate
Definition: AliDetector.h:71
void SetIshunt(Int_t ishunt)
Definition: AliDetector.h:40
Int_t GetIshunt() const
Definition: AliDetector.h:39
AliDetector & operator=(const AliDetector &det)
virtual TBranch * MakeBranchInTree(TTree *tree, const char *cname, void *address, Int_t size=32000, const char *file=0)
virtual void Publish(const char *dir, void *c, const char *name=0) const
virtual AliLoader * MakeLoader(const char *topfoldername)
virtual AliHit * FirstHit(Int_t track)
virtual void RemapTrackHitIDs(Int_t *)
Definition: AliDetector.h:63
AliLoader * GetLoader() const
Definition: AliDetector.h:67
void MakeTree(Option_t *option)
Int_t fIshunt
Definition: AliDetector.h:73
virtual void AddAlignableVolumes() const
virtual void ResetDigits()
virtual void StepManager()
Definition: AliDetector.h:54