#include <DataFormats/L1CaloTrigger/interface/L1CaloRegionDetId.h>
Public Member Functions | |
unsigned | ieta () const |
global eta index (0-21) | |
unsigned | iphi () const |
global phi index (0-17) | |
bool | isHf () const |
return central or forward type | |
L1CaloRegionDetId (unsigned icrate, unsigned icard, unsigned irgn) | |
create id from RCT crate, RCT card, RCT region (within card) icard=999 is used to indicate HF regions | |
L1CaloRegionDetId (unsigned ieta, unsigned iphi) | |
create id from global eta, phi indices (eta=0-21, phi=0-17) | |
L1CaloRegionDetId (uint32_t rawid) | |
create id from raw data (0=invalid code?) | |
L1CaloRegionDetId () | |
create null id | |
unsigned | rctCard () const |
return RCT card number (0-6) | |
unsigned | rctCrate () const |
return RCT crate number (0-17) | |
unsigned | rctEta () const |
return local RCT eta index (0-10) | |
unsigned | rctPhi () const |
return local RCT phi index (0-1) | |
unsigned | rctRegion () const |
return RCT region index (0-1 for barrel, 0-7 for HF) | |
Static Public Attributes | |
static const unsigned | N_ETA = 22 |
static const unsigned | N_PHI = 18 |
Cell identifier class for L1 Calo Trigger Regions (4x4 trigger tower sums).
Definition at line 20 of file L1CaloRegionDetId.h.
L1CaloRegionDetId::L1CaloRegionDetId | ( | ) |
L1CaloRegionDetId::L1CaloRegionDetId | ( | uint32_t | rawid | ) |
L1CaloRegionDetId::L1CaloRegionDetId | ( | unsigned | ieta, | |
unsigned | iphi | |||
) |
create id from global eta, phi indices (eta=0-21, phi=0-17)
Definition at line 19 of file L1CaloRegionDetId.cc.
References DetId::id_.
L1CaloRegionDetId::L1CaloRegionDetId | ( | unsigned | icrate, | |
unsigned | icard, | |||
unsigned | irgn | |||
) |
create id from RCT crate, RCT card, RCT region (within card) icard=999 is used to indicate HF regions
TODO - check calculation of ieta and iphi from RCT crate/card/region #
Definition at line 27 of file L1CaloRegionDetId.cc.
References DetId::id_, ieta(), and iphi().
00027 : 00028 DetId(Calo, 2) 00029 { 00030 00031 int ieta=0; 00032 int iphi=0; 00033 00034 // Calculate iphi 00035 int phi_index = icrate % 9; 00036 if ((icard == 0) || (icard == 2) || (icard == 4)) 00037 phi_index = phi_index * 2; 00038 else if ((icard == 1) || (icard == 3) || (icard == 5)) 00039 phi_index = phi_index * 2 + 1; 00040 else if (icard == 6) 00041 phi_index = phi_index * 2 + irgn; 00042 // for HF 00043 else if (icard == 999) 00044 phi_index = phi_index * 2 + (irgn/4); 00045 iphi = (22 - phi_index) % 18; 00046 00047 // Calculate ieta 00048 int eta_index = 0; 00049 if (icard < 6) 00050 eta_index = (icard/2) * 2 + irgn; 00051 else if (icard == 6) 00052 eta_index = 6; 00053 // HF 00054 else if (icard == 999) 00055 eta_index = (irgn % 4) + 7; 00056 00057 if (icrate < 9) 00058 ieta = 10 - eta_index; 00059 else if (icrate >= 9) 00060 ieta = 11 + eta_index; 00061 00063 id_ |= (ieta & 0x1f) | ((iphi & 0x1f)<<5); 00064 }
unsigned L1CaloRegionDetId::ieta | ( | ) | const [inline] |
global eta index (0-21)
Definition at line 41 of file L1CaloRegionDetId.h.
References DetId::id_.
Referenced by L1CaloGeometry::etaBinCenter(), L1CaloGeometry::etaBinHighEdge(), L1CaloGeometry::etaBinLowEdge(), L1CaloMipQuietRegion::gctEta(), L1CaloRegion::gctEta(), L1GctJet::globalEta(), L1GctJet::hwEta(), isHf(), L1CaloRegionDetId(), L1GctEmCand::L1GctEmCand(), rctCard(), rctCrate(), rctEta(), and rctRegion().
00041 { return id_&0x1f; }
unsigned L1CaloRegionDetId::iphi | ( | ) | const [inline] |
global phi index (0-17)
Definition at line 44 of file L1CaloRegionDetId.h.
References DetId::id_.
Referenced by L1CaloGeometry::emJetPhiBinCenter(), L1CaloGeometry::emJetPhiBinHighEdge(), L1CaloGeometry::emJetPhiBinLowEdge(), L1CaloMipQuietRegion::gctPhi(), L1CaloRegion::gctPhi(), L1GctJet::globalPhi(), L1GctJet::hwPhi(), L1CaloRegionDetId(), L1GctEmCand::L1GctEmCand(), rctCard(), rctCrate(), rctPhi(), and rctRegion().
00044 { return (id_>>5)&0x1f; }
bool L1CaloRegionDetId::isHf | ( | ) | const [inline] |
return central or forward type
Definition at line 47 of file L1CaloRegionDetId.h.
References ieta().
Referenced by L1CaloRegion::isHbHe(), and L1CaloRegion::isHf().
unsigned L1CaloRegionDetId::rctCard | ( | ) | const |
return RCT card number (0-6)
Definition at line 73 of file L1CaloRegionDetId.cc.
References ieta(), index, and iphi().
Referenced by L1CaloMipQuietRegion::rctCard(), and L1CaloRegion::rctCard().
00073 { 00074 unsigned card = 999; 00075 unsigned rct_phi_index = (22 - iphi()) % 18; 00076 if ((ieta() == 4) || (ieta() == 17)){ 00077 card = 6; 00078 } 00079 else if ((ieta() > 4) && (ieta() <= 10)){ 00080 unsigned index = (ieta() - 5)/2; 00081 card = ((2 - index) * 2) + (rct_phi_index % 2); 00082 } 00083 else if ((ieta() >= 11) && (ieta() < 17)){ 00084 unsigned index = (ieta() - 11)/2; 00085 card = (index * 2) + (rct_phi_index % 2); 00086 } 00087 return card; 00088 }
unsigned L1CaloRegionDetId::rctCrate | ( | ) | const |
return RCT crate number (0-17)
Definition at line 67 of file L1CaloRegionDetId.cc.
References ieta(), iphi(), N_ETA, and N_PHI.
Referenced by L1CaloMipQuietRegion::rctCrate(), and L1CaloRegion::rctCrate().
00067 { // TODO - check this is correct! 00068 unsigned phiCrate = ((N_PHI + 4 - iphi()) % N_PHI) / 2; 00069 return (ieta()<(N_ETA/2) ? phiCrate : phiCrate + N_PHI/2) ; 00070 }
unsigned L1CaloRegionDetId::rctEta | ( | ) | const [inline] |
return local RCT eta index (0-10)
Definition at line 59 of file L1CaloRegionDetId.h.
References ieta().
Referenced by L1GctJet::hwEta(), L1GctEmCand::L1GctEmCand(), L1CaloMipQuietRegion::rctEta(), L1CaloRegion::rctEta(), and L1GctJet::rctEta().
unsigned L1CaloRegionDetId::rctPhi | ( | ) | const [inline] |
return local RCT phi index (0-1)
Definition at line 62 of file L1CaloRegionDetId.h.
References iphi().
Referenced by L1GctJet::rctPhi(), L1CaloMipQuietRegion::rctPhi(), and L1CaloRegion::rctPhi().
00062 { return (iphi()%2); }
unsigned L1CaloRegionDetId::rctRegion | ( | ) | const |
return RCT region index (0-1 for barrel, 0-7 for HF)
Definition at line 91 of file L1CaloRegionDetId.cc.
References ieta(), iphi(), and rgn.
Referenced by L1CaloRegion::rctRegionIndex(), and L1CaloMipQuietRegion::rctRegionIndex().
00091 { 00092 unsigned rgn = 999; 00093 unsigned rct_phi_index = (22 - iphi()) % 18; 00094 if (ieta() < 4){ 00095 rgn = (3 - ieta()) + 4 * (rct_phi_index % 2); 00096 } 00097 else if (ieta() > 17){ 00098 rgn = (ieta() - 18) + 4 * (rct_phi_index % 2); 00099 } 00100 else if ((ieta() == 4) || (ieta() == 17)){ 00101 rgn = (rct_phi_index % 2); 00102 } 00103 else if ((ieta() > 4) && (ieta() <= 10)){ 00104 rgn = (ieta() % 2); 00105 } 00106 else if ((ieta() >= 11) && (ieta() < 17)){ 00107 rgn = ((ieta() - 1) % 2); 00108 } 00109 return rgn; 00110 }
unsigned const L1CaloRegionDetId::N_ETA = 22 [static] |
Definition at line 25 of file L1CaloRegionDetId.h.
Referenced by L1GctJetCounterLut::checkCut(), and rctCrate().
unsigned const L1CaloRegionDetId::N_PHI = 18 [static] |
Definition at line 24 of file L1CaloRegionDetId.h.
Referenced by L1GctJetCounterLut::checkCut(), L1GctHardwareJetFinder::L1GctHardwareJetFinder(), L1GctJetFinderBase::L1GctJetFinderBase(), L1GctTdrJetFinder::L1GctTdrJetFinder(), L1GctJetCounterLut::passesCut(), rctCrate(), L1GctJetFinderBase::setInputRegion(), and L1GlobalCaloTrigger::setRegion().