CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends
HcalGeometry Class Reference

#include <HcalGeometry.h>

Inheritance diagram for HcalGeometry:
CaloSubdetectorGeometry

Public Types

enum  { k_NumberOfParametersPerShape = 5 }
 
typedef HcalGeometryRecord AlignedRecord
 
typedef HcalAlignmentRcd AlignmentRecord
 
typedef CaloCellGeometry::CCGFloat CCGFloat
 
typedef HcalDetId DetIdType
 
typedef std::vector< IdealObliquePrismHBCellVec
 
typedef std::vector< IdealObliquePrismHECellVec
 
typedef std::vector< IdealZPrismHFCellVec
 
typedef std::vector< IdealObliquePrismHOCellVec
 
typedef PHcalRcd PGeometryRecord
 
typedef CaloCellGeometry::Pt3D Pt3D
 
typedef CaloCellGeometry::Pt3DVec Pt3DVec
 
- Public Types inherited from CaloSubdetectorGeometry
typedef CaloCellGeometry::CCGFloat CCGFloat
 
typedef std::vector< std::shared_ptr< const CaloCellGeometry > > CellSet
 
typedef std::set< DetIdDetIdSet
 
typedef std::vector< CCGFloatDimVec
 
typedef std::vector< unsigned int > IVec
 
typedef CaloCellGeometry::ParMgr ParMgr
 
typedef CaloCellGeometry::ParVec ParVec
 
typedef CaloCellGeometry::ParVecVec ParVecVec
 
typedef std::vector< CCGFloatTrVec
 

Public Member Functions

GlobalPoint getBackPosition (const DetId &id) const
 
CaloSubdetectorGeometry::DetIdSet getCells (const GlobalPoint &r, double dR) const override
 Get a list of all cells within a dR of the given cell. More...
 
DetId getClosestCell (const GlobalPoint &r) const override
 
DetId getClosestCell (const GlobalPoint &r, bool ignoreCorrect) const
 
CaloCellGeometry::CornersVec getCorners (const DetId &id) const
 
std::shared_ptr< const CaloCellGeometrygetGeometry (const DetId &id) const override
 Get the cell geometry of a given detector id. Should return false if not found. More...
 
unsigned int getHxSize (const int type) const
 
GlobalPoint getPosition (const DetId &id) const
 
void getSummary (CaloSubdetectorGeometry::TrVec &trVector, CaloSubdetectorGeometry::IVec &iVector, CaloSubdetectorGeometry::DimVec &dimVector, CaloSubdetectorGeometry::IVec &dinsVector) const override
 
const std::vector< DetId > & getValidDetIds (DetId::Detector det=DetId::Detector(0), int subdet=0) const override
 Get a list of valid detector ids (for the given subdetector) More...
 
 HcalGeometry (const HcalTopology &topology)
 
void localCorners (Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
 
void newCell (const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override
 
unsigned int numberOfParametersPerShape () const override
 
unsigned int numberOfShapes () const override
 
const HcalTopologytopology () const
 
 ~HcalGeometry () override
 The HcalGeometry will delete all its cell geometries at destruction time. More...
 
- Public Member Functions inherited from CaloSubdetectorGeometry
void allocateCorners (CaloCellGeometry::CornersVec::size_type n)
 
void allocatePar (ParVec::size_type n, unsigned int m)
 
 CaloSubdetectorGeometry ()
 
 CaloSubdetectorGeometry (const CaloSubdetectorGeometry &)=delete
 avoid copies More...
 
CaloCellGeometry::CornersMgrcornersMgr ()
 
CCGFloat deltaEta (const DetId &detId) const
 
CCGFloat deltaPhi (const DetId &detId) const
 
virtual void fillDefaultNamedParameters () const
 
virtual CellSet getCellSet (const GlobalPoint &r, double dR) const
 
virtual void initializeParms ()
 
virtual unsigned int numberOfTransformParms () const
 
CaloSubdetectorGeometryoperator= (const CaloSubdetectorGeometry &)=delete
 
ParMgrparMgr ()
 
const ParMgrparMgrConst () const
 
ParVecVecparVecVec ()
 
const ParVecVecparVecVec () const
 
virtual bool present (const DetId &id) const
 is this detid present in the geometry? More...
 
virtual ~CaloSubdetectorGeometry ()
 The base class DOES assume that it owns the CaloCellGeometry objects. More...
 

Static Public Member Functions

static unsigned int alignmentBarEndForIndexLocal (const DetId &id, unsigned int nD)
 
static unsigned int alignmentBarrelIndexLocal (const DetId &id)
 
static unsigned int alignmentEndcapIndexLocal (const DetId &id)
 
static unsigned int alignmentForwardIndexLocal (const DetId &id)
 
static unsigned int alignmentOuterIndexLocal (const DetId &id)
 
static unsigned int alignmentTransformIndexGlobal (const DetId &id)
 
static unsigned int alignmentTransformIndexLocal (const DetId &id)
 
static std::string dbString ()
 
static DetId detIdFromBarrelAlignmentIndex (unsigned int i)
 
static DetId detIdFromEndcapAlignmentIndex (unsigned int i)
 
static DetId detIdFromForwardAlignmentIndex (unsigned int i)
 
static DetId detIdFromLocalAlignmentIndex (unsigned int i)
 
static DetId detIdFromOuterAlignmentIndex (unsigned int i)
 
static unsigned int numberOfAlignments ()
 
static unsigned int numberOfBarrelAlignments ()
 
static unsigned int numberOfEndcapAlignments ()
 
static unsigned int numberOfForwardAlignments ()
 
static unsigned int numberOfOuterAlignments ()
 
static std::string producerTag ()
 

Protected Member Functions

const CaloCellGeometrygetGeometryRawPtr (uint32_t index) const override
 
unsigned int indexFor (const DetId &id) const override
 
unsigned int sizeForDenseIndex (const DetId &id) const override
 
- Protected Member Functions inherited from CaloSubdetectorGeometry
void addValidID (const DetId &id)
 
virtual std::shared_ptr< const CaloCellGeometrycellGeomPtr (uint32_t index) const
 

Private Member Functions

DetId correctId (const DetId &id) const
 
int etaRing (HcalSubdetector bc, double abseta) const
 helper methods for getClosestCell More...
 
void fillDetIds () const
 
std::shared_ptr< const CaloCellGeometrygetGeometryBase (const DetId &id) const
 
void increaseReserve (unsigned int extra)
 
void init ()
 
void newCellFast (const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
 
unsigned int newCellImpl (const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
 
int phiBin (HcalSubdetector bc, int etaring, double phi) const
 
void sortValidIds ()
 

Private Attributes

CaloSubdetectorGeometry::IVec m_dins
 
edm::AtomicPtrCache< std::vector< DetId > > m_emptyIds
 
HBCellVec m_hbCellVec
 
edm::AtomicPtrCache< std::vector< DetId > > m_hbIds
 
HECellVec m_heCellVec
 
edm::AtomicPtrCache< std::vector< DetId > > m_heIds
 
HFCellVec m_hfCellVec
 
edm::AtomicPtrCache< std::vector< DetId > > m_hfIds
 
HOCellVec m_hoCellVec
 
edm::AtomicPtrCache< std::vector< DetId > > m_hoIds
 
bool m_mergePosition
 
const HcalTopologym_topology
 

Friends

class HcalFlexiHardcodeGeometryLoader
 
class HcalGeometryPlan1Tester
 
class HcalHardcodeGeometryLoader
 

Additional Inherited Members

- Static Protected Member Functions inherited from CaloSubdetectorGeometry
static CCGFloat deltaR (const GlobalPoint &p1, const GlobalPoint &p2)
 
- Protected Attributes inherited from CaloSubdetectorGeometry
ParVecVec m_parVecVec
 
std::vector< DetIdm_validIds
 

Detailed Description

Definition at line 17 of file HcalGeometry.h.

Member Typedef Documentation

◆ AlignedRecord

Definition at line 34 of file HcalGeometry.h.

◆ AlignmentRecord

Definition at line 33 of file HcalGeometry.h.

◆ CCGFloat

Definition at line 29 of file HcalGeometry.h.

◆ DetIdType

Definition at line 36 of file HcalGeometry.h.

◆ HBCellVec

Definition at line 24 of file HcalGeometry.h.

◆ HECellVec

Definition at line 25 of file HcalGeometry.h.

◆ HFCellVec

typedef std::vector<IdealZPrism> HcalGeometry::HFCellVec

Definition at line 27 of file HcalGeometry.h.

◆ HOCellVec

Definition at line 26 of file HcalGeometry.h.

◆ PGeometryRecord

Definition at line 35 of file HcalGeometry.h.

◆ Pt3D

Definition at line 30 of file HcalGeometry.h.

◆ Pt3DVec

Definition at line 31 of file HcalGeometry.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
k_NumberOfParametersPerShape 

Definition at line 38 of file HcalGeometry.h.

Constructor & Destructor Documentation

◆ HcalGeometry()

HcalGeometry::HcalGeometry ( const HcalTopology topology)
explicit

Definition at line 16 of file HcalGeometry.cc.

References init().

◆ ~HcalGeometry()

HcalGeometry::~HcalGeometry ( )
override

The HcalGeometry will delete all its cell geometries at destruction time.

Definition at line 21 of file HcalGeometry.cc.

21 {}

Member Function Documentation

◆ alignmentBarEndForIndexLocal()

unsigned int HcalGeometry::alignmentBarEndForIndexLocal ( const DetId id,
unsigned int  nD 
)
static

Definition at line 338 of file HcalGeometry.cc.

338  {
339  const HcalDetId hid(id);
340  const unsigned int iphi(hid.iphi());
341  const int ieta(hid.ieta());
342  const unsigned int index((0 < ieta ? nD / 2 : 0) + (iphi + 1) % 72 / 4);
343  assert(index < nD);
344  return index;
345 }

References cms::cuda::assert(), LEDCalibrationChannels::ieta, HcalDetId::ieta(), LEDCalibrationChannels::iphi, and HcalDetId::iphi().

Referenced by alignmentBarrelIndexLocal(), alignmentEndcapIndexLocal(), and alignmentForwardIndexLocal().

◆ alignmentBarrelIndexLocal()

unsigned int HcalGeometry::alignmentBarrelIndexLocal ( const DetId id)
static

Definition at line 347 of file HcalGeometry.cc.

347  {
349 }

References alignmentBarEndForIndexLocal(), and numberOfBarrelAlignments().

Referenced by alignmentTransformIndexLocal().

◆ alignmentEndcapIndexLocal()

unsigned int HcalGeometry::alignmentEndcapIndexLocal ( const DetId id)
static

Definition at line 351 of file HcalGeometry.cc.

351  {
353 }

References alignmentBarEndForIndexLocal(), and numberOfEndcapAlignments().

Referenced by alignmentTransformIndexLocal().

◆ alignmentForwardIndexLocal()

unsigned int HcalGeometry::alignmentForwardIndexLocal ( const DetId id)
static

◆ alignmentOuterIndexLocal()

unsigned int HcalGeometry::alignmentOuterIndexLocal ( const DetId id)
static

Definition at line 359 of file HcalGeometry.cc.

359  {
360  const HcalDetId hid(id);
361  const int ieta(hid.ieta());
362  const int iphi(hid.iphi());
363  const int ring(ieta < -10 ? 0 : (ieta < -4 ? 1 : (ieta < 5 ? 2 : (ieta < 11 ? 3 : 4))));
364 
365  const unsigned int index(12 * ring + (iphi - 1) / 6);
367  return index;
368 }

References cms::cuda::assert(), LEDCalibrationChannels::ieta, HcalDetId::ieta(), LEDCalibrationChannels::iphi, HcalDetId::iphi(), numberOfOuterAlignments(), and relativeConstraints::ring.

Referenced by alignmentTransformIndexLocal().

◆ alignmentTransformIndexGlobal()

unsigned int HcalGeometry::alignmentTransformIndexGlobal ( const DetId id)
static

Definition at line 393 of file HcalGeometry.cc.

393 { return (unsigned int)DetId::Hcal - 1; }

References DetId::Hcal.

Referenced by CaloGeometryDBEP< T, U >::produceAligned().

◆ alignmentTransformIndexLocal()

unsigned int HcalGeometry::alignmentTransformIndexLocal ( const DetId id)
static

Definition at line 370 of file HcalGeometry.cc.

370  {
371  assert(id.det() == DetId::Hcal);
372 
373  const HcalDetId hid(id);
374  bool isHB = (hid.subdet() == HcalBarrel);
375  bool isHE = (hid.subdet() == HcalEndcap);
376  bool isHF = (hid.subdet() == HcalForward);
377  // bool isHO = (hid.subdet() == HcalOuter);
378 
379  const unsigned int nB(numberOfBarrelAlignments());
380  const unsigned int nE(numberOfEndcapAlignments());
381  const unsigned int nF(numberOfForwardAlignments());
382  // const unsigned int nO ( numberOfOuterAlignments() ) ;
383 
384  const unsigned int index(isHB ? alignmentBarrelIndexLocal(id)
385  : isHE ? alignmentEndcapIndexLocal(id) + nB
386  : isHF ? alignmentForwardIndexLocal(id) + nB + nE
387  : alignmentOuterIndexLocal(id) + nB + nE + nF);
388 
390  return index;
391 }

References alignmentBarrelIndexLocal(), alignmentEndcapIndexLocal(), alignmentForwardIndexLocal(), alignmentOuterIndexLocal(), cms::cuda::assert(), DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalObjRepresent::isHB(), HcalObjRepresent::isHE(), HcalObjRepresent::isHF(), numberOfAlignments(), numberOfBarrelAlignments(), numberOfEndcapAlignments(), numberOfForwardAlignments(), and HcalDetId::subdet().

Referenced by CaloGeometryDBEP< T, U >::produceAligned().

◆ correctId()

DetId HcalGeometry::correctId ( const DetId id) const
private

Definition at line 537 of file HcalGeometry.cc.

537  {
538  if (m_mergePosition) {
539  HcalDetId hid(id);
540  return ((DetId)(m_topology.mergedDepthDetId(hid)));
541  } else {
542  return id;
543  }
544 }

References triggerObjects_cff::id, m_mergePosition, m_topology, and HcalTopology::mergedDepthDetId().

Referenced by getClosestCell().

◆ dbString()

static std::string HcalGeometry::dbString ( )
inlinestatic

Definition at line 40 of file HcalGeometry.h.

40 { return "PHcalRcd"; }

Referenced by CaloGeometryDBEP< T, U >::produceAligned().

◆ detIdFromBarrelAlignmentIndex()

DetId HcalGeometry::detIdFromBarrelAlignmentIndex ( unsigned int  i)
static

◆ detIdFromEndcapAlignmentIndex()

DetId HcalGeometry::detIdFromEndcapAlignmentIndex ( unsigned int  i)
static

◆ detIdFromForwardAlignmentIndex()

DetId HcalGeometry::detIdFromForwardAlignmentIndex ( unsigned int  i)
static

◆ detIdFromLocalAlignmentIndex()

DetId HcalGeometry::detIdFromLocalAlignmentIndex ( unsigned int  i)
static

Definition at line 324 of file HcalGeometry.cc.

324  {
326 
327  const unsigned int nB(numberOfBarrelAlignments());
328  const unsigned int nE(numberOfEndcapAlignments());
329  const unsigned int nF(numberOfForwardAlignments());
330  // const unsigned int nO ( numberOfOuterAlignments() ) ;
331 
332  return (i < nB ? detIdFromBarrelAlignmentIndex(i)
333  : i < nB + nE ? detIdFromEndcapAlignmentIndex(i - nB)
334  : i < nB + nE + nF ? detIdFromForwardAlignmentIndex(i - nB - nE)
335  : detIdFromOuterAlignmentIndex(i - nB - nE - nF));
336 }

References cms::cuda::assert(), detIdFromBarrelAlignmentIndex(), detIdFromEndcapAlignmentIndex(), detIdFromForwardAlignmentIndex(), detIdFromOuterAlignmentIndex(), mps_fire::i, numberOfAlignments(), numberOfBarrelAlignments(), numberOfEndcapAlignments(), and numberOfForwardAlignments().

◆ detIdFromOuterAlignmentIndex()

DetId HcalGeometry::detIdFromOuterAlignmentIndex ( unsigned int  i)
static

Definition at line 316 of file HcalGeometry.cc.

316  {
318  const int ring(i / 12);
319  const int ieta(0 == ring ? -11 : 1 == ring ? -5 : 2 == ring ? 1 : 3 == ring ? 5 : 11);
320  const int iphi(1 + (i - ring * 12) * 6);
321  return HcalDetId(HcalOuter, ieta, iphi, 4);
322 }

References cms::cuda::assert(), HcalOuter, mps_fire::i, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, numberOfOuterAlignments(), and relativeConstraints::ring.

Referenced by detIdFromLocalAlignmentIndex(), FakeCaloAlignmentEP::produceHOAli(), and TestCaloAlignmentEP::produceHOAli().

◆ etaRing()

int HcalGeometry::etaRing ( HcalSubdetector  bc,
double  abseta 
) const
private

helper methods for getClosestCell

Definition at line 213 of file HcalGeometry.cc.

213 { return m_topology.etaRing(bc, abseta); }

References HcalTopology::etaRing(), and m_topology.

Referenced by getCells(), and getClosestCell().

◆ fillDetIds()

void HcalGeometry::fillDetIds ( ) const
private

Definition at line 39 of file HcalGeometry.cc.

39  {
40  // this must test the last record filled to avoid a race condition
41  if (!m_emptyIds.isSet()) {
42  std::unique_ptr<std::vector<DetId>> p_hbIds{new std::vector<DetId>};
43  std::unique_ptr<std::vector<DetId>> p_heIds{new std::vector<DetId>};
44  std::unique_ptr<std::vector<DetId>> p_hoIds{new std::vector<DetId>};
45  std::unique_ptr<std::vector<DetId>> p_hfIds{new std::vector<DetId>};
46  std::unique_ptr<std::vector<DetId>> p_emptyIds{new std::vector<DetId>};
47 
48  const std::vector<DetId>& baseIds(CaloSubdetectorGeometry::getValidDetIds());
49  for (unsigned int i(0); i != baseIds.size(); ++i) {
50  const DetId id(baseIds[i]);
51  if (id.subdetId() == HcalBarrel) {
52  p_hbIds->emplace_back(id);
53  } else if (id.subdetId() == HcalEndcap) {
54  p_heIds->emplace_back(id);
55  } else if (id.subdetId() == HcalOuter) {
56  p_hoIds->emplace_back(id);
57  } else if (id.subdetId() == HcalForward) {
58  p_hfIds->emplace_back(id);
59  }
60  }
61  std::sort(p_hbIds->begin(), p_hbIds->end());
62  std::sort(p_heIds->begin(), p_heIds->end());
63  std::sort(p_hoIds->begin(), p_hoIds->end());
64  std::sort(p_hfIds->begin(), p_hfIds->end());
65  p_emptyIds->resize(0);
66 
67  m_hbIds.set(std::move(p_hbIds));
68  m_heIds.set(std::move(p_heIds));
69  m_hoIds.set(std::move(p_hoIds));
70  m_hfIds.set(std::move(p_hfIds));
71  m_emptyIds.set(std::move(p_emptyIds));
72  }
73 }

References CaloSubdetectorGeometry::getValidDetIds(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, mps_fire::i, triggerObjects_cff::id, edm::AtomicPtrCache< T >::isSet(), m_emptyIds, m_hbIds, m_heIds, m_hfIds, m_hoIds, eostools::move(), and edm::AtomicPtrCache< T >::set().

Referenced by getHxSize(), and getValidDetIds().

◆ getBackPosition()

GlobalPoint HcalGeometry::getBackPosition ( const DetId id) const

Definition at line 186 of file HcalGeometry.cc.

186  {
187  if (!m_mergePosition) {
188  return (getGeometryBase(id)->getBackPoint());
189  } else {
190  std::vector<HcalDetId> ids;
192  return (getGeometryBase(ids.back())->getBackPoint());
193  }
194 }

References getGeometryBase(), m_mergePosition, m_topology, and HcalTopology::unmergeDepthDetId().

◆ getCells()

CaloSubdetectorGeometry::DetIdSet HcalGeometry::getCells ( const GlobalPoint r,
double  dR 
) const
overridevirtual

Get a list of all cells within a dR of the given cell.

The default implementation makes a loop over all cell geometries. Cleverer implementations are suggested to use rough conversions between eta/phi and ieta/iphi and test on the boundaries.

Reimplemented from CaloSubdetectorGeometry.

Definition at line 219 of file HcalGeometry.cc.

219  {
220  CaloSubdetectorGeometry::DetIdSet dis; // this is the return object
221 
222  if (0.000001 < dR) {
223  if (dR > M_PI / 2.) { // this version needs "small" dR
224  dis = CaloSubdetectorGeometry::getCells(r, dR); // base class version
225  } else {
226  const double dR2(dR * dR);
227  const double reta(r.eta());
228  const double rphi(r.phi());
229  const double lowEta(reta - dR);
230  const double highEta(reta + dR);
231  const double lowPhi(rphi - dR);
232  const double highPhi(rphi + dR);
233 
234  const double hfEtaHi(m_topology.etaMax(HcalForward));
235 
236  if (highEta > -hfEtaHi && lowEta < hfEtaHi) { // in hcal
238 
239  for (unsigned int is(0); is != 4; ++is) {
240  const int sign(reta > 0 ? 1 : -1);
241  const int ieta_center(sign * etaRing(hs[is], fabs(reta)));
242  const int ieta_lo((0 < lowEta * sign ? sign : -sign) * etaRing(hs[is], fabs(lowEta)));
243  const int ieta_hi((0 < highEta * sign ? sign : -sign) * etaRing(hs[is], fabs(highEta)));
244  const int iphi_lo(phiBin(hs[is], ieta_center, lowPhi));
245  const int iphi_hi(phiBin(hs[is], ieta_center, highPhi));
246  const int jphi_lo(iphi_lo > iphi_hi ? iphi_lo - 72 : iphi_lo);
247  const int jphi_hi(iphi_hi);
248 
249  const int idep_lo(1 == is ? 4 : 1);
250  const int idep_hi(m_topology.maxDepth(hs[is]));
251  for (int ieta(ieta_lo); ieta <= ieta_hi; ++ieta) { // over eta limits
252  if (ieta != 0) {
253  for (int jphi(jphi_lo); jphi <= jphi_hi; ++jphi) { // over phi limits
254  const int iphi(1 > jphi ? jphi + 72 : jphi);
255  for (int idep(idep_lo); idep <= idep_hi; ++idep) {
256  const HcalDetId did(hs[is], ieta, iphi, idep);
257  if (m_topology.valid(did)) {
258  std::shared_ptr<const CaloCellGeometry> cell(getGeometryBase(did));
259  if (nullptr != cell) {
260  const GlobalPoint& p(cell->getPosition());
261  const double eta(p.eta());
262  const double phi(p.phi());
263  if (reco::deltaR2(eta, phi, reta, rphi) < dR2)
264  dis.insert(did);
265  }
266  }
267  }
268  }
269  }
270  }
271  }
272  }
273  }
274  }
275  return dis;
276 }

References reco::deltaR2(), HGC3DClusterGenMatchSelector_cfi::dR, PVValHelper::eta, HcalTopology::etaMax(), etaRing(), CaloSubdetectorGeometry::getCells(), getGeometryBase(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, M_PI, m_topology, HcalTopology::maxDepth(), AlCaHLTBitMon_ParallelJobs::p, phi, phiBin(), alignCSCRings::r, Validation_hcalonly_cfi::sign, and HcalTopology::valid().

◆ getClosestCell() [1/2]

DetId HcalGeometry::getClosestCell ( const GlobalPoint r) const
overridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 106 of file HcalGeometry.cc.

106 { return getClosestCell(r, false); }

References alignCSCRings::r.

Referenced by ValidIsoTrkCalib::analyze(), and PFCandidateRecalibrator::produce().

◆ getClosestCell() [2/2]

DetId HcalGeometry::getClosestCell ( const GlobalPoint r,
bool  ignoreCorrect 
) const

Definition at line 108 of file HcalGeometry.cc.

108  {
109  // Now find the closest eta_bin, eta value of a bin i is average
110  // of eta[i] and eta[i-1]
111  static const double z_long = 1100.0;
112  double abseta = fabs(r.eta());
113  double absz = fabs(r.z());
114 
115  // figure out subdetector, giving preference to HE in HE/HF overlap region
117  if (abseta <= m_topology.etaMax(HcalBarrel)) {
118  bc = HcalBarrel;
119  } else if (absz >= z_long) {
120  bc = HcalForward;
121  } else if (abseta <= m_topology.etaMax(HcalEndcap)) {
122  bc = HcalEndcap;
123  } else {
124  bc = HcalForward;
125  }
126 
127  // find eta bin
128  int etaring = etaRing(bc, abseta);
129 
130  int phibin = phiBin(bc, etaring, r.phi());
131 
132  // add a sign to the etaring
133  int etabin = (r.z() > 0) ? etaring : -etaring;
134 
135  if (bc == HcalForward) {
136  static const double z_short = 1137.0;
137  // Next line is premature depth 1 and 2 can coexist for large z-extent
138  // HcalDetId bestId(bc,etabin,phibin,((fabs(r.z())>=z_short)?(2):(1)));
139  // above line is no good with finite precision
140  HcalDetId bestId(bc, etabin, phibin, ((fabs(r.z()) - z_short > -0.1) ? (2) : (1)));
141  return correctId(bestId);
142  } else {
143  //Now do depth if required
144  int zside = (r.z() > 0) ? 1 : -1;
145  int dbin = m_topology.dddConstants()->getMinDepth(((int)(bc)-1), etaring, phibin, zside);
146  double pointrz(0), drz(99999.);
147  HcalDetId currentId(bc, etabin, phibin, dbin);
148  if (bc == HcalBarrel)
149  pointrz = r.mag();
150  else
151  pointrz = std::abs(r.z());
152  HcalDetId bestId;
153  for (; currentId != HcalDetId(); m_topology.incrementDepth(currentId)) {
154  std::shared_ptr<const CaloCellGeometry> cell = getGeometry(currentId);
155  if (cell == nullptr) {
156  assert(bestId != HcalDetId());
157  break;
158  } else {
159  double rz;
160  if (bc == HcalEndcap)
161  rz = std::abs(cell->getPosition().z());
162  else
163  rz = cell->getPosition().mag();
164  if (std::abs(pointrz - rz) < drz) {
165  bestId = currentId;
166  drz = std::abs(pointrz - rz);
167  }
168  }
169  }
170 #ifdef EDM_ML_DEBUG
171  std::cout << bestId << " Corrected to " << HcalDetId(correctId(bestId)) << std::endl;
172 #endif
173 
174  return (ignoreCorrect ? bestId : correctId(bestId));
175  }
176 }

References funct::abs(), cms::cuda::assert(), correctId(), gather_cfg::cout, HcalTopology::dddConstants(), HcalTopology::etaMax(), etaRing(), getGeometry(), HcalDDDRecConstants::getMinDepth(), HcalBarrel, HcalEmpty, HcalEndcap, HcalForward, HcalTopology::incrementDepth(), m_topology, phiBin(), alignCSCRings::r, and ecaldqm::zside().

◆ getCorners()

CaloCellGeometry::CornersVec HcalGeometry::getCorners ( const DetId id) const

Definition at line 196 of file HcalGeometry.cc.

196  {
197  if (!m_mergePosition) {
198  return (getGeometryBase(id)->getCorners());
199  } else {
200  std::vector<HcalDetId> ids;
205  for (unsigned int k = 0; k < 4; ++k) {
206  mcorners[k] = mcf[k];
207  mcorners[k + 4] = mcb[k + 4];
208  }
209  return mcorners;
210  }
211 }

References getGeometryBase(), dqmdumpme::k, m_mergePosition, m_topology, and HcalTopology::unmergeDepthDetId().

◆ getGeometry()

std::shared_ptr< const CaloCellGeometry > HcalGeometry::getGeometry ( const DetId id) const
overridevirtual

Get the cell geometry of a given detector id. Should return false if not found.

Reimplemented from CaloSubdetectorGeometry.

Definition at line 88 of file HcalGeometry.cc.

88  {
89 #ifdef EDM_ML_DEBUG
90  std::cout << "HcalGeometry::getGeometry for " << HcalDetId(id) << " " << m_mergePosition << " ";
91 #endif
92  if (!m_mergePosition) {
93 #ifdef EDM_ML_DEBUG
94  std::cout << m_topology.detId2denseId(id) << " " << getGeometryBase(id) << "\n";
95 #endif
96  return getGeometryBase(id);
97  } else {
98 #ifdef EDM_ML_DEBUG
100  << "\n";
101 #endif
102  return getGeometryBase(m_topology.idFront(id));
103  }
104 }

References gather_cfg::cout, HcalTopology::detId2denseId(), getGeometryBase(), HcalTopology::idFront(), m_mergePosition, and m_topology.

Referenced by getClosestCell().

◆ getGeometryBase()

std::shared_ptr<const CaloCellGeometry> HcalGeometry::getGeometryBase ( const DetId id) const
inlineprivate

◆ getGeometryRawPtr()

const CaloCellGeometry * HcalGeometry::getGeometryRawPtr ( uint32_t  index) const
overrideprotectedvirtual

Implements CaloSubdetectorGeometry.

Definition at line 450 of file HcalGeometry.cc.

450  {
451  // Modify the RawPtr class
452  const CaloCellGeometry* cell(nullptr);
453  if (m_hbCellVec.size() > din) {
454  cell = (&m_hbCellVec[din]);
455  } else if (m_hbCellVec.size() + m_heCellVec.size() > din) {
456  const unsigned int ind(din - m_hbCellVec.size());
457  cell = (&m_heCellVec[ind]);
458  } else if (m_hbCellVec.size() + m_heCellVec.size() + m_hoCellVec.size() > din) {
459  const unsigned int ind(din - m_hbCellVec.size() - m_heCellVec.size());
460  cell = (&m_hoCellVec[ind]);
461  } else if (m_hbCellVec.size() + m_heCellVec.size() + m_hoCellVec.size() + m_hfCellVec.size() > din) {
462  const unsigned int ind(din - m_hbCellVec.size() - m_heCellVec.size() - m_hoCellVec.size());
463  cell = (&m_hfCellVec[ind]);
464  }
465 
466  return ((nullptr == cell || nullptr == cell->param()) ? nullptr : cell);
467 }

References cropTnPTrees::din, m_hbCellVec, m_heCellVec, m_hfCellVec, m_hoCellVec, and CaloCellGeometry::param().

◆ getHxSize()

unsigned int HcalGeometry::getHxSize ( const int  type) const

Definition at line 278 of file HcalGeometry.cc.

278  {
279  unsigned int hxsize(0);
280  if (!m_hbIds.isSet())
281  fillDetIds();
282  if (type == 1)
283  hxsize = (m_hbIds.isSet()) ? m_hbIds->size() : 0;
284  else if (type == 2)
285  hxsize = (m_heIds.isSet()) ? m_heIds->size() : 0;
286  else if (type == 3)
287  hxsize = (m_hoIds.isSet()) ? m_hoIds->size() : 0;
288  else if (type == 4)
289  hxsize = (m_hfIds.isSet()) ? m_hfIds->size() : 0;
290  else if (type == 0)
291  hxsize = (m_emptyIds.isSet()) ? m_emptyIds->size() : 0;
292  return hxsize;
293 }

References fillDetIds(), edm::AtomicPtrCache< T >::isSet(), m_emptyIds, m_hbIds, m_heIds, m_hfIds, and m_hoIds.

Referenced by HcalDigisValidation::dqmBeginRun(), and HcalRecHitsAnalyzer::dqmBeginRun().

◆ getPosition()

GlobalPoint HcalGeometry::getPosition ( const DetId id) const

◆ getSummary()

void HcalGeometry::getSummary ( CaloSubdetectorGeometry::TrVec trVector,
CaloSubdetectorGeometry::IVec iVector,
CaloSubdetectorGeometry::DimVec dimVector,
CaloSubdetectorGeometry::IVec dinsVector 
) const
overridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 469 of file HcalGeometry.cc.

472  {
473  tVec.reserve(m_topology.ncells() * numberOfTransformParms());
474  iVec.reserve(numberOfShapes() == 1 ? 1 : m_topology.ncells());
475  dVec.reserve(numberOfShapes() * numberOfParametersPerShape());
476  dinsVec.reserve(m_topology.ncells());
477 
478  for (const auto& pv : parVecVec()) {
479  for (float iv : pv) {
480  dVec.emplace_back(iv);
481  }
482  }
483 
484  for (auto i : m_dins) {
485  Tr3D tr;
486  auto ptr = cellGeomPtr(i);
487 
488  if (nullptr != ptr) {
489  dinsVec.emplace_back(i);
490 
491  const CCGFloat* par(ptr->param());
492 
493  unsigned int ishape(9999);
494 
495  for (unsigned int ivv(0); ivv != parVecVec().size(); ++ivv) {
496  bool ok(true);
497  const CCGFloat* pv(&(*parVecVec()[ivv].begin()));
498  for (unsigned int k(0); k != numberOfParametersPerShape(); ++k) {
499  ok = ok && (fabs(par[k] - pv[k]) < 1.e-6);
500  }
501  if (ok) {
502  ishape = ivv;
503  break;
504  }
505  }
506  assert(9999 != ishape);
507 
508  const unsigned int nn((numberOfShapes() == 1) ? (unsigned int)1 : m_dins.size());
509  if (iVec.size() < nn)
510  iVec.emplace_back(ishape);
511 
512  ptr->getTransform(tr, (Pt3DVec*)nullptr);
513 
514  if (Tr3D() == tr) { // for preshower there is no rotation
515  const GlobalPoint& gp(ptr->getPosition());
516  tr = HepGeom::Translate3D(gp.x(), gp.y(), gp.z());
517  }
518 
519  const CLHEP::Hep3Vector tt(tr.getTranslation());
520  tVec.emplace_back(tt.x());
521  tVec.emplace_back(tt.y());
522  tVec.emplace_back(tt.z());
523  if (6 == numberOfTransformParms()) {
524  const CLHEP::HepRotation rr(tr.getRotation());
525  const ROOT::Math::Transform3D rtr(
526  rr.xx(), rr.xy(), rr.xz(), tt.x(), rr.yx(), rr.yy(), rr.yz(), tt.y(), rr.zx(), rr.zy(), rr.zz(), tt.z());
528  rtr.GetRotation(ea);
529  tVec.emplace_back(ea.Phi());
530  tVec.emplace_back(ea.Theta());
531  tVec.emplace_back(ea.Psi());
532  }
533  }
534  }
535 }

References cms::cuda::assert(), begin, CaloSubdetectorGeometry::cellGeomPtr(), runTauDisplay::gp, mps_fire::i, dqmdumpme::k, m_dins, m_topology, HcalTopology::ncells(), groupFilesInBlocks::nn, numberOfParametersPerShape(), numberOfShapes(), CaloSubdetectorGeometry::numberOfTransformParms(), convertSQLiteXML::ok, CaloSubdetectorGeometry::parVecVec(), MetAnalyzer::pv(), findQualityFiles::rr, and groupFilesInBlocks::tt.

◆ getValidDetIds()

const std::vector< DetId > & HcalGeometry::getValidDetIds ( DetId::Detector  det = DetId::Detector(0),
int  subdet = 0 
) const
overridevirtual

Get a list of valid detector ids (for the given subdetector)

Note
The implementation in this class is relevant for SubdetectorGeometries which handle only a single subdetector at a time. It does not look at the det and subdet arguments.

Reimplemented from CaloSubdetectorGeometry.

Definition at line 75 of file HcalGeometry.cc.

75  {
76  if (0 != subdet)
77  fillDetIds();
78  return (0 == subdet
80  : (HcalBarrel == subdet
81  ? *m_hbIds.load()
82  : (HcalEndcap == subdet
83  ? *m_heIds.load()
84  : (HcalOuter == subdet ? *m_hoIds.load()
85  : (HcalForward == subdet ? *m_hfIds.load() : *m_emptyIds.load())))));
86 }

References fillDetIds(), CaloSubdetectorGeometry::getValidDetIds(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, edm::AtomicPtrCache< T >::load(), m_emptyIds, m_hbIds, m_heIds, m_hfIds, and m_hoIds.

Referenced by PFCandidateRecalibrator::beginRun(), HcalHBHEMuonAnalyzer::beginRun(), HcalHBHEMuonHighEtaAnalyzer::beginRun(), cms::MinBias::endJob(), and HCALRecHitAnalyzer::FillGeometry().

◆ increaseReserve()

void HcalGeometry::increaseReserve ( unsigned int  extra)
private

◆ indexFor()

unsigned int HcalGeometry::indexFor ( const DetId id) const
inlineoverrideprotectedvirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 112 of file HcalGeometry.h.

112 { return m_topology.detId2denseId(id); }

References HcalTopology::detId2denseId(), and m_topology.

◆ init()

void HcalGeometry::init ( void  )
private

Definition at line 23 of file HcalGeometry.cc.

23  {
25  m_mergePosition = false;
26 #ifdef EDM_ML_DEBUG
27  std::cout << "HcalGeometry: "
28  << "HcalGeometry::init() "
29  << " HBSize " << m_topology.getHBSize() << " HESize " << m_topology.getHESize() << " HOSize "
30  << m_topology.getHOSize() << " HFSize " << m_topology.getHFSize() << std::endl;
31 #endif
32 
37 }

References gather_cfg::cout, HcalTopology::getHBSize(), HcalTopology::getHESize(), HcalTopology::getHFSize(), HcalTopology::getHOSize(), HcalTopology::getMergePositionFlag(), m_hbCellVec, m_heCellVec, m_hfCellVec, m_hoCellVec, m_mergePosition, and m_topology.

Referenced by HcalGeometry().

◆ localCorners()

void HcalGeometry::localCorners ( Pt3DVec lc,
const CCGFloat pv,
unsigned int  i,
Pt3D ref 
)

◆ newCell()

void HcalGeometry::newCell ( const GlobalPoint f1,
const GlobalPoint f2,
const GlobalPoint f3,
const CCGFloat parm,
const DetId detId 
)
overridevirtual

Implements CaloSubdetectorGeometry.

Definition at line 434 of file HcalGeometry.cc.

435  {
436  unsigned int din = newCellImpl(f1, f2, f3, parm, detId);
437 
438  addValidID(detId);
439  m_dins.emplace_back(din);
440 }

References CaloSubdetectorGeometry::addValidID(), cropTnPTrees::din, DeadROC_duringRun::f1, DeadROC_duringRun::f2, m_dins, and newCellImpl().

◆ newCellFast()

void HcalGeometry::newCellFast ( const GlobalPoint f1,
const GlobalPoint f2,
const GlobalPoint f3,
const CCGFloat parm,
const DetId detId 
)
private

◆ newCellImpl()

unsigned int HcalGeometry::newCellImpl ( const GlobalPoint f1,
const GlobalPoint f2,
const GlobalPoint f3,
const CCGFloat parm,
const DetId detId 
)
private

Definition at line 405 of file HcalGeometry.cc.

406  {
407  assert(detId.det() == DetId::Hcal);
408 
409  const HcalDetId hid(detId);
410  unsigned int din = m_topology.detId2denseId(detId);
411 
412 #ifdef EDM_ML_DEBUG
413  std::cout << "HcalGeometry: "
414  << " newCell subdet " << detId.subdetId() << ", raw ID " << detId.rawId() << ", hid " << hid << ", din "
415  << din << ", index " << std::endl;
416 #endif
417 
418  if (hid.subdet() == HcalBarrel) {
420  } else if (hid.subdet() == HcalEndcap) {
421  const unsigned int index(din - m_hbCellVec.size());
423  } else if (hid.subdet() == HcalOuter) {
424  const unsigned int index(din - m_hbCellVec.size() - m_heCellVec.size());
426  } else {
427  const unsigned int index(din - m_hbCellVec.size() - m_heCellVec.size() - m_hoCellVec.size());
428  m_hfCellVec.at(index) = IdealZPrism(f1, cornersMgr(), parm, hid.depth() == 1 ? IdealZPrism::EM : IdealZPrism::HADR);
429  }
430 
431  return din;
432 }

References cms::cuda::assert(), CaloSubdetectorGeometry::cornersMgr(), gather_cfg::cout, DetId::det(), HcalTopology::detId2denseId(), cropTnPTrees::din, IdealZPrism::EM, DeadROC_duringRun::f1, IdealZPrism::HADR, DetId::Hcal, HcalBarrel, HcalEndcap, HcalOuter, m_hbCellVec, m_heCellVec, m_hfCellVec, m_hoCellVec, m_topology, DetId::rawId(), and DetId::subdetId().

Referenced by newCell(), and newCellFast().

◆ numberOfAlignments()

static unsigned int HcalGeometry::numberOfAlignments ( )
inlinestatic

◆ numberOfBarrelAlignments()

static unsigned int HcalGeometry::numberOfBarrelAlignments ( )
inlinestatic

◆ numberOfEndcapAlignments()

static unsigned int HcalGeometry::numberOfEndcapAlignments ( )
inlinestatic

◆ numberOfForwardAlignments()

static unsigned int HcalGeometry::numberOfForwardAlignments ( )
inlinestatic

◆ numberOfOuterAlignments()

static unsigned int HcalGeometry::numberOfOuterAlignments ( )
inlinestatic

◆ numberOfParametersPerShape()

unsigned int HcalGeometry::numberOfParametersPerShape ( ) const
inlineoverridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 43 of file HcalGeometry.h.

References k_NumberOfParametersPerShape.

Referenced by getSummary().

◆ numberOfShapes()

unsigned int HcalGeometry::numberOfShapes ( ) const
inlineoverridevirtual

◆ phiBin()

int HcalGeometry::phiBin ( HcalSubdetector  bc,
int  etaring,
double  phi 
) const
private

Definition at line 215 of file HcalGeometry.cc.

215  {
216  return m_topology.phiBin(bc, etaring, phi);
217 }

References m_topology, phi, and HcalTopology::phiBin().

Referenced by getCells(), and getClosestCell().

◆ producerTag()

static std::string HcalGeometry::producerTag ( )
inlinestatic

◆ sizeForDenseIndex()

unsigned int HcalGeometry::sizeForDenseIndex ( const DetId id) const
inlineoverrideprotectedvirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 113 of file HcalGeometry.h.

113 { return m_topology.ncells(); }

References m_topology, and HcalTopology::ncells().

◆ sortValidIds()

void HcalGeometry::sortValidIds ( )
private

Definition at line 548 of file HcalGeometry.cc.

548 { std::sort(m_validIds.begin(), m_validIds.end()); }

References CaloSubdetectorGeometry::m_validIds.

Referenced by HcalHardcodeGeometryLoader::load(), and HcalFlexiHardcodeGeometryLoader::load().

◆ topology()

const HcalTopology& HcalGeometry::topology ( ) const
inline

Friends And Related Function Documentation

◆ HcalFlexiHardcodeGeometryLoader

friend class HcalFlexiHardcodeGeometryLoader
friend

Definition at line 21 of file HcalGeometry.h.

◆ HcalGeometryPlan1Tester

friend class HcalGeometryPlan1Tester
friend

Definition at line 18 of file HcalGeometry.h.

◆ HcalHardcodeGeometryLoader

friend class HcalHardcodeGeometryLoader
friend

Definition at line 22 of file HcalGeometry.h.

Member Data Documentation

◆ m_dins

CaloSubdetectorGeometry::IVec HcalGeometry::m_dins
private

Definition at line 152 of file HcalGeometry.h.

Referenced by getSummary(), newCell(), and newCellFast().

◆ m_emptyIds

edm::AtomicPtrCache<std::vector<DetId> > HcalGeometry::m_emptyIds
mutableprivate

Definition at line 151 of file HcalGeometry.h.

Referenced by fillDetIds(), getHxSize(), and getValidDetIds().

◆ m_hbCellVec

HBCellVec HcalGeometry::m_hbCellVec
private

Definition at line 154 of file HcalGeometry.h.

Referenced by getGeometryRawPtr(), init(), and newCellImpl().

◆ m_hbIds

edm::AtomicPtrCache<std::vector<DetId> > HcalGeometry::m_hbIds
mutableprivate

Definition at line 147 of file HcalGeometry.h.

Referenced by fillDetIds(), getHxSize(), and getValidDetIds().

◆ m_heCellVec

HECellVec HcalGeometry::m_heCellVec
private

Definition at line 155 of file HcalGeometry.h.

Referenced by getGeometryRawPtr(), init(), and newCellImpl().

◆ m_heIds

edm::AtomicPtrCache<std::vector<DetId> > HcalGeometry::m_heIds
mutableprivate

Definition at line 148 of file HcalGeometry.h.

Referenced by fillDetIds(), getHxSize(), and getValidDetIds().

◆ m_hfCellVec

HFCellVec HcalGeometry::m_hfCellVec
private

Definition at line 157 of file HcalGeometry.h.

Referenced by getGeometryRawPtr(), init(), and newCellImpl().

◆ m_hfIds

edm::AtomicPtrCache<std::vector<DetId> > HcalGeometry::m_hfIds
mutableprivate

Definition at line 150 of file HcalGeometry.h.

Referenced by fillDetIds(), getHxSize(), and getValidDetIds().

◆ m_hoCellVec

HOCellVec HcalGeometry::m_hoCellVec
private

Definition at line 156 of file HcalGeometry.h.

Referenced by getGeometryRawPtr(), init(), and newCellImpl().

◆ m_hoIds

edm::AtomicPtrCache<std::vector<DetId> > HcalGeometry::m_hoIds
mutableprivate

Definition at line 149 of file HcalGeometry.h.

Referenced by fillDetIds(), getHxSize(), and getValidDetIds().

◆ m_mergePosition

bool HcalGeometry::m_mergePosition
private

Definition at line 145 of file HcalGeometry.h.

Referenced by correctId(), getBackPosition(), getCorners(), getGeometry(), getPosition(), and init().

◆ m_topology

const HcalTopology& HcalGeometry::m_topology
private
HcalGeometry::m_mergePosition
bool m_mergePosition
Definition: HcalGeometry.h:145
mps_fire.i
i
Definition: mps_fire.py:355
HcalGeometry::numberOfAlignments
static unsigned int numberOfAlignments()
Definition: HcalGeometry.h:75
HcalTopology::idFront
HcalDetId idFront(const HcalDetId &id) const
Definition: HcalTopology.h:170
IdealZPrism::HADR
Definition: IdealZPrism.h:28
CaloSubdetectorGeometry::DetIdSet
std::set< DetId > DetIdSet
Definition: CaloSubdetectorGeometry.h:27
groupFilesInBlocks.tt
int tt
Definition: groupFilesInBlocks.py:144
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
findQualityFiles.rr
string rr
Definition: findQualityFiles.py:185
HcalGeometry::newCellImpl
unsigned int newCellImpl(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
Definition: HcalGeometry.cc:405
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
gather_cfg.cout
cout
Definition: gather_cfg.py:144
CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: CaloCellGeometry.cc:4
DetId::Hcal
Definition: DetId.h:28
HcalGeometry::m_hfCellVec
HFCellVec m_hfCellVec
Definition: HcalGeometry.h:157
cms::cuda::assert
assert(be >=bs)
Validation_hcalonly_cfi.sign
sign
Definition: Validation_hcalonly_cfi.py:32
HcalGeometry::m_hbCellVec
HBCellVec m_hbCellVec
Definition: HcalGeometry.h:154
HcalGeometry::init
void init()
Definition: HcalGeometry.cc:23
CaloSubdetectorGeometry::numberOfTransformParms
virtual unsigned int numberOfTransformParms() const
Definition: CaloSubdetectorGeometry.h:94
HcalTopology::mergedDepthDetId
HcalDetId mergedDepthDetId(const HcalDetId &id) const
Definition: HcalTopology.h:166
HcalGeometry::alignmentBarrelIndexLocal
static unsigned int alignmentBarrelIndexLocal(const DetId &id)
Definition: HcalGeometry.cc:347
HcalBarrel
Definition: HcalAssistant.h:33
HcalGeometry::alignmentEndcapIndexLocal
static unsigned int alignmentEndcapIndexLocal(const DetId &id)
Definition: HcalGeometry.cc:351
HcalEmpty
Definition: HcalAssistant.h:32
EZArrayFL< GlobalPoint >
HcalGeometry::numberOfBarrelAlignments
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:65
HcalGeometry::HOCellVec
std::vector< IdealObliquePrism > HOCellVec
Definition: HcalGeometry.h:26
HcalTopology::getMergePositionFlag
bool getMergePositionFlag() const
Definition: HcalTopology.h:167
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
HcalGeometry::detIdFromBarrelAlignmentIndex
static DetId detIdFromBarrelAlignmentIndex(unsigned int i)
Definition: HcalGeometry.cc:295
HcalGeometry::m_hoCellVec
HOCellVec m_hoCellVec
Definition: HcalGeometry.h:156
HcalTopology::etaRing
int etaRing(HcalSubdetector subdet, double eta) const
eta and phi index from eta, phi values
Definition: HcalTopology.cc:997
HcalGeometry::numberOfParametersPerShape
unsigned int numberOfParametersPerShape() const override
Definition: HcalGeometry.h:43
edm::AtomicPtrCache::isSet
bool isSet() const
Definition: AtomicPtrCache.h:122
HcalGeometry::m_topology
const HcalTopology & m_topology
Definition: HcalGeometry.h:144
HcalGeometry::numberOfOuterAlignments
static unsigned int numberOfOuterAlignments()
Definition: HcalGeometry.h:71
HcalGeometry::m_emptyIds
edm::AtomicPtrCache< std::vector< DetId > > m_emptyIds
Definition: HcalGeometry.h:151
HcalTopology::getHESize
unsigned int getHESize() const
Definition: HcalTopology.h:133
edm::AtomicPtrCache::set
bool set(std::unique_ptr< T > iNewValue) const
Definition: AtomicPtrCache.h:127
HcalTopology::maxDepth
int maxDepth(void) const
Definition: HcalTopology.cc:980
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
DetId
Definition: DetId.h:17
CaloSubdetectorGeometry::getCells
virtual DetIdSet getCells(const GlobalPoint &r, double dR) const
Get a list of all cells within a dR of the given cell.
Definition: CaloSubdetectorGeometry.cc:66
HcalGeometry::HECellVec
std::vector< IdealObliquePrism > HECellVec
Definition: HcalGeometry.h:25
IdealObliquePrism
Definition: IdealObliquePrism.h:28
edm::AtomicPtrCache::load
T const * load() const
Definition: AtomicPtrCache.h:117
HcalGeometry::detIdFromForwardAlignmentIndex
static DetId detIdFromForwardAlignmentIndex(unsigned int i)
Definition: HcalGeometry.cc:309
PVValHelper::eta
Definition: PVValidationHelpers.h:69
HcalObjRepresent::isHF
bool isHF(int etabin, int depth)
Definition: HcalObjRepresent.h:880
CaloSubdetectorGeometry::m_validIds
std::vector< DetId > m_validIds
Definition: CaloSubdetectorGeometry.h:115
Tr3D
CaloCellGeometry::Tr3D Tr3D
Definition: CaloCellGeometry.cc:7
HcalGeometry::phiBin
int phiBin(HcalSubdetector bc, int etaring, double phi) const
Definition: HcalGeometry.cc:215
HcalOuter
Definition: HcalAssistant.h:35
dqmdumpme.k
k
Definition: dqmdumpme.py:60
Point3DBase< float, GlobalTag >
HcalGeometry::alignmentOuterIndexLocal
static unsigned int alignmentOuterIndexLocal(const DetId &id)
Definition: HcalGeometry.cc:359
HcalTopology::detId2denseId
unsigned int detId2denseId(const DetId &id) const override
return a linear packed id
Definition: HcalTopology.cc:1518
CaloSubdetectorGeometry::getValidDetIds
virtual const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const
Get a list of valid detector ids (for the given subdetector)
Definition: CaloSubdetectorGeometry.cc:32
IdealZPrism
Definition: IdealZPrism.h:26
IdealObliquePrism::localCorners
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: IdealObliquePrism.cc:45
HcalDDDRecConstants::getMinDepth
int getMinDepth(const int &itype, const int &ieta, const int &iphi, const int &zside) const
Definition: HcalDDDRecConstants.cc:353
HcalTopology::denseId2detId
DetId denseId2detId(unsigned int) const override
return a linear packed id
Definition: HcalTopology.cc:1561
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
Tr3D
CaloCellGeometry::Tr3D Tr3D
Definition: HcalGeometry.cc:12
HcalGeometry::getGeometry
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const override
Get the cell geometry of a given detector id. Should return false if not found.
Definition: HcalGeometry.cc:88
HcalTopology::getHFSize
unsigned int getHFSize() const
Definition: HcalTopology.h:135
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
HcalGeometry::HBCellVec
std::vector< IdealObliquePrism > HBCellVec
Definition: HcalGeometry.h:24
HcalGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Definition: HcalGeometry.cc:178
HcalGeometry::getCorners
CaloCellGeometry::CornersVec getCorners(const DetId &id) const
Definition: HcalGeometry.cc:196
HcalGeometry::m_heCellVec
HECellVec m_heCellVec
Definition: HcalGeometry.h:155
IdealZPrism::localCorners
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: IdealZPrism.cc:72
cropTnPTrees.din
din
Definition: cropTnPTrees.py:30
HcalTopology::getHOSize
unsigned int getHOSize() const
Definition: HcalTopology.h:134
HcalTopology::getHBSize
unsigned int getHBSize() const
Definition: HcalTopology.h:132
CaloCellGeometry
Definition: CaloCellGeometry.h:50
DeadROC_duringRun.f2
f2
Definition: DeadROC_duringRun.py:220
reco::deltaR2
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
HcalTopology::dddConstants
const HcalDDDRecConstants * dddConstants() const
Definition: HcalTopology.h:164
HcalDetId::subdet
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
HcalDetId
Definition: HcalDetId.h:12
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
CaloSubdetectorGeometry::addValidID
void addValidID(const DetId &id)
Definition: CaloSubdetectorGeometry.cc:27
HcalGeometry::fillDetIds
void fillDetIds() const
Definition: HcalGeometry.cc:39
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
HcalObjRepresent::isHE
bool isHE(int etabin, int depth)
Definition: HcalObjRepresent.h:851
HcalGeometry::numberOfForwardAlignments
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:69
align::EulerAngles
AlgebraicVector EulerAngles
Definition: Definitions.h:34
HcalGeometry::m_dins
CaloSubdetectorGeometry::IVec m_dins
Definition: HcalGeometry.h:152
HcalGeometry::alignmentForwardIndexLocal
static unsigned int alignmentForwardIndexLocal(const DetId &id)
Definition: HcalGeometry.cc:355
IdealZPrism::EM
Definition: IdealZPrism.h:28
alignCSCRings.r
r
Definition: alignCSCRings.py:93
groupFilesInBlocks.nn
nn
Definition: groupFilesInBlocks.py:150
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
HcalForward
Definition: HcalAssistant.h:36
HcalTopology::valid
bool valid(const DetId &id) const override
Definition: HcalTopology.cc:225
DDAxes::phi
HcalGeometry::alignmentBarEndForIndexLocal
static unsigned int alignmentBarEndForIndexLocal(const DetId &id, unsigned int nD)
Definition: HcalGeometry.cc:338
HcalTopology::etaMax
double etaMax(HcalSubdetector subdet) const
Definition: HcalTopology.cc:1100
HcalGeometry::m_hbIds
edm::AtomicPtrCache< std::vector< DetId > > m_hbIds
Definition: HcalGeometry.h:147
HcalGeometry::m_hoIds
edm::AtomicPtrCache< std::vector< DetId > > m_hoIds
Definition: HcalGeometry.h:149
type
type
Definition: HCALResponse.h:21
eostools.move
def move(src, dest)
Definition: eostools.py:511
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
CaloSubdetectorGeometry::cornersMgr
CaloCellGeometry::CornersMgr * cornersMgr()
Definition: CaloSubdetectorGeometry.h:82
HcalEndcap
Definition: HcalAssistant.h:34
HcalTopology::incrementDepth
bool incrementDepth(HcalDetId &id) const
Definition: HcalTopology.cc:869
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
HcalTopology::getNumberOfShapes
unsigned int getNumberOfShapes() const
Definition: HcalTopology.h:161
HcalGeometry::k_NumberOfParametersPerShape
Definition: HcalGeometry.h:38
HcalGeometry::numberOfEndcapAlignments
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:67
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
HcalTopology::ncells
unsigned int ncells() const override
return a count of valid cells (for dense indexing use)
Definition: HcalTopology.cc:1686
HcalGeometry::etaRing
int etaRing(HcalSubdetector bc, double abseta) const
helper methods for getClosestCell
Definition: HcalGeometry.cc:213
HcalTopology::unmergeDepthDetId
void unmergeDepthDetId(const HcalDetId &id, std::vector< HcalDetId > &ids) const
Definition: HcalTopology.h:168
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
Pt3DVec
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: CaloCellGeometry.cc:6
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HcalGeometry::topology
const HcalTopology & topology() const
Definition: HcalGeometry.h:109
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
HcalGeometry::HFCellVec
std::vector< IdealZPrism > HFCellVec
Definition: HcalGeometry.h:27
HcalGeometry::getGeometryBase
std::shared_ptr< const CaloCellGeometry > getGeometryBase(const DetId &id) const
Definition: HcalGeometry.h:120
CaloSubdetectorGeometry::parVecVec
ParVecVec & parVecVec()
Definition: CaloSubdetectorGeometry.h:89
CaloSubdetectorGeometry::cellGeomPtr
virtual std::shared_ptr< const CaloCellGeometry > cellGeomPtr(uint32_t index) const
Definition: CaloSubdetectorGeometry.cc:260
DeadROC_duringRun.f1
f1
Definition: DeadROC_duringRun.py:219
HcalGeometry::m_heIds
edm::AtomicPtrCache< std::vector< DetId > > m_heIds
Definition: HcalGeometry.h:148
HcalGeometry::detIdFromOuterAlignmentIndex
static DetId detIdFromOuterAlignmentIndex(unsigned int i)
Definition: HcalGeometry.cc:316
HcalGeometry::m_hfIds
edm::AtomicPtrCache< std::vector< DetId > > m_hfIds
Definition: HcalGeometry.h:150
begin
#define begin
Definition: vmac.h:32
HcalGeometry::correctId
DetId correctId(const DetId &id) const
Definition: HcalGeometry.cc:537
HcalGeometry::numberOfShapes
unsigned int numberOfShapes() const override
Definition: HcalGeometry.h:42
HcalObjRepresent::isHB
bool isHB(int etabin, int depth)
Definition: HcalObjRepresent.h:827
HcalTopology::phiBin
int phiBin(HcalSubdetector subdet, int etaRing, double phi) const
Definition: HcalTopology.cc:1020
HcalGeometry::detIdFromEndcapAlignmentIndex
static DetId detIdFromEndcapAlignmentIndex(unsigned int i)
Definition: HcalGeometry.cc:302
HcalGeometry::getClosestCell
DetId getClosestCell(const GlobalPoint &r) const override
Definition: HcalGeometry.cc:106