test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
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
< IdealObliquePrism
HBCellVec
 
typedef std::vector
< IdealObliquePrism
HECellVec
 
typedef std::vector< IdealZPrismHFCellVec
 
typedef std::vector
< IdealObliquePrism
HOCellVec
 
typedef PHcalRcd PGeometryRecord
 
typedef CaloCellGeometry::Pt3D Pt3D
 
typedef CaloCellGeometry::Pt3DVec Pt3DVec
 
- Public Types inherited from CaloSubdetectorGeometry
typedef CaloCellGeometry::CCGFloat CCGFloat
 
typedef std::vector
< CaloCellGeometry const * > 
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

virtual
CaloSubdetectorGeometry::DetIdSet 
getCells (const GlobalPoint &r, double dR) const
 Get a list of all cells within a dR of the given cell. More...
 
virtual DetId getClosestCell (const GlobalPoint &r) const
 
virtual const CaloCellGeometrygetGeometry (const DetId &id) const
 Get the cell geometry of a given detector id. Should return false if not found. More...
 
unsigned int getHxSize (const int type) const
 
virtual void getSummary (CaloSubdetectorGeometry::TrVec &trVector, CaloSubdetectorGeometry::IVec &iVector, CaloSubdetectorGeometry::DimVec &dimVector, CaloSubdetectorGeometry::IVec &dinsVector) const
 
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) More...
 
 HcalGeometry (const HcalTopology &topology)
 
void localCorners (Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
 
virtual void newCell (const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
 
virtual unsigned int numberOfParametersPerShape () const
 
virtual unsigned int numberOfShapes () const
 
const HcalTopologytopology () const
 
virtual ~HcalGeometry ()
 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 ()
 
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
 
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

virtual const CaloCellGeometrycellGeomPtr (unsigned int index) const
 
virtual unsigned int indexFor (const DetId &id) const
 
virtual unsigned int sizeForDenseIndex (const DetId &id) const
 
- Protected Member Functions inherited from CaloSubdetectorGeometry
void addValidID (const DetId &id)
 
virtual const CaloCellGeometrycellGeomPtr (uint32_t index) const =0
 

Private Member Functions

int etaRing (HcalSubdetector bc, double abseta) const
 helper methods for getClosestCell More...
 
void fillDetIds () const
 
void init ()
 
int phiBin (HcalSubdetector bc, int etaring, double phi) const
 

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
 
const HcalTopologym_topology
 

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 14 of file HcalGeometry.h.

Member Typedef Documentation

Definition at line 28 of file HcalGeometry.h.

Definition at line 27 of file HcalGeometry.h.

Definition at line 23 of file HcalGeometry.h.

Definition at line 30 of file HcalGeometry.h.

Definition at line 18 of file HcalGeometry.h.

Definition at line 19 of file HcalGeometry.h.

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

Definition at line 21 of file HcalGeometry.h.

Definition at line 20 of file HcalGeometry.h.

Definition at line 29 of file HcalGeometry.h.

Definition at line 24 of file HcalGeometry.h.

Definition at line 25 of file HcalGeometry.h.

Member Enumeration Documentation

anonymous enum
Enumerator
k_NumberOfParametersPerShape 

Definition at line 33 of file HcalGeometry.h.

Constructor & Destructor Documentation

HcalGeometry::HcalGeometry ( const HcalTopology topology)
explicit

Definition at line 14 of file HcalGeometry.cc.

References init().

14  :
15  m_topology( topology ) {
16  init();
17 }
const HcalTopology & m_topology
Definition: HcalGeometry.h:127
HcalGeometry::~HcalGeometry ( )
virtual

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

Definition at line 19 of file HcalGeometry.cc.

19 {}

Member Function Documentation

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

Definition at line 270 of file HcalGeometry.cc.

References assert(), HcalDetId::ieta(), cmsHarvester::index, and HcalDetId::iphi().

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

271  {
272  const HcalDetId hid ( id ) ;
273  const unsigned int iphi ( hid.iphi() ) ;
274  const int ieta ( hid.ieta() ) ;
275  const unsigned int index ( ( 0 < ieta ? nD/2 : 0 ) + ( iphi + 1 )%72/4 ) ;
276  assert( index < nD ) ;
277  return index ;
278 }
assert(m_qm.get())
unsigned int HcalGeometry::alignmentBarrelIndexLocal ( const DetId id)
static

Definition at line 280 of file HcalGeometry.cc.

References alignmentBarEndForIndexLocal(), and numberOfBarrelAlignments().

Referenced by alignmentTransformIndexLocal().

280  {
282 }
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:56
static unsigned int alignmentBarEndForIndexLocal(const DetId &id, unsigned int nD)
unsigned int HcalGeometry::alignmentEndcapIndexLocal ( const DetId id)
static

Definition at line 284 of file HcalGeometry.cc.

References alignmentBarEndForIndexLocal(), and numberOfEndcapAlignments().

Referenced by alignmentTransformIndexLocal().

284  {
286 }
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:58
static unsigned int alignmentBarEndForIndexLocal(const DetId &id, unsigned int nD)
unsigned int HcalGeometry::alignmentForwardIndexLocal ( const DetId id)
static

Definition at line 288 of file HcalGeometry.cc.

References alignmentBarEndForIndexLocal(), and numberOfForwardAlignments().

Referenced by alignmentTransformIndexLocal().

288  {
290 }
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:60
static unsigned int alignmentBarEndForIndexLocal(const DetId &id, unsigned int nD)
unsigned int HcalGeometry::alignmentOuterIndexLocal ( const DetId id)
static

Definition at line 292 of file HcalGeometry.cc.

References assert(), HcalDetId::ieta(), cmsHarvester::index, HcalDetId::iphi(), numberOfOuterAlignments(), and relativeConstraints::ring.

Referenced by alignmentTransformIndexLocal().

292  {
293  const HcalDetId hid ( id ) ;
294  const int ieta ( hid.ieta() ) ;
295  const int iphi ( hid.iphi() ) ;
296  const int ring ( ieta < -10 ? 0 :
297  ( ieta < -4 ? 1 :
298  ( ieta < 5 ? 2 :
299  ( ieta < 11 ? 3 : 4 ) ) ) ) ;
300 
301  const unsigned int index ( 12*ring + ( iphi - 1 )/6 ) ;
303  return index ;
304 }
assert(m_qm.get())
static unsigned int numberOfOuterAlignments()
Definition: HcalGeometry.h:62
unsigned int HcalGeometry::alignmentTransformIndexGlobal ( const DetId id)
static

Definition at line 330 of file HcalGeometry.cc.

References DetId::Hcal.

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

330  {
331  return (unsigned int)DetId::Hcal - 1 ;
332 }
unsigned int HcalGeometry::alignmentTransformIndexLocal ( const DetId id)
static

Definition at line 306 of file HcalGeometry.cc.

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

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

306  {
307  assert(id.det() == DetId::Hcal) ;
308 
309  const HcalDetId hid ( id ) ;
310  bool isHB = (hid.subdet() == HcalBarrel);
311  bool isHE = (hid.subdet() == HcalEndcap);
312  bool isHF = (hid.subdet() == HcalForward);
313  // bool isHO = (hid.subdet() == HcalOuter);
314 
315  const unsigned int nB ( numberOfBarrelAlignments() ) ;
316  const unsigned int nE ( numberOfEndcapAlignments() ) ;
317  const unsigned int nF ( numberOfForwardAlignments() ) ;
318  // const unsigned int nO ( numberOfOuterAlignments() ) ;
319 
320  const unsigned int index (isHB ? alignmentBarrelIndexLocal(id) :
321  isHE ? alignmentEndcapIndexLocal(id) + nB :
322  isHF ? alignmentForwardIndexLocal( id ) + nB + nE :
323  alignmentOuterIndexLocal(id) + nB + nE + nF
324  );
325 
327  return index ;
328 }
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:56
static unsigned int alignmentEndcapIndexLocal(const DetId &id)
assert(m_qm.get())
bool isHE(int etabin, int depth)
bool isHB(int etabin, int depth)
static unsigned int alignmentBarrelIndexLocal(const DetId &id)
static unsigned int alignmentOuterIndexLocal(const DetId &id)
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:58
bool isHF(int etabin, int depth)
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:60
static unsigned int alignmentForwardIndexLocal(const DetId &id)
static unsigned int numberOfAlignments()
Definition: HcalGeometry.h:66
const CaloCellGeometry * HcalGeometry::cellGeomPtr ( unsigned int  index) const
protectedvirtual

Definition at line 385 of file HcalGeometry.cc.

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

Referenced by getGeometry(), and getSummary().

385  {
386  const CaloCellGeometry* cell ( 0 ) ;
387  if( m_hbCellVec.size() > din ) {
388  cell = &m_hbCellVec[ din ] ;
389  } else {
390  if (m_hbCellVec.size() + m_heCellVec.size() > din) {
391  const unsigned int index (din - m_hbCellVec.size() ) ;
392  cell = &m_heCellVec[ index ] ;
393  } else if (m_hbCellVec.size()+m_heCellVec.size()+m_hoCellVec.size() > din) {
394  const unsigned int index (din - m_hbCellVec.size() - m_heCellVec.size());
395  cell = &m_hoCellVec[ index ] ;
396  } else if (m_hbCellVec.size() + m_heCellVec.size() + m_hoCellVec.size() +
397  m_hfCellVec.size() > din) {
398  const unsigned int index (din - m_hbCellVec.size() - m_heCellVec.size() -
399  m_hoCellVec.size() ) ;
400  cell = &m_hfCellVec[ index ] ;
401  }
402  }
403 
404  return (( 0 == cell || 0 == cell->param()) ? 0 : cell ) ;
405 }
HBCellVec m_hbCellVec
Definition: HcalGeometry.h:136
HOCellVec m_hoCellVec
Definition: HcalGeometry.h:138
HFCellVec m_hfCellVec
Definition: HcalGeometry.h:139
HECellVec m_heCellVec
Definition: HcalGeometry.h:137
static std::string HcalGeometry::dbString ( )
inlinestatic

Definition at line 35 of file HcalGeometry.h.

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

35 { return "PHcalRcd" ; }
DetId HcalGeometry::detIdFromBarrelAlignmentIndex ( unsigned int  i)
static

Definition at line 224 of file HcalGeometry.cc.

References assert(), HcalBarrel, and numberOfBarrelAlignments().

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

224  {
226  const int ieta ( i < numberOfBarrelAlignments()/2 ? -1 : 1 ) ;
227  const int iphi ( 1 + (4*i)%72 ) ;
228  return HcalDetId( HcalBarrel, ieta, iphi, 1 ) ;
229 }
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:56
int i
Definition: DBlmapReader.cc:9
assert(m_qm.get())
DetId HcalGeometry::detIdFromEndcapAlignmentIndex ( unsigned int  i)
static

Definition at line 231 of file HcalGeometry.cc.

References assert(), HcalEndcap, and numberOfEndcapAlignments().

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

231  {
233  const int ieta ( i < numberOfEndcapAlignments()/2 ? -16 : 16 ) ;
234  const int iphi ( 1 + (4*i)%72 ) ;
235  return HcalDetId( HcalEndcap, ieta, iphi, 1 ) ;
236 }
int i
Definition: DBlmapReader.cc:9
assert(m_qm.get())
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:58
DetId HcalGeometry::detIdFromForwardAlignmentIndex ( unsigned int  i)
static

Definition at line 238 of file HcalGeometry.cc.

References assert(), HcalForward, and numberOfForwardAlignments().

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

238  {
240  const int ieta ( i < numberOfForwardAlignments()/2 ? -29 : 29 ) ;
241  const int iphi ( 1 + (4*i)%72 ) ;
242  return HcalDetId( HcalForward, ieta, iphi, 1 ) ;
243 }
int i
Definition: DBlmapReader.cc:9
assert(m_qm.get())
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:60
DetId HcalGeometry::detIdFromLocalAlignmentIndex ( unsigned int  i)
static

Definition at line 256 of file HcalGeometry.cc.

References assert(), detIdFromBarrelAlignmentIndex(), detIdFromEndcapAlignmentIndex(), detIdFromForwardAlignmentIndex(), detIdFromOuterAlignmentIndex(), numberOfAlignments(), numberOfBarrelAlignments(), numberOfEndcapAlignments(), and numberOfForwardAlignments().

256  {
257  assert( i < numberOfAlignments() ) ;
258 
259  const unsigned int nB ( numberOfBarrelAlignments() ) ;
260  const unsigned int nE ( numberOfEndcapAlignments() ) ;
261  const unsigned int nF ( numberOfForwardAlignments() ) ;
262 // const unsigned int nO ( numberOfOuterAlignments() ) ;
263 
264  return ( i < nB ? detIdFromBarrelAlignmentIndex( i ) :
265  i < nB+nE ? detIdFromEndcapAlignmentIndex( i - nB ) :
266  i < nB+nE+nF ? detIdFromForwardAlignmentIndex( i - nB - nE ) :
267  detIdFromOuterAlignmentIndex( i - nB - nE - nF ) ) ;
268 }
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:56
int i
Definition: DBlmapReader.cc:9
static DetId detIdFromOuterAlignmentIndex(unsigned int i)
assert(m_qm.get())
static DetId detIdFromForwardAlignmentIndex(unsigned int i)
static DetId detIdFromBarrelAlignmentIndex(unsigned int i)
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:58
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:60
static DetId detIdFromEndcapAlignmentIndex(unsigned int i)
static unsigned int numberOfAlignments()
Definition: HcalGeometry.h:66
DetId HcalGeometry::detIdFromOuterAlignmentIndex ( unsigned int  i)
static

Definition at line 245 of file HcalGeometry.cc.

References assert(), HcalOuter, numberOfOuterAlignments(), and relativeConstraints::ring.

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

245  {
247  const int ring ( i/12 ) ;
248  const int ieta ( 0 == ring ? -11 :
249  1 == ring ? -5 :
250  2 == ring ? 1 :
251  3 == ring ? 5 : 11 ) ;
252  const int iphi ( 1 + ( i - ring*12 )*6 ) ;
253  return HcalDetId( HcalOuter, ieta, iphi, 4 ) ;
254 }
int i
Definition: DBlmapReader.cc:9
assert(m_qm.get())
static unsigned int numberOfOuterAlignments()
Definition: HcalGeometry.h:62
int HcalGeometry::etaRing ( HcalSubdetector  bc,
double  abseta 
) const
private

helper methods for getClosestCell

Definition at line 145 of file HcalGeometry.cc.

References HcalTopology::etaRing(), and m_topology.

Referenced by getCells(), and getClosestCell().

145  {
146  return m_topology.etaRing(bc, abseta);
147 }
const HcalTopology & m_topology
Definition: HcalGeometry.h:127
int etaRing(HcalSubdetector subdet, double eta) const
eta and phi index from eta, phi values
void HcalGeometry::fillDetIds ( ) const
private

Definition at line 34 of file HcalGeometry.cc.

References CaloSubdetectorGeometry::getValidDetIds(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, i, 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().

34  {
35  if(!m_emptyIds.isSet()) {
36  std::unique_ptr<std::vector<DetId>> p_hbIds{new std::vector<DetId>};
37  std::unique_ptr<std::vector<DetId>> p_heIds{new std::vector<DetId>};
38  std::unique_ptr<std::vector<DetId>> p_hoIds{new std::vector<DetId>};
39  std::unique_ptr<std::vector<DetId>> p_hfIds{new std::vector<DetId>};
40  std::unique_ptr<std::vector<DetId>> p_emptyIds{new std::vector<DetId>};
41 
42  const std::vector<DetId>& baseIds (CaloSubdetectorGeometry::getValidDetIds());
43  for (unsigned int i ( 0 ) ; i != baseIds.size() ; ++i) {
44  const DetId id ( baseIds[i] );
45  if (id.subdetId() == HcalBarrel) {
46  p_hbIds->push_back( id ) ;
47  } else if (id.subdetId() == HcalEndcap) {
48  p_heIds->push_back( id ) ;
49  } else if (id.subdetId() == HcalOuter) {
50  p_hoIds->push_back( id ) ;
51  } else if (id.subdetId() == HcalForward) {
52  p_hfIds->push_back( id ) ;
53  }
54  }
55  std::sort( p_hbIds->begin(), p_hbIds->end() ) ;
56  std::sort( p_heIds->begin(), p_heIds->end() ) ;
57  std::sort( p_hoIds->begin(), p_hoIds->end() ) ;
58  std::sort( p_hfIds->begin(), p_hfIds->end() ) ;
59  p_emptyIds->resize( 0 ) ;
60 
61  m_hbIds.set(std::move(p_hbIds));
62  m_heIds.set(std::move(p_heIds));
63  m_hoIds.set(std::move(p_hoIds));
64  m_hfIds.set(std::move(p_hfIds));
65  m_emptyIds.set(std::move(p_emptyIds));
66  }
67 }
int i
Definition: DBlmapReader.cc:9
edm::AtomicPtrCache< std::vector< DetId > > m_heIds
Definition: HcalGeometry.h:130
edm::AtomicPtrCache< std::vector< DetId > > m_emptyIds
Definition: HcalGeometry.h:133
bool isSet() const
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)
def move
Definition: eostools.py:510
Definition: DetId.h:18
bool set(std::unique_ptr< T > iNewValue) const
edm::AtomicPtrCache< std::vector< DetId > > m_hfIds
Definition: HcalGeometry.h:132
edm::AtomicPtrCache< std::vector< DetId > > m_hoIds
Definition: HcalGeometry.h:131
edm::AtomicPtrCache< std::vector< DetId > > m_hbIds
Definition: HcalGeometry.h:129
CaloSubdetectorGeometry::DetIdSet HcalGeometry::getCells ( const GlobalPoint r,
double  dR 
) const
virtual

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 153 of file HcalGeometry.cc.

References reco::deltaR2(), eta, PV3DBase< T, PVType, FrameType >::eta(), HcalTopology::etaMax(), etaRing(), CaloSubdetectorGeometry::getCells(), getGeometry(), CaloCellGeometry::getPosition(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, M_PI, m_topology, HcalTopology::maxDepth(), AlCaHLTBitMon_ParallelJobs::p, phi, PV3DBase< T, PVType, FrameType >::phi(), phiBin(), jetcorrextractor::sign(), and HcalTopology::valid().

154  {
155  CaloSubdetectorGeometry::DetIdSet dis; // this is the return object
156 
157  if (0.000001 < dR) {
158  if (dR > M_PI/2.) {// this version needs "small" dR
159  dis = CaloSubdetectorGeometry::getCells(r, dR); // base class version
160  } else {
161  const double dR2 ( dR*dR ) ;
162  const double reta ( r.eta() ) ;
163  const double rphi ( r.phi() ) ;
164  const double lowEta ( reta - dR ) ;
165  const double highEta ( reta + dR ) ;
166  const double lowPhi ( rphi - dR ) ;
167  const double highPhi ( rphi + dR ) ;
168 
169  const double hfEtaHi (m_topology.etaMax(HcalForward));
170 
171  if (highEta > -hfEtaHi &&
172  lowEta < hfEtaHi ) { // in hcal
174 
175  for (unsigned int is ( 0 ) ; is != 4 ; ++is ) {
176  const int sign ( reta>0 ? 1 : -1 ) ;
177  const int ieta_center ( sign*etaRing( hs[is], fabs( reta ) ) ) ;
178  const int ieta_lo ( ( 0 < lowEta*sign ? sign : -sign )*etaRing( hs[is], fabs( lowEta ) ) ) ;
179  const int ieta_hi ( ( 0 < highEta*sign ? sign : -sign )*etaRing( hs[is], fabs( highEta ) ) ) ;
180  const int iphi_lo ( phiBin( hs[is], ieta_center, lowPhi ) ) ;
181  const int iphi_hi ( phiBin( hs[is], ieta_center, highPhi ) ) ;
182  const int jphi_lo ( iphi_lo>iphi_hi ? iphi_lo - 72 : iphi_lo ) ;
183  const int jphi_hi ( iphi_hi ) ;
184 
185  const int idep_lo ( 1 == is ? 4 : 1 ) ;
186  const int idep_hi ( m_topology.maxDepth(hs[is]) );
187  for (int ieta ( ieta_lo ) ; ieta <= ieta_hi ; ++ieta) {// over eta limits
188  if (ieta != 0) {
189  for (int jphi ( jphi_lo ) ; jphi <= jphi_hi ; ++jphi) { // over phi limits
190  const int iphi ( 1 > jphi ? jphi+72 : jphi ) ;
191  for (int idep ( idep_lo ) ; idep <= idep_hi ; ++idep ) {
192  const HcalDetId did ( hs[is], ieta, iphi, idep ) ;
193  if (m_topology.valid(did)) {
194  const CaloCellGeometry* cell ( getGeometry( did ) );
195  if (0 != cell ) {
196  const GlobalPoint& p ( cell->getPosition() ) ;
197  const double eta ( p.eta() ) ;
198  const double phi ( p.phi() ) ;
199  if (reco::deltaR2(eta, phi, reta, rphi ) < dR2) dis.insert( did ) ;
200  }
201  }
202  }
203  }
204  }
205  }
206  }
207  }
208  }
209  }
210  return dis;
211 }
double sign(double x)
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
const HcalTopology & m_topology
Definition: HcalGeometry.h:127
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
Definition: HcalGeometry.h:99
virtual DetIdSet getCells(const GlobalPoint &r, double dR) const
Get a list of all cells within a dR of the given cell.
int maxDepth(HcalSubdetector subdet) const
HcalSubdetector
Definition: HcalAssistant.h:31
int phiBin(HcalSubdetector bc, int etaring, double phi) const
int etaRing(HcalSubdetector bc, double abseta) const
helper methods for getClosestCell
#define M_PI
virtual bool valid(const DetId &id) const
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
Definition: deltaR.h:36
T eta() const
Definition: PV3DBase.h:76
double etaMax(HcalSubdetector subdet) const
DetId HcalGeometry::getClosestCell ( const GlobalPoint r) const
virtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 80 of file HcalGeometry.cc.

References funct::abs(), assert(), PV3DBase< T, PVType, FrameType >::eta(), HcalTopology::etaMax(), etaRing(), getGeometry(), CaloCellGeometry::getPosition(), HcalBarrel, HcalEmpty, HcalEndcap, HcalForward, HcalTopology::incrementDepth(), m_topology, PV3DBase< T, PVType, FrameType >::mag(), PV3DBase< T, PVType, FrameType >::phi(), phiBin(), and PV3DBase< T, PVType, FrameType >::z().

80  {
81 
82  // Now find the closest eta_bin, eta value of a bin i is average
83  // of eta[i] and eta[i-1]
84  static const double z_long=1100.0;
85  double abseta = fabs(r.eta());
86  double absz = fabs(r.z());
87 
88  // figure out subdetector, giving preference to HE in HE/HF overlap region
90  if (abseta <= m_topology.etaMax(HcalBarrel) ) {
91  bc = HcalBarrel;
92  } else if (absz >= z_long) {
93  bc = HcalForward;
94  } else if (m_topology.etaMax(HcalEndcap) ) {
95  bc = HcalEndcap;
96  } else {
97  bc = HcalForward;
98  }
99 
100  // find eta bin
101  int etaring = etaRing(bc, abseta);
102 
103  int phibin = phiBin(bc, etaring, r.phi());
104 
105  // add a sign to the etaring
106  int etabin = (r.z() > 0) ? etaring : -etaring;
107 
108  if (bc == HcalForward) {
109  static const double z_short=1137.0;
110  // Next line is premature depth 1 and 2 can coexist for large z-extent
111  // HcalDetId bestId(bc,etabin,phibin,((fabs(r.z())>=z_short)?(2):(1)));
112  // above line is no good with finite precision
113  HcalDetId bestId(bc,etabin,phibin,((fabs(r.z()) - z_short >-0.1)?(2):(1)));
114  return bestId;
115  } else {
116 
117  //Now do depth if required
118  int dbin = 1;
119  double pointrz=0, drz=99999.;
120  HcalDetId currentId(bc, etabin, phibin, dbin);
121  if (bc == HcalBarrel) pointrz = r.mag();
122  else pointrz = std::abs(r.z());
123  HcalDetId bestId;
124  for ( ; currentId != HcalDetId(); m_topology.incrementDepth(currentId)) {
125  const CaloCellGeometry * cell = getGeometry(currentId);
126  if (cell == 0) {
127  assert (bestId != HcalDetId());
128  break;
129  } else {
130  double rz;
131  if (bc == HcalEndcap) rz = std::abs(cell->getPosition().z());
132  else rz = cell->getPosition().mag();
133  if (std::abs(pointrz-rz)<drz) {
134  bestId = currentId;
135  drz = std::abs(pointrz-rz);
136  }
137  }
138  }
139 
140  return bestId;
141  }
142 }
assert(m_qm.get())
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
const HcalTopology & m_topology
Definition: HcalGeometry.h:127
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
Definition: HcalGeometry.h:99
T mag() const
Definition: PV3DBase.h:67
T z() const
Definition: PV3DBase.h:64
HcalSubdetector
Definition: HcalAssistant.h:31
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int phiBin(HcalSubdetector bc, int etaring, double phi) const
int etaRing(HcalSubdetector bc, double abseta) const
helper methods for getClosestCell
bool incrementDepth(HcalDetId &id) const
T eta() const
Definition: PV3DBase.h:76
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
double etaMax(HcalSubdetector subdet) const
virtual const CaloCellGeometry* HcalGeometry::getGeometry ( const DetId id) const
inlinevirtual

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

Reimplemented from CaloSubdetectorGeometry.

Definition at line 99 of file HcalGeometry.h.

References cellGeomPtr(), HcalTopology::detId2denseId(), and m_topology.

Referenced by getCells(), and getClosestCell().

99  {
100  return cellGeomPtr( m_topology.detId2denseId( id ) ) ;
101  }
virtual unsigned int detId2denseId(const DetId &id) const
return a linear packed id
const HcalTopology & m_topology
Definition: HcalGeometry.h:127
virtual const CaloCellGeometry * cellGeomPtr(unsigned int index) const
unsigned int HcalGeometry::getHxSize ( const int  type) const

Definition at line 213 of file HcalGeometry.cc.

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

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

213  {
214  unsigned int hxsize(0);
215  if (!m_hbIds.isSet()) fillDetIds();
216  if (type == 1) hxsize = (m_hbIds.isSet()) ? m_hbIds->size() : 0;
217  else if (type == 2) hxsize = (m_heIds.isSet()) ? m_heIds->size() : 0;
218  else if (type == 3) hxsize = (m_hoIds.isSet()) ? m_hoIds->size() : 0;
219  else if (type == 4) hxsize = (m_hfIds.isSet()) ? m_hfIds->size() : 0;
220  else if (type == 0) hxsize = (m_emptyIds.isSet()) ? m_emptyIds->size() : 0;
221  return hxsize;
222 }
type
Definition: HCALResponse.h:21
edm::AtomicPtrCache< std::vector< DetId > > m_heIds
Definition: HcalGeometry.h:130
edm::AtomicPtrCache< std::vector< DetId > > m_emptyIds
Definition: HcalGeometry.h:133
bool isSet() const
edm::AtomicPtrCache< std::vector< DetId > > m_hfIds
Definition: HcalGeometry.h:132
void fillDetIds() const
Definition: HcalGeometry.cc:34
edm::AtomicPtrCache< std::vector< DetId > > m_hoIds
Definition: HcalGeometry.h:131
edm::AtomicPtrCache< std::vector< DetId > > m_hbIds
Definition: HcalGeometry.h:129
void HcalGeometry::getSummary ( CaloSubdetectorGeometry::TrVec trVector,
CaloSubdetectorGeometry::IVec iVector,
CaloSubdetectorGeometry::DimVec dimVector,
CaloSubdetectorGeometry::IVec dinsVector 
) const
virtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 407 of file HcalGeometry.cc.

References assert(), begin, EZArrayFL< T >::begin(), cellGeomPtr(), EZArrayFL< T >::end(), CaloCellGeometry::getPosition(), CaloCellGeometry::getTransform(), runTauDisplay::gp, i, relval_2017::k, m_dins, m_topology, HcalTopology::ncells(), numberOfParametersPerShape(), numberOfShapes(), CaloSubdetectorGeometry::numberOfTransformParms(), convertSQLiteXML::ok, CaloCellGeometry::param(), CaloSubdetectorGeometry::parVecVec(), MetAnalyzer::pv(), findQualityFiles::rr, and groupFilesInBlocks::tt.

410  {
411 
412  tVec.reserve( m_topology.ncells()*numberOfTransformParms());
413  iVec.reserve( numberOfShapes()==1 ? 1 : m_topology.ncells());
414  dVec.reserve( numberOfShapes()*numberOfParametersPerShape());
415  dinsVec.reserve( m_topology.ncells());
416 
417  for (ParVecVec::const_iterator ivv (parVecVec().begin());
418  ivv != parVecVec().end() ; ++ivv) {
419  const ParVec& pv ( *ivv ) ;
420  for (ParVec::const_iterator iv ( pv.begin() ) ; iv != pv.end() ; ++iv) {
421  dVec.push_back( *iv ) ;
422  }
423  }
424 
425  for( auto i : m_dins ) {
426  Tr3D tr ;
427  const CaloCellGeometry* ptr ( cellGeomPtr( i ) ) ;
428 
429  if (0 != ptr) {
430  dinsVec.push_back( i );
431 
432  const CCGFloat* par ( ptr->param() ) ;
433 
434  unsigned int ishape ( 9999 ) ;
435 
436  for( unsigned int ivv ( 0 ) ; ivv != parVecVec().size() ; ++ivv ) {
437  bool ok ( true ) ;
438  const CCGFloat* pv ( &(*parVecVec()[ivv].begin() ) ) ;
439  for( unsigned int k ( 0 ) ; k != numberOfParametersPerShape() ; ++k ) {
440  ok = ok && ( fabs( par[k] - pv[k] ) < 1.e-6 ) ;
441  }
442  if( ok ) {
443  ishape = ivv;
444  break ;
445  }
446  }
447  assert( 9999 != ishape ) ;
448 
449  const unsigned int nn (( numberOfShapes()==1) ? (unsigned int)1 : m_dins.size() ) ;
450  if( iVec.size() < nn ) iVec.push_back( ishape ) ;
451 
452  ptr->getTransform( tr, ( Pt3DVec* ) 0 ) ;
453 
454  if( Tr3D() == tr ) { // for preshower there is no rotation
455  const GlobalPoint& gp ( ptr->getPosition() ) ;
456  tr = HepGeom::Translate3D( gp.x(), gp.y(), gp.z() ) ;
457  }
458 
459  const CLHEP::Hep3Vector tt ( tr.getTranslation() ) ;
460  tVec.push_back( tt.x() ) ;
461  tVec.push_back( tt.y() ) ;
462  tVec.push_back( tt.z() ) ;
463  if (6 == numberOfTransformParms()) {
464  const CLHEP::HepRotation rr ( tr.getRotation() ) ;
465  const ROOT::Math::Transform3D rtr (rr.xx(), rr.xy(), rr.xz(), tt.x(),
466  rr.yx(), rr.yy(), rr.yz(), tt.y(),
467  rr.zx(), rr.zy(), rr.zz(), tt.z());
469  rtr.GetRotation( ea ) ;
470  tVec.push_back( ea.Phi() ) ;
471  tVec.push_back( ea.Theta() ) ;
472  tVec.push_back( ea.Psi() ) ;
473  }
474  }
475  }
476 }
int i
Definition: DBlmapReader.cc:9
assert(m_qm.get())
const HcalTopology & m_topology
Definition: HcalGeometry.h:127
virtual unsigned int numberOfParametersPerShape() const
Definition: HcalGeometry.h:38
CaloCellGeometry::CCGFloat CCGFloat
CaloSubdetectorGeometry::IVec m_dins
Definition: HcalGeometry.h:134
CaloCellGeometry::ParVec ParVec
AlgebraicVector EulerAngles
Definition: Definitions.h:36
CaloCellGeometry::Pt3DVec Pt3DVec
virtual const CaloCellGeometry * cellGeomPtr(unsigned int index) const
CaloCellGeometry::Tr3D Tr3D
MgrType::const_iterator const_iterator
Definition: EZArrayFL.h:27
virtual unsigned int numberOfShapes() const
Definition: HcalGeometry.h:37
#define begin
Definition: vmac.h:30
virtual unsigned int numberOfTransformParms() const
virtual unsigned int ncells() const
return a count of valid cells (for dense indexing use)
const std::vector< DetId > & HcalGeometry::getValidDetIds ( DetId::Detector  det = DetId::Detector ( 0 ),
int  subdet = 0 
) const
virtual

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 70 of file HcalGeometry.cc.

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

71  {
72  if( 0 != subdet && !m_hbIds.isSet() ) fillDetIds() ;
73  return ( 0 == subdet ? CaloSubdetectorGeometry::getValidDetIds() :
74  ( HcalBarrel == subdet ? *m_hbIds.load() :
75  ( HcalEndcap == subdet ? *m_heIds.load() :
76  ( HcalOuter == subdet ? *m_hoIds.load() :
77  ( HcalForward == subdet ? *m_hfIds.load() : *m_emptyIds.load() ) ) ) ) ) ;
78 }
edm::AtomicPtrCache< std::vector< DetId > > m_heIds
Definition: HcalGeometry.h:130
edm::AtomicPtrCache< std::vector< DetId > > m_emptyIds
Definition: HcalGeometry.h:133
bool isSet() const
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)
edm::AtomicPtrCache< std::vector< DetId > > m_hfIds
Definition: HcalGeometry.h:132
void fillDetIds() const
Definition: HcalGeometry.cc:34
edm::AtomicPtrCache< std::vector< DetId > > m_hoIds
Definition: HcalGeometry.h:131
T const * load() const
edm::AtomicPtrCache< std::vector< DetId > > m_hbIds
Definition: HcalGeometry.h:129
virtual unsigned int HcalGeometry::indexFor ( const DetId id) const
inlineprotectedvirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 114 of file HcalGeometry.h.

References HcalTopology::detId2denseId(), and m_topology.

114 { return m_topology.detId2denseId(id); }
virtual unsigned int detId2denseId(const DetId &id) const
return a linear packed id
const HcalTopology & m_topology
Definition: HcalGeometry.h:127
void HcalGeometry::init ( void  )
private

Definition at line 21 of file HcalGeometry.cc.

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

Referenced by HcalGeometry().

21  {
22  edm::LogInfo("HcalGeometry") << "HcalGeometry::init() "
23  << " HBSize " << m_topology.getHBSize()
24  << " HESize " << m_topology.getHESize()
25  << " HOSize " << m_topology.getHOSize()
26  << " HFSize " << m_topology.getHFSize();
27 
32 }
unsigned int getHFSize() const
Definition: HcalTopology.h:124
unsigned int getHOSize() const
Definition: HcalTopology.h:123
const HcalTopology & m_topology
Definition: HcalGeometry.h:127
std::vector< IdealObliquePrism > HECellVec
Definition: HcalGeometry.h:19
HBCellVec m_hbCellVec
Definition: HcalGeometry.h:136
HOCellVec m_hoCellVec
Definition: HcalGeometry.h:138
HFCellVec m_hfCellVec
Definition: HcalGeometry.h:139
std::vector< IdealObliquePrism > HOCellVec
Definition: HcalGeometry.h:20
std::vector< IdealZPrism > HFCellVec
Definition: HcalGeometry.h:21
std::vector< IdealObliquePrism > HBCellVec
Definition: HcalGeometry.h:18
unsigned int getHESize() const
Definition: HcalTopology.h:122
HECellVec m_heCellVec
Definition: HcalGeometry.h:137
unsigned int getHBSize() const
Definition: HcalTopology.h:121
void HcalGeometry::localCorners ( Pt3DVec lc,
const CCGFloat pv,
unsigned int  i,
Pt3D ref 
)

Definition at line 334 of file HcalGeometry.cc.

References HcalTopology::denseId2detId(), HcalForward, IdealObliquePrism::localCorners(), IdealZPrism::localCorners(), m_topology, and HcalDetId::subdet().

337  {
339 
340  if (hid.subdet() == HcalForward ) {
341  IdealZPrism::localCorners( lc, pv, ref ) ;
342  } else {
343  IdealObliquePrism::localCorners( lc, pv, ref ) ;
344  }
345 }
int i
Definition: DBlmapReader.cc:9
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
const HcalTopology & m_topology
Definition: HcalGeometry.h:127
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
virtual DetId denseId2detId(unsigned int) const
return a linear packed id
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: IdealZPrism.cc:122
void HcalGeometry::newCell ( const GlobalPoint f1,
const GlobalPoint f2,
const GlobalPoint f3,
const CCGFloat parm,
const DetId detId 
)
virtual

Implements CaloSubdetectorGeometry.

Definition at line 347 of file HcalGeometry.cc.

References CaloSubdetectorGeometry::addValidID(), assert(), CaloSubdetectorGeometry::cornersMgr(), DetId::det(), HcalTopology::detId2denseId(), cropTnPTrees::din, IdealZPrism::EM, IdealZPrism::HADR, DetId::Hcal, HcalBarrel, HcalEndcap, HcalOuter, cmsHarvester::index, m_dins, m_hbCellVec, m_heCellVec, m_hfCellVec, m_hoCellVec, m_topology, DetId::rawId(), and DetId::subdetId().

351  {
352 
353  assert (detId.det()==DetId::Hcal);
354 
355  const HcalDetId hid ( detId ) ;
356  unsigned int din=m_topology.detId2denseId(detId);
357 
358  edm::LogInfo("HcalGeometry") << " newCell subdet "
359  << detId.subdetId() << ", raw ID "
360  << detId.rawId() << ", hid " << hid << ", din "
361  << din << ", index ";
362 
363  if (hid.subdet()==HcalBarrel) {
364  m_hbCellVec.at( din ) = IdealObliquePrism( f1, cornersMgr(), parm ) ;
365  } else if (hid.subdet()==HcalEndcap) {
366  const unsigned int index ( din - m_hbCellVec.size() ) ;
367  m_heCellVec.at( index ) = IdealObliquePrism( f1, cornersMgr(), parm ) ;
368  } else if (hid.subdet()==HcalOuter) {
369  const unsigned int index ( din
370  - m_hbCellVec.size()
371  - m_heCellVec.size() ) ;
372  m_hoCellVec.at( index ) = IdealObliquePrism( f1, cornersMgr(), parm ) ;
373  } else {
374  const unsigned int index ( din
375  - m_hbCellVec.size()
376  - m_heCellVec.size()
377  - m_hoCellVec.size() ) ;
378  m_hfCellVec.at( index ) = IdealZPrism( f1, cornersMgr(), parm, hid.depth()==1 ? IdealZPrism::EM : IdealZPrism::HADR ) ;
379  }
380 
381  addValidID( detId ) ;
382  m_dins.push_back( din );
383 }
virtual unsigned int detId2denseId(const DetId &id) const
return a linear packed id
assert(m_qm.get())
const HcalTopology & m_topology
Definition: HcalGeometry.h:127
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
HBCellVec m_hbCellVec
Definition: HcalGeometry.h:136
HOCellVec m_hoCellVec
Definition: HcalGeometry.h:138
HFCellVec m_hfCellVec
Definition: HcalGeometry.h:139
CaloSubdetectorGeometry::IVec m_dins
Definition: HcalGeometry.h:134
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
void addValidID(const DetId &id)
CaloCellGeometry::CornersMgr * cornersMgr()
HECellVec m_heCellVec
Definition: HcalGeometry.h:137
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
static unsigned int HcalGeometry::numberOfAlignments ( )
inlinestatic
static unsigned int HcalGeometry::numberOfBarrelAlignments ( )
inlinestatic
static unsigned int HcalGeometry::numberOfEndcapAlignments ( )
inlinestatic
static unsigned int HcalGeometry::numberOfForwardAlignments ( )
inlinestatic
static unsigned int HcalGeometry::numberOfOuterAlignments ( )
inlinestatic
virtual unsigned int HcalGeometry::numberOfParametersPerShape ( ) const
inlinevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 38 of file HcalGeometry.h.

References k_NumberOfParametersPerShape.

Referenced by getSummary().

virtual unsigned int HcalGeometry::numberOfShapes ( ) const
inlinevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 37 of file HcalGeometry.h.

References HcalTopology::getNumberOfShapes(), and m_topology.

Referenced by getSummary().

37 { return m_topology.getNumberOfShapes() ; }
const HcalTopology & m_topology
Definition: HcalGeometry.h:127
unsigned int getNumberOfShapes() const
Definition: HcalTopology.h:147
int HcalGeometry::phiBin ( HcalSubdetector  bc,
int  etaring,
double  phi 
) const
private

Definition at line 149 of file HcalGeometry.cc.

References m_topology, and HcalTopology::phiBin().

Referenced by getCells(), and getClosestCell().

149  {
150  return m_topology.phiBin(bc, etaring, phi);
151 }
int phiBin(HcalSubdetector subdet, int etaRing, double phi) const
const HcalTopology & m_topology
Definition: HcalGeometry.h:127
static std::string HcalGeometry::producerTag ( )
inlinestatic
virtual unsigned int HcalGeometry::sizeForDenseIndex ( const DetId id) const
inlineprotectedvirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 115 of file HcalGeometry.h.

References m_topology, and HcalTopology::ncells().

115 { return m_topology.ncells(); }
const HcalTopology & m_topology
Definition: HcalGeometry.h:127
virtual unsigned int ncells() const
return a count of valid cells (for dense indexing use)
const HcalTopology& HcalGeometry::topology ( ) const
inline

Definition at line 108 of file HcalGeometry.h.

References m_topology.

Referenced by CaloTruthAccumulator::beginLuminosityBlock().

108 { return m_topology; }
const HcalTopology & m_topology
Definition: HcalGeometry.h:127

Member Data Documentation

CaloSubdetectorGeometry::IVec HcalGeometry::m_dins
private

Definition at line 134 of file HcalGeometry.h.

Referenced by getSummary(), and newCell().

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

Definition at line 133 of file HcalGeometry.h.

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

HBCellVec HcalGeometry::m_hbCellVec
private

Definition at line 136 of file HcalGeometry.h.

Referenced by cellGeomPtr(), init(), and newCell().

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

Definition at line 129 of file HcalGeometry.h.

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

HECellVec HcalGeometry::m_heCellVec
private

Definition at line 137 of file HcalGeometry.h.

Referenced by cellGeomPtr(), init(), and newCell().

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

Definition at line 130 of file HcalGeometry.h.

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

HFCellVec HcalGeometry::m_hfCellVec
private

Definition at line 139 of file HcalGeometry.h.

Referenced by cellGeomPtr(), init(), and newCell().

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

Definition at line 132 of file HcalGeometry.h.

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

HOCellVec HcalGeometry::m_hoCellVec
private

Definition at line 138 of file HcalGeometry.h.

Referenced by cellGeomPtr(), init(), and newCell().

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

Definition at line 131 of file HcalGeometry.h.

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

const HcalTopology& HcalGeometry::m_topology
private