changed to 6 patches
[u/mrichter/AliRoot.git] / ITS / AliITSdigit.cxx
CommitLineData
3bd79107 1////////////////////////////////////////////////
2// Digits classes for set:ITS //
3////////////////////////////////////////////////
4
5
58005f18 6#include "AliITSdigit.h"
3bd79107 7
58005f18 8ClassImp(AliITSdigit)
3bd79107 9//_____________________________________________________________________________
10
11AliITSdigit::AliITSdigit(Int_t *digits) {
12 //
13 // Creates a real data digit object
14 //
15 fCoord1 = digits[0];
16 fCoord2 = digits[1];
17 fSignal = digits[2];
18}
19
20
21ClassImp(AliITSdigitSPD)
22
92c19c36 23 AliITSdigitSPD::AliITSdigitSPD() {
24 // default constructor
25 fSignal=fCoord1=fCoord2=0;
26 fTracks[0]=fTracks[1]=fTracks[2]=-3;
27 fHits[0]=fHits[1]=fHits[2]=-1;
28 }
29
30
31
3bd79107 32 //_________________________________________________________________________
33 AliITSdigitSPD::AliITSdigitSPD(Int_t *digits) {
34 //
35 // Creates a SPD digit object
36 //
37
38 fCoord1 = digits[0];
39 fCoord2 = digits[1];
40 fSignal = digits[2];
41
42}
58005f18 43
3bd79107 44//_____________________________________________________________________________
e8189707 45AliITSdigitSPD::AliITSdigitSPD(Int_t *digits,Int_t *tracks,Int_t *hits) {
58005f18 46 //
3bd79107 47 // Creates a simulated SPD digit object
58005f18 48 //
3bd79107 49
50 fCoord1 = digits[0];
51 fCoord2 = digits[1];
52 fSignal = digits[2];
53
e8189707 54 for(Int_t i=0; i<3; i++) {
3bd79107 55 fTracks[i] = tracks[i];
e8189707 56 fHits[i] = hits[i];
3bd79107 57 }
58005f18 58}
3bd79107 59
60
61ClassImp(AliITSdigitSDD)
92c19c36 62
63 AliITSdigitSDD::AliITSdigitSDD() {
64 // default constructor
65 fSignal=fCoord1=fCoord2=0;
66 fTracks[0]=fTracks[1]=fTracks[2]=-3;
67 fHits[0]=fHits[1]=fHits[2]=-1;
68 fPhysics=0; fTcharges[0]=fTcharges[1]=fTcharges[2]=0;
69 }
70
3bd79107 71 //________________________________________________________________________
e8189707 72AliITSdigitSDD::AliITSdigitSDD(Float_t phys,Int_t *digits) {
3bd79107 73 //
74 // Creates a simulated SDD digit object to be updated
75 //
76 fCoord1 = digits[0];
77 fCoord2 = digits[1];
78 fSignal = digits[2];
79 fPhysics = phys;
80}
81
82//_____________________________________________________________________________
e8189707 83AliITSdigitSDD::AliITSdigitSDD(Float_t phys,Int_t *digits,Int_t *tracks,Int_t *hits,Float_t *charges) {
3bd79107 84 //
85 // Creates a simulated SDD digit object
86 //
87 fCoord1 = digits[0];
88 fCoord2 = digits[1];
89 fSignal = digits[2];
90 fPhysics = phys;
91
e8189707 92 for(Int_t i=0; i<3; i++) {
3bd79107 93 fTcharges[i] = charges[i];
94 fTracks[i] = tracks[i];
e8189707 95 fHits[i] = hits[i];
3bd79107 96 }
97}
98
99
100ClassImp(AliITSTransientDigit)
101 //_______________________________________________________________________
e8189707 102AliITSTransientDigit::AliITSTransientDigit(Float_t phys,Int_t *digits):
3bd79107 103 AliITSdigitSDD(phys,digits) {
104 //
105 // Creates a digit object in a list of digits to be updated
106 //
107 fTrackList = new TObjArray;
108}
109
110//__________________________________________________________________________
111AliITSTransientDigit::AliITSTransientDigit(const AliITSTransientDigit &source){
112 // Copy Constructor
113 if(&source == this) return;
114 this->fTrackList = source.fTrackList;
115 return;
116}
117
118//_________________________________________________________________________
119AliITSTransientDigit&
120 AliITSTransientDigit::operator=(const AliITSTransientDigit &source) {
121 // Assignment operator
122 if(&source == this) return *this;
123 this->fTrackList = source.fTrackList;
124 return *this;
125}
126
127ClassImp(AliITSdigitSSD)
92c19c36 128
129 AliITSdigitSSD::AliITSdigitSSD() {
130 // default constructor
131 fSignal=fCoord1=fCoord2=0;
132 fTracks[0]=fTracks[1]=fTracks[2]=-3;
133 fHits[0]=fHits[1]=fHits[2]=-1;
134 }
135
3bd79107 136 //__________________________________________________________________________
e8189707 137AliITSdigitSSD::AliITSdigitSSD(Int_t *digits) {
3bd79107 138 //
139 // Creates a real SSD digit object
140 //
141
142 fCoord1 = digits[0];
143 fCoord2 = digits[1];
144 fSignal = digits[2];
145
146}
147
148//_____________________________________________________________________________
e8189707 149AliITSdigitSSD::AliITSdigitSSD(Int_t *digits,Int_t *tracks,Int_t *hits) {
3bd79107 150 //
151 // Creates a simulated SSD digit object
152 //
153
154 fCoord1 = digits[0];
155 fCoord2 = digits[1];
156 fSignal = digits[2];
e8189707 157
158 for(Int_t i=0; i<3; i++) {
3bd79107 159 fTracks[i] = tracks[i];
e8189707 160 fHits[i] = hits[i];
3bd79107 161 }
162}
163