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