CMS 3D CMS Logo

L1CaloRegionDetId.h
Go to the documentation of this file.
1 #ifndef L1CALOREGIONDETID_H
2 #define L1CALOREGIONDETID_H
3 
5 
18 class L1CaloRegionDetId : public DetId {
19 public:
20  static const unsigned N_PHI = 18;
21  static const unsigned N_ETA = 22;
22 
25 
27  L1CaloRegionDetId(uint32_t rawid);
28 
30  L1CaloRegionDetId(unsigned ieta, unsigned iphi);
31 
34  L1CaloRegionDetId(unsigned icrate, unsigned icard, unsigned irgn);
35 
37  unsigned ieta() const { return id_ & 0x1f; }
38 
40  unsigned iphi() const { return (id_ >> 5) & 0x1f; }
41 
43  bool isHf() const { return (ieta() < 4 || ieta() > 17); }
44 
46  unsigned rctCrate() const;
47 
49  unsigned rctCard() const;
50 
52  unsigned rctRegion() const;
53 
55  unsigned rctEta() const { return (ieta() < 11 ? 10 - ieta() : ieta() - 11); }
56 
58  unsigned rctPhi() const { return (iphi() % 2); }
59 };
60 
61 #endif
L1CaloRegionDetId::rctRegion
unsigned rctRegion() const
return RCT region index (0-1 for barrel, 0-7 for HF)
Definition: L1CaloRegionDetId.cc:77
L1CaloRegionDetId::rctEta
unsigned rctEta() const
return local RCT eta index (0-10)
Definition: L1CaloRegionDetId.h:55
L1CaloRegionDetId::ieta
unsigned ieta() const
global eta index (0-21)
Definition: L1CaloRegionDetId.h:37
DetId
Definition: DetId.h:17
L1CaloRegionDetId::isHf
bool isHf() const
return central or forward type
Definition: L1CaloRegionDetId.h:43
L1CaloRegionDetId
Definition: L1CaloRegionDetId.h:18
L1CaloRegionDetId::N_ETA
static const unsigned N_ETA
Definition: L1CaloRegionDetId.h:21
DetId::id_
uint32_t id_
Definition: DetId.h:69
L1CaloRegionDetId::iphi
unsigned iphi() const
global phi index (0-17)
Definition: L1CaloRegionDetId.h:40
L1CaloRegionDetId::rctPhi
unsigned rctPhi() const
return local RCT phi index (0-1)
Definition: L1CaloRegionDetId.h:58
L1CaloRegionDetId::N_PHI
static const unsigned N_PHI
Definition: L1CaloRegionDetId.h:20
L1CaloRegionDetId::L1CaloRegionDetId
L1CaloRegionDetId()
create null id
Definition: L1CaloRegionDetId.cc:6
DetId.h
L1CaloRegionDetId::rctCard
unsigned rctCard() const
return RCT card number (0-6)
Definition: L1CaloRegionDetId.cc:61
L1CaloRegionDetId::rctCrate
unsigned rctCrate() const
return RCT crate number (0-17)
Definition: L1CaloRegionDetId.cc:55