// ----------------------------------------------------------------------------
// $Id: LCDtowerID.cxx,v 1.1 2001/05/10 17:25:16 toshi Exp $
// ----------------------------------------------------------------------------
//
// $Log: LCDtowerID.cxx,v $
// Revision 1.1 2001/05/10 17:25:16 toshi
// Rename *.C to *.cxx.
//
// Revision 1.2 2001/04/28 23:49:58 toshi
// Start to use CVS.
//
//
// access and set functions for binary calorimeter tags
// Version 1.0 21 Oct 1998 Richard creation
//
///////////////////////////////////////////////////////////////////////////
//
// LCDtowerID
//
// The towerID class contains a tower ID number (encoding of detector
// element position) as well as functions to obtain the location of
// tower in question. TowerID is used in the CalHit class.
//
///////////////////////////////////////////////////////////////////////////
#include <assert.h>
#include "LCDtowerID.h"
ClassImp(LCDtowerID)
///________________________________________________________________________
UInt_t LCDtowerID::GetTheta() const {
return (m_tag >> CAL_V_THETA) & CAL_M_THETA;
}
///_______________________________________________________________________
///_______________________________________________________________________
void LCDtowerID::SetTheta(UInt_t tag) {
assert((tag & ~CAL_M_THETA) == 0);
m_tag &= ~(CAL_M_THETA << CAL_V_THETA);
m_tag |= tag << CAL_V_THETA;
}
///________________________________________________________________________
///________________________________________________________________________
UInt_t LCDtowerID::GetPhi() const {
return ((m_tag >> CAL_V_PHI) & CAL_M_PHI);
}
///________________________________________________________________________
///________________________________________________________________________
void LCDtowerID::SetPhi(UInt_t tag) {
assert((tag & ~CAL_M_PHI) == 0);
m_tag &= ~(CAL_M_PHI << CAL_V_PHI);
m_tag |= tag << CAL_V_PHI;
}
///________________________________________________________________________
///________________________________________________________________________
UInt_t LCDtowerID::GetLayer() const {
return ((m_tag >> CAL_V_LAYER) & CAL_M_LAYER);
}
///________________________________________________________________________
///________________________________________________________________________
void LCDtowerID::SetLayer(UInt_t tag) {
assert((tag & ~CAL_M_LAYER) == 0);
m_tag &= ~(CAL_M_LAYER << CAL_V_LAYER);
m_tag |= tag << CAL_V_LAYER;
}
///________________________________________________________________________
///________________________________________________________________________
UInt_t LCDtowerID::GetSystem() const {
return ((m_tag >> CAL_V_SYSTEM) & CAL_M_SYSTEM);
}
///________________________________________________________________________
///________________________________________________________________________
void LCDtowerID::SetSystem(UInt_t tag) {
m_tag &= ~(CAL_M_SYSTEM << CAL_V_SYSTEM);
m_tag |= tag << CAL_V_SYSTEM;
}
///________________________________________________________________________
///________________________________________________________________________
UInt_t LCDtowerID::GetBarrelEndcap() const {
return ((m_tag >> CAL_V_SYSTEM) & 1);
}
///________________________________________________________________________
///________________________________________________________________________
void LCDtowerID::SetBarrelEndcap(UInt_t tag) {
m_tag &= ~(CAL_M_SYSTEM << CAL_V_SYSTEM);
m_tag |= tag << CAL_V_SYSTEM;
}
///________________________________________________________________________
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.