]>
Commit | Line | Data |
---|---|---|
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 | ||
16 | #include <TObject.h> | |
d5ebf00e | 17 | |
18 | class AliESDZDC: public TObject { | |
19 | public: | |
f53e5ecb | 20 | |
21 | enum { | |
22 | kCorrectedTDCFilled = BIT(14) | |
23 | }; | |
24 | ||
d5ebf00e | 25 | AliESDZDC(); |
26 | AliESDZDC(const AliESDZDC& zdc); | |
27 | AliESDZDC& operator=(const AliESDZDC& zdc); | |
732a24fe | 28 | virtual void Copy(TObject &obj) const; |
d5ebf00e | 29 | |
f6006c7d | 30 | UInt_t GetESDQuality() const {return fESDQuality;} |
a7b0ef8a | 31 | Double_t GetZDCN1Energy() const {return fZDCN1Energy;} |
32 | Double_t GetZDCP1Energy() const {return fZDCP1Energy;} | |
33 | Double_t GetZDCN2Energy() const {return fZDCN2Energy;} | |
34 | Double_t GetZDCP2Energy() const {return fZDCP2Energy;} | |
d1d3e36b | 35 | Double_t GetZDCEMEnergy(Int_t i) const |
89291556 | 36 | {if(i==0){return fZDCEMEnergy;} else if(i==1){return fZDCEMEnergy1;} |
37 | return 0;} | |
a85132e7 | 38 | Short_t GetZDCParticipants() const {return fZDCParticipants;} |
5f0ec064 | 39 | Short_t GetZDCPartSideA() const {return fZDCPartSideA;} |
40 | Short_t GetZDCPartSideC() const {return fZDCPartSideC;} | |
41 | Double_t GetImpactParameter() const {return fImpactParameter;} | |
42 | Double_t GetImpactParamSideA() const {return fImpactParamSideA;} | |
43 | Double_t GetImpactParamSideC() const {return fImpactParamSideC;} | |
7b4458a2 | 44 | const Double_t * GetZN1TowerEnergy() const {return fZN1TowerEnergy;} |
45 | const Double_t * GetZN2TowerEnergy() const {return fZN2TowerEnergy;} | |
a85132e7 | 46 | const Double_t * GetZP1TowerEnergy() const {return fZP1TowerEnergy;} |
47 | const Double_t * GetZP2TowerEnergy() const {return fZP2TowerEnergy;} | |
48 | const Double_t * GetZN1TowerEnergyLR() const {return fZN1TowerEnergyLR;} | |
49 | const Double_t * GetZN2TowerEnergyLR() const {return fZN2TowerEnergyLR;} | |
50 | const Double_t * GetZP1TowerEnergyLR() const {return fZP1TowerEnergyLR;} | |
51 | const Double_t * GetZP2TowerEnergyLR() const {return fZP2TowerEnergyLR;} | |
d1d3e36b | 52 | // |
789b8a8d | 53 | Bool_t GetZNCentroidInPbPb(Float_t beamEne, Double_t centrZNC[2], Double_t centrZNA[2]); |
54 | Bool_t GetZNCentroidInpp(Double_t centrZNC[2], Double_t centrZNA[2]); | |
89291556 | 55 | // |
f53e5ecb | 56 | |
57 | UInt_t GetZDCScaler(Int_t i) const {return fVMEScaler[i];} | |
58 | const UInt_t* GetZDCScaler() const {return fVMEScaler;} | |
59 | ||
60 | Int_t GetZDCTDCData(Int_t i, Int_t j) const {return fZDCTDCData[i][j];} | |
61 | Float_t GetZDCTDCCorrected(Int_t i, Int_t j) const {return fZDCTDCCorrected[i][j];} | |
62 | Float_t GetZNTDCSum(Int_t ihit) const | |
63 | {if(ihit<4) return (Float_t) (fZDCTDCCorrected[10][ihit]+fZDCTDCCorrected[12][ihit]); | |
64 | else return 0.;} | |
65 | Float_t GetZNTDCDiff(Int_t ihit) const | |
66 | {if(ihit<4) return (Float_t) (fZDCTDCCorrected[12][ihit]-fZDCTDCCorrected[10][ihit]); | |
67 | else return 0.;} | |
68 | ||
89291556 | 69 | void SetZDC(Double_t n1Energy, Double_t p1Energy, |
5f0ec064 | 70 | Double_t emEnergy0, Double_t emEnergy1, |
71 | Double_t n2Energy, Double_t p2Energy, | |
72 | Short_t participants, Short_t nPartA, Short_t nPartC, | |
73 | Double_t b, Double_t bA, Double_t bC, UInt_t recoFlag) | |
89291556 | 74 | {fZDCN1Energy=n1Energy; fZDCP1Energy=p1Energy; |
5f0ec064 | 75 | fZDCEMEnergy=emEnergy0; fZDCEMEnergy1=emEnergy1; |
76 | fZDCN2Energy=n2Energy; fZDCP2Energy=p2Energy; | |
77 | fZDCParticipants=participants; fZDCPartSideA=nPartA; fZDCPartSideC=nPartC; | |
78 | fImpactParameter=b; fImpactParamSideA=bA, fImpactParamSideC=bC, | |
79 | fESDQuality=recoFlag;} | |
d1d3e36b | 80 | // |
b19cc8d0 | 81 | void SetZN1TowerEnergy(const Float_t tow1[5]) |
d1d3e36b | 82 | {for(Int_t i=0; i<5; i++) fZN1TowerEnergy[i] = tow1[i];} |
b19cc8d0 | 83 | void SetZN2TowerEnergy(const Float_t tow2[5]) |
d1d3e36b | 84 | {for(Int_t i=0; i<5; i++) fZN2TowerEnergy[i] = tow2[i];} |
b19cc8d0 | 85 | void SetZP1TowerEnergy(const Float_t tow1[5]) |
d1d3e36b | 86 | {for(Int_t i=0; i<5; i++) fZP1TowerEnergy[i] = tow1[i];} |
b19cc8d0 | 87 | void SetZP2TowerEnergy(const Float_t tow2[5]) |
d1d3e36b | 88 | {for(Int_t i=0; i<5; i++) fZP2TowerEnergy[i] = tow2[i];} |
b19cc8d0 | 89 | void SetZN1TowerEnergyLR(const Float_t tow1[5]) |
d1d3e36b | 90 | {for(Int_t i=0; i<5; i++) fZN1TowerEnergyLR[i] = tow1[i];} |
b19cc8d0 | 91 | void SetZN2TowerEnergyLR(const Float_t tow2[5]) |
d1d3e36b | 92 | {for(Int_t i=0; i<5; i++) fZN2TowerEnergyLR[i] = tow2[i];} |
b19cc8d0 | 93 | void SetZP1TowerEnergyLR(const Float_t tow1[5]) |
d1d3e36b | 94 | {for(Int_t i=0; i<5; i++) fZP1TowerEnergyLR[i] = tow1[i];} |
b19cc8d0 | 95 | void SetZP2TowerEnergyLR(const Float_t tow2[5]) |
d1d3e36b | 96 | {for(Int_t i=0; i<5; i++) fZP2TowerEnergyLR[i] = tow2[i];} |
b19cc8d0 | 97 | void SetZNACentroid(const Float_t centrCoord[2]) |
89291556 | 98 | {for(Int_t i=0; i<2; i++) fZNACentrCoord[i] = centrCoord[i];} |
b19cc8d0 | 99 | void SetZNCCentroid(const Float_t centrCoord[2]) |
89291556 | 100 | {for(Int_t i=0; i<2; i++) fZNCCentrCoord[i] = centrCoord[i];} |
54c6a92c | 101 | |
b19cc8d0 | 102 | void SetZDCScaler(const UInt_t count[32]) |
54c6a92c | 103 | {for(Int_t k=0; k<32; k++) fVMEScaler[k] = count[k];} |
82dffa48 | 104 | |
f53e5ecb | 105 | void SetZDCTDCData(const Int_t values[32][4]) |
32e2fda5 | 106 | {for(Int_t k=0; k<32; k++) |
107 | for(Int_t j=0; j<4; j++) fZDCTDCData[k][j] = values[k][j];} | |
f53e5ecb | 108 | |
109 | void SetZDCTDCCorrected(const Float_t values[32][4]) | |
110 | {for(Int_t k=0; k<32; k++) | |
111 | for(Int_t j=0; j<4; j++) fZDCTDCCorrected[k][j] = values[k][j];} | |
9e05925b | 112 | |
d5ebf00e | 113 | void Reset(); |
114 | void Print(const Option_t *opt=0) const; | |
115 | ||
116 | private: | |
117 | ||
d1d3e36b | 118 | Double32_t fZDCN1Energy; // reconstructed energy in the neutron ZDC |
119 | Double32_t fZDCP1Energy; // reconstructed energy in the proton ZDC | |
120 | Double32_t fZDCN2Energy; // reconstructed energy in the neutron ZDC | |
121 | Double32_t fZDCP2Energy; // reconstructed energy in the proton ZDC | |
122 | Double32_t fZDCEMEnergy; // signal in the electromagnetic ZDCs | |
123 | Double32_t fZDCEMEnergy1; // second EM signal,cannot change fZDCEMEnergy to array (not backward compatible) | |
a85132e7 | 124 | Double32_t fZN1TowerEnergy[5];// reco E in 5 ZN1 sectors - high gain chain |
125 | Double32_t fZN2TowerEnergy[5];// reco E in 5 ZN2 sectors - high gain chain | |
126 | Double32_t fZP1TowerEnergy[5];// reco E in 5 ZP1 sectors - high gain chain | |
127 | Double32_t fZP2TowerEnergy[5];// reco E in 5 ZP2 sectors - high gain chain | |
128 | Double32_t fZN1TowerEnergyLR[5];// reco E in 5 ZN1 sectors - low gain chain | |
129 | Double32_t fZN2TowerEnergyLR[5];// reco E in 5 ZN2 sectors - low gain chain | |
130 | Double32_t fZP1TowerEnergyLR[5];// reco E in 5 ZP1 sectors - low gain chain | |
131 | Double32_t fZP2TowerEnergyLR[5];// reco E in 5 ZP2 sectors - low gain chain | |
5f0ec064 | 132 | Short_t fZDCParticipants; // number of participants estimated by the ZDC (ONLY in A-A) |
133 | Short_t fZDCPartSideA; // number of participants estimated by the ZDC (ONLY in A-A) | |
134 | Short_t fZDCPartSideC; // number of participants estimated by the ZDC (ONLY in A-A) | |
135 | Double32_t fImpactParameter; // impact parameter estimated by the ZDC (ONLY in A-A) | |
136 | Double32_t fImpactParamSideA; // impact parameter estimated by the ZDC (ONLY in A-A) | |
137 | Double32_t fImpactParamSideC; // impact parameter estimated by the ZDC (ONLY in A-A) | |
138 | Double32_t fZNACentrCoord[2]; // Coordinates of the centroid over ZNC | |
139 | Double32_t fZNCCentrCoord[2]; // Coordinates of the centroid over ZNA | |
140 | UInt_t fESDQuality; // flags from reconstruction | |
9e05925b | 141 | UInt_t fVMEScaler[32]; // counts from VME scaler |
f53e5ecb | 142 | Int_t fZDCTDCData[32][4]; // ZDC TDC data |
143 | Float_t fZDCTDCCorrected[32][4];// ZDC TDC data in ns corrected 4 phase shift | |
144 | ||
145 | ClassDef(AliESDZDC,16) | |
d5ebf00e | 146 | }; |
147 | ||
148 | #endif | |
7b4458a2 | 149 |