CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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

Definition at line 3 of file HcalDetIdRelationship.cc.

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

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 }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
static const int SubdetectorId
Definition: HcalZDCDetId.h:25
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
DetId hcalTransformedId ( const DetId aid)

Definition at line 11 of file HcalDetIdRelationship.cc.

References DetId::Calo, HcalZDCDetId::channel(), HcalDetId::depth(), DetId::det(), DetId::Hcal, gpuClustering::id, HcalDetId::ieta(), HcalDetId::iphi(), HcalZDCDetId::section(), HcalDetId::subdet(), HcalZDCDetId::SubdetectorId, DetId::subdetId(), and HcalZDCDetId::zside().

Referenced by HcalCalibrationsSet::CalibSetObject::CalibSetObject(), HcalCalibrationWidthsSet::CalibWidthSetObject::CalibWidthSetObject(), HcalCalibrationsSet::getCalibrations(), HcalCalibrationWidthsSet::getCalibrationWidths(), HcalCalibrationsSet::setCalibrations(), and HcalCalibrationWidthsSet::setCalibrationWidths().

11  {
12  DetId id;
13  if (aid.det() == DetId::Hcal) {
14  HcalDetId hcid(aid);
15  id = HcalDetId(hcid.subdet(), hcid.ieta(), hcid.iphi(), hcid.depth());
16  } else if (aid.det() == DetId::Calo && aid.subdetId() == HcalZDCDetId::SubdetectorId) {
17  HcalZDCDetId hcid(aid);
18  id = HcalZDCDetId(hcid.section(), (hcid.zside() > 0), hcid.channel());
19  } else {
20  id = aid;
21  }
22  return id;
23 }
uint16_t *__restrict__ id
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
Definition: DetId.h:17
static const int SubdetectorId
Definition: HcalZDCDetId.h:25
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46