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

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

Definition at line 9 of file HcalDetIdRelationship.cc.

References DetId::Calo, HcalZDCDetId::channel(), HcalDetId::depth(), DetId::det(), DetId::Hcal, triggerObjects_cff::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(), hcalEqualDetId(), HcalCalibrationsSet::setCalibrations(), and HcalCalibrationWidthsSet::setCalibrationWidths().

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