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() :
53 // Default constructor
55 for(Int_t i=0; i<10; i++){
56 fZN1EnTow[i] = fZP1EnTow[i] = fZN2EnTow[i] = fZP2EnTow[i] = 0.;
58 fZN1Energy[i] = fZP1Energy[i] = fZN2Energy[i] = fZP2Energy[i] = 0.;
59 fZEM1signal[i] = fZEM2signal[i] = 0.;
60 fPMRef1[i] = fPMRef2[i] = 0.;
64 for(Int_t i=0; i<32; i++) fZDCScaler[i]=0;
68 //_____________________________________________________________________________
69 AliZDCReco::AliZDCReco(
70 Float_t* ezn1, Float_t* ezp1, Float_t* ezn2, Float_t* ezp2,
71 Float_t* ezn1tow, Float_t* ezp1tow, Float_t* ezn2tow, Float_t* ezp2tow,
72 Float_t* ezem1, Float_t* ezem2, Float_t* ref1, Float_t* ref2,
74 Int_t detspnSideA, Int_t detsppSideA, Int_t detspnSideC, Int_t detsppSideC,
75 Int_t trsp, Int_t trspSideA,Int_t trspSideC,
76 Int_t npart, Int_t npartSideA, Int_t npartSideC,
77 Float_t b, Float_t bSideA, Float_t bSideC,
78 UInt_t recoFlag, Bool_t scalerOn, UInt_t* scaler) :
82 fNDetSpecNSideA(detspnSideA),
83 fNDetSpecPSideA(detsppSideA),
84 fNDetSpecNSideC(detspnSideC),
85 fNDetSpecPSideC(detsppSideC),
86 fNTrueSpectators(trsp),
87 fNTrueSpecSideA(trspSideA),
88 fNTrueSpecSideC(trspSideC),
89 fNParticipants(npart),
90 fNPartSideA(npartSideA),
91 fNPartSideC(npartSideC),
101 for(Int_t j=0; j<10; j++){
102 fZN1EnTow[j] = ezn1tow[j];
103 fZP1EnTow[j] = ezp1tow[j];
104 fZN2EnTow[j] = ezn2tow[j];
105 fZP2EnTow[j] = ezp2tow[j];
107 fZN1Energy[j] = ezn1[j];
108 fZP1Energy[j] = ezp1[j];
109 fZN2Energy[j] = ezn2[j];
110 fZP2Energy[j] = ezp2[j];
111 fZEM1signal[j] = ezem1[j];
112 fZEM2signal[j] = ezem2[j];
113 fPMRef1[j] = ref1[j];
114 fPMRef2[j] = ref2[j];
117 for(Int_t j=0; j<32; j++) fZDCScaler[j] = scaler[j];
121 //______________________________________________________________________________
122 AliZDCReco::AliZDCReco(const AliZDCReco &oldreco) :
124 fNDetSpecNSideA(oldreco.GetNDetSpecNSideA()),
125 fNDetSpecPSideA(oldreco.GetNDetSpecPSideA()),
126 fNDetSpecNSideC(oldreco.GetNDetSpecNSideC()),
127 fNDetSpecPSideC(oldreco.GetNDetSpecPSideC()),
128 fNTrueSpectators(oldreco.GetNTrueSpectators()),
129 fNTrueSpecSideA(oldreco.GetNTrueSpecSideA()),
130 fNTrueSpecSideC(oldreco.GetNTrueSpecSideC()),
131 fNParticipants(oldreco.GetNParticipants()),
132 fNPartSideA(oldreco.GetNPartSideA()),
133 fNPartSideC(oldreco.GetNPartSideC()),
134 fImpParameter(oldreco.GetImpParameter()),
135 fImpParSideA(oldreco.GetImpParSideA()),
136 fImpParSideC(oldreco.GetImpParSideC()),
137 fRecoFlag(oldreco.GetRecoFlag()),
138 fIsScalerOn(oldreco.IsScalerOn())
142 fZN1Energy[0] = oldreco.GetZN1HREnergy();
143 fZP1Energy[0] = oldreco.GetZP1HREnergy();
144 fZN2Energy[0] = oldreco.GetZN2HREnergy();
145 fZP2Energy[0] = oldreco.GetZP2HREnergy();
147 fZN1Energy[1] = oldreco.GetZN1LREnergy();
148 fZP1Energy[1] = oldreco.GetZP1LREnergy();
149 fZN2Energy[1] = oldreco.GetZN2LREnergy();
150 fZP2Energy[1] = oldreco.GetZP2LREnergy();
152 for(Int_t i=0; i<5; i++){
153 fZN1EnTow[i] = oldreco.GetZN1HREnTow(i);
154 fZP1EnTow[i] = oldreco.GetZP1HREnTow(i);
155 fZN2EnTow[i] = oldreco.GetZN2HREnTow(i);
156 fZP2EnTow[i] = oldreco.GetZP2HREnTow(i);
157 fZN1EnTow[i+5] = oldreco.GetZN1LREnTow(i);
158 fZP1EnTow[i+5] = oldreco.GetZP1LREnTow(i);
159 fZN2EnTow[i+5] = oldreco.GetZN2LREnTow(i);
160 fZP2EnTow[i+5] = oldreco.GetZP2LREnTow(i);
162 fZEM1signal[0] = oldreco.GetZEM1HRsignal();
163 fZEM1signal[1] = oldreco.GetZEM1LRsignal();
164 fZEM2signal[0] = oldreco.GetZEM2HRsignal();
165 fZEM2signal[1] = oldreco.GetZEM2LRsignal();
166 fPMRef1[0] = oldreco.GetPMRef1HRsignal();
167 fPMRef1[1] = oldreco.GetPMRef1LRsignal();
168 fPMRef2[0] = oldreco.GetPMRef2HRsignal();
169 fPMRef2[1] = oldreco.GetPMRef2LRsignal();
170 for(Int_t j=0; j<32; j++) fZDCScaler[j] = oldreco.GetZDCScaler(j);
173 //______________________________________________________________________________
174 void AliZDCReco::Print(Option_t *) const {
176 // Printing Reconstruction Parameters
178 printf(" ****************** AliZDCReco object ******************\n"
179 " --------------- side A ---------------\n"
180 " E_ZN = %1.2f TeV, E_ZP = %1.2f TeV, "
181 " E_ZEM1 = %1.2f TeV, E_ZEM2 = %1.2f TeV\n "
182 " N_spec_n = %d, N_spec_p = %d,"
183 " N_part = %d, b = %1.4f fm\n"
184 " --------------- side C ---------------\n"
185 " E_ZN = %1.2f TeV, E_ZP = %1.2f TeV, "
186 " N_spec_n = %d, N_spec_p = %d,"
187 " N_part = %d, b = %1.4f fm\n"
188 " *******************************************************\n",
189 fZN2Energy[0]/1000., fZP2Energy[0]/1000.,
190 fZEM1signal[0]/1000.,fZEM2signal[0]/1000.,
191 fNDetSpecNSideA,fNDetSpecPSideA, fNPartSideA,fImpParSideA,
192 fZN1Energy[0]/1000.,fZP1Energy[0]/1000.,
193 fNDetSpecNSideC,fNDetSpecPSideC,fNPartSideC,fImpParSideC);