SimG4CMS
HGCalTestBeam
src
AHCalGeometry.cc
Go to the documentation of this file.
1
#include <memory>
2
3
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
4
#include "
SimG4CMS/HGCalTestBeam/interface/AHCalGeometry.h
"
5
6
AHCalGeometry::AHCalGeometry
(
edm::ParameterSet
const
& iC) {
ahcal_
= std::make_unique<AHCalParameters>(iC); }
7
8
std::pair<double, double>
AHCalGeometry::getXY
(
const
AHCalDetId
&
id
)
const
{
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
}
15
16
double
AHCalGeometry::getZ
(
const
AHCalDetId
&
id
)
const
{
17
int
lay =
id
.depth();
18
return
(
ahcal_
->zFirst() + (lay - 1) *
ahcal_
->deltaZ());
19
}
MessageLogger.h
cuy.col
col
Definition:
cuy.py:1009
AHCalGeometry::AHCalGeometry
AHCalGeometry()=delete
AHCalGeometry::getZ
double getZ(const AHCalDetId &id) const
Definition:
AHCalGeometry.cc:16
AHCalGeometry::getXY
std::pair< double, double > getXY(const AHCalDetId &id) const
get the local coordinate in the plane and along depth
Definition:
AHCalGeometry.cc:8
AHCalGeometry::ahcal_
std::unique_ptr< AHCalParameters > ahcal_
Definition:
AHCalGeometry.h:27
AHCalGeometry.h
AHCalDetId
Definition:
AHCalDetId.h:13
edm::ParameterSet
Definition:
ParameterSet.h:47
Generated for CMSSW Reference Manual by
1.8.16