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