CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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() [1/2]

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

Create geometry of AHCal

Definition at line 6 of file AHCalGeometry.cc.

6 { ahcal_ = std::make_unique<AHCalParameters>(iC); }

References ahcal_.

◆ ~AHCalGeometry()

AHCalGeometry::~AHCalGeometry ( )
inline

Definition at line 16 of file AHCalGeometry.h.

16 {}

◆ AHCalGeometry() [2/2]

AHCalGeometry::AHCalGeometry ( )
privatedelete

Member Function Documentation

◆ getXY()

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.

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 }

References ahcal_, and cuy::col.

◆ getZ()

double AHCalGeometry::getZ ( const AHCalDetId id) const

Definition at line 16 of file AHCalGeometry.cc.

16  {
17  int lay = id.depth();
18  return (ahcal_->zFirst() + (lay - 1) * ahcal_->deltaZ());
19 }

References ahcal_.

◆ maxDepth()

int AHCalGeometry::maxDepth ( void  ) const
inline

get maximum number of layers

Definition at line 19 of file AHCalGeometry.h.

19 { return ahcal_->maxDepth(); }

References ahcal_.

Member Data Documentation

◆ ahcal_

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

Definition at line 27 of file AHCalGeometry.h.

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

cuy.col
col
Definition: cuy.py:1010
AHCalGeometry::ahcal_
std::unique_ptr< AHCalParameters > ahcal_
Definition: AHCalGeometry.h:27