// ----------------------------------------------------------------------------
// $Id: LCDTkID.cxx,v 1.1 2001/05/10 17:25:08 toshi Exp $
// ----------------------------------------------------------------------------
//
// $Log: LCDTkID.cxx,v $
// Revision 1.1 2001/05/10 17:25:08 toshi
// Rename *.C to *.cxx.
//
// Revision 1.2 2001/04/28 23:45:37 toshi
// Start to use CVS.
//
//
// access and set functions for binary Tracker VXD tags
// Version 1.0 17 Dec 1998 Rob creation of TkID class
//
////////////////////////////////////////////////////////////////////////////
//
// LCDTkID
//
// The TkID class contains a binary ID number and functions to obtain
// the location of the hit in question. The TkID class is used in the
// Tracker_Hit and VXD_Hit classes.
//
////////////////////////////////////////////////////////////////////////////
#include "LCDTkID.h"
ClassImp(LCDTkID)
//____________________________________________________________
void LCDTkID::SetLayer(UInt_t tag) {
// SetLayer sets the first 8 bits of m_tag to the layer number
//Int_t layerShift = tag & LCDTkID::layerOn;
UInt_t layerShift = tag;
UInt_t layer = (LCDTkID::layerOff & m_tag) | layerShift;
m_tag = layer;
}
//____________________________________________________________
//____________________________________________________________
UInt_t LCDTkID::GetNorthSouth() const {
// north/south in bit 30. northSouth extracts that, returns
// it shifted down to least-significant end.
return (LCDTkID::northSouthOn & m_tag) >> 30;
}
//____________________________________________________________
//____________________________________________________________
void LCDTkID::SetNorthSouth(UInt_t tag) {
// SetNorthSouth sets tag N/S bit (bit 30) to requested value.
UInt_t northSouthShift = (tag << 30) & LCDTkID::northSouthOn;
UInt_t northSouth = (LCDTkID::northSouthOff & m_tag) | northSouthShift;
m_tag = northSouth;
}
//____________________________________________________________
//____________________________________________________________
UInt_t LCDTkID::GetBarrelEndcap() const {
// barrelEndcap in bit 31. BarrelEndcap extracts that bit
// and shifts to least-significant end.
return (LCDTkID::barrelEndcapOn & m_tag) >> 31;
}
//____________________________________________________________
//____________________________________________________________
void LCDTkID::SetBarrelEndcap(UInt_t tag) {
// SetBarrelEndcap sets barrelEndcap bit (bit 31) to requested
// value
UInt_t barrelEndcapShift = (tag << 31) & LCDTkID::barrelEndcapOn;
UInt_t barrelEndcap = (LCDTkID::barrelEndcapOff & m_tag)
| barrelEndcapShift;
m_tag = barrelEndcap;
}
//____________________________________________________________
//____________________________________________________________
void LCDTkID::SetSystem(UInt_t tag) {
// SetSystem sets tag system bits in appropriate place (bits 28-29)
UInt_t systemShift = (tag << 28) & LCDTkID::systemOn;
UInt_t system = (LCDTkID::systemOff & m_tag)
| systemShift;
m_tag = system;
}
///____________________________________________________________
const Int_t LCDTkID::systemOn = 0x30000000;
const Int_t LCDTkID::systemOff = ~LCDTkID::systemOn;
const Int_t LCDTkID::barrelEndcapOn = 0x80000000;
const Int_t LCDTkID::barrelEndcapOff = ~LCDTkID::barrelEndcapOn;
const Int_t LCDTkID::northSouthOn = 0x40000000;
const Int_t LCDTkID::northSouthOff = ~LCDTkID::northSouthOn;
const Int_t LCDTkID::layerOn = 0x000000FF;
const Int_t LCDTkID::layerOff = ~LCDTkID::layerOn;
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.