bedd2ada9334b00d4e5ee12c5c53031776dbcd1d
[u/mrichter/AliRoot.git] / STEER / AliESDZDC.h
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
10 //   This is a class that summarizes the ZDC data for the ESD   
11 //   Origin: Christian Klein-Boesing, CERN, Christian.Klein-Boesing@cern.ch 
12 //-------------------------------------------------------------------------
13
14 #include <TObject.h>
15 #include <TMath.h>
16
17
18 class AliESDZDC: public TObject {
19 public:
20   AliESDZDC();
21   AliESDZDC(const AliESDZDC& zdc);
22   AliESDZDC& operator=(const AliESDZDC& zdc);
23
24   Double_t GetZDCN1Energy() const {return fZDCN1Energy;}
25   Double_t GetZDCP1Energy() const {return fZDCP1Energy;}
26   Double_t GetZDCN2Energy() const {return fZDCN2Energy;}
27   Double_t GetZDCP2Energy() const {return fZDCP2Energy;}
28   Double_t GetZDCEMEnergy(Int_t i) const 
29            {if(i==0){return fZDCEMEnergy;}else if(i==1){return fZDCEMEnergy1;}return 0;}
30   Short_t  GetZDCParticipants() const {return fZDCParticipants;}
31   const Double_t * GetZN1TowerEnergy() const {return fZN1TowerEnergy;}
32   const Double_t * GetZN2TowerEnergy() const {return fZN2TowerEnergy;}
33   const Double_t * GetZP1TowerEnergy() const {return fZP1TowerEnergy;}
34   const Double_t * GetZP2TowerEnergy() const {return fZP2TowerEnergy;}
35   const Double_t * GetZN1TowerEnergyLR() const {return fZN1TowerEnergyLR;}
36   const Double_t * GetZN2TowerEnergyLR() const {return fZN2TowerEnergyLR;}
37   const Double_t * GetZP1TowerEnergyLR() const {return fZP1TowerEnergyLR;}
38   const Double_t * GetZP2TowerEnergyLR() const {return fZP2TowerEnergyLR;}
39   //
40   const Float_t * GetZNCCentroid(int NspecnC) const;
41   const Float_t * GetZNACentroid(int NspecnA) const;
42   //
43   void  SetZDC(Double_t n1Energy, Double_t p1Energy, Double_t emEnergy0, Double_t emEnergy1,
44                Double_t n2Energy, Double_t p2Energy, Short_t participants) 
45    {fZDCN1Energy=n1Energy; fZDCP1Energy=p1Energy; fZDCEMEnergy=emEnergy0; fZDCEMEnergy1=emEnergy1;
46     fZDCN2Energy=n2Energy; fZDCP2Energy=p2Energy; fZDCParticipants=participants;}
47   void  SetZN1TowerEnergy(Float_t tow1[5])
48           {for(Int_t i=0; i<5; i++) fZN1TowerEnergy[i] = tow1[i];}
49   void  SetZN2TowerEnergy(Float_t tow2[5])
50           {for(Int_t i=0; i<5; i++) fZN2TowerEnergy[i] = tow2[i];}
51   void  SetZP1TowerEnergy(Float_t tow1[5])
52           {for(Int_t i=0; i<5; i++) fZP1TowerEnergy[i] = tow1[i];}
53   void  SetZP2TowerEnergy(Float_t tow2[5])
54           {for(Int_t i=0; i<5; i++) fZP2TowerEnergy[i] = tow2[i];}
55   void  SetZN1TowerEnergyLR(Float_t tow1[5])
56           {for(Int_t i=0; i<5; i++) fZN1TowerEnergyLR[i] = tow1[i];}
57   void  SetZN2TowerEnergyLR(Float_t tow2[5])
58           {for(Int_t i=0; i<5; i++) fZN2TowerEnergyLR[i] = tow2[i];}
59   void  SetZP1TowerEnergyLR(Float_t tow1[5])
60           {for(Int_t i=0; i<5; i++) fZP1TowerEnergyLR[i] = tow1[i];}
61   void  SetZP2TowerEnergyLR(Float_t tow2[5])
62           {for(Int_t i=0; i<5; i++) fZP2TowerEnergyLR[i] = tow2[i];}
63
64   void    Reset();
65   void    Print(const Option_t *opt=0) const;
66
67 private:
68
69   Double32_t   fZDCN1Energy;  // reconstructed energy in the neutron ZDC
70   Double32_t   fZDCP1Energy;  // reconstructed energy in the proton ZDC
71   Double32_t   fZDCN2Energy;  // reconstructed energy in the neutron ZDC
72   Double32_t   fZDCP2Energy;  // reconstructed energy in the proton ZDC
73   Double32_t   fZDCEMEnergy;  // signal in the electromagnetic ZDCs
74   Double32_t   fZDCEMEnergy1; // second EM signal,cannot change fZDCEMEnergy to array (not backward compatible)
75   Double32_t   fZN1TowerEnergy[5];// reco E in 5 ZN1 sectors - high gain chain
76   Double32_t   fZN2TowerEnergy[5];// reco E in 5 ZN2 sectors - high gain chain
77   Double32_t   fZP1TowerEnergy[5];// reco E in 5 ZP1 sectors - high gain chain
78   Double32_t   fZP2TowerEnergy[5];// reco E in 5 ZP2 sectors - high gain chain
79   Double32_t   fZN1TowerEnergyLR[5];// reco E in 5 ZN1 sectors - low gain chain
80   Double32_t   fZN2TowerEnergyLR[5];// reco E in 5 ZN2 sectors - low gain chain
81   Double32_t   fZP1TowerEnergyLR[5];// reco E in 5 ZP1 sectors - low gain chain
82   Double32_t   fZP2TowerEnergyLR[5];// reco E in 5 ZP2 sectors - low gain chain
83   Short_t      fZDCParticipants;  // number of participants estimated by the ZDC
84   ClassDef(AliESDZDC,7)
85 };
86
87 #endif
88