Digitize:
[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
94de3818 8#include "TNamed.h"
9#include "TAttLine.h"
10#include "TAttMarker.h"
11
12//#include <TSystem.h>
13class TClonesArray;
14class TBrowser;
15class TArrayI;
8494b010 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
94de3818 27 virtual int GetNdigits() const {return 0;}
28 virtual int GetNhits() const {return 0;}
02ca2762 29 virtual TArrayI *GetIdtmed() const {return fIdtmed;}
30 virtual TList *Histograms() const {return fHistograms;}
31 virtual TList *Nodes() const {return fNodes;}
94de3818 32 virtual TClonesArray *Digits() const {return 0;}
33 virtual TClonesArray *Hits() const {return 0;}
34 virtual TObjArray *Points() const {return 0;}
35 virtual Int_t GetIshunt() const {return 0;}
7103de83 36 virtual void SetIshunt(Int_t) {}
02ca2762 37 virtual Bool_t IsActive() const {return fActive;}
b21a3d1a 38 virtual Bool_t IsFolder() const {return kTRUE;}
7103de83 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() {}
24de2263 80 virtual void FinishPrimary() {}
81 virtual void RemapTrackHitIDs(Int_t *map) {}
82
dda5e866 83 //virtual void Hits2Digits() {}
8494b010 84 virtual void Init() {}
85 virtual void LoadPoints(Int_t ) {}
86 virtual void MakeBranch(Option_t *) {}
87 virtual void Paint(Option_t *) {}
88 virtual void ResetDigits() {}
89 virtual void ResetHits() {}
90 virtual void ResetPoints() {}
91 virtual void SetTreeAddress() {}
92 virtual void SetTimeGate(Float_t) {}
94de3818 93 virtual Float_t GetTimeGate() const {return 1.e10;}
8494b010 94 virtual void StepManager() {}
8918e700 95 virtual void SetBufferSize(Int_t) {}
aee8290b 96 virtual void SetEuclidFile(char *material,char *geometry=0);
97 virtual void ReadEuclid(const char *filnam, char *topvol);
98 virtual void ReadEuclidMedia(const char *filnam);
ef42d733 99 AliModule& operator=(const AliModule &mod);
100 void Copy(AliModule &mod) const;
8494b010 101
aee8290b 102protected:
103 // Data members
104
105 TString fEuclidMaterial; //Name of the Euclid file for materials (if any)
106 TString fEuclidGeometry; //Name of the Euclid file for geometry (if any)
107
108 TArrayI *fIdtmed; //List of tracking medium numbers
109 TArrayI *fIdmate; //List of material numbers
110 Int_t fLoMedium; //Minimum tracking medium ID for this Module
111 Int_t fHiMedium; //Maximum tracking medium ID for this Module
112
113 Bool_t fActive; //Detector activity flag
114 TList *fHistograms; //List of histograms
115 TList *fNodes; //List of geometry nodes
116
8494b010 117 ClassDef(AliModule,1) //Base class for ALICE Modules
118};
119#endif