CMS 3D CMS Logo

AHCalGeometry.cc
Go to the documentation of this file.
3 
5 
6 std::pair<double, double> AHCalGeometry::getXY(const AHCalDetId& id) const {
7  int row = id.irow();
8  int col = id.icol();
9  double shiftx = (col > 0) ? -0.5 * ahcal_->deltaX() : 0.5 * ahcal_->deltaX();
10  double shifty = (row > 0) ? -0.5 * ahcal_->deltaY() : 0.5 * ahcal_->deltaY();
11  return std::pair<double, double>(col * ahcal_->deltaX() + shiftx, row * ahcal_->deltaY() + shifty);
12 }
13 
14 double AHCalGeometry::getZ(const AHCalDetId& id) const {
15  int lay = id.depth();
16  return (ahcal_->zFirst() + (lay - 1) * ahcal_->deltaZ());
17 }
MessageLogger.h
cuy.col
col
Definition: cuy.py:1010
AHCalGeometry::AHCalGeometry
AHCalGeometry()=delete
AHCalGeometry::getZ
double getZ(const AHCalDetId &id) const
Definition: AHCalGeometry.cc:14
AHCalGeometry::getXY
std::pair< double, double > getXY(const AHCalDetId &id) const
get the local coordinate in the plane and along depth
Definition: AHCalGeometry.cc:6
AHCalGeometry::ahcal_
std::unique_ptr< AHCalParameters > ahcal_
Definition: AHCalGeometry.h:27
AHCalGeometry.h
AHCalDetId
Definition: AHCalDetId.h:13
AHCalParameters
Definition: AHCalParameters.h:10
edm::ParameterSet
Definition: ParameterSet.h:36