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