CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
AHCalGeometry Class Reference

#include <AHCalGeometry.h>

Public Member Functions

 AHCalGeometry (edm::ParameterSet const &)
 
 AHCalGeometry ()=delete
 
std::pair< double, double > getXY (const AHCalDetId &id) const
 get the local coordinate in the plane and along depth More...
 
double getZ (const AHCalDetId &id) const
 
int maxDepth () const
 get maximum number of layers More...
 
 ~AHCalGeometry ()
 

Private Attributes

std::unique_ptr< AHCalParametersahcal_
 

Detailed Description

Gets position of AHCal cell

Definition at line 12 of file AHCalGeometry.h.

Constructor & Destructor Documentation

AHCalGeometry::AHCalGeometry ( edm::ParameterSet const &  iC)

Create geometry of AHCal

Definition at line 6 of file AHCalGeometry.cc.

References ahcal_.

6 { ahcal_ = std::make_unique<AHCalParameters>(iC); }
std::unique_ptr< AHCalParameters > ahcal_
Definition: AHCalGeometry.h:27
AHCalGeometry::AHCalGeometry ( )
delete
AHCalGeometry::~AHCalGeometry ( )
inline

Definition at line 17 of file AHCalGeometry.h.

17 {}

Member Function Documentation

std::pair< double, double > AHCalGeometry::getXY ( const AHCalDetId id) const

get the local coordinate in the plane and along depth

Definition at line 8 of file AHCalGeometry.cc.

References ahcal_, and cuy::col.

8  {
9  int row = id.irow();
10  int col = id.icol();
11  double shiftx = (col > 0) ? -0.5 * ahcal_->deltaX() : 0.5 * ahcal_->deltaX();
12  double shifty = (row > 0) ? -0.5 * ahcal_->deltaY() : 0.5 * ahcal_->deltaY();
13  return std::pair<double, double>(col * ahcal_->deltaX() + shiftx, row * ahcal_->deltaY() + shifty);
14 }
std::unique_ptr< AHCalParameters > ahcal_
Definition: AHCalGeometry.h:27
int col
Definition: cuy.py:1009
double AHCalGeometry::getZ ( const AHCalDetId id) const

Definition at line 16 of file AHCalGeometry.cc.

References ahcal_.

16  {
17  int lay = id.depth();
18  return (ahcal_->zFirst() + (lay - 1) * ahcal_->deltaZ());
19 }
std::unique_ptr< AHCalParameters > ahcal_
Definition: AHCalGeometry.h:27
int AHCalGeometry::maxDepth ( void  ) const
inline

get maximum number of layers

Definition at line 20 of file AHCalGeometry.h.

References ahcal_.

20 { return ahcal_->maxDepth(); }
std::unique_ptr< AHCalParameters > ahcal_
Definition: AHCalGeometry.h:27

Member Data Documentation

std::unique_ptr<AHCalParameters> AHCalGeometry::ahcal_
private

Definition at line 27 of file AHCalGeometry.h.

Referenced by AHCalGeometry(), getXY(), getZ(), and maxDepth().