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