Virtual member functions (T.Kuhr)
[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
e2afb3b6 8#include "Riostream.h"
9
94de3818 10#include "TAttLine.h"
11#include "TAttMarker.h"
e2afb3b6 12#include "TNamed.h"
13
65fb704d 14#include "AliRndm.h"
94de3818 15
94de3818 16class TClonesArray;
17class TBrowser;
18class TArrayI;
2ab0c725 19class TFile;
88cb7938 20class TTree;
21class AliLoader;
2cad796f 22class AliTrackReference;
85a5290f 23class AliDigitizer;
24class AliRunDigitizer;
8494b010 25
88cb7938 26
65fb704d 27class AliModule : public TNamed , public TAttLine, public TAttMarker,
28 public AliRndm {
8494b010 29public:
30
31 // Creators - distructors
32 AliModule(const char* name, const char *title);
33 AliModule();
aee8290b 34 AliModule(const AliModule &mod);
8494b010 35 virtual ~AliModule();
36
37 // Inline functions
94de3818 38 virtual int GetNdigits() const {return 0;}
39 virtual int GetNhits() const {return 0;}
02ca2762 40 virtual TArrayI *GetIdtmed() const {return fIdtmed;}
41 virtual TList *Histograms() const {return fHistograms;}
42 virtual TList *Nodes() const {return fNodes;}
94de3818 43 virtual TClonesArray *Digits() const {return 0;}
44 virtual TClonesArray *Hits() const {return 0;}
45 virtual TObjArray *Points() const {return 0;}
46 virtual Int_t GetIshunt() const {return 0;}
7103de83 47 virtual void SetIshunt(Int_t) {}
02ca2762 48 virtual Bool_t IsActive() const {return fActive;}
b21a3d1a 49 virtual Bool_t IsFolder() const {return kTRUE;}
7103de83 50 virtual Int_t& LoMedium() {return fLoMedium;}
51 virtual Int_t& HiMedium() {return fHiMedium;}
65fb704d 52 virtual Int_t GetDebug() const {return fDebug;}
53 virtual void SetDebug(Int_t deb=0) {fDebug=deb;}
8494b010 54
55 // Module composition
aee8290b 56 virtual void AliMaterial(Int_t imat, const char* name, Float_t a,
57 Float_t z, Float_t dens, Float_t radl,
58 Float_t absl, Float_t *buf=0, Int_t nwbuf=0) const;
59 virtual void AliGetMaterial(Int_t imat, char* name, Float_t &a,
88cb7938 60 Float_t &z, Float_t &dens, Float_t &radl,
61 Float_t &absl) const;
aee8290b 62 virtual void AliMixture(Int_t imat, const char *name, Float_t *a,
88cb7938 63 Float_t *z, Float_t dens, Int_t nlmat,
64 Float_t *wmat) const;
aee8290b 65 virtual void AliMedium(Int_t numed, const char *name, Int_t nmat,
88cb7938 66 Int_t isvol, Int_t ifield, Float_t fieldm,
67 Float_t tmaxfd, Float_t stemax, Float_t deemax,
68 Float_t epsil, Float_t stmin, Float_t *ubuf=0,
69 Int_t nbuf=0) const;
aee8290b 70 virtual void AliMatrix(Int_t &nmat, Float_t theta1, Float_t phi1,
88cb7938 71 Float_t theta2, Float_t phi2, Float_t theta3,
72 Float_t phi3) const;
8494b010 73
74 // Virtual methods
75 virtual void BuildGeometry() {};
76 virtual Int_t IsVersion() const =0;
88cb7938 77
78
8494b010 79 // Other methods
dda5e866 80 virtual void AddDigit(Int_t*, Int_t*){
81 Error("AddDigit","Digits cannot be added to module %s\n",fName.Data());}
82 virtual void AddHit(Int_t, Int_t*, Float_t *) {
83 Error("AddDigit","Hits cannot be added to module %s\n",fName.Data());}
2ab0c725 84 virtual void Hits2SDigits() {}
c92eb8ad 85 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* /*manager*/) const
85a5290f 86 {return NULL;}
2ab0c725 87 virtual void SDigits2Digits() {}
85a5290f 88 virtual void Hits2Digits() {}
fe961a91 89 virtual void Digits2Reco() {}
2ab0c725 90 virtual void Digits2Raw() {}
91 virtual void Raw2Digits() {}
7103de83 92 virtual void Browse(TBrowser *) {}
8494b010 93 virtual void CreateGeometry() {}
94 virtual void CreateMaterials() {}
95 virtual void Disable();
8494b010 96 virtual void Enable();
7103de83 97 virtual void PreTrack(){}
98 virtual void PostTrack(){}
99 virtual void FinishEvent() {}
8494b010 100 virtual void FinishRun() {}
24de2263 101 virtual void FinishPrimary() {}
8494b010 102 virtual void Init() {}
103 virtual void LoadPoints(Int_t ) {}
88cb7938 104
105
106
9b62c596 107 virtual void MakeBranch(Option_t * /*opt =" "*/) {}
88cb7938 108 virtual void MakeTree(Option_t *) {}//skowron
109
110 virtual AliLoader* MakeLoader(const char* topfoldername);//skowron
111 virtual AliLoader* GetLoader() const {return 0x0;} //skowron
112
113
8494b010 114 virtual void Paint(Option_t *) {}
115 virtual void ResetDigits() {}
2ab0c725 116 virtual void ResetSDigits() {}
8494b010 117 virtual void ResetHits() {}
118 virtual void ResetPoints() {}
2cad796f 119 virtual void SetTreeAddress();
8494b010 120 virtual void SetTimeGate(Float_t) {}
94de3818 121 virtual Float_t GetTimeGate() const {return 1.e10;}
8494b010 122 virtual void StepManager() {}
3f754d83 123 virtual void DisableStepManager() {fEnable = kFALSE;}
116cbefd 124 virtual Bool_t StepManagerIsEnabled() const {return fEnable;}
8918e700 125 virtual void SetBufferSize(Int_t) {}
65fb704d 126 virtual Float_t ZMin() const;
127 virtual Float_t ZMax() const;
aee8290b 128 virtual void SetEuclidFile(char *material,char *geometry=0);
88cb7938 129 virtual void ReadEuclid(const char *filnam, char *topvol);
130 virtual void ReadEuclidMedia(const char *filnam);
2cad796f 131// Track reference related
132 TClonesArray *TrackReferences() const {return fTrackReferences;}
133 virtual void RemapTrackHitIDs(Int_t *) {}
134 virtual void RemapTrackReferencesIDs(Int_t *map); //remaping track references MI
135 virtual void ResetTrackReferences();
88cb7938 136 virtual void AddTrackReference(Int_t label);
2cad796f 137 virtual AliTrackReference * FirstTrackReference(Int_t track);
138 virtual AliTrackReference * NextTrackReference();
88cb7938 139 virtual void MakeBranchTR(Option_t *opt=" ");
140 TTree* TreeTR(); //shorcut method for accessing treeTR from folder
2cad796f 141
142//
e2afb3b6 143 AliModule& operator=(const AliModule &mod)
144 {mod.Copy(*this); return (*this);}
8494b010 145
aee8290b 146protected:
6c4904c2 147 void Copy(TObject &mod) const;
e2afb3b6 148
aee8290b 149 // Data members
150
2ab0c725 151 TString fEuclidMaterial; //!Name of the Euclid file for materials (if any)
152 TString fEuclidGeometry; //!Name of the Euclid file for geometry (if any)
aee8290b 153
2ab0c725 154 TArrayI *fIdtmed; //!List of tracking medium numbers
155 TArrayI *fIdmate; //!List of material numbers
156 Int_t fLoMedium; //!Minimum tracking medium ID for this Module
157 Int_t fHiMedium; //!Maximum tracking medium ID for this Module
aee8290b 158
159 Bool_t fActive; //Detector activity flag
160 TList *fHistograms; //List of histograms
161 TList *fNodes; //List of geometry nodes
65fb704d 162 Int_t fDebug; //Debug flag
3f754d83 163 Bool_t fEnable; //StepManager enabling flag
2388c363 164 TClonesArray *fTrackReferences; //!list of track references - for one primary track only -MI
2cad796f 165 Int_t fMaxIterTrackRef; //!for track refernce iterator routines
166 Int_t fCurrentIterTrackRef; //!for track refernce iterator routines
ac4ea1ec 167 ClassDef(AliModule,5) //Base class for ALICE Modules
8494b010 168};
169#endif