////////////////////////////////////////////////////////////////////////
// Package: CandTrackCam
//
// CandTrackCam - ClusterCam.h
//
// marshall@hep.phy.cam.ac.uk
////////////////////////////////////////////////////////////////////////

#ifndef CLUSTERCAM_H
#define CLUSTERCAM_H

#include <vector>
using std::vector;

class HitCam;

class ClusterCam
{
 public:
  ClusterCam(HitCam* hit);
  virtual ~ClusterCam();
 
  void AddHit(HitCam* hit);
  bool ContainsHit(HitCam* hit);

  int IsHitAssoc(HitCam* hit) const;
  int IsShwAssoc(ClusterCam* clust) const;
  int IsTrkAssoc(ClusterCam* clustm, ClusterCam* clustp, int PlaneGap=0) const;
  unsigned int GetEntries() const {return HitsInCluster.size();};
  HitCam* GetHit(unsigned int i) const;
  int GetDigits() const { return fDigits; };

  int GetPlane() const {return fPlane;};
  int GetBegStrip() const {return fBegStrip;};
  int GetEndStrip() const {return fEndStrip;};
  int GetPlaneView() const {return fPlaneView;};

  double GetZPos() {return fZPos;};
  double GetTPos() {return fTPos;};
  double GetCharge() {return fCharge;};
  double GetBegTime() const {return fBegTime;};
  double GetEndTime() const {return fEndTime;};
  double GetBegTPos() const {return fBegTPos;};
  double GetEndTPos() const {return fEndTPos;};

  int GetTrkFlag() const {return fTrkFlag;};
  int GetShwFlag() const {return fShwFlag;}; 
  int GetTrkPlnFlag() const {return fTrkPlnFlag;};
  int GetShwPlnFlag() const {return fShwPlnFlag;};

  void SetTrkFlag(int flag) {fTrkFlag=flag;};
  void SetShwFlag(int flag) {fShwFlag=flag;};
  void SetTrkPlnFlag(int flag) {fTrkPlnFlag=flag;};
  void SetShwPlnFlag(int flag) {fShwPlnFlag=flag;};
  
  void SetNDFlag(int flag) {fNDFlag=flag;};
  int GetNDFlag() const {return fNDFlag;};

  int fPlane;
  int fBegStrip;
  int fEndStrip;
  double fBegTime;
  double fEndTime;
  double fBegTPos;
  double fEndTPos;
  double fZPos;
  double fTPos;
  double fCharge;
  int fTrkFlag;
  int fShwFlag;
  int fTrkPlnFlag;
  int fShwPlnFlag;
  int fPlaneView;
  int fDigits;
  int fNDFlag;

 private:
  vector<HitCam*> HitsInCluster;

  const double StripWidth;

  //  ClassDef(ClusterCam,1)
};

#endif
