Obsolete TrackReferences related code removed.
[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
1bb2a43c 8//
9// This is the basic class for any
10// ALICE detector module, whether it is
11// sensitive or not. Detector classes depend
12// on this.
13//
e2afb3b6 14
1bb2a43c 15#include <Riostream.h>
1bb2a43c 16#include <TNamed.h>
6c780877 17#include <TClonesArray.h>
e2afb3b6 18
421ab0fb 19#include "AliLog.h"
a5a091ce 20#include "AliTriggerDetector.h"
94de3818 21
94de3818 22class TBrowser;
23class TArrayI;
2ab0c725 24class TFile;
88cb7938 25class TTree;
26class AliLoader;
2cad796f 27class AliTrackReference;
85a5290f 28class AliDigitizer;
29class AliRunDigitizer;
2257f27e 30class AliVertexer;
6d7874d8 31class AliTracker;
32class AliESD;
33class AliRunLoader;
b99d1564 34class AliRawReader;
8494b010 35
88cb7938 36
e939a978 37class AliModule : public TNamed {
8494b010 38public:
39
40 // Creators - distructors
41 AliModule(const char* name, const char *title);
42 AliModule();
43 virtual ~AliModule();
44
45 // Inline functions
6c780877 46 virtual Int_t GetNdigits() const {return 0;}
47 virtual Int_t GetNhits() const {return 0;}
02ca2762 48 virtual TArrayI *GetIdtmed() const {return fIdtmed;}
49 virtual TList *Histograms() const {return fHistograms;}
50 virtual TList *Nodes() const {return fNodes;}
94de3818 51 virtual TClonesArray *Digits() const {return 0;}
52 virtual TClonesArray *Hits() const {return 0;}
53 virtual TObjArray *Points() const {return 0;}
54 virtual Int_t GetIshunt() const {return 0;}
7103de83 55 virtual void SetIshunt(Int_t) {}
02ca2762 56 virtual Bool_t IsActive() const {return fActive;}
b21a3d1a 57 virtual Bool_t IsFolder() const {return kTRUE;}
7103de83 58 virtual Int_t& LoMedium() {return fLoMedium;}
59 virtual Int_t& HiMedium() {return fHiMedium;}
8494b010 60
61 // Module composition
aee8290b 62 virtual void AliMaterial(Int_t imat, const char* name, Float_t a,
63 Float_t z, Float_t dens, Float_t radl,
64 Float_t absl, Float_t *buf=0, Int_t nwbuf=0) const;
65 virtual void AliGetMaterial(Int_t imat, char* name, Float_t &a,
88cb7938 66 Float_t &z, Float_t &dens, Float_t &radl,
67 Float_t &absl) const;
aee8290b 68 virtual void AliMixture(Int_t imat, const char *name, Float_t *a,
88cb7938 69 Float_t *z, Float_t dens, Int_t nlmat,
70 Float_t *wmat) const;
aee8290b 71 virtual void AliMedium(Int_t numed, const char *name, Int_t nmat,
88cb7938 72 Int_t isvol, Int_t ifield, Float_t fieldm,
73 Float_t tmaxfd, Float_t stemax, Float_t deemax,
74 Float_t epsil, Float_t stmin, Float_t *ubuf=0,
75 Int_t nbuf=0) const;
aee8290b 76 virtual void AliMatrix(Int_t &nmat, Float_t theta1, Float_t phi1,
88cb7938 77 Float_t theta2, Float_t phi2, Float_t theta3,
78 Float_t phi3) const;
8494b010 79
80 // Virtual methods
81 virtual void BuildGeometry() {};
82 virtual Int_t IsVersion() const =0;
88cb7938 83
84
8494b010 85 // Other methods
dda5e866 86 virtual void AddDigit(Int_t*, Int_t*){
87 Error("AddDigit","Digits cannot be added to module %s\n",fName.Data());}
88 virtual void AddHit(Int_t, Int_t*, Float_t *) {
89 Error("AddDigit","Hits cannot be added to module %s\n",fName.Data());}
2ab0c725 90 virtual void Hits2SDigits() {}
c92eb8ad 91 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* /*manager*/) const
85a5290f 92 {return NULL;}
a5a091ce 93 virtual AliTriggerDetector* CreateTriggerDetector() const
94 { AliTriggerDetector* det = new AliTriggerDetector(); det->SetName(GetName()); return det;}
2ab0c725 95 virtual void SDigits2Digits() {}
85a5290f 96 virtual void Hits2Digits() {}
fe961a91 97 virtual void Digits2Reco() {}
0421c3d1 98 virtual void Digits2Raw();
b99d1564 99 virtual void Raw2Digits() {}
100 virtual Bool_t Raw2SDigits(AliRawReader*) {return kFALSE;}
2e42b4d4 101 virtual void QADataMaker (const char *) {}
e939a978 102 virtual void Browse(TBrowser *) {} //PH Do we need it?
8494b010 103 virtual void CreateGeometry() {}
104 virtual void CreateMaterials() {}
661663fa 105 virtual void DefineOpticalProperties() {}
4787b401 106 virtual void AddAlignableVolumes() const;
8494b010 107 virtual void Disable();
8494b010 108 virtual void Enable();
7103de83 109 virtual void PreTrack(){}
110 virtual void PostTrack(){}
111 virtual void FinishEvent() {}
8494b010 112 virtual void FinishRun() {}
24de2263 113 virtual void FinishPrimary() {}
8494b010 114 virtual void Init() {}
115 virtual void LoadPoints(Int_t ) {}
ef7ff1f9 116 virtual void UpdateInternalGeometry() {}
88cb7938 117
118
119
9b62c596 120 virtual void MakeBranch(Option_t * /*opt =" "*/) {}
88cb7938 121 virtual void MakeTree(Option_t *) {}//skowron
122
df75403f 123 virtual AliLoader* MakeLoader(const char* topfoldername);
88cb7938 124 virtual AliLoader* GetLoader() const {return 0x0;} //skowron
125
126
e939a978 127 virtual void Paint(Option_t *) {} //PH Do we need it?
8494b010 128 virtual void ResetDigits() {}
2ab0c725 129 virtual void ResetSDigits() {}
8494b010 130 virtual void ResetHits() {}
131 virtual void ResetPoints() {}
8494b010 132 virtual void SetTimeGate(Float_t) {}
94de3818 133 virtual Float_t GetTimeGate() const {return 1.e10;}
8494b010 134 virtual void StepManager() {}
3f754d83 135 virtual void DisableStepManager() {fEnable = kFALSE;}
116cbefd 136 virtual Bool_t StepManagerIsEnabled() const {return fEnable;}
8918e700 137 virtual void SetBufferSize(Int_t) {}
65fb704d 138 virtual Float_t ZMin() const;
139 virtual Float_t ZMax() const;
aee8290b 140 virtual void SetEuclidFile(char *material,char *geometry=0);
88cb7938 141 virtual void ReadEuclid(const char *filnam, char *topvol);
142 virtual void ReadEuclidMedia(const char *filnam);
2cad796f 143// Track reference related
9ac3aec9 144 virtual AliTrackReference * AddTrackReference(Int_t label, Int_t id = -999);
88cb7938 145 TTree* TreeTR(); //shorcut method for accessing treeTR from folder
6d7874d8 146 void SetRunLoader(AliRunLoader* runLoader)
147 {fRunLoader = runLoader;}
2cad796f 148
421ab0fb 149// Quality Assurance methods
150 virtual void CheckQA() { ; }
151
00ee7999 152 static void SetDensityFactor(Float_t density) { fgDensityFactor = density; }
153 static Float_t GetDensityFactor() { return fgDensityFactor; }
154
aee8290b 155protected:
e2afb3b6 156
aee8290b 157 // Data members
158
2ab0c725 159 TString fEuclidMaterial; //!Name of the Euclid file for materials (if any)
160 TString fEuclidGeometry; //!Name of the Euclid file for geometry (if any)
aee8290b 161
2ab0c725 162 TArrayI *fIdtmed; //!List of tracking medium numbers
163 TArrayI *fIdmate; //!List of material numbers
164 Int_t fLoMedium; //!Minimum tracking medium ID for this Module
165 Int_t fHiMedium; //!Maximum tracking medium ID for this Module
aee8290b 166
167 Bool_t fActive; //Detector activity flag
168 TList *fHistograms; //List of histograms
169 TList *fNodes; //List of geometry nodes
3f754d83 170 Bool_t fEnable; //StepManager enabling flag
2cad796f 171 Int_t fMaxIterTrackRef; //!for track refernce iterator routines
172 Int_t fCurrentIterTrackRef; //!for track refernce iterator routines
6d7874d8 173
174 AliRunLoader* fRunLoader; //!local pointer to run loader
175
00ee7999 176 static Float_t fgDensityFactor; //! factor that is multiplied to all material densities (ONLY for systematic studies)
177
e939a978 178 private:
179 AliModule(const AliModule &mod);
180 AliModule& operator=(const AliModule &mod);
181
00ee7999 182 ClassDef(AliModule,8) //Base class for ALICE Modules
8494b010 183};
184#endif