// CalHit.h
// Feb 02,1999 Rob Shanks Creation: In an attempt to speed up the reading
//                                  of the Event structure.

#ifndef CALHIT_H
#define CALHIT_H

#include "towerID.h"
#include "TObject.h"
#include "TObjArray.h"
#include "EDeposit.h"

class CalHit: public TObject {
private:

  Float_t m_Etot;     // Total energy deposited in calorimeter tower
  towerID* m_tower;   // TowerID tag
  TObjArray m_MCE;    // List of particles and their energy contributions

public:
  CalHit();
  CalHit(towerID* tower);
  ~CalHit();
  Float_t AddE(Float_t hit);
  void AddHit(EDeposit* edep);
  Float_t GetEtotRaw(){return m_Etot;};
  TObjArray* GetMCE(){return &m_MCE;};
  towerID* GetTower(){return m_tower;};
  void Clean();

  Float_t GetEscale();
  Float_t GetcosThetaSeg();
  Float_t GetphiSeg();
  Float_t GetEtot();
  Float_t GetcosTheta();
  Float_t Getphi();

// array of values is [0,1,2,3] for [EM,HAD,MU,LUM] 

  static Float_t* energyScale;  //  energy scale factor
  static Float_t* cosThetaSeg;  // segmentation in cos(theta)
  static Float_t* phiSeg;       // segementation in phi
  
  ClassDef(CalHit,1) // Calorimeter tower hit information
    };

#endif
