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

#ifndef TRACKCAM_H
#define TRACKCAM_H
#include "TObject.h"
#include <vector>

using std::vector;

class CandSliceHandle;
class HitCam;

class TrackCam : public TObject
{
 public:
  TrackCam(CandSliceHandle* slice);
  virtual ~TrackCam();
  
  CandSliceHandle* GetCandSliceHandle() const {return fSlice;};

  int GetBegPlane() const {return fBegPlane;};
  int GetEndPlane() const {return fEndPlane;};

  void AddHit(HitCam* hit);
  bool ContainsHit(HitCam* hit) const;
  HitCam* GetHit(unsigned int i) const;
  double GetBegTPos();
  double GetEndTPos();
  double GetDir(int Plane1, int Plane2);
  double GetBegDir();
  double GetEndDir();
  double GetBegZPos() const {return fBegZ;};
  double GetEndZPos() const {return fEndZ;};
  int GetPlaneView() const {return fPlaneView;};
  unsigned int GetEntries() const {return HitsInTrack.size();};

  int GetUID() const {return fUID;};
  void SetUID(int UIDNum) {fUID=UIDNum;};

  void SetPartner(TrackCam* objtrk) {fPartner=objtrk;};
  TrackCam* GetPartner() const {return fPartner;};


 private: 
  CandSliceHandle* fSlice;
  int fBegPlane;
  int fEndPlane;
  double fBegZ;
  double fEndZ;
  int fUID;
  TrackCam* fPartner;
  int fPlaneView;

  vector<HitCam*> HitsInTrack;

  ClassDef(TrackCam,1)
};

#endif
