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

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

#ifndef SMD_CLUSTER_H
#define SMD_CLUSTER_H

// Local
class SmdHit;

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

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

  int detectorId() const;
  TRefArray& hits();
  float energy() const;
  TVector3& position();
  TRefArray& tracks();

  void setDetectorId(int id);
  void setEnergy(float energy);
  void setPosition(const TVector3& position);

private:
  int mDetectorId;
  TRefArray mHits;
  float mEnergy;
  TVector3 mPosition;
  TRefArray mTracks;

  ClassDef(SmdCluster, 1);
};

inline int SmdCluster::detectorId() const { return mDetectorId; }
inline TRefArray& SmdCluster::hits() { return mHits; }
inline float SmdCluster::energy() const { return mEnergy; }
inline TVector3& SmdCluster::position() { return mPosition; }
inline TRefArray& SmdCluster::tracks() { return mTracks; }

inline void SmdCluster::setDetectorId(int id) { mDetectorId = id; }
inline void SmdCluster::setEnergy(float energy) { mEnergy = energy; }
inline void SmdCluster::setPosition(const TVector3& position) { mPosition = position; }

#endif
