- Change in ProcessFloatAll method for calculating statistical quantities for
[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),
49 fRecoFlag(0x0)
cc2abffd 50
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 }
cc2abffd 63}
64
65
1450a7cd 66//_____________________________________________________________________________
73bc3a3f 67AliZDCReco::AliZDCReco(
68 Float_t* ezn1, Float_t* ezp1, Float_t* ezn2, Float_t* ezp2,
69 Float_t* ezn1tow, Float_t* ezp1tow, Float_t* ezn2tow, Float_t* ezp2tow,
70 Float_t* ezem1, Float_t* ezem2, Float_t* ref1, Float_t* ref2,
71 //
72 Int_t detspnSideA, Int_t detsppSideA, Int_t detspnSideC, Int_t detsppSideC,
73 Int_t trsp, Int_t trspSideA,Int_t trspSideC,
74 Int_t npart, Int_t npartSideA, Int_t npartSideC,
1e319f71 75 Float_t b, Float_t bSideA, Float_t bSideC,
76 UInt_t recoFlag) :
cc2abffd 77
78 TObject(),
646f1679 79 //
73bc3a3f 80 fNDetSpecNSideA(detspnSideA),
81 fNDetSpecPSideA(detsppSideA),
82 fNDetSpecNSideC(detspnSideC),
83 fNDetSpecPSideC(detsppSideC),
84 fNTrueSpectators(trsp),
85 fNTrueSpecSideA(trspSideA),
86 fNTrueSpecSideC(trspSideC),
87 fNParticipants(npart),
88 fNPartSideA(npartSideA),
89 fNPartSideC(npartSideC),
90 fImpParameter(b),
91 fImpParSideA(bSideA),
1e319f71 92 fImpParSideC(bSideC),
93 fRecoFlag(recoFlag)
cc2abffd 94
1450a7cd 95{
93f80a6f 96 //
cc2abffd 97 // Constructor
93f80a6f 98 //
c35ed519 99 for(Int_t j=0; j<10; j++){
646f1679 100 fZN1EnTow[j] = ezn1tow[j];
101 fZP1EnTow[j] = ezp1tow[j];
102 fZN2EnTow[j] = ezn2tow[j];
103 fZP2EnTow[j] = ezp2tow[j];
c35ed519 104 if(j<2){
105 fZN1Energy[j] = ezn1[j];
106 fZP1Energy[j] = ezp1[j];
107 fZN2Energy[j] = ezn2[j];
108 fZP2Energy[j] = ezp2[j];
109 fZEM1signal[j] = ezem1[j];
110 fZEM2signal[j] = ezem2[j];
111 fPMRef1[j] = ref1[j];
112 fPMRef2[j] = ref2[j];
113 }
646f1679 114 }
1450a7cd 115
116}
93f80a6f 117
118//______________________________________________________________________________
cc2abffd 119AliZDCReco::AliZDCReco(const AliZDCReco &oldreco) :
a718c993 120TObject(),
73bc3a3f 121fNDetSpecNSideA(oldreco.GetNDetSpecNSideA()),
122fNDetSpecPSideA(oldreco.GetNDetSpecPSideA()),
123fNDetSpecNSideC(oldreco.GetNDetSpecNSideC()),
124fNDetSpecPSideC(oldreco.GetNDetSpecPSideC()),
125fNTrueSpectators(oldreco.GetNTrueSpectators()),
126fNTrueSpecSideA(oldreco.GetNTrueSpecSideA()),
127fNTrueSpecSideC(oldreco.GetNTrueSpecSideC()),
128fNParticipants(oldreco.GetNParticipants()),
129fNPartSideA(oldreco.GetNPartSideA()),
130fNPartSideC(oldreco.GetNPartSideC()),
131fImpParameter(oldreco.GetImpParameter()),
132fImpParSideA(oldreco.GetImpParSideA()),
1e319f71 133fImpParSideC(oldreco.GetImpParSideC()),
134fRecoFlag(oldreco.GetRecoFlag())
cc2abffd 135{
136 // Copy constructor
137
c35ed519 138 fZN1Energy[0] = oldreco.GetZN1HREnergy();
139 fZP1Energy[0] = oldreco.GetZP1HREnergy();
140 fZN2Energy[0] = oldreco.GetZN2HREnergy();
141 fZP2Energy[0] = oldreco.GetZP2HREnergy();
142 //
143 fZN1Energy[1] = oldreco.GetZN1LREnergy();
144 fZP1Energy[1] = oldreco.GetZP1LREnergy();
145 fZN2Energy[1] = oldreco.GetZN2LREnergy();
146 fZP2Energy[1] = oldreco.GetZP2LREnergy();
646f1679 147 //
148 for(Int_t i=0; i<5; i++){
c35ed519 149 fZN1EnTow[i] = oldreco.GetZN1HREnTow(i);
150 fZP1EnTow[i] = oldreco.GetZP1HREnTow(i);
151 fZN2EnTow[i] = oldreco.GetZN2HREnTow(i);
152 fZP2EnTow[i] = oldreco.GetZP2HREnTow(i);
153 fZN1EnTow[i+5] = oldreco.GetZN1LREnTow(i);
154 fZP1EnTow[i+5] = oldreco.GetZP1LREnTow(i);
155 fZN2EnTow[i+5] = oldreco.GetZN2LREnTow(i);
156 fZP2EnTow[i+5] = oldreco.GetZP2LREnTow(i);
646f1679 157 }
c35ed519 158 fZEM1signal[0] = oldreco.GetZEM1HRsignal();
159 fZEM1signal[1] = oldreco.GetZEM1LRsignal();
160 fZEM2signal[0] = oldreco.GetZEM2HRsignal();
161 fZEM2signal[1] = oldreco.GetZEM2LRsignal();
162 fPMRef1[0] = oldreco.GetPMRef1HRsignal();
163 fPMRef1[1] = oldreco.GetPMRef1LRsignal();
164 fPMRef2[0] = oldreco.GetPMRef2HRsignal();
165 fPMRef2[1] = oldreco.GetPMRef2LRsignal();
cc2abffd 166}
167
168//______________________________________________________________________________
93f80a6f 169void AliZDCReco::Print(Option_t *) const {
170 //
171 // Printing Reconstruction Parameters
172 //
73bc3a3f 173 printf(" ****************** AliZDCReco object ******************\n"
174 " --------------- side A ---------------\n"
175 " E_{ZN} = %f TeV, E_{ZP} = %f TeV, "
176 " E_{ZEM1} = %f TeV, E_{ZEM2} = %f TeV\n "
177 " N_{spec n}^{DET} = %d, N_{spec p}^{DET} = %d,"
178 " N_{part} = %d, b = %1.4f fm\n"
179 " --------------- side C ---------------\n"
180 " E_{ZN} = %f TeV, E_{ZP} = %f TeV\n "
181 " N_{spec n}^{DET} = %d, N_{spec p}^{DET} = %d,"
182 " N_{part} = %d, b = %1.4f fm\n"
183 " *******************************************************\n",
4e1fc320 184 fZN2Energy[0]/1000., fZP2Energy[0]/1000.,
73bc3a3f 185 fZEM1signal[0]/1000.,fZEM2signal[0]/1000.,
186 fNDetSpecNSideA,fNDetSpecPSideA, fNPartSideA,fImpParSideA,
187 fZN1Energy[0]/1000.,fZP1Energy[0]/1000.,
188 fNDetSpecNSideC,fNDetSpecPSideC,fNPartSideC,fImpParSideC);
189
93f80a6f 190}