CMS 3D CMS Logo

Functions
HcalDetIdRelationship.cc File Reference
#include "CondFormats/HcalObjects/interface/HcalDetIdRelationship.h"

Go to the source code of this file.

Functions

bool hcalEqualDetId (uint32_t id, const DetId &fId)
 
DetId hcalTransformedId (const DetId &aid)
 

Function Documentation

◆ hcalEqualDetId()

bool hcalEqualDetId ( uint32_t  id,
const DetId fId 
)

Definition at line 3 of file HcalDetIdRelationship.cc.

3  {
4  return ((fId.det() == DetId::Hcal && HcalDetId(id) == HcalDetId(fId)) ||
5  (fId.det() == DetId::Calo && fId.subdetId() == HcalZDCDetId::SubdetectorId &&
6  HcalZDCDetId(id) == HcalZDCDetId(fId)) ||
7  (fId.det() != DetId::Hcal && (fId.det() == DetId::Calo && fId.subdetId() != HcalZDCDetId::SubdetectorId) &&
8  (id == fId.rawId())));
9 }

References DetId::Calo, DetId::det(), DetId::Hcal, DetId::rawId(), HcalZDCDetId::SubdetectorId, and DetId::subdetId().

◆ hcalTransformedId()

DetId hcalTransformedId ( const DetId aid)
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
DetId::Hcal
Definition: DetId.h:28
DetId::Calo
Definition: DetId.h:29
DetId
Definition: DetId.h:17
HcalZDCDetId
Definition: HcalZDCDetId.h:16
HcalZDCDetId::SubdetectorId
static const int SubdetectorId
Definition: HcalZDCDetId.h:25
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
HcalDetId
Definition: HcalDetId.h:12
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31