3bd79107 |
1 | #ifndef ALIITS_H |
2 | #define ALIITS_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 | |
58005f18 |
8 | //////////////////////////////////////////////////////////////////////// |
3bd79107 |
9 | // Manager class for set: ITS // |
58005f18 |
10 | //////////////////////////////////////////////////////////////////////// |
fe4da5cc |
11 | |
143d1056 |
12 | #include <TObjArray.h> // used in inline function GetModule. |
3bd79107 |
13 | |
fe4da5cc |
14 | #include "AliDetector.h" |
de82972f |
15 | |
d5da1ecf |
16 | class TString; |
17 | class TTree; |
55b5a0b3 |
18 | class TFile; |
fe4da5cc |
19 | |
e8189707 |
20 | class AliITSDetType; |
3bd79107 |
21 | class AliITSsimulation; |
22 | class AliITSClusterFinder; |
de82972f |
23 | class AliITSsegmentation; |
24 | class AliITSresponse; |
25 | class AliITShit; |
26 | class AliITSgeom; |
27 | class AliITSdigit; |
28 | class AliITSRecPoint; |
29 | class AliITSRawCluster; |
30 | class AliITSmodule; |
27a043b1 |
31 | |
de82972f |
32 | |
a8a6107b |
33 | const Int_t kNTYPES=3; |
de82972f |
34 | |
3bd79107 |
35 | |
36 | class AliITS : public AliDetector { |
58005f18 |
37 | |
38 | public: |
3bd79107 |
39 | AliITS(); |
40 | AliITS(const char *name, const char *title); |
41 | virtual ~AliITS(); |
42 | AliITS(AliITS &source); |
43 | AliITS & operator=(AliITS &source); |
44 | |
45 | virtual void AddHit(Int_t track, Int_t *vol, Float_t *hits); |
46 | virtual void AddRealDigit(Int_t branch, Int_t *digits); |
e8189707 |
47 | virtual void AddSimDigit(Int_t branch, AliITSdigit *d); |
48 | virtual void AddSimDigit(Int_t branch,Float_t phys,Int_t* digits,Int_t* tracks,Int_t *hits,Float_t* trkcharges); |
58005f18 |
49 | // |
3bd79107 |
50 | virtual void AddCluster(Int_t branch, AliITSRawCluster *c); |
51 | virtual void AddRecPoint(const AliITSRecPoint &p); |
3bd79107 |
52 | |
53 | virtual void ResetDigits(); // depending on how the |
54 | virtual void ResetDigits(Int_t branch); // tree will be filled only |
55 | virtual void ResetClusters(); // one of the methods in |
56 | virtual void ResetClusters(Int_t branch); // the pair will be kept |
57 | virtual void ResetRecPoints(); |
58 | |
e8189707 |
59 | // get geometry version - detailed (major) or coarse (minor) |
04874c1a |
60 | virtual Int_t GetMajorVersion(){return -1;} |
61 | virtual Int_t GetMinorVersion(){return -1;} |
62 | void GetGeometryVersion(Int_t &a,Int_t &b) |
63 | {a = GetMajorVersion();b=GetMinorVersion();return;} |
3bd79107 |
64 | virtual Int_t IsVersion() const {return 1;} |
d5da1ecf |
65 | virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); |
3bd79107 |
66 | virtual void Init(); |
67 | virtual void SetDefaults(); |
e8189707 |
68 | virtual void SetDefaultSimulation(); |
69 | virtual void SetDefaultClusterFinders(); |
3bd79107 |
70 | // create separate tree for clusters - declustering refining |
71 | virtual void MakeTreeC(Option_t *option="C"); |
72 | void GetTreeC(Int_t event); |
9e1a0ddb |
73 | virtual void MakeBranch(Option_t *opt=" ", const char *file=0); |
3bd79107 |
74 | void SetTreeAddress(); |
75 | virtual void SetEUCLID(Bool_t euclid=1) {fEuclidOut = euclid;} |
76 | virtual void StepManager() {} |
77 | // sort hits by module |
78 | virtual void InitModules(Int_t size,Int_t &nmodules); |
e8189707 |
79 | virtual void FillModules(Int_t evnt,Int_t bgrev, |
3bd79107 |
80 | Int_t nmodules,Option_t *opt,Text_t *filename); |
81 | virtual void ClearModules(); |
82 | // Digitisation |
2ab0c725 |
83 | virtual void SDigits2Digits(); |
e8189707 |
84 | void HitsToDigits(Int_t evNumber,Int_t bgrev,Int_t size, |
3bd79107 |
85 | Option_t *add, Option_t *det, Text_t *filename); |
86 | // Reconstruct hits |
828e06c7 |
87 | void Digits2Reco(); |
3bd79107 |
88 | void DigitsToRecPoints(Int_t evNumber,Int_t lastEntry,Option_t *det); |
89 | // Fast simulation of space points from hits |
e8189707 |
90 | void HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t size, |
3bd79107 |
91 | Option_t *add, Option_t *det, Text_t *filename); |
92 | |
3bd79107 |
93 | // Write digits into raw data format |
94 | virtual void Digits2RawData() {} |
e8189707 |
95 | // Decode raw data and store digits |
96 | virtual void RawData2Digits() {} |
3bd79107 |
97 | |
98 | // Configuration Methods (per detector type ) |
3bd79107 |
99 | // Set response |
100 | virtual void SetResponseModel(Int_t id, AliITSresponse *response); |
101 | // Set segmentation |
102 | virtual void SetSegmentationModel(Int_t id, AliITSsegmentation *seg); |
103 | // Set simulation - temporary |
104 | virtual void SetSimulationModel(Int_t id, AliITSsimulation *sim); |
105 | // Set reconstruction |
106 | virtual void SetReconstructionModel(Int_t id, AliITSClusterFinder *rec); |
107 | // Set class names for digit and rec point |
e8189707 |
108 | virtual void SetClasses(Int_t id, const char *digit, const char *cluster); |
3bd79107 |
109 | |
110 | |
111 | // Getters |
58005f18 |
112 | // ITS geometry functions |
3bd79107 |
113 | virtual AliITSgeom *GetITSgeom() const {return fITSgeom;} |
e8189707 |
114 | // return pointer to the array of modules |
3bd79107 |
115 | virtual TObjArray *GetModules() const {return fITSmodules;} |
e8189707 |
116 | // return pointer to a particular module |
3bd79107 |
117 | AliITSmodule *GetModule(Int_t index) {return (AliITSmodule *) |
118 | (fITSmodules->At(index));} |
58005f18 |
119 | |
3bd79107 |
120 | // Return pointers to digits |
121 | TObjArray *Dtype() {return fDtype;} |
122 | Int_t *Ndtype() {return fNdtype;} |
123 | virtual TClonesArray *DigitsAddress(Int_t id) |
124 | {return ((TClonesArray *) (*fDtype)[id]);} |
125 | // Return pointers to clusters |
126 | TObjArray *Ctype() {return fCtype;} |
127 | Int_t *Nctype() {return fNctype;} |
128 | virtual TClonesArray *ClustersAddress(Int_t id) |
129 | {return ((TClonesArray *) (*fCtype)[id]);} |
130 | |
131 | // Return pointer to rec points |
132 | TClonesArray *RecPoints() {return fRecPoints;} |
3bd79107 |
133 | |
134 | // Return pointer to DetType #id |
135 | AliITSDetType *DetType(Int_t id); |
e8189707 |
136 | //Int_t NDetTypes() {return fNDetTypes;} |
3bd79107 |
137 | |
138 | // Return pointer to the tree of clusters |
139 | TTree *TreeC() {return fTreeC;} |
140 | |
e8189707 |
141 | |
55b5a0b3 |
142 | |
3bd79107 |
143 | protected: |
144 | |
143d1056 |
145 | AliITSgeom *fITSgeom; // Pointer to ITS geometry |
2bffff54 |
146 | TObjArray *fITSmodules; //! Pointer to ITS modules |
143d1056 |
147 | Bool_t fEuclidOut; // Flag to write geometry in euclid format |
148 | Int_t fIdN; // the number of layers |
149 | Int_t *fIdSens; //[fIdN] layer identifier |
04874c1a |
150 | TString *fIdName; //[fIdN] layer identifier |
3bd79107 |
151 | // |
a8a6107b |
152 | Int_t fNDetTypes; // Number of detector types |
143d1056 |
153 | TObjArray *fDetTypes; // List of detector types |
3bd79107 |
154 | |
a8a6107b |
155 | TObjArray *fDtype; // List of digits |
156 | Int_t *fNdtype; //[fNDetTypes] Num. of digits per type of det. |
157 | TObjArray *fCtype; // List of clusters |
158 | Int_t *fNctype; //[fNDetTypes] Num. of clust. per type of det. |
3bd79107 |
159 | |
143d1056 |
160 | TClonesArray *fRecPoints; // List of reconstructed points |
161 | Int_t fNRecPoints; // Number of rec points |
162 | TTree *fTreeC; // Tree for raw clusters |
3bd79107 |
163 | |
164 | |
165 | ClassDef(AliITS,1) // Base class for ITS |
fe4da5cc |
166 | }; |
3bd79107 |
167 | |
fe4da5cc |
168 | #endif |