#include <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 () | |
create null id | |
L1CaloRegionDetId (unsigned icrate, unsigned icard, unsigned irgn) | |
L1CaloRegionDetId (uint32_t rawid) | |
create id from raw data (0=invalid code?) | |
L1CaloRegionDetId (unsigned ieta, unsigned iphi) | |
create id from global eta, phi indices (eta=0-21, phi=0-17) | |
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 |
Stores eta value in bits 4-0, phi value in bits 9-5
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 | ) |
create id from raw data (0=invalid code?)
Definition at line 14 of file L1CaloRegionDetId.cc.
: DetId(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().
: DetId(Calo, 2) { int ieta=0; int iphi=0; // Calculate iphi int phi_index = icrate % 9; if ((icard == 0) || (icard == 2) || (icard == 4)) phi_index = phi_index * 2; else if ((icard == 1) || (icard == 3) || (icard == 5)) phi_index = phi_index * 2 + 1; else if (icard == 6) phi_index = phi_index * 2 + irgn; // for HF else if (icard == 999) phi_index = phi_index * 2 + (irgn/4); iphi = (22 - phi_index) % 18; // Calculate ieta int eta_index = 0; if (icard < 6) eta_index = (icard/2) * 2 + irgn; else if (icard == 6) eta_index = 6; // HF else if (icard == 999) eta_index = (irgn % 4) + 7; if (icrate < 9) ieta = 10 - eta_index; else if (icrate >= 9) ieta = 11 + eta_index; id_ |= (ieta & 0x1f) | ((iphi & 0x1f)<<5); }
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().
{ 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().
{ 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(), getHLTprescales::index, and iphi().
Referenced by L1CaloMipQuietRegion::rctCard(), and L1CaloRegion::rctCard().
{ unsigned card = 999; unsigned rct_phi_index = (22 - iphi()) % 18; if ((ieta() == 4) || (ieta() == 17)){ card = 6; } else if ((ieta() > 4) && (ieta() <= 10)){ unsigned index = (ieta() - 5)/2; card = ((2 - index) * 2) + (rct_phi_index % 2); } else if ((ieta() >= 11) && (ieta() < 17)){ unsigned index = (ieta() - 11)/2; card = (index * 2) + (rct_phi_index % 2); } return card; }
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().
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().
{ 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(), and iphi().
Referenced by L1CaloRegion::rctRegionIndex(), and L1CaloMipQuietRegion::rctRegionIndex().
{ unsigned rgn = 999; unsigned rct_phi_index = (22 - iphi()) % 18; if (ieta() < 4){ rgn = (3 - ieta()) + 4 * (rct_phi_index % 2); } else if (ieta() > 17){ rgn = (ieta() - 18) + 4 * (rct_phi_index % 2); } else if ((ieta() == 4) || (ieta() == 17)){ rgn = (rct_phi_index % 2); } else if ((ieta() > 4) && (ieta() <= 10)){ rgn = (ieta() % 2); } else if ((ieta() >= 11) && (ieta() < 17)){ rgn = ((ieta() - 1) % 2); } return rgn; }
unsigned const L1CaloRegionDetId::N_ETA = 22 [static] |
Definition at line 25 of file L1CaloRegionDetId.h.
Referenced by L1GctHardwareJetFinder::makeProtoJet(), and rctCrate().
unsigned const L1CaloRegionDetId::N_PHI = 18 [static] |
Definition at line 24 of file L1CaloRegionDetId.h.
Referenced by L1GctHardwareJetFinder::L1GctHardwareJetFinder(), L1GctJetFinderBase::L1GctJetFinderBase(), L1GctTdrJetFinder::L1GctTdrJetFinder(), rctCrate(), L1GctJetFinderBase::setInputRegion(), and L1GlobalCaloTrigger::setRegion().