18#include "GaudiKernel/SystemOfUnits.h"
27const eflowDepthLayerENUM eflowDepthCalculator::m_layerDepthMap[
eflowCalo::nRegions] = {
EMB1,
EMB2,
EMB3,
EME1,
EME2,
EME3,
HEC1,
HEC2,
HEC3, HEC4, Tile1, Tile2, Tile3,
FCAL0,
FCAL1,
FCAL2 };
58const double eflowDepthCalculator::m_HEClayerZ[5] = { 4.14*Gaudi::Units::meter, 4.61*Gaudi::Units::meter, 5.08*Gaudi::Units::meter, 5.55*Gaudi::Units::meter, 6.00*Gaudi::Units::meter };
63const double eflowDepthCalculator::m_FCALlayerZ[4] = { 4.71*Gaudi::Units::meter, (4.71+.45)*Gaudi::Units::meter, (4.71+2*.45)*Gaudi::Units::meter, (4.71+3*.45)*Gaudi::Units::meter };
111 double thetaTopLeft, thetaBottomLeft, thetaTopRight, thetaBottomRight;
115 thetaTopLeft =
M_PI / 2.0;
116 thetaBottomLeft =
M_PI / 2.0;
119 thetaTopLeft = atan(rMax / zMin);
120 thetaBottomLeft = atan(rMin / zMin);
122 thetaBottomRight = atan(rMin / zMax);
123 thetaTopRight = atan(rMax / zMax);
126 if (
theta > thetaTopLeft ||
theta <= thetaBottomRight) {
130 else if (
theta > thetaBottomLeft) {
132 if (
theta <= thetaTopRight)
133 return (zMax - zMin) / cos(
theta);
135 return (rMax - zMin * tan(
theta)) / sin(
theta);
139 if (
theta >= thetaTopRight)
140 return (rMax - rMin) / sin(
theta);
142 return (zMax * tan(
theta) - rMin) / sin(
theta);
159 static const double preEMBbottomRight =
m_preEMBat0eta / sin(thetaEMBbottomRight);
160 static const double etaEMBbottomRight = fabs( log(tan(thetaEMBbottomRight / 2)) );
169 const double theta = 2.0 * atan( exp(-
eta) );
170 const double sinTheta = sin(
theta);
172 if (
theta > thetaEMBbottomRight) {
185 for (
int i = 0; i < 3; i++) {
195 for (
int i = 0; i < 3; i++)
198 else if (
eta < 1.0) {
200 bool haveIncludedGap =
false;
202 double tileBar, tileExt, temp;
204 for (
int i = 0; i < 3; i++) {
214 if (tileBar > 0.0 && tileExt > 0.0) {
216 temp = tileBar + tileExt;
218 if (!haveIncludedGap) {
220 haveIncludedGap =
true;
225 else if (tileBar == 0.0 && tileExt > 0.0) {
229 if (i > 0 && !haveIncludedGap) {
231 haveIncludedGap =
true;
247 for (
int i = 0; i < 3; i++)
251 for (
int i = 1; i <=
m_nDepth; i++) {
Scalar eta() const
pseudorapidity method
Scalar theta() const
theta method
static const int nRegions
static const double m_tileExtLayerR[4]
static const double m_cryostatAt0eta
static const double m_tileBarZmax
static const double m_preEMBat0eta
static const double m_preEMEat19eta
static const double m_HEClayerZ[5]
static const double m_itc1Rmin
static const double m_tileExtZmax
static const double m_tileLambdaPerUnitLength
static const double m_EMBlayerR[4]
static const double m_itc2Rmin
static const double m_itc2Zmax
static const double m_tileBarLayerR[4]
static const double m_EMBlambdaPerUnitLength
static const double m_FCALrMin
static const double m_EMElayerZ[4]
const double * calcDepthArray(double eta, double filler=0.0)
static const double m_FCALlayerZ[4]
static const double m_inclusivePreTileExt
static const double m_tileBarZmin
static const DEPTHLAYER m_layerDepthMap[eflowCalo::nRegions]
static double lengthThroughBox(double theta, double zMin, double zMax, double rMin, double rMax)
static const double m_preHEC
static const double m_fcalLambdaPerUnitLength[3]
static const double m_itc1Zmin
static const double m_EMBzMin
static const double m_itc1Rmax
static const int m_nDepth
static const double m_FCALrMax
static const double m_LArGap
static const double m_EMErMax
static const double m_tileExtZmin
static const double m_itc1Zmax
static const double m_itc2Rmax
static const double m_EMErMin
static const double m_HECrMin
static const double m_HECrMax
static const double m_EMBzMax
static const double m_itc2Zmin
static const double m_preFCAL
static const double m_tileGapAt1eta
static DEPTHLAYER depthIndex(eflowCaloENUM layer)
double m_layerDepth[m_nDepth+1]
eflowCalo::LAYER eflowCaloENUM
eflowDepthCalculator::DEPTHLAYER eflowDepthLayerENUM