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() [1/2]

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

Create geometry of AHCal

Definition at line 4 of file AHCalGeometry.cc.

4 { ahcal_.reset(new 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 6 of file AHCalGeometry.cc.

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 }

References ahcal_, and cuy::col.

◆ getZ()

double AHCalGeometry::getZ ( const AHCalDetId id) const

Definition at line 14 of file AHCalGeometry.cc.

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

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
AHCalParameters
Definition: AHCalParameters.h:10