Obsolete class (related to V1 tracking)
[u/mrichter/AliRoot.git] / ITS / AliITSdigit.h
CommitLineData
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
15class TObjArray;
16class TArrayI;
17class TArrayF;
92c19c36 18
f8dece8d 19//______________________________________________________________________
3bd79107 20class 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
ac74f489 37 virtual Int_t GetTrack(Int_t) const {return 0;}
f8dece8d 38 // returns hit number kept in the array element i of fHits
ac74f489 39 virtual Int_t GetHit(Int_t) const {return 0;}
f8dece8d 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
ecee53fc 49 protected:
f8dece8d 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.
58ostream &operator<<(ostream &os,AliITSdigit &source);
59istream &operator>>(istream &os,AliITSdigit &source);
60//______________________________________________________________________
3bd79107 61class 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;}
ecee53fc 71 // returns the signal in electrons
72 Int_t GetSignalSPD() {return fSignalSPD;}
3bd79107 73 // returns pointer to the array of tracks which make this digit
b8c80122 74 virtual Int_t *GetTracks() {return &fTracks[0];}
f8dece8d 75 //returns the pointer to the array of hits which made this digit
76 virtual Int_t *GetHits() {return &fHits[0];}
77 // returns track number kept in the array element i of fTracks
78 virtual Int_t GetTrack(Int_t i) const {return fTracks[i];}
79 // returns hit number kept in the array element i of fHits
80 virtual Int_t GetHit(Int_t i) const {return fHits[i];}
ff116811 81 // returns TArrayI of unduplicated track numbers (summed over hits).
82 virtual Int_t GetListOfTracks(TArrayI &t);
f8d9a5b8 83 //copy the array trks[fkSspd] into fTracks
f8dece8d 84 virtual void SetTracks(const Int_t *trks){
f8d9a5b8 85 for(Int_t i=0;i<fkSspd;i++) fTracks[i]=trks[i];}
ecee53fc 86 // set signal in electrons
87 void SetSignalSPD(Int_t sig) {fSignalSPD = sig;}
f8d9a5b8 88 //copy the array hits[fkSspd] into fHits
f8dece8d 89 virtual void SetHits(const Int_t *hits){
f8d9a5b8 90 for(Int_t i=0;i<fkSspd;i++) fHits[i]=hits[i];}
f8dece8d 91 //set array element i of fTracks to trk.
92 virtual void SetTrack(Int_t i,Int_t trk){fTracks[i]=trk;}
93 //set array element i of fHits to hit.
94 virtual void SetHit(Int_t i,Int_t hit){fHits[i]=hit;}
95 void Print(ostream *os); // Class ascii print function
96 void Read(istream *os); // Class ascii read function
97
ecee53fc 98 protected:
7e743662 99 static const Int_t fkSspd = 10; // size of fTracks and fHits arrays
100
f8dece8d 101 // debugging -- goes to the dictionary
7e743662 102 Int_t fTracks[fkSspd]; //[fkSspd] tracks making this digit
103 Int_t fHits[fkSspd]; //[fkSspd] hits associated to the tracks
104 Int_t fSignalSPD; // Signal in electrons
7fc27b48 105
7e743662 106 ClassDef(AliITSdigitSPD,2) // Simulated digit object for SPD
3bd79107 107
f8dece8d 108};
109// Input and output functions for standard C++ input/output.
110ostream &operator<<(ostream &os,AliITSdigitSPD &source);
111istream &operator>>(istream &os,AliITSdigitSPD &source);
7e743662 112
f8dece8d 113//______________________________________________________________________
3bd79107 114class AliITSdigitSDD: public AliITSdigit {
f8dece8d 115
116 public:
117 AliITSdigitSDD(); //default creator
118 //standard creator with digits and "phys"
119 AliITSdigitSDD(Float_t phys,const Int_t *digits);
120 //standard creator with digits, tracls, hits, "phys", and charge
121 AliITSdigitSDD( Float_t phys,const Int_t *digits,const Int_t *tracks,
122 const Int_t *hits,const Float_t *charges);
123 virtual ~AliITSdigitSDD(){/* destructor*/}
7e743662 124 // returns the array size used to store Tracks and Hits
125 static Int_t GetNTracks() {return fkSsdd;}
3bd79107 126 // returns pointer to the array of tracks which make this digit
b8c80122 127 virtual Int_t *GetTracks() {return &fTracks[0];}
7fc27b48 128 // returns the pointer to the array of hits which made this digit
f8dece8d 129 virtual Int_t *GetHits() {return &fHits[0];}
130 // returns track number kept in the array element i of fTracks
131 virtual Int_t GetTrack(Int_t i) const {return fTracks[i];}
132 // returns hit number kept in the array element i of fHits
133 virtual Int_t GetHit(Int_t i) const {return fHits[i];}
ff116811 134 // Return charge deposited by this track/hit
135 virtual Float_t GetCharge(Int_t i){return fTcharges[i];}
136 // returns TArrayI of unduplicated track numbers (summed over hits).
137 virtual Int_t GetListOfTracks(TArrayI &t,TArrayF &c);
f8d9a5b8 138 //copy the array trks[fkSsdd] into fTracks
f8dece8d 139 virtual void SetTracks(const Int_t *trks){
f8d9a5b8 140 for(Int_t i=0;i<fkSsdd;i++) fTracks[i]=trks[i];}
141 //copy the array hits[fkSsdd] into fHits
f8dece8d 142 virtual void SetHits(const Int_t *hits){
f8d9a5b8 143 for(Int_t i=0;i<fkSsdd;i++) fHits[i]=hits[i];}
f8dece8d 144 //set array element i of fTracks to trk.
145 virtual void SetTrack(Int_t i,Int_t trk){fTracks[i]=trk;}
146 //set array element i of fHits to hit.
147 virtual void SetHit(Int_t i,Int_t hit){fHits[i]=hit;}
148 void Print(ostream *os); // Class ascii print function
149 void Read(istream *os); // Class ascii read function
150
ecee53fc 151 protected:
7e743662 152 static const Int_t fkSsdd = 10; // size of fTracks and fHits arrays
153
f8dece8d 154 // debugging -- goes to the dictionary
7e743662 155 Int_t fTracks[fkSsdd]; //[fkSsdd] tracks making this digit
156 Int_t fHits[fkSsdd]; //[fkSsdd] hits associated to the tracks
157 // 3 hits temporarily - it will be only 1
158 Float_t fTcharges[fkSsdd]; //[fkSsdd] charge per track making this digit
159 Float_t fPhysics; // signal particles contribution to signal
f8dece8d 160
7e743662 161 ClassDef(AliITSdigitSDD,2) // Simulated digit object for SDD
f8dece8d 162
163};
164// Input and output functions for standard C++ input/output.
165ostream &operator<<(ostream &os,AliITSdigitSDD &source);
166istream &operator>>(istream &os,AliITSdigitSDD &source);
167//______________________________________________________________________
3bd79107 168class AliITSTransientDigit : public AliITSdigitSDD {
3bd79107 169
f8dece8d 170 public:
171 AliITSTransientDigit() {/*default constructor*/fTrackList=0;}
172 // Standard constructor with digits and "phys"
173 AliITSTransientDigit(Float_t phys,const Int_t *digits);
174 virtual ~AliITSTransientDigit(){/*destructor delets TObjArray fTracklist */
175 delete fTrackList;}
176 //copy constructor
177 AliITSTransientDigit(const AliITSTransientDigit &source);
178 //assignment operator
179 AliITSTransientDigit& operator=(const AliITSTransientDigit &source);
180 // returns pointer to the TObjArray of tracks and associated charges
181 TObjArray *TrackList() const {return fTrackList;}
182 //returns element i of fTrackList
183 TObject *TrackItem(Int_t i) const {return fTrackList->At(i);}
184 //put TObject into fTrackList at location i
185 void PutTrackItem(TObject *obj,Int_t i){fTrackList->AddAt(obj,i);}
186 void Print(ostream *os); // Class ascii print function
187 void Read(istream *os); // Class ascii read function
188
ecee53fc 189 protected:
f8dece8d 190 TObjArray *fTrackList; // track list
191
192 ClassDef(AliITSTransientDigit,1) // Transient digit for set: ITS
193
194};
195// Input and output functions for standard C++ input/output.
196ostream &operator<<(ostream &os,AliITSTransientDigit &source);
197istream &operator>>(istream &os,AliITSTransientDigit &source);
198//______________________________________________________________________
3bd79107 199class AliITSdigitSSD: public AliITSdigit {
7fc27b48 200
f8dece8d 201 public:
202 AliITSdigitSSD(); //default constructor
203 //Standard constructor with digits
204 AliITSdigitSSD(const Int_t *digits);
205 //Standard constructor with digits, tracks, and hits
206 AliITSdigitSSD(const Int_t *digits,const Int_t *tracks,const Int_t *hits);
207 virtual ~AliITSdigitSSD(){/* destructor */}
7e743662 208 // returns the array size used to store Tracks and Hits
209 static Int_t GetNTracks() {return fkSssd;}
f8dece8d 210 Int_t GetSignal() const {/* returns signal*/return fSignal;}
211 Int_t GetStripNumber() const {/* returns strip number*/return fCoord2;}
212 //returns 1 when side P and 0 when side N
213 Int_t IsSideP() const {return fCoord1;}
214 // returns pointer to the array of tracks which make this digit
b8c80122 215 virtual Int_t *GetTracks() {return &fTracks[0];}
7fc27b48 216 // returns the pointer to the array of hits which made this digit
f8dece8d 217 virtual Int_t *GetHits() {return &fHits[0];}
218 // returns track number kept in the array element i of fTracks
219 virtual Int_t GetTrack(Int_t i) const {return fTracks[i];}
220 // returns hit number kept in the array element i of fHits
221 virtual Int_t GetHit(Int_t i) const {return fHits[i];}
ff116811 222 // returns TArrayI of unduplicated track numbers (summed over hits).
223 virtual Int_t GetListOfTracks(TArrayI &t);
f8d9a5b8 224 //copy the array trks[fkSssd] into fTracks
f8dece8d 225 virtual void SetTracks(const Int_t *trks){
f8d9a5b8 226 for(Int_t i=0;i<fkSssd;i++) fTracks[i]=trks[i];}
227 //copy the array hits[fkSssd] into fHits
f8dece8d 228 virtual void SetHits(const Int_t *hits){
f8d9a5b8 229 for(Int_t i=0;i<fkSssd;i++) fHits[i]=hits[i];}
f8dece8d 230 //set array element i of fTracks to trk.
231 virtual void SetTrack(Int_t i,Int_t trk){fTracks[i]=trk;}
232 //set array element i of fHits to hit.
233 virtual void SetHit(Int_t i,Int_t hit){fHits[i]=hit;}
234 void Print(ostream *os); // Class ascii print function
235 void Read(istream *os); // Class ascii read function
236
ecee53fc 237 protected:
7e743662 238 static const Int_t fkSssd = 10; // size of fTracks and fHits arrays
239
f8dece8d 240 // debugging -- goes to the dictionary
7e743662 241 Int_t fTracks[fkSssd]; //[fkSssd] tracks making this digit
242 Int_t fHits[fkSssd]; //[fkSssd] hits associated to the tracks
243 // 3 hits temporarily - it will be only 1
f8dece8d 244
7e743662 245 ClassDef(AliITSdigitSSD,2) // Simulated digit object for SSD
f8dece8d 246
247};
248// Input and output functions for standard C++ input/output.
249ostream &operator<<(ostream &os,AliITSdigitSSD &source);
250istream &operator>>(istream &os,AliITSdigitSSD &source);
58005f18 251
58005f18 252#endif