ZEM signal not already splitted in ZDC ESD
[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 fZN1Energy(0),
36 fZP1Energy(0),
37 fZN2Energy(0),
38 fZP2Energy(0),
39 //
40// fZN1EnTow(0x0),
41// fZP1EnTow(0x0),
42// fZN2EnTow(0x0),
43// fZP2EnTow(0x0),
44 //
c0aec6f6 45 fZEM1signal(0),
46 fZEM2signal(0),
646f1679 47 //
cc2abffd 48 fNDetSpecNLeft(0),
49 fNDetSpecPLeft(0),
50 fNDetSpecNRight(0),
51 fNDetSpecPRight(0),
646f1679 52 fNTrueSpecNLeft(0),
53 fNTrueSpecPLeft(0),
54 fNTrueSpecLeft(0),
55 fNTrueSpecNRight(0),
56 fNTrueSpecPRight(0),
57 fNTrueSpecRight(0),
58 fNPartLeft(0),
59 fNPartRight(0),
cc2abffd 60 fImpPar(0)
61
62{
63 //
64 // Default constructor
65 //
66}
67
68
1450a7cd 69//_____________________________________________________________________________
646f1679 70AliZDCReco::AliZDCReco(Float_t ezn1, Float_t ezp1, Float_t ezn2, Float_t ezp2,
71 //
72 Float_t* ezn1tow, Float_t* ezp1tow,
73 Float_t* ezn2tow, Float_t* ezp2tow,
c0aec6f6 74 Float_t ezem1, Float_t ezem2,
646f1679 75 //
76 Int_t detspnLeft, Int_t detsppLeft, Int_t detspnRight,
77 Int_t detsppRight, Int_t trspnLeft, Int_t trsppLeft,
78 Int_t trspLeft, Int_t partLeft, Int_t trspnRight,
79 Int_t trsppRight, Int_t trspRight, Int_t partRight,
80 Float_t b) :
cc2abffd 81
82 TObject(),
646f1679 83 fZN1Energy(ezn1),
84 fZP1Energy(ezp1),
85 fZN2Energy(ezn2),
86 fZP2Energy(ezp2),
87 //
c0aec6f6 88 fZEM1signal(ezem1),
89 fZEM2signal(ezem2),
646f1679 90 //
cc2abffd 91 fNDetSpecNLeft(detspnLeft),
92 fNDetSpecPLeft(detsppLeft),
93 fNDetSpecNRight(detspnRight),
94 fNDetSpecPRight(detsppRight),
646f1679 95 fNTrueSpecNLeft(trspnLeft),
96 fNTrueSpecPLeft(trsppLeft),
97 fNTrueSpecLeft(trspLeft),
98 fNTrueSpecNRight(trspnRight),
99 fNTrueSpecPRight(trsppRight),
100 fNTrueSpecRight(trspRight),
101 fNPartLeft(partLeft),
102 fNPartRight(partRight),
cc2abffd 103 fImpPar(b)
104
1450a7cd 105{
93f80a6f 106 //
cc2abffd 107 // Constructor
93f80a6f 108 //
646f1679 109 for(Int_t j=0; j<5; j++){
110 fZN1EnTow[j] = ezn1tow[j];
111 fZP1EnTow[j] = ezp1tow[j];
112 fZN2EnTow[j] = ezn2tow[j];
113 fZP2EnTow[j] = ezp2tow[j];
114 }
1450a7cd 115
116}
93f80a6f 117
118//______________________________________________________________________________
cc2abffd 119AliZDCReco::AliZDCReco(const AliZDCReco &oldreco) :
120
121 TObject()
122{
123 // Copy constructor
124
646f1679 125 fZN1Energy = oldreco.GetZN1Energy();
126 fZP1Energy = oldreco.GetZP1Energy();
127 fZN2Energy = oldreco.GetZN2Energy();
128 fZP2Energy = oldreco.GetZP2Energy();
129 //
130 for(Int_t i=0; i<5; i++){
131 fZN1EnTow[i] = oldreco.GetZN1EnTow(i);
132 fZP1EnTow[i] = oldreco.GetZP1EnTow(i);
133 fZN2EnTow[i] = oldreco.GetZN2EnTow(i);
134 fZP2EnTow[i] = oldreco.GetZP2EnTow(i);
135 }
136 //
c0aec6f6 137 fZEM1signal = oldreco.GetZEM1signal();
138 fZEM2signal = oldreco.GetZEM2signal();
646f1679 139 //
cc2abffd 140 fNDetSpecNLeft = oldreco.GetNDetSpecNLeft();
141 fNDetSpecPLeft = oldreco.GetNDetSpecPLeft();
142 fNDetSpecNRight = oldreco.GetNDetSpecNRight();
143 fNDetSpecPRight = oldreco.GetNDetSpecPRight();
646f1679 144 fNTrueSpecNLeft = oldreco.GetNTrueSpecNLeft();
145 fNTrueSpecPLeft = oldreco.GetNTrueSpecPLeft();
146 fNTrueSpecLeft = oldreco.GetNTrueSpecLeft();
147 fNTrueSpecNRight = oldreco.GetNTrueSpecNRight();
148 fNTrueSpecPRight = oldreco.GetNTrueSpecPRight();
149 fNTrueSpecRight = oldreco.GetNTrueSpecRight();
150 fNPartLeft = oldreco.GetNPartLeft();
151 fNPartRight = oldreco.GetNPartRight();
cc2abffd 152 fImpPar = oldreco.GetImpPar();
153}
154
155//______________________________________________________________________________
93f80a6f 156void AliZDCReco::Print(Option_t *) const {
157 //
158 // Printing Reconstruction Parameters
159 //
c0aec6f6 160 printf(" \t --- Reconstruction -> EZN1 = %f TeV, EZP1 = %f TeV, EZEM1 = %f GeV , EZEM2 = %f GeV \n "
161 "EZN2 = %f TeV, EZP2 = %f TeV \n"
646f1679 162 " \t NDetSpecNLeft = %d, NDetSpecPLeft = %d, NspecnLeft = %d,"
163 " NspecpLeft = %d, NpartLeft = %d"
164 " \t NDetSpecNRight = %d, NDetSpecPRight = %d, NspecnRight = %d,"
165 " NspecpRight = %d, NpartRight = %d"
166 " \t b = %f fm\n ",
c0aec6f6 167 fZN1Energy,fZP1Energy,fZEM1signal,fZEM2signal, fZN2Energy, fZP2Energy,
646f1679 168 fNDetSpecNLeft,fNDetSpecPLeft,fNTrueSpecNLeft,fNTrueSpecPLeft,fNPartLeft,
169 fNDetSpecNRight,fNDetSpecPRight,fNTrueSpecNRight,fNTrueSpecPRight,fNPartRight,
170 fImpPar);
93f80a6f 171}