CMS 3D CMS Logo

L1RCTORCAMap Class Reference

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

List of all members.

Public Member Functions

unsigned short combine (unsigned short et, unsigned short fg)
std::vector< unsigned short > combVec (std::vector< unsigned short > et, std::vector< unsigned short > fg)
std::vector< std::vector
< std::vector< unsigned short > > > 
giveBarrel ()
std::vector< std::vector
< unsigned short > > 
giveHF ()
 L1RCTORCAMap ()
void makeBarrelData ()
void makeHFData ()
std::vector< intorcamap (int eta, int phi)
void readData (std::vector< unsigned > emet, std::vector< unsigned > hdet, std::vector< bool > emfg, std::vector< bool > hdfg, std::vector< unsigned > hfet)

Private Member Functions

std::vector< inthighEtaMap (int eta, int phi)
std::vector< intlowEtaMap (int eta, int phi)

Private Attributes

std::vector< std::vector
< std::vector< unsigned short > > > 
barrelData
std::vector< unsigned short > combEM
std::vector< unsigned short > combHD
std::vector< std::vector
< unsigned short > > 
hfData
std::vector< unsigned short > rawEMET
std::vector< unsigned short > rawEMFG
std::vector< unsigned short > rawHDET
std::vector< unsigned short > rawHDFG
std::vector< unsigned short > rawHFET


Detailed Description

Definition at line 6 of file L1RCTORCAMap.h.


Constructor & Destructor Documentation

L1RCTORCAMap::L1RCTORCAMap (  ) 

Definition at line 6 of file L1RCTORCAMap.cc.

References barrelData, combEM, combHD, hfData, rawEMET, rawEMFG, rawHDET, rawHDFG, and rawHFET.

00006                           {
00007   rawEMET = vector<unsigned short>(56*72);
00008   rawHDET = vector<unsigned short>(56*72);
00009   rawEMFG = vector<unsigned short>(56*72);
00010   rawHDFG = vector<unsigned short>(56*72);
00011   rawHFET = vector<unsigned short>(8*18);
00012   combEM = vector<unsigned short>(56*72);
00013   combHD = vector<unsigned short>(56*72);
00014 
00015   barrelData = vector<vector<vector<unsigned short> > >(18,vector<vector<unsigned short> >(7,
00016                                                            vector<unsigned short>(64)));
00017   hfData = vector<vector<unsigned short> >(18,vector<unsigned short>(8));
00018   
00019 }


Member Function Documentation

unsigned short L1RCTORCAMap::combine ( unsigned short  et,
unsigned short  fg 
)

Definition at line 67 of file L1RCTORCAMap.cc.

00067                                                                         {
00068   unsigned short newfg = fg << 8;
00069   return newfg + et;
00070 }

std::vector<unsigned short> L1RCTORCAMap::combVec ( std::vector< unsigned short >  et,
std::vector< unsigned short >  fg 
)

vector< vector< vector< unsigned short > > > L1RCTORCAMap::giveBarrel (  ) 

Definition at line 20 of file L1RCTORCAMap.cc.

References barrelData.

00020                                                                  {
00021   return barrelData;
00022 }

vector< vector< unsigned short > > L1RCTORCAMap::giveHF (  ) 

Definition at line 24 of file L1RCTORCAMap.cc.

References hfData.

00024                                                     {
00025   return hfData;
00026 }

vector< int > L1RCTORCAMap::highEtaMap ( int  eta,
int  phi 
) [private]

Definition at line 186 of file L1RCTORCAMap.cc.

Referenced by orcamap().

00186                                                     {
00187   int cardnum;
00188   int towernum;
00189   vector<int> returnVec(2);
00190   if(eta < 8){
00191     if(phi < 4){
00192       cardnum = 0;
00193       towernum = eta*4+phi;
00194     }
00195     else{
00196       cardnum = 1;
00197       towernum = eta*4+(phi-4);
00198     }
00199   }
00200   else if(eta < 16){
00201     if(phi < 4){
00202       cardnum = 2;
00203       towernum = (eta-8)*4+phi;
00204     }
00205     else{
00206       cardnum = 3;
00207       towernum = (eta-8)*4+(phi-4);
00208     }
00209   }
00210   else if(eta < 24){
00211     if(phi < 4){
00212       cardnum = 4;
00213       towernum = (eta-16)*4+phi;
00214     }
00215     else{
00216       cardnum = 5;
00217       towernum = (eta-16)*4+(phi-4);
00218     }
00219   }
00220   else{
00221     cardnum = 6;
00222     if(phi < 4)
00223       towernum = (27-eta)*4+phi;
00224     else
00225       towernum = (27-eta)*4+phi+12;
00226   }
00227 
00228   returnVec.at(0)=cardnum;
00229   returnVec.at(1)=towernum;
00230   return returnVec;
00231 }

vector< int > L1RCTORCAMap::lowEtaMap ( int  eta,
int  phi 
) [private]

Definition at line 120 of file L1RCTORCAMap.cc.

Referenced by orcamap().

00120                                                    {
00121   int cardnum = 0;
00122   int towernum = 0;
00123   vector<int> returnVec(2);
00124   if(eta < 4){
00125     cardnum = 6;
00126     if(phi < 4)
00127       towernum = (3-eta)*4 + phi;
00128     else
00129       towernum = eta*4 + phi + 12;
00130   }
00131   else if(eta <12){
00132     if(phi < 4){
00133       cardnum = 4;
00134       if(eta < 8)
00135         towernum = (7-eta)*4+phi+16;
00136       else
00137         towernum = (11-eta)*4+phi;
00138     }
00139     else{
00140       cardnum = 5;
00141       if(eta < 8)
00142         towernum = (7-eta)*4+(phi-4)+16;
00143       else
00144         towernum = (11-eta)*4+(phi-4);
00145     }
00146   }
00147   else if(eta < 20){
00148     if(phi < 4){
00149       cardnum = 2;
00150       if(eta < 16)
00151         towernum = (15-eta)*4+phi+16;
00152       else
00153         towernum = (19-eta)*4+phi;
00154     }
00155     else{
00156       cardnum = 3;
00157       if(eta < 16)
00158         towernum = (15-eta)*4+(phi-4)+16;
00159       else
00160         towernum = (19-eta)*4+(phi-4);
00161     }
00162   }
00163   else if(eta < 28){
00164     if(phi < 4){
00165       cardnum = 0;
00166       if(eta < 24)
00167         towernum = (23-eta)*4+phi+16;
00168       else
00169         towernum = (27-eta)*4+phi;
00170     }
00171     else{
00172       cardnum = 1;
00173       if(eta < 24)
00174         towernum = (23-eta)*4+(phi-4)+16;
00175       else
00176         towernum = (27-eta)*4+(phi-4);
00177     }
00178   }
00179   
00180   returnVec.at(0) = cardnum;
00181   returnVec.at(1) = towernum;
00182   return returnVec;
00183 }

void L1RCTORCAMap::makeBarrelData (  ) 

Definition at line 37 of file L1RCTORCAMap.cc.

References asciidump::at, barrelData, combEM, combHD, eta, orcamap(), and phi.

00037                                  {
00038   vector<int> indices;
00039   for(int phi = 0; phi<72;phi++){
00040     for(int eta = 0; eta<56;eta++){
00041       indices = orcamap(eta,phi);
00042       (barrelData.at(indices.at(0))).at(indices.at(1)).at(indices.at(2)) = combEM.at(phi*56 + eta);
00043       (barrelData.at(indices.at(0))).at(indices.at(1)).at(indices.at(2)+32) = combHD.at(phi*56 + eta);
00044     }
00045   }
00046 }

void L1RCTORCAMap::makeHFData (  ) 

Definition at line 27 of file L1RCTORCAMap.cc.

References hfData, i, j, and rawHFET.

00027                              {
00028   vector<unsigned short> crate(16);
00029   for(int i = 0; i< 9; i++){
00030     for(int j = 0; j<16; j++){
00031       crate.at(j) = rawHFET.at(16*i+j);
00032     }
00033     hfData.at(i) = crate;
00034   }  
00035 }  

vector< int > L1RCTORCAMap::orcamap ( int  eta,
int  phi 
)

Definition at line 80 of file L1RCTORCAMap.cc.

References highEtaMap(), i, and lowEtaMap().

Referenced by makeBarrelData().

00080                                                  {
00081   int crateNum(20);
00082   vector<int> cardTower(2,0);
00083   vector<int> returnVec(3,0);
00084   int modEta = eta%28;
00085   int modPhi = phi%8;
00086   if(phi < 8)
00087     crateNum = 0;  
00088   else if( phi < 16)
00089     crateNum = 1;
00090   else if( phi < 24)
00091     crateNum = 2;
00092   else if( phi < 32)
00093     crateNum = 3;
00094   else if( phi < 40)
00095     crateNum = 4;
00096   else if( phi < 48)
00097     crateNum = 5;
00098   else if( phi < 56)
00099     crateNum = 6;
00100   else if( phi < 64)
00101     crateNum = 7;
00102   else if( phi < 72)
00103     crateNum = 8;
00104 
00105   if(eta < 28)
00106     cardTower = lowEtaMap(modEta,modPhi);
00107   else {
00108     cardTower = highEtaMap(modEta,modPhi);
00109     crateNum = crateNum + 9;
00110   }
00111 
00112   returnVec.at(0) = crateNum;
00113   for(int i =0; i<2; i++){
00114     returnVec.at(i+1) = cardTower.at(i);
00115   }
00116   return returnVec;
00117 }

void L1RCTORCAMap::readData ( std::vector< unsigned >  emet,
std::vector< unsigned >  hdet,
std::vector< bool emfg,
std::vector< bool hdfg,
std::vector< unsigned >  hfet 
)


Member Data Documentation

std::vector<std::vector<std::vector<unsigned short> > > L1RCTORCAMap::barrelData [private]

Definition at line 30 of file L1RCTORCAMap.h.

Referenced by giveBarrel(), L1RCTORCAMap(), and makeBarrelData().

std::vector<unsigned short> L1RCTORCAMap::combEM [private]

Definition at line 46 of file L1RCTORCAMap.h.

Referenced by L1RCTORCAMap(), and makeBarrelData().

std::vector<unsigned short> L1RCTORCAMap::combHD [private]

Definition at line 47 of file L1RCTORCAMap.h.

Referenced by L1RCTORCAMap(), and makeBarrelData().

std::vector<std::vector<unsigned short> > L1RCTORCAMap::hfData [private]

Definition at line 31 of file L1RCTORCAMap.h.

Referenced by giveHF(), L1RCTORCAMap(), and makeHFData().

std::vector<unsigned short> L1RCTORCAMap::rawEMET [private]

Definition at line 41 of file L1RCTORCAMap.h.

Referenced by L1RCTORCAMap().

std::vector<unsigned short> L1RCTORCAMap::rawEMFG [private]

Definition at line 42 of file L1RCTORCAMap.h.

Referenced by L1RCTORCAMap().

std::vector<unsigned short> L1RCTORCAMap::rawHDET [private]

Definition at line 43 of file L1RCTORCAMap.h.

Referenced by L1RCTORCAMap().

std::vector<unsigned short> L1RCTORCAMap::rawHDFG [private]

Definition at line 44 of file L1RCTORCAMap.h.

Referenced by L1RCTORCAMap().

std::vector<unsigned short> L1RCTORCAMap::rawHFET [private]

Definition at line 45 of file L1RCTORCAMap.h.

Referenced by L1RCTORCAMap(), and makeHFData().


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