// -*- mode: C++ -*-

//
// Pibero Djawotho <pibero@indiana.edu>
// Indiana University
// 6 August 2007
//

#ifndef EMC_CLUSTER_H
#define EMC_CLUSTER_H

// Local
class EmcHit;

// ROOT
#include "TVector3.h"
#include "TRefArray.h"

class EmcCluster : public TObject {
public:
  EmcCluster();
  EmcCluster(const EmcCluster& cluster);
  ~EmcCluster() {}

  TRefArray& hits();
  EmcHit* seed() const;
  float energy() const;
  TVector3& position();
  TVector3& momentum();

  void setEnergy(float energy);

private:
  TRefArray mHits;
  float mEnergy;
  TVector3 mPosition;
  TVector3 mMomentum;

  ClassDef(EmcCluster, 1);
};

inline TRefArray& EmcCluster::hits() { return mHits; }
inline EmcHit* EmcCluster::seed() const { return (EmcHit*)mHits.First(); }
inline float EmcCluster::energy() const { return mEnergy; }
inline TVector3& EmcCluster::position() { return mPosition; }
inline TVector3& EmcCluster::momentum() { return mMomentum; }

inline void EmcCluster::setEnergy(float energy) { mEnergy = energy; }

#endif
