New ITS code replacing the old structure and simulations code.
[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
23 //_________________________________________________________________________
24 AliITSdigitSPD::AliITSdigitSPD(Int_t *digits) {
25 //
26 // Creates a SPD digit object
27 //
28
29 fCoord1 = digits[0];
30 fCoord2 = digits[1];
31 fSignal = digits[2];
32
33}
58005f18 34
3bd79107 35//_____________________________________________________________________________
36AliITSdigitSPD::AliITSdigitSPD(Int_t *digits,Int_t *tracks) {
58005f18 37 //
3bd79107 38 // Creates a simulated SPD digit object
58005f18 39 //
3bd79107 40
41 fCoord1 = digits[0];
42 fCoord2 = digits[1];
43 fSignal = digits[2];
44
45 Int_t i;
46 for(i=0; i<3; i++) {
47 fTracks[i] = tracks[i];
48 }
58005f18 49}
3bd79107 50
51
52ClassImp(AliITSdigitSDD)
53 //________________________________________________________________________
54 AliITSdigitSDD::AliITSdigitSDD(Float_t phys,Int_t *digits) {
55 //
56 // Creates a simulated SDD digit object to be updated
57 //
58 fCoord1 = digits[0];
59 fCoord2 = digits[1];
60 fSignal = digits[2];
61 fPhysics = phys;
62}
63
64//_____________________________________________________________________________
65AliITSdigitSDD::AliITSdigitSDD(Float_t phys,Int_t *digits,Int_t *tracks, Float_t *charges) {
66 //
67 // Creates a simulated SDD digit object
68 //
69 fCoord1 = digits[0];
70 fCoord2 = digits[1];
71 fSignal = digits[2];
72 fPhysics = phys;
73
74 Int_t i;
75 for(i=0; i<3; i++) {
76 fTcharges[i] = charges[i];
77 fTracks[i] = tracks[i];
78 }
79}
80
81
82ClassImp(AliITSTransientDigit)
83 //_______________________________________________________________________
84 AliITSTransientDigit::AliITSTransientDigit(Float_t phys,Int_t *digits):
85 AliITSdigitSDD(phys,digits) {
86 //
87 // Creates a digit object in a list of digits to be updated
88 //
89 fTrackList = new TObjArray;
90}
91
92//__________________________________________________________________________
93AliITSTransientDigit::AliITSTransientDigit(const AliITSTransientDigit &source){
94 // Copy Constructor
95 if(&source == this) return;
96 this->fTrackList = source.fTrackList;
97 return;
98}
99
100//_________________________________________________________________________
101AliITSTransientDigit&
102 AliITSTransientDigit::operator=(const AliITSTransientDigit &source) {
103 // Assignment operator
104 if(&source == this) return *this;
105 this->fTrackList = source.fTrackList;
106 return *this;
107}
108
109ClassImp(AliITSdigitSSD)
110 //__________________________________________________________________________
111 AliITSdigitSSD::AliITSdigitSSD(Int_t *digits) {
112 //
113 // Creates a real SSD digit object
114 //
115
116 fCoord1 = digits[0];
117 fCoord2 = digits[1];
118 fSignal = digits[2];
119
120}
121
122//_____________________________________________________________________________
123AliITSdigitSSD::AliITSdigitSSD(Int_t *digits,Int_t *tracks) {
124 //
125 // Creates a simulated SSD digit object
126 //
127
128 fCoord1 = digits[0];
129 fCoord2 = digits[1];
130 fSignal = digits[2];
131
132 Int_t i;
133 for(i=0; i<3; i++) {
134 fTracks[i] = tracks[i];
135 }
136}
137