CMS 3D CMS Logo

L1RCTRegion Class Reference

#include <L1Trigger/RegionalCaloTrigger/interface/L1RCTRegion.h>

List of all members.

Public Member Functions

unsigned short getActivityBit (int i, int j)
unsigned short getEtIn7Bits (int i, int j)
unsigned short getEtIn9Bits (int i, int j)
unsigned short getHE_FGBit (int i, int j)
unsigned short getMuonBit (int i, int j)
std::vector< unsigned short > giveEastEt ()
std::vector< unsigned short > giveEastHE_FG ()
unsigned short giveNEEt ()
unsigned short giveNEHE_FG ()
std::vector< unsigned short > giveNorthEt ()
std::vector< unsigned short > giveNorthHE_FG ()
unsigned short giveNWEt ()
unsigned short giveNWHE_FG ()
unsigned short giveSEEt ()
unsigned short giveSEHE_FG ()
std::vector< unsigned short > giveSouthEt ()
std::vector< unsigned short > giveSouthHE_FG ()
unsigned short giveSWEt ()
unsigned short giveSWHE_FG ()
std::vector< unsigned short > giveWestEt ()
std::vector< unsigned short > giveWestHE_FG ()
 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)

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.

00011                          : totalRegionEt(36),
00012                              totalRegionHE_FG(36),
00013                              etIn9Bits(16),
00014                              muonBit(16),
00015                              activityBit(16)
00016 {
00017 }


Member Function Documentation

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

Definition at line 78 of file L1RCTRegion.cc.

References activityBit.

Referenced by L1RCTReceiverCard::calcTauBit().

00078                                                       {
00079   return activityBit.at(4*i+j);
00080 }

unsigned short L1RCTRegion::getEtIn7Bits ( int  i,
int  j 
)

Definition at line 29 of file L1RCTRegion.cc.

References totalRegionEt.

Referenced by L1RCTElectronIsolationCard::calcElectronCandidates(), giveEastEt(), giveNEEt(), giveNorthEt(), giveNWEt(), giveSEEt(), giveSouthEt(), giveSWEt(), giveWestEt(), and print().

00029                                                     {
00030   //i & j run 0-3
00031   return totalRegionEt.at(6*(i+1) + j+1);
00032 }

unsigned short L1RCTRegion::getEtIn9Bits ( int  i,
int  j 
)

Definition at line 55 of file L1RCTRegion.cc.

References etIn9Bits.

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

00055                                                     {
00056   return etIn9Bits.at(4*i + j);
00057 }

unsigned short L1RCTRegion::getHE_FGBit ( int  i,
int  j 
)

Definition at line 43 of file L1RCTRegion.cc.

References totalRegionHE_FG.

Referenced by L1RCTElectronIsolationCard::calcElectronCandidates(), giveEastHE_FG(), giveNEHE_FG(), giveNorthHE_FG(), giveNWHE_FG(), giveSEHE_FG(), giveSouthHE_FG(), giveSWHE_FG(), giveWestHE_FG(), and print().

00043                                                    {
00044   return totalRegionHE_FG.at(6*(i+1)+j+1);
00045 }

unsigned short L1RCTRegion::getMuonBit ( int  i,
int  j 
)

Definition at line 66 of file L1RCTRegion.cc.

References muonBit.

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

00066                                                   {
00067   return muonBit.at(4*i+j);
00068 }

vector< unsigned short > L1RCTRegion::giveEastEt (  ) 

Definition at line 158 of file L1RCTRegion.cc.

References getEtIn7Bits(), and i.

Referenced by L1RCT::shareNeighbors().

00158                                               {
00159   vector<unsigned short> east(4);
00160   for(int i = 0; i<4; i++)
00161     east.at(i) = getEtIn7Bits(i,0);
00162   return east;
00163 }

vector< unsigned short > L1RCTRegion::giveEastHE_FG (  ) 

Definition at line 169 of file L1RCTRegion.cc.

References getHE_FGBit(), and i.

Referenced by L1RCT::shareNeighbors().

00169                                                  {
00170   vector<unsigned short> east(4);
00171   for(int i = 0; i<4; i++)
00172     east.at(i) = getHE_FGBit(i,0);
00173   return east;
00174 }

unsigned short L1RCTRegion::giveNEEt (  ) 

Definition at line 180 of file L1RCTRegion.cc.

References getEtIn7Bits().

Referenced by L1RCT::shareNeighbors().

00180                                     {
00181   unsigned short et = getEtIn7Bits(3,0);
00182   if(et > 7)
00183     return 7;
00184   else
00185     return et;
00186 }

unsigned short L1RCTRegion::giveNEHE_FG (  ) 

Definition at line 187 of file L1RCTRegion.cc.

References getHE_FGBit().

Referenced by L1RCT::shareNeighbors().

00187                                        {
00188   return getHE_FGBit(3,0);
00189 }

vector< unsigned short > L1RCTRegion::giveNorthEt (  ) 

Definition at line 93 of file L1RCTRegion.cc.

References getEtIn7Bits(), and i.

Referenced by L1RCT::shareNeighbors().

00093                                                {
00094   vector<unsigned short> north(4);
00095   for(int i = 0; i<4;i++)
00096     north.at(i) = getEtIn7Bits(3,i);
00097   return north;
00098 }

vector< unsigned short > L1RCTRegion::giveNorthHE_FG (  ) 

Definition at line 103 of file L1RCTRegion.cc.

References getHE_FGBit(), and i.

Referenced by L1RCT::shareNeighbors().

00103                                                   {
00104   vector<unsigned short> north(4);
00105   for(int i = 0; i<4; i++)
00106     north.at(i) = getHE_FGBit(3,i);
00107   return north;
00108 }

unsigned short L1RCTRegion::giveNWEt (  ) 

Definition at line 197 of file L1RCTRegion.cc.

References getEtIn7Bits().

Referenced by L1RCT::shareNeighbors().

00197                                     {
00198   unsigned short et = getEtIn7Bits(3,3);
00199   if(et > 7)
00200     return 7;
00201   else 
00202     return et;
00203 }

unsigned short L1RCTRegion::giveNWHE_FG (  ) 

Definition at line 204 of file L1RCTRegion.cc.

References getHE_FGBit().

Referenced by L1RCT::shareNeighbors().

00204                                        {
00205   return getHE_FGBit(3,3);
00206 }

unsigned short L1RCTRegion::giveSEEt (  ) 

Definition at line 231 of file L1RCTRegion.cc.

References getEtIn7Bits().

Referenced by L1RCT::shareNeighbors().

00231                                     {
00232   unsigned short et = getEtIn7Bits(0,0);
00233   if(et > 7)
00234     return 7;
00235   else
00236     return et;
00237 }

unsigned short L1RCTRegion::giveSEHE_FG (  ) 

Definition at line 238 of file L1RCTRegion.cc.

References getHE_FGBit().

Referenced by L1RCT::shareNeighbors().

00238                                        {
00239   return getHE_FGBit(0,0);
00240 }

vector< unsigned short > L1RCTRegion::giveSouthEt (  ) 

Definition at line 114 of file L1RCTRegion.cc.

References getEtIn7Bits(), and i.

Referenced by L1RCT::shareNeighbors().

00114                                                {
00115   vector<unsigned short> south(4);
00116   for(int i = 0; i<4; i++)
00117     south.at(i) = getEtIn7Bits(0,i);
00118   return south;
00119 }

vector< unsigned short > L1RCTRegion::giveSouthHE_FG (  ) 

Definition at line 125 of file L1RCTRegion.cc.

References getHE_FGBit(), and i.

Referenced by L1RCT::shareNeighbors().

00125                                                   {
00126   vector<unsigned short> south(4);
00127   for(int i = 0; i<4; i++)
00128     south.at(i) = getHE_FGBit(0,i);
00129   return south;
00130 }

unsigned short L1RCTRegion::giveSWEt (  ) 

Definition at line 214 of file L1RCTRegion.cc.

References getEtIn7Bits().

Referenced by L1RCT::shareNeighbors().

00214                                     {
00215   unsigned short et = getEtIn7Bits(0,3);
00216   if(et > 7)
00217     return 7;
00218   else
00219     return et;
00220 }

unsigned short L1RCTRegion::giveSWHE_FG (  ) 

Definition at line 221 of file L1RCTRegion.cc.

References getHE_FGBit().

Referenced by L1RCT::shareNeighbors().

00221                                        {
00222   return getHE_FGBit(0,3);
00223 }

vector< unsigned short > L1RCTRegion::giveWestEt (  ) 

Definition at line 136 of file L1RCTRegion.cc.

References getEtIn7Bits(), and i.

Referenced by L1RCT::shareNeighbors().

00136                                               {
00137   vector<unsigned short> west(4);
00138   for(int i =0; i<4; i++)
00139     west.at(i) = getEtIn7Bits(i,3);
00140   return west;
00141 }

vector< unsigned short > L1RCTRegion::giveWestHE_FG (  ) 

Definition at line 147 of file L1RCTRegion.cc.

References getHE_FGBit(), and i.

Referenced by L1RCT::shareNeighbors().

00147                                                  {
00148   vector<unsigned short> west(4);
00149   for(int i = 0; i<4; i++)
00150     west.at(i) = getHE_FGBit(i,3);
00151   return west;
00152 }

void L1RCTRegion::print ( void   ) 

Definition at line 248 of file L1RCTRegion.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), getEtIn7Bits(), getEtIn9Bits(), getHE_FGBit(), getMuonBit(), i, and j.

00248                         {
00249   
00250   cout << " 7 Bit Energies ";
00251   for(int i = 0; i<4; i++){
00252     cout << endl;
00253     for(int j = 0; j<4; j++){
00254       cout << " " << getEtIn7Bits(i,j) << " ";
00255     }
00256   }
00257 
00258   cout << endl << endl;
00259   cout << " 9 Bit Energies ";
00260   for(int i = 0; i<4; i++){
00261     cout << endl;
00262     for(int j = 0; j<4; j++){
00263       cout << " " << getEtIn9Bits(i,j) << " ";
00264     }
00265   }
00266   
00267   cout << endl << endl;
00268   cout << " HE || FG bit ";
00269   for(int i = 0; i<4; i++){
00270     cout << endl;
00271     for(int j = 0; j<4; j++){
00272       cout << " " << getHE_FGBit(i,j) << " ";
00273     }
00274   }
00275 
00276   cout << endl << endl;
00277   cout << " Muon Bit ";
00278   for(int i = 0; i<4; i++){
00279     cout << endl;
00280     for(int j = 0; j<4; j++){
00281       cout << " " << getMuonBit(i,j) << " ";
00282     }
00283   }
00284   cout << endl;
00285 }

void L1RCTRegion::printEdges (  ) 

Definition at line 287 of file L1RCTRegion.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), i, and totalRegionEt.

00287                             {
00288   cout << "North" << endl;
00289   for(int i=0; i<4;i++)
00290     cout << totalRegionEt.at(i+1) << endl;
00291   
00292   cout << "West" << endl;
00293   for(int i=0; i<4;i++)
00294     cout << totalRegionEt.at(6*(i+1)) << endl;
00295 
00296   cout << "East" << endl;
00297   for(int i=0; i<4;i++)
00298     cout << totalRegionEt.at(6*(i+1)+5) << endl;
00299   
00300   cout << "South" << endl;
00301   for(int i=0; i<4;i++)
00302     cout << totalRegionEt.at(31+i) << endl;
00303  
00304   cout << "NE " << totalRegionEt.at(5) << endl;
00305   cout << "SE " << totalRegionEt.at(35) << endl;
00306   cout << "NW " << totalRegionEt.at(0) << endl;
00307   cout << "SW " << totalRegionEt.at(30) << endl;
00308 }

void L1RCTRegion::setActivityBit ( int  i,
int  j,
unsigned short  activity 
)

Definition at line 74 of file L1RCTRegion.cc.

References activityBit.

00074                                                                      {
00075   activityBit.at(4*i+j) = activity;
00076 }

void L1RCTRegion::setEastEt ( std::vector< unsigned short >  east  ) 

void L1RCTRegion::setEastHE_FG ( std::vector< unsigned short >  east  ) 

void L1RCTRegion::setEtIn7Bits ( int  i,
int  j,
unsigned short  energy 
)

Definition at line 34 of file L1RCTRegion.cc.

References totalRegionEt.

00034                                                                 {
00035   //i & j should be 0-3
00036   if(energy <= 127)
00037     totalRegionEt.at(6*(i+1) + j+1) = energy;
00038   else
00039     totalRegionEt.at(6*(i+1) + j+1) = 127;
00040 }

void L1RCTRegion::setEtIn9Bits ( int  i,
int  j,
unsigned short  energy 
)

Definition at line 59 of file L1RCTRegion.cc.

References etIn9Bits.

00059                                                                 {
00060   if(energy <=511)
00061     etIn9Bits.at(4*i+j) = energy;
00062   else 
00063     etIn9Bits.at(4*i+j) = 511;
00064 }

void L1RCTRegion::setHE_FGBit ( int  i,
int  j,
unsigned short  HE_FG 
)

Definition at line 47 of file L1RCTRegion.cc.

References totalRegionHE_FG.

00047                                                                {
00048   totalRegionHE_FG.at(6*(i+1)+j+1) = HE_FG;
00049 }

void L1RCTRegion::setMuonBit ( int  i,
int  j,
unsigned short  muon 
)

Definition at line 70 of file L1RCTRegion.cc.

References muonBit.

00070                                                             {
00071   muonBit.at(4*i+j) = muon;
00072 }

void L1RCTRegion::setNEEt ( unsigned short  ne  ) 

Definition at line 190 of file L1RCTRegion.cc.

References totalRegionEt.

00190                                           {
00191   totalRegionEt.at(5) = ne;
00192 }

void L1RCTRegion::setNEHE_FG ( unsigned short  ne  ) 

Definition at line 193 of file L1RCTRegion.cc.

References totalRegionHE_FG.

00193                                              {
00194   totalRegionHE_FG.at(5) = ne;
00195 }

void L1RCTRegion::setNorthEt ( std::vector< unsigned short >  north  ) 

Referenced by L1RCT::shareNeighbors().

void L1RCTRegion::setNorthHE_FG ( std::vector< unsigned short >  north  ) 

void L1RCTRegion::setNWEt ( unsigned short  nw  ) 

Definition at line 207 of file L1RCTRegion.cc.

References totalRegionEt.

00207                                           {
00208   totalRegionEt.at(0) = nw;
00209 }

void L1RCTRegion::setNWHE_FG ( unsigned short  nw  ) 

Definition at line 210 of file L1RCTRegion.cc.

References totalRegionHE_FG.

00210                                              {
00211   totalRegionHE_FG.at(0) = nw;
00212 }

void L1RCTRegion::setSEEt ( unsigned short  se  ) 

Definition at line 241 of file L1RCTRegion.cc.

References totalRegionEt.

00241                                           {
00242   totalRegionEt.at(35) = se;
00243 }

void L1RCTRegion::setSEHE_FG ( unsigned short  se  ) 

Definition at line 244 of file L1RCTRegion.cc.

References totalRegionHE_FG.

00244                                              {
00245   totalRegionHE_FG.at(35) = se;
00246 }

void L1RCTRegion::setSouthEt ( std::vector< unsigned short >  south  ) 

void L1RCTRegion::setSouthHE_FG ( std::vector< unsigned short >  south  ) 

void L1RCTRegion::setSWEt ( unsigned short  sw  ) 

Definition at line 224 of file L1RCTRegion.cc.

References totalRegionEt.

00224                                           {
00225   totalRegionEt.at(30) = sw;
00226 }

void L1RCTRegion::setSWHE_FG ( unsigned short  sw  ) 

Definition at line 227 of file L1RCTRegion.cc.

References totalRegionHE_FG.

00227                                              {
00228   totalRegionHE_FG.at(30) = sw;
00229 }

void L1RCTRegion::setWestEt ( std::vector< unsigned short >  west  ) 

void L1RCTRegion::setWestHE_FG ( std::vector< unsigned short >  west  ) 


Member Data Documentation

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

Definition at line 73 of file L1RCTRegion.h.

Referenced by getActivityBit(), and setActivityBit().

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

Definition at line 70 of file L1RCTRegion.h.

Referenced by getEtIn9Bits(), and setEtIn9Bits().

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

Definition at line 72 of file L1RCTRegion.h.

Referenced by getMuonBit(), and setMuonBit().

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

Definition at line 67 of file L1RCTRegion.h.

Referenced by getEtIn7Bits(), printEdges(), setEtIn7Bits(), setNEEt(), setNWEt(), setSEEt(), and setSWEt().

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

Definition at line 68 of file L1RCTRegion.h.

Referenced by getHE_FGBit(), setHE_FGBit(), setNEHE_FG(), setNWHE_FG(), setSEHE_FG(), and setSWHE_FG().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:58 2009 for CMSSW by  doxygen 1.5.4