]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIITS_H | |
2 | #define ALIITS_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 | //////////////////////////////////////////////////////////////////////// | |
9 | // Manager class for set: ITS // | |
10 | //////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | ||
13 | #include <TObjArray.h> // used in inline function GetModule. | |
14 | #include "AliDetector.h" | |
15 | #include "AliITSTrigger.h" | |
16 | #include "AliITSDetTypeSim.h" | |
17 | ||
18 | ||
19 | class TString; | |
20 | class TTree; | |
21 | class AliITSpListItem; | |
22 | class AliITSsimulation; | |
23 | class AliITSsegmentation; | |
24 | ||
25 | class AliITSCalibration; | |
26 | class AliITShit; | |
27 | class AliITSgeom; | |
28 | class AliITSdigit; | |
29 | class AliITSmodule; | |
30 | class AliDigitizer; | |
31 | class AliRunDigitizer; | |
32 | ||
33 | ||
34 | class AliITS : public AliDetector { | |
35 | ||
36 | public: | |
37 | //================= Standard Classes =============================== | |
38 | AliITS(); // Default creator. | |
39 | AliITS(const Char_t *title); // standard Creator | |
40 | AliITS(const char *name, const char *title); // extended standard Creator | |
41 | virtual ~AliITS(); // destructor | |
42 | virtual Int_t IsVersion() const {return 1;} | |
43 | ||
44 | //===================== Simulation Geometry ======================== | |
45 | // get geometry version - detailed (major) or coarse (minor) | |
46 | virtual Int_t GetMajorVersion() const {return -1;} | |
47 | virtual Int_t GetMinorVersion() const {return -1;} | |
48 | virtual void GetGeometryVersion(Int_t &a,Int_t &b) const | |
49 | {a = GetMajorVersion();b=GetMinorVersion();return;} | |
50 | virtual void SetEUCLID(Bool_t euclid=kTRUE) {fEuclidOut = euclid;} | |
51 | virtual Bool_t GetEUCLID()const {return fEuclidOut;} | |
52 | //-------------------- Geometry Transformations -------------------- | |
53 | ||
54 | // ITS geometry functions From Simulation | |
55 | AliITSgeom* GetITSgeom() const {return fDetTypeSim->GetITSgeom();} | |
56 | void SetITSgeom(AliITSgeom *geom) {fDetTypeSim->SetITSgeom(geom);} | |
57 | // return pointer to the array of modules | |
58 | TObjArray *GetModules(){return fITSmodules;} | |
59 | ||
60 | AliITSmodule *GetModule(Int_t index){ | |
61 | return (AliITSmodule*)(fITSmodules->At(index));} | |
62 | virtual void SetSimuParam(AliITSSimuParam *sp){ | |
63 | fSimuParam=sp; | |
64 | fDetTypeSim->SetSimuParam(sp); | |
65 | } | |
66 | AliITSSimuParam* GetSimuParam() const {return fSimuParam;} | |
67 | ||
68 | virtual void SetDetTypeSim(AliITSDetTypeSim* dts) {fDetTypeSim=dts;} | |
69 | AliITSDetTypeSim* GetDetTypeSim() const {return fDetTypeSim;} | |
70 | //================ Necessary general Classes ======================= | |
71 | virtual void Init(); | |
72 | virtual AliLoader* MakeLoader(const char* topfoldername); | |
73 | virtual void SetDefaults(); | |
74 | virtual void SetDefaultSimulation(); | |
75 | virtual void MakeBranch(Option_t *opt=" "); | |
76 | virtual void MakeBranchS(const char* fl); | |
77 | virtual void MakeBranchD(const char* file); | |
78 | virtual void MakeBranchInTreeD(TTree* treeD, const char* file=0); | |
79 | virtual void SetTreeAddress(); | |
80 | //---------- Configuration Methods (per detector type) ------------- | |
81 | // Determines which ITS subdetectors will be processed. Effects | |
82 | // digitization, and Reconstruction only. | |
83 | void SetDetectors(Option_t *opt="All"){fOpt = opt;} | |
84 | // Returns the list of ITS subdetectors that will be processed. | |
85 | Option_t* GetDetectors(){return fOpt;} | |
86 | ||
87 | // Set calibration | |
88 | virtual void SetCalibrationModel(Int_t dettype, AliITSCalibration *cal){ | |
89 | fDetTypeSim->SetCalibrationModel(dettype,cal);} | |
90 | // Set segmentation for Simulation | |
91 | virtual void SetSegmentationModel(Int_t id, AliITSsegmentation *seg){ | |
92 | fDetTypeSim->SetSegmentationModel(id,seg);} | |
93 | // Set simulation | |
94 | virtual void SetSimulationModel(Int_t id, AliITSsimulation *sim){ | |
95 | fDetTypeSim->SetSimulationModel(id,sim);} | |
96 | // Set simulation | |
97 | virtual AliITSsimulation* GetSimulationModel(Int_t id){ | |
98 | return fDetTypeSim->GetSimulationModel(id);} | |
99 | //=================== Hits ========================================= | |
100 | virtual void StepManager() {} // See Step Manager for specific geometry. | |
101 | //------------ sort hits by module for Digitisation ---------------- | |
102 | virtual void FillModules(Int_t evnt,Int_t bgrev,Int_t nmodules, | |
103 | Option_t *opt, const char *filename); | |
104 | virtual Bool_t InitModules(Int_t size,Int_t &nmodules); | |
105 | virtual void FillModules(TTree *treeH, Int_t mask = 0); | |
106 | virtual void ClearModules(){if(fITSmodules) fITSmodules->Delete();} | |
107 | virtual void AddHit(Int_t track, Int_t *vol, Float_t *hits); | |
108 | // Trigger | |
109 | virtual AliTriggerDetector* CreateTriggerDetector() const; | |
110 | ||
111 | AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const; | |
112 | virtual void UpdateInternalGeometry(); | |
113 | virtual void SDigitsToDigits(Option_t *opt="All"); | |
114 | virtual void SDigits2Digits(){SDigitsToDigits("All");} | |
115 | virtual void Hits2Digits(); | |
116 | virtual void Hits2SDigits(); | |
117 | virtual void Hits2PreDigits(); | |
118 | virtual void HitsToDigits(Int_t evNumber,Int_t bgrev,Int_t size, | |
119 | Option_t *option,Option_t *opt, | |
120 | const char *filename); | |
121 | virtual void HitsToPreDigits(Int_t evNumber,Int_t bgrev,Int_t size, | |
122 | Option_t *option,Option_t *opt, | |
123 | const char *filename); | |
124 | void HitsToSDigits(Int_t evNumber,Int_t bgrev,Int_t size, | |
125 | Option_t *add, Option_t *det, const char *filename) | |
126 | {HitsToPreDigits(evNumber,bgrev,size,add,det,filename);} | |
127 | ||
128 | virtual void ResetDigits(); | |
129 | virtual void ResetDigits(Int_t branch); | |
130 | virtual void AddSumDigit(AliITSpListItem &sdig); | |
131 | virtual void AddSimDigit(Int_t branch, AliITSdigit *d); | |
132 | virtual void AddSimDigit(Int_t branch,Float_t phys,Int_t* digits, | |
133 | Int_t* tracks,Int_t *hits,Float_t* trkcharges, | |
134 | Int_t sigexpanded=-1000); | |
135 | TObjArray* GetDigits() const {return fDetTypeSim->GetDigits();} | |
136 | Int_t* GetNDigitArray() const {return fDetTypeSim->GetNDigitArray();} | |
137 | TClonesArray *DigitsAddress(Int_t id) { | |
138 | return fDetTypeSim->DigitsAddress(id);} | |
139 | //Fast simulation | |
140 | virtual void HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t size, | |
141 | Option_t *add, Option_t *det, const char *filename); | |
142 | virtual Int_t Hits2Clusters(TTree *in, TTree *out); | |
143 | virtual void CheckLabels(Int_t lab[3]) const; | |
144 | ||
145 | //===================== Raw Data IO ================================ | |
146 | // Write digits into raw data format | |
147 | virtual void Digits2Raw(); | |
148 | virtual Bool_t Raw2SDigits(AliRawReader*); | |
149 | ||
150 | ||
151 | protected: | |
152 | static const Int_t fgkNTYPES=3; //number of detector types | |
153 | //================== Data Members ================================== | |
154 | AliITSDetTypeSim *fDetTypeSim; //detector type for simulation | |
155 | Bool_t fEuclidOut; // Flag to write geometry in euclid format | |
156 | Option_t *fOpt; //! Detector option ="All" unless changed. | |
157 | Int_t fIdN; // the number of layers | |
158 | Int_t *fIdSens; //[fIdN] layer identifier | |
159 | TString *fIdName; //[fIdN] layer identifier | |
160 | TObjArray *fITSmodules; //! Pointer to ITS modules | |
161 | Bool_t fTiming; // flag to turn on/off timers. | |
162 | AliITSSimuParam* fSimuParam; //simulation parameters | |
163 | ||
164 | private: | |
165 | AliITS(const AliITS &source); // copy constructor. Not to be used! | |
166 | AliITS& operator=(const AliITS &source); // = operator. Not to be used! | |
167 | ClassDef(AliITS,8) // Base class for ITS | |
168 | ||
169 | }; | |
170 | ||
171 | #endif |