]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ZDC/AliZDCReco.cxx
Adding TDC histos
[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
82dffa48 64 for(Int_t i=0; i<32; i++) fZDCScaler[i] = fZDCTDCData[i] = 0;
cc2abffd 65}
66
67
1450a7cd 68//_____________________________________________________________________________
73bc3a3f 69AliZDCReco::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,
73 //
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,
1e319f71 77 Float_t b, Float_t bSideA, Float_t bSideC,
82dffa48 78 UInt_t recoFlag, Bool_t scalerOn, UInt_t* scaler, Int_t* tdcData) :
cc2abffd 79
80 TObject(),
646f1679 81 //
73bc3a3f 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),
92 fImpParameter(b),
93 fImpParSideA(bSideA),
1e319f71 94 fImpParSideC(bSideC),
81f09162 95 fRecoFlag(recoFlag),
96 fIsScalerOn(scalerOn)
1450a7cd 97{
93f80a6f 98 //
cc2abffd 99 // Constructor
93f80a6f 100 //
c35ed519 101 for(Int_t j=0; j<10; j++){
646f1679 102 fZN1EnTow[j] = ezn1tow[j];
103 fZP1EnTow[j] = ezp1tow[j];
104 fZN2EnTow[j] = ezn2tow[j];
105 fZP2EnTow[j] = ezp2tow[j];
c35ed519 106 if(j<2){
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];
115 }
646f1679 116 }
82dffa48 117 for(Int_t j=0; j<32; j++){
118 fZDCScaler[j] = scaler[j];
119 fZDCTDCData[j] = tdcData[j];
120 }
1450a7cd 121}
93f80a6f 122
cc2abffd 123//______________________________________________________________________________
124AliZDCReco::AliZDCReco(const AliZDCReco &oldreco) :
a718c993 125TObject(),
73bc3a3f 126fNDetSpecNSideA(oldreco.GetNDetSpecNSideA()),
127fNDetSpecPSideA(oldreco.GetNDetSpecPSideA()),
128fNDetSpecNSideC(oldreco.GetNDetSpecNSideC()),
129fNDetSpecPSideC(oldreco.GetNDetSpecPSideC()),
130fNTrueSpectators(oldreco.GetNTrueSpectators()),
131fNTrueSpecSideA(oldreco.GetNTrueSpecSideA()),
132fNTrueSpecSideC(oldreco.GetNTrueSpecSideC()),
133fNParticipants(oldreco.GetNParticipants()),
134fNPartSideA(oldreco.GetNPartSideA()),
135fNPartSideC(oldreco.GetNPartSideC()),
136fImpParameter(oldreco.GetImpParameter()),
137fImpParSideA(oldreco.GetImpParSideA()),
1e319f71 138fImpParSideC(oldreco.GetImpParSideC()),
81f09162 139fRecoFlag(oldreco.GetRecoFlag()),
140fIsScalerOn(oldreco.IsScalerOn())
cc2abffd 141{
142 // Copy constructor
143
c35ed519 144 fZN1Energy[0] = oldreco.GetZN1HREnergy();
145 fZP1Energy[0] = oldreco.GetZP1HREnergy();
146 fZN2Energy[0] = oldreco.GetZN2HREnergy();
147 fZP2Energy[0] = oldreco.GetZP2HREnergy();
148 //
149 fZN1Energy[1] = oldreco.GetZN1LREnergy();
150 fZP1Energy[1] = oldreco.GetZP1LREnergy();
151 fZN2Energy[1] = oldreco.GetZN2LREnergy();
152 fZP2Energy[1] = oldreco.GetZP2LREnergy();
646f1679 153 //
154 for(Int_t i=0; i<5; i++){
c35ed519 155 fZN1EnTow[i] = oldreco.GetZN1HREnTow(i);
156 fZP1EnTow[i] = oldreco.GetZP1HREnTow(i);
157 fZN2EnTow[i] = oldreco.GetZN2HREnTow(i);
158 fZP2EnTow[i] = oldreco.GetZP2HREnTow(i);
159 fZN1EnTow[i+5] = oldreco.GetZN1LREnTow(i);
160 fZP1EnTow[i+5] = oldreco.GetZP1LREnTow(i);
161 fZN2EnTow[i+5] = oldreco.GetZN2LREnTow(i);
162 fZP2EnTow[i+5] = oldreco.GetZP2LREnTow(i);
646f1679 163 }
c35ed519 164 fZEM1signal[0] = oldreco.GetZEM1HRsignal();
165 fZEM1signal[1] = oldreco.GetZEM1LRsignal();
166 fZEM2signal[0] = oldreco.GetZEM2HRsignal();
167 fZEM2signal[1] = oldreco.GetZEM2LRsignal();
168 fPMRef1[0] = oldreco.GetPMRef1HRsignal();
169 fPMRef1[1] = oldreco.GetPMRef1LRsignal();
170 fPMRef2[0] = oldreco.GetPMRef2HRsignal();
171 fPMRef2[1] = oldreco.GetPMRef2LRsignal();
82dffa48 172 for(Int_t j=0; j<32; j++){
173 fZDCScaler[j] = oldreco.GetZDCScaler(j);
174 fZDCTDCData[j] = oldreco.GetZDCTDCData(j);
175 }
cc2abffd 176}
177
93f80a6f 178//______________________________________________________________________________
179void AliZDCReco::Print(Option_t *) const {
180 //
181 // Printing Reconstruction Parameters
182 //
73bc3a3f 183 printf(" ****************** AliZDCReco object ******************\n"
184 " --------------- side A ---------------\n"
c2bb665a 185 " E_ZN = %1.2f TeV, E_ZP = %1.2f TeV, "
186 " E_ZEM1 = %1.2f TeV, E_ZEM2 = %1.2f TeV\n "
187 " N_spec_n = %d, N_spec_p = %d,"
188 " N_part = %d, b = %1.4f fm\n"
73bc3a3f 189 " --------------- side C ---------------\n"
c2bb665a 190 " E_ZN = %1.2f TeV, E_ZP = %1.2f TeV, "
191 " N_spec_n = %d, N_spec_p = %d,"
192 " N_part = %d, b = %1.4f fm\n"
73bc3a3f 193 " *******************************************************\n",
4e1fc320 194 fZN2Energy[0]/1000., fZP2Energy[0]/1000.,
73bc3a3f 195 fZEM1signal[0]/1000.,fZEM2signal[0]/1000.,
196 fNDetSpecNSideA,fNDetSpecPSideA, fNPartSideA,fImpParSideA,
197 fZN1Energy[0]/1000.,fZP1Energy[0]/1000.,
198 fNDetSpecNSideC,fNDetSpecPSideC,fNPartSideC,fImpParSideC);
199
93f80a6f 200}