CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
AHCalGeometry Class Reference

#include <AHCalGeometry.h>

Public Member Functions

 AHCalGeometry (edm::ParameterSet const &)
 
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 Member Functions

 AHCalGeometry ()=delete
 

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 4 of file AHCalGeometry.cc.

References ahcal_.

4 { ahcal_.reset(new AHCalParameters(iC)); }
std::unique_ptr< AHCalParameters > ahcal_
Definition: AHCalGeometry.h:27
AHCalGeometry::~AHCalGeometry ( )
inline

Definition at line 16 of file AHCalGeometry.h.

16 {}
AHCalGeometry::AHCalGeometry ( )
privatedelete

Referenced by maxDepth().

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 6 of file AHCalGeometry.cc.

References ahcal_, and cuy::col.

Referenced by maxDepth().

6  {
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 }
std::unique_ptr< AHCalParameters > ahcal_
Definition: AHCalGeometry.h:27
col
Definition: cuy.py:1010
double AHCalGeometry::getZ ( const AHCalDetId id) const

Definition at line 14 of file AHCalGeometry.cc.

References ahcal_.

Referenced by maxDepth().

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

get maximum number of layers

Definition at line 19 of file AHCalGeometry.h.

References ahcal_, AHCalGeometry(), getXY(), and getZ().

19 { 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().