CMS 3D CMS Logo

Functions
HcalDetIdRelationship.h File Reference
#include "DataFormats/HcalDetId/interface/HcalDetId.h"
#include "DataFormats/HcalDetId/interface/HcalOtherDetId.h"
#include "DataFormats/HcalDetId/interface/HcalCastorDetId.h"
#include "DataFormats/HcalDetId/interface/HcalZDCDetId.h"
#include <vector>

Go to the source code of this file.

Functions

template<class Item >
bool hcalEqualDetId (Item *cell, const DetId &fId)
 
bool hcalEqualDetId (uint32_t id, const DetId &fId)
 
DetId hcalTransformedId (const DetId &aid)
 

Function Documentation

◆ hcalEqualDetId() [1/2]

template<class Item >
bool hcalEqualDetId ( Item *  cell,
const DetId fId 
)

◆ hcalEqualDetId() [2/2]

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
hcalEqualDetId
bool hcalEqualDetId(Item *cell, const DetId &fId)
Definition: HcalDetIdRelationship.h:11
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31