Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

LCDtowerIDNonProj Class Reference

#include <LCDtowerIDNonProj.hh>

Collaboration diagram for LCDtowerIDNonProj:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LCDtowerIDNonProj ()
 LCDtowerIDNonProj (int tag)
 ~LCDtowerIDNonProj ()
int GetTag () const
void SetTag (int tagVal)
int GetTheta () const
 ________________________________________________________________________________________________________________________________________________

void SetTheta (int thetaVal)
 _______________________________________________________________________

int GetPhi () const
 ________________________________________________________________________________________________________________________________________________

void SetPhi (int phiVal)
 _______________________________________________________________________________________________________________________________________________

int GetLayer () const
 ________________________________________________________________________

void SetLayer (int layerVal)
 ________________________________________________________________________________________________________________________________________________

int GetSystem () const
 ________________________________________________________________________________________________________________________________________________

void SetSystem (int systemVal)
 ________________________________________________________________________________________________________________________________________________

int GetBarrelEndcap () const
 ________________________________________________________________________________________________________________________________________________

void SetBarrelEndcap (int barrelEndcapVal)
 ________________________________________________________________________________________________________________________________________________

LCDtowerIDNonProjoperator= (const LCDtowerIDNonProj &p)
LCDtowerIDNonProjoperator= (const int &itag)

Private Attributes

int m_tag

Constructor & Destructor Documentation

LCDtowerIDNonProj::LCDtowerIDNonProj  )  [inline]
 

Definition at line 17 of file LCDtowerIDNonProj.hh.

References m_tag.

00017 : m_tag(0)   {}

LCDtowerIDNonProj::LCDtowerIDNonProj int  tag  )  [inline]
 

Definition at line 19 of file LCDtowerIDNonProj.hh.

References m_tag.

00019 : m_tag(tag) {}

LCDtowerIDNonProj::~LCDtowerIDNonProj  )  [inline]
 

Definition at line 20 of file LCDtowerIDNonProj.hh.

00020 {}


Member Function Documentation

int LCDtowerIDNonProj::GetBarrelEndcap  )  const
 

________________________________________________________________________________________________________________________________________________

Definition at line 115 of file LCDtowerIDNonProj.cc.

References CAL_F_SYSTEM, and m_tag.

00115                                              {
00116   return ((m_tag >> CAL_F_SYSTEM) & 1);
00117 }

int LCDtowerIDNonProj::GetLayer  )  const
 

________________________________________________________________________

Definition at line 88 of file LCDtowerIDNonProj.cc.

References CAL_F_LAYER, CAL_M_LAYER, and m_tag.

00088                                       {
00089   return ((m_tag >> CAL_F_LAYER) & CAL_M_LAYER);
00090 }

int LCDtowerIDNonProj::GetPhi  )  const
 

________________________________________________________________________________________________________________________________________________

Definition at line 82 of file LCDtowerIDNonProj.cc.

References CAL_F_PHI, CAL_M_PHI, and m_tag.

00082                                     {
00083   return ((m_tag >> CAL_F_PHI) & CAL_M_PHI);
00084 }

int LCDtowerIDNonProj::GetSystem  )  const
 

________________________________________________________________________________________________________________________________________________

Definition at line 102 of file LCDtowerIDNonProj.cc.

References CAL_F_SYSTEM, CAL_M_SYSTEM, and m_tag.

00102                                        {
00103   return ((m_tag >> CAL_F_SYSTEM) & CAL_M_SYSTEM);
00104 }

int LCDtowerIDNonProj::GetTag  )  const [inline]
 

Definition at line 22 of file LCDtowerIDNonProj.hh.

References m_tag.

00022 { return m_tag  ; }

int LCDtowerIDNonProj::GetTheta  )  const
 

________________________________________________________________________________________________________________________________________________

Definition at line 65 of file LCDtowerIDNonProj.cc.

References CAL_F_THETA, CAL_M_THETA, and m_tag.

00065                                       {
00066   // This is easier to understand if one understands SetTheta() first
00067   static const int thetaMin = ~(CAL_M_THETA>>1);
00068   int nonNegative = (m_tag >> CAL_F_THETA) & CAL_M_THETA;
00069   return nonNegative + thetaMin;
00070 }

LCDtowerIDNonProj & LCDtowerIDNonProj::operator= const int &  itag  )  [inline]
 

Definition at line 59 of file LCDtowerIDNonProj.hh.

References m_tag.

00059                                                                       {
00060   m_tag = itag;
00061   return *this;
00062 }

LCDtowerIDNonProj & LCDtowerIDNonProj::operator= const LCDtowerIDNonProj p  )  [inline]
 

Definition at line 54 of file LCDtowerIDNonProj.hh.

References m_tag.

00054                                                                                  {
00055   m_tag = p.m_tag;
00056   return *this;
00057 }

void LCDtowerIDNonProj::SetBarrelEndcap int  barrelEndcapVal  ) 
 

________________________________________________________________________________________________________________________________________________

Definition at line 121 of file LCDtowerIDNonProj.cc.

References CAL_F_SYSTEM, CAL_M_SYSTEM, and m_tag.

00121                                                {
00122   m_tag &= ~(CAL_M_SYSTEM << CAL_F_SYSTEM);
00123   m_tag |= tag << CAL_F_SYSTEM;
00124 }

void LCDtowerIDNonProj::SetLayer int  layerVal  ) 
 

________________________________________________________________________________________________________________________________________________

Definition at line 94 of file LCDtowerIDNonProj.cc.

References CAL_F_LAYER, CAL_M_LAYER, and m_tag.

00094                                         {
00095   assert((tag & ~CAL_M_LAYER) == 0);
00096   m_tag &= ~(CAL_M_LAYER << CAL_F_LAYER);
00097   m_tag |= tag << CAL_F_LAYER;
00098 }

void LCDtowerIDNonProj::SetPhi int  phiVal  ) 
 

_______________________________________________________________________________________________________________________________________________

Definition at line 74 of file LCDtowerIDNonProj.cc.

References CAL_F_PHI, CAL_M_PHI, and m_tag.

00074                                       {
00075   assert((tag & ~CAL_M_PHI) == 0);
00076   m_tag &= ~(CAL_M_PHI << CAL_F_PHI);
00077   m_tag |= tag << CAL_F_PHI;
00078 }

void LCDtowerIDNonProj::SetSystem int  systemVal  ) 
 

________________________________________________________________________________________________________________________________________________

Definition at line 108 of file LCDtowerIDNonProj.cc.

References CAL_F_SYSTEM, CAL_M_SYSTEM, and m_tag.

00108                                          {
00109   m_tag &= ~(CAL_M_SYSTEM << CAL_F_SYSTEM);
00110   m_tag |= tag << CAL_F_SYSTEM;
00111 }

void LCDtowerIDNonProj::SetTag int  tagVal  )  [inline]
 

Definition at line 23 of file LCDtowerIDNonProj.hh.

References m_tag.

00023 { m_tag = tagVal; }

void LCDtowerIDNonProj::SetTheta int  thetaVal  ) 
 

_______________________________________________________________________

Definition at line 48 of file LCDtowerIDNonProj.cc.

References CAL_F_THETA, CAL_M_THETA, and m_tag.

00048                                         {
00049   // Theta may be negative:  for N bits -> (N-1) significant bits + 1 sign bit
00050   static const int max = (CAL_M_THETA>>1);
00051   static const int min = ~max;
00052   int nonNegative = tag - min;
00053 
00054   // make sure it is in right range
00055   assert( nonNegative >= 0 );
00056   assert( nonNegative <= max-min );
00057 
00058   // store it
00059   m_tag &= ~(CAL_M_THETA << CAL_F_THETA);
00060   m_tag |= nonNegative << CAL_F_THETA;
00061 }


Member Data Documentation

int LCDtowerIDNonProj::m_tag [private]
 

Definition at line 51 of file LCDtowerIDNonProj.hh.

Referenced by GetBarrelEndcap(), GetLayer(), GetPhi(), GetSystem(), GetTag(), GetTheta(), LCDtowerIDNonProj(), operator=(), SetBarrelEndcap(), SetLayer(), SetPhi(), SetSystem(), SetTag(), and SetTheta().


The documentation for this class was generated from the following files:
Generated on Thu Oct 7 18:45:07 2004 for LCDG4 by doxygen 1.3.4