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