]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ZDC/AliZDCReco.cxx
Correcting fot BEAM2 phase and using L0 for timing
[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),
50 fIsScalerOn(kFALSE)
cc2abffd 51{
52 //
53 // Default constructor
54 //
c35ed519 55 for(Int_t i=0; i<10; i++){
56 fZN1EnTow[i] = fZP1EnTow[i] = fZN2EnTow[i] = fZP2EnTow[i] = 0.;
57 if(i<2){
58 fZN1Energy[i] = fZP1Energy[i] = fZN2Energy[i] = fZP2Energy[i] = 0.;
59 fZEM1signal[i] = fZEM2signal[i] = 0.;
60 fPMRef1[i] = fPMRef2[i] = 0.;
61 }
84d6255e 62 }
81f09162 63
32e2fda5 64 for(Int_t i=0; i<32; i++){
65 fZDCScaler[i] = 0;
f53e5ecb 66 for(Int_t ij=0; ij<4; ij++) fZDCTDCData[i][ij] = 0;
32e2fda5 67 }
cc2abffd 68}
69
70
1450a7cd 71//_____________________________________________________________________________
73bc3a3f 72AliZDCReco::AliZDCReco(
73 Float_t* ezn1, Float_t* ezp1, Float_t* ezn2, Float_t* ezp2,
74 Float_t* ezn1tow, Float_t* ezp1tow, Float_t* ezn2tow, Float_t* ezp2tow,
75 Float_t* ezem1, Float_t* ezem2, Float_t* ref1, Float_t* ref2,
76 //
77 Int_t detspnSideA, Int_t detsppSideA, Int_t detspnSideC, Int_t detsppSideC,
78 Int_t trsp, Int_t trspSideA,Int_t trspSideC,
79 Int_t npart, Int_t npartSideA, Int_t npartSideC,
1e319f71 80 Float_t b, Float_t bSideA, Float_t bSideC,
f53e5ecb 81 UInt_t recoFlag, Bool_t scalerOn, UInt_t* scaler, Int_t tdcData[32][4]) :
cc2abffd 82
83 TObject(),
646f1679 84 //
73bc3a3f 85 fNDetSpecNSideA(detspnSideA),
86 fNDetSpecPSideA(detsppSideA),
87 fNDetSpecNSideC(detspnSideC),
88 fNDetSpecPSideC(detsppSideC),
89 fNTrueSpectators(trsp),
90 fNTrueSpecSideA(trspSideA),
91 fNTrueSpecSideC(trspSideC),
92 fNParticipants(npart),
93 fNPartSideA(npartSideA),
94 fNPartSideC(npartSideC),
95 fImpParameter(b),
96 fImpParSideA(bSideA),
1e319f71 97 fImpParSideC(bSideC),
81f09162 98 fRecoFlag(recoFlag),
99 fIsScalerOn(scalerOn)
1450a7cd 100{
93f80a6f 101 //
cc2abffd 102 // Constructor
93f80a6f 103 //
c35ed519 104 for(Int_t j=0; j<10; j++){
646f1679 105 fZN1EnTow[j] = ezn1tow[j];
106 fZP1EnTow[j] = ezp1tow[j];
107 fZN2EnTow[j] = ezn2tow[j];
108 fZP2EnTow[j] = ezp2tow[j];
c35ed519 109 if(j<2){
110 fZN1Energy[j] = ezn1[j];
111 fZP1Energy[j] = ezp1[j];
112 fZN2Energy[j] = ezn2[j];
113 fZP2Energy[j] = ezp2[j];
114 fZEM1signal[j] = ezem1[j];
115 fZEM2signal[j] = ezem2[j];
116 fPMRef1[j] = ref1[j];
117 fPMRef2[j] = ref2[j];
118 }
646f1679 119 }
82dffa48 120 for(Int_t j=0; j<32; j++){
121 fZDCScaler[j] = scaler[j];
32e2fda5 122 for(Int_t y=0; y<4; y++) fZDCTDCData[j][y] = tdcData[j][y];
82dffa48 123 }
1450a7cd 124}
93f80a6f 125
cc2abffd 126//______________________________________________________________________________
127AliZDCReco::AliZDCReco(const AliZDCReco &oldreco) :
a718c993 128TObject(),
73bc3a3f 129fNDetSpecNSideA(oldreco.GetNDetSpecNSideA()),
130fNDetSpecPSideA(oldreco.GetNDetSpecPSideA()),
131fNDetSpecNSideC(oldreco.GetNDetSpecNSideC()),
132fNDetSpecPSideC(oldreco.GetNDetSpecPSideC()),
133fNTrueSpectators(oldreco.GetNTrueSpectators()),
134fNTrueSpecSideA(oldreco.GetNTrueSpecSideA()),
135fNTrueSpecSideC(oldreco.GetNTrueSpecSideC()),
136fNParticipants(oldreco.GetNParticipants()),
137fNPartSideA(oldreco.GetNPartSideA()),
138fNPartSideC(oldreco.GetNPartSideC()),
139fImpParameter(oldreco.GetImpParameter()),
140fImpParSideA(oldreco.GetImpParSideA()),
1e319f71 141fImpParSideC(oldreco.GetImpParSideC()),
81f09162 142fRecoFlag(oldreco.GetRecoFlag()),
143fIsScalerOn(oldreco.IsScalerOn())
cc2abffd 144{
145 // Copy constructor
146
c35ed519 147 fZN1Energy[0] = oldreco.GetZN1HREnergy();
148 fZP1Energy[0] = oldreco.GetZP1HREnergy();
149 fZN2Energy[0] = oldreco.GetZN2HREnergy();
150 fZP2Energy[0] = oldreco.GetZP2HREnergy();
151 //
152 fZN1Energy[1] = oldreco.GetZN1LREnergy();
153 fZP1Energy[1] = oldreco.GetZP1LREnergy();
154 fZN2Energy[1] = oldreco.GetZN2LREnergy();
155 fZP2Energy[1] = oldreco.GetZP2LREnergy();
646f1679 156 //
157 for(Int_t i=0; i<5; i++){
c35ed519 158 fZN1EnTow[i] = oldreco.GetZN1HREnTow(i);
159 fZP1EnTow[i] = oldreco.GetZP1HREnTow(i);
160 fZN2EnTow[i] = oldreco.GetZN2HREnTow(i);
161 fZP2EnTow[i] = oldreco.GetZP2HREnTow(i);
162 fZN1EnTow[i+5] = oldreco.GetZN1LREnTow(i);
163 fZP1EnTow[i+5] = oldreco.GetZP1LREnTow(i);
164 fZN2EnTow[i+5] = oldreco.GetZN2LREnTow(i);
165 fZP2EnTow[i+5] = oldreco.GetZP2LREnTow(i);
646f1679 166 }
c35ed519 167 fZEM1signal[0] = oldreco.GetZEM1HRsignal();
168 fZEM1signal[1] = oldreco.GetZEM1LRsignal();
169 fZEM2signal[0] = oldreco.GetZEM2HRsignal();
170 fZEM2signal[1] = oldreco.GetZEM2LRsignal();
171 fPMRef1[0] = oldreco.GetPMRef1HRsignal();
172 fPMRef1[1] = oldreco.GetPMRef1LRsignal();
173 fPMRef2[0] = oldreco.GetPMRef2HRsignal();
174 fPMRef2[1] = oldreco.GetPMRef2LRsignal();
82dffa48 175 for(Int_t j=0; j<32; j++){
176 fZDCScaler[j] = oldreco.GetZDCScaler(j);
32e2fda5 177 for(Int_t y=0; y<4; y++) fZDCTDCData[j][y] = oldreco.GetZDCTDCData(j, y);
82dffa48 178 }
cc2abffd 179}
180
93f80a6f 181//______________________________________________________________________________
182void AliZDCReco::Print(Option_t *) const {
183 //
184 // Printing Reconstruction Parameters
185 //
73bc3a3f 186 printf(" ****************** AliZDCReco object ******************\n"
187 " --------------- side A ---------------\n"
c2bb665a 188 " E_ZN = %1.2f TeV, E_ZP = %1.2f TeV, "
189 " E_ZEM1 = %1.2f TeV, E_ZEM2 = %1.2f TeV\n "
190 " N_spec_n = %d, N_spec_p = %d,"
191 " N_part = %d, b = %1.4f fm\n"
73bc3a3f 192 " --------------- side C ---------------\n"
c2bb665a 193 " E_ZN = %1.2f TeV, E_ZP = %1.2f TeV, "
194 " N_spec_n = %d, N_spec_p = %d,"
195 " N_part = %d, b = %1.4f fm\n"
73bc3a3f 196 " *******************************************************\n",
4e1fc320 197 fZN2Energy[0]/1000., fZP2Energy[0]/1000.,
73bc3a3f 198 fZEM1signal[0]/1000.,fZEM2signal[0]/1000.,
199 fNDetSpecNSideA,fNDetSpecPSideA, fNPartSideA,fImpParSideA,
200 fZN1Energy[0]/1000.,fZP1Energy[0]/1000.,
201 fNDetSpecNSideC,fNDetSpecPSideC,fNPartSideC,fImpParSideC);
202
93f80a6f 203}