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