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