// access and set functions for binary tags for Tracker and VXD hits
// Version 1.1 20 Feb 2001 T.Abe change Hash and IsEqual according to ROOT3.
// Version 1.0 17 Dec 1998 Rob creation


#ifndef LCDTKID_H
#define LCDTKID_H

#include "TObject.h"

class LCDTkID : public TObject {

public:
  LCDTkID()           : m_tag(0)   {}
  LCDTkID(UInt_t tag) : m_tag(tag) {}
  ~LCDTkID() {}

  UInt_t GetBarrelEndcap() const; 
  UInt_t GetLayer() const { return (LCDTkID::layerOn & m_tag); }
  UInt_t GetNorthSouth() const;
  UInt_t GetSystem() const { return (LCDTkID::systemOn & m_tag) >> 28; }
  UInt_t GetTag() const { return m_tag; }

  void SetBarrelEndcap(UInt_t barrelEndcapVal);
  void SetLayer(UInt_t layerVal);
  void SetNorthSouth(UInt_t northSouthVal);
  void SetSystem(UInt_t sysVal);
  void SetTag(UInt_t tagVal) { m_tag = tagVal; }

  // 2 routines that ROOT requires
  ULong_t Hash() const {return  m_tag;};
  Bool_t IsEqual(const TObject *obj) const
  {return m_tag == ((LCDTkID*)obj)->GetTag();};
  
  const    static Int_t systemOn;
  const    static Int_t systemOff;
  
  const    static Int_t layerOn;
  const    static Int_t layerOff;
  
  const    static Int_t barrelEndcapOn;
  const    static Int_t barrelEndcapOff;
  
  const    static Int_t northSouthOn;
  const    static Int_t northSouthOff;

private:
  UInt_t m_tag; // Binary tag  for hit

public:
  ClassDef(LCDTkID,2)// Tag descriptor for hit
};

#endif
