]>
Commit | Line | Data |
---|---|---|
3bd79107 | 1 | #ifndef ALIITSDIGIT_H |
2 | #define ALIITSDIGIT_H | |
f8dece8d | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
88cb7938 | 5 | |
f8dece8d | 6 | /* $Id$ */ |
88cb7938 | 7 | |
3bd79107 | 8 | //////////////////////////////////////////////// |
f8dece8d | 9 | // Digits classes for all ITS detectors // |
3bd79107 | 10 | //////////////////////////////////////////////// |
4ae5bbc4 | 11 | #include <Riostream.h> |
12 | #include <Riostream.h> | |
92c19c36 | 13 | #include <TObject.h> |
ff116811 | 14 | |
15 | class TObjArray; | |
16 | class TArrayI; | |
17 | class TArrayF; | |
92c19c36 | 18 | |
f8dece8d | 19 | //______________________________________________________________________ |
3bd79107 | 20 | class AliITSdigit: public TObject { |
f8dece8d | 21 | |
22 | public: | |
23 | AliITSdigit() {//default constructor. zero all values. | |
24 | fSignal=fCoord1=fCoord2=0;} | |
25 | //Standard Constructor. Fills class from array digits | |
26 | AliITSdigit(const Int_t *digits); | |
27 | //Destructor | |
28 | virtual ~AliITSdigit() { } | |
7e743662 | 29 | // returns the array size used to store Tracks and Hits |
30 | // virtual Int_t GetNTracks() {return 0;} | |
31 | //returns pointer to array of tracks numbers | |
b8c80122 | 32 | virtual Int_t *GetTracks() {return 0;} |
7e743662 | 33 | // returns pointer to array of hits numbers for this module (as given by |
34 | // AliITSmodule). | |
b8c80122 | 35 | virtual Int_t *GetHits() {return 0;} |
f8dece8d | 36 | // returns track number kept in the array element i of fTracks |
37 | virtual Int_t GetTrack(Int_t i) const {return 0;} | |
38 | // returns hit number kept in the array element i of fHits | |
39 | virtual Int_t GetHit(Int_t i) const {return 0;} | |
40 | virtual Int_t GetCoord1() const {return fCoord1;} // returns fCoord1 | |
41 | virtual Int_t GetCoord2() const {return fCoord2;} // returns fCoord2 | |
42 | virtual Int_t GetSignal() const {return fSignal;} // returns fSignal | |
43 | virtual void SetCoord1(Int_t i){fCoord1 = i;} // Sets fCoord1 value | |
44 | virtual void SetCoord2(Int_t i){fCoord2 = i;} // Sets fCoord12value | |
45 | virtual void SetSignal(Int_t i){fSignal = i;} // Sets fSignal value | |
46 | void Print(ostream *os); // Class ascii print function | |
47 | void Read(istream *os); // Class ascii read function | |
48 | ||
49 | public: | |
50 | Int_t fCoord1; // Cell number on Z axis (SPD+SDD), flag for side type (SSD) | |
51 | Int_t fCoord2; // Cell number on X axis (SPD+SDD), strip number (SSD) | |
52 | Int_t fSignal; // Signal in ADC counts | |
53 | ||
54 | ClassDef(AliITSdigit,1) // Real data digit object for set:ITS | |
55 | ||
56 | }; | |
57 | // Input and output functions for standard C++ input/output. | |
58 | ostream &operator<<(ostream &os,AliITSdigit &source); | |
59 | istream &operator>>(istream &os,AliITSdigit &source); | |
60 | //______________________________________________________________________ | |
3bd79107 | 61 | class AliITSdigitSPD: public AliITSdigit { |
f8dece8d | 62 | |
63 | public: | |
64 | AliITSdigitSPD(); //default creator | |
65 | AliITSdigitSPD(const Int_t *digits);//standard creator digits only | |
66 | //standard creator with digits, tracks, and hits | |
67 | AliITSdigitSPD(const Int_t *digits,const Int_t *tracks,const Int_t *hits); | |
68 | virtual ~AliITSdigitSPD(){/*destructor*/} | |
7e743662 | 69 | // returns the array size used to store Tracks and Hits |
70 | static Int_t GetNTracks() {return fkSspd;} | |
3bd79107 | 71 | // returns pointer to the array of tracks which make this digit |
b8c80122 | 72 | virtual Int_t *GetTracks() {return &fTracks[0];} |
f8dece8d | 73 | //returns the pointer to the array of hits which made this digit |
74 | virtual Int_t *GetHits() {return &fHits[0];} | |
75 | // returns track number kept in the array element i of fTracks | |
76 | virtual Int_t GetTrack(Int_t i) const {return fTracks[i];} | |
77 | // returns hit number kept in the array element i of fHits | |
78 | virtual Int_t GetHit(Int_t i) const {return fHits[i];} | |
ff116811 | 79 | // returns TArrayI of unduplicated track numbers (summed over hits). |
80 | virtual Int_t GetListOfTracks(TArrayI &t); | |
f8d9a5b8 | 81 | //copy the array trks[fkSspd] into fTracks |
f8dece8d | 82 | virtual void SetTracks(const Int_t *trks){ |
f8d9a5b8 | 83 | for(Int_t i=0;i<fkSspd;i++) fTracks[i]=trks[i];} |
84 | //copy the array hits[fkSspd] into fHits | |
f8dece8d | 85 | virtual void SetHits(const Int_t *hits){ |
f8d9a5b8 | 86 | for(Int_t i=0;i<fkSspd;i++) fHits[i]=hits[i];} |
f8dece8d | 87 | //set array element i of fTracks to trk. |
88 | virtual void SetTrack(Int_t i,Int_t trk){fTracks[i]=trk;} | |
89 | //set array element i of fHits to hit. | |
90 | virtual void SetHit(Int_t i,Int_t hit){fHits[i]=hit;} | |
91 | void Print(ostream *os); // Class ascii print function | |
92 | void Read(istream *os); // Class ascii read function | |
93 | ||
7e743662 | 94 | private: |
95 | static const Int_t fkSspd = 10; // size of fTracks and fHits arrays | |
96 | ||
f8dece8d | 97 | public: |
98 | // debugging -- goes to the dictionary | |
7e743662 | 99 | Int_t fTracks[fkSspd]; //[fkSspd] tracks making this digit |
100 | Int_t fHits[fkSspd]; //[fkSspd] hits associated to the tracks | |
101 | Int_t fSignalSPD; // Signal in electrons | |
7fc27b48 | 102 | |
7e743662 | 103 | ClassDef(AliITSdigitSPD,2) // Simulated digit object for SPD |
3bd79107 | 104 | |
f8dece8d | 105 | }; |
106 | // Input and output functions for standard C++ input/output. | |
107 | ostream &operator<<(ostream &os,AliITSdigitSPD &source); | |
108 | istream &operator>>(istream &os,AliITSdigitSPD &source); | |
7e743662 | 109 | |
f8dece8d | 110 | //______________________________________________________________________ |
3bd79107 | 111 | class AliITSdigitSDD: public AliITSdigit { |
f8dece8d | 112 | |
113 | public: | |
114 | AliITSdigitSDD(); //default creator | |
115 | //standard creator with digits and "phys" | |
116 | AliITSdigitSDD(Float_t phys,const Int_t *digits); | |
117 | //standard creator with digits, tracls, hits, "phys", and charge | |
118 | AliITSdigitSDD( Float_t phys,const Int_t *digits,const Int_t *tracks, | |
119 | const Int_t *hits,const Float_t *charges); | |
120 | virtual ~AliITSdigitSDD(){/* destructor*/} | |
7e743662 | 121 | // returns the array size used to store Tracks and Hits |
122 | static Int_t GetNTracks() {return fkSsdd;} | |
3bd79107 | 123 | // returns pointer to the array of tracks which make this digit |
b8c80122 | 124 | virtual Int_t *GetTracks() {return &fTracks[0];} |
7fc27b48 | 125 | // returns the pointer to the array of hits which made this digit |
f8dece8d | 126 | virtual Int_t *GetHits() {return &fHits[0];} |
127 | // returns track number kept in the array element i of fTracks | |
128 | virtual Int_t GetTrack(Int_t i) const {return fTracks[i];} | |
129 | // returns hit number kept in the array element i of fHits | |
130 | virtual Int_t GetHit(Int_t i) const {return fHits[i];} | |
ff116811 | 131 | // Return charge deposited by this track/hit |
132 | virtual Float_t GetCharge(Int_t i){return fTcharges[i];} | |
133 | // returns TArrayI of unduplicated track numbers (summed over hits). | |
134 | virtual Int_t GetListOfTracks(TArrayI &t,TArrayF &c); | |
f8d9a5b8 | 135 | //copy the array trks[fkSsdd] into fTracks |
f8dece8d | 136 | virtual void SetTracks(const Int_t *trks){ |
f8d9a5b8 | 137 | for(Int_t i=0;i<fkSsdd;i++) fTracks[i]=trks[i];} |
138 | //copy the array hits[fkSsdd] into fHits | |
f8dece8d | 139 | virtual void SetHits(const Int_t *hits){ |
f8d9a5b8 | 140 | for(Int_t i=0;i<fkSsdd;i++) fHits[i]=hits[i];} |
f8dece8d | 141 | //set array element i of fTracks to trk. |
142 | virtual void SetTrack(Int_t i,Int_t trk){fTracks[i]=trk;} | |
143 | //set array element i of fHits to hit. | |
144 | virtual void SetHit(Int_t i,Int_t hit){fHits[i]=hit;} | |
145 | void Print(ostream *os); // Class ascii print function | |
146 | void Read(istream *os); // Class ascii read function | |
147 | ||
7e743662 | 148 | private: |
149 | static const Int_t fkSsdd = 10; // size of fTracks and fHits arrays | |
150 | ||
f8dece8d | 151 | public: |
152 | // debugging -- goes to the dictionary | |
7e743662 | 153 | Int_t fTracks[fkSsdd]; //[fkSsdd] tracks making this digit |
154 | Int_t fHits[fkSsdd]; //[fkSsdd] hits associated to the tracks | |
155 | // 3 hits temporarily - it will be only 1 | |
156 | Float_t fTcharges[fkSsdd]; //[fkSsdd] charge per track making this digit | |
157 | Float_t fPhysics; // signal particles contribution to signal | |
f8dece8d | 158 | |
7e743662 | 159 | ClassDef(AliITSdigitSDD,2) // Simulated digit object for SDD |
f8dece8d | 160 | |
161 | }; | |
162 | // Input and output functions for standard C++ input/output. | |
163 | ostream &operator<<(ostream &os,AliITSdigitSDD &source); | |
164 | istream &operator>>(istream &os,AliITSdigitSDD &source); | |
165 | //______________________________________________________________________ | |
3bd79107 | 166 | class AliITSTransientDigit : public AliITSdigitSDD { |
3bd79107 | 167 | |
f8dece8d | 168 | public: |
169 | AliITSTransientDigit() {/*default constructor*/fTrackList=0;} | |
170 | // Standard constructor with digits and "phys" | |
171 | AliITSTransientDigit(Float_t phys,const Int_t *digits); | |
172 | virtual ~AliITSTransientDigit(){/*destructor delets TObjArray fTracklist */ | |
173 | delete fTrackList;} | |
174 | //copy constructor | |
175 | AliITSTransientDigit(const AliITSTransientDigit &source); | |
176 | //assignment operator | |
177 | AliITSTransientDigit& operator=(const AliITSTransientDigit &source); | |
178 | // returns pointer to the TObjArray of tracks and associated charges | |
179 | TObjArray *TrackList() const {return fTrackList;} | |
180 | //returns element i of fTrackList | |
181 | TObject *TrackItem(Int_t i) const {return fTrackList->At(i);} | |
182 | //put TObject into fTrackList at location i | |
183 | void PutTrackItem(TObject *obj,Int_t i){fTrackList->AddAt(obj,i);} | |
184 | void Print(ostream *os); // Class ascii print function | |
185 | void Read(istream *os); // Class ascii read function | |
186 | ||
187 | public: | |
188 | TObjArray *fTrackList; // track list | |
189 | ||
190 | ClassDef(AliITSTransientDigit,1) // Transient digit for set: ITS | |
191 | ||
192 | }; | |
193 | // Input and output functions for standard C++ input/output. | |
194 | ostream &operator<<(ostream &os,AliITSTransientDigit &source); | |
195 | istream &operator>>(istream &os,AliITSTransientDigit &source); | |
196 | //______________________________________________________________________ | |
3bd79107 | 197 | class AliITSdigitSSD: public AliITSdigit { |
7fc27b48 | 198 | |
f8dece8d | 199 | public: |
200 | AliITSdigitSSD(); //default constructor | |
201 | //Standard constructor with digits | |
202 | AliITSdigitSSD(const Int_t *digits); | |
203 | //Standard constructor with digits, tracks, and hits | |
204 | AliITSdigitSSD(const Int_t *digits,const Int_t *tracks,const Int_t *hits); | |
205 | virtual ~AliITSdigitSSD(){/* destructor */} | |
7e743662 | 206 | // returns the array size used to store Tracks and Hits |
207 | static Int_t GetNTracks() {return fkSssd;} | |
f8dece8d | 208 | Int_t GetSignal() const {/* returns signal*/return fSignal;} |
209 | Int_t GetStripNumber() const {/* returns strip number*/return fCoord2;} | |
210 | //returns 1 when side P and 0 when side N | |
211 | Int_t IsSideP() const {return fCoord1;} | |
212 | // returns pointer to the array of tracks which make this digit | |
b8c80122 | 213 | virtual Int_t *GetTracks() {return &fTracks[0];} |
7fc27b48 | 214 | // returns the pointer to the array of hits which made this digit |
f8dece8d | 215 | virtual Int_t *GetHits() {return &fHits[0];} |
216 | // returns track number kept in the array element i of fTracks | |
217 | virtual Int_t GetTrack(Int_t i) const {return fTracks[i];} | |
218 | // returns hit number kept in the array element i of fHits | |
219 | virtual Int_t GetHit(Int_t i) const {return fHits[i];} | |
ff116811 | 220 | // returns TArrayI of unduplicated track numbers (summed over hits). |
221 | virtual Int_t GetListOfTracks(TArrayI &t); | |
f8d9a5b8 | 222 | //copy the array trks[fkSssd] into fTracks |
f8dece8d | 223 | virtual void SetTracks(const Int_t *trks){ |
f8d9a5b8 | 224 | for(Int_t i=0;i<fkSssd;i++) fTracks[i]=trks[i];} |
225 | //copy the array hits[fkSssd] into fHits | |
f8dece8d | 226 | virtual void SetHits(const Int_t *hits){ |
f8d9a5b8 | 227 | for(Int_t i=0;i<fkSssd;i++) fHits[i]=hits[i];} |
f8dece8d | 228 | //set array element i of fTracks to trk. |
229 | virtual void SetTrack(Int_t i,Int_t trk){fTracks[i]=trk;} | |
230 | //set array element i of fHits to hit. | |
231 | virtual void SetHit(Int_t i,Int_t hit){fHits[i]=hit;} | |
232 | void Print(ostream *os); // Class ascii print function | |
233 | void Read(istream *os); // Class ascii read function | |
234 | ||
7e743662 | 235 | private: |
236 | static const Int_t fkSssd = 10; // size of fTracks and fHits arrays | |
237 | ||
f8dece8d | 238 | public: |
239 | // debugging -- goes to the dictionary | |
7e743662 | 240 | Int_t fTracks[fkSssd]; //[fkSssd] tracks making this digit |
241 | Int_t fHits[fkSssd]; //[fkSssd] hits associated to the tracks | |
242 | // 3 hits temporarily - it will be only 1 | |
f8dece8d | 243 | |
7e743662 | 244 | ClassDef(AliITSdigitSSD,2) // Simulated digit object for SSD |
f8dece8d | 245 | |
246 | }; | |
247 | // Input and output functions for standard C++ input/output. | |
248 | ostream &operator<<(ostream &os,AliITSdigitSSD &source); | |
249 | istream &operator>>(istream &os,AliITSdigitSSD &source); | |
58005f18 | 250 | |
58005f18 | 251 | #endif |