ATLAS Offline Software
Public Member Functions | Static Public Attributes | Private Member Functions | List of all members
EgammaHitsShowerDepth Class Reference

#include <EgammaHitsShowerDepth.h>

Collaboration diagram for EgammaHitsShowerDepth:

Public Member Functions

float depth (const float &aeta, const float start_crack, const float end_crack, const CxxUtils::Array< 2 > &sampling_depth, const float etamax, const xAOD::TrigEMCluster *cluster) const
 Calculate the depth of the cluster. More...
 

Static Public Attributes

static const CaloSampling::CaloSample m_samps [2][4]
 

Private Member Functions

void barrelCoefs (const float &aeta, float R[4]) const
 Calculate the sampling depth coefficients for the barrel. More...
 
bool endcapCoefs (const float &aeta, const CxxUtils::Array< 2 > &sampling_depth, const float etamax, float R[4]) const
 Calculate the sampling depth coefficients for the endcap. More...
 

Detailed Description

Definition at line 14 of file EgammaHitsShowerDepth.h.

Member Function Documentation

◆ barrelCoefs()

void EgammaHitsShowerDepth::barrelCoefs ( const float &  aeta,
float  R[4] 
) const
private

Calculate the sampling depth coefficients for the barrel.

Parameters
aetaabs(eta) of the cluster.
R[out]The set of coefficients per layer.

Definition at line 89 of file EgammaHitsShowerDepth.cxx.

90 {
91 //----------------------------------------------------------------------
92 // APPROXIMATE Longitudinal segmentation of the EM Barrel
93 // Inspired from M.Seman's former ACCOMPA.
94 // - PURPOSE Computes the shower longitudinal barycenter
95 // - Inputs: shower eta and energies in the compartments
96 //----------------------------------------------------------------------
97 
98  // Constants:
99  static const float
100  X0IN = 1.6, // 1.7 X0 before strips
101  X0S1 = 6.0, // 6 X0 till end of strips
102 // X0S2 = 24.0, // 24 X0 till end of S2
103 // X0S3 = 2.0, // 2 X0 at least in S3
104 // RIN = 150.0024, // where strips start (cm)
105 // ROUT = 197.0482, // where S3 ends (cm)
106 // RCLR = 0.7, // clearance for resistive ink (cm)
107  //BEND1 = 152.1000, // first 3 bends radii (cm)
108  //BEND2 = 155.9659,
109  //BEND3 = 159.7202,
110  ETASTEP = 0.8, // where lead changes
111  //DENSHI = 2.137, // cm/X0 high density
112  //DENSLO = 2.695, // cm/X0 low density
113  X0THI = 23.74, // total depth high density part (not indep?)
114  X0TLO = 19.177; // total depth low density part (not indep?)
115 
116  float /*DENS,*/ X0T/*, RLO, RHI*/ ;
117  float R12, R23;
118 
119  if ( aeta < ETASTEP ) {
120  //DENS = DENSHI;
121  X0T = X0THI;
122  //RLO = BEND2; // break strips between bends 2 and 3
123  //RHI = BEND3;
124  }else{
125  //DENS = DENSLO;
126  X0T = X0TLO;
127  //RLO = BEND1; // break strips between bends 1 and 2
128  //RHI = BEND2;
129  }
130 
131  R[0] = (X0IN) * cosh(aeta);
132 
133  // R12 is radius at transition strips->Sampling2
134  // R23 is radius at transition Sampling2->Sampling3
135 
136  R12 = X0S1;
137 
138  //.. total depth of calo at given eta
139 
140  float RADLTOT = X0T*cosh(aeta);
141 
142  //.. radius where S2 ends. Make sure there are 2X0 left for S3
143 
144  if (aeta < 0.5){
145  R23 = 22 * cosh(aeta) ;
146  }else{
147  R23 = 25;
148  }
149 
150  R[1] = R[0] + (R12 - R[0])/2 ;
151  R[2] = R12 + (R23 - R12)/2;
152  R[3] = R23 + (RADLTOT - R23)/2;
153 }

◆ depth()

float EgammaHitsShowerDepth::depth ( const float &  aeta,
const float  start_crack,
const float  end_crack,
const CxxUtils::Array< 2 > &  sampling_depth,
const float  etamax,
const xAOD::TrigEMCluster cluster 
) const

Calculate the depth of the cluster.

Parameters
aetaabs(eta) of the cluster.
clusterCluster for which to calculate the depth.
logStream for debug messages.

Definition at line 44 of file EgammaHitsShowerDepth.cxx.

50 {
51 
52  float R[4];
53  int si;
54 
55  if (aeta < start_crack) {
56  barrelCoefs (aeta, R);
57  si = 0;
58  }
59  else if (aeta > end_crack) {
60  if (!endcapCoefs (aeta, sampling_depth, etamax, R))
61  return 0;
62  si = 1;
63  }
64  else
65  return 0;
66 
67  double rsum = 0;
68  double esum = 0;
69  for (int i=0; i < 4; i++) {
70  float e = cluster->energy (m_samps[si][i]);
71  rsum += R[i] * e;
72  esum += e;
73  }
74 
75  if (esum == 0)
76  return 0;
77 
78  float depth = rsum / esum;
79 
80  return depth;
81 }

◆ endcapCoefs()

bool EgammaHitsShowerDepth::endcapCoefs ( const float &  aeta,
const CxxUtils::Array< 2 > &  sampling_depth,
const float  etamax,
float  R[4] 
) const
private

Calculate the sampling depth coefficients for the endcap.

Parameters
aetaabs(eta) of the cluster.
sampling_depthArray of sampling depths per bin/sampling in the EC.
etamaxMaximum eta value in sampling_depth.
R[out]The set of coefficients per layer.

Definition at line 163 of file EgammaHitsShowerDepth.cxx.

167 {
168  unsigned int ibin = (static_cast<unsigned int> (aeta / etamax * 100)) ;
169  if (ibin >= sampling_depth.size())
170  return false;
171 
172  for (int i=0; i < 4; i++)
173  R[i] = sampling_depth[ibin][i+1];
174  return true;
175 }

Member Data Documentation

◆ m_samps

const CaloSampling::CaloSample EgammaHitsShowerDepth::m_samps
static

The documentation for this class was generated from the following files:
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
IDTPM::R
float R(const U &p)
Definition: TrackParametersHelper.h:101
CxxUtils::Array::size
unsigned int size(unsigned int dim=0) const
Return the size of the array along one dimension.
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
lumiFormat.i
int i
Definition: lumiFormat.py:92
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
EgammaHitsShowerDepth::depth
float depth(const float &aeta, const float start_crack, const float end_crack, const CxxUtils::Array< 2 > &sampling_depth, const float etamax, const xAOD::TrigEMCluster *cluster) const
Calculate the depth of the cluster.
Definition: EgammaHitsShowerDepth.cxx:44
EgammaHitsShowerDepth::endcapCoefs
bool endcapCoefs(const float &aeta, const CxxUtils::Array< 2 > &sampling_depth, const float etamax, float R[4]) const
Calculate the sampling depth coefficients for the endcap.
Definition: EgammaHitsShowerDepth.cxx:163
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
xAOD::TrigEMCluster_v1::energy
float energy() const
get Energy (calibrated)
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
EgammaHitsShowerDepth::barrelCoefs
void barrelCoefs(const float &aeta, float R[4]) const
Calculate the sampling depth coefficients for the barrel.
Definition: EgammaHitsShowerDepth.cxx:89
EgammaHitsShowerDepth::m_samps
static const CaloSampling::CaloSample m_samps[2][4]
Definition: EgammaHitsShowerDepth.h:24