Adding a reminder for coders
[u/mrichter/AliRoot.git] / ZDC / AliZDCReco.cxx
CommitLineData
1450a7cd 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
803d1ab0 16/* $Id$ */
1450a7cd 17
18////////////////////////////////////////////////
19// RecPoints classes for set ZDC //
93f80a6f 20// This class reconstructs the space //
21// points from digits //
22// for the ZDC calorimeter //
1450a7cd 23////////////////////////////////////////////////
24
25
26#include "AliZDCReco.h"
27
28ClassImp(AliZDCReco)
29
cc2abffd 30
31//_____________________________________________________________________________
32AliZDCReco::AliZDCReco() :
33
34 TObject(),
646f1679 35 //
73bc3a3f 36 fNDetSpecNSideA(0),
37 fNDetSpecPSideA(0),
38 fNDetSpecNSideC(0),
39 fNDetSpecPSideC(0),
40 fNTrueSpectators(0),
41 fNTrueSpecSideA(0),
42 fNTrueSpecSideC(0),
43 fNParticipants(0),
44 fNPartSideA(0),
45 fNPartSideC(0),
46 fImpParameter(0),
47 fImpParSideA(0),
1e319f71 48 fImpParSideC(0),
81f09162 49 fRecoFlag(0x0),
077d2505 50 fEnergyFlag(kFALSE),
81f09162 51 fIsScalerOn(kFALSE)
cc2abffd 52{
53 //
54 // Default constructor
55 //
c35ed519 56 for(Int_t i=0; i<10; i++){
57 fZN1EnTow[i] = fZP1EnTow[i] = fZN2EnTow[i] = fZP2EnTow[i] = 0.;
58 if(i<2){
59 fZN1Energy[i] = fZP1Energy[i] = fZN2Energy[i] = fZP2Energy[i] = 0.;
60 fZEM1signal[i] = fZEM2signal[i] = 0.;
61 fPMRef1[i] = fPMRef2[i] = 0.;
62 }
84d6255e 63 }
81f09162 64
32e2fda5 65 for(Int_t i=0; i<32; i++){
66 fZDCScaler[i] = 0;
f53e5ecb 67 for(Int_t ij=0; ij<4; ij++) fZDCTDCData[i][ij] = 0;
32e2fda5 68 }
cc2abffd 69}
70
71
1450a7cd 72//_____________________________________________________________________________
73bc3a3f 73AliZDCReco::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,
77 //
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,
1e319f71 81 Float_t b, Float_t bSideA, Float_t bSideC,
077d2505 82 UInt_t recoFlag, Bool_t energyFlag, Bool_t scalerOn,
83 UInt_t* scaler, Int_t tdcData[32][4]) :
cc2abffd 84
85 TObject(),
646f1679 86 //
73bc3a3f 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),
97 fImpParameter(b),
98 fImpParSideA(bSideA),
1e319f71 99 fImpParSideC(bSideC),
81f09162 100 fRecoFlag(recoFlag),
077d2505 101 fEnergyFlag(energyFlag),
81f09162 102 fIsScalerOn(scalerOn)
1450a7cd 103{
93f80a6f 104 //
cc2abffd 105 // Constructor
93f80a6f 106 //
c35ed519 107 for(Int_t j=0; j<10; j++){
646f1679 108 fZN1EnTow[j] = ezn1tow[j];
109 fZP1EnTow[j] = ezp1tow[j];
110 fZN2EnTow[j] = ezn2tow[j];
111 fZP2EnTow[j] = ezp2tow[j];
c35ed519 112 if(j<2){
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];
121 }
646f1679 122 }
82dffa48 123 for(Int_t j=0; j<32; j++){
124 fZDCScaler[j] = scaler[j];
32e2fda5 125 for(Int_t y=0; y<4; y++) fZDCTDCData[j][y] = tdcData[j][y];
82dffa48 126 }
1450a7cd 127}
93f80a6f 128
129//______________________________________________________________________________
cc2abffd 130AliZDCReco::AliZDCReco(const AliZDCReco &oldreco) :
a718c993 131TObject(),
73bc3a3f 132fNDetSpecNSideA(oldreco.GetNDetSpecNSideA()),
133fNDetSpecPSideA(oldreco.GetNDetSpecPSideA()),
134fNDetSpecNSideC(oldreco.GetNDetSpecNSideC()),
135fNDetSpecPSideC(oldreco.GetNDetSpecPSideC()),
136fNTrueSpectators(oldreco.GetNTrueSpectators()),
137fNTrueSpecSideA(oldreco.GetNTrueSpecSideA()),
138fNTrueSpecSideC(oldreco.GetNTrueSpecSideC()),
139fNParticipants(oldreco.GetNParticipants()),
140fNPartSideA(oldreco.GetNPartSideA()),
141fNPartSideC(oldreco.GetNPartSideC()),
142fImpParameter(oldreco.GetImpParameter()),
143fImpParSideA(oldreco.GetImpParSideA()),
1e319f71 144fImpParSideC(oldreco.GetImpParSideC()),
81f09162 145fRecoFlag(oldreco.GetRecoFlag()),
077d2505 146fEnergyFlag(oldreco.GetEnergyFlag()),
81f09162 147fIsScalerOn(oldreco.IsScalerOn())
cc2abffd 148{
149 // Copy constructor
150
c35ed519 151 fZN1Energy[0] = oldreco.GetZN1HREnergy();
152 fZP1Energy[0] = oldreco.GetZP1HREnergy();
153 fZN2Energy[0] = oldreco.GetZN2HREnergy();
154 fZP2Energy[0] = oldreco.GetZP2HREnergy();
155 //
156 fZN1Energy[1] = oldreco.GetZN1LREnergy();
157 fZP1Energy[1] = oldreco.GetZP1LREnergy();
158 fZN2Energy[1] = oldreco.GetZN2LREnergy();
159 fZP2Energy[1] = oldreco.GetZP2LREnergy();
646f1679 160 //
161 for(Int_t i=0; i<5; i++){
c35ed519 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);
646f1679 170 }
c35ed519 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();
82dffa48 179 for(Int_t j=0; j<32; j++){
180 fZDCScaler[j] = oldreco.GetZDCScaler(j);
32e2fda5 181 for(Int_t y=0; y<4; y++) fZDCTDCData[j][y] = oldreco.GetZDCTDCData(j, y);
82dffa48 182 }
cc2abffd 183}
184
185//______________________________________________________________________________
93f80a6f 186void AliZDCReco::Print(Option_t *) const {
187 //
188 // Printing Reconstruction Parameters
189 //
73bc3a3f 190 printf(" ****************** AliZDCReco object ******************\n"
191 " --------------- side A ---------------\n"
c2bb665a 192 " E_ZN = %1.2f TeV, E_ZP = %1.2f TeV, "
193 " E_ZEM1 = %1.2f TeV, E_ZEM2 = %1.2f TeV\n "
194 " N_spec_n = %d, N_spec_p = %d,"
195 " N_part = %d, b = %1.4f fm\n"
73bc3a3f 196 " --------------- side C ---------------\n"
c2bb665a 197 " E_ZN = %1.2f TeV, E_ZP = %1.2f TeV, "
198 " N_spec_n = %d, N_spec_p = %d,"
199 " N_part = %d, b = %1.4f fm\n"
73bc3a3f 200 " *******************************************************\n",
4e1fc320 201 fZN2Energy[0]/1000., fZP2Energy[0]/1000.,
73bc3a3f 202 fZEM1signal[0]/1000.,fZEM2signal[0]/1000.,
203 fNDetSpecNSideA,fNDetSpecPSideA, fNPartSideA,fImpParSideA,
204 fZN1Energy[0]/1000.,fZP1Energy[0]/1000.,
205 fNDetSpecNSideC,fNDetSpecPSideC,fNPartSideC,fImpParSideC);
206
93f80a6f 207}