1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 ////////////////////////////////////////////////
19 // RecPoints classes for set ZDC //
20 // This class reconstructs the space //
21 // points from digits //
22 // for the ZDC calorimeter //
23 ////////////////////////////////////////////////
26 #include "AliZDCReco.h"
31 //_____________________________________________________________________________
32 AliZDCReco::AliZDCReco() :
54 // Default constructor
56 for(Int_t i=0; i<10; i++){
57 fZN1EnTow[i] = fZP1EnTow[i] = fZN2EnTow[i] = fZP2EnTow[i] = 0.;
59 fZN1Energy[i] = fZP1Energy[i] = fZN2Energy[i] = fZP2Energy[i] = 0.;
60 fZEM1signal[i] = fZEM2signal[i] = 0.;
61 fPMRef1[i] = fPMRef2[i] = 0.;
65 for(Int_t i=0; i<32; i++){
67 for(Int_t ij=0; ij<4; ij++) fZDCTDCData[i][ij] = 0;
72 //_____________________________________________________________________________
73 AliZDCReco::AliZDCReco(
74 Float_t* ezn1, Float_t* ezp1, Float_t* ezn2, Float_t* ezp2,
75 Float_t* ezn1tow, Float_t* ezp1tow, Float_t* ezn2tow, Float_t* ezp2tow,
76 Float_t* ezem1, Float_t* ezem2, Float_t* ref1, Float_t* ref2,
78 Int_t detspnSideA, Int_t detsppSideA, Int_t detspnSideC, Int_t detsppSideC,
79 Int_t trsp, Int_t trspSideA,Int_t trspSideC,
80 Int_t npart, Int_t npartSideA, Int_t npartSideC,
81 Float_t b, Float_t bSideA, Float_t bSideC,
82 UInt_t recoFlag, Bool_t energyFlag, Bool_t scalerOn,
83 UInt_t* scaler, Int_t tdcData[32][4]) :
87 fNDetSpecNSideA(detspnSideA),
88 fNDetSpecPSideA(detsppSideA),
89 fNDetSpecNSideC(detspnSideC),
90 fNDetSpecPSideC(detsppSideC),
91 fNTrueSpectators(trsp),
92 fNTrueSpecSideA(trspSideA),
93 fNTrueSpecSideC(trspSideC),
94 fNParticipants(npart),
95 fNPartSideA(npartSideA),
96 fNPartSideC(npartSideC),
101 fEnergyFlag(energyFlag),
102 fIsScalerOn(scalerOn)
107 for(Int_t j=0; j<10; j++){
108 fZN1EnTow[j] = ezn1tow[j];
109 fZP1EnTow[j] = ezp1tow[j];
110 fZN2EnTow[j] = ezn2tow[j];
111 fZP2EnTow[j] = ezp2tow[j];
113 fZN1Energy[j] = ezn1[j];
114 fZP1Energy[j] = ezp1[j];
115 fZN2Energy[j] = ezn2[j];
116 fZP2Energy[j] = ezp2[j];
117 fZEM1signal[j] = ezem1[j];
118 fZEM2signal[j] = ezem2[j];
119 fPMRef1[j] = ref1[j];
120 fPMRef2[j] = ref2[j];
123 for(Int_t j=0; j<32; j++){
124 fZDCScaler[j] = scaler[j];
125 for(Int_t y=0; y<4; y++) fZDCTDCData[j][y] = tdcData[j][y];
129 //______________________________________________________________________________
130 AliZDCReco::AliZDCReco(const AliZDCReco &oldreco) :
132 fNDetSpecNSideA(oldreco.GetNDetSpecNSideA()),
133 fNDetSpecPSideA(oldreco.GetNDetSpecPSideA()),
134 fNDetSpecNSideC(oldreco.GetNDetSpecNSideC()),
135 fNDetSpecPSideC(oldreco.GetNDetSpecPSideC()),
136 fNTrueSpectators(oldreco.GetNTrueSpectators()),
137 fNTrueSpecSideA(oldreco.GetNTrueSpecSideA()),
138 fNTrueSpecSideC(oldreco.GetNTrueSpecSideC()),
139 fNParticipants(oldreco.GetNParticipants()),
140 fNPartSideA(oldreco.GetNPartSideA()),
141 fNPartSideC(oldreco.GetNPartSideC()),
142 fImpParameter(oldreco.GetImpParameter()),
143 fImpParSideA(oldreco.GetImpParSideA()),
144 fImpParSideC(oldreco.GetImpParSideC()),
145 fRecoFlag(oldreco.GetRecoFlag()),
146 fEnergyFlag(oldreco.GetEnergyFlag()),
147 fIsScalerOn(oldreco.IsScalerOn())
151 fZN1Energy[0] = oldreco.GetZN1HREnergy();
152 fZP1Energy[0] = oldreco.GetZP1HREnergy();
153 fZN2Energy[0] = oldreco.GetZN2HREnergy();
154 fZP2Energy[0] = oldreco.GetZP2HREnergy();
156 fZN1Energy[1] = oldreco.GetZN1LREnergy();
157 fZP1Energy[1] = oldreco.GetZP1LREnergy();
158 fZN2Energy[1] = oldreco.GetZN2LREnergy();
159 fZP2Energy[1] = oldreco.GetZP2LREnergy();
161 for(Int_t i=0; i<5; i++){
162 fZN1EnTow[i] = oldreco.GetZN1HREnTow(i);
163 fZP1EnTow[i] = oldreco.GetZP1HREnTow(i);
164 fZN2EnTow[i] = oldreco.GetZN2HREnTow(i);
165 fZP2EnTow[i] = oldreco.GetZP2HREnTow(i);
166 fZN1EnTow[i+5] = oldreco.GetZN1LREnTow(i);
167 fZP1EnTow[i+5] = oldreco.GetZP1LREnTow(i);
168 fZN2EnTow[i+5] = oldreco.GetZN2LREnTow(i);
169 fZP2EnTow[i+5] = oldreco.GetZP2LREnTow(i);
171 fZEM1signal[0] = oldreco.GetZEM1HRsignal();
172 fZEM1signal[1] = oldreco.GetZEM1LRsignal();
173 fZEM2signal[0] = oldreco.GetZEM2HRsignal();
174 fZEM2signal[1] = oldreco.GetZEM2LRsignal();
175 fPMRef1[0] = oldreco.GetPMRef1HRsignal();
176 fPMRef1[1] = oldreco.GetPMRef1LRsignal();
177 fPMRef2[0] = oldreco.GetPMRef2HRsignal();
178 fPMRef2[1] = oldreco.GetPMRef2LRsignal();
179 for(Int_t j=0; j<32; j++){
180 fZDCScaler[j] = oldreco.GetZDCScaler(j);
181 for(Int_t y=0; y<4; y++) fZDCTDCData[j][y] = oldreco.GetZDCTDCData(j, y);
186 //______________________________________________________________________________
187 AliZDCReco &AliZDCReco::operator= (const AliZDCReco &reco)
189 // assignment operator
190 if(&reco == this) return *this;
192 fNDetSpecNSideA = reco.GetNDetSpecNSideA();
193 fNDetSpecPSideA = reco.GetNDetSpecPSideA();
194 fNDetSpecNSideC = reco.GetNDetSpecNSideC();
195 fNDetSpecPSideC = reco.GetNDetSpecPSideC();
196 fNTrueSpectators = reco.GetNTrueSpectators();
197 fNTrueSpecSideA = reco.GetNTrueSpecSideA();
198 fNTrueSpecSideC = reco.GetNTrueSpecSideC();
199 fNParticipants = reco.GetNParticipants();
200 fNPartSideA = reco.GetNPartSideA();
201 fNPartSideC = reco.GetNPartSideC();
202 fImpParameter = reco.GetImpParameter();
203 fImpParSideA = reco.GetImpParSideA();
204 fImpParSideC = reco.GetImpParSideC();
205 fRecoFlag = reco.GetRecoFlag();
206 fEnergyFlag = reco.GetEnergyFlag();
207 fIsScalerOn = reco.IsScalerOn();
209 fZN1Energy[0] = reco.GetZN1HREnergy();
210 fZP1Energy[0] = reco.GetZP1HREnergy();
211 fZN2Energy[0] = reco.GetZN2HREnergy();
212 fZP2Energy[0] = reco.GetZP2HREnergy();
214 fZN1Energy[1] = reco.GetZN1LREnergy();
215 fZP1Energy[1] = reco.GetZP1LREnergy();
216 fZN2Energy[1] = reco.GetZN2LREnergy();
217 fZP2Energy[1] = reco.GetZP2LREnergy();
219 for(Int_t i=0; i<5; i++){
220 fZN1EnTow[i] = reco.GetZN1HREnTow(i);
221 fZP1EnTow[i] = reco.GetZP1HREnTow(i);
222 fZN2EnTow[i] = reco.GetZN2HREnTow(i);
223 fZP2EnTow[i] = reco.GetZP2HREnTow(i);
224 fZN1EnTow[i+5] = reco.GetZN1LREnTow(i);
225 fZP1EnTow[i+5] = reco.GetZP1LREnTow(i);
226 fZN2EnTow[i+5] = reco.GetZN2LREnTow(i);
227 fZP2EnTow[i+5] = reco.GetZP2LREnTow(i);
229 fZEM1signal[0] = reco.GetZEM1HRsignal();
230 fZEM1signal[1] = reco.GetZEM1LRsignal();
231 fZEM2signal[0] = reco.GetZEM2HRsignal();
232 fZEM2signal[1] = reco.GetZEM2LRsignal();
233 fPMRef1[0] = reco.GetPMRef1HRsignal();
234 fPMRef1[1] = reco.GetPMRef1LRsignal();
235 fPMRef2[0] = reco.GetPMRef2HRsignal();
236 fPMRef2[1] = reco.GetPMRef2LRsignal();
237 for(Int_t j=0; j<32; j++){
238 fZDCScaler[j] = reco.GetZDCScaler(j);
239 for(Int_t y=0; y<4; y++) fZDCTDCData[j][y] = reco.GetZDCTDCData(j, y);
246 //______________________________________________________________________________
247 void AliZDCReco::Print(Option_t *) const {
249 // Printing Reconstruction Parameters
251 printf(" ****************** AliZDCReco object ******************\n"
252 " --------------- side A ---------------\n"
253 " E_ZN = %1.2f TeV, E_ZP = %1.2f TeV, "
254 " E_ZEM1 = %1.2f TeV, E_ZEM2 = %1.2f TeV\n "
255 " N_spec_n = %d, N_spec_p = %d,"
256 " N_part = %d, b = %1.4f fm\n"
257 " --------------- side C ---------------\n"
258 " E_ZN = %1.2f TeV, E_ZP = %1.2f TeV, "
259 " N_spec_n = %d, N_spec_p = %d,"
260 " N_part = %d, b = %1.4f fm\n"
261 " *******************************************************\n",
262 fZN2Energy[0]/1000., fZP2Energy[0]/1000.,
263 fZEM1signal[0]/1000.,fZEM2signal[0]/1000.,
264 fNDetSpecNSideA,fNDetSpecPSideA, fNPartSideA,fImpParSideA,
265 fZN1Energy[0]/1000.,fZP1Energy[0]/1000.,
266 fNDetSpecNSideC,fNDetSpecPSideC,fNPartSideC,fImpParSideC);