test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalGeometry.cc
Go to the documentation of this file.
4 #include <algorithm>
5 
6 #include <Math/Transform3D.h>
7 #include <Math/EulerAngles.h>
8 
13 
15  m_topology( topology ) {
16  init();
17 }
18 
20 
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 }
33 
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 }
68 
69 const std::vector<DetId>&
71  int subdet ) const {
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 }
79 
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 }
143 
144 
145 int HcalGeometry::etaRing(HcalSubdetector bc, double abseta) const {
146  return m_topology.etaRing(bc, abseta);
147 }
148 
149 int HcalGeometry::phiBin(HcalSubdetector bc, int etaring, double phi) const {
150  return m_topology.phiBin(bc, etaring, phi);
151 }
152 
154  double dR ) const {
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 }
212 
213 unsigned int HcalGeometry::getHxSize(const int type) const {
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 }
223 
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 }
230 
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 }
237 
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 }
244 
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 }
255 
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 }
269 
271  unsigned int nD) {
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 }
279 
282 }
283 
286 }
287 
290 }
291 
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 ) ;
302  assert( index < numberOfOuterAlignments() ) ;
303  return index ;
304 }
305 
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 
326  assert( index < numberOfAlignments() ) ;
327  return index ;
328 }
329 
331  return (unsigned int)DetId::Hcal - 1 ;
332 }
333 
335  const CCGFloat* pv,
336  unsigned int i,
337  Pt3D& ref) {
339 
340  if (hid.subdet() == HcalForward ) {
341  IdealZPrism::localCorners( lc, pv, ref ) ;
342  } else {
343  IdealObliquePrism::localCorners( lc, pv, ref ) ;
344  }
345 }
346 
348  const GlobalPoint& f2 ,
349  const GlobalPoint& f3 ,
350  const CCGFloat* parm ,
351  const DetId& detId) {
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 }
384 
385 const CaloCellGeometry* HcalGeometry::cellGeomPtr( unsigned int din ) const {
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 }
406 
410  CaloSubdetectorGeometry::IVec& dinsVec ) const {
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 }
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:56
type
Definition: HCALResponse.h:21
unsigned int getHFSize() const
Definition: HcalTopology.h:124
virtual void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
int i
Definition: DBlmapReader.cc:9
virtual DetId getClosestCell(const GlobalPoint &r) const
Definition: HcalGeometry.cc:80
static unsigned int alignmentTransformIndexLocal(const DetId &id)
virtual unsigned int detId2denseId(const DetId &id) const
return a linear packed id
std::vector< CCGFloat > DimVec
unsigned int getHOSize() const
Definition: HcalTopology.h:123
edm::AtomicPtrCache< std::vector< DetId > > m_heIds
Definition: HcalGeometry.h:130
static unsigned int alignmentEndcapIndexLocal(const DetId &id)
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
int phiBin(HcalSubdetector subdet, int etaRing, double phi) const
virtual void getSummary(CaloSubdetectorGeometry::TrVec &trVector, CaloSubdetectorGeometry::IVec &iVector, CaloSubdetectorGeometry::DimVec &dimVector, CaloSubdetectorGeometry::IVec &dinsVector) const
CaloTopology const * topology(0)
unsigned int getHxSize(const int type) const
static DetId detIdFromOuterAlignmentIndex(unsigned int i)
double sign(double x)
assert(m_qm.get())
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
const HcalTopology & m_topology
Definition: HcalGeometry.h:127
std::vector< unsigned int > IVec
edm::AtomicPtrCache< std::vector< DetId > > m_emptyIds
Definition: HcalGeometry.h:133
bool isHE(int etabin, int depth)
std::vector< CCGFloat > TrVec
const_iterator begin() const
Definition: EZArrayFL.h:63
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
HepGeom::Transform3D Tr3D
std::vector< IdealObliquePrism > HECellVec
Definition: HcalGeometry.h:19
std::vector< Pt3D > Pt3DVec
bool isHB(int etabin, int depth)
CaloCellGeometry::CCGFloat CCGFloat
bool isSet() const
virtual unsigned int numberOfParametersPerShape() const
Definition: HcalGeometry.h:38
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: HcalGeometry.cc:70
virtual CaloSubdetectorGeometry::DetIdSet getCells(const GlobalPoint &r, double dR) const
Get a list of all cells within a dR of the given cell.
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)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: HcalGeometry.h:25
virtual DetIdSet getCells(const GlobalPoint &r, double dR) const
Get a list of all cells within a dR of the given cell.
const CCGFloat * param() const
T mag() const
Definition: PV3DBase.h:67
HBCellVec m_hbCellVec
Definition: HcalGeometry.h:136
HOCellVec m_hoCellVec
Definition: HcalGeometry.h:138
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
HFCellVec m_hfCellVec
Definition: HcalGeometry.h:139
virtual void getTransform(Tr3D &tr, Pt3DVec *lptr) const
--------— only needed by specific utility; overloaded when needed -—
std::vector< IdealObliquePrism > HOCellVec
Definition: HcalGeometry.h:20
static unsigned int numberOfOuterAlignments()
Definition: HcalGeometry.h:62
int maxDepth(HcalSubdetector subdet) const
int etaRing(HcalSubdetector subdet, double eta) const
eta and phi index from eta, phi values
T z() const
Definition: PV3DBase.h:64
def move
Definition: eostools.py:510
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
static DetId detIdFromForwardAlignmentIndex(unsigned int i)
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
static unsigned int alignmentBarrelIndexLocal(const DetId &id)
HcalSubdetector
Definition: HcalAssistant.h:31
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
CaloCellGeometry::CCGFloat CCGFloat
static DetId detIdFromBarrelAlignmentIndex(unsigned int i)
virtual DetId denseId2detId(unsigned int) const
return a linear packed id
int phiBin(HcalSubdetector bc, int etaring, double phi) const
static DetId detIdFromLocalAlignmentIndex(unsigned int i)
int etaRing(HcalSubdetector bc, double abseta) const
helper methods for getClosestCell
CaloSubdetectorGeometry::IVec m_dins
Definition: HcalGeometry.h:134
HcalGeometry(const HcalTopology &topology)
Definition: HcalGeometry.cc:14
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
void localCorners(Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
#define M_PI
static unsigned int alignmentOuterIndexLocal(const DetId &id)
CaloCellGeometry::Pt3D Pt3D
std::vector< IdealZPrism > HFCellVec
Definition: HcalGeometry.h:21
int iphi() const
get the cell iphi
Definition: HcalDetId.cc:103
Definition: DetId.h:18
bool incrementDepth(HcalDetId &id) const
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:58
AlgebraicVector EulerAngles
Definition: Definitions.h:36
void addValidID(const DetId &id)
bool set(std::unique_ptr< T > iNewValue) const
virtual ~HcalGeometry()
The HcalGeometry will delete all its cell geometries at destruction time.
Definition: HcalGeometry.cc:19
CaloCellGeometry::CornersMgr * cornersMgr()
Detector
Definition: DetId.h:24
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: IdealZPrism.cc:122
CaloCellGeometry::Pt3DVec Pt3DVec
HepGeom::Point3D< CCGFloat > Pt3D
bool isHF(int etabin, int depth)
virtual bool valid(const DetId &id) const
std::vector< IdealObliquePrism > HBCellVec
Definition: HcalGeometry.h:18
virtual const CaloCellGeometry * cellGeomPtr(unsigned int index) const
Geom::Phi< T > phi() const
unsigned int getHESize() const
Definition: HcalTopology.h:122
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
Definition: deltaR.h:36
HECellVec m_heCellVec
Definition: HcalGeometry.h:137
CaloCellGeometry::Tr3D Tr3D
T eta() const
Definition: PV3DBase.h:76
MgrType::const_iterator const_iterator
Definition: EZArrayFL.h:27
virtual unsigned int numberOfShapes() const
Definition: HcalGeometry.h:37
edm::AtomicPtrCache< std::vector< DetId > > m_hfIds
Definition: HcalGeometry.h:132
#define begin
Definition: vmac.h:30
const_iterator end() const
Definition: EZArrayFL.h:64
void fillDetIds() const
Definition: HcalGeometry.cc:34
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:60
static unsigned int alignmentForwardIndexLocal(const DetId &id)
static DetId detIdFromEndcapAlignmentIndex(unsigned int i)
static unsigned int alignmentBarEndForIndexLocal(const DetId &id, unsigned int nD)
virtual unsigned int numberOfTransformParms() const
edm::AtomicPtrCache< std::vector< DetId > > m_hoIds
Definition: HcalGeometry.h:131
CaloCellGeometry::Pt3D Pt3D
Definition: HcalGeometry.h:24
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
unsigned int getHBSize() const
Definition: HcalTopology.h:121
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
T const * load() const
edm::AtomicPtrCache< std::vector< DetId > > m_hbIds
Definition: HcalGeometry.h:129
static unsigned int numberOfAlignments()
Definition: HcalGeometry.h:66
virtual unsigned int ncells() const
return a count of valid cells (for dense indexing use)
double etaMax(HcalSubdetector subdet) const