Line data Source code
1 : /**************************************************************************
2 : * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 : * *
4 : * Author: The ALICE Off-line Project. *
5 : * Contributors are mentioned in the code where appropriate. *
6 : * *
7 : * Permission to use, copy, modify and distribute this software and its *
8 : * documentation strictly for non-commercial purposes is hereby granted *
9 : * without fee, provided that the above copyright notice appears in all *;
10 : * copies and that both the copyright notice and this permission notice *
11 : * appear in the supporting documentation. The authors make no claims *
12 : * about the suitability of this software for any purpose. It is *
13 : * provided "as is" without express or implied warranty. *
14 : **************************************************************************/
15 :
16 : /* $Id$ */
17 :
18 : ////////////////////////////////////////////////
19 : // RecPoints classes for set ZDC //
20 : // This class reconstructs the space //
21 : // points from digits //
22 : // for the ZDC calorimeter //
23 : ////////////////////////////////////////////////
24 :
25 :
26 : #include "AliZDCReco.h"
27 :
28 12 : ClassImp(AliZDCReco)
29 :
30 :
31 : //_____________________________________________________________________________
32 : AliZDCReco::AliZDCReco() :
33 :
34 8 : TObject(),
35 : //
36 8 : fNDetSpecNSideA(0),
37 8 : fNDetSpecPSideA(0),
38 8 : fNDetSpecNSideC(0),
39 8 : fNDetSpecPSideC(0),
40 8 : fNTrueSpectators(0),
41 8 : fNTrueSpecSideA(0),
42 8 : fNTrueSpecSideC(0),
43 8 : fNParticipants(0),
44 8 : fNPartSideA(0),
45 8 : fNPartSideC(0),
46 8 : fImpParameter(0),
47 8 : fImpParSideA(0),
48 8 : fImpParSideC(0),
49 8 : fRecoFlag(0x0),
50 8 : fEnergyFlag(kFALSE),
51 8 : fIsScalerOn(kFALSE)
52 40 : {
53 : //
54 : // Default constructor
55 : //
56 176 : for(Int_t i=0; i<10; i++){
57 80 : fZN1EnTow[i] = fZP1EnTow[i] = fZN2EnTow[i] = fZP2EnTow[i] = 0.;
58 80 : if(i<2){
59 16 : fZN1Energy[i] = fZP1Energy[i] = fZN2Energy[i] = fZP2Energy[i] = 0.;
60 16 : fZEM1signal[i] = fZEM2signal[i] = 0.;
61 16 : fPMRef1[i] = fPMRef2[i] = 0.;
62 16 : }
63 : }
64 :
65 528 : for(Int_t i=0; i<32; i++){
66 256 : fZDCScaler[i] = 0;
67 2560 : for(Int_t ij=0; ij<4; ij++) fZDCTDCData[i][ij] = 0;
68 : }
69 :
70 128 : for(int k=0; k<7; k++) fTDCchCabling[k] = 0;
71 16 : }
72 :
73 :
74 : //_____________________________________________________________________________
75 : AliZDCReco::AliZDCReco(
76 : Float_t* ezn1, Float_t* ezp1, Float_t* ezn2, Float_t* ezp2,
77 : Float_t* ezn1tow, Float_t* ezp1tow, Float_t* ezn2tow, Float_t* ezp2tow,
78 : Float_t* ezem1, Float_t* ezem2, Float_t* ref1, Float_t* ref2,
79 : //
80 : Int_t detspnSideA, Int_t detsppSideA, Int_t detspnSideC, Int_t detsppSideC,
81 : Int_t trsp, Int_t trspSideA,Int_t trspSideC,
82 : Int_t npart, Int_t npartSideA, Int_t npartSideC,
83 : Float_t b, Float_t bSideA, Float_t bSideC,
84 : UInt_t recoFlag, Bool_t energyFlag, Bool_t scalerOn,
85 : UInt_t* scaler, Int_t tdcData[32][4], Int_t tdcCabling[7]) :
86 :
87 8 : TObject(),
88 : //
89 8 : fNDetSpecNSideA(detspnSideA),
90 8 : fNDetSpecPSideA(detsppSideA),
91 8 : fNDetSpecNSideC(detspnSideC),
92 8 : fNDetSpecPSideC(detsppSideC),
93 8 : fNTrueSpectators(trsp),
94 8 : fNTrueSpecSideA(trspSideA),
95 8 : fNTrueSpecSideC(trspSideC),
96 8 : fNParticipants(npart),
97 8 : fNPartSideA(npartSideA),
98 8 : fNPartSideC(npartSideC),
99 8 : fImpParameter(b),
100 8 : fImpParSideA(bSideA),
101 8 : fImpParSideC(bSideC),
102 8 : fRecoFlag(recoFlag),
103 8 : fEnergyFlag(energyFlag),
104 8 : fIsScalerOn(scalerOn)
105 24 : {
106 : //
107 : // Constructor
108 : //
109 176 : for(Int_t j=0; j<10; j++){
110 80 : fZN1EnTow[j] = ezn1tow[j];
111 80 : fZP1EnTow[j] = ezp1tow[j];
112 80 : fZN2EnTow[j] = ezn2tow[j];
113 80 : fZP2EnTow[j] = ezp2tow[j];
114 80 : if(j<2){
115 16 : fZN1Energy[j] = ezn1[j];
116 16 : fZP1Energy[j] = ezp1[j];
117 16 : fZN2Energy[j] = ezn2[j];
118 16 : fZP2Energy[j] = ezp2[j];
119 16 : fZEM1signal[j] = ezem1[j];
120 16 : fZEM2signal[j] = ezem2[j];
121 16 : fPMRef1[j] = ref1[j];
122 16 : fPMRef2[j] = ref2[j];
123 16 : }
124 : }
125 528 : for(Int_t j=0; j<32; j++){
126 256 : fZDCScaler[j] = scaler[j];
127 2560 : for(Int_t y=0; y<4; y++) fZDCTDCData[j][y] = tdcData[j][y];
128 : }
129 128 : for(int k=0; k<7; k++) fTDCchCabling[k] = tdcCabling[k];
130 16 : }
131 :
132 : //______________________________________________________________________________
133 : AliZDCReco::AliZDCReco(const AliZDCReco &oldreco) :
134 0 : TObject(),
135 0 : fNDetSpecNSideA(oldreco.GetNDetSpecNSideA()),
136 0 : fNDetSpecPSideA(oldreco.GetNDetSpecPSideA()),
137 0 : fNDetSpecNSideC(oldreco.GetNDetSpecNSideC()),
138 0 : fNDetSpecPSideC(oldreco.GetNDetSpecPSideC()),
139 0 : fNTrueSpectators(oldreco.GetNTrueSpectators()),
140 0 : fNTrueSpecSideA(oldreco.GetNTrueSpecSideA()),
141 0 : fNTrueSpecSideC(oldreco.GetNTrueSpecSideC()),
142 0 : fNParticipants(oldreco.GetNParticipants()),
143 0 : fNPartSideA(oldreco.GetNPartSideA()),
144 0 : fNPartSideC(oldreco.GetNPartSideC()),
145 0 : fImpParameter(oldreco.GetImpParameter()),
146 0 : fImpParSideA(oldreco.GetImpParSideA()),
147 0 : fImpParSideC(oldreco.GetImpParSideC()),
148 0 : fRecoFlag(oldreco.GetRecoFlag()),
149 0 : fEnergyFlag(oldreco.GetEnergyFlag()),
150 0 : fIsScalerOn(oldreco.IsScalerOn())
151 0 : {
152 : // Copy constructor
153 :
154 0 : fZN1Energy[0] = oldreco.GetZN1HREnergy();
155 0 : fZP1Energy[0] = oldreco.GetZP1HREnergy();
156 0 : fZN2Energy[0] = oldreco.GetZN2HREnergy();
157 0 : fZP2Energy[0] = oldreco.GetZP2HREnergy();
158 : //
159 0 : fZN1Energy[1] = oldreco.GetZN1LREnergy();
160 0 : fZP1Energy[1] = oldreco.GetZP1LREnergy();
161 0 : fZN2Energy[1] = oldreco.GetZN2LREnergy();
162 0 : fZP2Energy[1] = oldreco.GetZP2LREnergy();
163 : //
164 0 : for(Int_t i=0; i<5; i++){
165 0 : fZN1EnTow[i] = oldreco.GetZN1HREnTow(i);
166 0 : fZP1EnTow[i] = oldreco.GetZP1HREnTow(i);
167 0 : fZN2EnTow[i] = oldreco.GetZN2HREnTow(i);
168 0 : fZP2EnTow[i] = oldreco.GetZP2HREnTow(i);
169 0 : fZN1EnTow[i+5] = oldreco.GetZN1LREnTow(i);
170 0 : fZP1EnTow[i+5] = oldreco.GetZP1LREnTow(i);
171 0 : fZN2EnTow[i+5] = oldreco.GetZN2LREnTow(i);
172 0 : fZP2EnTow[i+5] = oldreco.GetZP2LREnTow(i);
173 : }
174 0 : fZEM1signal[0] = oldreco.GetZEM1HRsignal();
175 0 : fZEM1signal[1] = oldreco.GetZEM1LRsignal();
176 0 : fZEM2signal[0] = oldreco.GetZEM2HRsignal();
177 0 : fZEM2signal[1] = oldreco.GetZEM2LRsignal();
178 0 : fPMRef1[0] = oldreco.GetPMRef1HRsignal();
179 0 : fPMRef1[1] = oldreco.GetPMRef1LRsignal();
180 0 : fPMRef2[0] = oldreco.GetPMRef2HRsignal();
181 0 : fPMRef2[1] = oldreco.GetPMRef2LRsignal();
182 0 : for(Int_t j=0; j<32; j++){
183 0 : fZDCScaler[j] = oldreco.GetZDCScaler(j);
184 0 : for(Int_t y=0; y<4; y++) fZDCTDCData[j][y] = oldreco.GetZDCTDCData(j, y);
185 : }
186 0 : for(int k=0; k<7; k++) fTDCchCabling[k] = oldreco.GetTDCchCabling(k);
187 0 : }
188 :
189 :
190 : //______________________________________________________________________________
191 : AliZDCReco &AliZDCReco::operator= (const AliZDCReco &reco)
192 : {
193 : // assignment operator
194 0 : if(&reco == this) return *this;
195 :
196 0 : fNDetSpecNSideA = reco.GetNDetSpecNSideA();
197 0 : fNDetSpecPSideA = reco.GetNDetSpecPSideA();
198 0 : fNDetSpecNSideC = reco.GetNDetSpecNSideC();
199 0 : fNDetSpecPSideC = reco.GetNDetSpecPSideC();
200 0 : fNTrueSpectators = reco.GetNTrueSpectators();
201 0 : fNTrueSpecSideA = reco.GetNTrueSpecSideA();
202 0 : fNTrueSpecSideC = reco.GetNTrueSpecSideC();
203 0 : fNParticipants = reco.GetNParticipants();
204 0 : fNPartSideA = reco.GetNPartSideA();
205 0 : fNPartSideC = reco.GetNPartSideC();
206 0 : fImpParameter = reco.GetImpParameter();
207 0 : fImpParSideA = reco.GetImpParSideA();
208 0 : fImpParSideC = reco.GetImpParSideC();
209 0 : fRecoFlag = reco.GetRecoFlag();
210 0 : fEnergyFlag = reco.GetEnergyFlag();
211 0 : fIsScalerOn = reco.IsScalerOn();
212 :
213 0 : fZN1Energy[0] = reco.GetZN1HREnergy();
214 0 : fZP1Energy[0] = reco.GetZP1HREnergy();
215 0 : fZN2Energy[0] = reco.GetZN2HREnergy();
216 0 : fZP2Energy[0] = reco.GetZP2HREnergy();
217 : //
218 0 : fZN1Energy[1] = reco.GetZN1LREnergy();
219 0 : fZP1Energy[1] = reco.GetZP1LREnergy();
220 0 : fZN2Energy[1] = reco.GetZN2LREnergy();
221 0 : fZP2Energy[1] = reco.GetZP2LREnergy();
222 : //
223 0 : for(Int_t i=0; i<5; i++){
224 0 : fZN1EnTow[i] = reco.GetZN1HREnTow(i);
225 0 : fZP1EnTow[i] = reco.GetZP1HREnTow(i);
226 0 : fZN2EnTow[i] = reco.GetZN2HREnTow(i);
227 0 : fZP2EnTow[i] = reco.GetZP2HREnTow(i);
228 0 : fZN1EnTow[i+5] = reco.GetZN1LREnTow(i);
229 0 : fZP1EnTow[i+5] = reco.GetZP1LREnTow(i);
230 0 : fZN2EnTow[i+5] = reco.GetZN2LREnTow(i);
231 0 : fZP2EnTow[i+5] = reco.GetZP2LREnTow(i);
232 : }
233 0 : fZEM1signal[0] = reco.GetZEM1HRsignal();
234 0 : fZEM1signal[1] = reco.GetZEM1LRsignal();
235 0 : fZEM2signal[0] = reco.GetZEM2HRsignal();
236 0 : fZEM2signal[1] = reco.GetZEM2LRsignal();
237 0 : fPMRef1[0] = reco.GetPMRef1HRsignal();
238 0 : fPMRef1[1] = reco.GetPMRef1LRsignal();
239 0 : fPMRef2[0] = reco.GetPMRef2HRsignal();
240 0 : fPMRef2[1] = reco.GetPMRef2LRsignal();
241 0 : for(Int_t j=0; j<32; j++){
242 0 : fZDCScaler[j] = reco.GetZDCScaler(j);
243 0 : for(Int_t y=0; y<4; y++) fZDCTDCData[j][y] = reco.GetZDCTDCData(j, y);
244 : }
245 0 : for(int k=0; k<7; k++) fTDCchCabling[k] = reco.GetTDCchCabling(k);
246 :
247 0 : return *this;
248 0 : }
249 :
250 : //______________________________________________________________________________
251 : void AliZDCReco::Print(Option_t *) const {
252 : //
253 : // Printing Reconstruction Parameters
254 : //
255 0 : printf(" ****************** AliZDCReco object ******************\n"
256 : " --------------- side A ---------------\n"
257 : " E_ZN = %1.2f TeV, E_ZP = %1.2f TeV, "
258 : " E_ZEM1 = %1.2f TeV, E_ZEM2 = %1.2f TeV\n "
259 : " N_spec_n = %d, N_spec_p = %d,"
260 : " N_part = %d, b = %1.4f fm\n"
261 : " --------------- side C ---------------\n"
262 : " E_ZN = %1.2f TeV, E_ZP = %1.2f TeV, "
263 : " N_spec_n = %d, N_spec_p = %d,"
264 : " N_part = %d, b = %1.4f fm\n"
265 : " *******************************************************\n",
266 0 : fZN2Energy[0]/1000., fZP2Energy[0]/1000.,
267 0 : fZEM1signal[0]/1000.,fZEM2signal[0]/1000.,
268 0 : fNDetSpecNSideA,fNDetSpecPSideA, fNPartSideA,fImpParSideA,
269 0 : fZN1Energy[0]/1000.,fZP1Energy[0]/1000.,
270 0 : fNDetSpecNSideC,fNDetSpecPSideC,fNPartSideC,fImpParSideC);
271 :
272 0 : }
|