]>
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; | |
2aea926d | 27 | class AliITSpListItem; |
de82972f | 28 | class AliITSdigit; |
29 | class AliITSRecPoint; | |
30 | class AliITSRawCluster; | |
31 | class AliITSmodule; | |
27a043b1 | 32 | |
a8a6107b | 33 | const Int_t kNTYPES=3; |
de82972f | 34 | |
3bd79107 | 35 | class AliITS : public AliDetector { |
58005f18 | 36 | |
2aea926d | 37 | public: |
38 | //================= Standard Classes =============================== | |
39 | AliITS(); // Default creator. | |
40 | AliITS(const char *name, const char *title); // standard Creator | |
41 | virtual ~AliITS(); // destructor | |
42 | AliITS(AliITS &source); // copy constructor. Not to be used! | |
43 | AliITS& operator=(AliITS &source); // = operator. Not to be used! | |
44 | virtual Int_t IsVersion() const {return 1;} | |
45 | virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); | |
46 | ||
47 | //===================== Simulation Geometry ======================== | |
e8189707 | 48 | // get geometry version - detailed (major) or coarse (minor) |
2aea926d | 49 | virtual Int_t GetMajorVersion(){return -1;} |
50 | virtual Int_t GetMinorVersion(){return -1;} | |
51 | virtual void GetGeometryVersion(Int_t &a,Int_t &b) | |
52 | {a = GetMajorVersion();b=GetMinorVersion();return;} | |
53 | virtual void SetEUCLID(Bool_t euclid=1) {fEuclidOut = euclid;} | |
54 | //-------------------- Geometry Transformations -------------------- | |
55 | // ITS geometry functions | |
56 | AliITSgeom *GetITSgeom() const {return fITSgeom;} | |
57 | // return pointer to the array of modules | |
58 | TObjArray *GetModules() const {return fITSmodules;} | |
59 | // return pointer to a particular module | |
60 | AliITSmodule *GetModule(Int_t index) {return (AliITSmodule *) | |
61 | (fITSmodules->At(index));} | |
3bd79107 | 62 | |
2aea926d | 63 | //================ Nessesary general Classes ======================= |
64 | virtual void Init(); | |
65 | virtual void SetDefaults(); | |
66 | virtual void SetDefaultSimulation(); | |
67 | virtual void SetDefaultClusterFinders(); | |
68 | virtual void MakeBranch(Option_t *opt=" ", const char *file=0); | |
69 | virtual void SetTreeAddress(); | |
70 | // Return pointer to DetType #id | |
71 | AliITSDetType *DetType(Int_t id); | |
72 | //Int_t NDetTypes() {return fNDetTypes;} | |
73 | //---------- Configuration Methods (per detector type) ------------- | |
7d8046e8 | 74 | // Determines which ITS subdetectors will be processed. Effects |
75 | // digitization, and Reconstruction only. | |
76 | void SetDetectors(Option_t *opt="All"){fOpt = opt;} | |
77 | // Returns the list of ITS subdetectors that will be processed. | |
78 | Option_t* GetDetectors(){return fOpt;} | |
3bd79107 | 79 | // Set response |
2aea926d | 80 | virtual void SetResponseModel(Int_t id, AliITSresponse *response); |
3bd79107 | 81 | // Set segmentation |
2aea926d | 82 | virtual void SetSegmentationModel(Int_t id, AliITSsegmentation *seg); |
3bd79107 | 83 | // Set simulation - temporary |
2aea926d | 84 | virtual void SetSimulationModel(Int_t id, AliITSsimulation *sim); |
3bd79107 | 85 | // Set reconstruction |
2aea926d | 86 | virtual void SetReconstructionModel(Int_t id, AliITSClusterFinder *rec); |
3bd79107 | 87 | // Set class names for digit and rec point |
2aea926d | 88 | virtual void SetClasses(Int_t id, const char *digit, const char *cluster); |
89 | ||
90 | //=================== Hits ========================================= | |
91 | virtual void StepManager() {} // See Step Manager for specific geometry. | |
92 | virtual void AddHit(Int_t track, Int_t *vol, Float_t *hits); | |
93 | //------------ sort hits by module for Digitisation ---------------- | |
94 | virtual void InitModules(Int_t size,Int_t &nmodules); | |
95 | virtual void FillModules(Int_t evnt,Int_t bgrev,Int_t nmodules, | |
96 | Option_t *opt,Text_t *filename); | |
97 | virtual void ClearModules(); | |
98 | ||
99 | //===================== Digitisation =============================== | |
100 | void MakeBranchS(const char *file); | |
101 | void SetTreeAddressS(TTree *treeS); | |
102 | void MakeBranchD(const char *file); | |
103 | void SetTreeAddressD(TTree *treeD); | |
104 | void Hits2SDigits(); // Turn hits into SDigits | |
105 | void Hits2PreDigits(); // Turn hits into SDigits | |
106 | void SDigits2Digits(); // Turn SDigits to Digits | |
107 | void Hits2Digits(); // Turn hits straight into Digits. | |
108 | //------------------ Internal functions ---------------------------- | |
109 | // Standard Hits To SDigits function | |
110 | void HitsToSDigits(Int_t evNumber,Int_t bgrev,Int_t size, | |
111 | Option_t *add, Option_t *det, Text_t *filename); | |
112 | // Standard Hits To SDigits function | |
113 | void HitsToPreDigits(Int_t evNumber,Int_t bgrev,Int_t size, | |
114 | Option_t *add, Option_t *det, Text_t *filename); | |
115 | // Standard Hits To Digits function | |
116 | void HitsToDigits(Int_t evNumber,Int_t bgrev,Int_t size, | |
117 | Option_t *add, Option_t *det, Text_t *filename); | |
118 | void ResetSDigits(); // Resets the Summable digits. | |
119 | void ResetDigits(); // depending on how the | |
120 | void ResetDigits(Int_t branch); // tree will be filled only | |
121 | void AddSumDigit(AliITSpListItem &sdig); | |
122 | void AddRealDigit(Int_t branch, Int_t *digits); | |
123 | void AddSimDigit(Int_t branch, AliITSdigit *d); | |
124 | void AddSimDigit(Int_t branch,Float_t phys,Int_t* digits, | |
125 | Int_t* tracks,Int_t *hits,Float_t* trkcharges); | |
126 | // Return pointers to digits | |
127 | TObjArray *Dtype() {return fDtype;} | |
128 | Int_t *Ndtype() {return fNdtype;} | |
129 | TClonesArray *DigitsAddress(Int_t id) | |
130 | {return ((TClonesArray *) (*fDtype)[id]);} | |
3bd79107 | 131 | |
2aea926d | 132 | //===================== Raw Data IO ================================ |
133 | // Write digits into raw data format | |
134 | virtual void Digits2RawData() {} | |
135 | // Decode raw data and store digits | |
136 | virtual void RawData2Digits() {} | |
58005f18 | 137 | |
2aea926d | 138 | //==================== Clusterization ============================== |
139 | // create separate tree for clusters - declustering refining | |
140 | void MakeTreeC(Option_t *option="C"); | |
141 | void GetTreeC(Int_t event); | |
142 | void AddCluster(Int_t branch, AliITSRawCluster *c); | |
143 | void ResetClusters(); // one of the methods in | |
144 | void ResetClusters(Int_t branch); // the pair will be kept | |
145 | // Return pointer to the tree of clusters | |
146 | TTree *TreeC() {return fTreeC;} | |
3bd79107 | 147 | // Return pointers to clusters |
2aea926d | 148 | TObjArray *Ctype() {return fCtype;} |
149 | Int_t *Nctype() {return fNctype;} | |
150 | TClonesArray *ClustersAddress(Int_t id) | |
3bd79107 | 151 | {return ((TClonesArray *) (*fCtype)[id]);} |
152 | ||
2aea926d | 153 | //=================== Reconstruction =============================== |
154 | void MakeBranchR(const char *file); | |
155 | void SetTreeAddressR(TTree *treeR); | |
156 | void AddRecPoint(const AliITSRecPoint &p); | |
157 | void HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t size, | |
158 | Option_t *add, Option_t *det, Text_t *filename); | |
159 | void Digits2Reco(); | |
160 | void DigitsToRecPoints(Int_t evNumber,Int_t lastEntry,Option_t *det); | |
161 | void ResetRecPoints(); | |
3bd79107 | 162 | // Return pointer to rec points |
163 | TClonesArray *RecPoints() {return fRecPoints;} | |
3bd79107 | 164 | |
2aea926d | 165 | protected: |
166 | //================== Data Members ================================== | |
167 | AliITSgeom *fITSgeom; // Pointer to ITS geometry | |
168 | Bool_t fEuclidOut; // Flag to write geometry in euclid format | |
169 | TObjArray *fITSmodules; //! Pointer to ITS modules | |
7d8046e8 | 170 | Option_t *fOpt; //! Detector option ="All" unless changed. |
3bd79107 | 171 | |
2aea926d | 172 | Int_t fIdN; // the number of layers |
173 | Int_t *fIdSens; //[fIdN] layer identifier | |
174 | TString *fIdName; //[fIdN] layer identifier | |
3bd79107 | 175 | |
2aea926d | 176 | Int_t fNDetTypes; // Number of detector types |
177 | TObjArray *fDetTypes; // List of detector types | |
e8189707 | 178 | |
2aea926d | 179 | // TObjArray *fSDigits; // List of Summable digits. |
180 | TClonesArray *fSDigits; // List of Summable digits. | |
181 | Int_t fNSDigits; // Number of Summable Digits. | |
55b5a0b3 | 182 | |
2aea926d | 183 | TObjArray *fDtype; // List of digits |
184 | Int_t *fNdtype; //[fNDetTypes] Num. of digits per type of det. | |
3bd79107 | 185 | |
2aea926d | 186 | TObjArray *fCtype; // List of clusters |
187 | Int_t *fNctype; //[fNDetTypes] Num. of clust. per type of det. | |
188 | TTree *fTreeC; // Tree for raw clusters | |
3bd79107 | 189 | |
2aea926d | 190 | TClonesArray *fRecPoints; // List of reconstructed points |
191 | Int_t fNRecPoints; // Number of rec points | |
3bd79107 | 192 | |
193 | ClassDef(AliITS,1) // Base class for ITS | |
fe4da5cc | 194 | }; |
3bd79107 | 195 | |
fe4da5cc | 196 | #endif |