]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - STEER/AliModule.h
unload TPC clusters
[u/mrichter/AliRoot.git] / STEER / AliModule.h
... / ...
CommitLineData
1#ifndef ALIMODULE_H
2#define ALIMODULE_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#include "Riostream.h"
9
10#include "TAttLine.h"
11#include "TAttMarker.h"
12#include "TNamed.h"
13
14#include "AliRndm.h"
15
16class TClonesArray;
17class TBrowser;
18class TArrayI;
19class TFile;
20class TTree;
21class AliLoader;
22class AliTrackReference;
23class AliDigitizer;
24class AliRunDigitizer;
25
26
27class AliModule : public TNamed , public TAttLine, public TAttMarker,
28 public AliRndm {
29public:
30
31 // Creators - distructors
32 AliModule(const char* name, const char *title);
33 AliModule();
34 AliModule(const AliModule &mod);
35 virtual ~AliModule();
36
37 // Inline functions
38 virtual int GetNdigits() const {return 0;}
39 virtual int GetNhits() const {return 0;}
40 virtual TArrayI *GetIdtmed() const {return fIdtmed;}
41 virtual TList *Histograms() const {return fHistograms;}
42 virtual TList *Nodes() const {return fNodes;}
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;}
47 virtual void SetIshunt(Int_t) {}
48 virtual Bool_t IsActive() const {return fActive;}
49 virtual Bool_t IsFolder() const {return kTRUE;}
50 virtual Int_t& LoMedium() {return fLoMedium;}
51 virtual Int_t& HiMedium() {return fHiMedium;}
52 virtual Int_t GetDebug() const {return fDebug;}
53 virtual void SetDebug(Int_t deb=0) {fDebug=deb;}
54
55 // Module composition
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,
60 Float_t &z, Float_t &dens, Float_t &radl,
61 Float_t &absl) const;
62 virtual void AliMixture(Int_t imat, const char *name, Float_t *a,
63 Float_t *z, Float_t dens, Int_t nlmat,
64 Float_t *wmat) const;
65 virtual void AliMedium(Int_t numed, const char *name, Int_t nmat,
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;
70 virtual void AliMatrix(Int_t &nmat, Float_t theta1, Float_t phi1,
71 Float_t theta2, Float_t phi2, Float_t theta3,
72 Float_t phi3) const;
73
74 // Virtual methods
75 virtual void BuildGeometry() {};
76 virtual Int_t IsVersion() const =0;
77
78
79 // Other methods
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());}
84 virtual void Hits2SDigits() {}
85 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* /*manager*/)
86 {return NULL;}
87 virtual void SDigits2Digits() {}
88 virtual void Hits2Digits() {}
89 virtual void Digits2Reco() {}
90 virtual void Digits2Raw() {}
91 virtual void Raw2Digits() {}
92 virtual void Browse(TBrowser *) {}
93 virtual void CreateGeometry() {}
94 virtual void CreateMaterials() {}
95 virtual void Disable();
96 virtual void Enable();
97 virtual void PreTrack(){}
98 virtual void PostTrack(){}
99 virtual void FinishEvent() {}
100 virtual void FinishRun() {}
101 virtual void FinishPrimary() {}
102 virtual void Init() {}
103 virtual void LoadPoints(Int_t ) {}
104
105
106
107 virtual void MakeBranch(Option_t * /*opt =" "*/) {}
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
114 virtual void Paint(Option_t *) {}
115 virtual void ResetDigits() {}
116 virtual void ResetSDigits() {}
117 virtual void ResetHits() {}
118 virtual void ResetPoints() {}
119 virtual void SetTreeAddress();
120 virtual void SetTimeGate(Float_t) {}
121 virtual Float_t GetTimeGate() const {return 1.e10;}
122 virtual void StepManager() {}
123 virtual void DisableStepManager() {fEnable = kFALSE;}
124 virtual Bool_t StepManagerIsEnabled() const {return fEnable;}
125 virtual void SetBufferSize(Int_t) {}
126 virtual Float_t ZMin() const;
127 virtual Float_t ZMax() const;
128 virtual void SetEuclidFile(char *material,char *geometry=0);
129 virtual void ReadEuclid(const char *filnam, char *topvol);
130 virtual void ReadEuclidMedia(const char *filnam);
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();
136 virtual void AddTrackReference(Int_t label);
137 virtual AliTrackReference * FirstTrackReference(Int_t track);
138 virtual AliTrackReference * NextTrackReference();
139 virtual void MakeBranchTR(Option_t *opt=" ");
140 TTree* TreeTR(); //shorcut method for accessing treeTR from folder
141
142//
143 AliModule& operator=(const AliModule &mod)
144 {mod.Copy(*this); return (*this);}
145
146protected:
147 void Copy(TObject &mod) const;
148
149 // Data members
150
151 TString fEuclidMaterial; //!Name of the Euclid file for materials (if any)
152 TString fEuclidGeometry; //!Name of the Euclid file for geometry (if any)
153
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
158
159 Bool_t fActive; //Detector activity flag
160 TList *fHistograms; //List of histograms
161 TList *fNodes; //List of geometry nodes
162 Int_t fDebug; //Debug flag
163 Bool_t fEnable; //StepManager enabling flag
164 TClonesArray *fTrackReferences; //!list of track references - for one primary track only -MI
165 Int_t fMaxIterTrackRef; //!for track refernce iterator routines
166 Int_t fCurrentIterTrackRef; //!for track refernce iterator routines
167 ClassDef(AliModule,5) //Base class for ALICE Modules
168};
169#endif