]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/ESD/AliESDZDC.h
Updates in event mixing code for low-pt code
[u/mrichter/AliRoot.git] / STEER / ESD / AliESDZDC.h
CommitLineData
d5ebf00e 1// -*- mode: C++ -*-
2#ifndef ALIESDZDC_H
3#define ALIESDZDC_H
4
5/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
7
8//-------------------------------------------------------------------------
9// Implementation of Class AliESDZDC
d1d3e36b 10// This is a class that summarizes the ZDC data for the ESD
d5ebf00e 11// Origin: Christian Klein-Boesing, CERN, Christian.Klein-Boesing@cern.ch
54c6a92c 12// *** 15/10/2009 Scaler added to AliESDZDC class ***
13// *** Scaler format: 32 floats from VME scaler ***
d5ebf00e 14//-------------------------------------------------------------------------
15
16d867eb 16#include <AliVZDC.h>
d5ebf00e 17
16d867eb 18class AliESDZDC: public AliVZDC {
19public:
f53e5ecb 20
d5ebf00e 21 AliESDZDC();
22 AliESDZDC(const AliESDZDC& zdc);
23 AliESDZDC& operator=(const AliESDZDC& zdc);
16d867eb 24
25
26 // Getters
27
28 virtual Short_t GetZDCParticipants() const {return fZDCParticipants;}
29 virtual Short_t GetZDCPartSideA() const {return fZDCPartSideA;}
30 virtual Short_t GetZDCPartSideC() const {return fZDCPartSideC;}
31 virtual Double_t GetImpactParameter() const {return fImpactParameter;}
32 virtual Double_t GetImpactParamSideA() const {return fImpactParamSideA;}
33 virtual Double_t GetImpactParamSideC() const {return fImpactParamSideC;}
34
35 virtual Double_t GetZNCEnergy() const {return (Double_t) fZDCN1Energy;}
36 virtual Double_t GetZPCEnergy() const {return (Double_t) fZDCP1Energy;}
37 virtual Double_t GetZNAEnergy() const {return (Double_t) fZDCN2Energy;}
38 virtual Double_t GetZPAEnergy() const {return (Double_t) fZDCP2Energy;}
39 virtual Double_t GetZEM1Energy() const {return (Double_t) fZDCEMEnergy;}
40 virtual Double_t GetZEM2Energy() const {return (Double_t) fZDCEMEnergy1;}
41
42 virtual const Double_t *GetZNCTowerEnergy() const {return fZN1TowerEnergy;}
43 virtual const Double_t *GetZNATowerEnergy() const {return fZN2TowerEnergy;}
44 virtual const Double_t *GetZPCTowerEnergy() const {return fZP1TowerEnergy;}
45 virtual const Double_t *GetZPATowerEnergy() const {return fZP2TowerEnergy;}
46 virtual const Double_t *GetZNCTowerEnergyLR() const {return fZN1TowerEnergyLR;}
47 virtual const Double_t *GetZNATowerEnergyLR() const {return fZN2TowerEnergyLR;}
48 const Double_t *GetZPCTowerEnergyLR() const {return fZP1TowerEnergyLR;}
49 const Double_t *GetZPATowerEnergyLR() const {return fZP2TowerEnergyLR;}
d5ebf00e 50
f6006c7d 51 UInt_t GetESDQuality() const {return fESDQuality;}
a7b0ef8a 52 Double_t GetZDCN1Energy() const {return fZDCN1Energy;}
53 Double_t GetZDCP1Energy() const {return fZDCP1Energy;}
54 Double_t GetZDCN2Energy() const {return fZDCN2Energy;}
55 Double_t GetZDCP2Energy() const {return fZDCP2Energy;}
d1d3e36b 56 Double_t GetZDCEMEnergy(Int_t i) const
89291556 57 {if(i==0){return fZDCEMEnergy;} else if(i==1){return fZDCEMEnergy1;}
58 return 0;}
16d867eb 59
7b4458a2 60 const Double_t * GetZN1TowerEnergy() const {return fZN1TowerEnergy;}
61 const Double_t * GetZN2TowerEnergy() const {return fZN2TowerEnergy;}
a85132e7 62 const Double_t * GetZP1TowerEnergy() const {return fZP1TowerEnergy;}
63 const Double_t * GetZP2TowerEnergy() const {return fZP2TowerEnergy;}
64 const Double_t * GetZN1TowerEnergyLR() const {return fZN1TowerEnergyLR;}
65 const Double_t * GetZN2TowerEnergyLR() const {return fZN2TowerEnergyLR;}
66 const Double_t * GetZP1TowerEnergyLR() const {return fZP1TowerEnergyLR;}
67 const Double_t * GetZP2TowerEnergyLR() const {return fZP2TowerEnergyLR;}
d1d3e36b 68 //
16d867eb 69 virtual Bool_t GetZNCentroidInPbPb(Float_t beamEne, Double_t centrZNC[2], Double_t centrZNA[2]);
70 virtual Bool_t GetZNCentroidInpp(Double_t centrZNC[2], Double_t centrZNA[2]);
89291556 71 //
f53e5ecb 72
73 UInt_t GetZDCScaler(Int_t i) const {return fVMEScaler[i];}
74 const UInt_t* GetZDCScaler() const {return fVMEScaler;}
75
76 Int_t GetZDCTDCData(Int_t i, Int_t j) const {return fZDCTDCData[i][j];}
593ced83 77 Float_t GetZDCTDCCorrected(Int_t i, Int_t j) const
33c5ab5c 78 {
79 if(AliESDZDC::kCorrectedTDCFilled && (fZDCTDCData[i][j]!=0)) return fZDCTDCCorrected[i][j];
e4295618 80 else return 999.;
33c5ab5c 81 }
16d867eb 82
f53e5ecb 83 Float_t GetZNTDCSum(Int_t ihit) const
33c5ab5c 84 {
85 if(ihit<4 && AliESDZDC::kCorrectedTDCFilled && (fZDCTDCData[10][ihit]!=0) && (fZDCTDCData[12][ihit]!=0)) return (Float_t) (fZDCTDCCorrected[10][ihit]+fZDCTDCCorrected[12][ihit]);
e4295618 86 else return 999.;
33c5ab5c 87 }
f53e5ecb 88 Float_t GetZNTDCDiff(Int_t ihit) const
33c5ab5c 89 {
90 if(ihit<4 && AliESDZDC::kCorrectedTDCFilled && (fZDCTDCData[10][ihit]!=0) && (fZDCTDCData[12][ihit]!=0)) return (Float_t) (fZDCTDCCorrected[12][ihit]-fZDCTDCCorrected[10][ihit]);
e4295618 91 else return 999.;
33c5ab5c 92 }
f53e5ecb 93
16d867eb 94 virtual Float_t GetZDCTimeSum() const
33c5ab5c 95 {if(AliESDZDC::kCorrectedTDCFilled && (fZDCTDCData[10][0]!=0) && (fZDCTDCData[12][0]!=0)) return (Float_t) (fZDCTDCCorrected[10][0]+fZDCTDCCorrected[12][0]);
16d867eb 96 else return 0.;}
97 virtual Float_t GetZDCTimeDiff() const
33c5ab5c 98 {if(AliESDZDC::kCorrectedTDCFilled && (fZDCTDCData[10][0]!=0) && (fZDCTDCData[12][0]!=0)) return (Float_t) (fZDCTDCCorrected[12][0]-fZDCTDCCorrected[10][0]);
16d867eb 99 else return 0.;}
100
89291556 101 void SetZDC(Double_t n1Energy, Double_t p1Energy,
5f0ec064 102 Double_t emEnergy0, Double_t emEnergy1,
103 Double_t n2Energy, Double_t p2Energy,
104 Short_t participants, Short_t nPartA, Short_t nPartC,
105 Double_t b, Double_t bA, Double_t bC, UInt_t recoFlag)
89291556 106 {fZDCN1Energy=n1Energy; fZDCP1Energy=p1Energy;
5f0ec064 107 fZDCEMEnergy=emEnergy0; fZDCEMEnergy1=emEnergy1;
108 fZDCN2Energy=n2Energy; fZDCP2Energy=p2Energy;
109 fZDCParticipants=participants; fZDCPartSideA=nPartA; fZDCPartSideC=nPartC;
110 fImpactParameter=b; fImpactParamSideA=bA, fImpactParamSideC=bC,
111 fESDQuality=recoFlag;}
d1d3e36b 112 //
b19cc8d0 113 void SetZN1TowerEnergy(const Float_t tow1[5])
d1d3e36b 114 {for(Int_t i=0; i<5; i++) fZN1TowerEnergy[i] = tow1[i];}
b19cc8d0 115 void SetZN2TowerEnergy(const Float_t tow2[5])
d1d3e36b 116 {for(Int_t i=0; i<5; i++) fZN2TowerEnergy[i] = tow2[i];}
b19cc8d0 117 void SetZP1TowerEnergy(const Float_t tow1[5])
d1d3e36b 118 {for(Int_t i=0; i<5; i++) fZP1TowerEnergy[i] = tow1[i];}
b19cc8d0 119 void SetZP2TowerEnergy(const Float_t tow2[5])
d1d3e36b 120 {for(Int_t i=0; i<5; i++) fZP2TowerEnergy[i] = tow2[i];}
b19cc8d0 121 void SetZN1TowerEnergyLR(const Float_t tow1[5])
d1d3e36b 122 {for(Int_t i=0; i<5; i++) fZN1TowerEnergyLR[i] = tow1[i];}
b19cc8d0 123 void SetZN2TowerEnergyLR(const Float_t tow2[5])
d1d3e36b 124 {for(Int_t i=0; i<5; i++) fZN2TowerEnergyLR[i] = tow2[i];}
b19cc8d0 125 void SetZP1TowerEnergyLR(const Float_t tow1[5])
d1d3e36b 126 {for(Int_t i=0; i<5; i++) fZP1TowerEnergyLR[i] = tow1[i];}
b19cc8d0 127 void SetZP2TowerEnergyLR(const Float_t tow2[5])
d1d3e36b 128 {for(Int_t i=0; i<5; i++) fZP2TowerEnergyLR[i] = tow2[i];}
b19cc8d0 129 void SetZNACentroid(const Float_t centrCoord[2])
89291556 130 {for(Int_t i=0; i<2; i++) fZNACentrCoord[i] = centrCoord[i];}
b19cc8d0 131 void SetZNCCentroid(const Float_t centrCoord[2])
89291556 132 {for(Int_t i=0; i<2; i++) fZNCCentrCoord[i] = centrCoord[i];}
54c6a92c 133
b19cc8d0 134 void SetZDCScaler(const UInt_t count[32])
54c6a92c 135 {for(Int_t k=0; k<32; k++) fVMEScaler[k] = count[k];}
82dffa48 136
f53e5ecb 137 void SetZDCTDCData(const Int_t values[32][4])
32e2fda5 138 {for(Int_t k=0; k<32; k++)
139 for(Int_t j=0; j<4; j++) fZDCTDCData[k][j] = values[k][j];}
f53e5ecb 140
141 void SetZDCTDCCorrected(const Float_t values[32][4])
142 {for(Int_t k=0; k<32; k++)
143 for(Int_t j=0; j<4; j++) fZDCTDCCorrected[k][j] = values[k][j];}
26428fe7 144
145 Bool_t IsZNChit() {return fZNCTDChit;}
146 Bool_t IsZNAhit() {return fZNATDChit;}
147 Bool_t IsZPChit() {return fZPCTDChit;}
148 Bool_t IsZPAhit() {return fZPATDChit;}
149 Bool_t IsZEM1hit() {return fZEM1TDChit;}
150 Bool_t IsZEM2hit() {return fZEM2TDChit;}
151 //
152 void SetZNCTDChit(Bool_t isf) {fZNCTDChit = isf;}
153 void SetZPCTDChit(Bool_t isf) {fZNATDChit = isf;}
154 void SetZNATDChit(Bool_t isf) {fZPCTDChit = isf;}
155 void SetZPATDChit(Bool_t isf) {fZPATDChit = isf;}
156 void SetZEM1TDChit(Bool_t isf) {fZEM1TDChit = isf;}
157 void SetZEM2TDChit(Bool_t isf) {fZEM2TDChit = isf;}
9e05925b 158
d5ebf00e 159 void Reset();
160 void Print(const Option_t *opt=0) const;
16d867eb 161private:
162 virtual void Copy(TObject &obj) const;
d5ebf00e 163private:
164
d1d3e36b 165 Double32_t fZDCN1Energy; // reconstructed energy in the neutron ZDC
166 Double32_t fZDCP1Energy; // reconstructed energy in the proton ZDC
167 Double32_t fZDCN2Energy; // reconstructed energy in the neutron ZDC
168 Double32_t fZDCP2Energy; // reconstructed energy in the proton ZDC
169 Double32_t fZDCEMEnergy; // signal in the electromagnetic ZDCs
170 Double32_t fZDCEMEnergy1; // second EM signal,cannot change fZDCEMEnergy to array (not backward compatible)
a85132e7 171 Double32_t fZN1TowerEnergy[5];// reco E in 5 ZN1 sectors - high gain chain
172 Double32_t fZN2TowerEnergy[5];// reco E in 5 ZN2 sectors - high gain chain
173 Double32_t fZP1TowerEnergy[5];// reco E in 5 ZP1 sectors - high gain chain
174 Double32_t fZP2TowerEnergy[5];// reco E in 5 ZP2 sectors - high gain chain
175 Double32_t fZN1TowerEnergyLR[5];// reco E in 5 ZN1 sectors - low gain chain
176 Double32_t fZN2TowerEnergyLR[5];// reco E in 5 ZN2 sectors - low gain chain
177 Double32_t fZP1TowerEnergyLR[5];// reco E in 5 ZP1 sectors - low gain chain
178 Double32_t fZP2TowerEnergyLR[5];// reco E in 5 ZP2 sectors - low gain chain
5f0ec064 179 Short_t fZDCParticipants; // number of participants estimated by the ZDC (ONLY in A-A)
180 Short_t fZDCPartSideA; // number of participants estimated by the ZDC (ONLY in A-A)
181 Short_t fZDCPartSideC; // number of participants estimated by the ZDC (ONLY in A-A)
182 Double32_t fImpactParameter; // impact parameter estimated by the ZDC (ONLY in A-A)
183 Double32_t fImpactParamSideA; // impact parameter estimated by the ZDC (ONLY in A-A)
184 Double32_t fImpactParamSideC; // impact parameter estimated by the ZDC (ONLY in A-A)
185 Double32_t fZNACentrCoord[2]; // Coordinates of the centroid over ZNC
186 Double32_t fZNCCentrCoord[2]; // Coordinates of the centroid over ZNA
187 UInt_t fESDQuality; // flags from reconstruction
9e05925b 188 UInt_t fVMEScaler[32]; // counts from VME scaler
f53e5ecb 189 Int_t fZDCTDCData[32][4]; // ZDC TDC data
190 Float_t fZDCTDCCorrected[32][4];// ZDC TDC data in ns corrected 4 phase shift
26428fe7 191 Bool_t fZNCTDChit; // true if ZNC TDC has at least 1 hit
192 Bool_t fZNATDChit; // true if ZNA TDC has at least 1 hit
193 Bool_t fZPCTDChit; // true if ZPC TDC has at least 1 hit
194 Bool_t fZPATDChit; // true if ZPA TDC has at least 1 hit
195 Bool_t fZEM1TDChit; // true if ZEM1 TDC has at least 1 hit
196 Bool_t fZEM2TDChit; // true if ZEM2 TDC has at least 1 hit
f53e5ecb 197
26428fe7 198 ClassDef(AliESDZDC,18)
d5ebf00e 199};
200
201#endif
7b4458a2 202