Fixing dimension of hits array
[u/mrichter/AliRoot.git] / STEER / AliModule.h
CommitLineData
aee8290b 1#ifndef ALIMODULE_H
2#define ALIMODULE_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 <TNamed.h>
b13db077 9#include <TSystem.h>
8494b010 10#include <TClonesArray.h>
11#include <TBrowser.h>
12#include <TAttLine.h>
13#include <TAttMarker.h>
14#include <TArrayI.h>
8494b010 15#include <AliHit.h>
16
17class AliModule : public TNamed , public TAttLine, public TAttMarker {
8494b010 18public:
19
20 // Creators - distructors
21 AliModule(const char* name, const char *title);
22 AliModule();
aee8290b 23 AliModule(const AliModule &mod);
8494b010 24 virtual ~AliModule();
25
26 // Inline functions
7103de83 27 virtual int GetNdigits() {return 0;}
28 virtual int GetNhits() {return 0;}
02ca2762 29 virtual TArrayI *GetIdtmed() const {return fIdtmed;}
30 virtual TList *Histograms() const {return fHistograms;}
31 virtual TList *Nodes() const {return fNodes;}
7103de83 32 virtual TClonesArray *Digits() {return 0;}
33 virtual TClonesArray *Hits() {return 0;}
34 virtual TObjArray *Points() {return 0;}
35 virtual Int_t GetIshunt() {return 0;}
36 virtual void SetIshunt(Int_t) {}
02ca2762 37 virtual Bool_t IsActive() const {return fActive;}
7103de83 38 virtual Bool_t IsFolder() {return kTRUE;}
39 virtual Int_t& LoMedium() {return fLoMedium;}
40 virtual Int_t& HiMedium() {return fHiMedium;}
8494b010 41
42 // Module composition
aee8290b 43 virtual void AliMaterial(Int_t imat, const char* name, Float_t a,
44 Float_t z, Float_t dens, Float_t radl,
45 Float_t absl, Float_t *buf=0, Int_t nwbuf=0) const;
46 virtual void AliGetMaterial(Int_t imat, char* name, Float_t &a,
47 Float_t &z, Float_t &dens, Float_t &radl,
48 Float_t &absl);
49 virtual void AliMixture(Int_t imat, const char *name, Float_t *a,
50 Float_t *z, Float_t dens, Int_t nlmat,
51 Float_t *wmat) const;
52 virtual void AliMedium(Int_t numed, const char *name, Int_t nmat,
53 Int_t isvol, Int_t ifield, Float_t fieldm,
54 Float_t tmaxfd, Float_t stemax, Float_t deemax,
55 Float_t epsil, Float_t stmin, Float_t *ubuf=0,
56 Int_t nbuf=0) const;
57 virtual void AliMatrix(Int_t &nmat, Float_t theta1, Float_t phi1,
58 Float_t theta2, Float_t phi2, Float_t theta3,
59 Float_t phi3) const;
8494b010 60
61 // Virtual methods
62 virtual void BuildGeometry() {};
63 virtual Int_t IsVersion() const =0;
64
65 // Other methods
dda5e866 66 virtual void AddDigit(Int_t*, Int_t*){
67 Error("AddDigit","Digits cannot be added to module %s\n",fName.Data());}
68 virtual void AddHit(Int_t, Int_t*, Float_t *) {
69 Error("AddDigit","Hits cannot be added to module %s\n",fName.Data());}
7103de83 70 virtual void Browse(TBrowser *) {}
8494b010 71 virtual void CreateGeometry() {}
72 virtual void CreateMaterials() {}
73 virtual void Disable();
74 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
75 virtual void Enable();
7103de83 76 virtual void PreTrack(){}
77 virtual void PostTrack(){}
78 virtual void FinishEvent() {}
8494b010 79 virtual void FinishRun() {}
dda5e866 80 //virtual void Hits2Digits() {}
8494b010 81 virtual void Init() {}
82 virtual void LoadPoints(Int_t ) {}
83 virtual void MakeBranch(Option_t *) {}
84 virtual void Paint(Option_t *) {}
85 virtual void ResetDigits() {}
86 virtual void ResetHits() {}
87 virtual void ResetPoints() {}
88 virtual void SetTreeAddress() {}
89 virtual void SetTimeGate(Float_t) {}
90 virtual Float_t GetTimeGate() {return 1.e10;}
91 virtual void StepManager() {}
dda5e866 92 //virtual AliHit* FirstHit(Int_t) {return 0;}
93 //virtual AliHit* NextHit() {return 0;}
aee8290b 94 virtual void SetBufferSize(Int_t bufsiz) {}
95 virtual void SetEuclidFile(char *material,char *geometry=0);
96 virtual void ReadEuclid(const char *filnam, char *topvol);
97 virtual void ReadEuclidMedia(const char *filnam);
98 virtual AliModule& operator=(const AliModule &mod);
99 virtual void Copy(AliModule &mod) const;
8494b010 100
aee8290b 101protected:
102 // Data members
103
104 TString fEuclidMaterial; //Name of the Euclid file for materials (if any)
105 TString fEuclidGeometry; //Name of the Euclid file for geometry (if any)
106
107 TArrayI *fIdtmed; //List of tracking medium numbers
108 TArrayI *fIdmate; //List of material numbers
109 Int_t fLoMedium; //Minimum tracking medium ID for this Module
110 Int_t fHiMedium; //Maximum tracking medium ID for this Module
111
112 Bool_t fActive; //Detector activity flag
113 TList *fHistograms; //List of histograms
114 TList *fNodes; //List of geometry nodes
115
8494b010 116 ClassDef(AliModule,1) //Base class for ALICE Modules
117};
118#endif