]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliESDZDC.h
Fix in composition of QAChecked output image file (Melinda S.)
[u/mrichter/AliRoot.git] / STEER / AliESDZDC.h
index 001e5f0a8e932c376dd47454a1aa18d1d9ae3516..c39d98ed482f61e074f83601a8d3cf0445035e91 100644 (file)
@@ -9,19 +9,44 @@
 //                      Implementation of   Class AliESDZDC
 //   This is a class that summarizes the ZDC data for the ESD   
 //   Origin: Christian Klein-Boesing, CERN, Christian.Klein-Boesing@cern.ch 
+//   *** 15/10/2009 Scaler added to AliESDZDC class ***
+//   *** Scaler format:  32 floats from VME scaler  ***
 //-------------------------------------------------------------------------
 
-#include <TObject.h>
-#include <TMath.h>
-#include <TF1.h>
+#include <AliVZDC.h>
 
-
-class AliESDZDC: public TObject {
-public:
+class AliESDZDC: public AliVZDC {
+public: 
   AliESDZDC();
   AliESDZDC(const AliESDZDC& zdc);
   AliESDZDC& operator=(const AliESDZDC& zdc);
-  virtual void Copy(TObject &obj) const;
+
+
+  // Getters 
+  
+  virtual Short_t  GetZDCParticipants() const {return fZDCParticipants;}
+  virtual Short_t  GetZDCPartSideA() const {return fZDCPartSideA;}
+  virtual Short_t  GetZDCPartSideC() const {return fZDCPartSideC;}
+  virtual Double_t GetImpactParameter() const {return fImpactParameter;}
+  virtual Double_t GetImpactParamSideA() const {return fImpactParamSideA;}
+  virtual Double_t GetImpactParamSideC() const {return fImpactParamSideC;}
+
+  virtual Double_t GetZNCEnergy() const {return (Double_t) fZDCN1Energy;}
+  virtual Double_t GetZPCEnergy() const {return (Double_t) fZDCP1Energy;}
+  virtual Double_t GetZNAEnergy() const {return (Double_t) fZDCN2Energy;}
+  virtual Double_t GetZPAEnergy() const {return (Double_t) fZDCP2Energy;}
+  virtual Double_t GetZEM1Energy() const {return (Double_t) fZDCEMEnergy;}
+  virtual Double_t GetZEM2Energy() const {return (Double_t) fZDCEMEnergy1;}
+  
+  virtual const Double_t *GetZNCTowerEnergy() const {return fZN1TowerEnergy;}
+  virtual const Double_t *GetZNATowerEnergy() const {return fZN2TowerEnergy;}
+  virtual const Double_t *GetZPCTowerEnergy() const {return fZP1TowerEnergy;}
+  virtual const Double_t *GetZPATowerEnergy() const {return fZP2TowerEnergy;}
+  virtual const Double_t *GetZNCTowerEnergyLR() const {return fZN1TowerEnergyLR;}
+  virtual const Double_t *GetZNATowerEnergyLR() const {return fZN2TowerEnergyLR;}
+  const Double_t *GetZPCTowerEnergyLR() const {return fZP1TowerEnergyLR;}
+  const Double_t *GetZPATowerEnergyLR() const {return fZP2TowerEnergyLR;}
 
   UInt_t   GetESDQuality()  const {return fESDQuality;}
   Double_t GetZDCN1Energy() const {return fZDCN1Energy;}
@@ -31,12 +56,7 @@ public:
   Double_t GetZDCEMEnergy(Int_t i) const 
           {if(i==0){return fZDCEMEnergy;} else if(i==1){return fZDCEMEnergy1;}
           return 0;}
-  Short_t  GetZDCParticipants() const {return fZDCParticipants;}
-  Short_t  GetZDCPartSideA() const {return fZDCPartSideA;}
-  Short_t  GetZDCPartSideC() const {return fZDCPartSideC;}
-  Double_t GetImpactParameter() const {return fImpactParameter;}
-  Double_t GetImpactParamSideA() const {return fImpactParamSideA;}
-  Double_t GetImpactParamSideC() const {return fImpactParamSideC;}
+
   const Double_t * GetZN1TowerEnergy() const {return fZN1TowerEnergy;}
   const Double_t * GetZN2TowerEnergy() const {return fZN2TowerEnergy;}
   const Double_t * GetZP1TowerEnergy() const {return fZP1TowerEnergy;}
@@ -46,9 +66,32 @@ public:
   const Double_t * GetZP1TowerEnergyLR() const {return fZP1TowerEnergyLR;}
   const Double_t * GetZP2TowerEnergyLR() const {return fZP2TowerEnergyLR;}
   //
-  Double32_t * GetZNCCentroid();
-  Double32_t * GetZNACentroid();
+  virtual Bool_t GetZNCentroidInPbPb(Float_t beamEne, Double_t centrZNC[2], Double_t centrZNA[2]);
+  virtual Bool_t GetZNCentroidInpp(Double_t centrZNC[2], Double_t centrZNA[2]);
   //
+
+  UInt_t GetZDCScaler(Int_t i)  const {return fVMEScaler[i];}
+  const UInt_t* GetZDCScaler()  const {return fVMEScaler;}
+
+  Int_t GetZDCTDCData(Int_t i, Int_t j) const {return fZDCTDCData[i][j];}
+  Float_t GetZDCTDCCorrected(Int_t i, Int_t j) const 
+         {if(AliESDZDC::kCorrectedTDCFilled) return fZDCTDCCorrected[i][j];
+          else return 0.;}
+  
+  Float_t GetZNTDCSum(Int_t ihit) const 
+  {if(ihit<4 && AliESDZDC::kCorrectedTDCFilled) return (Float_t) (fZDCTDCCorrected[10][ihit]+fZDCTDCCorrected[12][ihit]);
+   else return 0.;}
+  Float_t GetZNTDCDiff(Int_t ihit) const 
+          {if(ihit<4 && AliESDZDC::kCorrectedTDCFilled) return (Float_t) (fZDCTDCCorrected[12][ihit]-fZDCTDCCorrected[10][ihit]);
+           else return 0.;}
+  
+  virtual Float_t GetZDCTimeSum() const 
+          {if(AliESDZDC::kCorrectedTDCFilled) return (Float_t) (fZDCTDCCorrected[10][0]+fZDCTDCCorrected[12][0]);
+           else return 0.;}
+  virtual Float_t GetZDCTimeDiff() const 
+          {if(AliESDZDC::kCorrectedTDCFilled) return (Float_t) (fZDCTDCCorrected[12][0]-fZDCTDCCorrected[10][0]);
+           else return 0.;}
+  
   void  SetZDC(Double_t n1Energy, Double_t p1Energy, 
               Double_t emEnergy0, Double_t emEnergy1,
               Double_t n2Energy, Double_t p2Energy, 
@@ -61,30 +104,42 @@ public:
         fImpactParameter=b; fImpactParamSideA=bA, fImpactParamSideC=bC,
         fESDQuality=recoFlag;}
   //
-  void  SetZN1TowerEnergy(Float_t tow1[5])
+  void  SetZN1TowerEnergy(const Float_t tow1[5])
           {for(Int_t i=0; i<5; i++) fZN1TowerEnergy[i] = tow1[i];}
-  void  SetZN2TowerEnergy(Float_t tow2[5])
+  void  SetZN2TowerEnergy(const Float_t tow2[5])
           {for(Int_t i=0; i<5; i++) fZN2TowerEnergy[i] = tow2[i];}
-  void  SetZP1TowerEnergy(Float_t tow1[5])
+  void  SetZP1TowerEnergy(const Float_t tow1[5])
           {for(Int_t i=0; i<5; i++) fZP1TowerEnergy[i] = tow1[i];}
-  void  SetZP2TowerEnergy(Float_t tow2[5])
+  void  SetZP2TowerEnergy(const Float_t tow2[5])
           {for(Int_t i=0; i<5; i++) fZP2TowerEnergy[i] = tow2[i];}
-  void  SetZN1TowerEnergyLR(Float_t tow1[5])
+  void  SetZN1TowerEnergyLR(const Float_t tow1[5])
           {for(Int_t i=0; i<5; i++) fZN1TowerEnergyLR[i] = tow1[i];}
-  void  SetZN2TowerEnergyLR(Float_t tow2[5])
+  void  SetZN2TowerEnergyLR(const Float_t tow2[5])
           {for(Int_t i=0; i<5; i++) fZN2TowerEnergyLR[i] = tow2[i];}
-  void  SetZP1TowerEnergyLR(Float_t tow1[5])
+  void  SetZP1TowerEnergyLR(const Float_t tow1[5])
           {for(Int_t i=0; i<5; i++) fZP1TowerEnergyLR[i] = tow1[i];}
-  void  SetZP2TowerEnergyLR(Float_t tow2[5])
+  void  SetZP2TowerEnergyLR(const Float_t tow2[5])
           {for(Int_t i=0; i<5; i++) fZP2TowerEnergyLR[i] = tow2[i];}
-  void  SetZNACentroid(Float_t centrCoord[2])
+  void  SetZNACentroid(const Float_t centrCoord[2])
           {for(Int_t i=0; i<2; i++) fZNACentrCoord[i] = centrCoord[i];}
-  void  SetZNCCentroid(Float_t centrCoord[2])
+  void  SetZNCCentroid(const Float_t centrCoord[2])
           {for(Int_t i=0; i<2; i++) fZNCCentrCoord[i] = centrCoord[i];}
+  
+  void SetZDCScaler(const UInt_t count[32]) 
+       {for(Int_t k=0; k<32; k++) fVMEScaler[k] = count[k];}
+  
+  void SetZDCTDCData(const Int_t values[32][4]) 
+       {for(Int_t k=0; k<32; k++)
+                  for(Int_t j=0; j<4; j++) fZDCTDCData[k][j] = values[k][j];}
+  
+  void SetZDCTDCCorrected(const Float_t values[32][4]) 
+       {for(Int_t k=0; k<32; k++)
+                  for(Int_t j=0; j<4; j++) fZDCTDCCorrected[k][j] = values[k][j];}
 
   void    Reset();
   void    Print(const Option_t *opt=0) const;
-
+private:
+  virtual void Copy(TObject &obj) const;
 private:
 
   Double32_t   fZDCN1Energy;  // reconstructed energy in the neutron ZDC
@@ -110,8 +165,11 @@ private:
   Double32_t   fZNACentrCoord[2]; // Coordinates of the centroid over ZNC
   Double32_t   fZNCCentrCoord[2]; // Coordinates of the centroid over ZNA
   UInt_t       fESDQuality;      // flags from reconstruction
-  //
-  ClassDef(AliESDZDC,10)
+  UInt_t       fVMEScaler[32];           // counts from VME scaler
+  Int_t        fZDCTDCData[32][4];     // ZDC TDC data
+  Float_t      fZDCTDCCorrected[32][4];// ZDC TDC data in ns corrected 4 phase shift
+  
+  ClassDef(AliESDZDC,17)
 };
 
 #endif