Classes for trigger processing in simulation
[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 //
cc2abffd 36 fNDetSpecNLeft(0),
37 fNDetSpecPLeft(0),
38 fNDetSpecNRight(0),
39 fNDetSpecPRight(0),
646f1679 40 fNTrueSpecNLeft(0),
41 fNTrueSpecPLeft(0),
42 fNTrueSpecLeft(0),
43 fNTrueSpecNRight(0),
44 fNTrueSpecPRight(0),
45 fNTrueSpecRight(0),
46 fNPartLeft(0),
47 fNPartRight(0),
cc2abffd 48 fImpPar(0)
49
50{
51 //
52 // Default constructor
53 //
c35ed519 54 for(Int_t i=0; i<10; i++){
55 fZN1EnTow[i] = fZP1EnTow[i] = fZN2EnTow[i] = fZP2EnTow[i] = 0.;
56 if(i<2){
57 fZN1Energy[i] = fZP1Energy[i] = fZN2Energy[i] = fZP2Energy[i] = 0.;
58 fZEM1signal[i] = fZEM2signal[i] = 0.;
59 fPMRef1[i] = fPMRef2[i] = 0.;
60 }
84d6255e 61 }
cc2abffd 62}
63
64
1450a7cd 65//_____________________________________________________________________________
c35ed519 66AliZDCReco::AliZDCReco(Float_t* ezn1, Float_t* ezp1, Float_t* ezn2, Float_t* ezp2,
646f1679 67 Float_t* ezn1tow, Float_t* ezp1tow,
68 Float_t* ezn2tow, Float_t* ezp2tow,
c35ed519 69 Float_t* ezem1, Float_t* ezem2,
70 Float_t* ref1, Float_t* ref2,
646f1679 71 //
c35ed519 72 Int_t detspnLeft, Int_t detsppLeft, Int_t detspnRight, Int_t detsppRight,
73 Int_t trspnLeft, Int_t trsppLeft, Int_t trspLeft,
74 Int_t trspnRight, Int_t trsppRight, Int_t trspRight,
75 Int_t partLeft, Int_t partRight, Float_t b) :
cc2abffd 76
77 TObject(),
646f1679 78 //
cc2abffd 79 fNDetSpecNLeft(detspnLeft),
80 fNDetSpecPLeft(detsppLeft),
81 fNDetSpecNRight(detspnRight),
82 fNDetSpecPRight(detsppRight),
646f1679 83 fNTrueSpecNLeft(trspnLeft),
84 fNTrueSpecPLeft(trsppLeft),
85 fNTrueSpecLeft(trspLeft),
86 fNTrueSpecNRight(trspnRight),
87 fNTrueSpecPRight(trsppRight),
88 fNTrueSpecRight(trspRight),
89 fNPartLeft(partLeft),
90 fNPartRight(partRight),
cc2abffd 91 fImpPar(b)
92
1450a7cd 93{
93f80a6f 94 //
cc2abffd 95 // Constructor
93f80a6f 96 //
c35ed519 97 for(Int_t j=0; j<10; j++){
646f1679 98 fZN1EnTow[j] = ezn1tow[j];
99 fZP1EnTow[j] = ezp1tow[j];
100 fZN2EnTow[j] = ezn2tow[j];
101 fZP2EnTow[j] = ezp2tow[j];
c35ed519 102 if(j<2){
103 fZN1Energy[j] = ezn1[j];
104 fZP1Energy[j] = ezp1[j];
105 fZN2Energy[j] = ezn2[j];
106 fZP2Energy[j] = ezp2[j];
107 fZEM1signal[j] = ezem1[j];
108 fZEM2signal[j] = ezem2[j];
109 fPMRef1[j] = ref1[j];
110 fPMRef2[j] = ref2[j];
111 }
646f1679 112 }
1450a7cd 113
114}
93f80a6f 115
116//______________________________________________________________________________
cc2abffd 117AliZDCReco::AliZDCReco(const AliZDCReco &oldreco) :
a718c993 118TObject(),
119fNDetSpecNLeft(oldreco.GetNDetSpecNLeft()),
120fNDetSpecPLeft(oldreco.GetNDetSpecPLeft()),
121fNDetSpecNRight(oldreco.GetNDetSpecNRight()),
122fNDetSpecPRight(oldreco.GetNDetSpecPRight()),
123fNTrueSpecNLeft(oldreco.GetNTrueSpecNLeft()),
124fNTrueSpecPLeft(oldreco.GetNTrueSpecPLeft()),
125fNTrueSpecLeft(oldreco.GetNTrueSpecLeft()),
126fNTrueSpecNRight(oldreco.GetNTrueSpecNRight()),
127fNTrueSpecPRight(oldreco.GetNTrueSpecPRight()),
128fNTrueSpecRight(oldreco.GetNTrueSpecRight()),
129fNPartLeft(oldreco.GetNPartLeft()),
130fNPartRight(oldreco.GetNPartRight()),
131fImpPar(oldreco.GetImpPar())
cc2abffd 132{
133 // Copy constructor
134
c35ed519 135 fZN1Energy[0] = oldreco.GetZN1HREnergy();
136 fZP1Energy[0] = oldreco.GetZP1HREnergy();
137 fZN2Energy[0] = oldreco.GetZN2HREnergy();
138 fZP2Energy[0] = oldreco.GetZP2HREnergy();
139 //
140 fZN1Energy[1] = oldreco.GetZN1LREnergy();
141 fZP1Energy[1] = oldreco.GetZP1LREnergy();
142 fZN2Energy[1] = oldreco.GetZN2LREnergy();
143 fZP2Energy[1] = oldreco.GetZP2LREnergy();
646f1679 144 //
145 for(Int_t i=0; i<5; i++){
c35ed519 146 fZN1EnTow[i] = oldreco.GetZN1HREnTow(i);
147 fZP1EnTow[i] = oldreco.GetZP1HREnTow(i);
148 fZN2EnTow[i] = oldreco.GetZN2HREnTow(i);
149 fZP2EnTow[i] = oldreco.GetZP2HREnTow(i);
150 fZN1EnTow[i+5] = oldreco.GetZN1LREnTow(i);
151 fZP1EnTow[i+5] = oldreco.GetZP1LREnTow(i);
152 fZN2EnTow[i+5] = oldreco.GetZN2LREnTow(i);
153 fZP2EnTow[i+5] = oldreco.GetZP2LREnTow(i);
646f1679 154 }
c35ed519 155 fZEM1signal[0] = oldreco.GetZEM1HRsignal();
156 fZEM1signal[1] = oldreco.GetZEM1LRsignal();
157 fZEM2signal[0] = oldreco.GetZEM2HRsignal();
158 fZEM2signal[1] = oldreco.GetZEM2LRsignal();
159 fPMRef1[0] = oldreco.GetPMRef1HRsignal();
160 fPMRef1[1] = oldreco.GetPMRef1LRsignal();
161 fPMRef2[0] = oldreco.GetPMRef2HRsignal();
162 fPMRef2[1] = oldreco.GetPMRef2LRsignal();
cc2abffd 163}
164
165//______________________________________________________________________________
93f80a6f 166void AliZDCReco::Print(Option_t *) const {
167 //
168 // Printing Reconstruction Parameters
169 //
a85132e7 170 printf(" \t --- Reconstruction -> EZN1 = %f TeV, EZP1 = %f TeV, EZEM1 = %f GeV , EZEM2 = %f GeV \n "
171 "EZN2 = %f TeV, EZP2 = %f TeV \n"
646f1679 172 " \t NDetSpecNLeft = %d, NDetSpecPLeft = %d, NspecnLeft = %d,"
173 " NspecpLeft = %d, NpartLeft = %d"
174 " \t NDetSpecNRight = %d, NDetSpecPRight = %d, NspecnRight = %d,"
175 " NspecpRight = %d, NpartRight = %d"
176 " \t b = %f fm\n ",
4e1fc320 177 fZN1Energy[0]/1000.,fZP1Energy[0]/1000.,fZEM1signal[0]/1000.,fZEM2signal[0]/1000.,
178 fZN2Energy[0]/1000., fZP2Energy[0]/1000.,
646f1679 179 fNDetSpecNLeft,fNDetSpecPLeft,fNTrueSpecNLeft,fNTrueSpecPLeft,fNPartLeft,
180 fNDetSpecNRight,fNDetSpecPRight,fNTrueSpecNRight,fNTrueSpecPRight,fNPartRight,
181 fImpPar);
93f80a6f 182}