CMS 3D CMS Logo

Public Member Functions | Private Attributes

L1RCTRegion Class Reference

#include <L1RCTRegion.h>

List of all members.

Public Member Functions

unsigned short getActivityBit (int i, int j) const
unsigned short getEtIn7Bits (int i, int j) const
unsigned short getEtIn9Bits (int i, int j) const
unsigned short getHE_FGBit (int i, int j) const
unsigned short getMuonBit (int i, int j) const
std::vector< unsigned short > giveEastEt () const
std::vector< unsigned short > giveEastHE_FG () const
unsigned short giveNEEt () const
unsigned short giveNEHE_FG () const
std::vector< unsigned short > giveNorthEt () const
std::vector< unsigned short > giveNorthHE_FG () const
unsigned short giveNWEt () const
unsigned short giveNWHE_FG () const
unsigned short giveSEEt () const
unsigned short giveSEHE_FG () const
std::vector< unsigned short > giveSouthEt () const
std::vector< unsigned short > giveSouthHE_FG () const
unsigned short giveSWEt () const
unsigned short giveSWHE_FG () const
std::vector< unsigned short > giveWestEt () const
std::vector< unsigned short > giveWestHE_FG () const
 L1RCTRegion ()
void print ()
void printEdges ()
void setActivityBit (int i, int j, unsigned short activity)
void setEastEt (std::vector< unsigned short > east)
void setEastHE_FG (std::vector< unsigned short > east)
void setEtIn7Bits (int i, int j, unsigned short energy)
void setEtIn9Bits (int i, int j, unsigned short energy)
void setHE_FGBit (int i, int j, unsigned short HE_FG)
void setMuonBit (int i, int j, unsigned short muon)
void setNEEt (unsigned short ne)
void setNEHE_FG (unsigned short ne)
void setNorthEt (std::vector< unsigned short > north)
void setNorthHE_FG (std::vector< unsigned short > north)
void setNWEt (unsigned short nw)
void setNWHE_FG (unsigned short nw)
void setSEEt (unsigned short se)
void setSEHE_FG (unsigned short se)
void setSouthEt (std::vector< unsigned short > south)
void setSouthHE_FG (std::vector< unsigned short > south)
void setSWEt (unsigned short sw)
void setSWHE_FG (unsigned short sw)
void setWestEt (std::vector< unsigned short > west)
void setWestHE_FG (std::vector< unsigned short > west)
 ~L1RCTRegion ()

Private Attributes

std::vector< unsigned short > activityBit
std::vector< unsigned short > etIn9Bits
std::vector< unsigned short > muonBit
std::vector< unsigned short > totalRegionEt
std::vector< unsigned short > totalRegionHE_FG

Detailed Description

Definition at line 6 of file L1RCTRegion.h.


Constructor & Destructor Documentation

L1RCTRegion::L1RCTRegion ( )

Definition at line 11 of file L1RCTRegion.cc.

L1RCTRegion::~L1RCTRegion ( )

Definition at line 20 of file L1RCTRegion.cc.

{}

Member Function Documentation

unsigned short L1RCTRegion::getActivityBit ( int  i,
int  j 
) const

Definition at line 82 of file L1RCTRegion.cc.

References activityBit.

Referenced by L1RCTReceiverCard::calcTauBit().

                                                            {
  return activityBit.at(4*i+j);
}
unsigned short L1RCTRegion::getEtIn7Bits ( int  i,
int  j 
) const
unsigned short L1RCTRegion::getEtIn9Bits ( int  i,
int  j 
) const

Definition at line 59 of file L1RCTRegion.cc.

References etIn9Bits.

Referenced by L1RCTReceiverCard::calcRegionSum(), and print().

                                                          {
  return etIn9Bits.at(4*i + j);
}
unsigned short L1RCTRegion::getHE_FGBit ( int  i,
int  j 
) const
unsigned short L1RCTRegion::getMuonBit ( int  i,
int  j 
) const

Definition at line 70 of file L1RCTRegion.cc.

References muonBit.

Referenced by L1RCTReceiverCard::calcMuonBit(), and print().

                                                        {
  return muonBit.at(4*i+j);
}
vector< unsigned short > L1RCTRegion::giveEastEt ( ) const

Definition at line 162 of file L1RCTRegion.cc.

References getEtIn7Bits(), and i.

Referenced by L1RCT::shareNeighbors().

                                                    {
  std::vector<unsigned short> east(4);
  for(int i = 0; i<4; i++)
    east.at(i) = getEtIn7Bits(i,0);
  return east;
}
vector< unsigned short > L1RCTRegion::giveEastHE_FG ( ) const

Definition at line 173 of file L1RCTRegion.cc.

References getHE_FGBit(), and i.

Referenced by L1RCT::shareNeighbors().

                                                       {
  std::vector<unsigned short> east(4);
  for(int i = 0; i<4; i++)
    east.at(i) = getHE_FGBit(i,0);
  return east;
}
unsigned short L1RCTRegion::giveNEEt ( ) const

Definition at line 184 of file L1RCTRegion.cc.

References ExpressReco_HICollisions_FallBack::et, and getEtIn7Bits().

Referenced by L1RCT::shareNeighbors().

                                          {
  unsigned short et = getEtIn7Bits(3,0);
  if(et > 7)
    return 7;
  else
    return et;
}
unsigned short L1RCTRegion::giveNEHE_FG ( ) const

Definition at line 191 of file L1RCTRegion.cc.

References getHE_FGBit().

Referenced by L1RCT::shareNeighbors().

                                             {
  return getHE_FGBit(3,0);
}
vector< unsigned short > L1RCTRegion::giveNorthEt ( ) const

Definition at line 97 of file L1RCTRegion.cc.

References getEtIn7Bits(), and i.

Referenced by L1RCT::shareNeighbors().

                                                     {
  std::vector<unsigned short> north(4);
  for(int i = 0; i<4;i++)
    north.at(i) = getEtIn7Bits(3,i);
  return north;
}
vector< unsigned short > L1RCTRegion::giveNorthHE_FG ( ) const

Definition at line 107 of file L1RCTRegion.cc.

References getHE_FGBit(), and i.

Referenced by L1RCT::shareNeighbors().

                                                        {
  std::vector<unsigned short> north(4);
  for(int i = 0; i<4; i++)
    north.at(i) = getHE_FGBit(3,i);
  return north;
}
unsigned short L1RCTRegion::giveNWEt ( ) const

Definition at line 201 of file L1RCTRegion.cc.

References ExpressReco_HICollisions_FallBack::et, and getEtIn7Bits().

Referenced by L1RCT::shareNeighbors().

                                          {
  unsigned short et = getEtIn7Bits(3,3);
  if(et > 7)
    return 7;
  else 
    return et;
}
unsigned short L1RCTRegion::giveNWHE_FG ( ) const

Definition at line 208 of file L1RCTRegion.cc.

References getHE_FGBit().

Referenced by L1RCT::shareNeighbors().

                                             {
  return getHE_FGBit(3,3);
}
unsigned short L1RCTRegion::giveSEEt ( ) const

Definition at line 235 of file L1RCTRegion.cc.

References ExpressReco_HICollisions_FallBack::et, and getEtIn7Bits().

Referenced by L1RCT::shareNeighbors().

                                          {
  unsigned short et = getEtIn7Bits(0,0);
  if(et > 7)
    return 7;
  else
    return et;
}
unsigned short L1RCTRegion::giveSEHE_FG ( ) const

Definition at line 242 of file L1RCTRegion.cc.

References getHE_FGBit().

Referenced by L1RCT::shareNeighbors().

                                             {
  return getHE_FGBit(0,0);
}
vector< unsigned short > L1RCTRegion::giveSouthEt ( ) const

Definition at line 118 of file L1RCTRegion.cc.

References getEtIn7Bits(), and i.

Referenced by L1RCT::shareNeighbors().

                                                     {
  std::vector<unsigned short> south(4);
  for(int i = 0; i<4; i++)
    south.at(i) = getEtIn7Bits(0,i);
  return south;
}
vector< unsigned short > L1RCTRegion::giveSouthHE_FG ( ) const

Definition at line 129 of file L1RCTRegion.cc.

References getHE_FGBit(), and i.

Referenced by L1RCT::shareNeighbors().

                                                        {
  std::vector<unsigned short> south(4);
  for(int i = 0; i<4; i++)
    south.at(i) = getHE_FGBit(0,i);
  return south;
}
unsigned short L1RCTRegion::giveSWEt ( ) const

Definition at line 218 of file L1RCTRegion.cc.

References ExpressReco_HICollisions_FallBack::et, and getEtIn7Bits().

Referenced by L1RCT::shareNeighbors().

                                          {
  unsigned short et = getEtIn7Bits(0,3);
  if(et > 7)
    return 7;
  else
    return et;
}
unsigned short L1RCTRegion::giveSWHE_FG ( ) const

Definition at line 225 of file L1RCTRegion.cc.

References getHE_FGBit().

Referenced by L1RCT::shareNeighbors().

                                             {
  return getHE_FGBit(0,3);
}
vector< unsigned short > L1RCTRegion::giveWestEt ( ) const

Definition at line 140 of file L1RCTRegion.cc.

References getEtIn7Bits(), and i.

Referenced by L1RCT::shareNeighbors().

                                                    {
  std::vector<unsigned short> west(4);
  for(int i =0; i<4; i++)
    west.at(i) = getEtIn7Bits(i,3);
  return west;
}
vector< unsigned short > L1RCTRegion::giveWestHE_FG ( ) const

Definition at line 151 of file L1RCTRegion.cc.

References getHE_FGBit(), and i.

Referenced by L1RCT::shareNeighbors().

                                                       {
  std::vector<unsigned short> west(4);
  for(int i = 0; i<4; i++)
    west.at(i) = getHE_FGBit(i,3);
  return west;
}
void L1RCTRegion::print ( void  )

Definition at line 252 of file L1RCTRegion.cc.

References gather_cfg::cout, getEtIn7Bits(), getEtIn9Bits(), getHE_FGBit(), getMuonBit(), i, and j.

                        {
  
  std::cout << " 7 Bit Energies ";
  for(int i = 0; i<4; i++){
    std::cout << std::endl;
    for(int j = 0; j<4; j++){
      std::cout << " " << getEtIn7Bits(i,j) << " ";
    }
  }

  std::cout << std::endl << std::endl;
  std::cout << " 9 Bit Energies ";
  for(int i = 0; i<4; i++){
    std::cout << std::endl;
    for(int j = 0; j<4; j++){
      std::cout << " " << getEtIn9Bits(i,j) << " ";
    }
  }
  
  std::cout << std::endl << std::endl;
  std::cout << " HE || FG bit ";
  for(int i = 0; i<4; i++){
    std::cout << std::endl;
    for(int j = 0; j<4; j++){
      std::cout << " " << getHE_FGBit(i,j) << " ";
    }
  }

  std::cout << std::endl << std::endl;
  std::cout << " Muon Bit ";
  for(int i = 0; i<4; i++){
    std::cout << std::endl;
    for(int j = 0; j<4; j++){
      std::cout << " " << getMuonBit(i,j) << " ";
    }
  }
  std::cout << std::endl;
}
void L1RCTRegion::printEdges ( )

Definition at line 291 of file L1RCTRegion.cc.

References gather_cfg::cout, i, and totalRegionEt.

                            {
  std::cout << "North" << std::endl;
  for(int i=0; i<4;i++)
    std::cout << totalRegionEt.at(i+1) << std::endl;
  
  std::cout << "West" << std::endl;
  for(int i=0; i<4;i++)
    std::cout << totalRegionEt.at(6*(i+1)) << std::endl;

  std::cout << "East" << std::endl;
  for(int i=0; i<4;i++)
    std::cout << totalRegionEt.at(6*(i+1)+5) << std::endl;
  
  std::cout << "South" << std::endl;
  for(int i=0; i<4;i++)
    std::cout << totalRegionEt.at(31+i) << std::endl;
 
  std::cout << "NE " << totalRegionEt.at(5) << std::endl;
  std::cout << "SE " << totalRegionEt.at(35) << std::endl;
  std::cout << "NW " << totalRegionEt.at(0) << std::endl;
  std::cout << "SW " << totalRegionEt.at(30) << std::endl;
}
void L1RCTRegion::setActivityBit ( int  i,
int  j,
unsigned short  activity 
)

Definition at line 78 of file L1RCTRegion.cc.

References activityBit.

                                                                     {
  activityBit.at(4*i+j) = activity;
}
void L1RCTRegion::setEastEt ( std::vector< unsigned short >  east)

Definition at line 168 of file L1RCTRegion.cc.

References i, and totalRegionEt.

Referenced by L1RCT::shareNeighbors().

                                                         {
  for(int i = 0; i<4; i++)
    totalRegionEt.at(6*(i+1) + 5) = east.at(i);
}
void L1RCTRegion::setEastHE_FG ( std::vector< unsigned short >  east)

Definition at line 179 of file L1RCTRegion.cc.

References i, and totalRegionHE_FG.

Referenced by L1RCT::shareNeighbors().

                                                            {
  for(int i = 0; i<4; i++)
    totalRegionHE_FG.at(6*(i+1) + 5) = east.at(i);
}
void L1RCTRegion::setEtIn7Bits ( int  i,
int  j,
unsigned short  energy 
)

Definition at line 38 of file L1RCTRegion.cc.

References relval_parameters_module::energy, and totalRegionEt.

                                                                {
  //i & j should be 0-3
  if(energy <= 127)
    totalRegionEt.at(6*(i+1) + j+1) = energy;
  else
    totalRegionEt.at(6*(i+1) + j+1) = 127;
}
void L1RCTRegion::setEtIn9Bits ( int  i,
int  j,
unsigned short  energy 
)

Definition at line 63 of file L1RCTRegion.cc.

References relval_parameters_module::energy, and etIn9Bits.

                                                                {
  if(energy <=511)
    etIn9Bits.at(4*i+j) = energy;
  else 
    etIn9Bits.at(4*i+j) = 511;
}
void L1RCTRegion::setHE_FGBit ( int  i,
int  j,
unsigned short  HE_FG 
)

Definition at line 51 of file L1RCTRegion.cc.

References totalRegionHE_FG.

                                                               {
  totalRegionHE_FG.at(6*(i+1)+j+1) = HE_FG;
}
void L1RCTRegion::setMuonBit ( int  i,
int  j,
unsigned short  muon 
)

Definition at line 74 of file L1RCTRegion.cc.

References metsig::muon, and muonBit.

                                                             {
  muonBit.at(4*i+j) = muon;
}
void L1RCTRegion::setNEEt ( unsigned short  ne)
void L1RCTRegion::setNEHE_FG ( unsigned short  ne)
void L1RCTRegion::setNorthEt ( std::vector< unsigned short >  north)

Definition at line 103 of file L1RCTRegion.cc.

References i, and totalRegionEt.

Referenced by L1RCT::shareNeighbors().

                                                            {
  for(int i = 0; i<4; i++)
    totalRegionEt.at(i+1) = north.at(i);
}
void L1RCTRegion::setNorthHE_FG ( std::vector< unsigned short >  north)

Definition at line 113 of file L1RCTRegion.cc.

References i, and totalRegionHE_FG.

Referenced by L1RCT::shareNeighbors().

                                                              {
  for(int i = 0; i<4; i++)
    totalRegionHE_FG.at(i+1) = north.at(i);
}
void L1RCTRegion::setNWEt ( unsigned short  nw)

Definition at line 211 of file L1RCTRegion.cc.

References totalRegionEt.

Referenced by L1RCT::shareNeighbors().

                                          {
  totalRegionEt.at(0) = nw;
}
void L1RCTRegion::setNWHE_FG ( unsigned short  nw)

Definition at line 214 of file L1RCTRegion.cc.

References totalRegionHE_FG.

Referenced by L1RCT::shareNeighbors().

                                             {
  totalRegionHE_FG.at(0) = nw;
}
void L1RCTRegion::setSEEt ( unsigned short  se)

Definition at line 245 of file L1RCTRegion.cc.

References totalRegionEt.

Referenced by L1RCT::shareNeighbors().

                                           {
  totalRegionEt.at(35) = se;
}
void L1RCTRegion::setSEHE_FG ( unsigned short  se)

Definition at line 248 of file L1RCTRegion.cc.

References totalRegionHE_FG.

Referenced by L1RCT::shareNeighbors().

                                              {
  totalRegionHE_FG.at(35) = se;
}
void L1RCTRegion::setSouthEt ( std::vector< unsigned short >  south)

Definition at line 124 of file L1RCTRegion.cc.

References i, and totalRegionEt.

Referenced by L1RCT::shareNeighbors().

                                                           {
  for(int i = 0; i<4; i++)
    totalRegionEt.at(31+i) = south.at(i);
}
void L1RCTRegion::setSouthHE_FG ( std::vector< unsigned short >  south)

Definition at line 135 of file L1RCTRegion.cc.

References i, and totalRegionHE_FG.

Referenced by L1RCT::shareNeighbors().

                                                              {
  for(int i=0; i<4; i++)
    totalRegionHE_FG.at(31+i) = south.at(i);
}
void L1RCTRegion::setSWEt ( unsigned short  sw)

Definition at line 228 of file L1RCTRegion.cc.

References totalRegionEt.

Referenced by L1RCT::shareNeighbors().

                                          {
  totalRegionEt.at(30) = sw;
}
void L1RCTRegion::setSWHE_FG ( unsigned short  sw)

Definition at line 231 of file L1RCTRegion.cc.

References totalRegionHE_FG.

Referenced by L1RCT::shareNeighbors().

                                             {
  totalRegionHE_FG.at(30) = sw;
}
void L1RCTRegion::setWestEt ( std::vector< unsigned short >  west)

Definition at line 146 of file L1RCTRegion.cc.

References i, and totalRegionEt.

Referenced by L1RCT::shareNeighbors().

                                                         {
  for(int i = 0; i<4; i++)
    totalRegionEt.at(6*(i+1)) = west.at(i);
}
void L1RCTRegion::setWestHE_FG ( std::vector< unsigned short >  west)

Definition at line 157 of file L1RCTRegion.cc.

References i, and totalRegionHE_FG.

Referenced by L1RCT::shareNeighbors().

                                                            {
  for(int i = 0; i<4; i++)
    totalRegionHE_FG.at(6*(i+1)) = west.at(i);
}

Member Data Documentation

std::vector<unsigned short> L1RCTRegion::activityBit [private]

Definition at line 74 of file L1RCTRegion.h.

Referenced by getActivityBit(), and setActivityBit().

std::vector<unsigned short> L1RCTRegion::etIn9Bits [private]

Definition at line 71 of file L1RCTRegion.h.

Referenced by getEtIn9Bits(), and setEtIn9Bits().

std::vector<unsigned short> L1RCTRegion::muonBit [private]

Definition at line 73 of file L1RCTRegion.h.

Referenced by getMuonBit(), and setMuonBit().

std::vector<unsigned short> L1RCTRegion::totalRegionEt [private]
std::vector<unsigned short> L1RCTRegion::totalRegionHE_FG [private]